:root{--ink:#352454;--muted:#706081;--line:#e5d9f3;--radius:22px;--shadow:0 8px 0 #30204d12;--header-height:70px;--dock-height:0px}body{background-color:#32205b;background-image:radial-gradient(circle at 15% 10%,#7047a8,transparent 45%),radial-gradient(circle at 90% 80%,#225b68,transparent 50%),radial-gradient(#ffffff12 1px,transparent 1px);background-size:auto,auto,22px 22px}.game-shell{max-width:900px;padding-top:calc(var(--header-height) + var(--clock-height) + 22px + env(safe-area-inset-top,0px));padding-bottom:calc(var(--dock-height) + 24px + env(safe-area-inset-bottom,0px))}.topbar{flex-wrap:nowrap;gap:10px;padding:10px max(16px,calc((100vw - 852px)/2));background:#30204e;color:#fff;border-bottom:2px solid #ffffff20;box-shadow:none}.brand{gap:9px;min-width:0}.brand h1{font-size:19px;white-space:nowrap}.brand-mark{background:#ffd268;color:#553729;box-shadow:0 3px #bc8738;transform:rotate(6deg);border:2px solid #ffe6a9;width:40px;height:40px}.status-chip{background:#ffffff12;color:#d7f7dc;display:flex;align-items:center;gap:6px;font-size:12px;padding:5px 9px;white-space:nowrap}.status-chip:before{content:"";width:7px;height:7px;background:#78e2a4;border-radius:50%;flex:none}.status-chip.offline{color:#ffe2b8;background:#ffffff12}.status-chip.offline:before{background:#ffbd70}#header-actions:not(:empty){width:auto;flex:none;flex-wrap:nowrap}#header-actions .exit-control{width:44px;min-height:44px;padding:10px;border:1px solid #ffffff40;border-radius:14px;background:#ffffff0f;color:#ffdbda;box-shadow:0 3px #1e1236}#header-actions .exit-control .button-label{display:none}.button-icon{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}.hero{position:relative;overflow:hidden;padding:24px 28px;border:2px solid #b68bdf;border-bottom-width:5px;border-radius:26px;background:linear-gradient(125deg,#7951b6,#51338e);color:#fff;box-shadow:0 8px #1d123033;margin-bottom:20px}.hero-copy{max-width:none}.hero .eyebrow{display:flex;align-items:center;gap:8px;color:#ffdc80;font-size:13px}.hero h2{font-size:clamp(25px,4vw,36px);margin:12px 0 6px}.hero h2 em{color:#ffdc80;display:inline}.hero p{color:#efe4ff;font-size:14px;margin-bottom:16px}.letter-tiles{display:flex;gap:10px}.letter-tiles span{display:grid;place-items:center;background:#fff5d8;color:#65412e;border:2px solid #fff;border-bottom:4px solid #d2ad65;border-radius:12px;width:42px;height:46px;font-size:25px;font-weight:700;transform:rotate(-6deg)}.letter-tiles span:nth-child(even){transform:rotate(7deg);background:#dcf7ef;color:#235d51;border-bottom-color:#79b8a7}.panel{border:2px solid #fff;border-bottom:6px solid #d3c0e8;border-radius:26px;background:#fffcf6;padding:26px;box-shadow:0 9px #1d12302b;min-height:180px}.panel h2{font-size:23px}.section-head{margin-bottom:20px}.sub{font-size:14px}.footer{color:#ded0ee;font-size:12px}.footer span{color:#ffd268}.button{border:2px solid #906ed0;border-radius:16px;background:linear-gradient(#8157cb,#6740b0);box-shadow:0 4px #432574;min-height:52px;padding:12px 20px;transition:transform .12s,filter .12s;gap:10px}.button:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px #432574}.button.secondary{background:#f3ecfc;border-color:#d8c5ed;color:#62418d;box-shadow:0 4px #c9b4df}.button.danger{background:#fff0ed;border-color:#e7b7b0;color:#9a4146;box-shadow:0 4px #d4a39e}.button:disabled{opacity:.5;box-shadow:none}.button-label{overflow-wrap:anywhere;min-width:0}.mode-menu{max-width:none;gap:10px}.mode-menu>.button{border-radius:20px;padding:20px;font-size:19px;min-height:80px;position:relative}.mode-menu>.button .button-icon{width:34px;height:34px;background:#ffffff20;border-radius:12px;padding:5px;box-sizing:content-box}.mode-menu>.button.secondary{background:linear-gradient(#e4f7ec,#cceadf);border-color:#a6d4c4;color:#225f50;box-shadow:0 4px #83b6a5}.mode-menu:not(.home-menu)>.button.secondary{background:#eee5fa;border-color:#d9c5f0;color:#593680;box-shadow:0 3px #bfa6d7}.page-navigation{display:flex;margin:0 0 18px}.page-navigation .button{min-height:44px;font-size:13px;padding:7px 12px;border-radius:12px;box-shadow:0 2px #c9b4df}.page-navigation .button-icon{width:19px;height:19px}.actions{gap:14px;margin-top:24px}.actions:not(.host-controls)>.button{flex:1 1 160px}.actions:empty{display:none}.lobby-actions{padding:18px;background:#eee4f8;border:2px dashed #d1b9e8;border-radius:20px}.lobby-actions>.button:first-child{background:linear-gradient(#ffd97d,#f0ba50);border-color:#ffe2a1;box-shadow:0 4px #be8731;color:#593719}.panel>.button{margin:14px 0 6px}.host-controls{border-top:2px dashed #dfcfee;padding-top:18px}.host-controls .button{font-size:13px;min-height:44px;padding:8px 12px}.room-settings{background:#f4eefb;border:2px solid #e4d5f2}.field input,.field select,.code-input{border:2px solid #d9cae9;background:#fff;border-radius:14px;box-shadow:inset 0 2px #f0eaf6}.field input:focus{border-color:#9a71cf}.letter{background:#ffda80;border:2px solid #ffe9b6;box-shadow:0 4px #c79843;transform:rotate(5deg)}.round-clock{background:#ffe29a;border:2px solid #fff2ca;border-bottom:4px solid #bc9140;border-radius:16px;color:#543a18;box-shadow:0 4px 12px #20113525;font-size:15px}#action-dock{bottom:0;background:#30204ef5;border-top:2px solid #ffffff20;box-shadow:none;padding-top:10px}#action-dock .button{max-width:540px;background:linear-gradient(#ffda7c,#efb548);border-color:#ffe5aa;box-shadow:0 4px #a96c29;color:#503019;font-size:16px;min-height:52px}.score-row{border:2px solid #e7daf1;background:#fff;border-radius:16px}.scores:not(.round-history)>.score-row:first-of-type{background:#fff0bf;border:2px solid #eac264;box-shadow:0 3px #dfbd71}.ballot-card{background:#fff;border:2px solid #e4d6ef}.player{background:#eee5f7;border:2px solid #ded0ec}.player.host{background:#fff0bd;border-color:#e7c570}.notice{border-width:2px;box-shadow:0 4px #20113520}body[data-screen=searching] .section-head:before{content:"";width:28px;height:28px;flex:none;border:4px solid #e2d1f1;border-top-color:#8051bb;border-radius:50%;animation:search-spin 1.3s linear infinite}body[data-screen=searching] .panel>.button{display:flex;width:100%;background:#fff1d2;border-color:#efcf8b;color:#795021;box-shadow:0 4px #cfab68}@keyframes search-spin{to{transform:rotate(360deg)}}@media(max-width:650px){.game-shell{padding-inline:12px}.topbar{padding-inline:12px}.brand h1{font-size:17px}.brand-mark{width:34px;height:36px;font-size:24px}.panel{padding:20px 16px}.hero{padding:20px}.hero h2{font-size:27px}.mode-menu>.button{font-size:17px;padding:16px;min-height:72px}.lobby-actions{padding:14px}.lobby-actions>.button{flex-basis:100%;min-height:58px}.panel h2{font-size:21px}.status-chip{font-size:11px;padding:4px 6px}}@media(max-width:380px){.topbar{gap:7px}.brand h1{font-size:15px}.brand{gap:7px}.status-chip{gap:4px}.hero h2{font-size:24px}.letter-tiles span{width:36px;height:40px}}@media(prefers-reduced-motion:reduce){body[data-screen=searching] .section-head:before{animation:none}.button{transition:none}}#header-actions .exit-control{width:auto;min-width:44px;min-height:36px;padding:6px 10px;font-size:12px;font-weight:500;box-shadow:none;border-radius:10px;color:#fff}.lobby-actions{padding:0;background:0 0;border:0;border-radius:0}.lobby-actions:empty{display:none}.actions .button,.code-row .button{min-height:48px;font-size:14px;box-shadow:none}.button.secondary{background:#fff;border-color:#d9cde6;box-shadow:none}.room-settings{background:#fff;border:1px solid #e5ddeb;border-radius:18px}body[data-screen=waiting] .players,body[data-screen=searching] .players{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-block:20px}.player{background:#fff;border:1px solid #ded6e8;border-radius:14px;padding:14px;overflow-wrap:anywhere}body[data-screen=waiting] .panel>.button,body[data-screen=searching] .panel>.button{width:100%;min-height:48px;box-shadow:none;font-size:14px}.code-row{display:grid;grid-template-columns:minmax(0,1fr)minmax(0,1fr);gap:10px;align-items:center}.code-input{min-width:0;width:100%}#action-dock{display:flex;gap:10px;align-items:center;flex-wrap:nowrap;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));transition:none}#action-dock[hidden]{display:none}#action-dock>.button{flex:1;min-width:0;min-height:46px;font-size:14px;padding:10px;box-shadow:none;margin:0}.answer-grid .field{background:#fff;border:1px solid #e1d8eb;border-radius:16px;padding:14px;transition:border-color .15s}.answer-grid .field:focus-within{border-color:#8053be;box-shadow:0 0 0 3px #8053be18}.answer-grid .field label{font-size:15px;font-weight:700}.answer-grid .field input{font-size:18px;min-height:52px}.result-detail{background:#fff;border:1px solid #e3dbe9;border-radius:16px;margin:12px 0;overflow:hidden}.result-detail>summary{cursor:pointer;padding:16px;font-weight:700;min-height:48px}.result-detail[open]>summary{border-bottom:1px solid #eee8f2}.result-detail .ballot-card{border:0;margin:0;border-radius:0;padding:14px}.result-detail .ballot-card h3{font-size:15px}.scores{margin-block:18px}.scores h3{font-size:17px;margin-bottom:12px}.score-row{border:0;border-bottom:1px solid #eee8f2;border-radius:0;padding:13px 10px;gap:12px;align-items:center}.scores:not(.round-history)>.score-row:first-of-type{background:#fff3cc;border:0;border-radius:12px;box-shadow:none}.history-scores{font-size:13px;line-height:1.9}.round-history .score-row{display:block}.vote-row{gap:12px;border-bottom:1px solid #eee8f2;padding:14px 0}.vote-answer{min-width:0;overflow-wrap:anywhere}.answer-score{font-size:13px;white-space:nowrap;color:#63408c}.opinion-details{font-size:13px;margin-top:8px}.opinion-details summary{cursor:pointer;line-height:1.8}.join-actions{margin-top:12px}.join-actions>.button{width:100%}#room-code{scroll-margin-block:calc(var(--header-height) + 12px)16px}body[data-screen=join]{scroll-padding-top:0}html:has(body[data-screen=join]){scroll-padding-top:0}body[data-screen=home] .game-shell{max-width:660px;padding-top:calc(var(--header-height) + 48px)}body[data-screen=home] #stage{background:0 0;border:0;box-shadow:none;padding:12px 4px;min-height:0}body[data-screen=home] .section-head{color:#fff;margin-bottom:28px}body[data-screen=home] .section-head h2{font-size:28px}body[data-screen=home] .section-head .sub{color:#e1d4f1}body[data-screen=home] .home-menu{gap:18px}body[data-screen=home] .home-menu>.button{border-radius:18px;min-height:82px}body[data-screen=home] .home-menu>.button:not(.secondary){background:#f4ecff;color:#583385;border-color:#fff;box-shadow:0 4px #a786cd}.results-heading{margin-top:28px;font-size:18px}@media(max-width:700px){.answer-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px}.panel{padding:18px 14px;border-width:1px;border-radius:20px}.lobby-actions{padding:0}.players{grid-template-columns:minmax(0,1fr)!important}.score-row{font-size:14px}.score-row strong{font-size:14px;white-space:nowrap}.vote-row{display:flex;align-items:flex-start}.vote-answer{flex:1}.result-detail .ballot-card{padding:12px}.result-detail>summary{font-size:14px}.host-controls{gap:8px}.host-controls .button{flex:1;font-size:12px}}.home-menu{gap:14px}.home-menu>.button{min-height:68px;padding:14px 16px;font-size:17px}.home-menu>.button.secondary{background:linear-gradient(135deg,#ffe6aa,#ffd079);border-color:#ffe8b8;color:#583818;box-shadow:0 4px #b78335}.mode-tag{margin-inline-start:auto;flex:none;border-radius:9px;padding:3px 8px;background:#ffffff26;color:inherit;font-size:12px;white-space:nowrap}.home-menu>.button.secondary .mode-tag{background:#ffffff80}@media(max-width:380px){.home-menu>.button{padding:12px 10px;font-size:14px;gap:7px}.home-menu>.button .button-icon{width:24px;height:24px}.mode-tag{font-size:11px;padding:3px 6px}}@media(min-width:851px){#action-dock{position:sticky;bottom:16px;margin:16px auto 0;max-width:100%;border:1px solid #ffffff30;border-radius:16px;padding:10px 12px;box-shadow:0 8px 22px #20113530}body[data-screen=writing] .game-shell,body[data-screen=join] .game-shell{padding-bottom:24px}}#header-actions{position:relative}.pause-menu{position:relative}.pause-menu-trigger{display:flex;align-items:center;justify-content:center;min-height:40px;padding:7px 10px;border:1px solid #fff5;border-radius:10px;background:#ffffff16;color:#fff;font-size:12px;cursor:pointer;list-style:none;white-space:nowrap}.pause-menu-trigger::-webkit-details-marker{display:none}.pause-menu-trigger:focus-visible{outline:3px solid #ffdc80;outline-offset:3px}.pause-menu-actions{position:absolute;top:calc(100% + 8px);inset-inline-end:0;z-index:110;display:grid;gap:8px;min-width:180px;padding:10px;border:1px solid #d8c5ed;border-radius:14px;background:#fff;box-shadow:0 12px 28px #20113540}.pause-menu-actions .button{width:100%;min-height:44px;padding:8px 12px;font-size:13px;box-shadow:none}.page-navigation{flex-wrap:wrap;gap:8px}body[data-screen=searching] .section-head:has(+.match-found):before{display:none}.match-found{margin:8px 0 20px;padding:24px 16px;overflow:hidden;text-align:center;color:#fff;border:2px solid #a987e3;border-radius:22px;background:radial-gradient(circle at 50% 0,#a37ad5,transparent 65%),linear-gradient(145deg,#6442a3,#34245f)}.match-found-players{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px}.match-found-player{display:grid;justify-items:center;gap:6px;flex:1 1 90px;max-width:160px;min-width:0;font-weight:700}.match-player-name{max-width:100%;overflow-wrap:anywhere}.match-avatar{display:grid;place-items:center;width:52px;height:52px;border:2px solid #fff3c8;border-radius:18px;background:#ffd579;color:#644192;font-size:27px;box-shadow:0 4px #aa792f}.match-versus{color:#ffdc83;font-size:18px;font-weight:900;direction:ltr}.match-countdown-found{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:5px;margin-top:22px;color:#f9edff}.match-countdown-number{display:grid;place-items:center;width:58px;height:58px;border:2px solid #fff0b4;border-radius:50%;background:#ffd36e;color:#503176;font-size:32px;line-height:1;box-shadow:0 0 0 7px #ffffff18;font-variant-numeric:tabular-nums}.match-countdown-label{font-size:15px;font-weight:700}@media(prefers-reduced-motion:no-preference){.match-countdown-number{animation:match-count-pulse 1s ease-in-out infinite}}@keyframes match-count-pulse{50%{transform:scale(1.08)}}body[data-screen=finished] .result-detail .ballot-card,body[data-screen=ended] .result-detail .ballot-card{padding:18px}body[data-screen=finished] .current-scores,body[data-screen=ended] .current-scores{padding:18px;border:1px solid #e3dbe9;border-radius:16px;background:#fff}@media(min-width:851px){body[data-screen=finished] #action-dock:not([hidden]){position:fixed;bottom:0;margin:0;max-width:none;border-radius:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))}}.vote-row{padding:14px 16px;border:1px solid #e9e0f0;border-radius:14px;background:#f8f6fc}.own-answers>.vote-row{margin-top:10px}.vote-answer{gap:5px}.vote-answer>strong{color:#352454;line-height:1.6}.vote-answer>small{line-height:1.7}.answer-score{flex:initial;padding:4px 10px;border-radius:10px;background:#eee5fa;text-align:center;white-space:normal;overflow-wrap:anywhere}@media(max-width:380px){.vote-row{padding:12px 14px}}.rematch-status{margin:20px 0;padding:16px;border:1px solid #decfed;border-radius:16px;background:#f8f3ff}.rematch-status h3{margin:0 0 4px;font-size:16px}.rematch-status .rematch-summary{margin:0 0 12px;font-size:13px}.rematch-players{display:grid;gap:8px}.rematch-player{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border:1px solid #e6dced;border-radius:10px;background:#fff;font-size:14px}.rematch-player-name{min-width:0;overflow-wrap:anywhere}.rematch-player-state{flex:none;color:#766b80;font-size:13px}.rematch-player.is-ready{border-color:#b9ddc7;background:#f0fbf3}.rematch-player.is-ready .rematch-player-state{color:#246b42;font-weight:700}#action-dock .rematch-confirmed:disabled{opacity:1;background:#e1f5e7;border-color:#afd8bd;color:#246b42}.toast-stack{position:fixed;z-index:1001;top:calc(16px + env(safe-area-inset-top,0px));inset-inline:16px;display:grid;justify-items:center;gap:8px;pointer-events:none}.ready-toast{max-width:min(100%,420px);padding:10px 16px;border:1px solid #b6dfc5;border-radius:14px;background:#f1fff5;color:#205d3a;font-weight:700;box-shadow:0 8px 26px #0004;text-align:center;overflow-wrap:anywhere}.round-transition{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:24px;background:#100a1df7;color:#fff;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .35s ease,visibility 0s linear .35s}.round-transition.is-visible{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .35s ease}.round-transition-content{display:grid;justify-items:center;gap:14px;text-align:center;font-size:17px;font-weight:700}#round-transition-count{display:grid;place-items:center;min-height:108px;color:#ffda80;font-size:88px;line-height:1;font-variant-numeric:tabular-nums}@media(prefers-reduced-motion:reduce){.round-transition{transition:none}}.ready-toast.error-toast{background:#fff0f0;border-color:#edc3cb;color:#a52d42}