.ninja{position:absolute;bottom:14px;left:24px;width:128px;height:158px;z-index:6;animation:bob 2.6s ease-in-out infinite;}
.ninja.celebrate{animation:celebrate .8s cubic-bezier(.3,1.4,.5,1);}
.ninja.wrong{animation:wobble .6s ease;}

.ninja__shadow{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:84px;height:16px;border-radius:50%;background:rgba(0,0,0,.35);filter:blur(3px);}

.ninja__body{
  position:absolute;bottom:14px;left:26px;width:76px;height:70px;
  border-radius:38px 38px 22px 22px;
  background:linear-gradient(160deg,var(--suit,#4caf50),var(--suit-dk,#2e7d32));
  box-shadow:inset -6px -8px 0 rgba(0,0,0,.18);
}
.ninja__belt{position:absolute;bottom:34px;left:22px;width:84px;height:11px;border-radius:6px;background:linear-gradient(180deg,var(--gold-soft),var(--gold-deep));box-shadow:0 1px 3px rgba(0,0,0,.3);}
.ninja__knot{position:absolute;bottom:30px;left:58px;width:16px;height:16px;border-radius:5px;background:var(--gold-deep);transform:rotate(45deg);}
.ninja__arm{position:absolute;width:24px;height:30px;border-radius:14px;background:linear-gradient(160deg,var(--suit,#4caf50),var(--suit-dk,#2e7d32));bottom:34px;}
.ninja__arm--l{left:16px;transform:rotate(12deg);}
.ninja__arm--r{right:16px;transform:rotate(-12deg);transform-origin:bottom;}
.ninja.celebrate .ninja__arm--r{animation:armUp .8s ease;}

.ninja__head{
  position:absolute;top:6px;left:18px;width:92px;height:88px;
  border-radius:48% 48% 44% 44%;
  background:linear-gradient(165deg,var(--suit,#4caf50),var(--suit-dk,#2e7d32));
  box-shadow:inset -7px -9px 0 rgba(0,0,0,.16), 0 5px 12px rgba(0,0,0,.32);
}
.ninja__band{
  position:absolute;top:38px;left:6px;width:80px;height:26px;
  background:linear-gradient(180deg,#ffe9c9,#ffd6a0);
  border-radius:14px;
}
.ninja__eye{
  position:absolute;top:44px;width:15px;height:17px;border-radius:50%;
  background:#fff;overflow:hidden;
  animation:blink 4.2s infinite;
}
.ninja__eye::after{content:"";position:absolute;top:4px;left:3px;width:8px;height:9px;border-radius:50%;background:#241a3a;}
.ninja__eye::before{content:"";position:absolute;top:5px;left:8px;width:3px;height:3px;border-radius:50%;background:#fff;z-index:2;}
.ninja__eye--l{left:30px;}
.ninja__eye--r{left:52px;}
.ninja__brow{position:absolute;top:36px;width:16px;height:5px;border-radius:3px;background:#241a3a;}
.ninja__brow--l{left:29px;transform:rotate(9deg);}
.ninja__brow--r{left:51px;transform:rotate(-9deg);}

.ninja__headband{
  position:absolute;top:30px;left:8px;width:80px;height:13px;
  background:linear-gradient(180deg,var(--gold-soft),var(--gold-deep));
  border-radius:4px;z-index:3;
  box-shadow:0 1px 3px rgba(0,0,0,.3);
}
.ninja__tail{position:absolute;left:-2px;width:30px;height:9px;background:linear-gradient(90deg,var(--gold-deep),var(--gold-soft));border-radius:3px;transform-origin:right center;}
.ninja__tail--1{top:30px;animation:flutter 1.8s ease-in-out infinite;}
.ninja__tail--2{top:40px;width:24px;animation:flutter 1.8s ease-in-out infinite .25s;}



@charset "UTF-8";
:root{--ink:#3b4054;--muted:#7c847b;--paper:#fffdf4;--cream:#f6f1e2;--green:#688e55;--green-dark:#496e3b;--mint:#ecf3df;--gold:#e2b855;--gold-soft:#ffe499;--gold-deep:#d2a43f;--line:#e1dfcd;font-family:"Yu Gothic UI","Hiragino Maru Gothic ProN","Meiryo",sans-serif;color:var(--ink);background:#eeeede;font-synthesis:none}*{box-sizing:border-box}html,body,#root{margin:0;width:100%;height:100%}body{overflow:hidden}button,input{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #b88025;outline-offset:3px}button:not(:disabled):active{transform:translateY(2px)}button:not(:disabled){transition:background .15s,transform .15s}button>svg{flex-shrink:0}svg{display:block}h1,h2,p{margin:0}h2{font-size:23px;line-height:1.5}p{line-height:1.8}small{font-size:11px}a{color:var(--green-dark)}.boot{display:grid;place-content:center;gap:20px;text-align:center;height:100%}.primary,.soft{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;border-radius:14px;padding:10px 15px;font-size:15px;font-weight:700}.primary{color:#fffef2;background:var(--green);box-shadow:0 4px 0 var(--green-dark)}.primary:not(:disabled):hover{background:#557c45}.soft{background:#f0edda;border:1px solid #dfddc4;border-bottom-width:3px;color:#6a724e}.soft:not(:disabled):hover{background:#e8edda}.two-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:10px;width:100%}.text-button{font-size:12px;text-decoration:underline;text-underline-offset:3px;padding:9px;color:var(--muted);min-height:36px}.eyebrow{font-size:11px;font-weight:700;color:#b18a39;letter-spacing:.06em}.badge{display:inline-flex;align-items:center;gap:6px;background:#eaf1dd;color:#67844c;font-size:12px;font-weight:700;padding:6px 10px;border-radius:8px;white-space:nowrap}.badge.gold{background:#f6eaca;color:#9b792d}.weapon-icon{display:block;width:100%;height:100%}.mascot{position:relative;width:128px;height:158px;flex-shrink:0}.mascot .ninja{left:0;bottom:0}.ninja__weapon{position:absolute;right:-5px;bottom:30px;width:43px;height:43px;z-index:8;filter:drop-shadow(0 3px 3px #33224744)}.ninja__shadow{background:#2e3e2533}.ninja__head{box-shadow:inset -7px -9px 0 #0002,0 5px 12px #0002}
.app-shell{height:100dvh;width:100%;max-width:1280px;margin:0 auto;display:grid;grid-template-rows:66px minmax(0,1fr) 22px;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);background:var(--cream);overflow:hidden}.app-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 19px;border-bottom:1px solid #dfdec8;background:#fffdf5}.brand{display:flex;align-items:center;gap:8px;padding:0;text-align:left}.brand>span{font-size:25px;font-weight:900;background:#8eb56b;color:#fff7dc;width:37px;height:37px;border-radius:12px 5px;display:grid;place-items:center}.brand b{font-size:10px;line-height:1.4;letter-spacing:.04em}.brand em{font-size:16px;font-style:normal;color:#567744}.course-switch{display:flex;flex-direction:column;gap:2px;padding:5px 12px;min-height:43px;border:1px solid #e2e5cf;background:#f6f7eb;border-radius:12px;text-align:center}.course-switch>span{font-size:13px;font-weight:700}.course-switch>small{font-size:9px;color:#7b876c}.header-buttons{display:flex;gap:4px}.header-buttons button{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;background:#f6f4e8}.header-buttons button:hover{background:#e9edda}.home-content{display:grid;grid-template-rows:minmax(210px,1fr) auto;min-height:0;padding:10px 12px 3px;gap:0}.map-scene{position:relative;min-height:0;overflow:hidden;border:1px solid #c6d8b8;border-bottom:0;border-radius:22px 22px 0 0;background:linear-gradient(#314d4122,#426b3555),url('art/forest-map.png') center 55%/cover;isolation:isolate}.map-scene:after{content:"";position:absolute;inset:0;background:linear-gradient(#f2f6dfb5,transparent 35%,transparent 72%,#94b27377);z-index:-1}.map-title{position:absolute;top:12px;left:16px;right:16px}.map-title>span{color:#416843;font-weight:700;font-size:10px;background:#f8f7dfce;padding:4px 8px;border-radius:6px}.map-title h1{font-size:20px;margin-top:8px;color:#254f36;text-shadow:0 1px #fffbe3;letter-spacing:.03em}.map-route{position:absolute;width:100%;height:calc(100% - 47px);top:10px;pointer-events:none}.map-route path{fill:none;stroke:#fff4b3;stroke-width:5;stroke-linecap:round;stroke-dasharray:4 9;filter:drop-shadow(0 2px 1px #7b825d66)}.place-node{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:4px;padding:0;z-index:3;min-width:60px}.place-node:not(:disabled):active{transform:translate(-50%,-47%)}.place-node>span{width:43px;height:43px;border:3px solid #fff7da;border-radius:50%;background:#d4b86a;color:#fff;font-size:19px;font-weight:800;display:grid;place-items:center;box-shadow:0 3px 0 #9c854b,0 0 0 5px #faf1be55}.place-node b{padding:3px 8px;border-radius:7px;background:#fff9e8e8;font-size:9px;white-space:nowrap;color:#586044}.place-node.current>span{background:#efbf55;color:#7b5d24;animation:beacon 3s infinite}.place-node.current b{background:#fff5c9;color:#8c6b27}.place-node.done>span{background:#75a36a;box-shadow:0 3px #4c7448}.place-node.locked{opacity:1}.place-node.locked>span{width:34px;height:34px;background:#70846c;color:#e3ebce;box-shadow:0 2px #4e604d}.place-node.locked b{opacity:.8}.map-mascot{position:absolute;right:13%;bottom:44px;transform:scale(.65);transform-origin:bottom right;z-index:3}.map-detours{position:absolute;bottom:10px;left:11px;display:flex;gap:7px;z-index:5}.map-detours button{display:flex;align-items:center;gap:5px;border:1px solid #f0e3b0;background:#fff9e5f2;box-shadow:0 3px 0 #657e413b;padding:7px 9px;border-radius:11px;min-height:40px;color:#84703d}.map-detours b{font-size:10px;white-space:nowrap}.map-detours small{font-size:9px}.map-paging{position:absolute;right:8px;bottom:10px;display:flex;align-items:center;gap:2px;color:#4c6646;background:#fff9e5eb;border-radius:10px;z-index:5;padding:2px}.map-paging button{width:28px;height:34px;display:grid;place-items:center}.map-paging>span{font-size:9px}.learning-card{border:1px solid #dedfc5;border-radius:22px;box-shadow:0 -5px 20px #2848240d;background:#fffdf4;position:relative;margin-top:-6px;z-index:6;padding:17px 16px 11px}.progress-title{display:flex;align-items:center;justify-content:space-between}.progress-title>span{display:flex;align-items:center;gap:8px;color:#a17d2c}.progress-title b{font-size:15px;color:#626647}.progress-title>strong{font-size:24px;line-height:1;color:#9a813b}.progress-title strong small{font-size:13px;color:#a7ac95;font-weight:500}.progress-message{font-size:12px;color:#798367;margin:6px 0 12px}.letter-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.letter-grid>button{position:relative;border:1px solid #dedfcb;border-bottom-width:3px;min-height:62px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f8f7e9;border-radius:12px;padding:4px}.letter-grid>button>b{font-size:27px;line-height:1.2;font-weight:600}.letter-marks{display:flex;gap:7px;margin-top:4px}.letter-marks>i{color:#c5cbb9}.letter-marks>i.on{color:#70a25a}.letter-grid>button.mastered{background:#f6eac7;border-color:#e6cd8c;color:#a48331}.little-key{position:absolute;top:4px;right:4px;color:#c09a3e}.legend{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 0;color:#8b947a;font-size:10px}.legend>span{display:flex;align-items:center;gap:4px}.legend>small{font-size:9px}.home-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:8px}.home-actions>button{font-size:13px;min-height:46px;padding:9px 7px;gap:6px}.home-actions>button>svg{width:20px;height:20px}.home-note{text-align:center;font-size:9px;color:#a0a58f;margin-top:10px}.save-status{font-size:8px;text-align:center;color:#97a08a;display:flex;align-items:center;justify-content:center}.save-status.error{color:#bd643c;font-size:10px}
.overlay{position:fixed;inset:0;z-index:50;background:#354934b8;backdrop-filter:blur(5px);padding:8px;display:grid;place-items:center}.modal{display:grid;grid-template-rows:46px minmax(0,1fr);width:min(740px,100%);height:min(760px,100%);border-radius:24px;border:1px solid #f6edcc;background:var(--paper);box-shadow:0 18px 80px #24382266;overflow:hidden}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:0 17px;background:#f6f3e2;border-bottom:1px solid #e6e3cc;gap:10px}.modal-header>span{font-size:12px;font-weight:700;color:#7e8266}.close{display:flex;align-items:center;gap:6px;padding:5px 0;min-height:36px;font-size:12px;color:#81876f}.lesson{display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:20px 22px;position:relative}.lesson-top{display:flex;justify-content:space-between;align-items:center;min-height:30px;gap:9px}.lesson-top>small{color:var(--muted);font-size:11px}.mini-progress{font-size:12px;color:#b29444;font-weight:700}.lesson-note{font-size:11px;color:#899178;text-align:center;display:block;margin-bottom:9px}.task-label{text-align:center;font-size:17px;font-weight:700;color:#62664d;margin:12px 0}.study-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}.study-heading>div{display:flex;align-items:baseline;gap:12px}.study-word{font-size:48px;font-weight:700;line-height:1.3;color:#62824c}.study-reading{font-size:15px;color:#89926f}.study-heading>.soft{min-height:40px;padding:7px 12px;font-size:13px}.study>.task-label{font-size:13px;margin:4px 0 10px}.study-pad{display:flex;align-items:center;justify-content:center;min-height:0;flex:1}.study-bottom{margin-top:auto;padding-top:13px}.study-bottom .two-actions>button{font-size:12px;padding:9px 7px;min-height:43px}.trace{display:flex;flex-direction:column;align-items:center;gap:7px;max-width:100%;min-height:0}.wd__padwrap{position:relative;width:min(300px,calc(100dvh - 355px));aspect-ratio:1}.wd__pad{width:100%;height:100%;display:block;touch-action:none;user-select:none;cursor:crosshair}.wd__frame{fill:#fffef8;stroke:#c0cbaa;stroke-width:1}.wd__grid{stroke:#d5dec8;stroke-width:.5;stroke-dasharray:2 3}.wd__tmpl,.wd__ink,.wd__user{fill:none;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}.wd__tmpl{stroke:#e0e5d7}.wd__tmpl.cur{stroke:#bbcfa6}.wd__ink{stroke:#577849}.wd__user{stroke:#84a16e}.wd__startdot{fill:#dcb553}.wd__startnum{font-size:6px;text-anchor:middle;fill:#fff;font-weight:700}.wd__clear{position:absolute;bottom:5px;left:0;right:0;text-align:center;color:white;font-weight:700;border-radius:12px;padding:8px;background:#638753ef;font-size:14px}.wd__fb{font-size:12px;color:#8b9578;min-height:20px;text-align:center}.wd__fb[data-ok=true]{color:#6f964f}.wd__fb[data-ok=false]{color:#bc8542}.wd__dots{display:flex;gap:5px;justify-content:center;flex-wrap:wrap;max-width:220px}.wd__dot{display:block;width:6px;height:6px;border-radius:50%;background:#d6deca}.wd__dot.on{background:#83a766}.wd__dot.now{background:#dfb759}.wd__foot{display:flex;justify-content:center;gap:8px;margin-top:4px}.btn-ghost{background:#f1efde;border:1px solid #d9ddc6;border-radius:9px;padding:8px 12px;font-size:11px;min-height:36px}.trace__loading{font-size:13px;color:var(--muted);padding:50px}.trace-error{text-align:center;font-size:12px}.part-steps{display:flex;gap:12px;justify-content:center;padding:13px 0 5px}.part-steps>span{display:flex;align-items:center;gap:6px;font-size:12px;padding:5px 11px;border-radius:16px;color:#b2b79e;border:1px solid #e7e8d8}.part-steps>span.now{color:#ad8b34;background:#faf0ce;border-color:#ecdcaa}.part-steps>span.finished{color:#6c924f;background:#eaf1df;border-color:#d7e2c4}.read-question{display:flex;flex-direction:column;align-items:center;gap:12px;flex:1;min-height:0;justify-content:center}.read-question>.task-label{margin:4px 0 8px;font-size:17px}.listen-orb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;border-radius:50%;width:130px;height:130px;border:3px solid #d7e4ba;box-shadow:0 5px 0 #d8dfbe;background:#edf3da;color:#75914f;font-size:16px;font-weight:700;margin:8px 0 18px}.listen-orb:hover{background:#e0edca}.question-character{font-size:90px;line-height:1.2;font-weight:700;color:#54733f;padding:15px 0 20px;text-align:center}.question-character.kanji{font-size:64px}.answers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;width:100%}.answers>button{border:2px solid #dce0c7;border-bottom-width:4px;background:#fffdf3;min-height:79px;border-radius:15px;font-size:19px;font-weight:700;padding:8px 5px;word-break:keep-all;overflow-wrap:anywhere}.answers.kana>button{font-size:43px}.answers>button:not(:disabled):hover{background:#edf2de}.answers>button:disabled{opacity:.45}.answers>button.correct{opacity:1;background:#e6f0d5;border-color:#a7c487;color:#6b904c}.answers>button.incorrect{opacity:1;background:#f4e7ce;border-color:#d9ba7e;color:#ae8240}.audio-help{font-size:10px}.parent-instruction{font-size:11px;color:#8a9378;text-align:center}.parent-read{display:flex;gap:9px;width:100%}.parent-read>button{flex:1;background:#e9efdb;border:1px solid #cad8b7;border-radius:12px;padding:13px 8px;font-size:13px;min-height:46px}.result-bar{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;min-height:68px;text-align:center;font-size:11px;line-height:1.7;color:#8c967c;padding:12px 0}.result-bar b{font-size:16px;font-weight:700;color:#799355}.result-bar.wrong b,.result-bar.guided b{color:#ae8a44}.lesson-footer{margin-top:auto;min-height:49px;display:flex;align-items:center;justify-content:center}.lesson-footer>.primary{width:100%}.lesson-footer>.two-actions>button{font-size:13px}.saved-caption{text-align:center;font-size:10px;line-height:1.8;color:#9ca48e}.write-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;flex:1;min-height:0;padding:5px 0}.preview-letter{font-size:112px;font-weight:600;line-height:1.25;color:#64834f}.write-preview p:not(.task-label){font-size:13px;color:#8a9278}.write-preview>.soft{font-size:12px;min-height:36px;padding:7px 12px}.write-preview>.primary{font-size:13px;min-height:44px;width:100%;margin-top:8px}.write-question{display:flex;align-items:center;flex-direction:column;flex:1;min-height:0;justify-content:center;gap:11px}.write-prompt{display:flex;align-items:center;justify-content:center;gap:8px;max-width:100%;font-size:14px;font-weight:600;text-align:center}.write-prompt>button{padding:5px;color:#8b9c68;background:#f0f0dc;border-radius:50%;min-width:33px;min-height:33px}.gate-lesson.write .wd__padwrap{width:min(290px,calc(100dvh - 365px))}.gate-lesson.write .result-bar{min-height:59px;padding:10px 0}.gate-ready,.celebration{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;text-align:center;padding:27px;color:#84866b;min-height:0;background:radial-gradient(ellipse at 50% 25%,#fbf1cc,transparent 60%)}.gate-ready>svg,.open-gate{color:#c7a04d;filter:drop-shadow(0 6px 10px #d7bc6d3b)}.gate-ready h2,.celebration h2{color:#7a884d;font-size:23px}.gate-ready>p,.celebration>p{font-size:13px}.gate-ready>.primary,.celebration>.primary{min-width:270px;font-size:14px}.key-ring{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;width:min(380px,100%)}.key-ring>span{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;padding:10px;background:#f6e9bf;border:1px solid #e2cc89;border-radius:12px;color:#c09d42}.key-ring b{font-size:21px;font-weight:600}.open-gate{position:relative}.open-gate>span{position:absolute;top:6px;right:-17px;font-size:33px;color:#e9c160}.celebration>.mascot{margin-top:-5px}.gate-ready>svg{width:80px;height:80px}
.chest-menu,.chest-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px 22px;gap:18px;text-align:center;min-height:0}.chest-menu h2,.chest-preview h2{font-size:21px}.chest-menu p,.chest-preview p{font-size:12px;color:#899174}.chest-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%;margin:5px 0}.chest-list>button{display:flex;align-items:center;flex-direction:column;gap:12px;background:#f7edcd;border:2px solid #e8d5a0;border-bottom-width:4px;border-radius:17px;padding:20px 5px;color:#b18a34}.chest-list b{font-size:12px}.chest-list span{font-size:10px;color:#a6986a}.chest-menu>small{font-size:10px;color:#a4aa91}.chest-menu>.mascot{transform:scale(.8);margin:-8px}.chest-reward-preview{display:flex;align-items:center;justify-content:center;gap:15px;background:#f5edcf;border:1px solid #e8d8ac;border-radius:17px;padding:16px;width:100%;text-align:left}.chest-reward-preview>.weapon-icon{width:73px;height:73px}.chest-reward-preview span,.chest-reward-preview b{display:block}.chest-reward-preview span{font-size:10px;color:#a29156;margin-bottom:6px}.chest-reward-preview b{font-size:14px;color:#8c783d}.chest-words{display:flex;gap:10px;width:100%;margin:8px 0 13px}.chest-words>button{flex:1;display:flex;align-items:center;flex-direction:column;gap:7px;background:#eef1de;border:1px solid #d8dfbe;border-radius:14px;padding:16px 7px;min-width:0}.chest-words b{font-size:31px;font-weight:600}.chest-words small{font-size:11px;color:#8a9371}.chest-words svg{color:#93a774}.chest-preview>.primary{width:100%}.chest-preview>.text-button{margin-top:-6px}.chest-preview>small{font-size:10px;color:#a6ac92}.chest-lesson>.read-question{padding-top:18px}.chest-lesson>.primary{min-height:46px;margin-top:auto;font-size:14px}.reward-big{width:140px;height:140px;display:grid;place-items:center;color:#c6a454;filter:drop-shadow(0 6px 7px #ba9c4444)}.chest-result>small{font-size:11px;line-height:1.8}.scroll-page{overflow:auto;overscroll-behavior:contain;min-height:0;padding:24px}.scroll-page>h2{margin:5px 0 9px}.scroll-page>p{font-size:12px;color:#8a9279}.weapon-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:21px 0}.weapon-card{display:flex;flex-direction:column;align-items:center;gap:7px;border:2px solid #e1ddc3;background:#f8f2df;border-radius:16px;padding:15px 8px;text-align:center}.weapon-card>.weapon-icon{width:86px;height:86px}.weapon-card b{font-size:12px}.weapon-card span{font-size:13px;color:#a6893c;font-weight:700}.weapon-card small{font-size:9px;color:#a0a588}.weapon-card strong{font-size:10px;border-radius:20px;padding:6px 11px;background:#fffdf4;font-weight:600;color:#919478}.weapon-card.equipped{border-color:#a6c583;background:#eef3dc}.weapon-card.equipped strong{background:#8ead66;color:white}.star-total{display:flex;align-items:center;justify-content:center;gap:9px;padding:15px;background:#f7edcc;border-radius:12px;color:#b29545;font-size:13px;margin-bottom:15px}.bag-page>.primary{position:sticky;bottom:0;font-size:13px;box-shadow:0 4px #4c713c,0 0 0 5px #fffdf4e6}.course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:20px}.course-grid>button{display:flex;align-items:center;flex-direction:column;gap:6px;background:#f6f6e9;border:2px solid var(--course-color);border-radius:19px;padding:10px 8px;min-width:0}.course-grid .mascot{transform:scale(.65);margin:-22px -10px -25px}.course-grid b{font-size:19px;margin-top:10px}.course-grid small{color:#919878;font-size:10px}.course-grid span{font-size:10px;color:#8e987e;margin:3px 0 7px}.course-grid strong{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:600;color:#758658;background:#e9eedb;border-radius:20px;padding:7px 9px}.settings h2{font-size:22px}.settings p{font-size:13px}.settings-row{display:flex;gap:10px;margin:18px 0}.settings-row>.soft{flex:1;font-size:13px;min-height:44px}.settings-row .selected{border-color:#aec586;background:#ebf1d8}.wide{width:100%;font-size:13px;margin:11px 0}.settings .small-note{font-size:11px;line-height:1.9;margin:12px 0;color:#90967f}.settings a{font-size:11px}
.battle-modal{width:min(900px,100%)}.battle-view{display:grid;grid-template-rows:40% minmax(0,1fr);min-height:0}.arena{position:relative;background:linear-gradient(#243e3b22,#47654055),url('art/forest-map.png') 45% 55%/cover;overflow:hidden;isolation:isolate}.arena-shade{position:absolute;inset:0;background:linear-gradient(#28472f99,transparent 35%,#345a3377);z-index:-1}.arena .fighter{position:absolute;left:12%;bottom:22px;transform:scale(1);transform-origin:bottom left}.enemy{position:absolute;right:13%;bottom:23px;width:120px;height:150px;filter:drop-shadow(0 5px 3px #24452544)}.battle-hud{position:absolute;left:20px;right:20px;top:15px;display:flex;justify-content:space-between;gap:32px;z-index:8}.battle-hud>div{flex:1}.battle-hud small{display:block;font-size:10px;color:#f8f4d2;margin-bottom:6px}.hearts{font-size:24px;color:#f2bd87;line-height:1;letter-spacing:2px;display:block}.hearts i{font-style:normal;color:#e4d4b1}.enemy-health{height:11px;background:#294a3099;border:1px solid #f8edb5a3;border-radius:8px;overflow:hidden}.enemy-health>i{display:block;height:100%;background:#edc566;transition:width .5s}.battle-controls{padding:23px 24px;display:flex;flex-direction:column;align-items:center;gap:12px;min-height:0}.battle-controls>h2{font-size:21px;text-align:center}.battle-controls>p{font-size:12px;text-align:center;color:#959b81}.equipped-button{display:flex;align-items:center;gap:12px;padding:10px 13px;border:1px solid #e2dfc4;background:#f3efdc;border-radius:13px;width:100%;text-align:left;margin:auto 0;font-size:12px}.equipped-button>.weapon-icon{width:44px;height:44px}.equipped-button>span{flex:1}.equipped-button small{display:block;font-size:9px;color:#a5ab91;margin-top:4px}.battle-controls>.primary{width:100%;font-size:15px}.enemy-intent{display:flex;align-items:center;justify-content:center;gap:9px;padding:12px;background:#ebf1db;border:1px solid #d6e2b7;border-radius:12px;color:#7c9554;width:100%}.enemy-intent b{font-size:15px}.enemy-intent.danger{color:#b18845;background:#f8ecd1;border-color:#e6d49f}.battle-controls>p.battle-coach{font-size:11px}.charge{display:flex;align-items:center;gap:8px;border-radius:30px;background:#f5f0d9;padding:9px 15px;color:#a3a881;margin:5px 0}.charge span{font-size:11px;margin-right:4px}.charge i{font-style:normal;color:#d4d8bd;font-size:27px;line-height:1}.charge i.on{color:#d7b449;text-shadow:0 0 12px #ffe89199}.battle-message{font-size:12px;color:#9c966f;line-height:1.6;text-align:center;min-height:29px;margin:auto 0}.battle-controls>.two-actions{margin-top:auto}.weapon-name{font-size:10px;color:#a2aa8d}.special-button{background:#c49c3d;box-shadow:0 4px #9a7525}.special-button:not(:disabled):hover{background:#ad8733}.battle-end{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;height:100%;width:100%;text-align:center}.battle-end>svg{color:#ceaf52}.battle-end h2{font-size:24px;color:#779154}.battle-end p{font-size:12px;color:#8f957b}.battle-end small{font-size:10px;color:#a0a78d}.battle-end>.primary{width:100%;margin-top:8px}.battle-end>.soft{width:100%;min-height:39px;font-size:13px}.flying{position:absolute;left:27%;top:58%;width:58px;height:58px;z-index:4;animation:throw .65s ease-out both;pointer-events:none}.impact{position:absolute;right:16%;top:42%;font-size:95px;line-height:1;color:#fff1aa;opacity:0;animation:impact .5s .25s both;text-shadow:0 0 20px #ffe48d;z-index:5;pointer-events:none}.damage{position:absolute;right:16%;top:28%;font-size:37px;font-weight:900;color:#fff4bc;text-shadow:0 3px #8e773e;animation:damage .8s both;z-index:5;pointer-events:none}.attacking .enemy{animation:enemy-hit .5s .25s}.special .impact{font-size:130px;right:12%;color:#fff7a0}.special .damage{font-size:43px;color:#ffe978}.won .enemy{opacity:.35;filter:grayscale(.5);transition:opacity 1s}.victory-word{position:absolute;top:42%;left:50%;transform:translateX(-50%) rotate(-6deg);font-size:32px;font-weight:900;color:#fff4b3;text-shadow:0 3px #998044;white-space:nowrap;z-index:7;background:#3d663c99;padding:9px 18px;border-radius:14px;animation:pop .4s}.guard-flash{position:absolute;left:23%;bottom:45px;color:#d9efd2;filter:drop-shadow(0 0 8px #d0ffb4);animation:pop .5s;z-index:6}
@keyframes bob{50%{transform:translateY(-4px)}}@keyframes celebrate{30%{transform:translateY(-12px) rotate(5deg)}65%{transform:translateY(-4px) rotate(-4deg)}}@keyframes wobble{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}@keyframes flutter{50%{transform:rotate(8deg)}}@keyframes blink{0%,42%,46%,100%{transform:scaleY(1)}44%{transform:scaleY(.1)}}@keyframes armUp{40%{transform:rotate(-55deg)}}@keyframes beacon{50%{box-shadow:0 3px 0 #9c854b,0 0 0 8px #faf1be66}}@keyframes wd-draw{to{stroke-dashoffset:0}}@keyframes throw{0%{transform:translateX(0) rotate(0);opacity:1}80%{opacity:1}100%{transform:translateX(170px) rotate(450deg);opacity:0}}@keyframes impact{0%{transform:scale(.3);opacity:0}40%{transform:scale(1);opacity:1}100%{transform:scale(1.5);opacity:0}}@keyframes damage{0%{transform:translateY(15px);opacity:0}100%{transform:translateY(-8px);opacity:1}}@keyframes enemy-hit{35%{transform:translateX(8px) rotate(5deg)}70%{transform:translateX(-4px)}}@keyframes pop{0%{opacity:0}100%{opacity:1}}
@media(min-width:650px){.app-header{padding:0 28px}.brand em{font-size:21px}.brand b{font-size:11px}.brand>span{width:42px;height:42px;font-size:28px}.course-switch{min-width:160px}.course-switch>span{font-size:16px}.course-switch>small{font-size:11px}.header-buttons{gap:8px}.header-buttons button{width:44px;height:44px}.home-content{padding:15px 24px 5px}.map-title{top:20px;left:24px}.map-title h1{font-size:27px}.map-title>span{font-size:12px}.map-mascot{transform:scale(1);right:15%;bottom:60px}.place-node>span{width:55px;height:55px;font-size:24px}.place-node b{font-size:11px;padding:5px 11px}.place-node.locked>span{width:44px;height:44px}.map-detours{bottom:16px;left:20px;gap:13px}.map-detours button{padding:11px 15px;gap:9px}.map-detours b{font-size:13px}.map-detours small{font-size:11px}.map-paging{right:16px;bottom:16px}.map-paging button{width:35px;height:41px}.map-paging>span{font-size:11px}.learning-card{padding:20px 28px 15px}.progress-title b{font-size:18px}.progress-title strong{font-size:29px}.progress-message{font-size:14px;margin-bottom:15px}.letter-grid{gap:10px}.letter-grid>button{min-height:75px}.letter-grid>button>b{font-size:33px}.legend{padding:12px 0;font-size:12px;gap:17px}.legend>small{font-size:11px}.home-actions>button{font-size:16px;min-height:52px}.home-note{font-size:11px}.modal{height:min(760px,calc(100dvh - 36px));grid-template-rows:49px minmax(0,1fr)}.modal-header{padding:0 25px}.modal-header>span{font-size:14px}.lesson{padding:24px 45px}.lesson-top .badge{font-size:13px}.mini-progress{font-size:14px}.study-heading{margin-top:14px}.study-word{font-size:57px}.study-reading{font-size:17px}.study-heading>.soft{padding:10px 18px;font-size:14px}.task-label,.read-question>.task-label{font-size:20px}.read-question{gap:18px}.listen-orb{width:145px;height:145px;font-size:17px}.answers>button{font-size:25px;min-height:90px}.answers.kana>button{font-size:50px}.question-character.kanji{font-size:82px}.part-steps>span{font-size:13px}.write-preview>.primary{max-width:430px;font-size:15px}.write-prompt{font-size:16px}.result-bar{min-height:74px;font-size:12px}.result-bar b{font-size:18px}.saved-caption{font-size:12px}.study-bottom .two-actions>button{font-size:15px;min-height:48px}.wd__padwrap{width:min(330px,calc(100dvh - 360px))}.gate-lesson.write .wd__padwrap{width:min(325px,calc(100dvh - 375px))}.chest-menu,.chest-preview{padding:35px 45px;gap:24px}.chest-menu h2,.chest-preview h2{font-size:25px}.chest-menu p,.chest-preview p{font-size:14px}.chest-list{gap:17px}.chest-list>button{padding:24px 12px}.chest-list b{font-size:16px}.chest-list span{font-size:12px}.chest-list svg{width:58px;height:58px}.chest-reward-preview{padding:19px;gap:25px}.chest-reward-preview b{font-size:18px}.chest-reward-preview span{font-size:12px}.chest-words>button{padding:24px}.chest-words b{font-size:43px}.chest-words small{font-size:14px}.scroll-page{padding:30px}.course-grid{gap:20px}.course-grid .mascot{transform:scale(.9);margin:-5px 0 -10px}.course-grid>button{padding:18px 12px}.course-grid b{font-size:23px}.course-grid small{font-size:12px}.course-grid span{font-size:12px}.course-grid strong{font-size:12px;padding:9px 14px}.weapon-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.weapon-card b{font-size:13px}.battle-view{grid-template-rows:43% minmax(0,1fr)}.arena .fighter{left:19%;transform:scale(1.2)}.enemy{right:22%;width:144px;height:178px}.battle-controls{padding:23px 40px}.battle-controls>h2{font-size:23px}.battle-controls>p{font-size:14px}.battle-hud{left:30px;right:30px;gap:100px}.battle-hud small{font-size:12px}.battle-hud .hearts{font-size:27px}.enemy-health{height:14px}.flying{left:31%;width:70px;height:70px}.damage{right:25%}.impact{right:22%}.equipped-button{max-width:550px}.battle-controls>.primary,.battle-controls>.two-actions{max-width:600px}.enemy-intent b{font-size:18px}.charge{margin:0}.battle-message{font-size:14px}.battle-controls>p.battle-coach{font-size:13px}}
@media(min-width:1000px){.home-content{grid-template-rows:minmax(0,1fr);grid-template-columns:1.12fr 1fr;gap:18px;padding:24px}.map-scene{border:1px solid #c6d8b8;border-radius:25px}.learning-card{margin:0;align-self:center;padding:25px 28px 20px}.map-title h1{font-size:26px}.map-title{left:22px}.map-mascot{transform:scale(1.1);bottom:65px;right:8%}.place-node>span{width:56px;height:56px}.place-node.locked>span{width:43px;height:43px}.map-detours{gap:8px;left:13px;bottom:15px}.map-detours button{padding:10px}.map-detours b{font-size:11px}.map-paging{right:10px;bottom:15px}.map-paging button{width:25px}.map-paging>span{font-size:10px}.map-route{height:calc(100% - 50px)}.letter-grid>button{min-height:87px}.letter-grid>button>b{font-size:36px}.letter-marks>i>svg{width:14px;height:14px}.letter-grid{gap:10px}.legend{font-size:11px}.legend>small{font-size:10px}.home-actions>button{font-size:14px}.progress-message{margin:10px 0 22px}.home-note{margin-top:15px;font-size:10px}.battle-modal{height:min(630px,calc(100dvh - 36px))}.battle-view{grid-template-columns:45% 55%;grid-template-rows:minmax(0,1fr)}.arena .fighter{left:2%;bottom:80px;transform:scale(1.25)}.enemy{right:4%;bottom:81px;width:150px;height:188px}.battle-hud{left:18px;right:18px;gap:35px}.battle-hud small{font-size:10px}.battle-hud .hearts{font-size:23px}.enemy-health{height:11px}.battle-controls{padding:30px 28px;gap:20px;justify-content:center}.battle-controls>h2{font-size:23px}.battle-controls>p{font-size:12px}.battle-controls>.badge{font-size:11px}.battle-controls .equipped-button{margin:10px 0 17px}.battle-controls>.primary{margin-top:0}.enemy-intent b{font-size:16px}.charge{margin:18px 0}.battle-message{font-size:13px;margin:16px 0}.battle-controls>.two-actions{margin-top:20px}.enemy-intent{padding:17px 8px}.battle-controls>p.battle-coach{font-size:12px}.damage{top:48%;right:12%}.impact{top:55%;right:10%}.flying{top:65%;left:22%;width:70px;height:70px}.victory-word{top:45%;font-size:35px}.guard-flash{left:14%;bottom:123px}}
@media(max-width:380px){.app-header{padding:0 10px;gap:5px}.brand>span{width:31px;height:34px;font-size:22px}.brand{gap:5px}.brand b{font-size:8px}.brand em{font-size:13px}.course-switch{padding:5px 8px}.course-switch>span{font-size:11px}.course-switch>small{font-size:8px}.header-buttons{gap:1px}.header-buttons button{width:32px;height:36px}.header-buttons button>svg{width:22px;height:22px}.home-content{padding:7px 7px 0}.learning-card{padding:13px 12px 9px}.map-title h1{font-size:17px}.map-title{left:12px;top:11px}.map-detours{left:7px;gap:5px;bottom:9px}.map-detours button{padding:6px;gap:4px;min-height:35px}.map-detours button>svg{width:20px;height:20px}.map-detours b{font-size:9px}.map-detours small{font-size:8px}.map-paging{right:6px;bottom:9px}.map-paging button{width:22px;height:31px}.map-paging>span{font-size:8px}.map-mascot{transform:scale(.53);right:9%;bottom:40px}.progress-title b{font-size:13px}.progress-title strong{font-size:22px}.progress-message{font-size:11px;margin:6px 0 10px}.letter-grid{gap:6px}.letter-grid>button{min-height:57px;border-radius:10px}.letter-grid>button>b{font-size:25px}.legend{gap:8px;font-size:9px;padding:8px 0}.legend>small{font-size:8px}.home-actions>button{font-size:11px;padding:8px 5px;gap:4px;min-height:44px}.home-actions>button>svg{width:17px;height:17px}.home-note{font-size:8px;margin-top:9px}.lesson{padding:16px}.modal-header{padding:0 14px}.modal-header>span{font-size:11px}.modal-header .close{font-size:11px}.read-question>.task-label{font-size:15px}.answers>button{font-size:17px}.answers.kana>button{font-size:37px}.lesson-footer .primary{font-size:12px}.result-bar b{font-size:14px}.result-bar{font-size:10px}.write-prompt{font-size:13px}.write-preview>.primary{font-size:11px}.gate-ready,.celebration{padding:20px;gap:17px}.gate-ready>.primary,.celebration>.primary{min-width:0;width:100%;font-size:12px}.gate-ready h2,.celebration h2{font-size:21px}.key-ring{gap:7px}.key-ring>span{padding:8px 6px}.chest-menu,.chest-preview{padding:20px 17px;gap:16px}.chest-menu h2,.chest-preview h2{font-size:18px}.chest-menu p,.chest-preview p{font-size:11px}.chest-list{gap:7px}.chest-list>button{gap:9px;padding:17px 5px}.chest-list b{font-size:10px}.chest-list span{font-size:9px}.chest-reward-preview{padding:12px;gap:10px}.chest-reward-preview>.weapon-icon{width:53px;height:53px}.chest-reward-preview b{font-size:12px}.chest-preview>.primary{font-size:13px}.chest-words{gap:8px}.chest-words>button{padding:13px 5px}.chest-words b{font-size:28px}.scroll-page{padding:19px}.course-grid{gap:10px}.course-grid>button{padding:9px 5px}.course-grid b{font-size:17px}.course-grid strong{font-size:8px;padding:6px}.course-grid small{font-size:9px}.course-grid span{font-size:9px}.battle-controls{padding:18px 17px;gap:10px}.battle-controls>h2{font-size:18px}.battle-controls>p{font-size:11px}.enemy-intent b{font-size:13px}.battle-controls>p.battle-coach{font-size:10px}.battle-message{font-size:11px}.battle-controls>.two-actions>button{font-size:13px}.battle-end h2{font-size:22px}.battle-end p{font-size:11px}}
@media(max-height:720px) and (max-width:649px){.app-shell{grid-template-rows:56px minmax(0,1fr) 19px}.home-content{grid-template-rows:minmax(175px,1fr) auto;padding-top:7px}.map-title h1{font-size:17px;margin-top:6px}.map-title>span{font-size:9px}.map-title{top:10px}.place-node>span{width:35px;height:35px;font-size:16px}.place-node.locked>span{width:28px;height:28px}.place-node b{font-size:8px;padding:2px 6px}.place-node>span>svg{width:18px;height:18px}.map-mascot{transform:scale(.5);bottom:39px}.map-detours button{min-height:33px;padding:6px}.map-detours b{font-size:9px}.map-detours svg{width:20px;height:20px}.map-detours{bottom:8px}.map-paging{bottom:8px}.map-paging button{height:29px}.learning-card{padding-top:12px;padding-bottom:8px}.progress-message{margin:5px 0 8px;font-size:11px}.progress-title b{font-size:13px}.progress-title strong{font-size:23px}.letter-grid>button{min-height:54px}.letter-grid>button>b{font-size:24px}.letter-grid{gap:6px}.legend{padding:7px 0;font-size:9px}.legend>small{font-size:8px}.home-actions>button{min-height:42px;font-size:12px}.home-note{margin-top:8px;font-size:8px}.modal{grid-template-rows:42px minmax(0,1fr)}.lesson{padding:15px 19px}.lesson-top{min-height:26px}.badge{font-size:10px;padding:5px 8px}.study-heading{margin-top:5px}.study-word{font-size:39px}.study-reading{font-size:12px}.study>.task-label{font-size:11px;margin:3px 0 6px}.study-heading>.soft{min-height:34px;font-size:11px;padding:6px 10px}.wd__padwrap{width:min(260px,calc(100dvh - 326px))}.trace{gap:5px}.wd__fb{font-size:11px;min-height:17px}.wd__foot{margin-top:3px}.btn-ghost{min-height:32px;padding:6px 10px;font-size:10px}.study-bottom{padding-top:9px}.lesson-note{font-size:10px;margin-bottom:6px}.study-bottom .two-actions>button{font-size:11px;min-height:38px;padding:7px 5px}.part-steps{padding:9px 0 4px;gap:10px}.part-steps>span{font-size:10px;padding:4px 9px}.read-question{gap:10px}.read-question>.task-label{font-size:15px}.listen-orb{width:105px;height:105px;margin:5px 0 10px;gap:6px;font-size:13px}.listen-orb svg{width:39px;height:39px}.answers>button{min-height:70px;font-size:17px}.answers.kana>button{font-size:36px}.question-character{font-size:73px;padding:10px 0}.question-character.kanji{font-size:53px}.result-bar{min-height:54px;padding:9px 0;font-size:10px}.result-bar b{font-size:14px}.lesson-footer{min-height:42px}.lesson-footer>.primary,.lesson-footer>.two-actions>button{min-height:39px;font-size:12px;padding:8px 10px}.saved-caption{font-size:9px}.write-preview{gap:8px}.preview-letter{font-size:83px}.write-preview>.task-label{font-size:15px;margin:5px 0}.write-preview p:not(.task-label){font-size:12px}.write-preview>.primary{min-height:40px;font-size:12px}.write-preview>.soft{min-height:31px;font-size:10px;padding:5px 11px}.write-prompt{font-size:12px}.write-question{gap:7px}.gate-lesson.write .wd__padwrap{width:min(265px,calc(100dvh - 344px))}.gate-lesson.write .result-bar{min-height:49px;padding:7px 0}.gate-ready,.celebration{gap:15px;padding:20px}.gate-ready>svg{width:58px;height:58px}.gate-ready h2,.celebration h2{font-size:21px}.key-ring{gap:8px;max-width:310px}.key-ring>span{padding:9px 6px;gap:5px}.key-ring b{font-size:19px}.key-ring svg{width:20px;height:20px}.gate-ready>p,.celebration>p{font-size:11px}.open-gate>svg{width:83px;height:83px}.celebration>.mascot{transform:scale(.8);margin:-16px}.chest-menu,.chest-preview{gap:15px;padding:20px}.chest-menu>.mascot{transform:scale(.65);margin:-25px}.chest-list>button{padding:16px 6px}.chest-preview>.primary{min-height:42px;font-size:13px}.chest-words{margin:4px 0 8px}.chest-preview h2{font-size:19px}.chest-reward-preview>.weapon-icon{width:60px;height:60px}.chest-reward-preview{padding:12px}.reward-big{width:110px;height:110px}.battle-view{grid-template-rows:34% minmax(0,1fr)}.arena .fighter{left:12%;bottom:11px;transform:scale(.74)}.enemy{right:14%;bottom:13px;width:85px;height:108px}.battle-hud{left:15px;right:15px;top:11px;gap:48px}.battle-hud small{font-size:9px;margin-bottom:5px}.hearts{font-size:20px}.enemy-health{height:9px}.battle-controls{padding:18px 20px;gap:10px}.battle-controls>h2{font-size:18px}.battle-controls>p{font-size:11px}.equipped-button{padding:7px 11px;font-size:11px}.equipped-button>.weapon-icon{width:38px;height:38px}.battle-controls>.primary{min-height:42px;font-size:14px}.enemy-intent{padding:10px}.enemy-intent b{font-size:14px}.battle-controls>p.battle-coach{font-size:10px}.charge{padding:8px 13px;margin:0}.charge i{font-size:23px}.battle-message{font-size:11px;min-height:25px}.battle-controls>.two-actions>button{font-size:13px;min-height:44px}.battle-end{gap:11px}.battle-end>.primary{min-height:40px;font-size:13px;margin-top:5px}.battle-end>.soft{min-height:35px;font-size:11px}.damage{font-size:29px;top:40%}.impact{font-size:70px;top:43%}.flying{width:43px;height:43px}.victory-word{font-size:27px;top:52%}.guard-flash{bottom:25px;left:18%}.guard-flash>svg{width:48px;height:48px}}
@media(max-height:720px) and (min-width:650px){.modal{height:calc(100dvh - 24px)}.lesson{padding:18px 35px}.study-word{font-size:44px}.study-heading{margin-top:8px}.study>.task-label{margin:4px 0 9px}.wd__padwrap{width:min(300px,calc(100dvh - 350px))}.study-bottom{padding-top:10px}.study-bottom .two-actions>button{min-height:41px;font-size:13px}.study-heading>.soft{min-height:37px;font-size:12px;padding:7px 13px}.part-steps{padding:9px 0 4px}.listen-orb{width:110px;height:110px;margin:5px 0 12px}.listen-orb>svg{width:42px;height:42px}.read-question{gap:12px}.read-question>.task-label{font-size:18px}.answers>button{min-height:76px;font-size:22px}.answers.kana>button{font-size:42px}.question-character.kanji{font-size:65px}.result-bar{min-height:63px;font-size:11px;padding:10px 0}.result-bar b{font-size:16px}.lesson-footer{min-height:45px}.lesson-footer>.primary{min-height:42px;font-size:14px}.gate-lesson.write .wd__padwrap{width:min(285px,calc(100dvh - 355px))}.write-question{gap:7px}.write-prompt{font-size:14px}.preview-letter{font-size:90px}.write-preview{gap:9px}.gate-ready,.celebration{gap:15px;padding:24px}.open-gate>svg{width:90px;height:90px}.celebration>.mascot{transform:scale(.85);margin:-12px}.key-ring{max-width:350px;gap:9px}.chest-menu,.chest-preview{padding:25px 38px;gap:18px}.chest-menu>.mascot{transform:scale(.7);margin:-20px}.chest-list>button{padding:18px 10px}.chest-menu h2,.chest-preview h2{font-size:22px}.chest-reward-preview{padding:15px}.chest-words>button{padding:15px}.course-grid>button{padding:12px}.course-grid .mascot{transform:scale(.7);margin:-20px -5px -20px}.course-grid b{font-size:20px}.course-grid strong{font-size:11px}.course-grid{gap:13px}.battle-controls{gap:12px;padding:24px}.battle-controls>h2{font-size:20px}.battle-controls>p{font-size:11px}.battle-controls>.primary{min-height:42px}.enemy-intent{padding:12px 9px}.enemy-intent b{font-size:14px}.charge{margin:10px 0}.battle-message{margin:8px 0}.battle-controls>.two-actions{margin-top:12px}.battle-controls>.two-actions>button{font-size:13px}.battle-end{gap:12px}.battle-end>.primary{min-height:42px;font-size:13px}.battle-end>.soft{min-height:36px}.learning-card{padding:20px}.letter-grid>button{min-height:69px}.letter-grid>button>b{font-size:31px}.progress-message{margin-bottom:15px}.home-actions>button{font-size:13px;min-height:45px}.home-note{font-size:9px}}
@media(max-height:500px) and (min-width:650px){.app-shell{grid-template-rows:48px minmax(0,1fr) 17px}.app-header{padding:0 17px}.brand>span{width:30px;height:31px;font-size:20px}.brand b{font-size:8px}.brand em{font-size:15px}.course-switch{min-width:120px;min-height:34px;padding:3px 10px}.course-switch>span{font-size:12px}.course-switch>small{font-size:8px}.header-buttons button{width:35px;height:34px}.home-content{grid-template-columns:1.1fr 1fr;grid-template-rows:minmax(0,1fr);padding:8px 10px 0;gap:9px}.map-scene{border:1px solid #c6d8b8;border-radius:16px}.map-title{top:9px;left:13px}.map-title h1{font-size:17px;margin-top:5px}.map-title>span{font-size:8px;padding:3px 6px}.map-mascot{transform:scale(.55);bottom:40px;right:11%}.place-node>span{width:34px;height:34px;font-size:16px}.place-node.locked>span{width:28px;height:28px}.place-node b{font-size:8px;padding:3px 6px}.place-node span svg{width:18px;height:18px}.map-detours{left:8px;bottom:9px;gap:5px}.map-detours button{padding:6px;gap:4px;min-height:31px}.map-detours svg{width:18px;height:18px}.map-detours b{font-size:9px}.map-detours small{font-size:8px}.map-paging{bottom:9px;right:7px}.map-paging button{height:28px;width:23px}.map-paging span{font-size:8px}.learning-card{margin:0;padding:12px 15px;align-self:center;border-radius:16px}.progress-title b{font-size:12px}.progress-title>strong{font-size:21px}.progress-title>span>svg{width:18px;height:18px}.progress-title strong small{font-size:10px}.progress-message{font-size:10px;margin:4px 0 8px}.letter-grid{gap:5px}.letter-grid>button{min-height:49px;border-radius:8px;padding:3px}.letter-grid>button>b{font-size:22px}.letter-marks{margin-top:3px;gap:5px}.letter-marks svg{width:10px;height:10px}.legend{padding:7px 0;font-size:8px;gap:10px}.legend small{font-size:8px}.home-actions{gap:6px}.home-actions>button{font-size:10px;min-height:33px;padding:6px 5px;gap:4px;border-radius:10px}.home-actions>button>svg{width:15px;height:15px}.home-note{font-size:7px;margin-top:7px}.overlay{padding:7px}.modal{height:100%;grid-template-rows:36px minmax(0,1fr);border-radius:18px;width:min(850px,100%)}.modal-header{padding:0 19px}.modal-header>span{font-size:11px}.close{font-size:10px;min-height:29px;padding:3px 0}.lesson{padding:10px 22px}.lesson-top{min-height:24px}.lesson-top .badge{font-size:10px;padding:4px 9px}.lesson-top small,.mini-progress{font-size:10px}.part-steps{padding:5px 0 0}.part-steps>span{font-size:9px;padding:3px 8px;gap:5px}.part-steps svg{width:12px;height:12px}.gate-lesson.read .read-question,.chest-lesson .read-question{display:grid;grid-template-columns:150px minmax(0,1fr);grid-template-rows:28px minmax(0,1fr) 25px;gap:4px 18px;justify-items:center;padding:0;flex:1}.read-question>.task-label{grid-column:1/-1;font-size:13px;margin:0}.listen-orb{grid-column:1;grid-row:2;width:80px;height:80px;gap:4px;margin:0;font-size:10px;box-shadow:0 3px #d8dfbe}.listen-orb>svg{width:31px;height:31px}.answers{grid-column:2;grid-row:2;gap:10px}.answers>button{font-size:19px;min-height:60px;border-radius:11px}.answers.kana>button{font-size:32px}.audio-help{grid-column:1/-1;font-size:9px;padding:3px;min-height:20px}.question-character,.question-character.kanji{grid-column:1;grid-row:2;font-size:46px;line-height:1;padding:4px}.parent-instruction{grid-column:2;font-size:10px}.parent-read{grid-column:2;grid-row:2;margin-top:40px}.parent-read>button{min-height:33px;font-size:10px;padding:7px}.result-bar{min-height:40px;padding:5px 0;gap:2px;font-size:9px}.result-bar b{font-size:12px}.lesson-footer{min-height:34px}.lesson-footer>.primary,.lesson-footer>.two-actions>button{min-height:32px;font-size:11px;padding:6px 10px;border-radius:10px}.saved-caption{font-size:9px}.gate-lesson.read .lesson-footer,.chest-lesson>.primary{max-width:420px;width:100%;align-self:center}.chest-lesson>.primary{min-height:33px;font-size:11px;padding:7px}.study{padding-right:360px;padding-left:27px}.study-heading{margin-top:15px}.study-word{font-size:44px}.study-reading{font-size:13px}.study-heading>.soft{min-height:31px;font-size:10px;padding:6px 9px}.study>.task-label{font-size:11px;margin:10px 0}.study-pad{position:absolute;top:13px;bottom:13px;right:25px;width:290px}.wd__padwrap{width:160px}.trace{gap:4px}.wd__fb{font-size:10px;min-height:16px}.wd__dots{gap:4px}.wd__dot{width:5px;height:5px}.wd__foot{margin-top:3px}.btn-ghost{min-height:28px;padding:5px 9px;font-size:9px}.study-bottom{padding-top:9px}.lesson-note{font-size:9px;line-height:1.6}.study-bottom .two-actions{grid-template-columns:1fr;gap:8px}.study-bottom .two-actions>button{min-height:31px;font-size:10px;padding:6px 8px}.gate-lesson.write{padding-right:330px}.gate-lesson.write .lesson-top{position:relative}.gate-lesson.write .part-steps{padding-top:10px}.gate-lesson.write .write-preview{position:absolute;right:22px;top:12px;bottom:12px;width:270px;gap:6px;padding:0}.write-preview>.task-label{font-size:12px;margin:0}.preview-letter{font-size:69px;line-height:1.1}.write-preview p:not(.task-label){font-size:10px}.write-preview>.soft{min-height:29px;font-size:9px;padding:5px 10px}.write-preview>.primary{min-height:32px;font-size:10px;margin-top:4px;padding:6px}.gate-lesson.write .write-question{position:absolute;right:20px;top:10px;bottom:10px;width:280px;gap:5px}.gate-lesson.write .wd__padwrap{width:150px}.write-prompt{font-size:10px}.write-prompt>button{min-width:26px;min-height:26px;padding:4px}.write-prompt>button>svg{width:17px;height:17px}.gate-lesson.write .result-bar{margin-top:auto;min-height:55px}.gate-lesson.write .lesson-footer{margin-top:10px}.gate-lesson.write .result-bar b{font-size:12px}.gate-lesson.write .saved-caption{font-size:9px}.gate-ready{gap:11px;padding:15px}.gate-ready>svg{position:absolute;width:80px;height:80px;left:38px;top:90px}.gate-ready h2{font-size:20px}.key-ring{max-width:340px;gap:7px}.key-ring>span{padding:6px;gap:3px;border-radius:9px}.key-ring b{font-size:16px}.key-ring svg{width:17px;height:17px}.gate-ready p{font-size:10px}.gate-ready>.primary{min-height:33px;font-size:11px;padding:7px}.celebration{position:relative;padding:16px 25px 16px 240px;gap:14px}.celebration h2{font-size:22px}.celebration>p{font-size:12px}.celebration>.mascot{position:absolute;left:55px;bottom:20px;transform:scale(.9);margin:0}.open-gate{position:absolute;left:80px;top:30px}.open-gate>svg{width:70px;height:70px}.open-gate>span{font-size:24px}.celebration>.primary{min-height:36px;font-size:12px;padding:8px;min-width:250px}.chest-menu{position:relative;padding:18px 200px 18px 25px;gap:13px}.chest-menu h2{font-size:21px}.chest-menu p{font-size:11px}.chest-menu>.eyebrow{font-size:9px}.chest-menu>.mascot{position:absolute;right:33px;top:83px;transform:scale(.8);margin:0}.chest-menu>small{font-size:9px}.chest-list{gap:10px;margin:0}.chest-list>button{padding:12px 8px;gap:8px;border-radius:12px}.chest-list svg{width:35px;height:35px}.chest-list b{font-size:11px}.chest-list span{font-size:9px}.chest-preview{padding:15px 25px 15px 250px;position:relative;gap:9px}.chest-reward-preview{position:absolute;left:23px;top:36px;width:190px;display:flex;flex-direction:column;text-align:center;gap:8px;padding:18px 10px}.chest-reward-preview>.weapon-icon{width:82px;height:82px}.chest-reward-preview span{font-size:9px}.chest-reward-preview b{font-size:12px}.chest-preview h2{font-size:19px}.chest-preview p{font-size:10px}.chest-words{margin:4px 0;gap:10px}.chest-words>button{padding:8px}.chest-words b{font-size:25px}.chest-words small{font-size:10px}.chest-words svg{width:15px;height:15px}.chest-preview>.primary{min-height:33px;font-size:11px;padding:7px}.chest-preview>.text-button{min-height:23px;padding:4px;font-size:9px}.chest-preview>small{font-size:9px}.reward-big{position:absolute;left:40px;top:65px;width:140px;height:140px}.chest-result>small{font-size:10px}.scroll-page{padding:16px 23px}.scroll-page>h2{font-size:20px}.scroll-page>p{font-size:11px}.course-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:13px}.course-grid>button{padding:6px;gap:4px}.course-grid .mascot{transform:scale(.48);margin:-38px -10px -39px}.course-grid b{font-size:15px;margin-top:7px}.course-grid small{font-size:8px}.course-grid span{font-size:8px;margin:3px 0}.course-grid strong{font-size:8px;padding:6px;gap:2px}.course-grid strong svg{width:12px;height:12px}.weapon-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:14px 0;gap:9px}.weapon-card{padding:9px 7px;gap:4px}.weapon-card>.weapon-icon{width:60px;height:60px}.weapon-card b{font-size:11px}.weapon-card span{font-size:11px}.weapon-card small{font-size:8px}.weapon-card strong{font-size:9px;padding:5px 9px}.star-total{font-size:11px;padding:9px}.settings-row{margin:13px 0}.settings-row>.soft{min-height:33px;font-size:11px}.wide{min-height:34px;font-size:11px}.settings .small-note{font-size:10px}.battle-view{grid-template-columns:44% 56%;grid-template-rows:minmax(0,1fr)}.arena .fighter{transform:scale(.85);left:4%;bottom:30px}.enemy{width:95px;height:120px;right:9%;bottom:32px}.battle-hud{top:12px;left:14px;right:14px;gap:25px}.battle-hud small{font-size:8px}.battle-hud .hearts{font-size:19px}.enemy-health{height:9px}.battle-controls{padding:15px 22px;gap:9px;justify-content:center}.battle-controls>.badge{font-size:9px}.battle-controls>h2{font-size:16px}.battle-controls>p{font-size:10px}.equipped-button{padding:6px 11px;font-size:10px;margin:5px 0}.equipped-button>.weapon-icon{width:32px;height:32px}.equipped-button small{font-size:8px}.battle-controls>.primary{min-height:33px;font-size:12px;padding:6px}.enemy-intent{padding:8px}.enemy-intent b{font-size:12px}.enemy-intent svg{width:19px;height:19px}.battle-controls>p.battle-coach{font-size:9px}.charge{padding:6px 13px;margin:2px 0}.charge span{font-size:9px}.charge i{font-size:20px}.battle-message{font-size:10px;min-height:23px;margin:4px 0}.battle-controls>.two-actions{margin-top:5px}.battle-controls>.two-actions>button{min-height:35px;font-size:12px;padding:6px 9px}.battle-controls>.two-actions svg{width:20px;height:20px}.weapon-name{font-size:8px}.battle-end{gap:8px}.battle-end>svg{width:31px;height:31px}.battle-end h2{font-size:20px}.battle-end p{font-size:10px}.battle-end small{font-size:9px}.battle-end>.primary{min-height:33px;font-size:11px;padding:7px;margin-top:7px}.battle-end>.soft{min-height:30px;font-size:10px;padding:6px}.damage{font-size:28px;right:14%;top:35%}.impact{font-size:70px;right:12%;top:47%}.flying{width:44px;height:44px;left:21%;top:62%}.special .damage{font-size:35px}.special .impact{font-size:90px}.victory-word{font-size:27px;top:40%}.guard-flash{left:15%;bottom:62px}.guard-flash svg{width:45px;height:45px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition:none!important}.wd__ink{animation-delay:0s!important}.ninja,.ninja__tail,.ninja__eye,.place-node.current>span{animation:none!important}}

/* Direct recall: prompt -> own handwriting -> submit, with no model to copy. */
.challenge .direct-write{gap:10px}
.dictation-heading{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;flex-shrink:0}
.dictation-heading .task-label{font-size:15px;margin:0}
.dictation-heading small{font-size:11px;color:var(--muted)}
.ruby-row{display:flex;align-items:center;justify-content:center;gap:14px;padding-top:9px}
.ruby-row ruby{font-size:28px;line-height:1.45;color:var(--ink);ruby-position:over}
.ruby-row rt{font-size:17px;letter-spacing:.12em;color:var(--green-dark)}
.ruby-row>button{padding:9px;background:var(--mint);border-radius:50%;min-height:40px;min-width:40px}
.answer-blank{font-size:33px;color:#8b9679}
.dictation-listen{min-height:43px;padding:8px 16px;font-size:14px}
.recall-pad{align-items:center;gap:10px}
.challenge .recall-pad .wd__padwrap{width:min(320px,calc(100dvh - 405px));max-width:100%;flex-shrink:0}
.recall-actions{display:grid;grid-template-columns:1fr 1.6fr;gap:10px;width:100%;max-width:320px}
.recall-actions>button{min-height:42px;padding:8px 14px;font-size:14px}
.challenge .result-bar{min-height:44px;padding:5px 0;flex-shrink:0}
.challenge .lesson-footer{min-height:42px;flex-shrink:0;margin-top:0}
.challenge .lesson-footer>.primary{width:100%;min-height:42px;font-size:14px;padding:8px 13px}
.audio-choice{border:2px solid #e0dfca;border-radius:17px;background:#faf9ee;display:flex;flex-direction:column;overflow:hidden}
.audio-choice.correct{border-color:#81a668;background:#e9f3dc}.audio-choice.incorrect{border-color:#d2a58e;background:#f9ece0}
.choice-listen{display:flex;align-items:center;justify-content:center;gap:7px;flex-direction:column;min-height:73px;padding:12px;font-size:12px;color:var(--green-dark)}
.choice-pick{min-height:45px;padding:10px 8px;font-size:17px;font-weight:700;border-top:1px solid #dddcca;background:#edeedb}
.audio-instruction{font-size:11px;color:var(--muted);text-align:center}
@media(min-width:650px) and (min-height:721px){.challenge .recall-pad .wd__padwrap{width:min(360px,calc(100dvh - 420px))}.recall-actions{max-width:360px}.dictation-heading .task-label{font-size:18px}.ruby-row ruby{font-size:34px}.ruby-row rt{font-size:21px}}
@media(max-height:720px) and (min-height:501px){.challenge{padding:10px 19px}.challenge .direct-write{gap:7px}.dictation-heading{gap:4px}.dictation-heading .task-label{font-size:13px}.dictation-heading small{font-size:10px}.ruby-row{padding-top:7px}.ruby-row ruby{font-size:25px}.ruby-row rt{font-size:15px}.answer-blank{font-size:29px}.recall-pad{gap:7px}.challenge .recall-pad .wd__padwrap{width:min(300px,calc(100dvh - 395px))}.challenge .result-bar{min-height:38px;font-size:10px}.challenge .result-bar b{font-size:13px}.challenge .saved-caption{font-size:9px}.dictation-listen{min-height:38px;padding:6px 13px;font-size:12px}}
@media(max-height:500px) and (min-width:650px){
 .gate-lesson.write,.chest-lesson.write{padding:12px 330px 12px 23px}
 .gate-lesson.write .direct-write,.chest-lesson.write .direct-write{position:absolute;top:8px;bottom:8px;right:23px;width:280px;gap:5px}
 .dictation-heading{gap:2px}.dictation-heading .task-label{font-size:11px}.dictation-heading small{font-size:9px}.ruby-row{padding-top:6px;gap:8px}.ruby-row ruby{font-size:19px}.ruby-row rt{font-size:12px}.answer-blank{font-size:22px}.ruby-row>button{min-height:29px;min-width:29px;padding:5px}.ruby-row>button>svg{width:18px;height:18px}
 .dictation-listen{min-height:30px;font-size:11px;padding:5px 10px}.dictation-listen>svg{width:18px;height:18px}
 .challenge .recall-pad .wd__padwrap{width:150px}.recall-pad{gap:6px}.recall-actions{width:235px;gap:9px}.recall-actions>button{min-height:34px;font-size:11px;padding:6px 10px}
 .challenge.write .result-bar{margin-top:auto;min-height:46px}.challenge .lesson-footer{min-height:36px;margin-top:8px}.challenge .lesson-footer>.primary{min-height:35px;font-size:11px;padding:7px 10px}
 .challenge.read .read-question{grid-template-rows:26px minmax(0,1fr) 22px 22px}.challenge.read .audio-instruction{grid-column:1/-1;font-size:9px;line-height:1.2}.challenge.read .audio-help{grid-column:1/-1}.choice-listen{min-height:55px;font-size:10px;padding:7px}.choice-listen>svg{width:23px;height:23px}.choice-pick{min-height:35px;font-size:13px;padding:7px}.audio-choice{border-radius:11px}
}

/* Keep a narrow viewport from inheriting the writing pad's intrinsic width. */
.overlay{grid-template-columns:minmax(0,1fr)}
.modal{min-width:0;max-width:100%;grid-template-columns:minmax(0,1fr)}
.lesson,.direct-write,.trace,.lesson-top{min-width:0}
.challenge .direct-write{width:100%}
.challenge .recall-pad{width:100%}
.challenge .recall-pad .wd__padwrap{max-width:min(100%,calc(100vw - 64px))}
.study .trace{width:100%}
.study .wd__padwrap{max-width:min(100%,calc(100vw - 64px))}
.dictation-heading{width:100%}
.ruby-row{position:relative;display:block;width:max-content;text-align:center}
.ruby-row>button{position:absolute;left:calc(100% + 12px);top:50%;transform:translateY(-30%)}

/* One clear training entrance; letters live inside training. */
.home-hub{padding:20px 20px 17px}
.home-hub .progress-title b{font-size:15px}
.key-track{display:flex;justify-content:space-between;gap:4px;margin:15px 0 9px;color:#dedfcf}
.key-track>svg{flex:0 1 24px;min-width:0}
.key-track>.earned{color:#cba143;filter:drop-shadow(0 1px 1px #e9d28e)}
.home-hub .progress-message{font-size:11px;text-align:center;margin:9px 0 15px;line-height:1.7}
.home-hub .home-actions{grid-template-columns:1fr;gap:10px}
.home-hub .home-actions>.train-button{min-height:54px;font-size:18px;gap:13px}
.home-hub .home-actions>.gate-button{min-height:42px;font-size:13px;background:transparent;border-color:#e5e3d1;border-width:1px;box-shadow:none}
.home-hub .home-actions>.gate-button>svg{width:19px;height:19px}
.study-list-link{font-size:11px;min-height:32px;padding:6px 8px;border:1px solid #e5e4d1;border-radius:9px;color:var(--green-dark);background:#f8f8ed}
.study-letters h2,.detours-page h2{font-size:23px;margin:8px 0}
.study-letters>p{font-size:13px;color:var(--muted)}
.study-letters .letter-grid{max-width:600px;margin:24px auto 8px}
.study-letters .letter-grid>button{min-height:72px}
.detour-choice{display:flex;align-items:center;gap:17px;width:100%;min-height:96px;margin-top:17px;padding:18px 20px;border:1px solid #dedfc6;border-bottom-width:3px;border-radius:19px;background:#f3f5e6;text-align:left;color:var(--green-dark)}
.detour-choice>span{display:flex;flex:1;flex-direction:column;gap:6px}
.detour-choice b{font-size:18px}
.detour-choice small{font-size:11px;color:var(--muted);line-height:1.7}
.detour-bag{margin:23px auto 0;min-width:200px}
@media(min-width:650px){.home-hub{padding:23px 30px 20px}.home-hub .home-actions{max-width:500px;width:100%;margin:auto}.home-hub .progress-message{font-size:13px}.home-hub .progress-title b{font-size:18px}.key-track{max-width:500px;margin:17px auto 12px}.key-track>svg{flex-basis:28px;height:28px}.home-hub .home-actions>.train-button{min-height:58px;font-size:20px}.study-list-link{font-size:13px;min-height:36px}.detours-page{padding:35px 50px}.detour-choice{min-height:112px;margin-top:23px;padding:23px}.detour-choice b{font-size:22px}.detour-choice small{font-size:13px}}
@media(max-width:380px){.home-hub{padding:16px 16px 14px}.home-hub .home-actions>.train-button{font-size:17px;min-height:49px}.home-hub .progress-message{font-size:10px;margin:9px 0 12px}.key-track{margin-top:10px}.study-list-link{font-size:10px;padding:5px 6px}.study-letters h2,.detours-page h2{font-size:20px}.study-letters .letter-grid{gap:6px}.study-letters .letter-grid>button{min-height:59px}.detour-choice{padding:15px 12px;gap:12px}.detour-choice>svg:first-child{width:31px;height:31px}.detour-choice b{font-size:17px}.detour-choice small{font-size:10px}}
@media(max-height:500px) and (min-width:650px){
 .home-hub{padding:15px 19px}.home-hub .progress-title b{font-size:13px}.key-track{margin:10px auto 5px}.key-track>svg{flex-basis:21px;height:21px}.home-hub .progress-message{font-size:10px;margin:6px 0 10px}.home-hub .home-actions{gap:8px}.home-hub .home-actions>.train-button{font-size:15px;min-height:41px}.home-hub .home-actions>.gate-button{font-size:11px;min-height:32px}
 .study-list-link{font-size:9px;min-height:26px;padding:4px 7px}
 .gate-lesson.write,.chest-lesson.write{padding:8px 18px;display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,280px) minmax(0,1fr);grid-template-rows:27px minmax(0,1fr) 46px;column-gap:15px;align-items:center}
 .challenge.write>.lesson-top{grid-column:1/-1;grid-row:1;align-self:start}
 .gate-lesson.write>.part-steps{grid-column:1;grid-row:2;display:flex;flex-direction:column;justify-self:center;gap:10px;padding:0}
 .gate-lesson.write .direct-write,.chest-lesson.write .direct-write{position:static;inset:auto;grid-column:2;grid-row:2/4;width:100%;height:100%;gap:4px;justify-content:center}
 .challenge.write .dictation-heading{gap:2px}.challenge.write .dictation-heading .task-label{font-size:11px}.challenge.write .dictation-heading small{font-size:9px}
 .challenge.write .ruby-row{padding-top:5px}.challenge.write .ruby-row>button{left:calc(100% + 9px)}
 .challenge.write .recall-pad{gap:6px}.challenge.write .recall-pad .wd__padwrap{width:clamp(110px,calc(100dvh - 230px),180px)}
 .challenge.write .recall-actions{width:225px;max-width:100%}.challenge.write .recall-actions>button{min-height:32px;padding:5px 9px;font-size:11px}
 .gate-lesson.write>.result-bar,.chest-lesson.write>.result-bar{grid-column:3;grid-row:2;align-self:center;margin:0;padding:0;min-height:0;font-size:9px}
 .gate-lesson.write>.result-bar b,.chest-lesson.write>.result-bar b{font-size:12px}
 .gate-lesson.write>.lesson-footer,.chest-lesson.write>.lesson-footer{grid-column:3;grid-row:3;margin:0;min-height:0;align-self:center}
 .challenge.write .saved-caption{font-size:8px;text-align:center;line-height:1.7}
 .challenge.write .lesson-footer>.primary{font-size:10px;min-height:35px;padding:7px}
 .study-letters h2,.detours-page h2{font-size:20px}.detours-page{padding:13px 24px;display:grid;grid-template-columns:1fr 1fr;gap:7px 15px}.detours-page>.eyebrow,.detours-page>h2{grid-column:1/-1}.detours-page>h2{margin:0}.detour-choice{min-height:85px;margin-top:4px;padding:12px 15px;gap:10px}.detour-choice b{font-size:17px}.detour-choice small{font-size:10px}.detour-bag{grid-column:1/-1;margin:5px auto;min-height:33px;font-size:11px}.study-letters .letter-grid{margin:12px auto 4px}.study-letters .letter-grid>button{min-height:58px}
}

.enemy-art{display:block;aspect-ratio:1;width:100%;background-image:url('art/monsters-atlas.png');background-size:200% 200%;background-repeat:no-repeat;filter:drop-shadow(0 5px 3px #263d3840)}
.monster-slime{background-position:0 0}.monster-bat{background-position:100% 0}.monster-boar{background-position:0 100%}.monster-oni{background-position:100% 100%}.enemy-art.samurai{background:none;object-fit:contain}
.enemy-node{position:absolute;z-index:4;display:flex;flex-direction:column;align-items:center;width:108px;padding:0;transform:translate(-50%,-50%);filter:drop-shadow(0 2px 1px #38513428)}
.enemy-node:not(:disabled):active{transform:translate(-50%,-47%)}.enemy-node>.enemy-art{width:92px;margin-bottom:-9px}.enemy-node>b{font-size:10px;white-space:nowrap;background:#fff9e4f5;padding:4px 7px;border-radius:8px;color:#4b563e}.enemy-node>span:not(.enemy-art){display:flex;align-items:center;gap:3px;font-size:8px;font-weight:700;color:#fffce2;background:#4c7350ed;padding:3px 6px;border-radius:0 0 6px 6px;white-space:nowrap}
.enemy-node.boss>.enemy-art{width:110px}.enemy-node.boss>b{background:#ffe6a1;color:#83612c}.enemy-node.boss>span:not(.enemy-art){background:#8c622e}.enemy-node.locked{opacity:1}.enemy-node.locked>.enemy-art{filter:grayscale(.6) drop-shadow(0 5px 3px #263d3840);opacity:.64}.enemy-node.locked>span:not(.enemy-art){background:#65705c}.enemy-node.cleared>span:not(.enemy-art){background:#4b7d5c}.enemy-node:not(.locked):hover>.enemy-art{filter:drop-shadow(0 0 6px #fff3b5)}
.enemy-map .map-mascot{left:20%;right:auto;bottom:44px;transform:scale(.5);transform-origin:bottom left}.map-hero-level{position:absolute;bottom:65px;left:43%;z-index:4;font-size:10px;font-weight:700;padding:6px 9px;border-radius:12px;background:#fff5d7e8;color:#79602e;border:1px solid #e8d395}
.detour-map-note{text-align:center;margin:20px 0 0;font-size:12px;color:#75836a}.combat-summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin:15px 0;padding:15px;background:#f2ecd3;border-radius:12px;color:#877136;font-size:12px}.combat-summary>small{width:100%}
.rpg-battle{grid-template-rows:40% minmax(0,1fr);grid-template-columns:minmax(0,1fr)}.rpg-arena{min-width:0;min-height:0;background-position:50% 57%}.rpg-arena .arena-shade{position:absolute;inset:0;background:linear-gradient(#1a382765,transparent 55%,#30442922);z-index:-1}.battle-hud{position:absolute;left:13px;right:13px;top:12px;display:grid;grid-template-columns:1fr 1fr;gap:21px;z-index:6;color:#fffce8;text-shadow:0 1px 2px #213522}.battle-hud>div{min-width:0}.battle-hud small{display:block;min-height:20px;font-size:10px;font-weight:700;white-space:nowrap}.battle-hud>div:last-child{text-align:right}.battle-hud .hero-health,.battle-hud .enemy-health{position:static;width:100%;height:10px;border-radius:10px;border:1px solid #fff9dba8;background:#293724b8;overflow:hidden}.hero-health i,.battle-hud .enemy-health i{display:block;height:100%;background:#a7d964;transition:width .3s}.battle-hud .enemy-health i{background:#f6ba65}.hp-number{display:block;font-size:10px;margin-top:3px;letter-spacing:.04em}.rpg-arena .fighter{left:8%;bottom:13%;transform:scale(.7);transform-origin:bottom left;z-index:2}.rpg-enemy{position:absolute;right:5%;bottom:8%;width:150px;z-index:3;transform-origin:bottom center}.rpg-arena .flying{top:60%;left:27%;width:48px;height:48px}.rpg-arena .flying.powered{filter:drop-shadow(0 0 14px #fff180);width:66px;height:66px}.rpg-controls{padding:18px 20px 13px;gap:10px;justify-content:center;min-width:0;overflow-y:auto;overscroll-behavior:contain}.enemy-intent{display:flex;align-items:center;justify-content:center;gap:9px;padding:9px 13px;background:#edf0da;border:1px solid #dce2c2;border-radius:13px;color:#6d8050;font-size:14px;width:100%}.enemy-intent.danger{background:#ffebc7;border-color:#e2ba6a;color:#9d652a}.battle-coach{font-size:11px;color:#818b6d;text-align:center}.rpg-controls .charge{margin:0;gap:8px}.rpg-controls .battle-message{min-height:27px;margin:0;font-size:12px;line-height:1.5;text-align:center;color:#7e815f}.rpg-commands{width:100%;display:grid;grid-template-columns:1fr 1.35fr;gap:8px 10px}.rpg-commands>.primary,.rpg-commands>.soft{min-height:51px;padding:9px 7px;font-size:15px}.rpg-commands .escape-command{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;min-height:37px;color:#818a71;border:1px solid #e4e4d0;border-radius:12px;background:#faf9ed}.rpg-equipped{display:flex;align-items:center;justify-content:center;gap:8px;font-size:11px;min-height:34px;padding:2px 9px;background:#f1edd8;border-radius:9px;width:100%}.rpg-equipped>.weapon-icon{width:28px;height:28px}.rpg-equipped>span:not(.enemy-art){font-size:10px;text-decoration:underline;margin-left:auto}.weapon-name{font-size:10px;color:#94987f}.special-button{background:#b18b39;box-shadow:0 4px #85692c}.rpg-result{width:100%;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}.rpg-result h2{font-size:22px;color:#748349}.rpg-result p{font-size:12px;color:#879071}.rpg-result p.xp-earned{font-size:27px;color:#b18a36;font-weight:800;line-height:1.2}.rpg-result .next-level{font-size:11px}.rpg-result>.primary{width:100%;min-height:47px;font-size:14px}.result-links{display:grid;grid-template-columns:1fr 1fr;gap:9px;width:100%}.result-links>.soft{font-size:12px;min-height:40px}.level-up{background:#fcebbb;border:1px solid #e5c770;border-radius:12px;padding:8px 15px;font-size:12px;color:#96732a;width:100%;animation:rpg-pop .5s ease-out}.level-up b{display:block;font-size:18px;margin-top:3px}.boss-treasure{display:flex;align-items:center;gap:12px;padding:8px 14px;background:#f5edcf;border:1px solid #e6d69a;border-radius:13px;width:100%;text-align:left;color:#a08235}.boss-treasure>.weapon-icon{width:53px;height:53px;flex-shrink:0}.boss-treasure>span:not(.enemy-art){font-size:11px}.boss-treasure b{display:block;font-size:12px;margin-top:4px}.rpg-result.retry h2{color:#a58355}
.enemy-hit-number,.hero-hit-number{position:absolute;z-index:7;top:44%;font-size:31px;font-weight:900;color:#fff6bd;text-shadow:2px 2px #856630,-2px -2px #856630;animation:rpg-number .6s ease-out both;pointer-events:none}.enemy-hit-number{right:18%}.hero-hit-number{left:19%;color:#ffd3b7;text-shadow:2px 2px #995e43,-2px -2px #995e43}.enemy-impact,.enemy-slash{position:absolute;z-index:5;font-size:95px;color:#fff1ac;text-shadow:0 0 20px #ffe071;line-height:1;pointer-events:none;animation:rpg-pop .35s ease-out both}.enemy-impact{right:16%;bottom:15%}.enemy-slash{left:18%;bottom:17%;color:#fff0dc}.rpg-shield{position:absolute;left:21%;bottom:17%;z-index:5;color:#e5f8c5;background:#d7f3b340;box-shadow:0 0 22px #dbf7a7;border-radius:50%;padding:7px;animation:rpg-pop .35s ease-out both}.phase-player.player-attack .fighter{animation:rpg-hero .4s ease-out}.phase-enemy.has-enemy-hit:not(.defeated) .rpg-enemy{animation:rpg-lunge .45s ease-out}.phase-enemy.has-enemy-hit:not(.blocked) .fighter{animation:rpg-hurt .35s ease-out}.defeated .rpg-enemy{opacity:.28;transform:rotate(12deg);transition:opacity .4s,transform .4s}.rpg-arena .victory-word{position:absolute;left:0;right:0;top:44%;text-align:center;font-size:29px;font-weight:900;color:#fff4b8;text-shadow:2px 3px #7d6534;z-index:7;animation:rpg-pop .5s ease-out}.smoke-cloud{position:absolute;left:3%;bottom:5%;color:#f8f5de;font-size:150px;z-index:5;line-height:1;animation:rpg-pop .6s ease-out}.phase-escape .fighter{opacity:0;transition:opacity .4s}
@keyframes rpg-number{from{opacity:0;transform:translateY(15px) scale(.7)}30%{opacity:1;transform:translateY(-8px) scale(1.2)}to{opacity:1;transform:translateY(-20px)}}@keyframes rpg-pop{from{opacity:0;transform:scale(.5)}60%{opacity:1;transform:scale(1.12)}to{opacity:1;transform:scale(1)}}@keyframes rpg-lunge{40%{transform:translate(-35px,5px) rotate(-12deg)}}@keyframes rpg-hero{40%{margin-left:23px}}@keyframes rpg-hurt{25%{margin-left:-9px;filter:brightness(1.7)}65%{margin-left:6px}}
@media(min-width:650px){.enemy-node{width:150px}.enemy-node>.enemy-art{width:140px}.enemy-node.boss>.enemy-art{width:160px}.enemy-node>b{font-size:13px;padding:5px 10px}.enemy-node>span:not(.enemy-art){font-size:10px;padding:4px 8px}.enemy-map .map-mascot{transform:scale(.72);left:20%;bottom:55px}.map-hero-level{font-size:12px;bottom:80px;left:44%}.rpg-enemy{width:185px;right:9%;bottom:6%}.rpg-arena .fighter{transform:scale(.95);bottom:12%;left:12%}.rpg-controls{padding:22px 38px;gap:12px}.battle-hud{left:24px;right:24px;top:18px;gap:40px}.battle-hud small{font-size:12px;min-height:25px}.hp-number{font-size:12px}.enemy-intent{font-size:16px}.rpg-commands>.primary,.rpg-commands>.soft{min-height:54px;font-size:18px}.rpg-result{gap:14px}.rpg-result h2{font-size:25px}}
@media(max-width:380px){.enemy-node{width:93px}.enemy-node>.enemy-art{width:77px}.enemy-node.boss>.enemy-art{width:95px}.enemy-node>b{font-size:9px;padding:4px 5px}.enemy-node>span:not(.enemy-art){font-size:7px}.enemy-map .map-mascot{transform:scale(.44);left:19%}.map-hero-level{font-size:9px;left:42%;bottom:64px;padding:5px 8px}.rpg-arena .fighter{left:6%;transform:scale(.61)}.rpg-enemy{width:131px;right:3%;bottom:7%}.battle-hud{gap:15px;left:11px;right:11px}.battle-hud small{font-size:9px}.rpg-controls{padding:12px 13px;gap:8px}.enemy-intent{font-size:12px;padding:8px}.battle-coach{font-size:10px}.rpg-controls .battle-message{font-size:11px}.rpg-result{gap:9px}.rpg-result h2{font-size:20px}.boss-treasure{padding:5px 10px}.level-up{padding:6px 10px}.rpg-result>.primary{min-height:42px}.rpg-commands>.primary,.rpg-commands>.soft{font-size:14px;min-height:49px}}
@media(max-height:500px) and (min-width:650px){.enemy-node{width:100px}.enemy-node>.enemy-art{width:72px}.enemy-node.boss>.enemy-art{width:85px}.enemy-node>b{font-size:9px;padding:3px 6px}.enemy-node>span:not(.enemy-art){font-size:7px;padding:2px 4px}.enemy-map .map-mascot{transform:scale(.35);bottom:45px;left:20%}.map-hero-level{font-size:8px;bottom:61px;left:36%;padding:5px 7px}.rpg-battle{grid-template-rows:minmax(0,1fr);grid-template-columns:44% minmax(0,1fr)}.rpg-arena .fighter{transform:scale(.7);left:7%;bottom:14%}.rpg-enemy{width:150px;right:1%;bottom:12%}.battle-hud{gap:15px;left:12px;right:12px;top:16px}.battle-hud small{font-size:9px;min-height:22px}.hp-number{font-size:10px}.rpg-controls{padding:10px 18px;gap:7px}.enemy-intent{font-size:12px;padding:6px 9px}.battle-coach{font-size:10px}.rpg-controls .battle-message{font-size:11px;min-height:22px}.rpg-commands>.primary,.rpg-commands>.soft{font-size:14px;min-height:42px}.rpg-commands .escape-command{min-height:31px;font-size:11px}.rpg-equipped{min-height:29px;font-size:10px}.rpg-equipped>.weapon-icon{width:24px;height:24px}.rpg-result{gap:7px}.rpg-result h2{font-size:19px}.rpg-result p.xp-earned{font-size:23px}.level-up{padding:5px 9px;font-size:10px}.level-up b{font-size:15px}.boss-treasure{padding:4px 10px}.boss-treasure>.weapon-icon{width:36px;height:36px}.boss-treasure b{font-size:10px}.rpg-result>.primary{min-height:38px;font-size:12px}.result-links>.soft{min-height:32px;font-size:11px}.detour-map-note{margin:15px 0;font-size:11px}}
@media(prefers-reduced-motion:reduce){.rpg-battle *,.enemy-node{animation:none!important;transition:none!important}}



/* The route, learning milestones and gate are the main map. Combat stays beside the road. */
.journey-home{grid-template-rows:minmax(260px,1fr) auto}.progress-map{display:flex;flex-direction:column;background-position:50% 48%;border-radius:22px 22px 0 0}.progress-map:after{background:linear-gradient(#f3f5dbed,transparent 32%,#94ad6c30 75%,#c2d69bbd)}
.journey-map-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:12px 14px 0;position:relative;z-index:3;min-height:65px}.journey-map-heading>div>span{font-size:10px;font-weight:700;color:#627c50}.journey-map-heading h1{font-size:20px;color:#315e3c;margin:5px 0 0;text-shadow:0 1px #fffde9;letter-spacing:.02em}.gates-cleared{display:grid;grid-template-columns:auto auto;align-items:center;gap:3px 5px;background:#fff9e3de;border:1px solid #e1d8a6;border-radius:10px;padding:5px 7px;color:#967c36;font-size:13px;font-weight:700;white-space:nowrap}.gates-cleared small{grid-column:1/-1;font-size:8px;font-weight:400}
.journey-route-board{position:relative;flex:1;min-height:0;margin:6px 10px 0;isolation:isolate}.learning-road{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.learning-road polyline{fill:none;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}.road-shadow{stroke:#526d4560;stroke-width:19}.road-base{stroke:#f3e7b5;stroke-width:14}.road-dashes{stroke:#c9b98a;stroke-width:2;stroke-dasharray:3 8}.learning-road .road-done{stroke:#91b363;stroke-width:10}.learning-stone{position:absolute;z-index:2;transform:translate(-50%,-50%);width:27px;height:27px;border:2px solid #b9a773;border-bottom-width:3px;border-radius:50%;display:grid;place-items:center;background:#fcf4d5;color:#907e49;font-size:12px;font-weight:800;box-shadow:0 2px 1px #45593030}.learning-stone.done{background:#739b53;border-color:#eef1c7;color:#fffbdc}.learning-stone.next{border-color:#e9b34f;box-shadow:0 0 0 3px #fff1b65c}
.route-player{position:absolute;z-index:5;width:1px;height:1px;pointer-events:none;transition:left .4s,top .4s}.route-player>.mascot{position:absolute;left:-23px;bottom:-3px;transform:scale(.36);transform-origin:bottom left}.route-player>span{position:absolute;left:-26px;bottom:53px;background:#fff7ca;border:1px solid #d9b760;border-radius:8px;padding:3px 5px;color:#846830;font-size:8px;font-weight:800;white-space:nowrap;box-shadow:0 2px 4px #4b653c24}.route-player.at-gate>.mascot{left:-30px}.route-player.at-gate>span{left:-34px}
.map-gate{position:absolute;z-index:4;right:-1%;top:2%;width:100px;display:flex;flex-direction:column;align-items:center;gap:1px;padding:0;filter:drop-shadow(0 3px 2px #325b3540)}.journey-gate-art{width:100%;height:auto;display:block}.map-gate>b{background:#fff4cf;border:1px solid #d8b666;border-radius:8px;padding:5px 6px;font-size:9px;font-weight:800;color:#856334;white-space:nowrap}.map-gate.ready>b{background:#ffdf75;color:#6b5528;box-shadow:0 0 0 3px #fff4b36b}.map-gate.opened>b{background:#ecf3d7;color:#557a41;border-color:#aac484}.beyond-gate{position:absolute;right:0;top:-10px;display:flex;align-items:center;gap:4px;color:#5e7553;background:#f7f7e6e3;border-radius:6px;padding:4px 6px;z-index:6;font-size:8px;white-space:nowrap}.beyond-gate.unlocked{color:#477a39;background:#ecf8d8}
.road-encounter{position:absolute;right:1%;bottom:8%;width:110px;z-index:4}.road-enemy{display:flex;flex-direction:column;align-items:center;padding:0;width:100%}.road-enemy>.enemy-art{width:72px;margin:-2px 0 -7px}.road-enemy>.encounter-caption{font-size:8px;border-radius:8px;background:#fff7dceb;color:#967839;padding:4px 6px;font-weight:700;white-space:nowrap}.road-enemy>b{background:#fff8e3f2;border-radius:8px;padding:4px 6px;font-size:9px;color:#7f7248;white-space:nowrap}.road-enemy.boss>b{background:#ffe4a4;color:#94652c}.route-discovery{padding:9px 7px;border:1px dashed #a3b27a;border-radius:12px;background:#f3f4d9e8;color:#718651;text-align:center;font-size:8px;line-height:1.8;display:flex;align-items:center;flex-direction:column;gap:5px}.route-discovery b{display:block;font-size:11px}
.journey-map-tools{position:relative;z-index:8;display:flex;justify-content:space-between;align-items:center;padding:8px 10px 12px;gap:5px;min-height:56px}.journey-map-tools>button{display:flex;align-items:center;justify-content:center;gap:5px;background:#fff9e8f2;color:#7d754e;border:1px solid #e2d7ac;box-shadow:0 2px 0 #7484543b;border-radius:11px;min-height:39px;padding:6px 8px;position:relative;font-size:10px;font-weight:700;white-space:nowrap}.journey-map-tools>small{font-size:9px;color:#526c40;background:#f5f5debd;border-radius:8px;padding:5px 6px;white-space:nowrap}.journey-map-tools i{position:absolute;top:-3px;right:-3px;width:9px;height:9px;background:#e4af48;border:2px solid #fffae3;border-radius:50%}
.journey-progress{padding:13px 17px 14px}.journey-progress .progress-title b{font-size:16px}.journey-progress .progress-title strong{font-size:24px}.journey-progress .progress-title small{font-size:12px}.learning-parts{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;color:#78845f;font-size:11px;margin:10px 0 13px;line-height:1.5}.learning-parts>small{font-size:9px;color:#94967b;margin-left:auto}.learning-parts b{font-size:12px;font-weight:700;color:#788454}.journey-progress .home-actions{gap:9px}.journey-progress .home-actions>.train-button{min-height:49px;font-size:17px}.journey-progress .home-actions>.gate-button{min-height:39px;font-size:12px}
.world-map{background:linear-gradient(#f9f8e9e8,#f6f4e3e8),url('art/forest-map.png') center/cover}.world-map>h2{font-size:22px;margin-top:8px}.world-map>p{font-size:13px}.world-route{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:23px 15px;margin:26px 0 20px;position:relative}.world-stop{position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;padding:11px 5px 9px;border:2px solid #cecfb4;background:#f6f4e3;border-radius:15px;min-height:134px}.world-stop:after{content:'↓';position:absolute;left:50%;bottom:-25px;color:#afb991;font-size:23px}.world-stop:nth-last-child(-n+2):after{display:none}.world-stop:nth-child(4n+3){grid-column:2}.world-stop:nth-child(4n+4){grid-column:1;grid-row:var(--route-row)}.world-number{position:absolute;top:-11px;left:8px;width:26px;height:26px;background:#fbf5db;border:1px solid #c6c89e;border-radius:50%;display:grid;place-items:center;font-weight:800;color:#8a8359;font-size:12px}.world-stop>.journey-gate-art{height:50px;width:auto}.world-stop>b{font-size:11px}.world-state{font-size:9px;color:#8f9777}.world-stop>small{font-size:9px;color:#87936d}.world-stop.current{border-color:#d6a84c;box-shadow:0 0 0 3px #f4e6b4;background:#fff4d2}.world-stop.current .world-state{font-weight:800;color:#a07831}.world-stop.passed{background:#e9f0da;border-color:#a9bd87}.world-stop.locked{opacity:.65}.world-goal{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:#9e8139;margin:10px 0}
.encounters-page h2{font-size:20px}.encounters-page>p{font-size:12px;line-height:1.8}.encounter-list{display:flex;flex-direction:column;gap:12px;margin:21px 0}.encounter-card{display:flex;align-items:center;width:100%;gap:12px;padding:10px 12px;border:1px solid #dddbb8;border-bottom-width:3px;border-radius:17px;background:#f3f0d9;text-align:left;min-height:101px}.encounter-card>.enemy-art,.unknown-enemy{width:76px;height:76px;flex-shrink:0}.unknown-enemy{display:grid;place-items:center;background:#e7e9d9;border-radius:50%;color:#a2ad8e}.encounter-card>span:not(.enemy-art):not(.unknown-enemy){display:flex;flex-direction:column;gap:6px;flex:1}.encounter-card b{font-size:14px;color:#727947}.encounter-card small{font-size:10px;color:#969366}.encounter-card em{font-size:11px;font-style:normal;color:#8e7d43}.encounter-card.waiting{opacity:1;background:#f1f2e5;border-color:#e1e5d0}.encounter-card.waiting b{color:#8e977b;font-size:13px}.encounter-card.waiting em{color:#85906e}.encounter-card.cleared{border-color:#bfcea6}.battle-optional-note{text-align:center;color:#92997c;font-size:10px!important}
@media(min-width:650px){.journey-map-heading{padding:20px 25px 0;min-height:90px}.journey-map-heading h1{font-size:27px;margin-top:9px}.journey-map-heading>div>span{font-size:12px}.gates-cleared{font-size:18px;padding:7px 10px;gap:4px 8px}.gates-cleared small{font-size:10px}.journey-route-board{margin:8px 28px 0}.learning-stone{width:35px;height:35px;font-size:15px}.learning-stone svg{width:22px;height:22px}.map-gate{width:130px;right:3%;top:2%}.map-gate>b{font-size:12px;padding:6px 10px}.beyond-gate{right:3%;font-size:10px;top:-14px}.route-player>.mascot{transform:scale(.47);left:-30px}.route-player>span{font-size:10px;bottom:71px;left:-34px}.road-encounter{width:155px;right:4%;bottom:8%}.road-enemy>.enemy-art{width:94px}.road-enemy>.encounter-caption{font-size:10px}.road-enemy>b{font-size:11px}.route-discovery{font-size:10px;padding:13px}.route-discovery b{font-size:14px}.journey-map-tools{padding:12px 22px 18px;min-height:67px}.journey-map-tools>button{font-size:12px;min-height:44px;padding:8px 13px}.journey-map-tools>small{font-size:11px}.journey-progress{padding:20px 27px 20px}.journey-progress .progress-title b{font-size:20px}.journey-progress .progress-title strong{font-size:29px}.learning-parts{margin:12px 0 17px;font-size:13px}.learning-parts b{font-size:14px}.learning-parts>small{font-size:11px}.journey-progress .home-actions>.train-button{min-height:55px;font-size:20px}.journey-progress .home-actions>.gate-button{min-height:43px;font-size:14px}.encounters-page h2{font-size:25px}.encounter-list{gap:17px;margin-top:25px}.encounter-card{padding:13px 24px;gap:20px}.encounter-card>.enemy-art,.unknown-enemy{width:95px;height:95px}.encounter-card b{font-size:18px}.encounter-card small{font-size:12px}.encounter-card em{font-size:13px}.world-stop{min-height:150px}.world-stop>b{font-size:14px}.world-stop>.journey-gate-art{height:62px}.world-state,.world-stop>small{font-size:11px}}
@media(max-width:380px){.journey-home{padding:8px 7px 2px;grid-template-rows:minmax(255px,1fr) auto}.journey-map-heading{padding:10px 10px 0;min-height:61px}.journey-map-heading h1{font-size:18px}.journey-map-heading>div>span{font-size:9px}.gates-cleared{font-size:12px;padding:4px 6px}.gates-cleared small{font-size:7px}.journey-route-board{margin:5px 9px 0}.learning-stone{width:25px;height:25px;font-size:11px}.map-gate{width:85px;right:-1%;top:1%}.map-gate>b{font-size:8px;padding:4px 5px}.beyond-gate{font-size:7px;right:0}.road-encounter{width:96px;right:0;bottom:8%}.road-enemy>.enemy-art{width:64px}.road-enemy>.encounter-caption{font-size:7px}.road-enemy>b{font-size:8px}.route-discovery{font-size:7px;padding:8px 5px}.route-discovery b{font-size:10px}.journey-map-tools{padding:7px 8px 12px;min-height:54px}.journey-map-tools>button{font-size:9px;min-height:37px;padding:6px}.journey-map-tools>small{font-size:8px;padding:5px}.journey-progress{padding:12px 14px 13px}.journey-progress .progress-title b{font-size:15px}.journey-progress .progress-title strong{font-size:23px}.learning-parts{gap:4px 11px;margin:9px 0 11px;font-size:10px}.learning-parts>small{width:100%;font-size:8px}.journey-progress .home-actions>.train-button{min-height:47px;font-size:16px}.journey-progress .home-actions>.gate-button{min-height:35px;font-size:11px}.encounters-page{padding:19px 14px}.encounters-page h2{font-size:17px}.encounters-page>p{font-size:10px}.encounter-card{gap:8px;padding:8px;min-height:89px}.encounter-card>.enemy-art,.unknown-enemy{width:62px;height:62px}.encounter-card b{font-size:12px}.encounter-card.waiting b{font-size:11px}.encounter-card small{font-size:9px}.encounter-card em{font-size:10px}}
@media(max-height:700px) and (max-width:649px){.journey-map-heading{min-height:57px;padding-top:9px}.journey-map-heading h1{font-size:18px;margin-top:4px}.journey-map-tools{min-height:50px;padding-top:5px;padding-bottom:10px}.learning-stone{width:24px;height:24px;font-size:10px}.route-player>.mascot{transform:scale(.3);left:-19px}.route-player>span{bottom:45px;left:-23px;font-size:7px}.road-encounter{bottom:4%}.road-enemy>.enemy-art{width:58px}.road-enemy>.encounter-caption{font-size:7px}.map-gate{width:82px}.map-gate>b{font-size:8px}.journey-progress{padding-top:10px;padding-bottom:12px}.journey-progress .home-actions{gap:7px}.learning-parts{margin:7px 0 9px}}
@media(max-height:500px) and (min-width:650px){.journey-home{grid-template-columns:54% minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:10px}.progress-map{border-radius:18px;border-bottom:1px solid #c6d8b8}.journey-map-heading{min-height:47px;padding:8px 12px 0}.journey-map-heading h1{font-size:17px;margin-top:3px}.journey-map-heading>div>span{font-size:8px}.gates-cleared{padding:3px 6px;font-size:12px;gap:1px 4px}.gates-cleared small{font-size:7px}.gates-cleared svg{width:14px;height:14px}.journey-route-board{margin:4px 15px 0}.learning-stone{width:23px;height:23px;font-size:10px}.learning-stone svg{width:14px;height:14px}.map-gate{width:80px;top:0;right:5%}.map-gate>b{font-size:8px;padding:4px 5px}.beyond-gate{font-size:7px;right:4%;top:-8px;padding:3px 4px}.route-player>.mascot{transform:scale(.28);left:-18px}.route-player>span{font-size:7px;bottom:43px;left:-22px}.road-encounter{width:102px;right:3%;bottom:4%}.road-enemy>.enemy-art{width:52px;margin:-4px 0 -7px}.road-enemy>.encounter-caption{font-size:7px;padding:3px 5px}.road-enemy>b{font-size:8px;padding:3px 5px}.route-discovery{font-size:7px;padding:6px;gap:3px}.route-discovery b{font-size:10px}.route-discovery svg{width:17px;height:17px}.journey-map-tools{min-height:42px;padding:4px 10px 8px}.journey-map-tools>button{font-size:9px;min-height:31px;padding:4px 8px}.journey-map-tools>button svg{width:17px;height:17px}.journey-map-tools>small{font-size:8px;padding:4px}.journey-progress{padding:17px 18px;margin-top:0}.journey-progress .progress-title b{font-size:16px}.journey-progress .progress-title strong{font-size:26px}.learning-parts{margin:12px 0 16px;font-size:11px;gap:6px 12px}.learning-parts b{font-size:12px}.learning-parts>small{font-size:9px;width:100%}.journey-progress .home-actions>.train-button{min-height:44px;font-size:16px}.journey-progress .home-actions>.gate-button{min-height:36px;font-size:12px}.encounters-page{display:flex;flex-direction:column;padding:14px 20px}.encounters-page h2{font-size:20px;margin:4px 0}.encounters-page>p{font-size:10px;line-height:1.6}.encounter-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}.encounter-card{flex-direction:column;gap:4px;padding:8px;text-align:center;min-height:160px}.encounter-card>.enemy-art,.unknown-enemy{width:60px;height:60px}.encounter-card>svg{display:none}.encounter-card>span:not(.enemy-art):not(.unknown-enemy){gap:4px}.encounter-card b,.encounter-card.waiting b{font-size:12px}.encounter-card small{font-size:9px}.encounter-card em{font-size:10px}.battle-optional-note{font-size:9px!important}.world-route{grid-template-columns:repeat(2,minmax(0,1fr));max-width:550px;margin-left:auto;margin-right:auto}.world-stop{min-height:136px}.world-stop:nth-child(4n+3),.world-stop:nth-child(4n+4){grid-column:auto;grid-row:auto}.world-stop>b{font-size:11px}.world-stop>small,.world-state{font-size:9px}}

.world-stop:after{display:block;pointer-events:none}.world-stop.route-right:after{content:"→";left:auto;right:-22px;bottom:50%;transform:translateY(50%)}.world-stop.route-left:after{content:"←";left:-22px;right:auto;bottom:50%;transform:translateY(50%)}.world-stop:last-child:after{display:none}
.world-route>.world-stop:not(:last-child):after{display:block}

/* Keep the activity color through its child screens; the ink pad stays paper white. */
.study-modal,.letters-modal{
 --activity-bg:#deedcc;--activity-header:#b7d795;--activity-line:#97b974;
 --activity-ink:#354e31;--activity-muted:#576c49;--activity-card:#f6faed;
}
.gate-modal{
 --activity-bg:#fff0bf;--activity-header:#efd177;--activity-line:#d4ae53;
 --activity-ink:#634719;--activity-muted:#786039;--activity-card:#fffaf0;
}
.detours-modal,.chest-modal,.encounters-modal,.bag-modal,.battle-modal{
 --activity-bg:#d9edf7;--activity-header:#a5d1e5;--activity-line:#81b6cc;
 --activity-ink:#305367;--activity-muted:#526d7a;--activity-card:#f3faff;
}
.modal:is(.study-modal,.letters-modal,.gate-modal,.detours-modal,.chest-modal,.encounters-modal,.bag-modal,.battle-modal){
 background:var(--activity-bg);border-color:var(--activity-line);color:var(--activity-ink);
 --muted:var(--activity-muted);
}
.modal:is(.study-modal,.letters-modal,.gate-modal,.detours-modal,.chest-modal,.encounters-modal,.bag-modal,.battle-modal)>.modal-header{
 background:var(--activity-header);border-bottom-color:var(--activity-line);
}
.modal:is(.study-modal,.letters-modal,.gate-modal,.detours-modal,.chest-modal,.encounters-modal,.bag-modal,.battle-modal)>.modal-header :is(span,.close){color:var(--activity-ink)}
.study-modal :is(.task-label,.study-word),.letters-modal h2,.gate-modal :is(.task-label,.gate-ready h2,.celebration h2),.detours-modal h2,.chest-modal h2,.encounters-modal h2,.bag-modal h2{color:var(--activity-ink)}
.study-modal :is(.lesson-note,.study-reading,.lesson-top>small,.wd__fb:not([data-ok])),.letters-modal>div>p,.gate-modal :is(.saved-caption,.result-bar:not(.good):not(.wrong),.gate-ready>p),.chest-modal :is(.chest-menu p,.chest-menu>small,.chest-result>small),.encounters-modal>div>p,.bag-modal>div>p{color:var(--activity-muted)}
.gate-modal :is(.gate-ready,.celebration){background:radial-gradient(ellipse at 50% 25%,#fff9dfa6,transparent 70%)}
.detours-modal .detour-choice{background:var(--activity-card);border-color:var(--activity-line);color:var(--activity-ink)}
.detours-modal .detour-choice small{color:var(--activity-muted)}
.detours-modal .detour-bag{background:#eef8fd;border-color:var(--activity-line);color:var(--activity-ink)}
.chest-modal .celebration{background:radial-gradient(ellipse at 50% 25%,#f5fbffa6,transparent 70%)}
.encounters-modal .encounter-card{background:var(--activity-card);border-color:var(--activity-line)}
.encounters-modal .encounter-card.waiting{background:#eaf3f7;border-color:#bbd3de}
.encounters-modal .encounter-card :is(b,em){color:var(--activity-ink)}
.encounters-modal .encounter-card small,.encounters-modal .battle-optional-note{color:var(--activity-muted)}
.encounters-modal .unknown-enemy{background:#d8e8f0;color:#648696}
.bag-modal .combat-summary{background:#eef8fd;color:var(--activity-ink)}
.bag-modal .bag-page>.primary{box-shadow:0 4px #4c713c,0 0 0 5px var(--activity-bg)}
.battle-modal .rpg-controls{background:var(--activity-bg)}

/* Art, trail, milestones and landmarks share one uncropped square. */
.aligned-map{background:radial-gradient(ellipse at 50% 50%,#96b67c,#cdddb4 80%)}
.aligned-map:after{display:none}
.aligned-map .journey-map-heading,.aligned-map .journey-map-tools{flex-shrink:0}
.aligned-map .journey-route-board{display:flex;align-items:center;justify-content:center;margin:2px 6px 0;min-width:0;overflow:visible}
.trail-frame{position:relative;flex:none;isolation:isolate;--stone-size:clamp(19px,calc(var(--map-size)*.073),34px);--gate-size:clamp(53px,calc(var(--map-size)*.24),120px)}
.trail-art{position:absolute;inset:0;width:100%;height:100%;border-radius:15px;user-select:none;pointer-events:none}
.aligned-map .learning-road{inset:0;width:100%;height:100%;overflow:hidden}
.learning-road .trail-center{fill:none;stroke:none}
.learning-road .trail-completed{fill:none;stroke:#88a555b8;stroke-width:13;stroke-linecap:round;stroke-linejoin:round}
.aligned-map .learning-stone{width:var(--stone-size);height:var(--stone-size);font-size:clamp(9px,calc(var(--map-size)*.032),15px);border-width:2px;box-shadow:0 2px 2px #6a70472e}
.aligned-map .learning-stone svg{width:65%;height:65%}
.aligned-map .route-player{width:0;height:0;transition:none}
.aligned-map .route-player>.mascot{bottom:0;left:calc(-64px*var(--ninja-scale));transform:scale(var(--ninja-scale));transform-origin:bottom left}
.aligned-map .route-player>span{left:0;bottom:calc(151px*var(--ninja-scale));transform:translateX(-50%);font-size:clamp(7px,calc(var(--map-size)*.022),10px);padding:2px 4px}
.gate-landmark{position:absolute;width:0;height:0;z-index:4}
.aligned-map .map-gate{left:calc(var(--gate-size)*-.5);right:auto;top:auto;bottom:calc(var(--gate-size)*-9/120);width:var(--gate-size);display:block;gap:0;filter:drop-shadow(0 2px 2px #325b3530)}
.aligned-map .map-gate>b{position:absolute;top:100%;left:50%;transform:translateX(-50%);font-size:clamp(7px,calc(var(--map-size)*.022),11px);padding:3px 5px;border-radius:6px}
.aligned-map .beyond-gate{right:auto;left:0;top:auto;bottom:calc(var(--gate-size)*103/120 + 2px);transform:translateX(-50%);font-size:clamp(6px,calc(var(--map-size)*.019),10px);padding:3px 4px;gap:2px}
.aligned-map .beyond-gate svg{width:10px;height:10px}
.aligned-map .road-encounter{right:auto;bottom:auto;width:clamp(66px,calc(var(--map-size)*.22),115px);transform:translate(-50%,-55%)}
.aligned-map .road-enemy>.enemy-art{width:clamp(44px,calc(var(--map-size)*.18),91px);margin:-2px 0 -5px}
.aligned-map .road-enemy>.encounter-caption{font-size:clamp(6px,calc(var(--map-size)*.02),10px);padding:3px 4px}
.aligned-map .road-enemy>b{font-size:clamp(7px,calc(var(--map-size)*.022),11px);padding:3px 4px}
.aligned-map .route-discovery{font-size:clamp(6px,calc(var(--map-size)*.019),10px);padding:6px 4px;gap:3px}
.aligned-map .route-discovery b{font-size:clamp(8px,calc(var(--map-size)*.025),13px)}
.aligned-map .route-discovery svg{width:16px;height:16px}
