/* ------------------------------------------------------------ in game (phone) */
.counts { display: flex; flex-direction: column; gap: 4px; }
.badge { width: 46px; flex: none; rotate: 4deg; touch-action: none; }
.badge .card { border-radius: 5px; }
.stage { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.act { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.act .title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
.hint { font-size: .88rem; color: var(--paper-dk); text-align: center; margin: 8px 0; min-height: 2.6em; }
.confirm { min-height: 64px; margin-top: 10px; }
.center-row { justify-content: center; gap: 16px; margin-top: 4px; }
.two { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.act .link { color: var(--paper-dk); }

.pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 10px 0 0; }
.pickable { position: relative; min-height: 58px; font-size: 1.15rem; }
.pickable.no { background: linear-gradient(180deg, #6d655b, #574f46); color: #c9bfae; box-shadow: none; }
.pickable.no .sub { opacity: 1; }
.pickable.chosen { outline: 3px solid var(--paper); outline-offset: 3px; }
.pickable .mini.chan { position: absolute; left: 50%; bottom: -16px; width: 74%; translate: -50% 0; pointer-events: none; }
.mini { width: 120px; }
.mini.pres.me { width: 150px; margin: 2px 0 4px; }
.mini.ghost { opacity: .55; }

.ballots { display: flex; gap: 14px; justify-content: center; margin: 18px 0 4px; }
.card.ballot.big { width: min(44vw, 210px); touch-action: none; transition: translate .25s cubic-bezier(.3, 1.4, .5, 1), opacity .25s, scale .25s; }
.card.ballot.big.cast { translate: 0 -22px; scale: 1.04; box-shadow: 0 0 0 3px var(--paper), 0 18px 30px -10px rgba(0, 0, 0, .8); }
.card.ballot.big.dim { opacity: .45; scale: .94; }

.hand { display: flex; justify-content: center; gap: 10px; margin: 22px 0 6px; perspective: 900px; }
.flip.card.policy { width: min(28vw, 132px); background: transparent; box-shadow: none; overflow: visible; }
.flip.card.policy > .face { box-shadow: var(--shadow-card); }
.flip.card.policy.chosen { translate: 0 -18px; }
.flip.card.policy.chosen > .face { box-shadow: 0 0 0 3px var(--paper), 0 16px 26px -8px rgba(0, 0, 0, .8); }
.flip.card { transition: translate .25s cubic-bezier(.3, 1.4, .5, 1); }
.flip.card.party.big, .flip.card.role.envelope { width: min(62vw, 260px); margin: 10px auto; background: transparent; box-shadow: none; overflow: visible; touch-action: none; }
.flip.card.party.big > .face, .flip.card.role.envelope > .face { box-shadow: var(--shadow-card); }

.hold { position: relative; overflow: hidden; }
.hold .fill { position: absolute; inset: 0; background: rgba(243, 234, 210, .28); transform-origin: left; transform: scaleX(0); }
.hold .lbl { position: relative; }

.reveal { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.reveal-info { min-height: 5.5em; text-align: center; color: var(--paper); }
.reveal-info p { margin: .3em 0; }
.reveal-info .team, .secret .team { list-style: none; padding: 0; margin: .3em 0; font-family: var(--display); font-size: 1.3rem; }
.reveal .hint { min-height: 0; }

.peek { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(15, 12, 10, .86); pointer-events: none; }
html.lite .peek { background: var(--desk); }
.secret { width: min(100%, 460px); }
.secret-cards { display: flex; gap: 12px; justify-content: center; }
.secret-cards .card.role { width: 46%; }
.secret-cards .card.party { width: 40%; align-self: center; }
.secret-text { text-align: center; margin-top: 12px; }
.secret-text .title { font-size: 2.4rem; }
.notes { margin-top: 12px; padding: 10px 12px; text-align: left; }
.nlbl { font-family: var(--display); font-size: 1.1rem; margin-bottom: 4px; }
.notes .note { color: var(--paper-dk); font-size: .92rem; margin: 3px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mini-cards { display: inline-flex; gap: 4px; }
.card.tiny { width: 26px; border-radius: 3px; box-shadow: none; }
.card.tiny.out { opacity: .4; }

.eyes { margin: auto 0; text-align: center; }
.eyes .live { font-size: 1.1rem; color: var(--paper); }
.tablebox { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ------------------------------------------------------------ the table (TV + phone without TV) */
.table { --gap: 12px; flex: 1; display: grid; gap: var(--gap); grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; padding: 18px 24px; min-height: 0; }
.tstatus { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 16px; font-family: var(--display); font-size: 2.1rem; line-height: 1.1; color: var(--paper); }
.tstatus .what { flex: 1; }
.tstatus .clock { font-family: var(--type); font-size: 1.6rem; color: var(--paper-dk); }
.tstatus .clock.late { color: var(--fas); }
.tboards { display: flex; flex-direction: column; justify-content: center; gap: var(--gap); min-height: 0; }
.board { position: relative; aspect-ratio: 1800 / 640; width: 100%; border-radius: 6px; box-shadow: var(--shadow-card); }
html.lite .board { box-shadow: none; }
.board > img { width: 100%; height: 100%; border-radius: 6px; }
.slot { position: absolute; }
.slot .card { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 6%; }
.token { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6d8, var(--manila) 55%, var(--manila-dk)); box-shadow: 0 3px 6px rgba(0, 0, 0, .5); }
.tside { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
.piles { display: flex; gap: 10px; }
.pile { position: relative; width: 70px; }
.pile img { border-radius: 6px; }
.pile b { position: absolute; left: 50%; top: 46%; translate: -50% -50%; font-family: var(--display); font-size: 1.9rem; color: var(--ink); font-weight: normal; }
.tplayers { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; align-content: start; }
.tp { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 64px; }
.tp .plaque { font-size: 1.25rem; }
.tp .badges { display: flex; justify-content: center; min-height: 0; }
.tp .badges .mini { width: 92%; max-width: 150px; }
.tp .vote { position: absolute; right: -6px; top: -10px; width: 46px; z-index: 2; pointer-events: none; }
.tp .vote .card { border-radius: 4px; }
.tp.r-fascist .plaque, .tp.r-hitler .plaque { box-shadow: inset 0 -4px 0 var(--fas-dk), 0 3px 8px -3px rgba(0, 0, 0, .7); }
.tp.r-liberal .plaque { box-shadow: inset 0 -4px 0 var(--lib-dk), 0 3px 8px -3px rgba(0, 0, 0, .7); }
.tp.is-nom .plaque { outline: 2px dashed var(--paper); outline-offset: 2px; }

.table.compact { display: flex; flex-direction: column; padding: 0; gap: 10px; }
.table.compact .tstatus { display: none; }
.table.compact .tside { flex-direction: column-reverse; }
.table.compact .piles { justify-content: center; }
.table.compact .pile { width: 46px; }
.table.compact .pile b { font-size: 1.3rem; }
.table.compact .tplayers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
.table.compact .tp .plaque { font-size: 1rem; padding: .35em .3em; }
.table.compact .tp .vote { width: 32px; right: -4px; top: -8px; }

/* ------------------------------------------------------------ recap */
.recap { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.banner { padding: 16px 18px; border-radius: 4px; text-align: center; color: var(--paper); }
.banner.liberal { background: var(--lib-dk); box-shadow: inset 0 0 0 3px var(--lib); }
.banner.fascist { background: var(--fas-dk); box-shadow: inset 0 0 0 3px var(--fas); }
.banner .title { color: var(--paper); margin: 0; }
.banner p { margin: .3em 0 0; }
.roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rolecard { text-align: center; min-width: 0; }
.rolecard .nm { font-family: var(--display); font-size: .95rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rolecard .sub { font-size: .72rem; color: var(--paper-dk); }
.rolecard.dead .card { filter: grayscale(.8); }
.title.small { font-size: 1.6rem; margin-top: 8px; }
.govs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gov { padding: 10px 12px; border-radius: 4px; background: rgba(243, 234, 210, .07); }
.gov.failed { opacity: .7; }
.gov .who { font-family: var(--display); font-size: 1.15rem; }
.gov .who .n { color: var(--paper-dk); }
.gov .res { font-family: var(--type); font-size: .85rem; color: var(--paper-dk); }
.gov .votes { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.chip { font-size: .74rem; padding: .1em .5em; border-radius: 10px; }
.chip.ja { background: var(--paper); color: var(--ink); }
.chip.nein { background: #3d3732; color: var(--paper-dk); }
.flow { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; font-size: .8rem; color: var(--paper-dk); }
.flow .step { display: inline-flex; align-items: center; gap: 3px; }
.flow .lbl { margin-right: 2px; }
.card.tiny.law { outline: 2px solid var(--paper); outline-offset: 1px; }
.gov .what { font-size: .85rem; color: var(--paper-dk); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.recap .credit { margin: 6px 0 0; }
.stage > .act { margin-top: auto; margin-bottom: auto; }
.gov-pair { display: flex; gap: 12px; margin: 8px 0 0; }
.gov-pair .who { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.gov-pair .mini { width: 100%; }
.gov-pair .plaque { font-size: 1.3rem; }
.tp .badges { min-height: 30px; align-items: flex-start; }
.table.compact .tp .badges { min-height: 24px; }

/* ------------------------------------------------------------ TV */
html.tvmode, html.tvmode body { overflow: hidden; }
.tvstage { position: fixed; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; display: flex; flex-direction: column; }
.tvstage > * { flex: 1; display: flex; min-height: 0; }
.tvtable > .table { padding: 34px 44px; --gap: 18px; }
.tvtable .tplayers { gap: 22px 16px; }
.tvtable .tp .plaque { font-size: 1.6rem; }
.tvtable .tp .vote { width: 64px; }
.tvtable .pile { width: 96px; }
.tvpair { flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.tvpair .title { font-size: 6rem; color: var(--fas); }
.tvpair .lead { font-size: 1.8rem; max-width: 30em; }
.pairrow { gap: 60px; justify-content: center; }
.tvpair .code { font-size: 10rem; letter-spacing: .12em; }
.tvpair .qr { width: 240px; }
.tvpair .note { color: var(--paper-dk); font-size: 1.3rem; }
.tvlobby { gap: 60px; align-items: center; padding: 60px 80px; }
.tvlobby .join { width: 560px; padding: 34px; text-align: center; rotate: -1.2deg; }
.tvlobby .join .lbl { font-size: 1.5rem; color: var(--ink-soft); }
.tvlobby .join .url { font-size: 1.7rem; color: var(--ink); margin: 6px 0; }
.tvlobby .join .code { font-size: 8.5rem; color: var(--ink); letter-spacing: .1em; margin: 10px 0 18px; }
.tvlobby .join .qr { width: 300px; margin: 0 auto; }
.tvlobby .side { flex: 1; }
.tvlobby .title { font-size: 6.5rem; color: var(--fas); margin-bottom: .2em; }
.tvlobby .lead { font-size: 1.9rem; }
.tvseats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.tvseats .plaque { font-size: 2rem; padding: .5em; }
.tvrecap { overflow: hidden; padding: 34px 60px; }
.recap.tv { flex: 1; display: grid; grid-template-columns: 1fr 1.25fr; grid-template-rows: auto auto 1fr; gap: 18px 40px; }
.recap.tv .banner { grid-column: 1; }
.recap.tv .banner .title { font-size: 3.6rem; }
.recap.tv .roles { grid-column: 1; }
.recap.tv > .title.small { grid-column: 2; grid-row: 1; align-self: end; }
.recap.tv .govs { grid-column: 2; grid-row: 2 / 4; overflow: hidden; font-size: 1.1rem; }
.recap.tv .credit { grid-column: 1; align-self: end; }
.govs-inner { display: flex; flex-direction: column; gap: 8px; }
.caption { position: fixed; z-index: 65; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); max-width: 540px; margin: 0 auto; padding: .7em 1em; border-radius: 4px;
  background: rgba(20, 17, 14, .92); color: var(--paper); font-size: .95rem; line-height: 1.35; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; pointer-events: none; }
.caption.on { opacity: 1; transform: none; }

/* narrator switch */
.mute { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #2a1f12;
  background: linear-gradient(180deg, #d9b56b, var(--brass) 55%, #a8843f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px -3px rgba(0, 0, 0, .7); }
.mute svg { width: 22px; height: 22px; }
.mute .cross { display: none; }
.mute.off { background: linear-gradient(180deg, #8d857a, #6f675d); color: #2b2622; }
.mute.off .waves { display: none; }
.mute.off .cross { display: inline; }
.mute:active { scale: .92; }
.controls .minor .mute { align-self: center; }
.tvmute { position: fixed; right: 18px; bottom: 18px; z-index: 5; width: 46px; height: 46px; opacity: .55; }
.tvmute:hover, .tvmute:focus-visible, .tvmute.off { opacity: 1; }
html.lite .mute { box-shadow: none; }
.toast { bottom: calc(86px + var(--safe-b)); }
