@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root{--font:'Outfit','Noto Sans KR','Malgun Gothic',sans-serif;--ink:#254437;--cream:#fff7da;--gold:#e5c77c;--dock-height:calc(100px + env(safe-area-inset-bottom,0px))}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{background:#173b2b;color:var(--ink);font:14px var(--font);-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:0;background:none}button:disabled{cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ffe5a0;outline-offset:3px}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}svg use{pointer-events:none}[hidden]{display:none!important}.svg-library{position:absolute;width:0;height:0;overflow:hidden}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.game-shell{--realm-x:0%;--realm-y:0%;--focus-width:720px;--focus-left:max(20px,env(safe-area-inset-left,0px));--focus-right:max(20px,env(safe-area-inset-right,0px));position:relative;display:grid;grid-template-rows:minmax(0,1fr) var(--dock-height);width:100vw;height:100dvh;overflow:hidden;background:#143b2d}
.game-shell:fullscreen{width:100vw;height:100dvh}.game-shell[data-biome="1"]{--realm-x:100%}.game-shell[data-biome="2"]{--realm-y:100%}.game-shell[data-biome="3"]{--realm-x:100%;--realm-y:100%}
.battle-viewport{position:relative;min-width:0;min-height:0;overflow:hidden;isolation:isolate;background:#487759 url('assets/realms.png') var(--realm-x) var(--realm-y)/200% 200%}
.game-shell:has(.game-overlay[data-mode="camp"]:not([hidden])) .battle-viewport{z-index:20}
.battle-viewport:after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;box-shadow:inset 0 0 60px #14382d40;background:linear-gradient(#102c3226,transparent 20%,transparent 86%,#143d3026)}
.battle-viewport canvas{position:relative;z-index:1;display:block;width:100%;height:100%}
.battle-topbar{position:absolute;z-index:6;top:max(14px,env(safe-area-inset-top,0px));left:max(20px,env(safe-area-inset-left,0px));right:max(20px,env(safe-area-inset-right,0px));display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px;align-items:start;pointer-events:none;color:#fff8df}
.hero-hud{display:flex;align-items:center;gap:11px;min-width:0;filter:drop-shadow(0 2px 3px #12352d55)}
.hero-portrait{position:relative;width:50px;height:52px;border:2px solid #e1c477;border-radius:15px;background:#264a3b;box-shadow:0 0 0 3px #16372ed9;flex-shrink:0}
.portrait-art{position:absolute;inset:0;overflow:hidden;border-radius:12px}.hero-portrait img{position:absolute;width:1800%;height:900%;max-width:none;left:-105%;top:-85%;pointer-events:none}
.hero-level{position:absolute;right:-8px;bottom:-5px;z-index:1;padding:3px 6px;border:1px solid #c6b071;border-radius:6px;background:#173c31;color:#e2d9a4;font-size:9px;font-weight:600;line-height:1;white-space:nowrap}.hero-level b{font-size:12px;margin-left:2px;color:#fff0b8}
.hero-vitals{width:151px;min-width:0}.vital-track{position:relative;overflow:hidden;height:17px;border:2px solid #263c2f;border-radius:8px;background:#65382f;box-shadow:0 1px 0 #c8b96955}
.vital-fill{height:100%;width:100%;border-radius:5px;background:linear-gradient(#fa856b,#d64a43);box-shadow:inset 0 1px 0 #ffb69b;transition:width .15s}
.vital-track>span{position:absolute;inset:0;display:grid;place-items:center;font-size:10px;line-height:1;color:#fff4df;text-shadow:0 1px 2px #74352d}.vital-track b{font-weight:600;font-variant-numeric:tabular-nums}
.stage-hud{width:174px;padding:9px 12px 8px;border:1px solid #b9c27d99;border-radius:10px;background:#173f33de;box-shadow:0 3px 10px #0c342c33,inset 0 1px 0 #e5ecc323;overflow:hidden}
.stage-hud>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:18px}.stage-hud>div>span{font-size:9px;letter-spacing:1.4px;color:#d4ddb4;white-space:nowrap}.stage-hud>div>span b{font-size:17px;letter-spacing:.7px;color:#ffebaa;font-weight:600;margin-left:3px}
.stage-hud strong{display:flex;align-items:center;gap:4px;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}.stage-hud strong svg{width:13px;height:13px;color:#a8c29c}.stage-hud small{font-size:10px;color:#b5c7a6;font-weight:400;white-space:nowrap}
.stage-progress{height:3px;margin-top:7px;border-radius:3px;background:#0c2c25;overflow:hidden}.stage-progress>div{height:100%;width:0;border-radius:3px;background:linear-gradient(90deg,#87d8a5,#ebd88d);transition:width .2s}
.battle-utilities{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0;padding-top:4px}
.coin-hud{display:flex;align-items:center;gap:6px;min-width:50px;max-width:120px;padding:7px 10px;border:1px solid #c3bb7b80;border-radius:18px;background:#173c30d9;box-shadow:0 2px 5px #12382b33;color:#ffe69b;font-size:15px;line-height:1}
.coin-hud svg{width:19px;height:19px;color:#edcc73;fill:#c6a44c22}.coin-hud strong{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:600;font-variant-numeric:tabular-nums}
.hud-actions{display:flex;gap:6px;pointer-events:auto}.battle-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid #b4bc8399;border-radius:10px;background:linear-gradient(#31573fe8,#193e32eb);box-shadow:0 2px 0 #14362ce6,inset 0 1px 0 #d7e3a326;color:#f0e4af;transition:filter .15s,transform .15s}.battle-icon svg{width:18px;height:18px}.battle-icon:hover{filter:brightness(1.15)}.battle-icon:active{transform:translateY(1px)}#fullscreenButton[aria-pressed=true]{background:#547349;color:#fff1ae}
.skill-banner{position:absolute;z-index:3;top:21%;left:50%;max-width:90%;transform:translate(-50%,6px);color:#fff2bd;font-size:25px;font-weight:900;text-align:center;text-shadow:0 2px 0 #354d3a,0 0 12px #326e5555;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.skill-banner.visible{opacity:1;transform:translate(-50%,0)}
.combo-skill-cue{--combo-color:#9df4ee;--combo-deep:#226c74;position:absolute;z-index:4;top:clamp(76px,12vh,128px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:15px;width:330px;max-width:calc(100% - 28px);padding:12px 22px 12px 14px;border:1px solid #c6e9cba6;border-left:3px solid var(--combo-color);border-radius:5px 17px 17px 5px;background:linear-gradient(110deg,#153f38ed,#173f38d9 75%,#244e3ce8);box-shadow:0 5px 24px #072a2d55,inset 0 1px 0 #edffdf1a;color:#fff4d3;pointer-events:none;animation:combo-cue-enter .24s ease-out}
.combo-skill-cue[data-type=lightning]{--combo-color:#b0cfff;--combo-deep:#4b63ac}.combo-skill-cue[data-type=ultimate]{--combo-color:#ffe19a;--combo-deep:#a47c36;border-color:#edce8eaa;background:linear-gradient(110deg,#4c4930ee,#294633e6 80%)}
.combo-skill-emblem{display:grid;place-items:center;position:relative;width:52px;height:52px;flex-shrink:0;border:1px solid var(--combo-color);border-radius:50%;background:radial-gradient(var(--combo-deep),#173f36 75%);box-shadow:0 0 18px color-mix(in srgb,var(--combo-color) 28%,transparent),inset 0 0 0 4px #e4ffd910;color:var(--combo-color)}
.combo-skill-emblem:after{content:'✦';position:absolute;right:-4px;bottom:-5px;font-size:15px;color:var(--combo-color)}.combo-skill-emblem svg{display:none;width:29px;height:29px;filter:drop-shadow(0 0 4px var(--combo-color));stroke-width:1.8}.combo-skill-cue[data-type=slash] .combo-icon-slash,.combo-skill-cue[data-type=lightning] .combo-icon-lightning,.combo-skill-cue[data-type=ultimate] .combo-icon-ultimate{display:block}
.combo-skill-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.combo-skill-copy>small{color:var(--combo-color);font-size:10px;letter-spacing:2px;font-weight:700}.combo-skill-copy>small b{font-size:15px;letter-spacing:0}.combo-skill-copy>strong{font-size:26px;line-height:1.3;font-weight:900;letter-spacing:-.4px;white-space:nowrap;text-shadow:0 2px 0 #173b33}.combo-skill-results{display:flex;gap:17px;margin-top:2px;font-size:11px;line-height:1.4;color:#bfd2b9}.combo-skill-results b{font-size:14px;margin-left:4px;color:#fff2bb;font-weight:800;font-variant-numeric:tabular-nums}
.combo-skill-results>span{display:inline-flex;align-items:center;gap:5px}.combo-skill-results svg{width:14px;height:14px}.combo-skill-results>span>b{margin-left:0}
.battle-viewport:has(#comboSkillCue:not([hidden])) .skill-banner,.battle-viewport:has(#comboSkillCue:not([hidden])) .burst-indicator{visibility:hidden}
@keyframes combo-cue-enter{from{opacity:0;translate:0 8px;scale:.96}to{opacity:1;translate:0 0;scale:1}}
@media(max-width:650px){.combo-skill-cue{top:72px;width:292px;padding:9px 14px 9px 12px;gap:11px}.combo-skill-emblem{width:42px;height:42px}.combo-skill-emblem svg{width:25px;height:25px}.combo-skill-copy>strong{font-size:22px}.combo-skill-copy>small{font-size:8px}.combo-skill-copy>small b{font-size:13px}.combo-skill-results{font-size:10px;gap:13px}.combo-skill-results b{font-size:12px}}
@media(max-height:500px){.combo-skill-cue{top:auto;bottom:12px;left:auto;right:12px;transform:none;width:255px;padding:7px 12px;gap:10px}.combo-skill-emblem{width:36px;height:36px}.combo-skill-emblem svg{width:22px;height:22px}.combo-skill-copy>strong{font-size:20px}.combo-skill-copy>small{font-size:8px;line-height:1}.combo-skill-results{font-size:9px;gap:12px;margin-top:0}.combo-skill-results b{font-size:12px}}
@media(prefers-reduced-motion:reduce){.combo-skill-cue{animation:none}}
.combo-hud{position:absolute;z-index:3;right:5%;top:26%;display:flex;align-items:baseline;gap:5px;color:#ffe39a;text-shadow:0 2px 2px #6c4c2d,0 0 15px #183c2e66;pointer-events:none}.combo-hud>b{font-size:39px;font-style:italic;line-height:1;font-weight:800}.combo-hud>span{font-size:11px;font-style:italic;font-weight:800;letter-spacing:.5px}
.burst-indicator{position:absolute;z-index:3;left:50%;bottom:16px;transform:translateX(-50%);width:156px;padding:8px 12px;border:1px solid #c4d28c8c;border-radius:10px;background:#193f32df;box-shadow:0 3px 10px #12372c44;color:#ffebae;text-align:center;pointer-events:none}.burst-word{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#bdcfac;margin-bottom:2px}.burst-indicator>strong{font-size:14px;font-weight:700}.burst-track{height:3px;overflow:hidden;border-radius:3px;background:#0c3027;margin-top:6px}.burst-track>div{height:100%;width:0;background:linear-gradient(90deg,#80d8bf,#eee3a1);border-radius:3px;transition:width .08s linear}
.movement-pad{display:none;position:absolute;z-index:3;left:max(18px,env(safe-area-inset-left,0px));bottom:18px;grid-template-columns:repeat(3,40px);grid-template-rows:repeat(3,40px);gap:5px;touch-action:none;user-select:none}.movement-pad button{display:grid;place-items:center;border:1px solid #c3cf9a80;border-radius:9px;background:#1e493bd9;box-shadow:0 2px 0 #12382d88;color:#ecedbf;font-size:23px;touch-action:none}.movement-pad button:active,.movement-pad button.pressed{background:#779568;color:#fff5bd}.movement-pad button[data-move=up]{grid-area:1/2}.movement-pad button[data-move=left]{grid-area:2/1}.movement-pad button[data-move=right]{grid-area:2/3}.movement-pad button[data-move=down]{grid-area:3/2}.movement-pad>span{grid-area:2/2;display:grid;place-items:center;color:#e1e1a477;font-size:13px}

.typing-dock{position:relative;z-index:6;min-width:0;min-height:0;padding:6px var(--focus-right) calc(6px + env(safe-area-inset-bottom,0px)) var(--focus-left);border-top:1px solid #c9c17a7a;background:linear-gradient(#234d3c,#173e31);box-shadow:0 -6px 24px #12382b33,inset 0 1px 0 #d4dd9c1a;color:#fff5cf}
.typing-inner{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:28px minmax(0,1fr);gap:4px;align-items:center;height:100%;max-width:var(--focus-width);margin:0 auto}
.sentence-context{position:relative;grid-column:1/-1;min-width:0;max-width:100%;height:28px;color:#c8d9bc}.sentence-window{width:100%;height:100%;overflow:hidden;mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent)}.sentence-trail{position:relative;display:flex;align-items:center;gap:8px;width:max-content;min-width:0;margin:0;white-space:nowrap;font-size:24px;line-height:28px;will-change:transform;pointer-events:none}.sentence-trail>span{flex-shrink:0;padding:0 3px;border-radius:4px}.sentence-trail>[data-status=done]{color:#bfd5b6}.sentence-trail>[data-status=upcoming]{color:#abc7ab}.sentence-trail>[data-status=current]{background:#d8df9a24;box-shadow:inset 0 -2px #e8d18b;color:#ffedb8;font-weight:800}.sentence-progress{flex-shrink:0;font-size:14px;line-height:28px;font-variant-numeric:tabular-nums;color:#c6d4aa}
.sentence-meta{position:absolute;z-index:1;top:0;right:0;display:flex;align-items:center;gap:10px;height:100%;padding-left:12px;background:linear-gradient(90deg,#234d3c00,#234d3c 12px);color:#b9cba7}.target-hint{display:flex;align-items:center;gap:3px;padding:3px 6px;border:1px solid #95b48266;border-radius:7px;color:#dbe3ac;font-size:10px;white-space:nowrap}.target-hint svg{width:13px;height:13px}.target-hint b{font-size:12px;font-weight:700;color:#ffe8a0}
#typingForm{min-width:0;margin:0}.input-shell{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;height:54px;padding:0 8px;border:1px solid #c4d7ba;border-radius:10px;background:#fffef2;box-shadow:0 3px 0 #0f3127,0 0 0 4px #456b4e44;color:#7d9478;transition:box-shadow .15s,border-color .15s}.input-shell>svg{width:22px;height:22px;justify-self:center;opacity:.7}.input-shell input{width:100%;min-width:0;height:100%;padding:0;border:0;outline:none;background:transparent;color:#264f3b;text-align:center;font-size:40px;line-height:1.2;font-weight:600;letter-spacing:.4px}.input-shell input::placeholder{color:#a7b19c;font:inherit;letter-spacing:inherit;opacity:1}.input-shell input:disabled{opacity:.55}.input-shell:focus-within{border-color:#d8ed9b;box-shadow:0 3px 0 #0f3127,0 0 0 4px #c3d68d2b}.input-shell:has(input[data-ready=true]){border-color:#d6bc66;box-shadow:0 3px 0 #0f3127,0 0 0 4px #efda8c29}.attack-submit{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;border:1px solid #719066;border-radius:7px;background:linear-gradient(#6f9763,#4b7d54);color:#fff3c9;box-shadow:0 2px 0 #365e40}.attack-submit svg{width:24px;height:24px}.typing-dock:has(#typedFeedback.error) .input-shell{border-color:#e28d79;box-shadow:0 3px 0 #623a2e,0 0 0 4px #e9906d24}




.game-overlay{position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:20px;background:#143d2d47;backdrop-filter:blur(3px)}
.overlay-card{position:relative;width:360px;max-width:100%;max-height:calc(100% - 16px);overflow:auto;padding:25px 27px 26px;border:1px solid #d7c183;border-radius:19px;background:linear-gradient(145deg,#fffdf0f7,#edf0dff2);box-shadow:0 14px 50px #10352766,inset 0 0 0 4px #ffffff70;text-align:center;scrollbar-width:thin}
.overlay-symbol{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 14px;border:1px solid #bccea6;border-radius:15px;background:#e1e9cd;color:#496e4b}.overlay-symbol svg{width:27px;height:27px}
.overlay-card h2{margin:0 0 9px;white-space:pre-line;color:#294f3a;font-size:26px;line-height:1.35;font-weight:800;letter-spacing:-.8px}.overlay-card>p{margin:0 0 20px;color:#74856b;font-size:12px;line-height:1.7}
.primary-button{display:flex;align-items:center;justify-content:center;gap:24px;width:100%;min-height:44px;padding:10px 20px;border:1px solid #356544;border-radius:9px;background:linear-gradient(#518954,#2b6947);box-shadow:0 3px 0 #214d34,inset 0 1px 0 #accb8b66;color:#fff5d4;font-size:15px;font-weight:700}.primary-button svg{width:18px;height:18px}.primary-button:hover{filter:brightness(1.1)}.primary-button:active{transform:translateY(2px);box-shadow:0 1px 0 #214d34}
.overlay-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 20px;padding:12px 0;border-top:1px solid #ced9ba;border-bottom:1px solid #ced9ba}.overlay-stats:empty{display:none}.overlay-stats>div{display:flex;flex-direction:column;gap:3px}.overlay-stats strong{font-size:20px;color:#43734b}.overlay-stats span{font-size:10px;color:#8f9a7d}

dialog{position:fixed;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:0;overflow:auto;border:1px solid #d0bd86;border-radius:19px;background:linear-gradient(145deg,#fffdf0,#edf1df);box-shadow:0 18px 70px #052d2899;color:#31523c;scrollbar-width:thin}dialog::backdrop{background:#0c332b99;backdrop-filter:blur(6px)}
.settings-panel,.help-content{padding:23px 24px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-heading h2{margin:0;font-size:23px;line-height:1.2;letter-spacing:1px;font-weight:800}.dialog-close{display:grid;place-items:center;width:31px;height:31px;border:1px solid #c9d3b6;border-radius:9px;background:#e5ebd6;color:#76916b;font-size:25px;font-weight:400;line-height:1}
.game-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:23px}.game-options>label{display:flex;flex-direction:column;gap:7px;color:#7b8b6d;font-size:12px}.game-options select{width:100%;height:38px;padding:0 10px;border:1px solid #c9d5b7;border-radius:8px;background:#fcfff3;color:#496642;font-size:13px;cursor:pointer}.game-options select:disabled{opacity:.6;cursor:not-allowed}
.practice-settings{margin-top:23px}.practice-settings h3{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:#5b7851;font-size:14px}.practice-settings h3 svg{width:17px;height:17px}.practice-settings .game-options{margin-top:0}.practice-note{margin:9px 0 0;color:#849474;font-size:10px;line-height:1.6}.practice-switch{margin-top:12px;padding:13px;border:1px solid #bacb9c;border-radius:10px;background:#e8efd9}.practice-switch>strong{display:block;color:#426a43;font-size:13px;line-height:1.5}.practice-switch>p{margin:7px 0 12px;color:#738666;font-size:11px;line-height:1.65}.practice-switch-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.practice-switch-actions button{min-height:37px;padding:7px 10px;border:1px solid #c5d2b0;border-radius:7px;background:#f4f7e9;color:#728568;font-size:11px}.practice-switch-actions #practiceSwitchButton{display:flex;align-items:center;justify-content:center;gap:9px;padding:8px 14px;border-color:#285f43;background:#2c754f;color:#fff9df;font-size:12px;font-weight:700}.practice-switch-actions #practiceSwitchButton svg{width:17px;height:17px}.practice-switch-actions #practiceSwitchButton:hover{background:#236443}.practice-switch-actions button:focus-visible{outline:3px solid #a0b86c;outline-offset:3px}.game-options>label{min-width:0}
.practice-text-settings{margin-top:12px;border:1px solid #d3dcc0;border-radius:9px;background:#f5f8ea}.practice-text-settings>summary{display:flex;align-items:center;gap:7px;min-height:39px;padding:9px 10px;list-style:none;color:#5b7851;font-size:12px;font-weight:600;cursor:pointer}.practice-text-settings>summary::-webkit-details-marker{display:none}.practice-text-settings>summary svg{width:16px;height:16px}.practice-text-settings>summary>span{margin-left:auto;padding:3px 6px;border-radius:5px;background:#e4ecd5;color:#7c8e69;font-size:9px;font-weight:500}.practice-text-settings>summary:after{content:'⌄';color:#8c9d7a;font-size:17px;line-height:1}.practice-text-settings:not([open])>summary:after{transform:rotate(-90deg)}.practice-text-panel{padding:0 10px 10px}.practice-text-panel label{display:flex;flex-direction:column;gap:6px;min-width:0;color:#7b8b6d;font-size:11px}.practice-text-panel select{width:100%;height:35px;padding:0 8px;border:1px solid #c9d5b7;border-radius:7px;background:#fcfff3;color:#496642;font-size:12px;cursor:pointer}.practice-text-panel #customTextPanel{margin-top:11px}.custom-text-label{display:flex;align-items:center;justify-content:space-between;gap:8px}.custom-text-label small{color:#668257;font-size:10px}.practice-text-panel textarea{display:block;width:100%;min-width:0;max-width:100%;height:120px;min-height:80px;max-height:280px;padding:9px 10px;overflow:auto;resize:vertical;border:1px solid #c9d5b7;border-radius:7px;background:#fffef4;color:#31523c;font:13px/1.6 var(--font);text-align:start;overflow-wrap:break-word}.practice-text-panel textarea::placeholder{color:#96a486}.practice-text-panel textarea:focus-visible,.practice-text-panel select:focus-visible{outline:2px solid #a5bc7a;outline-offset:2px}.practice-text-panel textarea[aria-invalid=true]{border-color:#bd8067}.practice-text-panel #practiceTextStatus,.practice-text-help{margin:7px 0 0;color:#8a987d;font-size:10px;line-height:1.6;overflow-wrap:anywhere}.practice-text-panel #practiceTextStatus[data-error=true]{color:#b05d45}
.difficulty-preview{margin-top:12px;padding:12px;border:1px solid #d3dcc0;border-radius:9px;background:#edf2e1}.difficulty-preview>strong{color:#496c43;font-size:12px}.difficulty-preview>p{margin:5px 0 10px;color:#7d8e6b;font-size:10px;line-height:1.6}.difficulty-modifiers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.difficulty-modifiers>span{display:flex;flex-direction:column;gap:4px;align-items:center;padding:6px 3px;border:1px solid #dce4cc;border-radius:6px;background:#fffef1;color:#8a967a;font-size:9px}.difficulty-modifiers b{color:#4f7545;font-size:14px;line-height:1.2}.difficulty-preview[data-extreme=true]{border-color:#c99078;background:#f5e7d9}.difficulty-preview[data-extreme=true]>strong,.difficulty-preview[data-extreme=true] .difficulty-modifiers b{color:#a9533d}.difficulty-preview[data-extreme=true]>p{color:#9a7662}
.audio-settings{margin-top:20px;border-top:1px solid #d7dfc5}.audio-settings>summary{display:flex;align-items:center;gap:8px;min-height:44px;list-style:none;color:#5b7851;font-size:14px;font-weight:700;cursor:pointer}.audio-settings>summary::-webkit-details-marker{display:none}.audio-settings>summary svg{width:17px;height:17px}.audio-settings>summary:after{content:'⌄';margin-left:auto;color:#8c9d7a;font-size:18px}.audio-settings:not([open])>summary:after{transform:rotate(-90deg)}
.audio-panel{padding:3px 0 0}.audio-control{margin-bottom:13px}.audio-control label{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#809270;font-size:12px}.audio-control output{color:#5e8354;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}.audio-control input[type=range]{display:block;width:100%;height:18px;margin:6px 0 0;accent-color:#71975f;cursor:pointer;touch-action:pan-y}
.sound-toggles{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid #d7dfc5}.music-toggle{display:flex;align-items:center;gap:7px;color:#6b8560;font-size:12px;cursor:pointer}.music-toggle input{width:15px;height:15px;margin:0;accent-color:#71975f}.sound-toggle{display:flex;align-items:center;gap:6px;min-height:32px;padding:5px 10px;border:1px solid #bacda6;border-radius:7px;background:#e2edcf;color:#60844d;font-size:11px}.sound-toggle svg{width:15px;height:15px}.sound-toggle[aria-pressed=false]{opacity:.65;text-decoration:line-through}.audio-panel>p{min-height:16px;margin:12px 0 0;color:#97a486;font-size:10px;line-height:1.6}.audio-panel>p[data-error=true]{color:#b6775e}
.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid #d7dfc5}.settings-actions button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:37px;padding:7px;border:1px solid #cbd6b8;border-radius:8px;background:#e6edda;color:#68835a;font-size:12px}.settings-actions svg{width:16px;height:16px}
.help-dialog{width:min(460px,calc(100vw - 32px))}.help-content ol{list-style:none;padding:0;margin:23px 0 0}.help-content li{display:grid;grid-template-columns:46px minmax(0,1fr);gap:13px;align-items:start}.help-content li+li{margin-top:18px}.help-content li strong{font-size:13px;line-height:1.7;color:#4c794f}.help-content li span{font-size:12px;line-height:1.8;color:#849274}

@media(pointer:coarse),(max-width:680px){.movement-pad{display:grid}}
@media(max-width:680px){
  :root{--dock-height:calc(100px + env(safe-area-inset-bottom,0px))}
  .battle-topbar{top:max(10px,env(safe-area-inset-top,0px));left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));grid-template-columns:minmax(0,1fr) auto;gap:10px 8px}
  .hero-hud{gap:8px}.hero-portrait{width:39px;height:42px;border-radius:12px}.hero-level{font-size:7px;padding:3px 4px;bottom:-5px;right:-6px}.hero-level b{font-size:10px}.hero-vitals{width:110px}.vital-track{height:15px}.vital-track>span{font-size:8px}
  .stage-hud{grid-column:1/-1;grid-row:2;justify-self:center;width:158px;padding:6px 10px}.stage-hud>div:first-child{gap:13px}.stage-hud>div>span{font-size:8px}.stage-hud>div>span b{font-size:15px}.stage-hud strong{font-size:12px}.stage-hud small{font-size:9px}.stage-progress{margin-top:5px;height:2px}
  .battle-utilities{grid-column:2;grid-row:1;gap:7px;padding-top:3px}.coin-hud{max-width:88px;min-width:38px;padding:6px 7px;font-size:12px;gap:4px}.coin-hud svg{width:16px;height:16px}.hud-actions{gap:5px}.battle-icon{width:31px;height:31px;border-radius:8px}.battle-icon svg{width:16px;height:16px}
  .typing-dock{padding:8px var(--focus-right) calc(8px + env(safe-area-inset-bottom,0px)) var(--focus-left)}.typing-inner{grid-template-columns:minmax(0,1fr);grid-template-rows:28px minmax(0,1fr);gap:4px;align-content:center}.sentence-trail{font-size:22px;line-height:28px;gap:6px}.sentence-progress{font-size:12px;line-height:28px}.sentence-meta{gap:8px}.input-shell{grid-template-columns:40px minmax(0,1fr) 40px;height:50px;gap:8px;border-radius:9px}.input-shell input{font-size:34px}.input-shell>svg{width:20px;height:20px}.attack-submit{width:40px;height:40px}.attack-submit svg{width:22px;height:22px}
  .skill-banner{font-size:19px;top:25%}.combo-hud{right:5%;top:32%}.combo-hud>b{font-size:30px}.combo-hud>span{font-size:9px}.burst-indicator{bottom:16px;width:138px;padding:7px 10px}.burst-indicator>strong{font-size:12px}.burst-word{font-size:8px}
  .movement-pad{grid-template-columns:repeat(3,36px);grid-template-rows:repeat(3,36px);gap:4px;left:14px;bottom:17px}.movement-pad button{font-size:21px;border-radius:8px}
  .overlay-card{width:320px;padding:22px 24px}.overlay-card h2{font-size:23px}.overlay-card>p{font-size:11px}.overlay-symbol{width:43px;height:43px;margin-bottom:12px}.primary-button{min-height:42px;font-size:14px}
}
@media(max-width:380px){
  .battle-topbar{left:9px;right:9px;gap:9px 6px}.hero-portrait{width:33px;height:36px;border-radius:10px}.hero-hud{gap:7px}.hero-vitals{width:79px}.vital-track{height:13px;border-width:1px}.vital-track>span{font-size:7px}.hero-level{font-size:6px;padding:3px 4px}.hero-level b{font-size:9px}
  .battle-utilities{gap:5px;padding-top:1px}.coin-hud{max-width:65px;min-width:34px;gap:3px;padding:6px;font-size:11px}.coin-hud svg{width:13px;height:13px}.hud-actions{gap:4px}.battle-icon{width:28px;height:28px;border-radius:7px}.battle-icon svg{width:15px;height:15px}
  .stage-hud{width:149px;padding:5px 9px}.stage-hud>div>span b{font-size:14px}.stage-hud strong{font-size:11px}.stage-hud small{font-size:8px}
  .input-shell{height:50px}.input-shell input{font-size:32px}
  .movement-pad{grid-template-columns:repeat(3,32px);grid-template-rows:repeat(3,32px);gap:4px;left:12px;bottom:15px}.movement-pad button{font-size:19px}.burst-indicator{width:125px;bottom:16px;left:auto;right:12px;transform:none}.combo-hud{top:32%}.skill-banner{font-size:17px}
  .game-overlay{padding:16px}.overlay-card{padding:21px 20px}.overlay-card h2{font-size:21px}.overlay-card>p{font-size:10px}.overlay-stats strong{font-size:17px}.overlay-stats span{font-size:9px}
  .settings-panel,.help-content{padding:20px}.dialog-heading h2{font-size:21px}.game-options{gap:10px}.settings-actions{gap:8px}.settings-actions button{font-size:11px}
}
@media(max-height:460px) and (min-width:480px){
  :root{--dock-height:calc(96px + env(safe-area-inset-bottom,0px))}.typing-dock{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}.typing-inner{grid-template-columns:minmax(0,1fr);grid-template-rows:26px minmax(0,1fr);gap:4px;align-content:center}.sentence-trail{font-size:20px;line-height:26px}.sentence-progress{line-height:26px}.input-shell{height:50px}.input-shell input{font-size:32px}.overlay-symbol{display:none}.overlay-card{padding:17px 22px}.overlay-card>p{margin-bottom:14px}.movement-pad{grid-template-columns:repeat(3,28px);grid-template-rows:repeat(3,28px);gap:3px;bottom:10px}.movement-pad button{font-size:17px}.stage-hud{grid-row:1;grid-column:2;width:145px}.battle-topbar{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.battle-utilities{grid-column:3}.hero-vitals{width:85px}
}
@media(max-height:460px) and (min-width:480px) and (max-width:680px){}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* The optional learning keyboard floats over the world and never catches input. */
.keyboard-overlay{--key-height:31px;--key-accent:#d9eee0;--keyboard-bg:#163c3b73;--key-bg:#d9eee014;position:absolute;z-index:3;left:var(--focus-left);right:var(--focus-right);bottom:12px;transform:none;width:min(var(--focus-width),calc(100% - var(--focus-left) - var(--focus-right)));margin-inline:auto;display:flex;flex-direction:column;gap:8px;padding:11px 12px 8px;border:1px solid #c2ddbf5e;border-radius:13px;background:var(--keyboard-bg);box-shadow:0 7px 24px #05241e26,inset 0 1px #ecffdf0d;backdrop-filter:blur(2px);color:#eff8df;pointer-events:none;user-select:none;contain:layout style}
.keyboard-overlay[data-skin=forest]{--key-accent:#a7e3b6;--keyboard-bg:#173f2f80;--key-bg:#92d1a51c;border-color:#a2d7ad66}.keyboard-overlay[data-skin=starlight]{--key-accent:#eddbac;--keyboard-bg:#342d4a78;--key-bg:#c8b5e01a;border-color:#d9c8e766}
.keyboard-keys{display:flex;flex-direction:column;gap:4px}.keyboard-row{display:flex;gap:4px;min-width:0}.keyboard-key{position:relative;display:flex;align-items:center;justify-content:center;flex:var(--key-units,1) 1 0;min-width:0;height:var(--key-height);padding:1px 2px;border:1px solid #d0e5ca57;border-bottom-color:#d0e5ca7a;border-radius:5px;background:var(--key-bg);box-shadow:inset 0 1px #fff9e00a;color:var(--key-accent);font-size:17px;line-height:1;font-weight:600;text-align:center;text-shadow:0 1px 2px #0a242c88}
.key-main{display:block;min-width:0;white-space:nowrap}.keyboard-key[data-kind=function] .key-main{font-family:'Segoe UI Symbol','Apple Symbols',var(--font)}.key-shift{position:absolute;top:3px;left:4px;font-size:9px;color:#e6eed3a6}.keyboard-key[data-kind=initial]{color:#b5e5b4}.keyboard-key[data-kind=vowel]{color:#f2d7a3}.keyboard-key[data-kind=final]{color:#d1c6f1}.keyboard-key[data-code=Space],.keyboard-key[data-code=Enter],.keyboard-key[data-code=ShiftLeft],.keyboard-key[data-code=ShiftRight],.keyboard-key[data-code=Backspace],.keyboard-key[data-code=Tab],.keyboard-key[data-code=CapsLock],.keyboard-key[data-code^=Control],.keyboard-key[data-code^=Alt],.keyboard-key[data-code^=Meta]{font-size:11px;font-weight:500;letter-spacing:.4px}
.keyboard-key[data-code=KeyF]:before,.keyboard-key[data-code=KeyJ]:before{content:'';position:absolute;bottom:4px;left:calc(50% - 5px);width:10px;height:1px;border-radius:2px;background:currentColor;opacity:.5}
.keyboard-key.next{border-color:#ffe09bd9;box-shadow:inset 0 0 0 1px #ffe09b66,0 0 8px #ffe09b24;background:#dcbf7130;color:#fff0bd}.keyboard-key.modifier{border-color:#edcf8580;background:#d8bb6b22;color:#fff1be}.keyboard-key.pressed{border-color:#b9efb4;box-shadow:inset 0 1px 5px #173b2633,0 0 8px #aee9a735;background:#a8dfa199;color:#133e2a;text-shadow:none}.keyboard-key.error{border-color:#f6a68f;background:#dc806432;color:#ffe1d0}
.keyboard-legend{min-height:14px;color:#d7e5c6b8;font-size:10px;line-height:14px;letter-spacing:.1px;text-align:center;text-shadow:0 1px 2px #173c36}.battle-viewport:has(#keyboardOverlay:not([hidden])) .burst-indicator{visibility:hidden}
.keyboard-settings{margin-top:20px;padding-top:17px;border-top:1px solid #d7dfc5}.keyboard-settings h3{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:14px;color:#5b7851}.keyboard-settings h3 svg{width:17px;height:17px}.keyboard-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.keyboard-settings-grid label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#7b8b6d}.keyboard-settings select{width:100%;height:38px;padding:0 8px;border:1px solid #c9d5b7;border-radius:8px;background:#fcfff3;color:#496642;font:13px var(--font);cursor:pointer}.keyboard-settings select:disabled{opacity:.55;cursor:default}.keyboard-settings>p{margin:10px 0 0;color:#89977a;font-size:10px;line-height:1.6}
.keyboard-settings>.keyboard-layout-status{padding:8px 10px;border-radius:7px;background:#e5edda;color:#5a7750;font-size:11px;line-height:1.6}.keyboard-settings-grid label{min-width:0}.keyboard-row{direction:ltr}.key-main{font-family:var(--font),'Segoe UI','Nirmala UI','Leelawadee UI','Ebrima','Gadugi','Microsoft Himalaya','Myanmar Text','Javanese Text','Nyala','Sylfaen','Estrangelo Edessa','MV Boli','Segoe UI Historic',sans-serif;unicode-bidi:plaintext}.keyboard-key[data-long=true] .key-main{font-size:.72em}.keyboard-key[data-dead=true]:after{content:'◌';position:absolute;top:2px;right:3px;color:#f3d698;font-size:7px;line-height:1}
.keyboard-key[data-part=upper]{border-bottom-right-radius:0}.keyboard-key[data-part=upper]:after{content:'';position:absolute;z-index:1;right:-1px;bottom:-5px;width:calc(83.333333% + 1px);height:6px;border-left:1px solid;border-right:1px solid;border-color:inherit;background:inherit}.keyboard-key[data-part=lower]{border-top:0;border-top-left-radius:0;border-top-right-radius:0}
@media(max-width:680px){.keyboard-overlay{--key-height:22px;bottom:10px;padding:8px 7px 6px;gap:5px;border-radius:9px}.keyboard-keys{gap:3px}.keyboard-row{gap:2px}.keyboard-key{padding:0 1px;border-radius:3px;font-size:13px}.key-shift{top:2px;left:2px;font-size:7px}.keyboard-key[data-code=Space],.keyboard-key[data-code=Enter],.keyboard-key[data-code=ShiftLeft],.keyboard-key[data-code=ShiftRight],.keyboard-key[data-code=Backspace],.keyboard-key[data-code=Tab],.keyboard-key[data-code=CapsLock],.keyboard-key[data-code^=Control],.keyboard-key[data-code^=Alt],.keyboard-key[data-code^=Meta]{font-size:8px;letter-spacing:0}.keyboard-key[data-code=KeyF]:before,.keyboard-key[data-code=KeyJ]:before{bottom:3px;width:6px;left:calc(50% - 3px)}.keyboard-legend{min-height:12px;font-size:8px;line-height:12px}.battle-viewport:has(#keyboardOverlay:not([hidden])) .movement-pad{bottom:170px}}
@media(pointer:coarse) and (min-width:681px) and (max-width:1024px){.battle-viewport:has(#keyboardOverlay:not([hidden])) .movement-pad{bottom:240px}}
@media(max-height:460px) and (min-width:480px){.keyboard-overlay{--key-height:18px;bottom:8px;padding:7px 7px 5px;gap:4px;border-radius:8px}.keyboard-keys{gap:2px}.keyboard-row{gap:2px}.keyboard-key{font-size:12px;border-radius:3px}.key-shift{top:1px;left:2px;font-size:7px}.keyboard-key[data-code=Space],.keyboard-key[data-code=Enter],.keyboard-key[data-code=ShiftLeft],.keyboard-key[data-code=ShiftRight],.keyboard-key[data-code=Backspace],.keyboard-key[data-code=Tab],.keyboard-key[data-code=CapsLock],.keyboard-key[data-code^=Control],.keyboard-key[data-code^=Alt],.keyboard-key[data-code^=Meta]{font-size:8px;letter-spacing:0}.keyboard-key[data-code=KeyF]:before,.keyboard-key[data-code=KeyJ]:before{bottom:2px}.keyboard-legend{min-height:11px;font-size:8px;line-height:11px}.battle-viewport:has(#keyboardOverlay:not([hidden])) .movement-pad{bottom:10px}}

/* A compact fantasy loadout: illustrated choices, one price, one way onward. */
body:has(.game-overlay[data-mode="camp"]:not([hidden])){overflow:hidden}
.game-overlay[data-mode="camp"]{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:#082c25b8;backdrop-filter:blur(8px);overflow:auto}
.game-overlay[data-mode="camp"] .overlay-card{width:min(720px,100%);min-width:0;max-width:100%;max-height:calc(100dvh - 40px);margin:auto;padding:24px 28px 25px;overflow:auto;transform:none;border:1px solid #cbb276;border-radius:24px;background:radial-gradient(ellipse at 50% 0,#3c6853 0,transparent 62%),linear-gradient(155deg,#234f40,#103b32);box-shadow:0 25px 100px #001f24a6,inset 0 0 0 5px #173d2c,inset 0 0 0 6px #bfa57066;scrollbar-color:#91a57d #214c3e;scrollbar-gutter:auto;overscroll-behavior:contain}
.game-overlay[data-mode="camp"] .overlay-card>.overlay-symbol,.game-overlay[data-mode="camp"] .overlay-card>.overlay-eyebrow,.game-overlay[data-mode="camp"] #overlayTitle,.game-overlay[data-mode="camp"] #overlayDescription,.game-overlay[data-mode="camp"] #overlayStats,.game-overlay[data-mode="camp"] #resumeNote{display:none}
.camp-shop{position:relative;width:100%;color:#fbf5dc}
.camp-header{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:74px}
.camp-clear{display:flex;align-items:center;gap:5px;text-align:left}
.camp-trophy{width:82px;height:72px;stroke:none;filter:drop-shadow(0 3px 4px #0c2f2b55)}
.camp-clear>div{display:flex;flex-direction:column;gap:5px}
.camp-clear>div>span{color:#d9dba9;letter-spacing:3px;font-size:11px;font-weight:800}
.camp-reward{display:flex;align-items:center;gap:4px;color:#ffe599;font-size:19px;font-weight:600;line-height:1}
.camp-reward b{font-weight:700}.camp-reward svg{width:17px;height:17px;color:#e7c160;fill:#d4a44225;stroke-width:1.8}
.camp-wallet{display:flex;align-items:center;gap:9px;max-width:50%;padding:10px 16px;border:1px solid #c5b67b66;border-radius:25px;background:#0d302885;box-shadow:inset 0 1px 0 #edf1a80d;color:#ffe29a}
.camp-wallet svg{width:23px;height:23px;fill:#e8c27022;stroke:#e8c270}.camp-wallet strong{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:24px;font-weight:600;letter-spacing:.4px;font-variant-numeric:tabular-nums}
.camp-heading{display:flex;justify-content:center;align-items:center;margin:2px 0 20px}
.camp-heading:before,.camp-heading:after{content:'';flex:1 1 24px;min-width:6px;max-width:66px;height:1px;background:linear-gradient(90deg,transparent,#bda66980);margin:0 10px}.camp-heading:after{transform:scaleX(-1)}
.camp-heading h3{margin:0;font-size:28px;font-weight:800;letter-spacing:2px;line-height:1.2;color:#fff4cb;text-shadow:0 2px 0 #17392f}
.camp-difficulty{flex-shrink:0;margin-left:10px;padding:4px 7px;border:1px solid #afbd7966;border-radius:6px;background:#14392d99;color:#d6dda8;font-size:10px;line-height:1.4}.camp-difficulty[data-extreme=true]{border-color:#ee9d6c88;color:#ffbf95}
.camp-upgrades{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.camp-item{--accent:#ad7629;--card-top:#fff9df;--card-bottom:#f6e6b4;--glow:#f9d77b45;position:relative;display:flex;flex-direction:column;align-items:center;min-width:0;padding:20px 12px 12px;border:2px solid #bca878;border-radius:17px;background:radial-gradient(circle at 50% 30%,#fffef1b3 0,transparent 58%),linear-gradient(160deg,var(--card-top),var(--card-bottom));color:#4e4b32;box-shadow:0 4px 0 #082f28,0 9px 15px #082d2433;transition:transform .16s,box-shadow .16s,border-color .16s;isolation:isolate;overflow:hidden}
.camp-item:before{content:'';position:absolute;inset:4px;border:1px solid #fffaf0a6;border-radius:12px;pointer-events:none;z-index:-1}
.camp-armor{--accent:#437e9f;--card-top:#eefbff;--card-bottom:#c9e1ec;--glow:#8ed9ff45;border-color:#8baebf}
.camp-vitality{--accent:#b86164;--card-top:#fff1e8;--card-bottom:#f2d1c2;--glow:#ffb09c45;border-color:#c39887}
.camp-level{position:absolute;right:10px;top:9px;z-index:1;min-width:29px;padding:3px 6px;border:1px solid #c2b69455;border-radius:6px;background:#fffdf2c9;color:var(--accent);font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.camp-illustration{position:relative;display:grid;place-items:center;width:100%;height:145px;margin:0 0 4px}
.camp-illustration>svg{display:block;width:148px;max-width:100%;height:148px;stroke:none;filter:drop-shadow(0 5px 3px #4f52331a);transition:transform .2s}
.camp-gain{position:absolute;bottom:3px;right:9px;display:grid;place-items:center;min-width:42px;height:26px;padding:0 8px;border:1px solid #fffbea;border-radius:14px;background:var(--accent);box-shadow:0 2px 5px #614f3725;color:#fff8e1;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.camp-item>strong{font-size:19px;font-weight:800;letter-spacing:1px;line-height:1.35}
.upgrade-preview{display:block;max-width:100%;margin:7px 0 14px;color:#676746;font-size:17px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;font-weight:600;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
.camp-armor .upgrade-preview{color:#4e7184}.camp-vitality .upgrade-preview{color:#8a635c}
.upgrade-price{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:36px;margin-top:auto;padding:6px 9px;border:1px solid #c3a45388;border-radius:9px;background:linear-gradient(#fff6d4,#eec878);box-shadow:inset 0 1px 0 #fffce8;color:#664b20}
.upgrade-price>svg{width:18px;height:18px;stroke:#96702e;fill:#e4b74d33}.upgrade-price>b{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:18px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums}.upgrade-status{margin-left:1px;color:#517443;font-size:12px;line-height:1}
.camp-item.affordable{border-color:#e4cf80;box-shadow:0 4px 0 #082f28,0 0 21px var(--glow),inset 0 0 0 1px #fff6c988}
.camp-item.affordable:after{content:'✦';position:absolute;left:11px;top:9px;color:var(--accent);font-size:15px;opacity:.8}
.camp-item.affordable:hover{transform:translateY(-4px);box-shadow:0 8px 0 #082f28,0 0 27px var(--glow),inset 0 0 0 1px #fff6c9}.camp-item.affordable:hover .camp-illustration>svg{transform:translateY(-3px) rotate(-3deg)}
.camp-item.affordable:active{transform:translateY(2px);box-shadow:0 2px 0 #082f28,0 0 18px var(--glow)}
.camp-item:focus-visible,.camp-next:focus{outline:3px solid #fff0ab;outline-offset:4px}
.camp-item:disabled{opacity:1;border-color:#a5b4a1;background:linear-gradient(155deg,#e7ecdf,#d7dfd0);box-shadow:0 4px 0 #082f28;cursor:not-allowed}
.camp-item:disabled .camp-illustration>svg{opacity:.7;filter:grayscale(.35) drop-shadow(0 3px 3px #4a563322)}
.camp-item:disabled>strong{color:#596850}.camp-item:disabled .upgrade-preview{color:#6c7961}.camp-item:disabled .camp-level{background:#f2f4e8;color:#718069}
.camp-item:disabled .camp-gain{background:#829178;color:#fffdf1}.camp-item:disabled .upgrade-price{background:#e6e7d8;border-color:#c0c8b0;color:#5f6651;box-shadow:inset 0 1px 0 #fbfcf2}.camp-item:disabled .upgrade-price>svg{stroke:#817747;fill:#b0ab7422}.camp-item:disabled .upgrade-status{color:#6a755a}
.camp-item.maxed .upgrade-price>svg,.camp-item.maxed .upgrade-price>b{display:none}.camp-item.maxed .upgrade-status{font-size:11px;font-weight:800;letter-spacing:1px;margin:0}
.camp-next{position:relative;display:flex;align-items:center;justify-content:center;gap:15px;width:100%;min-height:66px;margin-top:23px;padding:9px 60px;border:1px solid #aeca8b;border-radius:12px;background:linear-gradient(110deg,#477b53,#598d58 50%,#477b53);box-shadow:0 4px 0 #092e25,inset 0 1px 0 #dcf3ad55;color:#fff9df;transition:transform .16s,filter .16s}
.camp-next:before,.camp-next:after{content:'✦';position:absolute;left:15px;top:50%;transform:translateY(-50%);color:#cfe09a;font-size:12px}.camp-next:after{left:auto;right:15px}
.camp-next .camp-portal{width:47px;height:54px;position:static;stroke:none;filter:drop-shadow(0 2px 3px #193e2c66)}
.camp-next>span{display:flex;align-items:center;gap:17px}.camp-next strong{font-size:22px;letter-spacing:2px;font-weight:800}.camp-next small{display:flex;flex-direction:column;gap:2px;align-items:flex-start;color:#d6e4b3;font-size:8px;letter-spacing:1.7px}.camp-next small b{color:#ffefb8;font-size:17px;line-height:1;font-weight:600;letter-spacing:1px}.camp-next-arrow{width:22px;height:22px;margin-left:3px;color:#e2efbb}
.camp-next:hover{filter:brightness(1.1);transform:translateY(-2px)}.camp-next:active{transform:translateY(2px);box-shadow:0 2px 0 #092e25}
.camp-item.upgraded{animation:camp-upgrade-flare .65s ease-out}.camp-item.upgraded .camp-gain{animation:camp-gain-pop .65s ease-out}
@keyframes camp-upgrade-flare{0%{box-shadow:0 4px 0 #082f28,0 0 0 2px #fff4b3,0 0 35px #ffe69bcc;filter:brightness(1.22)}100%{filter:brightness(1)}}
@keyframes camp-gain-pop{0%{transform:translateY(0) scale(1)}30%{transform:translateY(-8px) scale(1.15)}100%{transform:translateY(0) scale(1)}}
@media(max-width:600px){
  .game-overlay[data-mode="camp"]{padding:14px}.game-overlay[data-mode="camp"] .overlay-card{max-height:calc(100dvh - 28px);padding:19px 19px 20px;border-radius:20px}
  .camp-header{min-height:60px;gap:9px}.camp-trophy{width:68px;height:60px}.camp-clear>div>span{font-size:9px;letter-spacing:2px}.camp-reward{font-size:17px}.camp-wallet{padding:8px 12px;gap:6px}.camp-wallet strong{font-size:20px}.camp-wallet svg{width:20px;height:20px}
  .camp-heading{margin:8px 0 17px}.camp-heading h3{font-size:26px}.camp-heading:before,.camp-heading:after{width:45px;margin:0 12px}
  .camp-upgrades{gap:10px}.camp-item{padding:21px 7px 9px;border-radius:13px}.camp-item:before{inset:3px;border-radius:9px}.camp-illustration{height:112px}.camp-illustration>svg{width:116px;height:116px}.camp-gain{right:1px;bottom:0;min-width:35px;height:22px;font-size:12px;padding:0 6px}
  .camp-item>strong{font-size:17px}.upgrade-preview{font-size:14px;margin:7px 0 12px}.upgrade-price{padding:6px;gap:4px;min-height:33px;border-radius:7px}.upgrade-price>b{font-size:16px}.upgrade-price>svg{width:16px;height:16px}.upgrade-status{font-size:10px}.camp-level{right:7px;top:7px;font-size:9px;padding:3px 5px;min-width:25px}.camp-item.affordable:after{left:8px;top:7px;font-size:13px}
  .camp-next{margin-top:20px;min-height:60px}.camp-next .camp-portal{width:48px;height:55px;bottom:6px}.camp-next strong{font-size:20px}.camp-next small b{font-size:16px}
}
@media(max-width:380px){
  .game-overlay[data-mode="camp"]{padding:10px}.game-overlay[data-mode="camp"] .overlay-card{padding:15px 12px 16px;max-height:calc(100dvh - 20px);border-radius:18px}
  .camp-header{min-height:53px}.camp-trophy{width:56px;height:50px}.camp-clear{gap:2px}.camp-clear>div{gap:4px}.camp-clear>div>span{font-size:8px;letter-spacing:1.5px}.camp-reward{font-size:15px;gap:2px}.camp-reward svg{width:14px;height:14px}.camp-wallet{gap:5px;padding:7px 9px;max-width:49%}.camp-wallet strong{font-size:18px}.camp-wallet svg{width:17px;height:17px}
  .camp-heading{margin:7px 0 15px}.camp-heading h3{font-size:24px}.camp-heading:before,.camp-heading:after{width:33px;margin:0 10px}
  .camp-upgrades{gap:7px}.camp-item{padding:22px 4px 7px;border-radius:11px}.camp-item:before{border-radius:7px}.camp-illustration{height:84px;margin-bottom:6px}.camp-illustration>svg{width:86px;height:86px}.camp-gain{right:0;bottom:0;min-width:30px;height:20px;font-size:11px;padding:0 5px}.camp-level{font-size:8px;padding:2px 4px;right:6px;min-width:22px}.camp-item.affordable:after{font-size:12px;left:7px}
  .camp-item>strong{font-size:15px;letter-spacing:.5px}.upgrade-preview{font-size:11px;margin:6px 0 11px;letter-spacing:-.5px}.upgrade-price{min-height:31px;padding:6px 3px;gap:3px}.upgrade-price>b{font-size:13px}.upgrade-price>svg{width:13px;height:13px}.upgrade-status{font-size:9px;margin:0}.camp-item.maxed .upgrade-status{font-size:10px}
  .camp-item[data-long-price="true"] .upgrade-price{flex-wrap:wrap;gap:2px 4px;padding:4px 3px}.camp-item[data-long-price="true"] .upgrade-price>b{order:0;flex:0 0 100%;font-size:10px;text-align:center}.camp-item[data-long-price="true"] .upgrade-price>svg{order:1;width:10px;height:10px}.camp-item[data-long-price="true"] .upgrade-status{order:2;font-size:9px}
  .camp-next{min-height:58px;margin-top:18px;padding:6px 28px;gap:11px;border-radius:10px}.camp-next .camp-portal{width:40px;height:46px}.camp-next>span{gap:12px}.camp-next strong{font-size:19px}.camp-next small{font-size:7px;letter-spacing:1.2px}.camp-next small b{font-size:15px}.camp-next-arrow{width:18px;height:18px}.camp-next:before,.camp-next:after{font-size:10px;left:11px}.camp-next:after{left:auto;right:11px}
}
@media(prefers-reduced-motion:reduce){.camp-item,.camp-next,.camp-illustration>svg{transition:none}.camp-item.upgraded,.camp-item.upgraded .camp-gain{animation:none}.camp-item.affordable:hover,.camp-item.affordable:hover .camp-illustration>svg,.camp-next:hover{transform:none}}

/* Keep the reading target, typing field and learning keyboard on one focal axis. */
@media(max-width:680px){.game-shell{--focus-left:max(10px,env(safe-area-inset-left,0px));--focus-right:max(10px,env(safe-area-inset-right,0px))}}
@media(max-width:680px){.keyboard-key[data-part=upper]:after{bottom:-4px;height:5px}}
@media(max-width:600px){.sentence-meta{display:none}}
@media(max-height:460px) and (min-width:480px){.game-shell{--focus-width:630px}.sentence-context{height:26px}}
@media(max-height:460px) and (min-width:480px){.keyboard-key[data-part=upper]:after{bottom:-3px;height:4px}}
@media(max-height:460px) and (min-width:480px) and (pointer:coarse),(max-height:460px) and (min-width:480px) and (max-width:680px){.game-shell:has(#keyboardOverlay:not([hidden])){--focus-left:max(114px,env(safe-area-inset-left,0px));--focus-right:max(10px,env(safe-area-inset-right,0px))}}
