:root{--ink:#17231b;--green:#2f7d32;--lime:#7fc243;--dark:#173f2b;--gold:#f3bd32;--cream:#fff9e9;--blue:#3976b8;--red:#d84c3f;--shadow:0 8px 0 rgba(20,40,25,.18)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;overflow:hidden;font-family:Arial,"Microsoft YaHei",sans-serif;color:var(--ink);background:#10271c}
button,input{font:inherit}button{touch-action:manipulation;cursor:pointer}
.screen{display:none;width:100%;height:100%;background:var(--cream)}.screen.active{display:flex;flex-direction:column}
.rotate-tip{display:none;position:fixed;inset:0;z-index:99;background:#173f2b;color:white;align-items:center;justify-content:center;font-size:1.4rem;text-align:center;padding:2rem}
.hero{height:48%;min-height:280px;display:grid;grid-template-columns:52% 48%;background:linear-gradient(135deg,#173f2b,#285f3d);color:white;overflow:hidden}
.hero-copy{padding:clamp(24px,4vw,58px);z-index:2}.eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;opacity:.8}
h1{font-size:clamp(2.5rem,5.2vw,5rem);line-height:.95;margin:.55rem 0 1rem;letter-spacing:-.04em}h1 em{font-style:normal;color:#ffcf45}h2{margin:.2rem 0 0;font-size:clamp(1.2rem,2.3vw,2rem)}.hero-copy p{max-width:620px;font-size:clamp(1rem,1.7vw,1.35rem);line-height:1.55;color:#dbeadd}
.profile-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.profile-row label{background:#0b2a1c;padding:8px 10px 8px 16px;border-radius:10px;font-weight:700}.profile-row input{width:110px;margin-left:8px;border:0;border-radius:6px;padding:8px;background:white}
.sound-btn{min-height:46px;border:2px solid rgba(255,255,255,.35);border-radius:10px;background:rgba(255,255,255,.12);color:inherit;padding:8px 14px;font-weight:700}
.hero-scene{position:relative;background:linear-gradient(#72bce8 0 54%,#8dcd4c 54% 100%);overflow:hidden}.sun{position:absolute;width:75px;height:75px;right:10%;top:10%;background:#ffe05a;box-shadow:0 0 0 8px rgba(255,224,90,.2)}.cloud{position:absolute;width:95px;height:28px;background:white;opacity:.85}.cloud:before,.cloud:after{content:"";position:absolute;background:white}.cloud:before{width:40px;height:40px;left:15px;bottom:0}.cloud:after{width:48px;height:52px;left:40px;bottom:0}.c1{left:8%;top:18%}.c2{right:25%;top:35%;transform:scale(.65)}
.mountain{position:absolute;width:260px;height:180px;background:#68826a;clip-path:polygon(50% 0,100% 100%,0 100%);bottom:24%}.m1{left:-5%}.m2{right:-5%;background:#526c58}.studio{position:absolute;width:190px;height:150px;right:17%;bottom:13%;background:#b77a3e;border:10px solid #6d4227;box-shadow:var(--shadow)}.roof{position:absolute;left:-22px;right:-22px;height:38px;top:-40px;background:#5c3524;border:8px solid #3d241a}.door{position:absolute;width:45px;height:75px;background:#5d341f;bottom:0;left:72px}.window{position:absolute;width:42px;height:38px;background:#a9e8ff;border:7px solid #e2ba67;top:24px;left:18px}.grass{position:absolute;bottom:0;width:100%;height:18%;background:repeating-linear-gradient(90deg,#477f2e 0 32px,#3d7429 32px 64px)}
.mode-grid{flex:1;display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,2vw,24px);padding:clamp(16px,2.7vw,34px) clamp(20px,5vw,72px)}.mode-card{position:relative;text-align:left;border:0;border-radius:18px;padding:clamp(18px,2.6vw,32px);box-shadow:var(--shadow);transition:transform .15s;color:#17231b;min-height:150px}.mode-card:active{transform:translateY(5px);box-shadow:0 3px 0 rgba(20,40,25,.18)}.quest-card{background:#b8df69}.original-card{background:#ffd759}.test-card{background:#84c4ec}.mode-icon{display:block;font-size:2.2rem}.mode-kicker{position:absolute;right:18px;top:18px;font-size:.78rem;font-weight:800;opacity:.62}.mode-card strong{display:block;font-size:clamp(1.15rem,2vw,1.7rem);margin:8px 0}.mode-card small{font-size:.92rem;opacity:.72}.mode-progress{position:absolute;right:16px;bottom:14px;background:rgba(255,255,255,.55);padding:5px 9px;border-radius:7px;font-weight:800;font-size:.8rem}footer{text-align:center;padding:0 20px 12px;font-size:.75rem;opacity:.6}
.topbar{height:82px;flex:0 0 82px;background:#173f2b;color:white;display:grid;grid-template-columns:64px 1fr auto;gap:14px;align-items:center;padding:10px 22px}.topbar.yellow{background:#f4b91f;color:#30270e}.topbar.blue{background:#2d639d}.icon-btn{width:52px;height:52px;border:0;border-radius:10px;background:rgba(255,255,255,.16);color:inherit;font-size:2rem;font-weight:bold}.top-actions{display:flex;gap:12px;align-items:center}.xp{background:#0b2a1c;padding:12px 15px;border-radius:10px;color:#aee85d;font-weight:800}
.quest-layout{flex:1;display:grid;grid-template-columns:minmax(210px,24%) 1fr;min-height:0}.mission-panel{background:#244c35;color:white;padding:18px;overflow:auto}.npc-face{font-size:3.5rem;text-align:center;background:#d4b16f;border:6px solid #795635;border-radius:12px;padding:8px}.npc-name{text-align:center;margin:7px;font-weight:800;color:#ffe293}.speech{background:white;color:#1e3325;border-radius:12px;padding:14px;line-height:1.35;min-height:70px}.stage-list{display:grid;gap:9px;margin-top:15px}.stage{min-height:58px;border:2px solid rgba(255,255,255,.2);background:transparent;color:white;border-radius:10px;display:grid;grid-template-columns:35px 1fr;text-align:left;align-items:center;padding:7px}.stage b{font-size:1.3rem}.stage span{font-weight:800}.stage small{display:block;font-weight:400;opacity:.65;margin-top:2px}.stage.active{background:#7eb842;border-color:#b8ec6e;color:#132619}
.play-area{position:relative;display:flex;flex-direction:column;background:linear-gradient(#c8e5f2 0 64%,#cbd9b3 64%);min-width:0}.stage-view{display:none;flex:1;min-height:0;overflow:auto;padding:18px 24px 100px}.stage-view.active{display:block}.task-banner{background:#fff7d2;border:3px solid #d8a928;border-radius:12px;padding:11px;text-align:center;font-weight:800;margin-bottom:14px}.item-grid{display:grid;grid-template-columns:repeat(4,minmax(100px,1fr));gap:14px}.item-card{min-height:145px;border:4px solid #6d5130;border-radius:9px;background:#fff8df;box-shadow:0 6px 0 #ad8a54;padding:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.item-card.collected{background:#d8f2aa;border-color:#4b7e2d}.item-card .pixel-icon{font-size:3.4rem}.item-card strong{font-size:1.25rem;margin-top:6px}.item-card .check{display:none;position:absolute;right:7px;top:6px;background:#397d2f;color:white;border-radius:50%;width:28px;height:28px;place-items:center}.item-card.collected .check{display:grid}
.inventory-wrap{position:absolute;bottom:14px;left:20px;right:20px;background:rgba(28,35,28,.93);border:4px solid #65523d;padding:7px 10px;color:white;display:flex;align-items:center;gap:12px;z-index:4}.inventory-wrap>span{font-size:.72rem;letter-spacing:.12em}.inventory{display:grid;grid-template-columns:repeat(8,1fr);gap:5px;flex:1}.slot{height:58px;background:#8e8e86;border:4px ridge #d9d9d0;display:grid;place-items:center;font-size:1.8rem;position:relative}.slot small{position:absolute;right:2px;bottom:0;font-size:.65rem;color:white;text-shadow:1px 1px #111}
.dialogue-scene{text-align:center;position:relative;min-height:390px}.question-bubble,.answer-bubble{display:inline-block;background:white;border:3px solid #315f9a;border-radius:20px;padding:14px 28px;font-weight:800;font-size:1.4rem;margin:8px}.answer-bubble{border-color:#7e3d94}.chest{width:160px;margin:25px auto 16px;font-size:5rem;background:#c4893f;border:8px solid #5c3a20;border-radius:8px;padding:14px;box-shadow:0 8px 0 rgba(0,0,0,.2)}.chest small{display:block;font-size:.72rem}.dialogue-choices{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.choice-chip{min-width:130px;min-height:60px;border:3px solid #6a4b2b;border-radius:10px;background:#fff5cf;font-weight:800;font-size:1.15rem}.choice-chip.correct{background:#9edc68}.choice-chip.wrong{background:#f0a29a}
.primary-btn{min-height:56px;border:0;border-radius:10px;background:#2d7432;color:white;padding:12px 24px;font-size:1.05rem;font-weight:800;box-shadow:0 5px 0 #17451c;margin:14px}.primary-btn:disabled{background:#859083;box-shadow:0 5px 0 #626a61}.primary-btn.small{min-height:46px;margin:0}.hidden{display:none!important}
.build-board{text-align:center}.build-preview{width:min(420px,75%);height:180px;margin:auto;background:#b9dff1;border:5px solid #537969;display:flex;flex-direction:column;align-items:center;justify-content:center}.build-preview span{font-size:5rem}.build-preview strong{font-size:1.4rem}.build-slots{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:18px}.build-slots .slot{width:64px}
.slide-stage{flex:1;min-height:0;display:grid;grid-template-columns:70px 1fr 70px;align-items:center;background:#e8e5dc;padding:14px 20px}.slide-frame{height:100%;min-height:0;display:flex;align-items:center;justify-content:center}.slide-frame img{max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 8px 30px rgba(0,0,0,.2);background:white}.nav-btn{width:58px;height:90px;border:0;border-radius:12px;background:#ffffffc9;font-size:3rem;color:#6d5721}.page-count{font-size:1.1rem;font-weight:800}.slide-tools{height:72px;background:#fff5d1;display:grid;grid-template-columns:auto 1fr auto;gap:22px;align-items:center;padding:10px 24px}.slide-tools .sound-btn{color:#372b0c;border-color:#d8ad31;background:white}.slide-tools input{width:100%}
.test-intro,.result-area{margin:auto;text-align:center;max-width:700px;padding:30px}.target{font-size:5rem}.test-intro h3,.result-area h3{font-size:2rem;margin:.4rem}.test-intro p{font-size:1.1rem;line-height:1.5}.question-area{flex:1;padding:22px 6vw;text-align:center;overflow:auto}.question-type{display:inline-block;background:#dcecff;color:#285a90;padding:7px 12px;border-radius:8px;font-weight:800}.question-area h3{font-size:clamp(1.5rem,3vw,2.3rem);margin:16px}.question-visual{font-size:6rem;min-height:80px}.audio-orb{width:160px;height:100px;border:4px solid #2f659f;border-radius:18px;background:#e5f2ff;font-size:2.7rem}.audio-orb span{display:block;font-size:.8rem;font-weight:800}.answer-options{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:14px;max-width:850px;margin:18px auto}.answer-option{min-height:92px;border:4px solid #356795;border-radius:14px;background:white;font-size:1.35rem;font-weight:800}.answer-option.correct{background:#b7e682;border-color:#43852f}.answer-option.wrong{background:#f6b0a9;border-color:#bd3d35}.score-ring{width:170px;height:170px;border-radius:50%;display:grid;place-items:center;margin:10px auto;background:#dff1c3;border:14px solid #70a93c;font-size:2.6rem;font-weight:900}.result-list{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.result-word{padding:7px 10px;border-radius:8px;background:#edf0ea}.result-word.miss{background:#ffd0cb}
#toast{position:fixed;left:50%;bottom:100px;transform:translate(-50%,30px);background:#17231be8;color:white;padding:13px 20px;border-radius:10px;font-weight:800;opacity:0;transition:.2s;pointer-events:none;z-index:50}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-height:650px){.topbar{height:68px;flex-basis:68px}.item-card{min-height:115px}.inventory-wrap{bottom:7px}.slot{height:48px}.stage-view{padding-top:10px}.hero{height:45%}.mode-grid{padding-top:12px;padding-bottom:12px}}
@media(max-width:900px){.quest-layout{grid-template-columns:190px 1fr}.mission-panel{padding:11px}.npc-face{font-size:2.5rem}.item-grid{gap:8px}.item-card{min-height:120px;padding:7px}.mode-grid{padding-left:20px;padding-right:20px}.mode-card{padding:18px}.hero-copy{padding:28px}.slide-stage{grid-template-columns:55px 1fr 55px;padding:10px}.nav-btn{width:45px}}
@media(orientation:portrait) and (max-width:900px){.rotate-tip{display:flex}#app{display:none}}
