
:root{--navy:#172840;--deep:#0d182b;--ink:#25334b;--ink2:#617088;--gold:#daac59;--gold2:#f9db94;--paper:#fcf5e5;--border:#d9c7a6;--teal:#2b9989;--red:#d26270;--shadow:0 20px 70px #0d1c3340}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Pretendard","Noto Sans KR","Malgun Gothic",system-ui,sans-serif;color:var(--ink)}body{background:radial-gradient(ellipse at 50% 0,#4f7797 0,#203750 40%,#0b192b 100%);min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.hidden,[hidden]{display:none!important}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #71b7e8;outline-offset:2px}.shell{width:min(1250px,calc(100% - 34px));margin:0 auto}.app-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 0;color:#fff}.brand{display:flex;gap:12px;align-items:center}.brand-icon{width:46px;height:46px;display:grid;place-items:center;border:1px solid #ffdc9699;border-radius:14px;background:linear-gradient(135deg,#fce2a5,#c78d3d);box-shadow:0 5px 22px #fbc76f33;font-size:25px}.brand small{display:block;font-size:11px;letter-spacing:.2em;color:#d7dddf;font-weight:700}.brand strong{display:block;font-size:17px;letter-spacing:-.06em}.top-actions{display:flex;gap:8px;align-items:center}.btn{border:0;border-radius:13px;padding:12px 18px;font-weight:800;color:var(--ink);background:#fff;transition:transform .15s,filter .15s;box-shadow:0 3px 0 #07132016}.btn:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.05)}.btn:active:not(:disabled){transform:translateY(1px)}.btn.primary{background:linear-gradient(150deg,#ffe5a5,#e1ad50);color:#4b351b;box-shadow:0 5px 0 #99652d44}.btn.secondary{background:#e6f1ee;color:#24796e}.btn.ghost{background:#ffffff13;color:#fff;border:1px solid #ffffff40;box-shadow:none}.btn.dark{background:#283e5a;color:white}.btn.small{padding:8px 12px;border-radius:10px;font-size:12px}.btn.icon{padding:9px 13px}.eyebrow{color:#9fe2d3;letter-spacing:.25em;font-weight:900;font-size:12px}.menu-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(330px,.85fr);gap:23px;align-items:stretch}.menu-hero{min-height:575px;position:relative;overflow:hidden;border:1px solid #f9dfab55;border-radius:25px;box-shadow:var(--shadow);background:linear-gradient(165deg,#172943,#325773 53%,#243858);display:flex;align-items:flex-end}.menu-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 68% 35%,#f5d99280,transparent 35%),linear-gradient(160deg,transparent 60%,#092039ab 100%)}.menu-canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hero-overlay{position:relative;z-index:1;padding:30px 34px 35px;width:100%;background:linear-gradient(transparent,#11223caa 18%,#10213ce8 100%);color:white}.hero-overlay h1{font-size:clamp(29px,3.5vw,52px);font-family:Georgia,"Noto Serif KR",serif;line-height:1.18;letter-spacing:-.07em;margin:14px 0;text-shadow:0 3px 17px #061020aa}.hero-overlay h1 em{font-style:normal;color:#ffe2a4}.hero-overlay p{font-size:14px;max-width:540px;line-height:1.8;color:#e8ecf0}.hero-chips{display:flex;flex-wrap:wrap;gap:7px;margin:17px 0 20px}.hero-chips span{border:1px solid #fff6;color:#fff;border-radius:30px;padding:7px 11px;background:#142f4db0;font-size:11px;font-weight:700}.hero-buttons{display:flex;gap:9px;flex-wrap:wrap}.custom-panel{background:var(--paper);border-radius:25px;padding:25px;border:1px solid #f4e6cd;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:15px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.panel-head h2{margin:0;font:800 23px/1.3 Georgia,"Malgun Gothic",serif;letter-spacing:-.06em}.panel-head small{display:block;color:var(--ink2);font-size:12px;margin-top:5px}.seal{font-size:10px;border-radius:30px;background:#f1e1c0;color:#81622d;padding:7px 11px;font-weight:900;white-space:nowrap}.preview-box{min-height:220px;background:linear-gradient(#9bd0d9,#e1e1ae 78%,#cfac77 78%);border:2px solid #fff;outline:1px solid #e0ceac;border-radius:18px;overflow:hidden;position:relative;display:flex;justify-content:center;align-items:center}.preview-box:after{position:absolute;content:"나만의 해원이";bottom:11px;right:13px;color:#4b5d55;background:#fff9;padding:5px 9px;font-size:11px;border-radius:8px;font-weight:700}.preview-box canvas{width:100%;max-height:240px;object-fit:contain}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.field label{display:block;font-size:11px;font-weight:900;color:#6b665c;margin-bottom:6px}.field select,.field input,.field textarea{width:100%;background:#fffdf9;border:1px solid #d9c8a8;border-radius:11px;padding:10px 11px;color:var(--ink);font-size:13px;outline-color:#49b2a0}.menu-stage-section{margin:21px 0 40px}.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;color:#fff;margin:20px 0 15px}.section-head h2{font-size:22px;margin:0}.section-head p{font-size:12px;color:#cbd5df;margin:0}.stages{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stage-card{padding:18px 17px;min-height:134px;border:1px solid #ffffff45;border-radius:16px;color:#fff;text-align:left;overflow:hidden;position:relative;background:linear-gradient(145deg,var(--c1),var(--c2));box-shadow:0 8px 24px #071a3066}.stage-card:after{content:attr(data-mark);position:absolute;right:8px;bottom:-34px;font-size:90px;opacity:.16}.stage-card strong{display:block;font-size:14px}.stage-card small{display:block;margin:9px 0;color:#e8eced;font-size:11px}.stage-card .tag{display:inline-block;font-size:10px;border:1px solid #fff5;padding:4px 7px;border-radius:8px;background:#06112244}.stage-card.locked{filter:saturate(.3);opacity:.73}.stage-card:hover:not(:disabled){outline:2px solid var(--gold2)}.footer-note{color:#bfcbd6;text-align:center;font-size:11px;line-height:1.8;margin:22px 0 30px}.game-section{padding-bottom:30px}.game-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#fff;margin:4px 0 12px}.game-bar h2{font-size:18px;margin:0}.game-bar small{color:#c6d8e4}.game-bar .game-buttons{display:flex;gap:7px;flex-wrap:wrap}.game-frame{position:relative;border:5px solid #e9cb89;border-radius:19px;overflow:hidden;background:#102436;box-shadow:var(--shadow)}#gameCanvas{width:100%;display:block;aspect-ratio:1000/560;touch-action:none}#mobileControls{display:none;user-select:none;-webkit-user-select:none;touch-action:none;justify-content:space-between;gap:6px;margin-top:12px;align-items:center}.control-group{display:flex;gap:7px;align-items:center}.ctl{height:54px;min-width:54px;border-radius:16px;border:1px solid #f3dfb299;background:linear-gradient(180deg,#254a68,#152f4e);color:#fff;box-shadow:0 5px 0 #050f1d;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:12px;touch-action:none;-webkit-tap-highlight-color:transparent}.ctl.primary{background:linear-gradient(#eab85a,#b37b36);color:#292115;border:1px solid #fbe0a4}.ctl[data-pressed="1"]{transform:translateY(4px);box-shadow:0 1px 0 #050f1d}.ctl.wide{min-width:68px}.game-tip{font-size:12px;color:#d6e1e7;line-height:1.8;margin:12px 3px}.overlay{position:fixed;inset:0;background:#071326c8;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto;backdrop-filter:blur(7px)}.modal{width:min(660px,100%);max-height:min(91vh,940px);overflow:auto;border-radius:24px;background:var(--paper);border:3px solid #f6d78f;box-shadow:0 20px 100px #030a1877;position:relative}.modal.banner{width:min(780px,100%)}.modal-top{background:linear-gradient(110deg,#263c5b,#12253e);color:#fff;padding:22px 28px 20px;position:relative}.modal-top .sub{color:#f2d999;font-size:12px;letter-spacing:.12em;font-weight:900}.modal-top h2{font-size:27px;letter-spacing:-.05em;margin:7px 0 3px}.modal-body{padding:25px 28px 28px}.modal-body p{line-height:1.75}.modal-close{position:absolute;right:20px;top:18px;border:1px solid #ffffff77;color:white;background:#ffffff20;border-radius:10px;font-size:20px;line-height:1;padding:7px 10px}.dialogue{display:flex;gap:12px;align-items:start;background:white;border:1px solid #e8d9b8;border-radius:15px;padding:13px;margin:16px 0}.portrait{flex-shrink:0;width:52px;height:52px;border-radius:50%;background:linear-gradient(140deg,#f1d788,#86c5ab);font-size:26px;display:grid;place-items:center}.dialogue strong{font-size:12px;color:#217567}.dialogue p{margin:5px 0 0;font-size:14px}.quiz-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}.quiz-opt{background:#fff;border:1px solid #d6c8aa;border-bottom-width:4px;padding:14px 12px;border-radius:12px;color:var(--ink);font-size:17px;font-weight:900}.quiz-opt:hover{background:#fff0c9}.quiz-opt.wrong{background:#ffe6e6;border-color:#dc939b}.feedback{margin:14px 0;padding:13px 15px;border-radius:12px;background:#e2f4ea;border:1px solid #aad8bd;line-height:1.8}.feedback.warn{background:#fff2dc;border-color:#e7c48e}.modal-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px}.modal-card-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.feature-card{border:1px solid #dfcfac;background:#fffaf0;border-radius:13px;padding:14px}.feature-card small{display:block;color:#68758b;font-size:11px;margin:5px 0}.feature-card strong{display:block;font-size:16px}.text-muted{color:var(--ink2);font-size:12px}.book-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;max-height:350px;overflow:auto}.book-entry{background:#fff;border:1px solid #dfd3b8;border-radius:12px;padding:11px;text-align:left}.book-entry strong{font-size:15px}.book-entry small{display:block;color:#698077;margin-top:4px}.book-entry p{font-size:12px;margin:8px 0 0;color:#606d7d;line-height:1.65}.book-entry.learned{border-color:#88bca5;background:#f1fff7}.book-entry.locked-entry{opacity:.62}.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.editor-grid .full{grid-column:1/-1}.editor-grid input,.editor-grid textarea{width:100%;border-radius:10px;padding:10px 12px;border:1px solid #d9c8aa;background:white}.editor-grid label{font-size:12px;font-weight:800}.editor-grid label span{display:block;margin:0 0 5px}.editor-grid textarea{min-height:65px;resize:vertical}.icon-stat{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;background:#eef4ef;border-radius:30px;font-size:12px;font-weight:900;color:#425a59}.toast{position:fixed;left:50%;bottom:25px;transform:translateX(-50%) translateY(120px);background:#142741;color:#fff;padding:13px 20px;border:1px solid #f2ca8f;border-radius:13px;box-shadow:var(--shadow);z-index:150;transition:transform .3s;max-width:85%;font-size:13px;text-align:center}.toast.show{transform:translateX(-50%) translateY(0)}.bar-line{height:10px;border-radius:9px;background:#decbaa;overflow:hidden}.bar-line>span{display:block;height:100%;background:linear-gradient(90deg,#53b49b,#319580);border-radius:9px}.divider{height:1px;background:#e6d8bd;margin:19px 0}.menu-preview-note{font-size:10px;color:#697681;text-align:center}.small-kicker{text-transform:uppercase;letter-spacing:.14em;font-size:11px;font-weight:900;color:#a67d38}.mode-switch{display:flex;gap:8px;margin-bottom:12px}.mode-switch button{flex:1}.card-stat{font-size:13px;color:#506078;padding:8px 10px;background:#f5eedb;border-radius:9px}.in-modal-list{display:flex;flex-direction:column;gap:8px}.editor-note{font-size:12px;color:#68788b}.stage-complete-hero{background:linear-gradient(135deg,#dff4e8,#fff0c9);border-radius:15px;padding:20px;display:flex;gap:12px;align-items:center}.stage-complete-hero .trophy{font-size:44px}.button-row{display:flex;gap:9px;flex-wrap:wrap}.vcenter{display:flex;align-items:center;gap:9px}
@media(max-width:900px){.menu-grid{grid-template-columns:1fr}.menu-hero{min-height:450px}.stages{grid-template-columns:repeat(2,1fr)}.custom-panel{max-width:none}.preview-box{min-height:180px}.menu-stage-section{margin-top:16px}}@media(max-width:650px){.shell{width:calc(100% - 16px)}.app-header{padding:12px 0;align-items:flex-start}.brand-icon{width:40px;height:40px}.brand strong{font-size:13px}.brand small{font-size:9px;letter-spacing:.08em}.top-actions .btn{font-size:10px;padding:8px}.menu-hero{min-height:380px}.hero-overlay{padding:21px}.hero-overlay h1{font-size:31px}.hero-overlay p{font-size:12px}.custom-panel{padding:20px}.section-head h2{font-size:18px}.stages{gap:7px}.stage-card{padding:12px;min-height:118px}.stage-card strong{font-size:12px}.modal-body{padding:17px}.modal-top{padding:19px}.modal-top h2{font-size:22px}.quiz-opt{font-size:15px}.game-frame{border-width:3px}.game-bar h2{font-size:14px}.game-bar small{font-size:10px}.game-bar .btn{font-size:10px;padding:8px}.ctl{height:49px;min-width:44px;border-radius:12px}.ctl.wide{min-width:52px}.control-group{gap:5px}.book-grid{grid-template-columns:1fr}.footer-note{font-size:10px}}
@media(pointer:coarse){#mobileControls{display:flex}}@media(max-width:850px){#mobileControls{display:flex}}@media (prefers-reduced-motion: reduce){.btn,.toast{transition:none}}


/* Illustrated edition v2 */
:root{--gold:#eac37d;--gold2:#ffe8a4;--paper:#fff8ed;--shadow:0 26px 80px #0310248a}
body{background:radial-gradient(circle at 50% -20%,#54759c 0,#1d3354 37%,#07162a 100%)}
.app-header{padding:23px 0}.brand-icon{box-shadow:0 0 0 4px #f1d08a25,0 10px 25px #0004}
.menu-hero,.custom-panel{border-radius:25px;box-shadow:0 18px 80px #04101e88}
.menu-hero{border:2px solid #f8dbab;min-height:600px;overflow:hidden}
.menu-hero:before{z-index:0;background:radial-gradient(ellipse at 74% 27%,#fff1bc32,transparent 38%)}
.hero-overlay{padding-bottom:34px;background:linear-gradient(transparent,#112241a6 13%,#0e1f39ed 100%)}
.hero-overlay h1{font-weight:950;text-shadow:0 4px 15px #00121e}
.hero-chips .study-highlight{background:#ffedbc;color:#483658;border-color:#e8b85c}
.custom-panel{border:2px solid #f5dcac;background:linear-gradient(135deg,#fff9ed,#f7e8cf)}
.preview-box{border:3px solid #f7dfa8;outline:1px solid #ab8962;box-shadow:inset 0 6px 26px #172c3c33}
.btn{transition:transform .13s,box-shadow .13s}.btn.primary{box-shadow:0 5px 0 #8c633f,0 10px 25px #eab85b4d}
.game-frame{border:6px solid #edd09d;border-radius:20px;box-shadow:0 0 0 2px #8f7656,0 18px 75px #03081799}
#gameCanvas{image-rendering:auto}
.game-section{padding-bottom:24px}.game-tip{color:#e9e5d9;font-size:12px}
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.settings-block{background:white;border:1px solid #dfc899;border-radius:15px;padding:14px}
.settings-block h3{font-size:16px;margin:0 0 4px;color:#513f53}.settings-block>p{margin:0 0 12px;font-size:12px;color:#67738b}
.choices{display:flex;flex-direction:column;gap:8px}
.choices label{display:grid;grid-template-columns:22px 1fr;gap:2px 8px;border:1px solid #e0d4ba;border-radius:11px;background:#fffaf0;padding:10px;cursor:pointer}
.choices label:has(input:checked){background:#fff1c7;border:2px solid #bd944f;padding:9px}
.choices input{grid-row:1/3;accent-color:#a6773a;align-self:center}.choices b{font-size:13px}.choices small{font-size:11px;color:#6b6871}
.settings-footnote{background:#e8f3ef;padding:14px 17px;border-radius:13px;margin-top:13px;font-size:12px;line-height:1.7;color:#3c5b5b}
.stage-intro-layout{display:grid;grid-template-columns:105px 1fr;gap:14px}.stage-emblem{display:grid;place-items:center;border-radius:17px;background:linear-gradient(#9dcab7,#2d5473);font-size:63px;border:2px solid #e6c782}
.stage-intro-layout .dialogue{margin:0 0 10px}
.ctl.interact-control{background:linear-gradient(#e4bf80,#926b4b);color:#231e32;border-color:#ffe5a2}
.stage-card{min-height:160px;background:linear-gradient(150deg,var(--c1),var(--c2));border:1px solid #fae4b5a6}
@media(max-width:750px){.settings-grid{grid-template-columns:1fr}.stage-intro-layout{grid-template-columns:1fr}.stage-emblem{display:none}.app-header{flex-wrap:wrap}.top-actions{flex-wrap:wrap}.game-bar{flex-wrap:wrap}.game-buttons{gap:5px}.game-buttons .btn{font-size:10px;padding:8px}.ctl{min-width:43px;height:47px;font-size:10px;border-radius:10px}.ctl.wide{min-width:51px}#mobileControls{flex-wrap:wrap}}
@media(max-width:440px){.shell{width:calc(100% - 16px)}.control-group{gap:3px}.ctl{min-width:40px;height:45px}.custom-panel{padding:16px}}


/* v3 visual overhaul: jewel tones, gilded panels, and layered shadows */
:root{--navy:#11223a;--deep:#0b192e;--gold:#e4b866;--gold2:#ffe29e;--paper:#fff6e7}
body{background:radial-gradient(ellipse at 46% -10%,#344e7d 0%,#18294a 49%,#081329 100%)}
.brand-icon{background:linear-gradient(140deg,#fff3ce,#bd8c53);border:2px ridge #fae1a2;box-shadow:0 7px 26px #fcd78c33}
.app-header{padding-top:19px;padding-bottom:20px}
.menu-hero{border:3px solid #f6dba9;box-shadow:0 0 0 2px #7c5a3c,0 22px 75px #030a1ba8}
.menu-hero:before{background:linear-gradient(180deg,#0411244d 0%,#0d182500 32%,#07172766 80%)}
.hero-overlay{padding:33px;background:linear-gradient(180deg,#04142d00,#102340e8 18%,#0e1c37f5 100%)}
.hero-overlay h1{font-size:clamp(30px,3.6vw,51px);line-height:1.25;color:#fff4d8;text-shadow:2px 3px 0 #24172ba8,0 0 22px #ffce7970}
.hero-overlay h1 em{color:#ffdf9b}
.custom-panel{border:3px solid #e6c68b;background:linear-gradient(165deg,#fffcf4,#f8e7cc);box-shadow:0 20px 66px #040d1e9c}
.seal{background:#efd6a3;color:#62432d}
.preview-box{border:3px solid #f9e1a4;background:linear-gradient(#9ec7bc,#e7d7ab);box-shadow:inset 0 0 30px #15345640}
.preview-box:after{background:#fff3d6dc;color:#5e4025}
.btn.primary{background:linear-gradient(150deg,#fff2bc 0%,#efc477 51%,#c28c43 100%);color:#583918;border:1px solid #fff6cd;box-shadow:0 5px 0 #785534,0 13px 26px #10203965}
.btn.secondary{background:linear-gradient(#c5e6e1,#a4cfc7)}
.btn:hover:not(:disabled){filter:brightness(1.08)}
.game-frame{border:6px ridge #f5d8a6;box-shadow:0 0 0 2px #a77e51,0 23px 80px #020712bf;background:#0e2941}
.stage-card{border:1px solid #f6d9a2b9;box-shadow:inset 0 0 25px #ffffff12,0 10px 32px #06142c91}
.modal{border:4px ridge #ddb16d;box-shadow:0 27px 110px #020916bb;background:#fffaef}
.modal-top{background:linear-gradient(100deg,#42304a,#1a3457 70%,#25385a);border-bottom:2px solid #d4a767}
.modal-body{background:linear-gradient(140deg,#fffbf0,#fff4e2)}
.quiz-opt{background:linear-gradient(175deg,#fffef9,#f6ead7);border:1px solid #d0b78c;border-bottom:4px solid #b58e52;box-shadow:0 5px 15px #8d653820}
.quiz-opt:hover{background:#fff1c7;border-color:#d1a451}
.feedback{border:2px solid #9ccb9d}
#mobileControls .ctl{box-shadow:0 5px 0 #051121;border-color:#fae2ac72}
@media(max-width:750px){.menu-hero{min-height:420px}.hero-overlay{padding:20px}.hero-overlay h1{font-size:30px}.custom-panel{gap:12px}}

/* v4 presentation: illustrated storybook, clear controls, readable learning. */
:root{--paper:#fff9ee;--ink:#25354b;--gold:#e9c783}body{background:radial-gradient(ellipse at 50% 0,#315555,#152f3c 45%,#102131);font-family:"Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif}.shell{max-width:1370px;width:calc(100% - 56px)}.app-header{padding:23px 0}.brand strong{font-size:20px}.brand small{font-size:10px;letter-spacing:2px;color:#e0c798}.brand-icon{border:1px solid #d3b778;border-radius:14px;box-shadow:none}.btn{border-radius:10px;transition:transform .15s,filter .15s}.btn.primary{background:linear-gradient(120deg,#ffebb2,#eac17c);border:1px solid #fff4c6;color:#49351c;box-shadow:0 3px 0 #9e7541}.btn.ghost{background:#ffffff08;border:1px solid #ffffff25}.btn:focus-visible,.quiz-opt:focus-visible{outline:3px solid #66c6ce;outline-offset:3px}.menu-grid{grid-template-columns:minmax(0,1.55fr) minmax(330px,.85fr);gap:24px}.menu-hero{min-height:700px;border:1px solid #bba37a;border-radius:22px;box-shadow:0 20px 55px #07142166}.menu-canvas{object-fit:cover}.menu-hero:before{background:none}.hero-overlay{padding:32px;background:linear-gradient(0deg,#0c2432fb,#122e3be8 80%,#122e3b00)}.hero-overlay .eyebrow{letter-spacing:3px;font-size:11px;color:#e4ce97}.hero-overlay h1{font-size:clamp(32px,3.1vw,49px);letter-spacing:-2px;text-shadow:none;line-height:1.3}.hero-overlay h1 em{color:#f4d18a}.hero-overlay p{font-size:14px;line-height:1.85;max-width:520px;color:#dde6e5}.hero-chips{gap:7px;margin:20px 0 24px}.hero-chips span{font-size:11px;border-radius:6px;padding:6px 9px;background:#ffffff08;border-color:#ffffff20}.hero-chips .study-highlight{background:#efd39a;color:#493722}.custom-panel{padding:23px;background:#f8f3e9;border:1px solid #d5c49f;box-shadow:0 20px 55px #07142144;border-radius:22px;gap:15px}.panel-head h2{font-size:20px;color:#223e43}.panel-head small{font-size:11px}.seal{font-size:9px;background:#e9e1cb;border-radius:5px}.preview-box{height:225px;min-height:225px;border:1px solid #ccbc96;border-radius:15px;outline:none}.preview-box canvas{width:100%;height:100%;object-fit:contain}.preview-box:after{font-size:10px;border-radius:6px;background:#fffbebdd}.form-grid{gap:12px}.field label{font-size:11px;letter-spacing:.3px;color:#61716c}.field select{padding:10px;font-size:12px;border:1px solid #d7d7c9;background:#fffdf7;border-radius:8px;min-width:0;width:100%}.menu-preview-note{font-size:11px;line-height:1.6;color:#748078}.card-stat{font-size:11px;border-top:1px solid #d8d9cc;padding-top:12px;color:#57746b}.menu-stage-section{margin-top:32px}.section-head h2{font-size:19px}.section-head p{font-size:11px;color:#bbc9c7}.stages{gap:16px}.stage-card{min-height:198px;padding:20px;background-size:cover;background-position:center;border:1px solid #b5b59a70;border-radius:14px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;box-shadow:none;transition:transform .2s}.stage-card:before,.stage-card:after{display:none}.stage-card:hover:not(:disabled){transform:translateY(-4px)}.stage-card strong{font-size:17px;margin-top:35px;color:#fff7e4}.stage-card small{font-size:11px;color:#dce2da}.stage-card .tag{font-size:10px;background:#ffffff13;border:1px solid #ffffff24;border-radius:5px}.chapter-number{position:absolute;top:13px;left:18px;font-family:Georgia,serif;font-size:32px;font-style:italic;color:#fff2c6;opacity:.8}.stage-card.locked{opacity:.6;filter:saturate(.5)}.footer-note{font-size:10px;color:#9caeb4;padding:27px 0}.game-frame{border:2px solid #c6b38b;border-radius:17px;overflow:hidden;box-shadow:0 20px 50px #06142155}.game-bar{padding:12px 0 20px}.game-bar h2{font-size:20px}#gameCanvas{display:block;width:100%;height:auto;aspect-ratio:1000/560;outline:none}.game-tip{font-size:11px;color:#bdc9ca;line-height:1.7}.modal{border:1px solid #dfcda8;border-radius:20px;max-height:92dvh;box-shadow:0 30px 100px #051321a0}.modal-top{background:#173b45;border-bottom:1px solid #b9a16d;padding:23px 27px}.modal-top h2{font-size:25px;color:#fff6e6;letter-spacing:-.7px}.modal-top .sub{font-size:10px;color:#d7c89f;letter-spacing:1px}.modal-body{padding:26px;background:#fffbf2;color:#273f43;line-height:1.7}.overlay{background:#081a29bd;backdrop-filter:blur(7px);padding:16px}.chapter-art{height:190px;background-size:cover;background-position:center 48%;border-radius:12px;display:flex;align-items:flex-end;padding:18px;margin-bottom:20px;position:relative;overflow:hidden}.chapter-art:before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#0c2634b0,transparent)}.chapter-art span{position:relative;color:#ffe6aa;font:italic 22px Georgia,serif;letter-spacing:3px}.victory-art{height:220px}.rule-callout{padding:14px 18px;background:#f0e8d7;border-left:3px solid #ba9157;font-size:14px;border-radius:4px}.rule-callout small{color:#7b7466}.quiz-scene{display:flex;gap:16px;align-items:center;background:#eaf0e9;border:1px solid #d3e0d1;padding:17px;border-radius:13px;margin-bottom:24px}.quiz-scene p{font-size:17px;line-height:1.85;margin:0}.quiz-owl{font-size:35px}.quiz-options{gap:12px}.quiz-opt{display:flex;align-items:center;gap:15px;text-align:left;padding:17px;font-size:19px;color:#28464a;background:#fffdf7;border:1px solid #d0d8cc;border-bottom:3px solid #bcc8b8;border-radius:10px;box-shadow:none}.answer-num{border:1px solid #d5dccc;border-radius:6px;font-size:12px;padding:2px 8px;color:#7a8877}.quiz-opt.answer-correct{background:#dcefdc;border-color:#70a684;color:#265c3e;opacity:1}.quiz-opt.wrong{background:#f9dfd8;border-color:#cf8874;color:#8b4535;opacity:1}.quiz-opt:disabled{cursor:default}.penalty-note{font-size:11px;color:#8b795b;margin:15px 0}.feedback{padding:18px;border:1px solid #a8c8a5;border-radius:11px;background:#f0f7ec}.feedback strong{font-size:19px}.feedback.warn{border-color:#d3b993;background:#fff0db}.feedback-next{margin-top:16px;width:100%}.rewind-rule{padding:12px 0;color:#9c6235;font-weight:700}.book-tools{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin-bottom:22px;font-size:13px}.book-tools input:not([type=checkbox]){padding:10px;border-radius:8px;border:1px solid #ccc;background:white;margin-left:8px}.book-entry{border:1px solid #d5d9c8;border-radius:12px;padding:19px;background:#fffdf6}.book-entry.learned{background:#edf5e9;border-color:#bed5b5}.book-entry strong{font-size:21px}.book-example{font-size:13px;color:#6d7768}.word-stats{font-size:10px;border-top:1px solid #ccd6c4;padding-top:10px;color:#648264}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}.result-grid div{background:#f0eadb;padding:16px;text-align:center;border-radius:12px}.result-grid b{display:block;font-size:25px;color:#426b62}.result-grid small{display:block;font-size:11px;color:#857b69}#mobileControls{display:flex;justify-content:space-between;gap:8px;margin-top:12px;touch-action:none}#mobileControls .ctl{min-width:52px;height:54px;border-radius:12px;background:#1b3d4d;color:#ffedc9;border:1px solid #6c8a8e;box-shadow:0 3px 0 #071e2b;font-size:13px;touch-action:none;user-select:none}#mobileControls .ctl.primary{background:#c9ad74;color:#263638;border-color:#efdaab}#mobileControls .ctl[data-pressed='1']{transform:translateY(2px);filter:brightness(1.3)}.game-frame:fullscreen{border:0;border-radius:0;display:flex;align-items:center;justify-content:center;background:#081626}.game-frame:fullscreen canvas{width:auto;max-width:100vw;max-height:100vh;height:100vh}.toast{max-width:90vw;font-size:13px;background:#173a43;color:#fff2cc;border:1px solid #bcaa79}
@media(max-width:1000px){.shell{width:calc(100% - 30px)}.menu-grid{grid-template-columns:1fr 340px;gap:16px}.menu-hero{min-height:710px}.hero-overlay{padding:23px}.hero-overlay h1{font-size:35px}.hero-buttons{gap:9px}.hero-buttons .btn{font-size:12px}.custom-panel{padding:18px}.stage-card{min-height:175px;padding:15px}.stage-card strong{font-size:14px}.game-buttons{gap:5px}.game-buttons .btn{font-size:10px;padding:8px}}
@media(max-width:760px){.shell{width:calc(100% - 20px)}.app-header{gap:12px;align-items:flex-start;flex-wrap:wrap;padding:15px 0}.brand strong{font-size:16px}.top-actions{gap:6px}.top-actions .btn{font-size:10px;padding:8px}.menu-grid{grid-template-columns:1fr}.menu-hero{min-height:610px}.hero-overlay h1{font-size:38px}.custom-panel{gap:16px}.preview-box{height:230px}.stages{grid-template-columns:repeat(2,1fr);gap:10px}.stage-card{min-height:170px}.section-head{gap:10px;align-items:flex-start}.section-head h2{font-size:16px}.section-head p{font-size:10px}.game-bar{flex-wrap:wrap;gap:10px}.game-bar h2{font-size:16px}.game-bar small{font-size:10px}.game-buttons{flex-wrap:wrap}.game-tip{font-size:10px}#mobileControls{gap:4px}#mobileControls .control-group{gap:4px}#mobileControls .ctl{min-width:36px;height:48px;font-size:11px;padding:4px}#mobileControls .ctl.wide{min-width:44px}.modal-top{padding:18px}.modal-top h2{font-size:22px}.modal-body{padding:18px}.quiz-scene{padding:13px;gap:10px}.quiz-scene p{font-size:15px}.quiz-options{gap:8px}.quiz-opt{padding:13px;font-size:18px}.chapter-art{height:140px}.feedback strong{font-size:18px}.book-grid{grid-template-columns:1fr}.overlay{padding:10px}.modal-actions{gap:9px}.modal-actions .btn{font-size:12px}.book-tools{gap:12px}.book-tools input:not([type=checkbox]){max-width:180px}}
@media(max-height:550px) and (orientation:landscape){body:has(#gameScreen:not(.hidden)) .app-header,body:has(#gameScreen:not(.hidden)) .footer-note,.game-tip{display:none}.game-bar{padding:5px 0}.game-bar h2{font-size:13px}.game-bar small{display:none}.game-frame{max-width:calc((100dvh - 109px)*1.7858);margin:auto}#mobileControls{margin-top:6px}#mobileControls .ctl{height:40px}.modal{max-height:96dvh}.modal-top{padding:12px 18px}.modal-body{padding:14px 18px}.quiz-scene{margin-bottom:12px}.quiz-options{grid-template-columns:repeat(4,1fr)}.quiz-opt{font-size:16px;padding:11px;gap:8px}.quiz-owl{font-size:24px}.penalty-note{margin:8px 0}.chapter-art{height:100px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(max-height:550px) and (orientation:landscape){.game-section{padding-bottom:6px}.game-bar{margin:0}}
:root:fullscreen{background:#102432;overflow:auto}:root:fullscreen .app-header,:root:fullscreen .footer-note,:root:fullscreen .game-tip{display:none}:root:fullscreen .game-section{padding-bottom:6px}:root:fullscreen .game-bar{margin:0;padding:5px 0}:root:fullscreen .game-bar h2{font-size:13px}:root:fullscreen .game-bar small{display:none}:root:fullscreen .game-frame{max-width:calc((100dvh - 112px)*1.7858);margin:auto}:root:fullscreen #mobileControls{margin-top:6px}:root:fullscreen #mobileControls .ctl{height:40px}
@media(max-width:760px){.hero-overlay h1{font-size:31px;letter-spacing:-1px;word-break:keep-all}.menu-canvas{object-position:76% top}}
.animation-controls{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0 14px}.animation-controls button{font:inherit;font-size:12px;border:1px solid #cfc7ad;border-radius:8px;padding:7px 10px;color:#293e43;background:#fffdf6;cursor:pointer}.animation-controls button[aria-pressed="true"]{background:#263f48;color:#fff2ce}.menu-preview-note{line-height:1.65}
.animation-controls{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0 14px}.animation-controls button{font:inherit;font-size:12px;border:1px solid #cfc7ad;border-radius:8px;padding:7px 10px;color:#293e43;background:#fffdf6;cursor:pointer}.animation-controls button[aria-pressed="true"]{background:#263f48;color:#fff2ce}.menu-preview-note{line-height:1.65}#assetLoading{position:fixed;inset:0;z-index:99999;background:#18363dee;display:grid;place-items:center;color:#fff0d1;font-size:20px;text-align:center;padding:25px}.field.hidden{display:none!important}
