:root{--player-color:#ffad35;--muted:#5b4865}.controller-app{max-width:520px;margin:auto;padding:0 max(18px,env(safe-area-inset-right)) max(25px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}.masthead{display:flex;align-items:center;gap:14px;height:67px;border-bottom:2px solid #29183d30;margin-bottom:22px}.wordmark{font:25px Russo;transform:rotate(-4deg)}.network{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700}.network-dot{display:none}.network[data-status=online] .network-dot{display:block;width:7px;height:7px;border-radius:50%;background:#20856b;border:1px solid var(--ink)}.room-label{font-size:12px}.room-label strong{display:block;font-size:13px}.panel{padding:23px;background:var(--paper);border:var(--line);border-radius:15px;box-shadow:4px 5px 0 var(--ink)}.button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:51px;width:100%;border:var(--line);border-radius:10px;font-size:16px;line-height:1.3;font-weight:700;padding:13px 14px}.button-ink{background:var(--ink);color:var(--paper);box-shadow:3px 4px 0 #a88aee}.button-paper{background:var(--paper)}.button:disabled{opacity:.5}.join-hero h1{font-size:34px}.join-hero .actor{width:97px;height:115px}.join-panel h2{font-size:25px}.field-label{display:block;font-size:14px;font-weight:700;margin:20px 0 7px}input{font-size:18px;min-height:50px;width:100%;border:2px solid var(--ink);padding:12px;background:#fff9e9;border-radius:8px}.room-input{font-family:Russo;letter-spacing:4px;font-size:26px}.join-submit{margin-top:22px}.form-error{padding:12px;background:#ffded5;border:1px solid #a62e44;border-radius:8px;font-size:14px;margin:14px 0}.device-note{font-size:13px;line-height:1.6;margin-top:18px}.display-help{font-size:13px;margin:21px 0;line-height:1.6}.display-help summary{text-decoration:underline;text-underline-offset:4px;cursor:pointer}.display-help p{margin:12px 0}.display-help button{margin-top:15px}.identity{display:flex;align-items:center;gap:10px;min-width:0}.identity .actor{width:77px;height:95px}.identity h1{font-size:25px;margin-bottom:4px}.identity strong{font-size:16px;display:block}.identity div>span{font-size:13px;display:block}.seat-badge{display:inline-grid;place-items:center;font:18px Russo;border:2px solid var(--ink);border-radius:8px;background:var(--player-color);width:33px;height:33px;flex-shrink:0}.lobby-panel .seat-badge{position:absolute;left:0;bottom:0}.lobby-panel .identity{position:relative;padding-bottom:18px;border-bottom:2px solid #29183d66}.text-button{background:none;border:0;font-size:13px;padding:8px 0;min-height:35px}.phone-mode-rules{background:#e4d7fb;border:2px solid var(--ink);border-radius:10px;padding:16px;margin:19px 0}.phone-mode-rules h2{font-size:22px}.phone-mode-rules p{font-size:14px;line-height:1.55;margin:9px 0}.phone-mode-rules>strong{font-size:13px;display:block}.phone-mode-rules details{font-size:12px;margin-top:12px}.phone-preflight{padding:12px;background:#ffe49e;border-left:5px solid var(--ink);font-size:15px;line-height:1.5;margin:16px 0 20px}.waiting-copy{font-size:13px;line-height:1.55;margin-top:17px}.bottom-note{font-size:12px;margin-top:17px}.crew-panel{margin-top:18px;font-size:14px}.crew-panel summary{cursor:pointer;font-weight:700}.crew-list{list-style:none;padding:0;margin:16px 0 0}.crew-row{display:flex;gap:11px;align-items:center;padding:10px 0;border-bottom:1px solid #29183d44}.crew-dot{display:grid;place-items:center;border:1px solid var(--ink);border-radius:6px;background:var(--crew-color);width:27px;height:27px;font-family:Russo}.crew-person{flex:1}.crew-name{display:block;font-weight:700;font-size:14px;overflow-wrap:anywhere}.crew-status{display:block;font-size:12px}.crew-ready{font-size:12px}.is-offline{opacity:.65}.ready-button.is-ready{background:#195d54}.selection-note{font-size:12px;line-height:1.5;margin-top:15px}dialog{background:var(--paper);color:var(--ink);border:3px solid var(--ink);border-radius:16px;padding:19px;width:min(95vw,480px);max-height:90dvh}dialog::backdrop{background:#29183d99}dialog .row{justify-content:space-between}dialog h2{font-size:24px}.character-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:20px}.character-card{border:2px solid var(--ink);border-radius:9px;background:#e3d4f8;min-width:0;padding:7px 2px;display:flex;flex-direction:column;align-items:center;min-height:115px}.character-card[aria-pressed=true]{background:#a0ddc8}.character-card:disabled{opacity:.5}.character-name{font-weight:700;font-size:12px}.character-state{font-size:10px;line-height:1.3;margin-top:4px;max-width:100%;overflow-wrap:anywhere}.portrait{height:65px;display:grid;place-items:center}.portrait canvas{height:65px;max-width:65px;object-fit:contain}.portrait-number{font:30px Russo;color:var(--ink)}.recover-panel{padding:20px 0;text-align:center;line-height:1.6}.loader{display:inline-block;width:30px;height:30px;border:3px solid var(--ink);border-top-color:transparent;border-radius:50%;animation:spin 1s linear infinite}.notice{position:fixed;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--ink);color:var(--paper);border:2px solid var(--paper);padding:13px 17px;border-radius:10px;font-size:14px;z-index:100;max-width:92vw;width:max-content}.results-panel{text-align:center}.results-panel h1{font-size:30px}.personal-place{position:relative;display:flex;align-items:center;justify-content:center;margin:17px 0}.personal-place .actor{height:155px;width:145px}.result-badge{position:absolute;right:8px;bottom:5px;font:45px Russo;background:var(--mint);border:3px solid var(--ink);border-radius:15px;width:75px;height:75px;display:grid;place-items:center;transform:rotate(7deg)}.result-summary{font-size:15px;line-height:1.6}.round-score{margin:18px 0;gap:25px}.round-score strong{font:29px Russo;display:block}.round-score span{font-size:12px}.results-list{list-style:none;padding:0;text-align:left}.result-row{padding:11px 3px;border-bottom:1px solid #29183d44;display:grid;grid-template-columns:25px minmax(65px,1fr) minmax(75px,1fr);align-items:center;gap:9px;font-size:13px}.result-place{font-family:Russo}.result-time{font-size:13px;overflow-wrap:anywhere}.result-row.is-self{background:#ffe399}.result-name{font-weight:700;overflow-wrap:anywhere}.all-result-details{text-align:left;font-size:13px;margin:20px 0}.all-result-details summary{cursor:pointer;font-weight:700}.results-panel .next-box{text-align:left}.results-panel .waiting-copy{margin-bottom:18px}#personal-standing{font-size:14px;line-height:1.6}.ended-panel{text-align:center}.ended-panel h1{font-size:30px}.ended-panel .actor{height:160px;width:140px;margin:20px 0}.ended-panel p{font-size:15px;line-height:1.6;margin:20px 0}.ended-panel .button+.button{margin-top:15px}.wait-view{min-height:calc(100dvh - 110px);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:15px 0 30px}.wait-view .actor{height:170px;width:150px;margin-bottom:24px}.wait-view h1{font-size:30px;margin-bottom:18px}.wait-view p{font-size:16px;line-height:1.6}.wait-view #wait-detail{font-size:14px;margin-top:20px}.wait-view .button{margin-top:25px}.waiting-state .main-content>.screen{display:none!important}.waiting-state .wait-view{display:flex!important}.waiting-state.is-game{position:static;overflow:auto;touch-action:auto}.waiting-state.is-game .controller-app{height:auto;min-height:100dvh}.waiting-state.is-game .main-content{display:block}
html:has(body.is-game:not(.waiting-state)){overflow:hidden;overscroll-behavior:none}body.is-game:not(.waiting-state){position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none;touch-action:none}.is-game .controller-app{height:100dvh;max-width:700px;display:flex;flex-direction:column;padding-bottom:max(25px,env(safe-area-inset-bottom))}.is-game .masthead{height:47px;min-height:47px;margin-bottom:13px;flex-shrink:0}.is-game .wordmark{font-size:23px}.is-game .room-label{display:none}.is-game .main-content{min-height:0;flex:1;display:flex}.game-screen{display:flex;flex-direction:column;flex:1;min-height:0;position:relative}.game-topline{display:flex;align-items:center;gap:10px;border:2px solid var(--ink);border-radius:10px;padding:8px;background:var(--paper);flex-shrink:0;min-height:60px}.game-identity{flex:1;min-width:0;gap:7px}.game-identity .actor{width:32px;height:38px}.game-identity .seat-badge{width:28px;height:29px;font-size:16px}.game-identity strong{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}.game-identity div>span{font-size:12px}.round-clock{margin-left:auto;white-space:nowrap;font:29px Russo;display:flex;align-items:baseline;gap:3px}.round-clock small{font:12px Golos}.round-clock.is-urgent{color:#a12e49}.life-tag{display:none}.mode-summary{display:flex;flex-direction:column;gap:4px;padding:12px 0 4px;flex-shrink:0}.mode-summary>strong{font:22px Russo}.mode-summary>span{font-size:13px;line-height:1.4}.mode-summary details{font-size:12px}.mode-summary details p{position:absolute;left:0;right:0;z-index:20;padding:13px;border:2px solid var(--ink);border-radius:9px;background:var(--paper);max-height:40dvh;overflow:auto;font-size:14px;line-height:1.6}.mode-summary summary{cursor:pointer}.mode-meter{display:flex;gap:8px;align-items:center;font-size:13px}.mode-meter progress{width:120px;height:12px;accent-color:#8050bc}.controls{flex:1;min-height:0;display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.3fr);gap:16px;align-items:center;padding:12px 0 24px;margin:10px 0 17px;background:linear-gradient(transparent,#ffe9a960);border-radius:25px}.joystick-area{display:flex;align-items:center;justify-content:center;flex-direction:column;min-width:0;gap:12px}.joystick{position:relative;width:min(100%,180px);aspect-ratio:1;border:3px solid var(--ink);border-radius:50%;background:var(--paper);box-shadow:4px 5px 0 var(--ink);touch-action:none;user-select:none;-webkit-user-select:none}.joystick:before{content:'';position:absolute;inset:15%;border:2px dashed #29183d50;border-radius:50%}.joystick-axis{position:absolute;background:#29183d30;pointer-events:none}.axis-horizontal{height:2px;left:10%;right:10%;top:50%}.axis-vertical{width:2px;top:10%;bottom:10%;left:50%}.joystick-knob{position:absolute;top:31%;left:31%;width:38%;height:38%;border:3px solid var(--ink);border-radius:50%;background:var(--player-color);box-shadow:0 4px 0 #29183d77;pointer-events:none;will-change:transform}.control-caption{font-size:12px;font-weight:700;text-align:center;line-height:1.4}.action-area{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}.action-button{height:155px;max-height:32dvh;min-height:105px;min-width:0;border:3px solid var(--ink);border-radius:17px;box-shadow:4px 5px 0 var(--ink);padding:10px 5px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;background:#bde1ea;touch-action:none;user-select:none;-webkit-user-select:none;position:relative}.push-button{background:#ff9867}.action-button .icon{width:33px;height:33px;stroke-width:2.5;pointer-events:none}.action-button strong{font-size:16px;line-height:1.25;text-align:center;overflow-wrap:normal;hyphens:none;pointer-events:none}.action-button>span{font-size:13px;line-height:1.3;text-align:center;pointer-events:none}.action-button:after{content:'';position:absolute;bottom:6px;left:10%;right:10%;height:4px;background:var(--ink);transform:scaleX(var(--cooldown,0));transform-origin:left;border-radius:4px}.action-button.is-held{transform:translate(3px,4px);box-shadow:1px 1px 0 var(--ink)}.controls.is-disabled .action-button,.controls.is-disabled .joystick{opacity:.5}.controls.is-disabled{pointer-events:none}.controls:has(#joystick-area[hidden]){grid-template-columns:1fr}.controls:has(#joystick-area[hidden]) .action-area{max-width:450px;width:100%;margin:auto}.controls:has(#push-button[hidden]) .action-area{grid-template-columns:1fr}.game-footer{border-top:2px solid var(--ink);padding-top:12px;flex-shrink:0;font-size:13px;line-height:1.5}.game-footer>strong{display:block}.game-footer button{font-size:12px}.game-callout{position:absolute;inset:35% 5% auto;z-index:15;padding:18px;text-align:center;background:var(--paper);border:3px solid var(--ink);border-radius:15px;pointer-events:none;box-shadow:5px 5px var(--ink)}.game-callout strong{display:block;font:25px Russo}.game-callout span{display:block;font-size:14px;line-height:1.5;margin-top:10px}.game-callout.is-countdown strong{font-size:55px}.mode-signal{position:relative;height:62px;flex-shrink:0;width:180px;margin:0 auto;display:grid;place-items:center}.beat-ring{position:absolute;width:30px;height:30px;border:4px solid var(--ink);border-radius:50%;transform:scale(var(--beat-scale,2));opacity:.6}.mode-signal>strong{z-index:1;transform:translateY(25px);font-size:13px;background:var(--paper);padding:3px 8px;border-radius:6px}.mode-signal.color-signal{height:36px;border:2px solid var(--ink);border-radius:8px;font-size:14px;width:max-content;max-width:100%;padding:3px 12px;margin:5px auto}.mode-signal.color-signal>strong{transform:none;background:none}.is-game .controls:has(.action-button[hidden]){margin-top:7px}
@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:350px) and (orientation:portrait){.controller-app{padding-left:13px;padding-right:13px}.panel{padding:18px}.join-hero h1{font-size:29px}.join-hero .actor{width:75px;height:95px}.game-identity strong{font-size:15px;max-width:105px}.game-identity div>span{font-size:11px}.game-identity .actor{display:none}.is-game .masthead{height:40px;min-height:40px;margin-bottom:9px}.mode-summary{padding-top:9px}.mode-summary>strong{font-size:19px}.mode-summary>span{font-size:12px}.action-button{height:120px;min-height:90px;gap:6px}.action-button{padding-left:4px;padding-right:4px}.action-button strong{font-size:12px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;hyphens:auto}.action-button>span{font-size:12px;max-width:100%;overflow-wrap:anywhere}.controls{gap:12px;margin:5px 0 10px;padding:7px 0 15px}.control-caption{font-size:11px}.game-footer{font-size:12px;padding-top:9px}.game-footer>strong{max-height:38px;overflow:auto}.game-footer button{min-height:30px}.mode-summary details{display:none}.character-name{font-size:11px}.portrait canvas{max-width:55px}.round-clock{font-size:25px}.wait-view h1{font-size:27px}.identity h1{font-size:22px}}
@media(orientation:landscape) and (max-height:500px){.is-game .controller-app{max-width:none;padding-left:max(25px,env(safe-area-inset-left));padding-right:max(25px,env(safe-area-inset-right));padding-bottom:max(18px,env(safe-area-inset-bottom))}.is-game .masthead{height:37px;min-height:37px;margin-bottom:7px}.game-topline{min-height:43px;padding:4px 10px}.game-identity .actor{height:29px;width:26px}.game-identity div>span{display:none}.game-identity strong{font-size:16px}.round-clock{font-size:25px}.mode-summary{position:absolute;top:4px;left:31%;right:20%;text-align:center;align-items:center;padding:4px 0;pointer-events:none;z-index:2}.mode-summary>strong{font-size:16px;line-height:1.25}.mode-summary>span{font-size:12px;line-height:1.2;max-height:29px;overflow:hidden}.mode-summary details,.mode-meter{display:none}.controls{grid-template-columns:1fr 1.3fr;gap:16%;padding:10px 3% 12px;margin:0;background:none}.joystick{width:min(43dvh,160px)}.control-caption{font-size:12px}.action-button{height:min(42dvh,170px);max-height:none;min-height:85px;gap:6px}.action-button strong{font-size:18px}.action-button>span{font-size:13px}.game-footer{font-size:12px;padding-top:7px;display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:28px}.game-footer>strong{max-width:80%;font-size:11px;max-height:31px;overflow:auto}.game-footer button{white-space:nowrap;min-height:30px;padding:0}.mode-signal{position:absolute;top:85px;left:calc(50% - 70px);width:140px;height:50px;pointer-events:none}.mode-signal.color-signal{top:85px;width:140px;font-size:12px;margin:0}.controls:has(#joystick-area[hidden]){max-width:570px;width:100%;margin:auto}.wait-view{min-height:calc(100dvh - 90px)}.wait-view .actor{height:100px;width:85px;margin:8px}.wait-view h1{font-size:25px;margin-bottom:10px}.wait-view p{font-size:14px}.waiting-state.is-game .main-content{display:block}}
@media(orientation:landscape) and (max-height:350px){.is-game .masthead{height:29px;min-height:29px;margin-bottom:4px}.game-topline{min-height:35px}.mode-summary{top:2px}.mode-summary>strong{font-size:14px}.mode-summary>span{font-size:11px}.joystick{width:36dvh}.action-button{height:36dvh;min-height:77px;gap:4px}.action-button .icon{height:24px;width:24px}.action-button strong{font-size:16px}.action-button>span{font-size:12px}.control-caption{font-size:11px}.game-footer{padding-top:4px}.mode-signal{top:65px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.life-tag[data-life=recovering] .life-dot{background:var(--yellow)}.game-callout.is-recovering{border-style:dashed}
/* Rules stay reachable in the masthead, independent of the compact control layout. */
.is-game .mode-help-button{pointer-events:auto;flex:0 0 auto;min-height:34px;padding:5px 9px;border:2px solid var(--ink);border-radius:8px;background:var(--paper);font-size:11px;font-weight:700;line-height:1.15;white-space:nowrap}
.mode-help-dialog{--mode-help-gutter:12px;--mode-help-max-width:520px;position:fixed;inset:0;z-index:100;margin:auto;padding:0;width:min(var(--mode-help-max-width),calc(100vw - var(--mode-help-gutter)*2));max-width:none;max-height:calc(100vh - var(--mode-help-gutter)*2);max-height:calc(100dvh - var(--mode-help-gutter)*2);border:3px solid var(--ink);border-radius:16px;background:var(--paper);color:var(--ink);overflow:hidden;box-shadow:4px 4px 0 var(--ink)}
.mode-help-dialog[open]{display:flex;flex-direction:column}
.mode-help-dialog::backdrop{background:rgba(41,24,61,.65)}
.mode-help-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:2px solid var(--ink);background:#e5d5ff;flex:0 0 auto}
.mode-help-head>div{min-width:0}.mode-help-head h2{font-size:20px;line-height:1.2;overflow-wrap:anywhere;margin-top:5px}
.mode-help-close{flex:0 0 auto;min-height:44px;padding:8px 12px;border:2px solid var(--ink);border-radius:8px;background:var(--paper);font-size:12px;font-weight:700}
.mode-help-content{min-height:0;overflow:auto;flex:1 1 auto;padding:14px 18px;overscroll-behavior:contain;touch-action:pan-y;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.mode-help-content h3{font-size:14px;margin:0 0 7px}.mode-help-content h3:not(:first-child){margin-top:18px}.mode-help-content ul,.mode-help-content ol{margin:0;padding-left:23px}.mode-help-content li+li{margin-top:8px}
.mode-help-note{flex:0 0 auto;padding:10px 16px;border-top:2px solid var(--ink);background:#ffdf7e;font-size:11px;line-height:1.4}
.mode-help-button:focus-visible,.mode-help-close:focus-visible,.mode-help-content:focus-visible{outline:3px solid #07566b;outline-offset:-5px}
@media(orientation:landscape) and (max-height:370px){.is-game .mode-help-button{min-height:28px;padding-top:3px;padding-bottom:3px}.mode-help-head{padding:9px 12px}.mode-help-head h2{font-size:17px}.mode-help-note{padding:7px 12px}}
@media(forced-colors:active){.mode-help-dialog,.mode-help-head,.mode-help-note,.is-game .mode-help-button,.mode-help-close{background:Canvas;color:CanvasText;border-color:CanvasText;box-shadow:none}.mode-help-button:focus-visible,.mode-help-close:focus-visible,.mode-help-content:focus-visible{outline-color:Highlight}.mode-help-dialog::backdrop{background:Canvas;opacity:.7}}

.action-button:disabled{opacity:.48}.is-game .mode-help-button{font-size:12px;min-height:36px}.mode-help-note{font-size:12px}.mode-help-head h2{font-family:Russo}.mode-help-content h3{font-family:Golos;font-weight:700}@media(max-width:350px){.is-game .wordmark{font-size:18px}.is-game .masthead{gap:8px}.is-game .network{font-size:11px}.is-game .mode-help-button{font-size:11px;padding:5px 7px}}

@media(orientation:landscape) and (max-height:350px){.is-game .mode-help-button{min-height:27px;padding:2px 7px;font-size:11px}}
