:root{--ink:#30224e;--paper:#fff9e9;--gold:#ffce54;--blue:#2851ba;--shadow:#211344;--display:'Baloo 2',sans-serif;--body:'Nunito',sans-serif}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#202a65;font-family:var(--body);color:var(--ink)}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #42efff;outline-offset:4px}#world{position:fixed;inset:0;transition:filter .4s}#world canvas{display:block}#ui{position:fixed;inset:0;pointer-events:none}#ui button,#ui input,#ui dialog,#ui details{pointer-events:auto}#top{position:absolute;top:22px;left:30px;right:30px;display:flex;align-items:center;justify-content:space-between;z-index:5}.wordmark{display:flex;flex-direction:column;color:#fff2c0;text-shadow:0 3px 0 #512b55,0 6px 15px #202050}.wordmark small{font-size:9px;letter-spacing:.25em;font-weight:900}.wordmark strong{font:800 30px/.95 var(--display);letter-spacing:-.02em}.settings-trigger{border:2px solid #d7bdf0;border-radius:50%;width:40px;height:40px;background:linear-gradient(#7767b5,#483677);color:#fff1cd;font-size:24px;box-shadow:0 4px 0 #302049}.game-button{border:2px solid #fff0ae;border-radius:14px;background:linear-gradient(#526fce,#314c9e);color:white;font:900 17px var(--body);padding:15px 24px;box-shadow:0 5px 0 #283a79,0 10px 20px #20124055;text-shadow:0 1px 1px #45336c;letter-spacing:.025em;transition:transform .15s}.game-button.gold{background:linear-gradient(#ffe38b,#f7b52d);color:#644024;border-color:#ffe99c;box-shadow:0 5px 0 #b86d2b,0 10px 20px #20124055;text-shadow:0 1px #ffebac}.game-button:hover:not(:disabled){transform:translateY(-3px);filter:brightness(1.07)}.game-button:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 #8c6837}.game-button:disabled{opacity:.5}.text-button{background:none;border:0;color:#67578a;font-weight:800;padding:10px;font-size:13px}.lobby{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;padding:90px 12% 80px;gap:50px}.lobby-title{color:#fff1b6;max-width:510px;text-shadow:0 3px 0 #4a2566,0 8px 18px #1d2351}.lobby-title>p:first-child{font-size:12px;font-weight:900;letter-spacing:.18em}.lobby-title h1{font:800 clamp(68px,7vw,110px)/.9 var(--display);letter-spacing:-.04em;margin:20px 0 24px;-webkit-text-stroke:1px #f4a73e}.lobby-tagline{font:800 25px/1.3 var(--display);max-width:350px}.join-party{pointer-events:auto;background:linear-gradient(#fffdf2,#eee0be);border:4px solid #e5b459;border-top-color:#fff2c5;border-radius:26px;padding:28px;width:370px;box-shadow:0 8px 0 #8d6242,0 15px 40px #1a19477a;transform:rotate(1deg)}.join-party h2{font:800 29px var(--display);text-align:center;margin:0 0 20px}.party-slots{display:grid;gap:13px}.party-player{display:flex;align-items:center;gap:10px}.player-token{display:grid;place-items:center;background:linear-gradient(#fba27c,#e26158);border:3px solid #ffe5bd;border-radius:15px;color:white;width:48px;height:48px;flex-shrink:0;font:800 24px var(--display);box-shadow:0 4px 0 #773f59}.party-player[data-seat='1'] .player-token,.crew-player[data-seat='1'] .player-token,.standing[data-seat='1'] .player-token{background:linear-gradient(#94dfee,#3d91c7)}.party-player[data-seat='2'] .player-token,.crew-player[data-seat='2'] .player-token,.standing[data-seat='2'] .player-token{background:linear-gradient(#a9df8b,#61a27b)}.party-player[data-seat='3'] .player-token,.crew-player[data-seat='3'] .player-token,.standing[data-seat='3'] .player-token{background:linear-gradient(#d8abf0,#9a66c6)}.party-player input{width:100%;min-width:0;padding:10px 12px;background:#fffdf8;color:var(--ink);border:2px solid #d3bf9e;border-radius:10px;box-shadow:inset 0 2px 3px #b89a6c22;font-size:15px;font-weight:800}.party-controls{display:flex;justify-content:center;margin:8px 0}.join-party .gold{width:100%}.lobby-foot{text-align:center;color:#8f745c;font-size:11px;font-weight:700;margin:18px 0 0}#crew{position:absolute;bottom:20px;left:0;right:0;display:flex;gap:12px;justify-content:center;align-items:end;z-index:3;min-height:70px}.crew-player{position:relative;display:flex;align-items:center;gap:10px;min-width:180px;padding:10px 24px 10px 12px;background:linear-gradient(#53467c,#332c57);border:2px solid #b9a2cf;border-radius:18px;box-shadow:0 5px 0 #201936;color:#fff3ce}.crew-player.is-turn{border-color:#ffe084;box-shadow:0 5px 0 #67447c,0 0 22px #ffe29e44;transform:translateY(-4px)}.player-info{display:flex;flex-direction:column;gap:2px}.player-name{font-size:12px;font-weight:800;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-cash{font:800 23px/1.1 var(--display);letter-spacing:.01em}.turn-dot{position:absolute;top:8px;right:10px;color:#ffe089;font-size:8px}#turn{position:absolute;top:95px;left:50%;transform:translateX(-50%);color:#ffedc0;display:flex;align-items:center;gap:10px;justify-content:center;text-shadow:0 2px 5px #28175c;white-space:nowrap;z-index:2}.turn-avatar{display:grid;place-items:center;width:37px;height:37px;border-radius:50%;background:#bf684e;border:2px solid #ffdaa0;font:800 23px var(--display);box-shadow:0 3px 0 #35205c}.turn-copy{display:flex;flex-direction:column}.turn-copy small{font-size:8px;font-weight:900;letter-spacing:.1em}.turn-copy strong{font:800 19px/1.1 var(--display)}.turn-hint{font:700 13px var(--body);margin-left:15px;padding-left:20px;border-left:1px solid #ffebbb66}#targets{position:absolute;display:grid;pointer-events:none}.chest-target{position:relative;border:0;background:transparent;padding:0;display:flex;flex-direction:column;justify-content:space-between;align-items:center;pointer-events:auto;color:#4b2b4f;transition:transform .18s}.chest-target:disabled{pointer-events:none}.chest-number{margin-top:5px;font-size:10px;font-weight:900;background:#3a2f67e8;color:#fff3cf;border:1px solid #d7b27c;min-width:26px;border-radius:8px;padding:1px 5px;box-shadow:0 2px 0 #1f1948}.chest-value{position:relative;margin-bottom:3px;font:900 17px var(--body);line-height:1;background:linear-gradient(#fff5ca,#f7d17b);border:2px solid #b78543;border-top-color:#ffefb7;border-radius:9px;padding:5px 15px;min-width:90px;box-shadow:0 3px 0 #865345,0 5px 10px #39274933}.chest-target:hover:not(:disabled) .chest-value{color:#2350ad;transform:translateY(-3px);filter:brightness(1.1)}.chest-target:disabled .chest-value{opacity:.7;font-size:12px}.chest-target:focus-visible{outline:4px solid #fff5a1;border-radius:18px;background:#fffde418}#surface{position:absolute;inset:0;pointer-events:none;display:grid;place-items:center;padding:75px 20px 100px}#surface>.question-panel{pointer-events:auto}body[data-phase='SELECT_CHEST'] #surface{display:none}.question-panel{width:min(780px,82vw);max-height:calc(100dvh - 175px);overflow:auto;border:4px solid #e0b571;border-top-color:#fff1c2;border-radius:25px;background:linear-gradient(135deg,#fffdf1,#f7eddb);padding:24px 28px 20px;box-shadow:0 8px 0 #89637b,0 20px 50px #1c1d5788;position:relative}.question-actor{font-size:11px;font-weight:900;color:#7d5a9c;margin-bottom:13px}.question-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#9b7652;font-size:11px;font-weight:900;letter-spacing:.035em}.double-mark{background:#ffcd4c;color:#694826;border-radius:7px;padding:5px 9px;box-shadow:0 2px 0 #d99b42}.question-prompt{font:800 clamp(22px,2vw,30px)/1.35 var(--display);margin:16px 0 20px;color:#38264b;overflow-wrap:anywhere}.question-image{display:block;max-height:180px;max-width:100%;object-fit:contain;margin:0 auto 15px;border-radius:10px}audio{width:100%;margin-bottom:15px}.vault-lock-heading,.vault-lock-status{font-size:11px;color:#8c7a91}.vault-key-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.vault-key{background:#fffdf6;border:2px solid #d4c3b2;border-bottom:4px solid #c6adb4;border-radius:12px;padding:12px 14px;min-height:52px;display:flex;align-items:center;gap:10px;font:800 16px/1.4 var(--body);color:#4a3b63;text-align:left;min-width:0;overflow-wrap:anywhere;transition:transform .1s,background .1s}.vault-key:hover:not(:disabled){transform:translateY(-2px);background:#f5f0ff;border-color:#b0a5df}.vault-key.is-selected,.vault-key.is-linked{background:#e4eaff;border-color:#6a85ce;border-bottom-color:#475d97}.vault-key:disabled{cursor:default;opacity:1}.vault-key-index{background:#e9dfef;border-radius:6px;min-width:26px;height:26px;display:grid;place-items:center;font-size:12px;color:#7b5f91}.is-selected .vault-key-index{background:#5d79bc;color:white}.vault-key-text{min-width:0}.vault-key-image{max-height:110px;width:100%;object-fit:contain}.vault-lock-submit{background:linear-gradient(#82b8f3,#4577c2);color:white;border:2px solid #d8efff;border-bottom:5px solid #324f91;border-radius:12px;padding:13px;width:100%;font:900 15px var(--body);margin-top:15px;cursor:pointer}.vault-lock-submit:disabled{opacity:.4;cursor:default}.vault-code-input{display:block;width:100%;border:2px solid #b9a8c6;border-radius:10px;padding:13px 15px;color:var(--ink);background:#fffdf7;font-weight:800;font-size:20px;margin-top:8px}.vault-code-label{font-size:11px;color:#88728e;font-weight:800}.vault-word-bank{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.vault-word-bank .vault-key{min-height:35px;padding:7px 13px;font-size:13px}.vault-circuits{display:grid;grid-template-columns:1fr 24px 1fr;gap:9px}.vault-circuit-side{display:grid;gap:8px;min-width:0}.vault-circuit-side .vault-key{width:100%;font-size:14px}.vault-wire{align-self:center;color:#997bbb}.vault-sequence{display:grid;gap:8px}.vault-route{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #d2c4c9}.vault-route-bins{display:flex;gap:6px}.vault-route-bins .vault-key{padding:7px 11px;min-height:36px;font-size:12px}.decision-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;border-top:1px solid #dfcfbd;padding-top:20px;margin-top:23px}.decision-actions button{display:flex;flex-direction:column;gap:5px;align-items:center;padding:13px 10px;border:2px solid #edf9ff;border-radius:13px;font:900 17px var(--body);box-shadow:0 5px 0 #31643f}.decision-answer{background:linear-gradient(#80d5a0,#45a875);color:#123c31}.decision-pass{background:linear-gradient(#efe1c5,#d1b99e);color:#694e49;border-color:#fff7e5!important;box-shadow:0 5px 0 #a78980!important}.decision-actions span{font-size:11px;font-weight:800}.decision-actions button:disabled{opacity:.5}.question-status{color:#bc5d61;font-size:12px;font-weight:800;margin:12px 0 0;min-height:0}.challenge-note{background:#e8dbef;border-radius:12px;padding:12px 15px;margin-bottom:15px;display:flex;gap:12px;align-items:center;font-size:12px}.challenge-note strong{white-space:nowrap;color:#6b4681}.challenge-note span{font-size:11px;line-height:1.4}.ceremony,.victory{pointer-events:auto;background:linear-gradient(#fffaf0,#efdfc6);border:4px solid #eac381;border-radius:26px;padding:30px;box-shadow:0 8px 0 #75527d,0 20px 60px #272156aa;max-width:720px;width:90%;text-align:center}.ceremony h2,.victory h1{font:800 42px/1.2 var(--display);margin:12px 0 23px}.eyebrow{font-size:10px;font-weight:900;color:#9a6e8d;letter-spacing:.1em}.dice-line{display:flex;justify-content:center;gap:25px;margin:20px 0 30px}.dice-player{display:flex;flex-direction:column;gap:15px;align-items:center;font-size:13px}.die-face{font-size:70px;line-height:1;color:#765b91;text-shadow:0 4px 0 #d4bed5}.winner-caption{color:#9a7685;font-size:14px}.standings{display:grid;gap:12px;margin:20px 0 25px}.standing{display:flex;align-items:center;gap:12px;text-align:left;background:#fff9ee;border-radius:12px;padding:12px;flex-wrap:wrap}.standing>strong:nth-child(2){flex:1}.standing>strong:nth-child(3){color:#9e6a34}.standing details{width:100%;font-size:10px;color:#967e8d}.standing details p{margin:8px 0 0;font-size:11px}.settings-dialog{color:var(--ink);background:var(--paper);border:3px solid #c5a7cf;border-radius:20px;box-shadow:0 10px 50px #17133388;text-align:center;padding:25px;max-width:90vw}.settings-dialog::backdrop{background:#23205066}.theme-options{display:flex;flex-direction:column}.settings-dialog p{font-size:12px}#notice{position:absolute;left:50%;top:80px;transform:translate(-50%,-10px);background:#fff4ce;color:#644759;border:2px solid #e8bd80;border-radius:12px;box-shadow:0 4px 0 #775876;padding:10px 20px;max-width:90vw;font-weight:900;font-size:13px;text-align:center;opacity:0;transition:opacity .15s,transform .15s;z-index:10}#notice.visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:800px){.lobby{padding:90px 8% 50px;gap:15px}.lobby-title h1{font-size:72px}.lobby-tagline{font-size:20px}.join-party{width:330px;padding:22px}.crew-player{min-width:150px;padding:9px 20px 9px 10px}.player-cash{font-size:21px}.player-token{width:40px;height:40px;font-size:21px}.player-name{max-width:110px}.turn-hint{display:none}}
@media(max-width:600px){#top{top:18px;left:18px;right:18px}.wordmark strong{font-size:25px}.wordmark small{font-size:8px}.settings-trigger{width:35px;height:35px;font-size:20px}.lobby{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:90px 20px 35px;gap:18px}.lobby-title{text-align:center;max-width:none}.lobby-title>p:first-child{font-size:9px;margin:0}.lobby-title h1{font-size:66px;margin:12px 0}.lobby-tagline{font-size:17px;margin:5px 0}.join-party{padding:20px;width:min(345px,100%);transform:none;border-radius:20px}.join-party h2{font-size:24px;margin-bottom:15px}.party-slots{gap:10px}.party-player input{font-size:14px}.game-button{font-size:14px;padding:12px 18px}.lobby-foot{font-size:10px;margin-top:15px}.party-controls .text-button{font-size:11px}#turn{top:85px;max-width:90%;gap:8px}.turn-avatar{width:32px;height:32px;font-size:19px}.turn-copy strong{font-size:17px}#crew{bottom:14px;gap:7px;flex-wrap:wrap;padding:0 12px}.crew-player{min-width:calc(50% - 10px);max-width:48%;flex:1;padding:7px 17px 7px 8px;border-radius:13px;gap:8px}.player-token{width:33px;height:33px;border-width:2px;border-radius:10px;font-size:18px}.player-name{font-size:10px;max-width:95px}.player-cash{font-size:20px}.chest-number{font-size:8px;min-width:23px;padding:1px 3px;margin-top:0}.chest-value{font-size:12px;padding:4px 8px;min-width:65px;border-radius:7px;border-width:1px;box-shadow:0 2px 0 #865345}.chest-target:disabled .chest-value{font-size:9px}#surface{padding:130px 12px 125px}.question-panel{width:100%;max-height:calc(100dvh - 240px);padding:17px 16px;border-width:3px;border-radius:18px}.question-prompt{font-size:22px;margin:12px 0 14px}.question-actor{font-size:10px;margin-bottom:10px}.question-meta{font-size:9px}.double-mark{font-size:8px}.vault-key-grid{gap:8px}.vault-key{font-size:13px;min-height:47px;padding:9px;gap:7px;border-radius:9px}.vault-key-index{min-width:22px;height:22px;font-size:10px}.decision-actions{gap:8px;margin-top:18px;padding-top:16px}.decision-actions button{font-size:13px;padding:10px 6px;gap:4px}.decision-actions span{font-size:9px;line-height:1.5}.vault-circuits{gap:6px;grid-template-columns:1fr 18px 1fr}.vault-circuit-side .vault-key{font-size:11px;padding:8px}.vault-route{align-items:stretch;flex-direction:column;gap:8px;font-size:13px}.vault-route-bins .vault-key{flex:1;justify-content:center;font-size:11px}.vault-code-input{font-size:17px}.vault-lock-submit{font-size:13px;padding:11px}.challenge-note{gap:8px;padding:10px;align-items:flex-start;flex-direction:column}.ceremony,.victory{padding:22px;width:100%}.ceremony h2,.victory h1{font-size:32px}.dice-line{gap:18px;flex-wrap:wrap}.dice-player{font-size:10px}.die-face{font-size:55px}.standings{gap:8px}.standing{padding:9px;gap:8px;font-size:12px}.standing details{font-size:9px}#notice{font-size:11px;top:65px;padding:8px 14px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

.answer-instruction{font-size:11px;color:#886e8a;font-weight:800;margin:-8px 0 14px}.vault-key:disabled{opacity:.8}.vault-code-input:disabled{color:#887a91}.vault-submitted{font-size:16px;color:#654377}#world{background:#202a65}

.dice-rounds{max-height:44dvh;overflow:auto}.dice-attempt{padding:10px 0}.dice-attempt>small{font-size:9px;font-weight:900;letter-spacing:.08em;color:#8a6b96}.dice-attempt .dice-line{margin:12px 0;gap:24px}.dice-player.is-held{opacity:.35}.dice-player>small{font-size:8px}.ceremony .game-button{margin-top:15px}
.vault-route-bins{flex-wrap:wrap;min-width:0}.vault-key-text{overflow-wrap:anywhere}.settings-dialog{max-height:85dvh;overflow:auto}
