body{background:#0f172a;color:#f1f5f9}.web-game{width:100%;margin-inline:auto;min-height:100dvh;font-family:system-ui,-apple-system,sans-serif}.web-loading,.web-start,.web-storage-error{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem;padding:clamp(1.25rem,4vw,4rem);text-align:center;background:radial-gradient(ellipse at top,#312e81,#0f172a 75%)}.web-start h1,.web-storage-error h1{font-size:clamp(2rem,5vw,4rem);font-weight:900}.web-eyebrow{color:#c4b5fd;letter-spacing:.12em;font-weight:700}.web-intro{max-width:42rem;font-size:clamp(1.1rem,2vw,1.5rem)}.web-save-notice{max-width:42rem;color:#cbd5e1;line-height:1.6}.web-help{max-width:44rem;text-align:left;padding:1rem;border:1px solid #64748b;border-radius:1rem}.web-help summary{cursor:pointer;padding:.25rem;font-weight:700}.web-help p{margin-top:.8rem;line-height:1.6}.web-start-audio{display:flex;align-items:center;gap:.75rem}.web-play,.web-storage-error button{background:#7c3aed;color:#fff;border:2px solid #c4b5fd;border-radius:1rem;padding:1rem 2rem;font-size:1.25rem;font-weight:800}.web-play:disabled{opacity:.65;cursor:wait}.web-storage-error p{max-width:42rem;line-height:1.6}.web-game a,.web-storage-error a{text-decoration:underline;text-underline-offset:.2em}.web-game--playing{height:100dvh;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.web-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.5rem 1rem;padding:.5rem max(.75rem,env(safe-area-inset-left));background:#0f172a;border-bottom:1px solid #475569}.web-toolbar a,.web-toolbar button{min-height:44px;display:inline-flex;align-items:center;padding:.5rem}.web-toolbar-help{flex-basis:100%;max-width:65rem;margin-inline:auto;line-height:1.5}.web-app{position:relative;min-width:0;min-height:0;color:#292447}.web-app .web-screen-host>:first-child,.web-app>.game-controls{height:100%;min-height:0!important;max-height:100%!important}.web-app .web-screen-host>:first-child{height:100%!important}.web-app .web-screen-host{height:100%}.web-game :where(button,a,summary):focus-visible,.web-storage-error :where(button,a):focus-visible{outline:3px solid #facc15;outline-offset:3px}.web-game .touch-action-none{touch-action:pinch-zoom}@media (min-width:1024px) and (min-height:600px){.web-app [data-screen=achievements] .web-screen-host>:first-child,.web-app [data-screen=progress] .web-screen-host>:first-child,.web-app [data-screen=settings] .web-screen-host>:first-child,.web-lessons{padding-inline:max(1.5rem,calc((100% - 1360px) / 2))!important}.web-lesson-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem;align-content:center;min-height:100%;padding:1rem}.web-lesson-choices>:first-child{grid-column:1/-1}.web-lesson-choices>*{margin-block:0!important}.web-lesson-choices>button{min-height:160px}.web-lesson-choices h3{font-size:1.35rem!important}.web-game [data-testid=lesson-panel]{max-width:960px;margin-block:auto;padding:2rem}.web-game [data-testid=lesson-content]{font-size:1.2rem}.web-practice-table{width:min(100%,1100px);margin-inline:auto}.web-practice-table .font-mono{font-size:1.3rem;line-height:1.6}.web-practice-round{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:1rem;width:min(100%,1400px);margin-inline:auto}.web-practice-round>:first-child{grid-column:1/-1}.web-practice-question{grid-column:1;grid-row:2;align-self:center}.web-practice-question+.text-center{grid-column:1;grid-row:3}.web-practice-input{grid-column:2;grid-row:2/4;align-self:center;margin-top:0}.web-practice-input>div{max-width:480px;gap:.75rem}.web-practice-input button{height:clamp(64px,10dvh,90px);font-size:2rem}.web-game [data-testid=battle-screen][data-phase=table_review] .max-w-md{max-width:1000px}.web-game [data-testid=battle-screen][data-phase=battle_end] .max-w-md{max-width:640px}}@media (orientation:landscape) and (min-width:640px) and (max-height:550px){.web-practice-round{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:.5rem}.web-practice-round>:first-child{grid-column:1/-1}.web-practice-question{grid-column:1;grid-row:2;align-self:center;padding:.75rem}.web-practice-question+.text-center{grid-column:1;grid-row:3;margin:0;font-size:.75rem}.web-practice-question p{font-size:1.75rem;margin-bottom:.25rem}.web-practice-input{grid-column:2;grid-row:2/4;align-self:center;margin:0}.web-practice-input>div{grid-template-columns:repeat(6,minmax(44px,1fr));max-width:none;gap:4px}.web-practice-input button{height:44px;font-size:1.25rem}}@media (prefers-reduced-motion:reduce){.web-game *,.web-game :after,.web-game :before{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}@media (orientation:landscape) and (min-width:640px) and (max-height:350px){.web-practice-round{min-height:0;gap:.25rem}.web-practice-round>:first-child{margin-bottom:0}.web-practice-question{padding:.375rem}.web-practice-question p{font-size:1.5rem;line-height:1.1}.web-practice-question>.flex{margin-bottom:0}.web-practice-question>.flex>div{height:32px;font-size:1.25rem}}}