/* Mobile-first visual refinement. Core game rules and secret boundaries are unchanged. */
@font-face{font-family:Vazirmatn;src:url('/fonts/Vazirmatn-Regular.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
:root{
  --surface-0:#10151e;--surface-1:#19212d;--surface-2:#242f3e;--surface-3:#314052;
  --on:#f1efe8;--muted:#b8c1ce;--gold:#d6b879;--gold-strong:#f0cf8b;
  --border:#3b4758;--red-soft:#f299a0;--green:#9ed6b7;
  --r-sm:8px;--r:14px;--r-lg:20px;--tap:48px;
  --ui-gap:12px;--ui-padding:16px;--ui-section:24px;--ui-large:32px;
  --ui-accent-bg:#302a20;--ui-danger-bg:#51282f;--ui-focus:#f0cf8b;
  --ui-nav-height:76px;--ui-control-height:56px;--ui-text:16px;--ui-small:14px;--ui-title:24px;
}
html,body{font-family:Vazirmatn,-apple-system,BlinkMacSystemFont,'Segoe UI',Tahoma,sans-serif;line-height:1.65}
button,input,select{font:inherit}
button{cursor:pointer}
button:focus-visible,a:focus-visible,summary:focus-visible{outline-color:var(--ui-focus)}
.primary-action,.secondary-action,.secondary-wide,.text-action,.mini-action,.code-choice button,.stepper button{border-radius:var(--r);min-height:var(--tap)}
.primary-action{background:var(--gold-strong);color:var(--surface-0);border:1px solid var(--gold-strong);box-shadow:none;min-height:var(--ui-control-height)}
.primary-action.compact{padding:var(--ui-gap) var(--ui-padding)}
.primary-action b,.secondary-action b{font-size:var(--ui-text)}
.secondary-action,.secondary-wide{background:var(--surface-2);border:1px solid var(--border);color:var(--on);box-shadow:none}
.text-action{border:1px solid var(--border);background:transparent;padding:var(--space-3) var(--ui-padding);color:var(--muted)}
.icon-btn,.lang-btn{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);min-height:var(--tap);min-width:var(--tap)}
.header-actions{display:flex;gap:var(--space-3);align-items:center}
.exit-button{border:1px solid var(--border);border-radius:var(--r-sm);background:transparent;min-height:var(--tap);padding:var(--space-3) var(--ui-gap);font-size:var(--ui-small);color:var(--red-soft)}
.game-top{grid-template-columns:minmax(0,1fr) auto auto;gap:var(--space-3);background:var(--surface-0);backdrop-filter:none}
.phase-chip{padding:var(--space-3);font-size:var(--ui-small);border-radius:var(--r-sm)}
.code-copy{min-height:var(--tap);font-size:var(--ui-text);letter-spacing:.04em}
.control-card,.status-card,.role-card,.night-step,.vote-card,.bomb-card,.setup-card,.screen-card{border-radius:var(--r-lg);padding:var(--ui-padding);background:var(--surface-1);box-shadow:none}
.control-card h1,.night-step h1,.vote-card h2{font-size:var(--ui-title);line-height:1.6;margin-block:var(--space-3)}
.control-card p,.night-step p,.vote-help{font-size:var(--ui-small);line-height:1.8;color:var(--muted)}
.audio-panel{border-top:1px solid var(--border);margin-top:var(--ui-padding)}
.audio-panel>summary{min-height:var(--tap);display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:var(--ui-small);color:var(--muted);list-style:none}
.audio-panel>summary:after{content:'＋';color:var(--gold)}
.audio-panel[open]>summary:after{content:'−'}
.audio-controls{margin-top:var(--space-3);gap:var(--ui-gap);grid-template-columns:1fr}
.audio-controls button{border-radius:var(--r);min-height:var(--ui-control-height)}
.audio-controls button small{white-space:normal;overflow:visible}
.audio-panel .text-action{width:100%;margin-top:var(--ui-gap)}
.player-vote-private{border-color:var(--gold);}
.private-vote-list .vote-row{border-radius:var(--r);padding:var(--ui-gap);gap:var(--ui-gap);min-height:var(--ui-nav-height);grid-template-columns:var(--ui-large) minmax(0,1fr) var(--ui-large)}
.vote-row b{font-size:var(--ui-text);overflow-wrap:anywhere}
.private-vote-list .vote-row small{font-size:var(--ui-small);line-height:1.6}
.private-vote-list .vote-row.selected{border-color:var(--gold-strong);background:var(--ui-accent-bg);box-shadow:inset 0 0 0 1px var(--gold)}
.vote-check{border:1px solid var(--border);border-radius:var(--r-sm);width:var(--ui-large);height:var(--ui-large);background:var(--surface-1)}
.vote-row.selected .vote-check{background:var(--gold-strong);color:var(--surface-0);border-color:var(--gold-strong)}
.host-vote-live .host-count-list{gap:var(--space-3)}
.host-totals>summary{min-height:var(--tap);display:flex;align-items:center;color:var(--muted);font-size:var(--ui-small);cursor:pointer}
.player-vote-private #submitVote{position:sticky;bottom:calc(var(--ui-nav-height) + var(--ui-padding) + env(safe-area-inset-bottom));z-index:1}
.host-count-list .vote-row.readonly{background:transparent;border-width:0 0 1px;border-radius:0}
.seat-badge{border-radius:var(--r-sm);background:var(--surface-3);border:0}
.live-ballots{border-radius:var(--r);background:var(--surface-2);border-color:var(--border)}
.live-ballots p{overflow-wrap:anywhere}
.bottom-nav{background:var(--surface-1);backdrop-filter:none;border-radius:var(--r-lg);border-color:var(--border)}
.bottom-nav button{border-radius:var(--r);color:var(--muted)}
.bottom-nav button b{font-size:var(--ui-small)}
.bottom-nav button.active{background:var(--ui-accent-bg);color:var(--gold-strong)}
.bottom-sheet{background:var(--surface-1);border-radius:var(--r-lg);max-height:calc(100dvh - var(--ui-large));overflow-y:auto}
.leave-confirm .secondary-wide{display:block;width:100%;min-height:var(--ui-control-height);margin-top:var(--ui-gap);text-align:center}
.leave-confirm .danger-sheet-action{background:var(--ui-danger-bg)!important;color:var(--on)!important;border:1px solid var(--red-soft)!important;border-radius:var(--r)!important}
.is-busy #quickLeaveBtn,.is-busy #menuBtn,.is-busy #leaveBtn,.is-busy #confirmLeaveBtn,.is-busy #cancelLeaveBtn,.is-busy #closeMenu{pointer-events:auto}
.home-hero{border-radius:var(--r-lg);background:var(--surface-1)}
.cinema-art{height:180px;opacity:1;background:url('/images/mafia-noir-header.png') center 48%/cover no-repeat}
.cinema-art:before,.cinema-art .figure,.cinema-art .moon{display:none}
.home-copy{padding:var(--ui-section) var(--ui-padding)}
.home-copy h1{font-size:36px;letter-spacing:0}
.home-copy h1 em{color:var(--gold-strong)}
.home-actions{gap:var(--ui-gap)}
.home-actions>button{min-height:var(--ui-nav-height);border-radius:var(--r)}
.home-links button{border-radius:var(--r);font-size:var(--ui-small)}
.text-field{border-radius:var(--r);min-height:var(--ui-control-height);background:var(--surface-0);border-color:var(--border);font-size:var(--ui-text)}
.field-label{font-size:var(--ui-text);margin-top:var(--ui-section)}
.mode-choice button,.privacy-choice button{border-radius:var(--r);background:var(--surface-2)}
.mode-choice button.selected,.privacy-choice button.selected{background:var(--ui-accent-bg);border-color:var(--gold)}
.mode-choice button small,.privacy-choice button small{font-size:var(--ui-small);line-height:1.7}
@media(max-width:360px){.game-top{grid-template-columns:minmax(0,1fr) auto}.phase-chip{grid-row:2;grid-column:1/-1;justify-self:start}.header-actions{grid-column:2;grid-row:1}.home-links{grid-template-columns:1fr 1fr}}
@media(min-width:600px){.audio-controls{grid-template-columns:1fr 1fr}}
