@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');
:root{color-scheme:dark;--cream:#fff0cf;--orange:#ffb457;--purple:#c692ff;--muted:#b4a8c9;--ink:#130d25}
*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden;background:#100b21 url('haunted-pond.webp') center/cover fixed;color:var(--cream);font-family:'Space Grotesk',sans-serif}body:before{content:"";position:fixed;inset:0;background:linear-gradient(#10091dcc,#150a2777 55%,#10091de8);pointer-events:none;z-index:-1}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #806392;background:#281d3b;color:var(--cream);padding:11px 18px;border-radius:9px;font-weight:700;transition:transform .15s,background .15s}button:hover:not(:disabled){background:#443055;transform:translateY(-2px)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--orange);outline-offset:3px}button:disabled{opacity:.45;cursor:default}.primary{background:#a858e7;border-color:#dba2ff;box-shadow:0 3px 0 #573171}.primary:hover:not(:disabled){background:#b971f1}.danger{background:#a22f4b;border-color:#f47c87}.quiet{background:#180f2780;border-color:#6a507b;font-size:12px;padding:8px 12px}.hidden{display:none!important}header{height:64px;padding:10px 28px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ffffff18;background:#100b22cc}.brand{font-weight:700;letter-spacing:1px;text-decoration:none;color:var(--cream);font-size:18px}.brand span{color:var(--orange)}.brand small{display:block;font:9px 'Space Mono',monospace;color:var(--muted);letter-spacing:2.2px;margin-top:3px}.eyebrow{font:700 11px 'Space Mono',monospace;letter-spacing:2px;color:var(--orange)}input{background:#120e21;border:1px solid #7f648e;border-radius:8px;color:var(--cream);padding:12px;min-width:0}input::placeholder{color:#a297ae}.error{color:#ffb2b2;margin:4px 0;font-size:12px}.sprite{display:block;background:url('halloween-ducks-20.webp');background-size:500% 400%;background-position:var(--sx) var(--sy);width:100px;height:100px;image-rendering:pixelated}
#landing{height:calc(100dvh - 64px);display:grid;place-items:center}.welcome{width:min(520px,94vw);text-align:center;padding:20px 28px;border:1px solid #d79cff44;background:linear-gradient(135deg,#20132bee,#140e25e8);border-radius:20px;box-shadow:0 30px 100px #0008}.welcome h1{font-size:clamp(36px,6vh,68px);line-height:1;margin:20px 0 12px;letter-spacing:-3px}.welcome h1 em{font-style:normal;color:var(--orange)}.welcome p{color:#d4c5df;line-height:1.5;font-size:14px}.landing-ducks{display:flex;justify-content:center;margin:5px 0}.landing-ducks .sprite{width:90px;height:90px}.welcome>.primary{width:100%}.join-row{display:flex;gap:8px;margin:12px 0}.join-row input{width:55%;text-transform:uppercase;letter-spacing:3px}.join-row button{flex:1}.rehearsal{display:flex;align-items:center;justify-content:center;gap:8px;font-size:11px;margin-top:18px}.rehearsal select{background:#271c37;border:1px solid #705882;padding:6px;border-radius:6px}.welcome>small{color:var(--muted);font-size:10px}
#game{height:calc(100dvh - 64px);max-width:1600px;margin:auto;padding:0 24px 12px;display:flex;flex-direction:column;gap:8px}.room-strip{display:flex;gap:16px;align-items:center;height:38px;flex-shrink:0;font:11px 'Space Mono',monospace;color:var(--muted)}#room-code{margin-left:auto}.question{position:relative;text-align:center;flex-shrink:0;border:1px solid #de9c44;border-radius:12px;padding:10px 80px;background:#1d102deb;box-shadow:0 3px 0 #6b3a25}.question h2{font-size:clamp(15px,1.6vw,23px);line-height:1.25;margin:5px 0;min-height:29px}#timer{position:absolute;right:16px;top:50%;transform:translateY(-50%);color:var(--orange);font:700 17px 'Space Mono',monospace}.steps{display:flex;gap:14px;justify-content:center;align-items:center;font:700 10px 'Space Mono',monospace;flex-shrink:0}.steps span{padding:6px 14px;border:1px solid #6c4a87;border-radius:6px;background:#1b122b;color:#9c87b3}.steps span.active{color:var(--cream);border-color:var(--orange);background:#4f2c48}.steps b{color:#8e6d9d}
#arena{position:relative;flex:1;min-height:0}.fire{position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);font-size:90px;color:#ffc653;text-shadow:0 0 30px #ff821c;animation:fire 2s infinite alternate;pointer-events:none}#duck-grid{height:100%;position:relative}.duck{position:absolute;width:clamp(130px,16vw,230px);height:46%;max-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;transform:translate(-50%,-50%);transition:left .6s,top .6s;min-height:0}.bubble{background:#fff0d9;color:#2e2235;border:2px solid #e9c89b;border-radius:12px;padding:8px 11px;font-size:clamp(11px,1.05vw,14px);line-height:1.3;min-height:43px;width:100%;position:relative;box-shadow:3px 4px 0 #140b27a8;overflow-wrap:anywhere;flex-shrink:0}.bubble:after{content:"";position:absolute;bottom:-9px;left:48%;border:5px solid transparent;border-top-color:#fff0d9}.bubble.pending{background:#21152cd9;border-color:#624673;color:#baa3ce;text-align:center;font-style:italic}.bubble.pending:after{border-top-color:#624673}.duck .sprite{width:clamp(64px,9vh,112px);height:clamp(64px,9vh,112px);flex-shrink:1;min-height:40px;min-width:40px;aspect-ratio:1;margin-top:4px;filter:drop-shadow(0 6px 3px #0008)}.nameplate{font:700 11px 'Space Mono',monospace;background:#21142ce8;border:1px solid #987050;padding:4px 10px;border-radius:5px;white-space:nowrap}.self .nameplate{border-color:#acbaff;color:#c6d0ff}.seat-button{padding:0;border:0;background:transparent;display:flex;align-items:center;flex-direction:column;max-height:70%;min-height:0}.seat-button:hover:not(:disabled){background:transparent;transform:translateY(-3px)}.can-vote .sprite{filter:drop-shadow(0 0 7px #d589ff)}.selected .nameplate{background:#8341ae;border-color:#f7d881}.vote-label{font:9px 'Space Mono',monospace;color:var(--orange);height:15px;margin-top:3px}.condemned{animation:shake .45s 3 .8s}.condemned.innocent .sprite{animation:depart 2s 3s forwards}.killer .sprite{filter:drop-shadow(0 0 15px #ff1c50);animation:monster .5s infinite alternate}.killer .nameplate{background:#8d163a;border-color:#ff8b9c}.lost .duck:not(.killer) .sprite{animation:depart 2s 4s forwards}.lobby{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:#160e28b8;border-radius:16px}.lobby p{max-width:360px;color:#c9b8d8;font-size:14px}.lobby h2{font-size:28px}
.controls{flex-shrink:0;border:1px solid #806293;background:#1b102beb;border-radius:12px;padding:12px 18px;min-height:92px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.status{flex:1;min-width:180px}.status strong{display:block;font-size:16px;color:var(--orange)}.status span{display:block;color:#c9bbd7;font-size:12px;margin-top:4px}.controls form{display:flex;gap:8px;flex:1.4;min-width:260px}.controls form input{flex:1}.control-buttons{display:flex;gap:8px}.controls .error{flex-basis:100%}#ballots{flex-shrink:0;display:flex;gap:5px;justify-content:center;flex-wrap:wrap;font:10px 'Space Mono',monospace;min-height:23px}#ballots span{background:#231331eb;border:1px solid #796089;border-radius:4px;padding:4px 7px;animation:ballot .4s both;animation-delay:var(--delay)}dialog{background:#24162f;border:1px solid #b48aca;border-radius:18px;color:var(--cream);padding:28px;width:min(510px,92vw);max-height:85dvh;box-shadow:0 25px 100px #000a}dialog::backdrop{background:#090413c9;backdrop-filter:blur(5px)}dialog p,dialog li{font-size:14px;line-height:1.6;color:#d7c7e2}dialog li{margin:8px 0}dialog .close{float:right;padding:2px 10px}#vote-modal>div{display:flex;gap:10px}#vote-answer{font-style:italic;color:var(--orange)}@keyframes fire{to{opacity:.65;transform:translate(-50%,-50%) scale(.9)}}@keyframes ballot{from{opacity:0;transform:translateY(-15px)}to{opacity:1;transform:none}}@keyframes shake{25%{margin-left:-7px}75%{margin-left:7px}}@keyframes depart{to{opacity:.08;transform:translateY(-30px);filter:grayscale(1)}}@keyframes monster{to{transform:scale(1.08);filter:drop-shadow(0 0 25px #ff245b)}}@media(max-width:800px){header{height:54px;padding:8px 15px}.brand{font-size:14px}.brand small{font-size:8px}#game{height:calc(100dvh - 54px);padding:0 10px 8px;gap:6px}#landing{height:calc(100dvh - 54px)}.room-strip{height:32px;font-size:9px;gap:8px}.question{padding:8px 45px 8px 10px}.question h2{font-size:15px;min-height:36px}.question .eyebrow{font-size:9px}#timer{right:9px;font-size:13px}.steps{gap:5px}.steps span{padding:4px 10px;font-size:9px}.duck{width:29%;height:32%;max-height:none}.duck .sprite{width:clamp(40px,8vh,80px);height:clamp(40px,8vh,80px)}.bubble{font-size:11px;line-height:1.2;padding:6px;min-height:35px;border-radius:8px}.nameplate{font-size:9px;padding:3px 6px}.vote-label{font-size:8px;height:11px}.controls{padding:8px 10px;gap:7px;min-height:90px}.controls form{min-width:100%;flex-basis:100%}.controls form input{padding:9px;font-size:16px}.controls button{padding:9px 12px;font-size:12px}.status strong{font-size:14px}.status span{font-size:11px}.control-buttons{margin-left:auto}#ballots{font-size:8px;gap:3px}#ballots span{padding:3px 4px}.fire{font-size:50px;opacity:.4}.welcome{padding:18px}.welcome h1{margin-top:12px}.welcome p{font-size:12px}}
@media(max-height:650px){header{height:45px}#game,#landing{height:calc(100dvh - 45px)}.room-strip{height:25px}.question{padding-top:4px;padding-bottom:4px}.question h2{font-size:14px;min-height:20px}.steps span{padding:2px 8px}.controls{min-height:68px;padding:6px 10px}.duck .sprite{width:50px;height:50px}.bubble{font-size:10px;padding:4px}.welcome h1{font-size:34px;margin:10px 0}.landing-ducks .sprite{width:60px;height:60px}.welcome{padding:10px 20px}.welcome p{margin:8px 0}.rehearsal{margin-top:8px}}
.bubble>span{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.sprite{background-size:500% var(--sheet-height,362%)}.duck .sprite{flex-shrink:0}.seat-button{flex-shrink:0;max-height:none}.vote-label,.nameplate{flex-shrink:0}
@media(max-height:650px){.bubble>span{-webkit-line-clamp:2}}
@media(min-width:801px){#duck-grid[data-count="9"] .duck{width:14.5vw;max-width:210px;height:40%}#duck-grid[data-count="9"] .sprite{width:60px;height:60px}}
.won .fire,.lost .fire{font:700 22px 'Space Mono',monospace;border:2px solid currentColor;padding:14px 20px;border-radius:8px;background:#1e102ee8;z-index:2;animation:verdict .6s both;box-shadow:0 0 60px #f58a3366;pointer-events:none}.won .fire{color:#fdd879}.lost .fire{color:#ff839f;text-shadow:0 0 25px #fd1744}.lost{box-shadow:inset 0 0 100px #91052b55;border-radius:18px}@keyframes verdict{from{opacity:0;scale:1.6;rotate:-8deg}to{opacity:1;scale:1;rotate:-5deg}}
.won .fire,.lost .fire{display:none}#verdict{height:28px;text-align:center;color:var(--orange);font:700 17px 'Space Mono',monospace;letter-spacing:3px;animation:ballot .7s both;flex-shrink:0}
.in-lobby>.question,.in-lobby>.steps,.in-lobby #copy-link,.in-lobby #arena>.fire,.in-lobby #duck-grid{display:none!important}
.in-lobby>.controls{min-height:0;padding:0;border:0;background:transparent}.in-lobby>.controls>.status,.in-lobby>.controls>.control-buttons{display:none}.in-lobby .error:empty{display:none}
.in-lobby .room-strip{height:48px}.in-lobby #arena{display:flex;align-items:center}
.lobby{position:relative;inset:auto;width:100%;height:min(100%,680px);display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:clamp(20px,4vw,64px);padding:clamp(18px,3vw,44px);text-align:left;border:1px solid #8c63aa77;background:linear-gradient(135deg,#21122fe8,#100b20e8);box-shadow:0 25px 80px #0007;overflow:hidden}
.invite-board{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;min-width:0}.lobby .invite-board h2{font-size:clamp(44px,5.2vw,76px);line-height:.95;letter-spacing:-3px;margin:16px 0}.invite-board h2 em{font-style:normal;color:var(--orange)}.lobby .invite-board p{font-size:13px;line-height:1.5;margin:0 0 22px;color:#c8b6d6}
.code-ticket{width:100%;border:1px dashed #d0a36d;background:#ffdda50b;border-radius:12px;padding:16px;text-align:center;position:relative}.code-ticket>span{display:block;font:10px 'Space Mono',monospace;letter-spacing:3px;color:var(--orange)}#big-room-code{display:block;font:700 clamp(32px,4.5vw,64px) 'Space Mono',monospace;letter-spacing:4px;margin:6px 0;user-select:all;color:#fff1d1}
#lobby-invite{width:100%;margin-top:14px}.lobby-caption{font-size:11px;color:#a893bc;margin-top:10px}.guest-board{display:flex;flex-direction:column;justify-content:center;min-height:0;min-width:0}.guest-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.guest-heading h3{font-size:23px;margin:0}.guest-heading #lobby-count{font:11px 'Space Mono',monospace;color:var(--orange);background:#ffca5f10;border:1px solid #9d75475c;border-radius:20px;padding:8px 12px;white-space:nowrap}
#lobby-seats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.guest-slot{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:145px;gap:5px;border-radius:12px;background:#35223e9e;border:1px solid #a274b2;animation:ballot .35s both}.guest-slot .sprite{width:clamp(48px,6vw,82px);height:clamp(48px,6vw,82px)}.guest-slot strong{font-size:12px}.guest-slot small{font:8px 'Space Mono',monospace;color:#b7e6bb;letter-spacing:.5px}.guest-slot.empty{background:#180f2380;border:1px dashed #695077}.guest-slot.empty .sprite{opacity:.14;filter:brightness(0) invert(.7)}.guest-slot.empty strong,.guest-slot.empty small{color:#8e779f}.guest-slot.joined{box-shadow:inset 0 0 24px #a871cd10}
.lobby-launch{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:22px;border-top:1px solid #9770ab44;padding-top:20px}.lobby-launch>div{flex:1;min-width:180px}.lobby-launch strong{font-size:14px;color:var(--cream)}.lobby .lobby-launch p{font-size:11px;margin:5px 0 0;color:#ae9abe}.lobby-launch button{min-width:190px;font-size:13px}.lobby .disguise-note{max-width:none;font-size:10px;line-height:1.4;color:#a18ab3;margin:18px 0 0}#resume{width:100%;margin-top:10px}
@media(max-width:800px){.in-lobby .room-strip{height:40px}.lobby{height:100%;padding:18px;gap:22px;display:flex;flex-direction:column}.invite-board{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;align-items:center;flex-shrink:0}.invite-board>.eyebrow{font-size:9px;grid-column:1}.lobby .invite-board h2{font-size:40px;margin:0;grid-column:1;letter-spacing:-2px}.lobby .invite-board p{display:none}.code-ticket{grid-column:2;grid-row:1/4;padding:12px 8px}#big-room-code{font-size:clamp(27px,6vw,46px);letter-spacing:1px}.code-ticket>span{font-size:8px;letter-spacing:1px}#lobby-invite{grid-column:1;margin:0;font-size:11px;padding:10px}.lobby-caption{grid-column:1/-1;font-size:10px;margin:0}.guest-board{flex:1;justify-content:space-between}.guest-heading{margin-bottom:12px}.guest-heading h3{font-size:19px}.guest-heading #lobby-count{font-size:10px;padding:6px 10px}#lobby-seats{gap:8px;flex:1;min-height:0}.guest-slot{min-height:95px;gap:3px}.guest-slot .sprite{width:56px;height:56px}.guest-slot strong{font-size:10px}.guest-slot small{font-size:7px}.lobby-launch{margin-top:12px;padding-top:12px;gap:8px}.lobby-launch button{font-size:12px;min-width:160px}.lobby .disguise-note{margin-top:10px;font-size:9px}}
@media(max-height:650px){.lobby{padding:14px 22px;gap:22px}.lobby .invite-board h2{font-size:40px;margin:8px 0}.lobby .invite-board p{margin-bottom:8px;font-size:11px}.code-ticket{padding:8px}#big-room-code{font-size:36px}.guest-slot{min-height:90px}.guest-slot .sprite{width:48px;height:48px}.guest-heading{margin-bottom:10px}.lobby-launch{margin-top:10px;padding-top:10px}.lobby .disguise-note{margin-top:8px}}
.guest-slot .lobby-avatar{background:none;object-fit:contain;filter:none}
.vote-flock{width:148px;min-height:62px;display:flex;align-items:flex-end;justify-content:center;flex-shrink:0;margin-bottom:9px;position:relative;z-index:4;pointer-events:none}
.tally-total{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.tally-marks{display:flex;justify-content:center;align-content:flex-end;gap:3px;flex-wrap:wrap;max-width:148px}
.vote-head{display:block;width:26px;height:26px;pointer-events:auto;filter:drop-shadow(0 3px 2px #100719)}
.vote-head img{display:block;width:100%;height:100%;image-rendering:pixelated;animation:head-float 1.6s ease-in-out infinite alternate;animation-delay:var(--float-delay,0s)}
.vote-head.arriving{animation:head-arrive .4s ease-out both}
.vote-leader .vote-head{filter:drop-shadow(0 0 5px #ffc35c)}
.avatar-frame{position:relative;display:block;isolation:isolate}
.spectator-ghost{display:block;width:clamp(64px,9vh,112px);height:clamp(64px,9vh,112px);object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 0 14px #bd9bff);animation:spectator-float 2.2s ease-in-out infinite alternate}
.ghost-seat .bubble{background:#28203ecf;border-color:#ae91dc;color:#e9dffc;text-align:center;font-style:italic}
.ghost-seat .bubble:after{border-top-color:#ae91dc}
.ghost-seat .nameplate{border-color:#bda4e9;color:#f1e9ff;background:#30234c}
.ghost-seat .seat-button:disabled{opacity:1}
.ghost-seat .vote-label{color:#d4baff}
@keyframes spectator-float{to{transform:translateY(-7px);filter:drop-shadow(0 0 20px #d5bdff)}}
.elimination-effect{position:absolute;inset:0;pointer-events:none}
.elimination-cross{position:absolute;left:50%;top:50%;width:110px;height:110px;margin:-55px 0 0 -55px;display:grid;place-items:center;color:#ff557e;font:900 160px/110px 'Space Grotesk',sans-serif;text-shadow:0 0 18px #ff1748;animation:cross-strike .4s ease-out both;z-index:2}
.departing-ghost,.revealed-skull{position:absolute;width:60px;height:70px;object-fit:contain;image-rendering:pixelated;left:50%;top:50%;z-index:3;filter:drop-shadow(0 0 12px #dec5ff)}
.departing-ghost{animation:ghost-escape 3.8s .15s both}
.revealed-skull{transform:translate(-50%,-50%);filter:drop-shadow(0 0 16px #ff245b);animation:skull-reveal .7s .35s both}
.condemned{animation:none}
.condemned.innocent .sprite{animation:body-vanish .8s .6s forwards}
.condemned.killer .sprite{animation:body-vanish .4s .25s forwards}
.condemned.killer .nameplate{box-shadow:0 0 18px #ff235e88}
#ballots .ballot-pending{visibility:hidden;animation:none}
@keyframes head-float{to{transform:translateY(-5px) rotate(5deg)}}
@keyframes head-arrive{from{opacity:0;transform:translateY(-24px) scale(1.5)}to{opacity:1;transform:none}}
@keyframes cross-strike{from{opacity:0;transform:scale(2.2) rotate(-18deg)}to{opacity:1;transform:none}}
@keyframes ghost-escape{0%{opacity:.8;transform:translate(-50%,-45%) scale(.65)}20%{opacity:1;transform:translate(-50%,-85%) scale(1)}65%{opacity:1}100%{opacity:0;transform:translate(-35%,-210%) scale(.7)}}
@keyframes skull-reveal{from{opacity:0;transform:translate(-50%,-50%) scale(2) rotate(-20deg)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes body-vanish{to{opacity:0;filter:grayscale(1);transform:scale(.7)}}
@media(max-width:800px){.vote-flock{width:108px;min-height:46px;margin-bottom:6px}.tally-marks{max-width:108px;gap:2px}.vote-head{width:19px;height:19px}.elimination-cross{font-size:120px}.departing-ghost,.revealed-skull{width:44px;height:52px}#verdict{font-size:12px;letter-spacing:1px;height:auto;min-height:28px}}
@media(max-width:800px){.spectator-ghost{width:clamp(40px,8vh,80px);height:clamp(40px,8vh,80px)}}
@media(prefers-reduced-motion:reduce){.condemned .sprite{opacity:0}.departing-ghost{opacity:1;transform:translate(-50%,-100%)}.revealed-skull{transform:translate(-50%,-50%)}}
.guest-slot.empty .lobby-avatar{opacity:.55;filter:none}
.killer-word,.brand .killer-word{color:#ff728b}
.killer-insert{display:inline-block;position:relative;width:.85em;color:#ff728b;letter-spacing:0;vertical-align:baseline}
.killer-insert>span{position:absolute;left:50%;bottom:1.8em;transform:translateX(-50%) rotate(-9deg);font-family:'Comic Sans MS','Chalkboard SE',cursive;font-size:.55em;font-weight:700;line-height:1;white-space:nowrap;color:#ff728b}
.killer-insert>b{display:block;font-size:.65em;line-height:1;color:#ff728b;transform:translateY(-.08em)}
.welcome h1.game-logo{font-size:clamp(23px,3.6vw,38px);letter-spacing:-1.5px;white-space:nowrap;margin:38px 0 18px;line-height:1.2}
#stage-cue{border-top:1px solid #d69c6240;margin-top:9px;padding-top:9px}
#stage-cue strong{display:block;color:#e4bbff;font-size:clamp(17px,1.7vw,24px);line-height:1.15}
#stage-cue span{display:block;font-size:12px;line-height:1.3;color:#ddcfe7;margin-top:4px}
@media(min-width:801px){#stage-cue{display:flex;justify-content:center;align-items:center;gap:16px}#stage-cue strong{flex-shrink:0}#stage-cue span{max-width:540px;text-align:left;margin-top:0}.controls{min-height:80px}}
@media(min-width:801px){#duck-grid[data-count="9"] .sprite{width:48px;height:48px}#duck-grid[data-count="9"] .bubble:not(.tally-bubble){font-size:12px;padding:6px 8px}#duck-grid[data-count="9"] .bubble:not(.tally-bubble)>span{-webkit-line-clamp:3}#game[data-phase="vote"] #duck-grid[data-count="9"] .can-vote .nameplate{font-size:11px;padding:4px 9px}#duck-grid[data-count="9"] .can-vote .vote-label{font-size:9px;padding:2px 5px}}
#game>.steps{display:none}
#game[data-phase="vote"] .question{border-color:#ff728b;box-shadow:0 0 30px #f6467525}
#game[data-phase="vote"] #stage-cue strong{color:#ff96ad}
#game[data-phase="vote"] .can-vote .nameplate{border:2px solid #ff9ab4;background:#60203f;font-size:13px;padding:6px 12px}
.can-vote .vote-label{font-size:11px;font-weight:700;color:#fff0cf;background:#722d50;border-radius:4px;height:auto;padding:3px 7px}
.can-vote .seat-button{animation:vote-invite 1.5s ease-in-out infinite alternate}
.duck-vote-controls{position:relative;display:flex;justify-content:center;flex-shrink:0;max-width:100%}
.duck-vote-controls .seat-button{max-height:none}
.duck-vote-confirm{position:absolute;left:calc(100% - 3px);top:25%;width:44px;height:44px;padding:0;border:2px solid #ffb5ba;border-radius:50%;background:#b72246;color:#fff;font-size:25px;line-height:1;box-shadow:0 3px 0 #61122c,0 0 18px #e8335555;z-index:3}
.duck-vote-confirm:hover:not(:disabled){background:#dc3157;transform:scale(1.08)}
.vote-confirm-left .duck-vote-confirm{left:auto;right:calc(100% - 3px)}
.duck.can-vote.selected{z-index:5}
.reactive-duck .sprite{transition:filter .18s}
@media(hover:hover){.reactive-duck .seat-button:hover .sprite{background-image:url('halloween-ducks-hover.webp');animation:duck-curious .65s ease-in-out infinite alternate}}
.reactive-duck .seat-button:focus-visible .sprite{background-image:url('halloween-ducks-hover.webp')}
.reactive-duck.selected .sprite,.reactive-duck.selected .seat-button:hover .sprite,.reactive-duck.selected .seat-button:focus-visible .sprite{background-image:url('halloween-ducks-accused.webp');animation:duck-protest .35s ease-out both;filter:drop-shadow(1px 0 #ff456c) drop-shadow(-1px 0 #ff456c) drop-shadow(0 1px #ff456c) drop-shadow(0 -1px #ff456c) drop-shadow(0 0 9px #ff315e88)}
.duck.selected .nameplate{background:#57172d;border-color:#ff6d88;color:#ffe9ed}
.duck.vote-locked .sprite,.duck.vote-locked .seat-button:hover .sprite{filter:drop-shadow(2px 0 #ff345b) drop-shadow(-2px 0 #ff345b) drop-shadow(0 2px #ff345b) drop-shadow(0 -2px #ff345b) drop-shadow(0 0 14px #ff184cbb)}
.duck.vote-locked .avatar-frame:after{content:'';position:absolute;inset:-5px;border:2px solid #ff4a70;border-radius:14px;box-shadow:0 0 15px #e9225f88;pointer-events:none;animation:vote-brand .4s ease-out both}
.duck.vote-locked .nameplate{border:2px solid #ff4a70;box-shadow:0 0 12px #ed255d77}
.duck.vote-locked .vote-label{color:#ff8aa2;font-weight:700}
.evil-goose{display:block;width:clamp(64px,9vh,112px);height:clamp(64px,9vh,112px);object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 0 14px #ff245b)}
@keyframes duck-curious{from{transform:translateY(-1px) rotate(-3deg)}to{transform:translateY(-4px) rotate(3deg)}}
@keyframes duck-protest{0%{transform:translateX(0)}30%{transform:translateX(-5px) rotate(-6deg)}65%{transform:translateX(4px) rotate(5deg)}100%{transform:none}}
@keyframes vote-brand{from{opacity:0;transform:scale(1.35)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.reactive-duck .sprite,.reactive-duck.selected .sprite,.reactive-duck .seat-button:hover .sprite,.duck.vote-locked .avatar-frame:after{animation:none!important}}
.duck.tap-react .avatar-frame{animation:duck-tap .36s ease-out}
@keyframes duck-tap{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-10px) rotate(-7deg)}70%{transform:translateY(-3px) rotate(5deg)}}
.controls .status{max-width:420px}.controls .status strong{font-size:18px}.controls form{flex:2;min-width:300px}
#stage-splash{width:min(620px,92vw);text-align:center;padding:40px 36px 34px;border:2px solid #cc8af5;background:radial-gradient(ellipse at top,#4b255e,#1c102c 75%);overflow:hidden;animation:stage-arrive .3s ease-out}
#stage-splash::backdrop{background:#080311b8;backdrop-filter:blur(4px)}
#stage-splash h2{font-size:clamp(32px,4vw,54px);line-height:1.05;letter-spacing:-1.5px;margin:18px 0}
#stage-splash p{font-size:18px;line-height:1.5;margin:0 auto 24px;max-width:470px;color:#eee2f5}
#stage-splash button{min-width:230px;font-size:17px;padding:15px 22px}
#splash-clock{display:none}
#stage-splash.countdown{width:min(440px,90vw);padding:28px 26px 22px;border-color:#ffbd64;background:radial-gradient(ellipse at top,#49305c,#1b112b 78%)}
#stage-splash.countdown #splash-clock{display:grid;place-items:center;width:128px;height:128px;margin:22px auto 12px;border:7px solid #ffc268;border-radius:50%;box-shadow:0 0 0 5px #58325e,inset 0 0 25px #e68b4455,0 0 40px #fbb95f44;background:repeating-conic-gradient(from 0deg,#ffcd7d 0 2deg,transparent 2deg 30deg) border-box,radial-gradient(circle,#382148,#211330);color:#fff2d0;font:700 68px 'Space Mono',monospace;font-variant-numeric:tabular-nums}
#stage-splash.countdown h2{font-size:clamp(27px,5vw,37px);margin:12px 0}
#stage-splash.countdown p{font-size:14px;margin:0 auto;color:#e6d4ef}
#stage-splash.countdown button,#stage-splash.countdown .splash-progress{display:none}
#game.answer-countdown .duck .bubble{visibility:hidden}
#game.answer-countdown #duck-grid{pointer-events:none}
#game[data-phase="vote"] #stage-cue strong{font-size:clamp(13px,1.2vw,16px)}
.splash-progress{position:absolute;left:0;bottom:0;height:4px;width:100%;background:#e2a9ff;transform-origin:left;animation:splash-clock var(--splash-duration,4.2s) linear forwards}
@keyframes stage-arrive{from{opacity:0;transform:scale(.9) translateY(18px)}to{opacity:1;transform:none}}
@keyframes splash-clock{to{transform:scaleX(0)}}
@keyframes vote-invite{to{filter:drop-shadow(0 0 9px #f885c0)}}
@media(max-width:800px){#stage-cue strong{font-size:16px}#stage-cue span{font-size:11px}#stage-cue{margin-top:6px;padding-top:6px}.controls .status strong{font-size:15px}.controls form{min-width:100%}#stage-splash{padding:28px 20px}#stage-splash p{font-size:16px}#game[data-phase="vote"] .can-vote .nameplate{font-size:10px;padding:4px 6px}.can-vote .vote-label{font-size:8px;padding:2px 4px}}
@media(max-height:650px){#stage-cue{margin-top:4px;padding-top:4px}#stage-cue strong{font-size:16px}#stage-cue span{font-size:10px}.controls .status strong{font-size:14px}}
@media(max-width:420px){.brand{font-size:11px;letter-spacing:.4px}.welcome h1{font-size:36px;letter-spacing:-2px}}
#reveal-story{width:min(800px,94vw);max-height:94dvh;padding:28px 40px;text-align:center;overflow:hidden;border:2px solid #c59aff;background:radial-gradient(ellipse at 50% 35%,#49365f,#140c24 75%);box-shadow:0 0 140px #a34bea40;animation:stage-arrive .35s ease-out}
#reveal-story::backdrop{background:#070311e8;backdrop-filter:blur(9px)}
#match-summary{text-align:center;flex-shrink:0;color:#d8c4e5;font-size:12px;line-height:1.35;padding:2px 6px}
@media(max-width:800px){#match-summary{font-size:10px}}
#reveal-story.caught{border-color:#ff658b;background:radial-gradient(ellipse at 50% 35%,#6d183c,#190c24 75%);box-shadow:0 0 140px #ee285344}
#reveal-story .eyebrow{font-size:13px;letter-spacing:3px}
.reveal-portrait{height:220px;width:280px;margin:12px auto 4px;position:relative;display:grid;place-items:center}
#reveal-character .sprite{width:180px;height:180px;filter:drop-shadow(0 0 25px #c995ff77)}
.story-cross{position:absolute;inset:0;display:grid;place-items:center;color:#ff5680;font:900 300px/220px 'Space Grotesk',sans-serif;opacity:0;text-shadow:0 0 32px #fa3569;pointer-events:none}
#reveal-spirit{position:absolute;left:50%;top:50%;width:160px;height:187px;image-rendering:pixelated;object-fit:contain;transform:translate(-50%,-50%);opacity:0;filter:drop-shadow(0 0 25px #e0cbff)}
#reveal-story h2{font-size:clamp(30px,4vw,52px);line-height:1.08;letter-spacing:-1.5px;margin:12px 0;color:#fff4e0}
#reveal-story p{font-size:19px;line-height:1.4;max-width:570px;margin:14px auto 22px;min-height:54px;color:#e7d7f3}
#reveal-story button{min-width:240px;padding:14px 22px;font-size:17px}
#reveal-story.revealed #reveal-character{animation:story-disguise .4s forwards}
#reveal-story.revealed .story-cross{animation:cross-strike .45s both}
#reveal-story.revealed.caught #reveal-spirit{animation:skull-reveal .6s .2s both;filter:drop-shadow(0 0 24px #ff467a)}
#reveal-story.revealed.innocent #reveal-spirit{animation:story-ghost 4.5s both}
#reveal-story.revealed.innocent .story-cross{color:#bb91eb;text-shadow:0 0 30px #a970ed}
@keyframes story-disguise{to{opacity:0;transform:scale(.75)}}
@keyframes story-ghost{0%,45%{opacity:1;transform:translate(-50%,-50%) scale(1)}70%{opacity:.8}100%{opacity:0;transform:translate(-45%,-160%) scale(.65)}}
@media(max-width:600px),(max-height:650px){#reveal-story{padding:20px}.reveal-portrait{height:170px;width:230px}#reveal-character .sprite{width:140px;height:140px}.story-cross{font-size:240px;line-height:170px}#reveal-spirit{width:120px;height:140px}#reveal-story h2{font-size:32px}#reveal-story p{font-size:16px;margin:10px auto 16px}#reveal-story .eyebrow{font-size:10px}}
@media(prefers-reduced-motion:reduce){#reveal-story.revealed #reveal-character{opacity:0}#reveal-story.revealed .story-cross,#reveal-story.revealed #reveal-spirit{opacity:1}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.header-actions{display:flex;align-items:center;gap:10px}.header-actions #room-code{font:11px 'Space Mono',monospace;color:#b8a9cd;margin:0}
@media(min-width:801px){.duck{height:auto;max-height:none}}
#game{padding-top:14px}.question{padding-top:14px;padding-bottom:14px}.question h2{margin:0;min-height:0}
.guest-slot.self{border:2px solid #ffda73;background:#9b702126;box-shadow:0 0 24px #ffd77520}.guest-slot.self strong,.guest-slot.self small{color:#ffdf8d}
.scrambled-alias{font-family:'Space Mono',monospace;letter-spacing:2px;min-width:7ch;color:#beadd1}.guest-slot.joined:not(.self) small{color:#a18eb4}
.self .nameplate{border-color:#ffda73;color:#ffdf8d}
.seat-activity{display:flex;align-items:center;justify-content:center;gap:8px;min-height:22px;color:#bb9bd5;font:11px 'Space Mono',monospace;font-style:normal}
.activity-glyph{min-width:5ch;letter-spacing:1px;text-align:center;color:#dfbcff;animation:activity-glimmer 1.3s ease-in-out infinite alternate}
.seat-activity.done{color:#8de0ad}.seat-activity.done .activity-glyph{min-width:16px;font-size:18px;color:#9af1b6;animation:none}
#game[data-phase="vote"] .seat-activity{justify-content:flex-end;font-size:9px;min-height:16px;margin-top:5px;color:#75647f}
#game[data-phase="vote"] .activity-glyph{color:#84669a;min-width:18px;letter-spacing:2px}
#game[data-phase="vote"] .seat-activity.done,#game[data-phase="vote"] .seat-activity.done .activity-glyph{color:#317249}
.vote-label:empty{height:0;margin:0}.status span:empty,.error:empty{display:none}.controls .status{max-width:490px}
@keyframes activity-glimmer{to{opacity:.45}}
#reveal-story.caught.revealed{border-color:#99e6a5;background:radial-gradient(ellipse at 50% 35%,#355442,#101e22 75%);box-shadow:0 0 140px #58c87e40}
#reveal-story.caught.revealed h2{font-size:clamp(40px,6vw,76px);color:#b6f3bf}
#reveal-story.lost{width:min(860px,94vw);border-color:#ff597b;background:radial-gradient(ellipse at 50% 35%,#651b39,#170916 75%);box-shadow:0 0 150px #e51e4945}
#reveal-story.lost::backdrop{background:#160310ed;backdrop-filter:blur(10px)}
#reveal-story.lost h2{font-size:clamp(60px,9vw,110px);color:#ff6b85;letter-spacing:-4px;line-height:1;margin:12px 0}
#reveal-story.lost #reveal-chapter{color:#ff9cae;letter-spacing:5px}
#reveal-story.lost .story-cross{display:none}
#reveal-story.revealed.lost #reveal-spirit{animation:skull-reveal .7s both;filter:drop-shadow(0 0 35px #ff315e);width:190px;height:220px}
@media(max-width:800px){.header-actions{gap:6px}.header-actions #room-code{display:none}.header-actions button{padding:7px 9px;font-size:10px}#game{padding-top:8px}.question{padding-top:12px;padding-bottom:12px}.seat-activity{gap:4px;font-size:9px}.activity-glyph{min-width:4ch}.brand{font-size:12px;letter-spacing:0}.guest-slot small{font-size:7px}.scrambled-alias{font-size:10px;letter-spacing:1px}}
@media(max-width:420px){.header-actions #copy-link{font-size:0;padding:7px}.header-actions #copy-link:after{content:'↗';font-size:14px}}
.join-row #join:disabled{background:#302936;border-color:#594c61;color:#968b9e;opacity:.65;box-shadow:none;cursor:not-allowed}
header{gap:20px}
.zro-brand{display:flex;align-items:center;gap:12px;color:var(--cream);text-decoration:none;flex-shrink:0}
.zro-brand img{width:30px;height:30px}
.zro-brand>span{border-left:1px solid #a887bc66;padding-left:12px;font:700 9px/1.35 'Space Mono',monospace;letter-spacing:1px;color:#d6c3e5}
header>.brand{font-size:15px;white-space:nowrap}
.about-zro{font:11px 'Space Mono',monospace;color:#d6c3e5;text-decoration:none;white-space:nowrap;padding:8px}
.about-zro:hover{color:var(--orange)}
.header-reward{font-size:11px;color:#ffdc96;white-space:nowrap}
@media(max-width:1100px){header>.brand{display:none}}
@media(max-width:600px){.header-reward{font-size:9px}.header-actions .about-zro{display:none}.zro-brand>span{display:none}}
#reveal-story .game-over-gift{border-top:1px solid #bd9bd244;margin:0 auto 18px;padding-top:14px;font-size:13px;color:#dcc9e7}
.game-over-gift>div{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;margin-top:10px}
.discount-link{color:var(--cream);background:#583177;border:1px solid #b98bd5;border-radius:9px;padding:10px 14px;font-size:13px;font-weight:700;text-decoration:none}.discount-link:hover{background:#75439a}.discount-link:focus-visible{outline:3px solid var(--orange);outline-offset:3px}
#discount-code{font:700 20px 'Space Mono',monospace;color:#ffdb91;user-select:all}
#reveal-story #copy-discount{min-width:0;padding:9px 12px;font-size:12px}
#reveal-story:has(.game-over-gift:not(.hidden)){overflow-y:auto}
@media(max-width:900px){header>.brand{display:none}}
@media(max-width:600px){header{gap:8px;padding-left:12px;padding-right:12px}.zro-brand{gap:7px}.zro-brand img{width:25px;height:25px}.zro-brand>span{font-size:7px;letter-spacing:.4px;padding-left:7px}.about-zro{font-size:9px;padding:6px 0}.header-actions{gap:5px}#reveal-story .game-over-gift{font-size:12px;margin-bottom:12px;padding-top:10px}#discount-code{font-size:17px}.game-over-gift>div{gap:8px}}
.join-row input{font-size:14px;letter-spacing:1px}
.question{padding:16px 20px;text-align:left}
.prompt-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.prompt-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex-shrink:0}
#round-status{font:700 11px 'Space Mono',monospace;color:var(--muted);white-space:nowrap}
.prompt-heading .status{max-width:none;min-width:0;flex:1}
.prompt-heading .status strong{font-size:22px;color:#ffcf79}
.prompt-heading .status span{font-size:13px;line-height:1.4}
.question #timer{position:static;transform:none;flex-shrink:0;padding-top:3px}
.question h2{margin-top:12px;font-size:clamp(16px,1.6vw,23px);color:#fff4e2}
.question .controls{min-height:0;border:0;border-radius:0;background:none;padding:0;margin-top:12px;gap:8px}
.question .controls:not(:has(form:not(.hidden),.control-buttons>button:not(.hidden))){display:none}
.question .controls form{width:100%;flex-basis:100%;min-width:0}
.question .controls input{font-size:16px}
.question .control-buttons{margin-left:0}
#game[data-phase="vote"] .prompt-heading .status strong{color:#ffa0b8}
#reveal-story.caught.revealed h2{font-size:clamp(30px,4.3vw,58px)}
/* Keep the single-panel home usable on short screens without competition.css. */
#landing{padding:16px;overflow-y:auto}
#landing .welcome{max-height:100%;overflow-y:auto}
#reveal-story.revealed.caught #reveal-spirit,#reveal-story.revealed.lost #reveal-spirit{width:240px;height:230px;object-fit:contain}
@media(max-width:600px),(max-height:650px){#reveal-story.revealed.caught #reveal-spirit,#reveal-story.revealed.lost #reveal-spirit{width:190px;height:175px}}
@media(max-width:800px){.question{padding:12px}.prompt-heading{gap:8px}.prompt-heading .status strong{font-size:18px}.prompt-heading .status span{font-size:12px}.question h2{font-size:15px;margin-top:10px}.question .controls{margin-top:10px}.question .controls form{gap:6px}.question .controls button{padding:10px;font-size:12px}.question .vote-tray{flex:1}}
