[data-player-name],
#join-name {
  text-transform: uppercase;
}
.game-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.game-options label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #d5c0b2;
  font-size: 12px;
}
.game-options select,
.game-options input,
#join-name {
  min-width: 0;
  width: 100%;
  border: 1px solid #ae884a80;
  color: #fff1d5;
  background: #0c0713;
  padding: 9px;
  border-radius: 6px;
  font: inherit;
}
.next-player {
  order: 0;
  margin: 0 0 5px;
  color: #cab79b;
  font-size: 13px;
  overflow-wrap: anywhere;
}
#turn-status {
  order: 0;
  margin: 0 0 12px;
  color: #c9b7cf;
  font-size: 12px;
  line-height: 1.5;
}
body[data-screen='regression'] .next-player,
body[data-screen='regression'] #turn-status,
body[data-screen='game']:not([data-turn-phase]) .next-player,
body[data-screen='game']:not([data-turn-phase]) #turn-status {
  display: none;
}
.turn-actions {
  order: 3;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-top: 15px;
}
.pass-action {
  color: #ffe5bd;
  border: 1px solid #d1ab6a;
  background: linear-gradient(135deg, #332037, #170f23);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  min-height: 54px;
}
.session-action {
  order: 3;
  margin-top: 15px;
}
.paused-message {
  order: 2;
  color: #e4c080;
  line-height: 1.6;
}
dialog {
  color: #f5ebdc;
  background: #170f20;
  border: 1px solid #c9a15a;
  border-radius: 14px;
  padding: 24px;
  width: min(90vw, 720px);
  max-height: 85svh;
}
dialog::backdrop {
  background: #050208c9;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.dialog-actions > * {
  flex: 1;
}
#organizer-tools {
  border-top: 1px solid #8b713d66;
  padding-top: 12px;
}
#organizer-tools h3 {
  font:
    500 20px Georgia,
    serif;
  color: #ebcb8b;
}
#join-form {
  padding: 12px;
  border: 1px solid #a2824344;
  border-radius: 8px;
}
#join-form > label:first-child {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}
#join-message {
  font-size: 13px;
  color: #e3c080;
  line-height: 1.5;
}
#players-dialog:has(#organizer-tools:not([hidden])) {
  width: min(94vw, 920px);
}
#session-player-list:has(.participant-state),
.managed-players {
  display: grid;
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  gap: 10px;
  max-height: 40svh;
  overflow: auto;
}
#session-player-list:has(.participant-state) > li,
.managed-players > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  border: 1px solid #ac854b44;
  padding: 12px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.participant-state {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #e0bb78;
}
#session-player-list .participant-state,
.managed-players .participant-state {
  grid-column: 1;
}
#session-player-list li > span:last-of-type,
.managed-players li > span:last-of-type {
  font-size: 12px;
  color: #b9a7c0;
  grid-column: 1;
}
#session-player-list li > button {
  grid-column: 2;
  grid-row: 1/4;
  align-self: center;
}
#organizer-tools details {
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.7;
}
#organizer-tools summary {
  cursor: pointer;
  color: #edce91;
}
#turn-history,
#session-events {
  max-height: 35svh;
  overflow: auto;
  overflow-wrap: anywhere;
}
#turn-history li,
#session-events li {
  padding: 8px 0;
  border-bottom: 1px solid #8a724233;
}
#finished-screen .managed-players {
  max-height: 50svh;
}
@media (min-width: 701px) and (max-height: 850px) {
  body[data-turn-phase] main:has(.long-name) {
    min-height: 760px;
  }
  body[data-turn-phase] .current-player {
    margin-bottom: 7px;
  }
  body[data-turn-phase] #card-text {
    font-size: 15px;
  }
  body[data-turn-phase] .card {
    min-height: 250px;
    flex-basis: 270px;
  }
  body[data-turn-phase] .card h1 {
    font-size: 28px;
  }
}
@media (max-width: 500px) {
  .game-options {
    grid-template-columns: 1fr;
  }
  #session-player-list:has(.participant-state) > li {
    grid-template-columns: minmax(0, 1fr);
  }
  #session-player-list li > button {
    grid-column: 1;
    grid-row: auto;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
}
/* Progression stays inside the existing participant dialog; wheel dimensions are unchanged. */
#session-player-list li > span.participant-progression,
.managed-players li > span.participant-progression {
  grid-row: 4;
  grid-column: 1 / -1;
  color: #dac89d;
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.color-choice.is-unavailable {
  filter: grayscale(1);
  opacity: 0.52;
  cursor: not-allowed;
}
.color-choice .color-lock {
  font-size: 8px;
  letter-spacing: 0;
  margin-top: 3px;
}
#skip-turn {
  width: 100%;
  margin-top: 8px;
}
/* FT1.3 (D-FT-4): BOTH — two language versions of one card, identical size and contrast. */
#card-text .card-lang {
  display: block;
}
#card-text .card-lang + .card-lang {
  margin-top: 0.7em;
  padding-top: 0.7em;
  border-top: 1px solid rgba(224, 189, 120, 0.28);
}
#card-text .card-lang-code {
  display: block;
  font-size: 0.62em;
  letter-spacing: 1.5px;
  color: #bd9b66;
  margin-bottom: 0.25em;
}
#card-text {
  overflow-wrap: anywhere;
}
/* FT1.3: BOTH on desktop — the two versions need more room than one: the duplicated large title (the kind
   is already in the card header) and the icon give way, the card may grow, and the body scrolls instead of
   clipping if a very long card still does not fit. Both versions keep the same size. */
body[data-content-language='pl+en-GB'] .card {
  flex: 0 0 auto;
  min-height: 0;
}
body[data-content-language='pl+en-GB'] .card-body {
  justify-content: flex-start;
  overflow-y: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}
body[data-content-language='pl+en-GB'] #card-icon {
  display: none;
}
body[data-content-language='pl+en-GB'] #card-title {
  display: none;
}
body[data-content-language='pl+en-GB'] #card-text {
  margin-top: 8px;
  max-width: 40ch;
  font-size: clamp(15px, 1vw, 19px);
  line-height: 1.42;
}
/* FT1.3-DEF-02: visible, low-key end of the game (does not compete with START / STOP). */
.session-meta #end-session-main {
  margin-left: 0;
  color: #d9a9ae;
  border-bottom-color: #8a5a63;
}
#finished-screen #new-game {
  margin: 18px 0 6px;
}
