/* The new games use the shared Doreham tokens, typeface and connection controls. */
.ng-heading{display:flex;gap:16px;align-items:center;margin:14px 0 22px}.ng-heading>div{min-width:0}.ng-heading h2{line-height:1.55}.ng-heading p{margin-top:8px;line-height:1.8}.ng-round{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}.ng-note{margin:16px 0;color:var(--muted);font-size:15px;line-height:1.9}.ng-field{display:grid;gap:7px;margin:0 0 14px;font-size:15px;color:var(--ink)}.ng-field input,.ng-field select{min-height:50px;font-size:16px}.ng-settings{margin:18px 0;display:grid;gap:12px}.ng-settings .ng-note,.ng-settings .check-row{grid-column:1/-1}.ng-answer-form{display:grid;gap:12px;margin:18px 0}.ng-answer-form .ng-field{margin:0}.ng-answer-form>.btn{grid-column:1/-1}.ng-score-list{display:grid;gap:8px;margin:20px 0}.ng-score-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:13px 15px;font-size:14px}.ng-score-row strong{overflow-wrap:anywhere}.ng-score-row span{color:var(--muted);white-space:nowrap}.ng-score-row b{color:var(--mint);font-size:20px;margin-inline-start:5px}.ng-table-scroll{width:100%;overflow:auto;border:1px solid var(--line);border-radius:18px;max-height:65vh;overscroll-behavior:contain;margin:18px 0;scrollbar-width:auto}.ng-review-table{border-collapse:separate;border-spacing:0;width:100%;min-width:780px;font-size:15px;text-align:center}.ng-review-table th,.ng-review-table td{padding:11px 9px;border-inline-end:1px solid var(--line);border-bottom:1px solid var(--line);line-height:1.6;vertical-align:middle}.ng-review-table thead th{position:sticky;top:0;background:var(--surface2);z-index:2;font-weight:700;color:var(--ink)}.ng-review-table tbody th{background:var(--surface2);font-weight:700}.ng-review-table .ng-answer{display:block;max-width:14em;overflow-wrap:anywhere}.ng-review-table td small{display:block;color:var(--mint);font-size:13px;margin-top:5px}.ng-review-table select{font-size:14px;padding:7px 9px;min-height:44px;min-width:100px;margin-top:6px}.ng-review-table .ng-total{color:var(--mint);font-weight:800;font-size:20px}.ng-hero-letter{text-align:center;display:flex;align-items:center;justify-content:center;gap:30px;margin:16px 0;color:var(--muted)}.ng-hero-letter strong{font-size:100px;color:var(--mint);line-height:1.2}.ng-category-strip{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;margin:18px 0}.ng-category-strip span{padding:8px 14px;border:1px solid var(--line);border-radius:99px}.ng-progress-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:20px 0}.ng-progress-list>div{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px;border:1px solid var(--line);border-radius:14px}.ng-progress-list strong{font-size:15px;overflow-wrap:anywhere}.ng-progress-list span{color:var(--mint);white-space:nowrap}.ng-tv-letters{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin:24px 0}.ng-tv-letters span{display:grid;place-items:center;width:70px;height:70px;border:2px solid var(--line);border-radius:50%;color:var(--mint);font-size:34px;font-weight:700}.ng-discoveries{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:18px 0}.ng-discoveries>div{padding:12px;border:1px solid var(--line);border-radius:15px;display:flex;flex-direction:column;gap:6px}.ng-discoveries strong{color:var(--mint);font-size:20px;overflow-wrap:anywhere}.ng-discoveries span{font-size:13px;color:var(--muted)}.ng-word-cloud,.ng-word-slots{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.ng-word-cloud>span,.ng-word-slots>span{padding:10px 15px;background:var(--surface2);border:1px solid var(--line);border-radius:12px;font-size:18px;line-height:1.6}.ng-word-cloud>span{color:var(--mint)}.ng-word-slots>span{letter-spacing:5px;color:var(--muted)}.ng-wheel{width:min(300px,88vw);height:min(300px,88vw);position:relative;border:1px solid var(--line);border-radius:50%;margin:22px auto;background:var(--surface2);touch-action:none;user-select:none;-webkit-user-select:none}.ng-letter{position:absolute;width:54px;height:54px;left:calc(50% - 27px);top:calc(50% - 27px);border-radius:50%;background:var(--surface);border:1px solid var(--line);color:var(--ink);font-size:27px;font-weight:700;transform:rotate(calc(var(--letter-index)*360deg/var(--letter-count))) translateY(-112px) rotate(calc(var(--letter-index)*-360deg/var(--letter-count)));touch-action:none}.ng-letter.chosen{background:var(--mint);color:#21103f;border-color:var(--mint)}.ng-letter:focus-visible{outline:3px solid var(--amber);outline-offset:3px}.ng-wheel-entry output{display:block;text-align:center;min-height:55px;font-size:30px;color:var(--mint);line-height:1.8;margin-bottom:12px}.ng-head-card{min-height:240px;display:grid;place-items:center;padding:24px;border:2px solid var(--amber);background:var(--surface2);border-radius:24px;text-align:center;margin:20px 0}.ng-head-card strong{font-size:clamp(36px,10vw,72px);line-height:1.6;overflow-wrap:anywhere}.ng-role-form,.ng-clue-form{margin:20px 0;padding:18px;border:1px solid var(--line);border-radius:18px}.ng-team-rosters{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.ng-team{padding:18px;border:1px solid var(--line);border-radius:18px;min-width:0}.ng-team p{overflow-wrap:anywhere}.ng-team.blue{border-color:#67b6ed;background:#14334c}.ng-team.red{border-color:#f18c89;background:#482332}.ng-code-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:20px 0;direction:rtl}.ng-code-card{position:relative;min-width:0;min-height:76px;padding:9px 5px;background:#e9dfc9;color:#271c38;border:2px solid #bba982;border-radius:12px;font-family:inherit;line-height:1.6;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;overflow-wrap:anywhere}.ng-code-card strong{font-size:14px;font-weight:800}.ng-code-card small{font-size:11px}.ng-code-card.blue{background:#214f70;color:#e8f7ff;border-color:#80c9fb}.ng-code-card.red{background:#742f40;color:#fff4f1;border-color:#f7a4a3}.ng-code-card.neutral{background:#e9dfc9;color:#271c38;border-color:#cbbb97}.ng-code-card.assassin{background:#10121b;color:#fff;border-color:#8791ab}.ng-code-card.selected{outline:3px solid var(--mint);outline-offset:2px}.ng-code-card:disabled{opacity:1;cursor:default}.ng-code-card.revealed{border-style:double;border-width:4px}.ng-contacted{font-size:14px}.ng-code-status{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:16px 0}.ng-team-badge{display:inline-flex;padding:7px 12px;border-radius:99px;font-size:15px;border:1px solid}.ng-team-badge.blue{background:#14334c;border-color:#67b6ed;color:#d9f1ff}.ng-team-badge.red{background:#482332;border-color:#f18c89;color:#ffe1df}.ng-clue{padding:9px 16px;background:var(--surface2);border:1px solid var(--line);border-radius:14px;font-size:22px;color:var(--mint)}.ng-code-actions{margin:18px 0;display:grid;gap:10px}.ng-code-actions .ng-note{margin:0 0 5px}.ng-bid{display:flex;align-items:center;justify-content:center;gap:24px;margin:24px 0}.ng-bid strong{font-size:90px;line-height:1.2;color:var(--mint)}.ng-bid span{font-size:24px;color:var(--ink);overflow-wrap:anywhere}.ng-judgment{padding:18px;border:1px solid var(--amber);border-radius:18px;margin:18px 0;display:grid;gap:12px}
@media(min-width:540px){.ng-answer-form,.ng-settings{grid-template-columns:1fr 1fr}.ng-settings>.ng-note{grid-column:1/-1}}
@media(max-width:374px){.ng-heading{gap:10px}.ng-heading>.game-icon{width:42px;height:42px}.ng-score-row{grid-template-columns:1fr auto;gap:8px}.ng-score-row strong{grid-column:1/-1}.ng-wheel{width:250px;height:250px}.ng-letter{transform:rotate(calc(var(--letter-index)*360deg/var(--letter-count))) translateY(-92px) rotate(calc(var(--letter-index)*-360deg/var(--letter-count)));width:48px;height:48px;left:calc(50% - 24px);top:calc(50% - 24px)}.ng-code-board{gap:5px}.ng-code-card{min-height:68px;border-radius:9px;padding:6px 3px}.ng-code-card strong{font-size:13px}.ng-team-rosters{grid-template-columns:1fr}}
@media(min-width:761px){.tv-shell .ng-heading h2{font-size:clamp(28px,2vw,80px);line-height:1.5}.tv-shell .ng-heading p{font-size:clamp(20px,1.25vw,52px)}.tv-shell .ng-note{font-size:clamp(20px,1.2vw,48px)}.tv-shell .ng-hero-letter strong{font-size:clamp(90px,7vw,240px)}.tv-shell .ng-hero-letter span{font-size:clamp(22px,1.5vw,60px)}.tv-shell .ng-category-strip span{font-size:clamp(18px,1.2vw,48px)}.tv-shell .ng-progress-list{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.tv-shell .ng-progress-list strong,.tv-shell .ng-progress-list span{font-size:clamp(18px,1.2vw,48px)}.tv-shell .ng-tv-letters span{width:clamp(64px,4.6vw,160px);height:clamp(64px,4.6vw,160px);font-size:clamp(30px,2.5vw,90px)}.tv-shell .ng-discoveries strong{font-size:clamp(24px,1.7vw,68px)}.tv-shell .ng-discoveries span{font-size:clamp(18px,1.1vw,44px)}.tv-shell .ng-review-table{font-size:clamp(16px,1.1vw,40px);min-width:720px}.tv-shell .ng-review-table th,.tv-shell .ng-review-table td{padding:8px 6px}.tv-shell .ng-review-table select{font-size:clamp(14px,.9vw,34px);min-width:0;width:100%;min-height:36px;padding:3px 6px}.tv-shell .ng-review-table .ng-total{font-size:clamp(20px,1.4vw,52px)}.tv-shell .ng-review-table .ng-answer{max-width:9em}.tv-shell .ng-table-scroll{max-height:62vh}.tv-shell .ng-code-board{gap:clamp(8px,.7vw,24px)}.tv-shell .ng-code-card{min-height:clamp(55px,6.4vh,150px);padding:6px 8px;border-radius:16px}.tv-shell .ng-code-card strong{font-size:clamp(19px,1.4vw,58px);line-height:1.5}.tv-shell .ng-code-card small{font-size:clamp(14px,.85vw,34px)}.tv-shell .ng-code-status .ng-team-badge{font-size:clamp(18px,1.1vw,44px)}.tv-shell .ng-code-status .ng-clue{font-size:clamp(26px,1.8vw,72px)}.tv-shell .ng-score-row{font-size:clamp(18px,1.1vw,44px)}.tv-shell .ng-score-row b{font-size:clamp(24px,1.6vw,64px)}.tv-shell .ng-bid strong{font-size:clamp(90px,7vw,260px)}.tv-shell .ng-bid span{font-size:clamp(26px,1.8vw,72px)}.tv-shell .ng-team h3{font-size:clamp(24px,1.5vw,58px)}.tv-shell .ng-team p{font-size:clamp(20px,1.15vw,46px)}#app[data-phase=esm_review] .tv-shell .stage-bottom,#app[data-phase=code_clue] .tv-shell .stage-bottom,#app[data-phase=code_guess] .tv-shell .stage-bottom,#app[data-phase=code_result] .tv-shell .stage-bottom{display:none}.tv-shell .ng-word-cloud>span,.tv-shell .ng-word-slots>span{font-size:clamp(22px,1.4vw,52px)}}
@media(min-width:761px) and (max-height:800px){.tv-shell .ng-heading{margin:4px 0 12px;gap:12px}.tv-shell .ng-heading h2{font-size:26px}.tv-shell .ng-heading p{font-size:18px;line-height:1.5}.tv-shell .ng-code-board{margin:12px 0}.tv-shell .ng-code-card{min-height:50px}.tv-shell .ng-code-card strong{font-size:18px}.tv-shell .ng-round{margin-bottom:8px}.tv-shell .ng-review-table{font-size:16px}.tv-shell .ng-review-table th,.tv-shell .ng-review-table td{padding:5px}.tv-shell .ng-review-table select{min-height:28px;font-size:14px}.tv-shell .ng-hero-letter{margin:8px 0}.tv-shell .ng-progress-list{margin:12px 0;gap:8px}.tv-shell .ng-progress-list>div{padding:8px}.tv-shell .ng-score-list{gap:6px;margin:12px 0}.tv-shell .ng-score-row{padding:8px 12px}}
@media(orientation:landscape) and (max-height:520px){.phone-shell .ng-head-card{min-height:210px}.phone-shell .ng-head-card strong{font-size:clamp(40px,7vw,78px)}.ng-team-rosters{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){.ng-letter,.ng-code-card{transition:none}}

.ng-player-discoveries{display:grid;gap:14px}.ng-player-discoveries>section{padding:16px;border:1px solid var(--line);border-radius:16px}.ng-player-discoveries .ng-word-cloud{margin:12px 0}

/* Fit seven lobby choices into one row on television viewports. */
@media(min-width:1000px){
 .tv-shell .tv-welcome .poster-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(6px,.7vw,18px)}
 .tv-shell .tv-welcome .poster{min-width:0;padding:clamp(8px,.6vw,20px)}
 .tv-shell .tv-welcome .poster strong{font-size:clamp(18px,1.25vw,48px);overflow-wrap:anywhere}
}
@media(min-width:761px){
 .tv-shell .ng-table-scroll{max-height:none;overflow:visible}
 .tv-shell .ng-review-table{min-width:0;width:100%;table-layout:fixed;font-size:clamp(12px,calc(62vh / (var(--esm-rows,6) + 1)),26px)}
 .tv-shell .ng-review-table th,.tv-shell .ng-review-table td{padding:clamp(1px,.3vh,6px) 3px;overflow-wrap:anywhere}
 .tv-shell .ng-review-table .ng-answer{max-width:none}
}
.ng-fists{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:10px;margin:16px 0}.ng-fist{border:1px solid var(--line);border-radius:16px;padding:12px;background:var(--surface2);display:grid;gap:8px;text-align:center}.ng-fist strong{font-size:16px}.ng-fist span{color:var(--muted)}.ng-fist.open{opacity:.45}.ng-fist.flower{border-color:var(--amber)}.ng-cards{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
@media(min-width:761px){.tv-shell .ng-fist strong{font-size:clamp(18px,1.3vw,42px)}.tv-shell .ng-fist span{font-size:clamp(16px,1.1vw,36px)}}
.ng-blanks,.ng-called{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:14px 0}.ng-blanks span,.ng-called span{min-width:42px;min-height:42px;display:grid;place-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface2);font-weight:700}.ng-called .now{background:var(--mint);color:#21103f}.ng-guess-list{display:grid;gap:8px;margin:12px 0}.ng-guess-list div{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;border:1px solid var(--line);border-radius:12px;padding:10px 12px}.ng-bingo{display:grid;gap:16px;margin:12px 0}.ng-ticket{display:grid;grid-template-columns:repeat(var(--cols,9),minmax(0,1fr));gap:4px}.ng-cell{min-height:40px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:var(--surface2);font-weight:700;padding:2px}button.ng-cell{width:100%;background:var(--amber);color:#21103f}.ng-cell.on{background:var(--mint);color:#21103f}.ng-cell.empty{visibility:hidden}
@media(min-width:761px){.tv-shell .ng-blanks span,.tv-shell .ng-called span{min-width:clamp(36px,3vw,72px);min-height:clamp(36px,3vw,72px);font-size:clamp(16px,1.2vw,36px)}}

/* Open table. Loaded last so it wins over the earlier night theme. */
:root{--cloth:#3E291C;--ivory:#F6F0E6;--seat:#8C4E12;--clay:#6E3E10;--ink-card:#24180F;--muted-card:#5A4334;--mint:#8C4E12;--amber:#6E3E10;--bg:#3E291C;--danger:#9E2A22}
body{background:var(--cloth);color:var(--ivory)}
::selection{background:#8C4E12;color:#F6F0E6}
input,textarea{caret-color:#8C4E12}
*{scrollbar-color:#8C4E12 #E7D9C4}
.eyebrow,.hero-rule{display:none}
.tv-stage,.phone-card,.join-aside,.landing-art,.admin,.history-room,.host-controls,.account-overlay .overlay-card,.poster,.secret-card,.pending-box{
  --ink:var(--ink-card);--muted:var(--muted-card);--line:#E4D3BE;--surface:#F6F0E6;--surface2:#F3E6D4;
  background:var(--ivory);color:var(--ink-card);border-color:#E4D3BE}
.tv-stage,.join-aside,.phone-card,.landing-art,.host-controls{box-shadow:0 18px 36px -22px #1A100A}
.topbar .icon-btn,.topbar .connection{color:var(--ivory);border-color:#CDB89A}
.connection:before{background:#E2B15A}
.btn{background:#8C4E12;color:#F6F0E6}
.btn.outline{background:transparent;color:inherit;border-color:#CDB892}
.phone-card .btn.outline,.tv-stage .btn.outline,.admin .btn.outline,.host-controls .btn.outline{color:var(--ink-card)}
.btn.secondary,.btn.subtle{background:#F3E6D4;color:var(--ink-card)}
.btn.amber{background:#6E3E10;color:#F6F0E6}
.btn:focus-visible,.icon-btn:focus-visible,.poster:focus-visible,.seg:focus-visible{outline:3px solid #8C4E12;outline-offset:3px}
.seg.active,.pill.accent{background:#8C4E12;color:#F6F0E6}
.phone-card .pill,.tv-stage .pill,.join-aside .pill{background:#F3E6D4;color:var(--ink-card)}
.room-code,.timer,.score-number,.ready-count{color:#8C4E12;font-family:Vazirmatn,Tahoma,sans-serif}
.timer.urgent{color:#9E2A22}
.poster,.game-choice,.vote-option,.admin-table th,.admin-table td{text-align:start}
.segmented{background:#F3E6D4;border-color:#E4D3BE}
.seg{color:#5A4334}
.secret-card{background:transparent;border:0;color:#24180F;padding:0}
.secret-card.is-spy .flip-front{background:#F8E8E4;border-color:#9E2A22}
.secret-card.is-spy .flip-front strong{color:#9E2A22}
.phone-footer small,.tv-footer{color:#E8D7C0}
.poster small{color:var(--muted-card)}
.poster.active{border-color:#8C4E12;background:#F3E6D4;transform:translateY(-4px)}
.poster.active:after{background:#8C4E12;color:#F6F0E6}
.poster.soon img{filter:saturate(.45) brightness(.92)}
.player-chip{background:#F3E6D4;color:#24180F;border-color:transparent}
.player-chip:has(.host-dot){box-shadow:0 10px 18px -14px #1A100A, 0 0 0 2px #8C4E12}
.avatar{background:#8C4E12;color:#F6F0E6}
.avatar.amber{background:#6E3E10;color:#F6F0E6}
.game-choice,.vote-option,.score-team{background:#F3E6D4;color:var(--ink-card);border-color:#E4D3BE}
.game-choice.active,.vote-option.selected,.score-team.current{border-color:#8C4E12;background:#F6E7CF}
input,select,textarea{background:#fff;color:var(--ink-card);border-color:#E4D3BE}
input::placeholder{color:#6A5648}
.phone-card input,.phone-card select,.admin input,.admin select,.host-controls input,.host-controls select{background:#fff;color:var(--ink-card)}
.rule-note{border:0;padding-inline-start:0}
.rules-list{padding-right:0;padding-inline-start:1.2em}
.i-qr:before,.i-users:before,.i-play:before{margin-left:0;margin-inline-end:8px}
.player-menu .menu{left:auto;inset-inline-start:0}
.ng-called .now,.ng-letter.chosen,.ng-cell.on,button.ng-cell{color:#F6F0E6}
@keyframes deal{from{transform:translateY(-1.1rem) rotate(-.45deg)}to{transform:none}}
#app.phase-change .stage-main,#app.phase-change .phone-game{animation:deal .55s cubic-bezier(.16,1,.3,1)}
@media(min-width:761px){
  .tv-shell{--u:clamp(15px,1.15vmin,26px);--reading-scale:1;height:100dvh;max-height:100dvh;overflow:hidden;display:flex;flex-direction:column;font-size:var(--u);padding:clamp(12px,1.6vmin,28px);box-sizing:border-box}
  .tv-shell[data-reading=comfortable]{--u:clamp(17px,1.32vmin,30px)}
  .tv-shell[data-reading=extra]{--u:clamp(19px,1.5vmin,34px)}
  .tv-shell .topbar,.tv-shell .tv-footer{flex:none}
  .tv-shell .brand strong{font-size:1.45em}
  .tv-shell .brand small,.tv-shell .connection,.tv-shell .icon-btn,.tv-shell .tv-footer,.tv-reading button{font-size:.85em}
  .tv-layout{flex:1;min-height:0;align-items:stretch;grid-template-columns:minmax(0,1fr) minmax(14em,18em)}
  .tv-shell[data-join=off] .tv-layout{grid-template-columns:minmax(0,1fr)}
  .tv-shell[data-join=off] .join-aside{display:none}
  .tv-shell .tv-stage,.tv-shell .join-aside{min-height:0;height:100%;max-height:100%;overflow:hidden;background:var(--ivory);color:var(--ink-card)}
  .tv-shell .tv-stage{display:flex;flex-direction:column;padding:1.05em 1.15em}
  .tv-shell .stage-heading{margin-bottom:.6em}
  .tv-shell .stage-heading h2,.tv-shell .join-aside h2{font-size:1.55em;line-height:1.35}
  .tv-shell .stage-main{flex:1;min-height:0;overflow:auto}
  .tv-shell .stage-bottom{flex:none;margin-top:.7em;padding-top:.7em}
  .tv-shell .stage-bottom h3,.tv-shell .stage-center h2,.tv-shell .stage-center p,.tv-shell .tv-welcome p,.tv-shell .join-aside p,.tv-shell .player-chip{font-size:1em;line-height:1.45}
  .tv-shell .tv-welcome{max-width:none}
  .tv-shell .tv-welcome h1{font-size:2em;line-height:1.25;letter-spacing:-.03em;margin:.2em 0 .4em}
  .tv-shell .tv-welcome .poster-grid{grid-template-columns:repeat(auto-fill,minmax(7.2em,1fr));gap:.55em}
  .tv-shell .tv-welcome .poster{display:flex;flex-direction:column;min-width:0;padding:.45em;text-align:center}
  .tv-shell .tv-welcome .poster img{width:100%;height:auto;aspect-ratio:1;border-radius:.6em}
  .tv-shell .tv-welcome .poster strong,.tv-shell .tv-welcome .poster small{font-size:.82em;align-self:center;padding:.15em .2em 0}
  .tv-shell .tv-welcome .poster small{display:block}
  .tv-shell .poster.soon{display:flex}
  .tv-shell .timer{font-size:min(4.4em,20vh);letter-spacing:-.04em}
  .tv-shell .score-number,.tv-shell .ready-count{font-size:min(3.2em,16vh)}
  .tv-shell .join-aside{overflow:auto;padding:1em}
  .tv-shell .room-code{font-size:1.7em;letter-spacing:.08em;color:#8C4E12}
  .tv-shell .ng-heading h2{font-size:1.7em}
  .tv-shell .ng-hero-letter strong,.tv-shell .ng-bid strong{font-size:min(4.2em,22vh)}
  .tv-shell .ng-code-card strong{font-size:1.15em}
  .tv-shell .ng-code-card{min-height:3.2em}
}
@media(prefers-reduced-motion:reduce){#app.phase-change .stage-main,#app.phase-change .phone-game,.timer.urgent,.bomb-banner,.ng-code-card.flip-in .code-flip,.ng-hero-letter.flip-in{animation:none}}

/* Cards, flips, and the countdown. */
.timer,.score-number,.ready-count,.ng-cell,.ng-called span,.ng-hero-letter strong{font-family:Vazirmatn,Tahoma,sans-serif}
.timer.urgent{animation:tick-pulse 1s steps(2,end) infinite}
@keyframes tick-pulse{50%{transform:scale(1.06)}}
.flip-card{display:block;width:100%;perspective:900px}
.flip-inner{position:relative;display:grid;min-height:220px;transform-style:preserve-3d;transition:transform .6s cubic-bezier(.16,1,.3,1)}
.secret-card.revealed .flip-inner{transform:rotateY(180deg)}
.flip-face{grid-area:1/1;backface-visibility:hidden;border-radius:18px;border:2px solid #3E291C;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:22px;text-align:center}
.flip-front{transform:rotateY(180deg);background:#F6F0E6;color:#24180F}
.flip-back{background:#3E291C;color:#F6F0E6}
.card-back-mark{width:46px;height:64px;border:2px solid #E2B15A;border-radius:6px;background:linear-gradient(#E2B15A,#E2B15A) center/16px 2px no-repeat,linear-gradient(#E2B15A,#E2B15A) center/2px 16px no-repeat}
.card-prompt{min-height:180px;background:#3E291C;color:#F6F0E6;border:2px solid #E2B15A}
.daberna-card{background:#F6F0E6;color:#24180F;border:2px solid #3E291C;border-radius:16px;padding:12px;box-shadow:0 14px 28px -18px #1A100A}
.ng-ticket{background:#F3E6D4;border-radius:10px;padding:6px}
.ng-cell{background:#fffdf8;border:1px solid #C4B09A;color:#24180F;position:relative}
button.ng-cell{background:#fffdf8;color:#24180F}
.ng-cell.called::after,.ng-called .now::after{content:"";position:absolute;inset:14%;border:2px solid #9E2A22;border-radius:50%;pointer-events:none}
.ng-called span{position:relative;background:#fffdf8;color:#24180F;border-color:#C4B09A}
.ng-cell.on,.ng-called .now{background:#9E2A22;color:#F6F0E6}
.ng-cell.on::after,.ng-called .now::after{border-color:#F6F0E6}
.ng-wheel-line{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}
.ng-letter{z-index:2}
.ng-letter.chosen{color:#F6F0E6}
.ng-wheel-line polyline{fill:none;stroke:#8C4E12;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.ng-code-card,.ng-code-card.blue,.ng-code-card.red,.ng-code-card.neutral,.ng-code-card.assassin{background:transparent;border-color:transparent;color:inherit;padding:0}
.ng-code-card .code-flip{display:grid;min-height:76px;transform-style:preserve-3d;transition:transform .6s cubic-bezier(.16,1,.3,1)}
.ng-code-card.revealed .code-flip{transform:rotateY(180deg)}
.ng-code-card.flip-in .code-flip{animation:card-turn .65s cubic-bezier(.16,1,.3,1)}
@keyframes card-turn{from{transform:rotateY(0)}to{transform:rotateY(180deg)}}
.code-face{grid-area:1/1;backface-visibility:hidden;border-radius:12px;border:2px solid #C4B09A;background:#F6F0E6;color:#24180F;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 5px}
.code-face.code-color{transform:rotateY(180deg)}
.code-color.blue{background:#1E4E79;color:#F4FBFF;border-color:#1E4E79}
.code-color.red{background:#8E2F2A;color:#FFF6F4;border-color:#8E2F2A}
.code-color.neutral{background:#E7D7BC;color:#24180F;border-color:#C4B09A}
.code-color.assassin,.code-color.hidden{background:#1A120E;color:#F6F0E6;border-color:#E2B15A}
.code-pip{width:10px;height:10px;border-radius:50%;display:block}
.code-pip.blue{background:#1E4E79}.code-pip.red{background:#8E2F2A}.code-pip.neutral{background:#C4B09A}.code-pip.assassin{background:#1A120E}
.bomb-banner{background:#1A120E;color:#F6F0E6;border:2px solid #E2B15A;border-radius:18px;padding:22px 18px;text-align:center;margin:0 0 16px;animation:bomb-in .7s cubic-bezier(.16,1,.3,1)}
.bomb-banner strong{display:block;font-size:clamp(28px,4vw,64px);line-height:1.35}
.bomb-banner p{margin:8px 0 0;font-size:clamp(18px,2vw,36px)}
.ng-hero-letter.flip-in{animation:deal .45s cubic-bezier(.16,1,.3,1)}
@keyframes bomb-in{from{transform:scale(.94)}to{transform:none}}
.phone-shell .btn:active,.phone-shell .ng-letter:active,.phone-shell .poster:active,.phone-shell .ng-cell:active{transform:translateY(1px)}
.gol-captains{display:flex;flex-wrap:wrap;gap:10px 18px;margin:8px 0 14px}
.gol-captains p{display:flex;flex-direction:column;gap:2px;margin:0}
.gol-captains span{color:#5A4334}
.gol-hand,.gol-played{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}
.gol-card{width:9.6rem;min-height:12.5rem;border-radius:16px;border:2px solid #3E291C;background:#F6F0E6;color:#24180F;padding:14px;display:flex;flex-direction:column;justify-content:space-between;text-align:start;box-shadow:0 16px 28px -18px #1A100A}
.gol-card strong{font-size:1.05rem;line-height:1.45}
.gol-card small{color:#5A4334;line-height:1.5}
.gol-card.is-asked{border-color:#8C4E12}
.gol-card.spent{min-height:8rem}
.gol-ask{margin:8px 0 16px}
.gol-ask.is-new,.gol-card.is-new{animation:card-lift .55s cubic-bezier(.16,1,.3,1)}
@keyframes card-lift{from{transform:translateY(18px) rotate(-2deg)}to{transform:none}}
.admin-shell{direction:ltr;text-align:start}
.admin-shell .admin-table{font-variant-numeric:tabular-nums}
@media(max-width:760px){.gol-card{width:calc(50% - 6px);min-height:10rem}}
.phone-shell .secret-card.flip-card,.phone-shell .secret-card.flip-card.revealed,.phone-shell .secret-card.flip-card.is-spy{overflow:visible;background:transparent;border:0;padding:0;min-height:0}
.phone-shell .secret-card.flip-card:before{content:none}
.secret-card .flip-back strong,.secret-card .flip-back small{color:#F6F0E6}
.secret-card .flip-front strong{color:#24180F}
.secret-card.is-spy .flip-front strong{color:#9E2A22}
.dixit-clue{margin:4px 0 12px;font-size:clamp(26px,3vw,64px);line-height:1.35;text-wrap:balance;color:#24180F}
.dixit-board{margin:8px 0 4px}
.dixit-stage{min-width:0}
.dixit-map{position:relative;aspect-ratio:16/9;border-radius:22px;overflow:hidden;background:#16343a;box-shadow:0 18px 32px -18px #102028}
.dixit-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;display:block}
.dixit-stone{position:absolute;height:auto;transform:translate(-50%,-54%);filter:drop-shadow(0 8px 5px rgb(12 16 14 / 42%));pointer-events:none}
.dixit-token{position:absolute;transform:translate(-50%,-100%);transition:left 1.1s cubic-bezier(.16,1,.3,1),top 1.1s cubic-bezier(.16,1,.3,1),width 1.1s cubic-bezier(.16,1,.3,1);filter:drop-shadow(0 7px 4px rgb(12 16 14 / 45%));pointer-events:none}
.dixit-token img{display:block;width:100%;height:auto}
.dixit-bars{display:grid;gap:8px;margin-top:12px}
.dixit-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;align-items:baseline;color:#24180F}
.dixit-bar em{grid-column:1/-1;display:block;height:8px;border-radius:99px;background:#E4D3BE;overflow:hidden}
.dixit-bar em i{display:block;height:100%;border-radius:inherit}
.dixit-turn{color:#8C4E12;font-style:normal;font-weight:700}
.dixit-table{display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:8px;margin:8px 0 14px}
.dixit-card{position:relative;margin:0;padding:0;border:2px solid transparent;border-radius:14px;background:transparent;color:inherit;text-align:center}
button.dixit-card{appearance:none;width:100%;min-height:0}
.dixit-card img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:12px;display:block;background:#E7D3BC}
.dixit-num{position:absolute;top:6px;inset-inline-start:6px;min-width:32px;height:32px;padding:0 6px;border-radius:999px;background:#F6F0E6;color:#24180F;display:grid;place-items:center;font-weight:700;box-shadow:0 8px 14px -10px #1A100A}
.dixit-card small{display:block;margin-top:4px;color:#5A4334;font-size:12px;line-height:1.5}
.dixit-card.chosen,.dixit-card:focus-visible{border-color:#8C4E12}
.dixit-card.story{border-color:#9E2A22}
.dixit-card.mine{opacity:.72}
.dixit-hand{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0}
.dixit-packs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dixit-pack{position:relative;display:grid;gap:6px;padding:8px;border:1px solid #E4D3BE;border-radius:16px;background:#F6F0E6;box-shadow:0 12px 20px -16px #1A100A}
.dixit-pack:has(input:checked){border-color:#8C4E12}
.dixit-pack img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:10px;background:#E7D3BC}
.dixit-pack input{position:absolute;top:14px;inset-inline-start:14px;width:22px;height:22px;accent-color:#8C4E12}
.dixit-pack small{color:#5A4334}
.dixit-pack input:focus-visible,.dixit-card:focus-visible{outline:3px solid #8C4E12;outline-offset:3px}
/* The TV shows one stage at a time and does not scroll it. */
.tv-shell .stage-main:has(.dixit-fit){overflow:hidden;display:flex;flex-direction:column}
.dixit-fit{flex:1;min-height:0;display:flex;flex-direction:column;gap:.4em;overflow:hidden}
.dixit-fit .dixit-clue{margin:0;flex:none;font-size:clamp(1.6em,4.2vh,3.2em);line-height:1.25;text-align:center;text-wrap:balance}
.dixit-fit .dixit-wait{margin:0;flex:none;text-align:center;color:#5A4334;font-size:1.05em;line-height:1.4}
.dixit-fit.dixit-cards:not(:has(.dixit-table)){justify-content:center}
.dixit-fit .dixit-table{flex:1;min-height:0;margin:0;grid-template-columns:repeat(auto-fit,minmax(min(100%,11em),1fr));grid-auto-rows:minmax(0,1fr);align-content:stretch}
.dixit-fit .dixit-card{height:100%;min-height:0;display:flex;flex-direction:column}
.dixit-fit .dixit-card img{flex:1;min-height:0;width:100%;height:100%;aspect-ratio:auto;object-fit:cover}
.dixit-fit .dixit-card small{flex:none}
.dixit-fit .dixit-board{flex:1;min-height:0;margin:0;display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:center;gap:.45em}
.dixit-fit .dixit-stage{container-type:size;height:100%;display:grid;place-items:center}
.dixit-fit .dixit-map{width:min(100cqw,calc(100cqh * 16 / 9));height:min(100cqh,calc(100cqw * 9 / 16));aspect-ratio:auto}
.dixit-fit .dixit-bars{display:flex;flex-wrap:wrap;gap:.2em .9em;margin:0;justify-content:center}
.dixit-fit .dixit-bar{display:flex;gap:.35em;align-items:baseline}
.dixit-fit .dixit-bar em{display:none}
.mafia-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0}
.mafia-brief{margin:8px 0 12px;padding:12px 14px;border-radius:16px;background:#F6F0E6;color:#24180F}
.mafia-brief p,.mafia-brief li{color:#24180F;line-height:1.75;margin:0 0 6px}
.mafia-brief ul{margin:8px 0 0;padding-inline-start:1.2em}
@media(min-width:761px){.tv-shell .dixit-num{min-width:44px;height:44px;font-size:1.3em}.tv-shell .dixit-card small,.tv-shell .dixit-bar span,.tv-shell .dixit-bar b{font-size:1.05em}}
@media(prefers-reduced-motion:reduce){.dixit-token{transition:none}}
.verse-page{margin:4px 0 8px;color:var(--ink-card)}
.verse-art{margin:0;text-align:center}
.lyric-play{display:flex;justify-content:center;margin:12px 0 4px}
.lyric-play .btn{width:min(100%,320px)}
.lyric-built,.lyric-slots,.lyric-bank{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:12px 0}
.lyric-built:empty{display:none}
.lyric-word{display:inline-flex;gap:4px}
.lyric-tile{min-width:48px;min-height:48px;padding:8px 14px;border:1px solid #CDB892;border-radius:14px;background:#E7D3BC;color:#24180F;font:inherit;font-size:20px}
.lyric-slot{width:44px;min-height:48px;padding:0 0 4px;border:0;border-bottom:3px solid var(--seat);background:transparent;color:#24180F;font:inherit;font-size:22px}
.lyric-tile:disabled{opacity:.35}
.lyric-tile:focus-visible,.lyric-slot:focus-visible,.lyric-play .btn:focus-visible{outline:3px solid var(--seat);outline-offset:3px}
.tv-shell .lyric-play .btn{width:min(100%,420px);min-height:64px;font-size:clamp(20px,1.6vw,32px)}
.tv-shell .lyric-tile,.tv-shell .lyric-slot{font-size:clamp(22px,2vw,40px);min-height:64px}
.verse-art img{max-width:min(320px,88vw);max-height:min(42vh,320px);width:auto;height:auto;border-radius:16px;object-fit:contain;box-shadow:0 10px 28px rgba(48,35,20,.12)}
.tv-shell .verse-art img{max-width:min(420px,38vw);max-height:min(52vh,420px)}
.verse-line,.phone-card .verse-line{margin:0 0 .35em;font-weight:700;line-height:1.7;color:var(--ink-card);font-size:clamp(24px,6vw,32px);text-wrap:balance}
.verse-who,.phone-card .verse-who{margin:.55em 0 0;color:var(--muted-card);font-size:15px;line-height:1.6}
.verse-gap{display:inline-block;min-width:4.8ch;border-bottom:3px solid var(--seat);transform:translateY(-.08em);margin-inline:.2em}
.verse-gap.wide{display:block;width:min(16em,72%);min-width:0;min-height:1.15em;margin:.25em 0 .05em}
.verse-gap.filled{min-width:0;border-bottom-color:transparent;color:var(--seat);animation:verse-fill .5s cubic-bezier(.16,1,.3,1)}
@keyframes verse-fill{from{filter:blur(8px);opacity:.4}to{filter:none;opacity:1}}
.verse-names{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.verse-names>div{display:flex;gap:8px;align-items:baseline;padding:8px 12px;border:1px solid #E4D3BE;border-radius:999px}
.verse-names span{color:var(--muted-card);white-space:nowrap}
.verse-names .verse-got{border-color:var(--seat)}
.verse-names .verse-got span{color:var(--seat);font-weight:700}
.verse-form{margin:4px 0 12px}
.verse-form .ng-field{margin:0 0 12px}
.verse-form input,.phone-card .verse-form input{font-size:22px;min-height:56px;color:var(--ink-card);caret-color:var(--seat)}
.verse-form input::selection{background:var(--ink-card);color:var(--ivory)}
.tv-shell .stage-main:has(.verse-page){display:flex;flex-direction:column;justify-content:center}
.tv-shell .verse-line{font-size:clamp(36px,calc(3.4vw * var(--reading-scale)),92px)}
.tv-shell .verse-who{font-size:clamp(18px,calc(1.15vw * var(--reading-scale)),36px)}
.tv-shell .verse-gap{border-bottom-width:4px}
.tv-shell .verse-names>div{font-size:clamp(16px,1.1vw,28px)}
@media(min-width:761px) and (max-height:800px){.tv-shell .verse-line{font-size:clamp(24px,2.1vw,40px)}}
.singer-faces{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}
.singer-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:112px;padding:12px;border:1px solid #E4D3BE;border-radius:18px;background:transparent;color:var(--ink-card)}
button.singer-face{width:100%;font:inherit}
button.singer-face:focus-visible{outline:3px solid var(--seat);outline-offset:3px}
.singer-face b,.singer-face img{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:#E7D3BC;font-size:28px;line-height:1;object-fit:cover}
.story-choices{display:grid;gap:10px;margin:12px 0}
.story-choice{display:block;width:100%;text-align:right;padding:12px 14px;border:1px solid #E4D3BE;border-radius:14px;background:var(--ivory);color:var(--ink-card);font:inherit;line-height:1.5}
button.story-choice{cursor:pointer}
button.story-choice:focus-visible{outline:3px solid var(--seat);outline-offset:3px}
.verse-line.story-past{opacity:.88;font-size:.95em}
.verse-line.story-answer{font-weight:700}
.singer-face span{text-align:center;line-height:1.4}
.game-icon img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.singer-face.chosen{border-color:var(--seat)}
.singer-face.answer{border-color:var(--seat)}
.singer-face.answer b{background:var(--seat);color:var(--ivory)}
.tv-shell .singer-faces{grid-template-columns:repeat(4,minmax(0,1fr))}
.tv-shell .singer-face b,.tv-shell .singer-face img{width:clamp(72px,8vw,128px);height:clamp(72px,8vw,128px);font-size:clamp(32px,3vw,60px)}
button.singer-face:disabled{opacity:.55}
@media(prefers-reduced-motion:reduce){.verse-gap.filled{animation:none;filter:none;opacity:1}}
.wc-board,.wc-race{display:grid;gap:12px;margin:16px 0}
.wc-row,.wc-race>div{display:grid;gap:8px;justify-items:center}
.wc-main,.wc-race>div{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 14px;width:100%}
.wc-tiles{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(28px,64px);gap:6px;width:max-content;max-width:100%}
.wc-tile{aspect-ratio:1;min-width:0;display:grid;place-items:center;border-radius:10px;font-weight:800;font-size:clamp(16px,4.2vw,32px);line-height:1}
.wc-tile.placed,.wc-count.placed{background:#1F6B45;color:#F4FFF6}
.wc-tile.present,.wc-count.present{background:#E2B43A;color:#24180F}
.wc-tile.absent{background:#E7D9C4;color:#24180F}
.wc-counts{display:flex;gap:8px}
.wc-count{display:flex;align-items:center;gap:6px;min-height:44px;padding:4px 10px;border-radius:999px;font-size:13px;font-weight:700}
.wc-count b{font-size:22px;font-variant-numeric:tabular-nums}
.wc-who,.wc-race em,.wc-empty{color:#5A4334;font-style:normal;font-size:14px}
.wc-empty{text-align:center;margin:12px 0}
.wc-answer{display:flex;justify-content:center;margin:8px 0 18px}
.ng-score-row strong small{display:block;font-weight:500;color:#5A4334;font-size:12px;line-height:1.6}
@keyframes wc-in{from{opacity:.35;filter:blur(6px);transform:translateY(8px)}to{opacity:1;filter:none;transform:none}}
.wc-board .wc-row:first-child{animation:wc-in .4s cubic-bezier(.16,1,.3,1)}
@media(min-width:761px){
 .tv-shell .wc-tiles{grid-auto-columns:minmax(36px,84px);gap:8px}
 .tv-shell .wc-answer .wc-tiles,.tv-shell .wc-board .wc-row:first-child .wc-tiles{grid-auto-columns:minmax(48px,112px)}
 .tv-shell .wc-tile{border-radius:14px;font-size:clamp(22px,2vw,52px)}
 .tv-shell .wc-answer .wc-tile,.tv-shell .wc-board .wc-row:first-child .wc-tile{font-size:clamp(28px,2.6vw,68px)}
 .tv-shell .wc-count{font-size:clamp(16px,1.1vw,28px);min-height:clamp(48px,4vw,72px);padding:6px 14px}
 .tv-shell .wc-count b{font-size:clamp(26px,2vw,48px)}
 .tv-shell .wc-who,.tv-shell .wc-race em{font-size:clamp(16px,1.1vw,28px)}
}
@media(prefers-reduced-motion:reduce){.wc-board .wc-row:first-child{animation:none;filter:none;opacity:1}}
