:root{
  --surface-0:#111318;--surface-1:#191d24;--surface-2:#222832;--surface-3:#2b323d;
  --on:#eee9df;--muted:#aaaeb7;--border:rgba(255,255,255,.12);
  --gold:#d9b66b;--gold-strong:#efcd82;--red:#bf4148;--red-soft:#e26a70;
  --green:#67b88d;--blue:#6aa9d8;--warning:#d6a650;
  --r-sm:8px;--r:16px;--r-lg:24px;--tap:48px;
  --space-1:4px;--space-2:6px;--space-3:8px;--space-4:10px;--space-5:12px;--space-6:14px;--space-7:16px;--space-8:18px;--space-9:20px;--space-10:24px;--space-11:28px;--space-12:32px;
  --motion-press:120ms;--motion-fast:180ms;--motion-normal:260ms;--layer-content:0;--layer-sticky:20;--layer-nav:40;--layer-sheet:60;--layer-dialog:80;
}
*{box-sizing:border-box}
html{background:var(--surface-0);color-scheme:dark}
html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;background:var(--surface-0);color:var(--on);font-size:16px}
body{min-height:100vh;padding-bottom:env(safe-area-inset-bottom);-webkit-tap-highlight-color:transparent}
button,input,select{font:inherit}
button{color:inherit}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(239,205,130,.45);outline-offset:2px}
button:disabled{opacity:.5;cursor:not-allowed}
.hidden{display:none!important}
.app-shell,.game-shell{width:min(100%,680px);margin:0 auto;min-height:100vh;padding:0 16px calc(32px + env(safe-area-inset-bottom))}
.public-bar{height:64px;padding-top:env(safe-area-inset-top);display:grid;grid-template-columns:48px 1fr 48px;align-items:center;gap:8px}
.public-bar>b{text-align:center;font-size:16px;font-weight:650}
.lang-btn,.icon-btn{min-width:44px;min-height:44px;border:0;background:transparent;border-radius:999px;color:var(--on);font-weight:700}
.icon-btn{font-size:24px}.lang-btn{font-size:14px}
.home-hero{margin:8px 0 20px;border:1px solid var(--border);border-radius:28px;overflow:hidden;background:linear-gradient(180deg,#19141a,#12161d);position:relative}
.cinema-art{height:260px;position:relative;overflow:hidden;background:
radial-gradient(circle at 50% 23%,rgba(214,65,67,.82) 0 48px,rgba(214,65,67,.18) 50px 83px,transparent 85px),
linear-gradient(180deg,#111723 0,#15121a 53%,#0c0e13 100%)}
.cinema-art:before{content:"";position:absolute;inset:auto 0 0;height:44%;background:#090b0f;clip-path:polygon(0 100%,0 60%,8% 60%,8% 40%,15% 40%,15% 70%,24% 70%,24% 35%,32% 35%,32% 66%,42% 66%,42% 26%,49% 26%,49% 64%,59% 64%,59% 41%,67% 41%,67% 67%,76% 67%,76% 31%,85% 31%,85% 59%,93% 59%,93% 46%,100% 46%,100% 100%)}
.cinema-art .figure{position:absolute;bottom:25px;width:118px;height:205px;background:#07090d;border-radius:48% 48% 18% 18%;filter:drop-shadow(0 8px 18px rgba(0,0,0,.55))}
.cinema-art .figure:before{content:"";position:absolute;width:108px;height:30px;left:5px;top:4px;border-radius:50%;background:#080a0e;box-shadow:0 -18px 0 -5px #080a0e}
.cinema-art .f1{left:35px;transform:rotate(-5deg)}.cinema-art .f2{right:35px;transform:scaleX(-1) rotate(-5deg)}
.home-copy{padding:24px;text-align:center;background:linear-gradient(180deg,#18161a,#171b21)}
.spade{width:44px;height:44px;border-radius:50%;margin:-46px auto 10px;display:grid;place-items:center;background:#201c19;border:1px solid rgba(239,205,130,.35);color:var(--gold-strong);font-size:22px;position:relative}
.home-copy h1{font-size:38px;line-height:1.05;margin:0;font-family:Georgia,"Times New Roman",serif;font-weight:700;letter-spacing:-.02em}.home-copy h1 em{font-style:normal;color:#d84b50}.home-copy p{font-size:16px;margin:12px 0 0;color:#dfd2b4}
.home-actions{display:grid;gap:12px;padding-bottom:24px}
.primary-action,.secondary-action{width:100%;min-height:64px;border-radius:20px;border:1px solid var(--border);padding:12px 16px;display:flex;align-items:center;gap:14px;text-align:start;cursor:pointer}
.primary-action{background:linear-gradient(180deg,#e7c270,#c89c45);color:#18130c;border-color:rgba(255,231,173,.52);font-weight:700}
.secondary-action{background:var(--surface-1)}
.primary-action.compact{min-height:54px;justify-content:center;text-align:center;margin-top:16px}
.primary-action .action-icon,.secondary-action .action-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(0,0,0,.14);font-size:24px;flex:0 0 auto}.primary-action span:nth-child(2),.secondary-action span:nth-child(2){display:grid;gap:2px}.primary-action b,.secondary-action b{font-size:16px}.primary-action small,.secondary-action small{font-size:13px;font-weight:450;opacity:.76}
.home-links{display:grid;grid-template-columns:1fr 1fr;gap:12px}.home-links button,.secondary-wide{min-height:52px;border:1px solid var(--border);background:var(--surface-1);border-radius:16px;font-weight:650}
.screen-card{padding:8px 0 32px}.screen-intro{margin:16px 0 28px}.overline{display:block;color:var(--gold);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px}.screen-intro h1,.tab-head h1,.control-card h1,.night-step h1{margin:0;font-size:28px;line-height:1.2;font-weight:680}.screen-intro p,.control-card>p,.night-step>p,.status-card p,.bomb-card p{font-size:16px;line-height:1.55;color:var(--muted);margin:10px 0 0}
.field-label{display:block;font-size:14px;font-weight:650;margin:18px 0 8px}.text-field{width:100%;min-height:52px;border-radius:12px;border:1px solid var(--border);background:var(--surface-1);color:var(--on);padding:12px 14px;font-size:17px}.text-field:focus{border-color:rgba(239,205,130,.58)}.code-input{text-transform:uppercase;letter-spacing:.16em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;direction:ltr;text-align:left}.field-error{margin:6px 0 0;color:#f19a9e;font-size:14px;line-height:1.4}
.role-guide-group{margin-top:28px}.role-guide-group h2{font-size:20px;margin:0 0 8px}.role-guide-row{display:grid;grid-template-columns:48px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid var(--border)}.role-guide-row .role-glyph{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--surface-2);color:var(--gold-strong);font-size:20px}.role-guide-row b{font-size:16px}.role-guide-row p{font-size:14px;line-height:1.5;color:var(--muted);margin:4px 0 0}
.flow-list{display:grid;gap:12px}.flow-list article{display:grid;grid-template-columns:40px 1fr;gap:12px;padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--surface-1)}.flow-list article>span{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#2c251a;color:var(--gold-strong);font-weight:800}.flow-list b{font-size:16px}.flow-list p{font-size:14px;color:var(--muted);line-height:1.5;margin:4px 0 0}
.game-shell{padding-bottom:calc(96px + env(safe-area-inset-bottom))}.game-top{position:sticky;top:0;z-index:20;margin:0 -16px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;display:grid;grid-template-columns:1fr auto 48px;align-items:center;gap:12px;background:rgba(17,19,24,.94);backdrop-filter:blur(16px);border-bottom:1px solid var(--border)}.game-top small{display:block;color:var(--muted);font-size:12px}.code-copy{border:0;background:transparent;padding:0;color:var(--gold-strong);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:18px;letter-spacing:.12em;font-weight:850;min-height:28px}.phase-chip{border:1px solid rgba(217,182,107,.28);background:#292318;color:#ecd38f;padding:8px 12px;border-radius:999px;font-size:13px;font-weight:750;white-space:nowrap}.game-content{padding:16px 0 8px;display:grid;gap:16px}
.bottom-nav{position:fixed;left:50%;bottom:calc(10px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:30;width:min(calc(100% - 24px),520px);height:68px;border:1px solid rgba(255,255,255,.14);background:rgba(30,34,42,.96);border-radius:24px;display:grid;grid-template-columns:repeat(3,1fr);padding:6px;backdrop-filter:blur(18px)}.bottom-nav button{border:0;background:transparent;border-radius:18px;display:grid;place-items:center;align-content:center;gap:2px;color:#9299a4;min-height:54px}.bottom-nav button span{font-size:16px}.bottom-nav button b{font-size:12px}.bottom-nav button.active{background:#30281b;color:#f0d58d}
.control-card,.status-card,.role-card,.night-step,.vote-card,.bomb-card,.setup-card,.winner-card{background:var(--surface-1);border:1px solid var(--border);border-radius:20px;padding:18px}.control-card{background:linear-gradient(180deg,#1f1c1a,#191d24);border-color:rgba(217,182,107,.24)}.card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.status-dot{width:10px;height:10px;border-radius:50%;background:var(--green);margin-top:8px}.audio-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.audio-controls button{min-height:70px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2);display:grid;grid-template-columns:32px 1fr;grid-template-rows:auto auto;text-align:start;align-items:center;padding:10px 12px;gap:0 8px}.audio-controls button>span{grid-row:1/3;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#312a20;color:var(--gold-strong)}.audio-controls button b{font-size:14px}.audio-controls button small{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audio-controls button.selected{border-color:rgba(217,182,107,.45);background:#2a251e}
.role-card{padding:0;overflow:hidden;min-height:310px;background:linear-gradient(180deg,#151c22,#101319)}.role-hidden,.role-revealed{min-height:310px;padding:28px 20px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.role-lock{width:72px;height:72px;border-radius:22px;display:grid;place-items:center;background:#26231d;color:var(--gold-strong);font-size:32px;border:1px solid rgba(217,182,107,.28);margin-bottom:16px}.role-hidden h2{font-size:28px;letter-spacing:.18em;margin:6px 0}.role-hidden p{color:var(--muted);font-size:14px;margin:0 0 16px}.hold-button{min-height:52px;width:min(100%,320px);border-radius:16px;border:1px solid rgba(217,182,107,.42);background:#2e271b;color:#f3d993;font-weight:750;padding:10px 16px}.role-revealed{display:none;background:radial-gradient(circle at 50% 20%,rgba(217,182,107,.13),transparent 35%),#12171d}.role-revealed.show{display:flex}.role-glyph.large{width:78px;height:78px;border-radius:24px;display:grid;place-items:center;background:#252a31;border:1px solid var(--border);font-size:34px;color:var(--gold-strong)}.team-tag{margin-top:14px;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800}.team-tag.city{background:#183448;color:#bee0f7}.team-tag.mafia{background:#4a1d22;color:#ffc9cc}.team-tag.independent{background:#413719;color:#f6dfa2}.role-revealed h2{font-size:30px;margin:10px 0 4px}.role-revealed p{font-size:15px;line-height:1.55;color:#c9c9c5;margin:4px 0}.knowledge{width:100%;margin-top:16px;border-top:1px solid var(--border);padding-top:14px;display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.knowledge>b{width:100%;font-size:13px;color:var(--muted)}.knowledge span{padding:7px 10px;border-radius:999px;background:var(--surface-2);font-size:13px}
.status-card.quiet{text-align:center}.phase-symbol{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 10px;border-radius:50%;background:#232631;color:var(--gold-strong);font-size:34px}.status-card.success{text-align:center;border-color:rgba(103,184,141,.3)}
.night-step{border-color:rgba(217,182,107,.28);background:linear-gradient(180deg,#1b1d24,#171b22)}.step-progress{display:grid;grid-template-columns:28px 1fr 28px;align-items:center;gap:8px;margin-bottom:18px}.step-progress span,.step-progress small{font-size:12px;text-align:center;color:var(--muted)}.step-progress i{height:4px;background:linear-gradient(90deg,var(--gold),#433b2b);border-radius:999px}.selection-title{font-size:14px;font-weight:700;margin:22px 0 10px}.player-choice-grid{display:grid;grid-template-columns:1fr;gap:8px}.player-choice{min-height:54px;border:1px solid var(--border);background:var(--surface-2);border-radius:14px;display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;padding:8px 12px;text-align:start}.player-choice.selected{border-color:rgba(217,182,107,.58);background:#2c271f}.seat-badge{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#302a20;color:#f2d388;border:1px solid rgba(217,182,107,.22);font-size:13px;font-weight:800}.player-choice small{font-size:11px;color:var(--muted)}.code-choice{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.code-choice button{min-height:54px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2);font-size:20px;font-weight:800}.code-choice button.selected{background:#3a2f1f;border-color:rgba(217,182,107,.55);color:var(--gold-strong)}.night-actions{margin-top:18px}.text-action{width:100%;min-height:48px;margin-top:8px;border:0;background:transparent;color:var(--muted);font-weight:650}.mafia-team{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.mafia-team span{padding:7px 10px;border-radius:999px;background:#3a1c21;color:#f4b7bb;font-size:13px}
.vote-card{background:#171b22}.live-pill{padding:6px 9px;border-radius:999px;background:#173226;color:#92e0b7;border:1px solid rgba(103,184,141,.34);font-size:11px;font-weight:900;letter-spacing:.08em}.vote-list{display:grid;gap:8px;margin:16px 0}.vote-row{min-height:60px;width:100%;border:1px solid var(--border);background:var(--surface-2);border-radius:14px;display:grid;grid-template-columns:38px 1fr 40px;gap:10px;align-items:center;padding:8px 10px;text-align:start}.vote-row.selected{border-color:rgba(217,182,107,.58);background:#2b261e}.vote-row>div{min-width:0}.vote-row b{display:block;font-size:15px}.vote-row strong{text-align:center;font-size:20px;color:var(--gold-strong)}.vote-meter{display:block;height:5px;background:#333943;border-radius:999px;overflow:hidden;margin-top:7px}.vote-meter i{display:block;height:100%;background:var(--red-soft);border-radius:inherit;transition:width .2s ease-out}
.bomb-card{border-color:rgba(191,65,72,.4);background:linear-gradient(180deg,#2a171a,#1a1b21)}.overline.danger{color:#ee858a}.danger-action{background:linear-gradient(180deg,#d35b61,#a6363e);color:#fff;border-color:#e0787e}
.tab-head{padding:8px 0 4px}.player-list{display:grid;gap:8px}.player-row{min-height:64px;border:1px solid var(--border);border-radius:14px;background:var(--surface-1);padding:10px 12px;display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center}.player-row.dead{opacity:.62}.player-row b{display:block}.player-row small{display:block;margin-top:3px;color:var(--muted);font-size:13px}.mini-action{min-height:44px;min-width:44px;border:1px solid var(--border);background:var(--surface-2);border-radius:12px;padding:8px 10px;font-size:13px;font-weight:700}
.timeline{display:grid}.timeline article{position:relative;padding:4px 0 18px 26px;border-left:1px solid var(--border);margin-left:8px}.timeline article:before{content:"";position:absolute;left:-5px;top:8px;width:9px;height:9px;border-radius:50%;background:var(--gold)}[dir="rtl"] .timeline article{padding:4px 26px 18px 0;border-left:0;border-right:1px solid var(--border);margin-left:0;margin-right:8px}[dir="rtl"] .timeline article:before{left:auto;right:-5px}.timeline time{font-size:12px;color:var(--gold)}.timeline p{font-size:15px;line-height:1.5;margin:3px 0 0;color:#d8d8d3}
.setup-card{padding:16px}.balance-summary{margin:16px 0;padding:14px;border-radius:14px;background:var(--surface-2);border:1px solid var(--border)}.balance-summary>span{font-size:13px;color:var(--muted)}.balance-summary>b{float:inline-end;color:var(--gold-strong)}.balance-summary>div{clear:both;height:8px;border-radius:999px;overflow:hidden;background:#333943;display:flex;margin:10px 0 6px}.balance-summary>div i:first-child{background:var(--blue)}.balance-summary>div i:last-child{background:var(--red-soft)}.balance-summary small{font-size:12px;color:var(--muted)}.secondary-wide{width:100%;margin-bottom:12px}.role-accordion{border-top:1px solid var(--border)}.accordion-head{width:100%;min-height:54px;border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;font-weight:750}.accordion-head b{min-width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);color:var(--gold)}.accordion-body{padding-bottom:8px}.role-stepper{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:12px 0;border-top:1px solid rgba(255,255,255,.07)}.role-stepper b{font-size:15px}.role-stepper small{display:block;font-size:12px;line-height:1.4;color:var(--muted);margin-top:3px;max-width:36ch}.stepper{display:grid;grid-template-columns:44px 34px 44px;align-items:center}.stepper button{width:44px;height:44px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);font-size:20px}.stepper strong{text-align:center}.setup-total{display:flex;justify-content:space-between;align-items:center;padding:14px 0;margin-top:4px;border-top:1px solid var(--border)}.setup-total.ok b{color:var(--green)}.setup-total.bad b{color:#f0999d}
.winner-card{text-align:center;padding:36px 20px}.winner-card>span{font-size:56px;color:var(--gold-strong)}.winner-card small{display:block;color:var(--muted);margin-top:8px}.winner-card h1{font-size:34px;margin:8px 0 4px}.winner-card p{margin:0;color:var(--gold)}
.sheet-backdrop{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.58);display:flex;align-items:flex-end;justify-content:center;padding:16px 12px calc(12px + env(safe-area-inset-bottom))}.bottom-sheet{width:min(100%,520px);background:var(--surface-2);border:1px solid var(--border);border-radius:26px;padding:12px 16px 16px}.sheet-handle{width:44px;height:5px;border-radius:999px;background:#666b74;margin:0 auto 16px}.bottom-sheet>button{width:100%;min-height:52px;border:0;border-top:1px solid var(--border);background:transparent;text-align:start;padding:12px 6px;font-weight:650}.bottom-sheet>button:first-of-type{border-top:0}.result-sheet{text-align:center}.result-icon{width:64px;height:64px;border-radius:20px;display:grid;place-items:center;background:#312a20;color:var(--gold-strong);font-size:28px;margin:4px auto 14px}.result-sheet h2{font-size:22px;line-height:1.35;margin:0}.result-sheet p{font-size:15px;line-height:1.55;color:var(--muted);margin:12px 0 0}.danger-text{color:#f28b90!important}
.toast{position:fixed;left:50%;bottom:calc(92px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:120;width:min(calc(100% - 32px),480px);background:#e9ddbf;color:#17140f;border-radius:14px;padding:12px 14px;font-size:14px;font-weight:650;box-shadow:0 8px 30px rgba(0,0,0,.35);text-align:center}.toast[data-kind="error"]{background:#6d262b;color:#ffe7e8}.toast[data-kind="success"]{background:#244b39;color:#e4fff1}.offline-banner{position:fixed;top:calc(8px + env(safe-area-inset-top));left:50%;transform:translate(-50%,-120%);z-index:130;width:min(calc(100% - 32px),480px);padding:10px 12px;border-radius:12px;background:#5a4524;color:#fff0c8;text-align:center;font-size:13px;transition:transform .2s ease-out}.offline-banner.show{transform:translate(-50%,0)}
.is-busy button{pointer-events:none}.is-busy .primary-action{position:relative}.is-busy .primary-action:after{content:"";width:18px;height:18px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;margin-inline-start:8px;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.install-banner{position:fixed;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:70;display:flex;gap:4px;padding:4px;background:var(--surface-2);border:1px solid var(--border);border-radius:999px}.install-app-btn{min-height:44px;border:0;background:transparent;color:var(--gold-strong);padding:0 12px;font-weight:700}.install-dismiss{width:44px;height:44px;border:0;background:transparent;border-radius:50%;font-size:20px}.install-sheet{position:fixed;inset:0;z-index:90;background:rgba(0,0,0,.6);display:flex;align-items:flex-end;justify-content:center;padding:16px 12px calc(12px + env(safe-area-inset-bottom))}.install-sheet-card{position:relative;width:min(100%,520px);background:var(--surface-2);border:1px solid var(--border);border-radius:24px;padding:24px 18px;text-align:center}.install-sheet-close{position:absolute;top:8px;right:8px;width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:var(--on);font-size:22px}.install-sheet-icon{font-size:34px;color:var(--gold)}
@media(min-width:700px){.app-shell,.game-shell{padding-left:24px;padding-right:24px}.home-hero{margin-top:20px}.cinema-art{height:320px}.player-choice-grid{grid-template-columns:1fr 1fr}.game-top{margin-left:-24px;margin-right:-24px;padding-left:24px;padding-right:24px}}
@media(max-width:360px){.audio-controls{grid-template-columns:1fr}.home-links{grid-template-columns:1fr}.screen-intro h1,.tab-head h1,.control-card h1,.night-step h1{font-size:25px}.stepper{grid-template-columns:42px 30px 42px}.stepper button{width:42px;height:42px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media(prefers-reduced-transparency:reduce){.game-top,.bottom-nav{backdrop-filter:none;background:var(--surface-2)}}


/* v2.1 mobile-first reliability + accessibility pass */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
button{touch-action:manipulation;transition:transform var(--motion-press) ease-out,background-color var(--motion-fast) ease-out,border-color var(--motion-fast) ease-out}
button:active:not(:disabled){transform:scale(.985)}
.primary-action,.secondary-action,.home-links button,.secondary-wide,.audio-controls button,.player-choice,.vote-row,.code-choice button,.bottom-sheet>button{min-height:var(--tap)}
.stepper{grid-template-columns:48px 38px 48px}.stepper button{width:48px;height:48px}
.role-stepper.planned{opacity:.7}.role-status{display:inline-flex;margin-top:6px;padding:4px 7px;border-radius:999px;background:#302a20;border:1px solid rgba(217,182,107,.22);color:#e8cf91;font-size:12px;line-height:1.25}
.accordion-head[aria-expanded="true"]{color:var(--gold-strong)}
.odds-card{background:var(--surface-1);border:1px solid var(--border);border-radius:20px;padding:16px;margin-bottom:16px}
.odds-card h2{font-size:20px;margin:0}.odds-card p{font-size:13px;line-height:1.5;color:var(--muted);margin:12px 0 0}
.odds-track{display:flex;height:12px;border-radius:999px;overflow:hidden;background:var(--surface-3);margin:14px 0 10px}.odds-track i{display:block;height:100%}.odds-track .city{background:var(--blue)}.odds-track .mafia{background:var(--red-soft)}.odds-track .independent{background:var(--gold)}
.odds-labels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.odds-labels span{min-width:0;padding:8px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}.odds-labels b,.odds-labels small{display:block}.odds-labels b{font-size:13px;white-space:nowrap}.odds-labels small{font-size:12px;color:var(--muted);margin-top:3px}
.offline-banner{z-index:var(--layer-dialog);transition:transform var(--motion-fast) ease-out}.offline-banner.show{transform:translate(-50%,0)}
.sheet-backdrop{z-index:var(--layer-sheet)}.bottom-nav{z-index:var(--layer-nav)}.game-top{z-index:var(--layer-sticky)}
.bottom-sheet:focus{outline:none}
@media(max-width:380px){.odds-labels{grid-template-columns:1fr}.cinema-art .f1{left:18px}.cinema-art .f2{right:18px}.home-copy{padding:20px 16px}.home-copy h1{font-size:34px}}
@media(prefers-contrast:more){:root{--border:rgba(255,255,255,.28);--muted:#c6c9cf}.phase-chip,.live-pill,.team-tag,.role-status{border-width:2px}button:focus-visible,input:focus-visible,select:focus-visible{outline-color:var(--gold-strong);outline-width:4px}}

/* v2.2 feature RC — God-only mode, private night summary, explainable win model */
.mode-field{border:0;padding:0;margin:0 0 var(--space-9)}
.mode-field legend{font-size:14px;font-weight:700;margin-bottom:10px;color:var(--on)}
.mode-choice{display:grid;grid-template-columns:1fr;gap:10px}
.mode-choice button{min-height:88px;border:1px solid var(--border);border-radius:16px;background:var(--surface-1);padding:12px 14px;display:grid;grid-template-columns:40px 1fr;grid-template-rows:auto auto;text-align:start;gap:2px 10px;align-items:center}
.mode-choice button>span{grid-row:1/3;width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:var(--surface-2);color:var(--gold-strong);font-size:20px}
.mode-choice button b{font-size:16px}.mode-choice button small{font-size:13px;line-height:1.4;color:var(--muted)}
.mode-choice button.selected{border-color:rgba(239,205,130,.5);background:#272218;box-shadow:inset 0 0 0 1px rgba(239,205,130,.12)}
.mode-choice button.selected>span{background:#3b3020}
.field-help{font-size:13px;line-height:1.45;color:var(--muted);margin:8px 0 0}

.leave-confirm h2{font-size:22px;line-height:1.3;margin:0}.leave-confirm p{font-size:14px;line-height:1.55;color:var(--muted);margin:10px 0 16px}.danger-sheet-action{color:#ffe9ea!important;background:#7a2a30!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:14px!important;text-align:center!important;margin-bottom:8px}.leave-confirm .overline.danger{color:#f28b90}

.night-summary-sheet{max-height:min(82vh,760px);overflow:auto}.night-summary-list{display:grid;gap:12px;margin-top:16px;text-align:start}.summary-section{border:1px solid var(--border);border-radius:16px;background:var(--surface-1);overflow:hidden}.summary-section>b{display:block;padding:10px 12px;border-bottom:1px solid var(--border);font-size:13px;color:var(--gold-strong)}.summary-section.secret{border-color:rgba(217,182,107,.3)}.summary-row{display:grid;grid-template-columns:32px 1fr;gap:10px;padding:11px 12px;align-items:center;border-top:1px solid rgba(255,255,255,.06)}.summary-section>b+.summary-row{border-top:0}.summary-row>span{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:var(--surface-2);font-weight:800}.summary-row b,.summary-row small{display:block}.summary-row b{font-size:15px}.summary-row small{font-size:12px;line-height:1.35;color:var(--muted);margin-top:2px}.summary-row.danger>span{background:#4c2226;color:#ffafb3}.summary-row.safe>span{background:#183b2c;color:#9de2bd}

.power-breakdown{margin-top:14px;border-top:1px solid var(--border);padding-top:12px}.power-breakdown>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:14px;font-weight:750;color:var(--gold-strong);list-style:none}.power-breakdown>summary::-webkit-details-marker{display:none}.power-breakdown>summary:after{content:"＋";margin-inline-start:auto}.power-breakdown[open]>summary:after{content:"−"}.power-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border);border-radius:14px;background:var(--surface-0)}.power-table{border-collapse:collapse;width:100%;min-width:690px;font-size:12px}.power-table th,.power-table td{padding:9px 8px;border-bottom:1px solid rgba(255,255,255,.08);white-space:nowrap;text-align:center}.power-table th:first-child,.power-table td:first-child,.power-table th:nth-child(2),.power-table td:nth-child(2){text-align:start}.power-table th{position:sticky;top:0;background:var(--surface-2);color:var(--gold-strong);font-weight:800}.power-table tr:last-child td{border-bottom:0}.power-table tr.dead{opacity:.5}.power-legend{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.power-legend span{font-size:12px;color:var(--muted);padding:5px 7px;border:1px solid var(--border);border-radius:999px}.power-legend b{color:var(--on)}.power-bonuses{display:grid;gap:6px;margin-top:12px}.power-bonuses>b{font-size:13px}.power-bonuses span{display:flex;justify-content:space-between;gap:10px;padding:7px 9px;border-radius:10px;background:var(--surface-2);font-size:12px}.power-bonuses span.city{border-inline-start:3px solid var(--blue)}.power-bonuses span.mafia{border-inline-start:3px solid var(--red-soft)}.power-bonuses span.independent{border-inline-start:3px solid var(--gold)}

@media(min-width:540px){.mode-choice{grid-template-columns:1fr 1fr}}
@media(max-width:360px){.mode-choice button{min-height:82px;padding:10px 12px}.mode-choice button small{font-size:12px}.night-summary-sheet{max-height:88vh}}

/* v2.3 RC2 — vote privacy, manual God workflow, multi-vote */
.privacy-choice{display:grid;grid-template-columns:1fr;gap:10px}
.privacy-choice button{min-height:96px;border:1px solid var(--border);border-radius:16px;background:var(--surface-1);padding:12px 14px;display:grid;grid-template-columns:40px 1fr;grid-template-rows:auto auto;text-align:start;gap:2px 10px;align-items:center}
.privacy-choice button>span{grid-row:1/3;width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:var(--surface-2);color:var(--gold-strong);font-size:20px}
.privacy-choice button b{font-size:16px}.privacy-choice button small{font-size:13px;line-height:1.45;color:var(--muted)}
.privacy-choice button.selected{border-color:rgba(239,205,130,.5);background:#272218;box-shadow:inset 0 0 0 1px rgba(239,205,130,.12)}
.wake-instruction{margin-top:16px;padding:14px;border:1px solid rgba(217,182,107,.25);border-radius:16px;background:#211d18}
.wake-instruction>small{display:block;color:var(--gold-strong);font-size:13px;font-weight:750;margin-bottom:10px}
.wake-person{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center}.wake-person b{display:block;font-size:17px}.wake-person small{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.wake-list{display:flex;flex-wrap:wrap;gap:8px}.wake-list span{padding:8px 10px;border-radius:999px;background:#3a1c21;border:1px solid rgba(226,106,112,.22);color:#f4b7bb;font-size:13px}
.intro-rule{margin-top:14px;padding:12px 14px;border-radius:14px;background:var(--surface-2);color:var(--muted);font-size:14px;line-height:1.5}
.entry-methods{display:grid;grid-template-columns:1fr;gap:10px;margin-top:18px}.method-card{min-height:88px;border:1px solid var(--border);background:var(--surface-2);border-radius:16px;padding:12px 14px;display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center;text-align:start}.method-card>span{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#312a20;color:var(--gold-strong);font-size:20px}.method-card b{display:block;font-size:15px}.method-card small{display:block;color:var(--muted);font-size:13px;line-height:1.45;margin-top:3px}
.method-confirm,.waiting-player,.awaiting-confirm{margin-top:18px;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2)}.method-confirm p,.waiting-player p{font-size:14px;line-height:1.5;color:var(--muted);margin:0}.waiting-player b,.awaiting-confirm h3{display:block;margin:0;font-size:17px}.spinner-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--warning);margin-inline-end:8px;animation:pulse 1.2s ease-in-out infinite}@keyframes pulse{50%{opacity:.35}}
.player-action-card{border-color:rgba(106,169,216,.28)}
.vote-help{font-size:14px;line-height:1.55;color:var(--muted);margin:12px 0 0}.quorum-line{display:block;color:var(--muted);font-size:12px;line-height:1.4;margin-top:4px}.vote-row{grid-template-columns:38px 1fr 40px 30px}.vote-check{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#303640;color:#cbd0d7;font-weight:900}.vote-row.selected .vote-check{background:#3b3020;color:var(--gold-strong)}
.live-ballots{margin-top:16px;border:1px solid rgba(217,182,107,.22);border-radius:16px;background:#1f1c19;overflow:hidden}.live-ballots summary{min-height:48px;padding:12px 14px;display:flex;align-items:center;cursor:pointer;color:var(--gold-strong);font-size:14px;font-weight:750}.live-ballots>div{border-top:1px solid var(--border);padding:4px 12px}.live-ballots p{margin:0;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.06);display:grid;grid-template-columns:minmax(90px,.8fr) 1fr;gap:10px;font-size:13px}.live-ballots p:last-child{border-bottom:0}.live-ballots p span{color:var(--muted)}
.bot-vote-box{margin-top:16px;padding:14px;border:1px solid rgba(217,182,107,.2);border-radius:16px;background:#211d18}.bot-voter-strip{display:flex;gap:8px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:none}.bot-voter-strip::-webkit-scrollbar{display:none}.bot-voter-strip button{min-height:44px;white-space:nowrap;border:1px solid var(--border);background:var(--surface-2);border-radius:999px;padding:8px 12px}.bot-voter-strip button.selected{border-color:rgba(239,205,130,.5);color:var(--gold-strong);background:#352c20}.mini-target-grid{display:grid;grid-template-columns:1fr;gap:8px;margin:10px 0}.mini-target-grid button{min-height:48px;border:1px solid var(--border);border-radius:13px;background:var(--surface-2);padding:8px 10px;text-align:start;display:grid;grid-template-columns:36px 1fr;gap:8px;align-items:center}.mini-target-grid button.selected{border-color:rgba(239,205,130,.5);background:#31291e}
.vote-result-sheet{max-height:min(84vh,760px);overflow:auto}.vote-result-counts{display:grid;gap:7px;margin-top:14px}.vote-result-counts>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-1)}.vote-result-counts b{font-size:18px;color:var(--gold-strong)}.vote-receipts{margin-top:14px;text-align:start;border:1px solid var(--border);border-radius:14px;overflow:hidden}.vote-receipts>b{display:block;padding:10px 12px;color:var(--gold-strong);font-size:13px;background:#211d18}.vote-receipts p{margin:0;padding:10px 12px;border-top:1px solid rgba(255,255,255,.06);display:grid;grid-template-columns:minmax(90px,.8fr) 1fr;gap:10px}.vote-receipts strong{font-weight:600;color:var(--on)}
@media(min-width:540px){.privacy-choice,.entry-methods{grid-template-columns:1fr 1fr}.mini-target-grid{grid-template-columns:1fr 1fr}}
@media(max-width:360px){.privacy-choice button{min-height:88px;padding:10px 12px}.privacy-choice button small{font-size:12px}.vote-row{grid-template-columns:34px 1fr 34px 28px;gap:8px;padding:8px}.live-ballots p,.vote-receipts p{grid-template-columns:1fr}.wake-list{display:grid;grid-template-columns:1fr 1fr}}

/* v2.3 vote privacy: live results stay on the host device while voting is open. */
.privacy-pill{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:5px 9px;border-radius:999px;border:1px solid rgba(217,182,107,.28);background:#272218;color:var(--gold-strong);font-size:11px;font-weight:850;letter-spacing:.05em;white-space:nowrap}
.private-vote-list .vote-row{grid-template-columns:38px minmax(0,1fr) 34px}
.private-vote-list .vote-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.35}
.host-count-list .vote-row.readonly{grid-template-columns:38px minmax(0,1fr) 40px;cursor:default}
.host-count-list .vote-row.readonly:active{transform:none}
.empty-live-vote{margin:14px 0;padding:13px 14px;border:1px dashed var(--border);border-radius:14px;color:var(--muted);font-size:13px;text-align:center}
@media(max-width:360px){.private-vote-list .vote-row{grid-template-columns:34px minmax(0,1fr) 30px}.host-count-list .vote-row.readonly{grid-template-columns:34px minmax(0,1fr) 34px}}
