body.board { padding: 0.8rem; font-size: 18px; }
body.board.embed { padding: 0.5rem; }
.join-box { max-width: 24rem; margin: 6vh auto; }
#view { max-width: 90rem; margin: 0 auto; display: grid; gap: 0.8rem; }

/* the two policy tracks: the board pictures with the enacted policies laid on top */
#tracks { display: grid; gap: 0.6rem; }
.track { position: relative; aspect-ratio: 4216 / 1496; border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; }
.track > img.bg { width: 100%; height: 100%; display: block; }
.track .card { position: absolute; width: 11.4%; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 3px #0004); }
.track .card.new { animation: drop 0.5s ease-out; }
.track .marker { position: absolute; width: 3.4%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); transition: left 0.5s; }
@keyframes drop { from { transform: translate(-50%, -80%) scale(1.3); opacity: 0; } }

/* piles, government, vote result */
#info { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; justify-content: center; }
.pile { width: 4.6rem; text-align: center; }
.pile b { display: block; font-size: 1.8rem; line-height: 1.1; }
.plate { text-align: center; }
.plate img { width: 9rem; margin: 0 auto; }
.plate span { display: inline-block; font-size: 1.3rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.plate span.nameplate { font-size: 1.5rem; padding: 0.2rem 1rem; }
.plate.empty { opacity: 0.25; }
.result { display: flex; gap: 0.6rem; align-items: center; font-size: 1.6rem; font-weight: 800; text-transform: uppercase; }
.result img { width: 4.6rem; border-radius: 6px; }
.result .verdict { color: var(--on-accent); padding: 0.2rem 0.7rem; border: 3px solid var(--ink); border-radius: 999px; background: var(--yellow); }
.result .verdict.failed { background: var(--orange); }
.pips { display: flex; gap: 0.3rem; align-items: center; font-weight: 800; text-transform: uppercase; }
.pips i { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 3px solid var(--ink); }
.pips i.on { background: var(--ink); }

/* players: numbered seats in turn order, in tidy equal tiles */
#seats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.seat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; padding: 0.5rem 0.7rem; border: 4px solid var(--ink); border-radius: 12px; background: var(--paper); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; position: relative; min-width: 0; }
.seat .no { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-size: 0.9rem; letter-spacing: 0; }
.seat .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat.pres { background: var(--pres); color: var(--pres-text); }
.seat.pres .no { background: var(--cream); color: var(--ink); }
.seat.chan { background: var(--chan); color: var(--chan-text); }
.seat .extras { flex: 0 0 100%; display: flex; gap: 0.5rem; align-items: center; justify-content: flex-start; padding-left: 2.3rem; }
.seat-vote { height: 2.8rem; width: auto; border-radius: 4px; }
.seat.dead { opacity: 0.4; }
.seat.dead .nm { text-decoration: line-through; }
.seat.target { outline: 4px dashed var(--orange); outline-offset: 2px; }
.seat small { flex: none; font-size: 0.9rem; letter-spacing: 0.1em; opacity: 0.85; }
.seat .done { position: absolute; top: -0.5rem; right: -0.4rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--green); border: 3px solid var(--ink); }

/* big message on top: start script, game over */
#banner { padding: 1rem 1.4rem; text-align: center; border: 4px solid var(--ink); border-radius: 14px; background: var(--paper); }
#banner h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 3rem); }
#banner.night { background: #0c0c0d; color: #e7dcbc; min-height: 40vh; display: grid; place-content: center; }
#banner.night h2 { font-size: clamp(1.6rem, 4.5vw, 3.2rem); line-height: 1.3; text-transform: none; letter-spacing: 0.02em; }
#banner.liberal { background: var(--blue); color: var(--on-accent); }
#banner.fascist { background: var(--orange); color: var(--on-accent); }
#banner .roles { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-top: 0.6rem; }
#banner .roles span { padding: 0.15rem 0.6rem; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 800; font-size: 0.9rem; text-transform: uppercase; }
#voice { justify-self: center; }
body.embed #voice, body.embed #credit { display: none; }
body.embed .plate img { width: 6rem; }
body.embed .pile { width: 3.4rem; }
body.embed .plate span { font-size: 1rem; }

@media (min-width: 700px) {
  #seats { grid-template-columns: repeat(var(--cols, 5), 1fr); }
}

@media (min-width: 900px) {
  body.board { font-size: 22px; }
  #tracks { grid-template-columns: 1fr; }
  .plate img { width: 12rem; }
  .pile { width: 6rem; }
}

/* the start script: only the words, on black, so the table stays dark with eyes closed */
body.board.night { background: #0c0c0d; }
body.board.night #tracks, body.board.night #info, body.board.night #seats, body.board.night .credit, body.board.night #voice { display: none; }
body.board.night #banner { min-height: 92vh; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(5.5rem, 8rem)); gap: 0.5rem; }

/* A wide landscape screen (the tablet or TV): the boards on the left, the governments and the players on the right, so it all fits at once. */
@media (min-width: 1100px) and (orientation: landscape) {
  #view { grid-template-columns: 3fr 2fr; grid-template-areas: "banner banner" "tracks parties" "tracks seats" "info voice"; align-items: start; }
  #banner { grid-area: banner; }
  #banner:not(.night) { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; align-items: baseline; justify-content: center; padding: 0.5rem 1.2rem; }
  #banner:not(.night) h2 { font-size: 1.8rem; }
  #tracks { grid-area: tracks; }
  #parties { grid-area: parties; grid-template-columns: repeat(3, 1fr); }
  #info { grid-area: info; justify-content: center; align-items: center; }
  #info { gap: 0.3rem 0.8rem; }
  .pile { width: 2.7rem; }
  .pile b { font-size: 1.2rem; }
  .stat { padding: 0.15rem 0.2rem; }
  .stat b { font-size: 1.2rem; }
  .stat span { font-size: 0.9rem; }
  .result { font-size: 1.2rem; }
  .result img { width: 3rem; }
  #seats { grid-area: seats; grid-template-columns: repeat(2, 1fr); }
  #voice { grid-area: voice; align-self: start; }
  body.board { padding: 0.8rem 1.2rem; }
  .party-row img { max-width: 100%; }
  .party .nameplate { font-size: 1.05rem; padding: 0.1rem 0.6rem; }
  .seat { font-size: 1.1rem; }
}

#steps { justify-self: center; }
#steps .steps { justify-content: center; }
@media (min-width: 1100px) and (orientation: landscape) {
  #view { grid-template-areas: "banner banner" "steps steps" "tracks parties" "tracks seats" "info voice"; }
  #steps { grid-area: steps; }
}
