:root{--ink:#332153;--violet:#6544a9;--lavender:#ede4fb;--paper:#fff;--line:#e4d8f6;--gold:#ffda82}
body{background:linear-gradient(150deg,#f9f4ff,#eee7fb);color:var(--ink)}
main{width:min(100%,42rem);margin-inline:auto;padding:16px;box-sizing:border-box}
main>header{display:grid;grid-template-columns:52px auto;grid-template-rows:auto auto;column-gap:12px;justify-content:center;align-items:center;margin:0 0 16px;padding:4px 0}
#owl{grid-row:1/3;margin:0}#owl svg{width:52px;height:48px;display:block}
header h1{margin:0;font-size:clamp(1.65rem,6vw,2.25rem);line-height:1.04}
header .brand-subtitle{margin:0;font-size:.81rem}header .brand-tagline{display:none}
#home{padding:0;background:transparent;box-shadow:none;border:0}
button{min-height:44px}
.primary-modes,.quick-modes,.utility-modes,.game-options{display:grid;gap:8px}
.primary-modes,.quick-modes,.game-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.primary-modes button{min-height:64px;font-weight:800;background:#62439d;color:white}
.quick-modes{margin:8px 0 12px}.quick-modes button,.utility-modes button{margin:0;padding:8px 5px}
.utility-modes{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px}
.install-game{display:block;margin:10px auto 0}
.home-panel{background:white;border:1px solid var(--line);border-radius:16px;padding:12px;margin:10px 0}
.home-panel h2{margin:0 0 9px;font-size:1.16rem}
.home-panel p,.game-options p{margin:5px 0}
.home-panel label,.game-options label,#onlineSetup label{display:block;font-weight:600}
#themes{margin:8px 0}#themes select,#onlineTheme{max-width:100%}
#themes>div{display:grid;gap:7px}
#catalogNote,#onlineCoverage,#nameHelp{font-size:.84rem;color:#55406f}
#multiStatus:empty,#entryError:empty,#onlineRoundError:empty{display:none}
#onlineEntry{margin-top:10px}
#onlineEntry input{width:100%;margin-bottom:4px}
#onlinePanel,#game{padding:9px}
#onlinePanel:has(#onlineRound:not([hidden])) #onlineTitle,#onlinePanel:has(#onlineRound:not([hidden]))>p,#onlinePanel:has(#onlineRound:not([hidden])) #onlinePlayers{display:none}
#onlinePanel h2{margin:0}#onlinePanel ol{padding:0;display:flex;flex-wrap:wrap;gap:5px;list-style:none}
#onlinePanel li{background:var(--lavender);border-radius:999px;padding:5px 10px;font-size:.84rem;overflow-wrap:anywhere}
#onlineSetup{padding:10px;margin-top:8px;border:1px solid var(--line);border-radius:14px}
#onlineSetup p{margin:5px 0}
#onlineProgress{font-size:.81rem;color:#55406f}
#onlineTime,#clock{white-space:nowrap;font-variant-numeric:tabular-nums}
#game .gamebar,#onlineRound .gamebar{margin:0;position:sticky;top:0;z-index:3;background:white;border-radius:10px}
#game h2,#duelStatus{margin:3px 0}
#ring,#onlineLetters,#resultsSpiral{display:block;width:min(100%,31dvh,310px);max-width:100%;height:auto;margin:1px auto}
#resultsSpiral{width:min(100%,215px)}
.spiral-track{fill:none;stroke:#e6d9f4;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.spiral-letter circle{fill:#7960b3;stroke:white;stroke-width:1.4}
.spiral-letter .gold{stroke:#f6cb65;stroke-width:3}
.spiral-letter.current circle,.spiral-letter.active circle{fill:#58358e;stroke:#e5ad46;stroke-width:3.2}
.spiral-letter.correct circle{fill:#32804e}.spiral-letter.wrong circle{fill:#ad414f}.spiral-letter.saved circle{fill:#496991}
.spiral-letter text{fill:white;font-weight:800;font-size:14px;pointer-events:none}
.spiral-letter[role=button]{cursor:pointer}.spiral-letter:focus circle{stroke:#28104b;stroke-width:3}
#questionCard,.question-card{background:#eee3fc;border:1px solid #d5c0ef;border-left:4px solid #7d55ba;border-radius:13px;padding:7px 10px;margin:4px 0;color:#332153}
#questionCard p,.question-card p{margin:3px 0;line-height:1.28}
#game #score,#game #milestone,#game #coinsGame{font-size:.78rem;margin:2px 0}
#form,#onlineAnswerForm{margin:3px 0}
#answer,#onlineAnswer{font-size:16px;min-height:40px;padding:6px 9px;width:100%;margin:0}
#onlineAnswerForm .row,#form .row{margin-top:4px;gap:6px}
#onlineSubmit{margin-top:4px}#game .hintrow{margin:3px 0}#game .finishrow{margin:3px 0}
body:has(#onlineRound:not([hidden])) main>header,body:has(#game:not([hidden])) main>header{display:none}
body.esp-keyboard #ring,body.esp-keyboard #onlineLetters{width:min(100%,clamp(54px,calc(var(--usable-height) - 262px),145px))}
body.esp-keyboard #game #milestone,body.esp-keyboard #game #coinsGame{display:none}
body.esp-keyboard #onlinePanel>div.row{display:none}
@media(min-height:750px){#ring,#onlineLetters{width:min(100%,34dvh,320px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:0s!important}}
body.esp-keyboard #onlineRound,body.esp-keyboard #game{
 position:fixed;inset:auto 0 auto;top:var(--viewport-top,0px);
 max-width:42rem;max-height:var(--usable-height);width:100%;margin:auto;padding:6px 9px;
 box-sizing:border-box;overflow:auto;overscroll-behavior:contain;background:white;z-index:5;
}
body.esp-keyboard #onlineRound #onlineLetters,body.esp-keyboard #game #ring{height:auto;max-height:145px}
