@font-face{font-family:Bricolage;src:url('../../apps/platform/design-room/assets/bricolage-grotesque-latin-600-800.woff2')}@font-face{font-family:Instrument;src:url('../../apps/platform/design-room/assets/instrument-sans-latin-400-600.woff2')}
:root{--ink:#f3e5d2;--quiet:#bac1c1;--amber:#e5b681;--canvas:#171d21;--ease:cubic-bezier(.22,.7,.25,1)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--canvas);color:var(--ink);font:17px/1.5 Instrument,sans-serif}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--amber);outline-offset:5px}a{color:inherit;text-decoration:none}button{border:0}h1,h2,h3,p{margin:0}h1,h2,h3,.brand,.room-code{font-family:Bricolage,sans-serif;font-weight:700}h2{font-size:38px;line-height:1.12;letter-spacing:-1px}p{color:var(--quiet)}.room-stage{position:relative;overflow:hidden;min-height:800px;background:#171d21}.room-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.site-header{position:relative;display:flex;align-items:center;justify-content:space-between;padding:34px 5%;gap:32px;z-index:1}.brand{display:inline-flex;gap:12px;align-items:center;font-size:23px;white-space:nowrap}.brand img{width:34px;height:34px}.site-header nav{display:flex;align-items:center;gap:32px;font-size:15px}.text-action{padding:0;color:var(--amber);background:none;font-size:15px;line-height:1.5}.text-action:hover{text-decoration:underline;text-underline-offset:5px}.intro{position:relative;z-index:1;margin:80px 0 0 5%;width:470px}.intro h1{font-size:clamp(54px,5.3vw,78px);line-height:1.04;letter-spacing:-2.5px}.intro h1 em{font-style:normal;color:var(--amber)}.intro>p{margin-top:28px;font-size:19px}.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.intro .actions{margin-top:32px}.primary,.secondary{padding:14px 22px;border-radius:6px;font-size:16px;font-weight:600;line-height:1.4;transition:background .16s}.primary{background:var(--amber);color:#17191a}.primary:hover{background:#f3c99a}.secondary{background:#29343a;color:var(--ink)}.secondary:hover{background:#37454c}.find-game{display:inline-block;margin-top:20px;font-size:14px;color:var(--quiet)}.intro .aside{font-size:14px;margin-top:42px}.library,.how{max-width:1392px;margin:auto;padding:70px 5% 90px}.section-heading{display:flex;gap:24px;align-items:end;justify-content:space-between;margin-bottom:36px}.section-heading p{font-size:16px}.games{display:grid;grid-template-columns:1fr 1fr;gap:36px}.game-head,.game-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px}.game-head{margin-bottom:20px}.game-head h3{font-size:26px}.game-head span{color:var(--quiet);font-size:12px}.game-bottom{margin-top:24px}.game-bottom p{font-size:16px}.game-art{border:0;padding:0;font-family:Instrument,sans-serif;height:300px}.how{border-top:1px solid #45505a55;display:grid;grid-template-columns:1fr 1fr;gap:80px}.how ol{padding-left:20px;font-size:16px;color:var(--quiet)}.how li{margin-top:20px}.how strong{display:block;color:var(--ink)}.lobby-study{border-top:1px solid #52606b55}.lobby-heading{position:relative;z-index:1;margin:30px 5% 0}.lobby-heading h2{max-width:350px}.lobby-heading p{margin-top:12px;font-size:16px}.lobby-stage{min-height:900px}.host-panel{position:relative;z-index:1;margin:32px 5% 76px auto;width:330px;padding:26px;background:#171d21eb;border-radius:12px;box-shadow:0 24px 70px #070b0e28;display:grid;gap:22px}.host-panel h3{font-size:30px;margin-top:2px}.eyebrow{display:block;color:var(--quiet);font-size:12px}.invitation{display:flex;gap:22px;align-items:center}.room-code{font-size:40px;letter-spacing:2px;color:var(--amber)}.roster{list-style:none;margin:0;padding:0;display:grid;gap:12px}.roster li{display:flex;align-items:center;justify-content:space-between;font-size:15px;gap:18px}.roster .status{font-size:12px;color:var(--quiet)}.roster .ready{color:var(--amber)}.ready-count{font-size:13px}.full{width:100%;font-size:14px}.panel-note{font-size:12px;line-height:1.6}.room-footer{position:absolute;bottom:24px;left:5%;display:flex;gap:36px;font-size:14px;color:var(--quiet)}.motion-controls{padding:32px 5% 40px;display:flex;gap:28px;align-items:center;justify-content:space-between;flex-wrap:wrap}.motion-controls p{font-size:13px}.motion-controls .secondary{font-size:14px;padding:10px 16px}#room-event{width:100%;color:var(--amber)}dialog{color:var(--ink);background:#202a30;border:1px solid #485760;border-radius:12px;padding:32px;max-width:420px;width:calc(100% - 32px);box-shadow:0 40px 120px #0008}dialog::backdrop{background:#080d12b8}dialog h2{font-size:30px;margin-top:20px}dialog p{margin:18px 0}dialog label{display:block;margin-top:24px;font-size:14px}dialog input{width:100%;padding:14px;background:#101a20;color:var(--ink);border:1px solid #64727a;border-radius:5px;margin-top:8px}.dialog-close{float:right;background:none;color:var(--quiet);font-size:13px}body[data-view=home] .lobby-study,body[data-view=lobby] .home-study{display:none}.status-message{position:absolute;bottom:22px;left:5%;color:var(--quiet);font-size:13px}.room-stage.render-failed{background-size:cover;background-position:center}
@media(min-width:1600px){.intro{margin-top:110px}.home-stage{min-height:900px}}
@media(max-width:900px){.site-header{padding:24px 5%}.site-header nav{gap:18px}.site-header nav a:nth-child(2){display:none}.brand{font-size:20px}.intro{width:360px;margin-top:80px}.intro h1{font-size:58px}.section-heading{display:block}.section-heading p{margin-top:16px}.game-head span{display:none}.game-bottom{display:block}.game-bottom button{margin-top:16px}.host-panel{width:310px}.lobby-heading h2{font-size:32px}}
@media(max-width:600px){.site-header{gap:16px}.site-header nav{display:none}.brand{font-size:19px}.brand img{width:30px;height:30px}.room-stage{min-height:850px}.home-stage canvas{height:530px;top:320px}.intro{margin:26px 6% 0;width:88%}.intro h1{font-size:50px;letter-spacing:-1.6px}.intro>p{font-size:16px;margin-top:20px}.intro>p br{display:none}.intro .aside{display:none}.intro .actions{margin-top:24px}.find-game{margin-top:14px}.library,.how{padding:44px 6%}.section-heading h2,h2{font-size:30px}.games{grid-template-columns:1fr;gap:42px}.game-head h3{font-size:24px}.game-art{height:250px}.game-bottom{display:flex;align-items:center}.game-bottom button{margin:0;font-size:14px}.game-bottom p{font-size:14px}.how{grid-template-columns:1fr;gap:24px}.lobby-stage{padding-bottom:24px}.lobby-stage canvas{top:160px;height:430px}.lobby-heading{margin:24px 6% 0}.lobby-heading h2{font-size:30px}.lobby-heading h2{max-width:350px}.lobby-heading p{font-size:14px;max-width:280px}.host-panel{margin:410px 6% 20px;width:88%;background:#202a30;box-shadow:none}.room-footer{position:relative;left:auto;margin-left:6%;width:88%;bottom:auto;display:block;font-size:12px}.room-footer span{display:block}.motion-controls{padding:26px 6%}.motion-controls .actions{gap:8px}.motion-controls .secondary{font-size:13px;padding:10px 12px}dialog{padding:26px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}}

button:disabled{cursor:default;opacity:.5}h1:focus,h2:focus{outline:none}

body[data-reduced=true]{scroll-behavior:auto}body[data-reduced=true] *,body[data-reduced=true] *:before,body[data-reduced=true] *:after{animation:none!important;transition:none!important}
.preview-startup-notice{padding:16px 5%;background:#30383c;color:var(--ink);font-size:15px}.preview-startup-notice a{color:var(--amber);text-decoration:underline;text-underline-offset:4px}

/* Sound and motion stay available without interrupting the room. */
[hidden]{display:none!important}
.sound-volume{display:flex;align-items:center;gap:8px;font-size:12px;padding:0 6px;color:var(--quiet)}
.sound-volume input{width:72px;min-height:44px;accent-color:var(--amber)}
.sound-status{flex-basis:100%;font-size:11px;color:var(--quiet)}
.round-start{justify-self:start;min-height:44px}
.round-scene-controls{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:20px;max-width:470px}
.round-scene-controls>span{flex-basis:100%;font-size:12px;color:var(--quiet)}
.round-scene-controls .secondary{padding:10px 16px;font-size:14px;min-height:44px}
.round-scene-controls .text-action{font-size:14px;min-height:44px}
body[data-round=true] .lobby-heading>p{max-width:460px}
.roster li.is-watching{color:var(--quiet)}
.roster li.is-watching .status{font-size:11px;max-width:130px;text-align:right}
.round-story{padding:8px 5% 52px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px 56px;max-width:1392px;margin:auto}
.round-copy{max-width:680px}
.round-progress{font-size:13px;margin-bottom:12px;color:var(--quiet)}
.round-story h3{font-size:30px;line-height:1.15;letter-spacing:-.5px;margin-bottom:16px}
#round-description{font-size:16px;line-height:1.6;max-width:65ch}
.round-navigation{display:flex;gap:12px;align-items:center;flex-wrap:wrap;align-content:start;max-width:300px;padding-top:30px}
.round-navigation .text-action{min-height:44px}
.round-story>.panel-note{grid-column:1/-1;max-width:75ch}
@media(max-width:900px){.round-story{grid-template-columns:1fr;gap:20px}.round-navigation{padding-top:0;max-width:none}}
@media(max-width:600px){.sound-volume input{width:76px}.sound-status{display:block;padding:4px 0 0}.round-scene-controls{gap:8px;margin-top:14px}.round-scene-controls .text-action,.round-scene-controls .secondary{font-size:13px}.round-story{padding:8px 6% 36px}.round-story h3{font-size:26px}body[data-round=true] .lobby-stage canvas{top:260px}body[data-round=true] .host-panel{margin-top:490px}}
.sound-volume{white-space:nowrap;gap:6px}
.sound-volume input{width:72px;flex:none}
#render-status{display:block;position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:700px){.sound-volume{padding-left:9px}}
@media(min-width:601px) and (max-width:900px){
 .lobby-stage{padding-bottom:24px;min-height:850px}
 .lobby-stage canvas{top:160px;height:470px}
 .lobby-heading{margin:24px 6% 0}
 .lobby-heading p{max-width:440px}
 .host-panel{margin:440px 6% 20px;width:88%;background:#202a30;box-shadow:none}
 .room-footer{position:relative;left:auto;bottom:auto;margin:0 6%;width:88%;display:flex;gap:24px;font-size:13px}
 body[data-round=true] .lobby-stage canvas{top:260px}
 body[data-round=true] .host-panel{margin-top:520px}
}

/* Public identity is a profile, not a full-body character. Green has one job: ready. */
:root{--ready:#91d9aa;--ready-ink:#102d1e;--ready-surface:#173c2b}
.roster{gap:10px}.roster li{gap:10px;min-height:34px}.roster-identity{display:flex;align-items:center;gap:9px;min-width:0}.roster-identity>span{overflow-wrap:anywhere}.roster-identity img{width:32px;height:32px;flex:none;border-radius:50%;background:#2b3942}.roster .status{display:flex;align-items:center;gap:4px;white-space:nowrap}.roster .ready{color:var(--ready)}.status svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.roster li.is-watching .status{white-space:normal}
#open-phone{justify-self:start;min-height:44px}.host-panel{gap:18px}
.player-preview{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:64px;align-items:center;max-width:1100px;margin:auto;padding:70px 6%;scroll-margin-top:24px}.player-preview h2{margin-bottom:16px}.player-preview-copy>p{max-width:32ch}.player-preview-copy .phone-explanation{margin-top:28px;max-width:36ch}.player-preview-copy .panel-note{margin-top:28px}.player-preview-copy .text-action{min-height:44px;margin-top:20px}
.phone-card{padding:26px 26px 28px;border-radius:24px;background:#253139;box-shadow:0 16px 42px #060c1028;transition:background .22s ease-out;color:var(--ink)}.phone-room{display:flex;align-items:center;gap:10px;color:#d7dddf;font-size:13px}.phone-room img{width:24px;height:24px}.phone-identity{margin-top:32px;display:grid;justify-items:center;gap:8px}.phone-identity>img{border-radius:50%;width:104px;height:104px}.phone-identity h3{font-size:28px;letter-spacing:-.4px}.phone-identity .text-action{font-size:13px;min-height:44px}.phone-state{text-align:center;margin:26px 0 22px;min-height:95px;display:grid;justify-items:center;align-content:center}.phone-state h4{font:600 22px/1.2 Bricolage,sans-serif;margin:0 0 8px;letter-spacing:-.3px}.phone-state p{font-size:14px;max-width:27ch;line-height:1.5;color:#c7d1d5}.phone-state svg{width:36px;height:36px;margin-bottom:14px;fill:none;stroke:var(--ready);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.ready-button{min-height:52px;width:100%;border-radius:8px;padding:12px 20px;background:var(--ready);color:var(--ready-ink);font-weight:600}.ready-button:hover{background:#b0ecc5}.phone-card[data-ready=true]{background:var(--ready-surface)}.phone-card[data-ready=true] .phone-room,.phone-card[data-ready=true] .phone-state p{color:#c5e4d0}.phone-card[data-ready=true] .phone-identity>img{outline:3px solid var(--ready);outline-offset:5px}.phone-card[data-ready=true] .phone-identity .text-action{color:#b9efcb}.phone-card[data-ready=true] .ready-button{background:#28573e;color:#d9f3e1}.phone-card[data-ready=true] .ready-button:hover{background:#326a4d}
#join-dialog{max-width:760px;padding:30px;max-height:90dvh;overflow:auto;background:#202a30}#guest-form{display:block}.profile-header{display:flex;justify-content:space-between;align-items:start;gap:20px}.profile-header h2{margin:0;font-size:30px;letter-spacing:-.8px}.profile-header p{margin:8px 0 0;font-size:14px}.profile-header .dialog-close{float:none;min-width:44px;min-height:44px;margin-top:-8px}.profile-layout{display:grid;grid-template-columns:160px minmax(0,1fr);gap:34px;margin-top:28px}.profile-portrait{position:sticky;top:0;align-self:start;text-align:center}.profile-portrait img{width:160px;height:160px;border-radius:50%}.profile-portrait span{display:block;color:var(--quiet);font-size:12px;margin-top:16px;line-height:1.6}.profile-fields>label{margin-top:0}.profile-fields>input{margin-bottom:24px;padding:10px 12px;min-height:44px}.profile-fields fieldset{border:0;padding:0;margin:0 0 18px;min-width:0}.profile-fields legend{padding:0;margin-bottom:8px;font-size:13px;font-weight:600}.avatar-choices{display:flex;flex-wrap:wrap;gap:6px}.avatar-choice{display:flex;align-items:center;gap:6px;min-height:44px;background:#303c43;color:#dde2e3;border-radius:6px;padding:8px 10px;font-size:12px;box-shadow:inset 0 0 0 1px transparent}.avatar-choice:hover{background:#3d4b52}.avatar-choice[aria-pressed=true]{color:#f3dfc4;background:#414546;box-shadow:inset 0 0 0 2px var(--amber)}.avatar-swatch{width:20px;height:20px;border-radius:50%;flex:none;box-shadow:inset 0 0 0 1px #ffffff40}.profile-footer{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-top:8px;padding-top:20px;border-top:1px solid #46545b}.profile-footer p{margin:0}.profile-footer .primary{min-height:48px;white-space:nowrap}#guest-error{font-size:14px;color:#ffc9bb}#guest-error:empty{display:none}
@media(max-width:900px){.player-preview{grid-template-columns:minmax(0,1fr) 320px;gap:32px;padding-top:40px;padding-bottom:44px}.phone-card{padding:24px 22px}}
@media(max-width:600px){.player-preview{grid-template-columns:1fr;gap:28px;padding:44px 6%}.player-preview-copy .phone-explanation{margin-top:16px}.player-preview-copy .panel-note{margin-top:8px}.player-preview-copy .text-action{margin-top:8px}.phone-card{width:100%;max-width:360px;justify-self:center}.profile-header h2{font-size:26px}.profile-header p{font-size:13px}#join-dialog{padding:22px;max-height:94dvh}.profile-layout{grid-template-columns:1fr;gap:20px;margin-top:22px}.profile-portrait{position:static;display:flex;gap:18px;align-items:center;text-align:left}.profile-portrait img{width:92px;height:92px}.profile-portrait span{margin:0}.profile-footer{position:sticky;bottom:-22px;margin:0 -22px -22px;padding:16px 22px;background:#202a30;gap:16px}.profile-footer .panel-note{font-size:10px;max-width:17ch}.profile-footer .primary{padding:12px 16px;font-size:14px}.avatar-choice{font-size:12px}.roster-identity img{width:34px;height:34px}.host-panel{gap:18px}}

.lobby-heading .seat-notice{display:inline-flex;align-items:center;padding:8px 12px;background:#26383d;color:#deeaee;font-size:13px;border-radius:6px;margin-top:16px;max-width:100%;overflow-wrap:anywhere}.lobby-heading .seat-notice[data-ready=true]{color:#b9efcb;background:#183d2c}
/* The invitation stays secondary to the people at the table. */
#connection-status{font-size:12px;line-height:1.5;color:var(--quiet)}#invite-panel{display:grid;gap:14px;min-width:0}#phone-link{font-size:12px;overflow-wrap:anywhere;color:var(--amber);text-decoration:underline;text-underline-offset:3px}#invite-qr{border-radius:8px;justify-self:center}#invite-error,#code-error{font-size:13px;color:#ffc9bb}.live-announcement{padding:22px 6%;font-size:14px}.roster-identity img{width:32px;height:32px}.text-action{min-height:44px}#room-code-input{text-transform:uppercase;letter-spacing:.2em;font-weight:600;font-size:24px}.invitation .text-action{display:block;text-align:left}
body[data-view=phone] .home-study,body[data-view=phone] .lobby-stage,body[data-view=phone] #room-event{display:none}body[data-view=phone] .player-preview{display:block;max-width:430px;padding:28px 24px 44px}body[data-view=phone] .player-preview-copy h2,body[data-view=phone] .player-preview-copy>p{display:none}body[data-view=phone] .player-preview-copy .text-action{margin:0 0 18px}body[data-view=phone] .phone-card{max-width:none}body[data-view=phone] .lobby-study{border:0}body[data-view=phone] .phone-state{min-height:112px}.phone-identity h3{overflow-wrap:anywhere;max-width:100%}

#another-code{margin-bottom:12px;min-height:48px}

/* Shared-TV presentation keeps people in view; detailed controls stay on demand. */
body[data-role=stage] .player-preview{display:none}
body[data-role=stage] .lobby-heading>p:not(.seat-notice){display:none}
body[data-role=stage] .host-panel{position:absolute;top:180px;right:5%;margin:0;padding:0;width:240px;background:none;box-shadow:none;gap:12px;max-height:620px}
body[data-role=stage] .host-panel>div:first-child .eyebrow,body[data-role=stage] #connection-status,body[data-role=stage] .host-panel>.panel-note:last-child{display:none}
body[data-role=stage] .host-panel h3{font-size:26px}
body[data-role=stage] .invitation{gap:18px}
body[data-role=stage] .room-code{font-size:50px}
body[data-role=stage] .host-panel .roster{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body[data-role=stage][data-show-roster=true] .host-panel .roster{position:static;width:auto;height:auto;max-height:280px;overflow:auto;clip-path:none;white-space:normal;background:#202a30f5;padding:16px;border-radius:8px}
body[data-role=stage] .host-panel #show-roster{text-align:left;justify-self:start}
body[data-role=stage] .ready-count{font-size:14px}
.field-hint{font-size:12px;margin:-14px 0 22px;color:var(--quiet)}
:root{color-scheme:dark}::selection{background:#e5b681;color:#171d21}input{caret-color:var(--amber)}
@media(min-width:901px){body[data-role=host] .host-panel{position:absolute;top:245px;right:5%;margin:0;width:310px;max-height:610px;overflow:auto;scrollbar-width:thin;scrollbar-color:#667477 #202a30}.host-panel .roster-identity{min-width:0}}
@media(max-width:900px){body[data-role=stage] .host-panel{position:relative;top:auto;right:auto;margin:410px 6% 24px;width:88%;padding:22px;background:#202a30;max-height:none}body[data-role=stage] .host-panel .roster{position:static;width:auto;height:auto;max-height:none;clip-path:none;white-space:normal;overflow:visible}body[data-role=stage] #show-roster{display:none}body[data-role=stage] .lobby-heading>p:not(.seat-notice){display:block}}

@media(min-width:901px){body[data-role=stage] .host-panel{width:270px}}

/* Room-owned game shell: stable identity and controls surround each private child. */
.game-surface{position:relative;background:#171d21;min-height:100dvh}
.game-room-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 4%;border-bottom:1px solid #43505780;background:#20292e}
.game-room-header>div{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.game-room-header>div>span{font-size:14px;color:var(--quiet)}
#active-room-code{font-family:Bricolage,sans-serif;font-size:24px;letter-spacing:.14em;color:var(--amber)}
.game-room-actions{gap:12px!important}.game-room-actions button{min-height:44px;font-size:14px;padding:10px 14px}
.game-viewport{position:relative;min-height:calc(100dvh - 92px)}#game-frame{display:block;width:100%;height:calc(100dvh - 92px);min-height:600px;border:0;background:#171d21}
.game-transition{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center;padding:28px;pointer-events:none;opacity:0;transition:opacity .18s ease}
.game-surface[data-loading=true] .game-transition{opacity:1}.game-transition h2{font-size:clamp(28px,4vw,54px)}
.game-failure{position:relative;text-align:center;padding:100px 24px}.game-failure button{margin-top:24px}
.game-connection{padding:12px 4%;color:#ffdbc1;background:#3b3028;font-size:14px}
body[data-game-open=true] main{display:none}
@media(max-width:900px){.game-room-header{flex-wrap:wrap;padding:16px 5%;gap:12px}.game-room-header .brand{font-size:18px}.game-room-actions{width:100%}.game-room-actions button{flex:1}.game-room-header>div{gap:12px}#game-frame{height:calc(100dvh - 142px);min-height:520px}.game-viewport{min-height:calc(100dvh - 142px)}}
@media(max-width:600px){.game-room-header .brand span{display:none}.game-room-header .brand img{width:30px;height:30px}.game-room-header>div>span{font-size:13px}#active-room-code{font-size:21px}.game-transition p{max-width:25ch}.game-room-actions:empty{display:none}}

.room-site-footer{padding:30px 5%;border-top:1px solid #43505780;display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;color:var(--quiet);font-size:12px}.room-site-footer nav{display:flex;gap:22px;flex-wrap:wrap}.room-site-footer a:hover{text-decoration:underline}body[data-view=phone] .room-site-footer{display:none}

/* Compact, nonmodal room preferences. Native popover handles outside click and Escape. */
.settings-toggle{position:fixed;right:20px;bottom:20px;z-index:8;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 14px;border-radius:8px;background:#202a30;color:var(--ink);font-size:13px;box-shadow:0 6px 20px #080d1233}
.settings-toggle:hover{background:#303c43}
.room-settings{position:fixed;inset:auto 20px 76px auto;margin:0;width:min(280px,calc(100vw - 32px));max-height:calc(100dvh - 108px);overflow:auto;padding:20px;border:0;border-radius:12px;background:#202a30;color:var(--ink);box-shadow:0 16px 48px #080d1280;font-size:14px}
.room-settings::backdrop{background:transparent}
.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}
.settings-heading h2{font-size:20px;line-height:1.2;letter-spacing:-.3px}
.room-settings .settings-close{display:grid;place-items:center;min-width:44px;min-height:44px;margin:-10px -10px -10px 0;padding:0;background:none;color:var(--quiet)}
.room-settings button:not(.settings-close){width:100%;min-height:44px;padding:10px 12px;text-align:left;border-radius:6px;background:#303c43;color:var(--ink);font-size:14px}
.room-settings button:not(.settings-close):hover{background:#3d4b52}
.room-settings button[aria-pressed=true]{background:#414546;color:#f3dfc4;box-shadow:inset 0 0 0 1px var(--amber)}
.room-settings .sound-volume{display:flex;justify-content:space-between;gap:20px;padding:10px 0 14px;color:var(--quiet);font-size:13px}
.room-settings .sound-volume input{width:148px;min-height:44px;margin:0;accent-color:var(--amber)}
.settings-motion{display:grid;gap:8px;padding-top:16px;border-top:1px solid #46545b}
.room-settings #sound-status{position:static;display:block;width:auto;height:auto;margin:16px 0 0;padding:0;overflow:visible;clip-path:none;white-space:normal;color:var(--quiet);font-size:12px;line-height:1.5}
@media(max-width:600px){.settings-toggle{right:16px;bottom:16px;padding:10px 12px}.room-settings{right:16px;bottom:72px}}

/* During play, settings belong in the room header, clear of private game actions. */
body[data-game-open=true] .global-settings-toggle{display:none}
.music-quick-toggle{position:fixed;right:154px;bottom:20px;z-index:40;min-height:44px;min-width:108px;justify-content:center}
body[data-game-open=true] .music-quick-toggle{right:20px;bottom:20px}
body[data-view=phone] .music-quick-toggle{display:none}
@media(max-width:720px){.music-quick-toggle{right:130px;bottom:12px;min-width:102px}body[data-game-open=true] .music-quick-toggle{bottom:12px;right:12px}}
.game-settings-toggle{position:static;flex:none;width:44px;justify-content:center;padding:10px;box-shadow:none}
.game-settings-toggle span{display:none}
body[data-game-open=true] .room-settings{top:76px;bottom:auto}

#computer-controls summary{cursor:pointer;color:var(--amber);font-size:14px;min-height:44px;display:flex;align-items:center}#computer-controls[open]{display:grid;gap:12px}#computer-controls summary:focus-visible{outline:2px solid var(--amber);outline-offset:4px}

/* Mafia continues at this table. The isolated public UI sits over the original
   canvas; the private phone stays opaque. Other games retain their own surface. */
.game-room-scene { display:none; }
.game-surface[data-game=nightfall][data-audience=stage] .game-room-scene { display:block; position:absolute; inset:0; overflow:hidden; }
.game-room-scene canvas { display:block; width:100%; height:100%; }
.game-surface[data-game=nightfall][data-audience=stage] #game-frame { position:relative; background:transparent; }
.game-surface[data-game=nightfall][data-audience=stage] .game-viewport { isolation:isolate; }
.game-surface[data-game=nightfall][data-audience=stage] .game-transition { z-index:1; background:#171d21e8; }
@media(max-width:720px) {
  .game-surface[data-game=nightfall][data-audience=stage] .game-room-scene { height:410px; }
  .game-surface[data-game=nightfall][data-audience=stage] #game-frame { min-height:1100px; }
}
