:root{--bg:#f7f5ef;--paper:#fffefa;--ink:#293c36;--muted:#7a827c;--line:#e4e5dc;--coral:#dc6c55;--soft-coral:#f9e7df;--yellow:#ebca78;--green:#436b56;--soft-green:#e9efe6;--radius:20px;font-family:Inter,'Segoe UI',sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}a{color:inherit;text-decoration:none}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #c25e43;outline-offset:4px}button{color:inherit}.skip{position:fixed;top:-100px;left:20px;background:#fff;padding:15px;z-index:30}.skip:focus{top:10px}.app-shell{display:flex;min-height:100vh}.sidebar{width:253px;flex-shrink:0;border-right:1px solid var(--line);background:#f0f1e9;padding:43px 27px 30px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0}.brand{display:flex;gap:13px;align-items:center;font-size:20px;line-height:1.2;letter-spacing:-.6px}.brand b{font-weight:750}.brand-dot{color:var(--coral)}.brand-mark{width:45px;height:52px;background:var(--coral);color:#fff7ed;border-radius:15px 15px 15px 3px;display:grid;place-items:center;font-size:28px;position:relative}.brand-mark>span{font-size:13px;position:absolute;right:6px;bottom:5px}.side-label{font-size:9px;font-weight:700;letter-spacing:1.5px;color:#899089;margin:58px 10px 18px}.navigation{display:grid;gap:9px}.navigation>a{display:flex;align-items:center;gap:13px;padding:14px 15px;border-radius:12px;font-size:14px;color:#66756b}.navigation>a.active{background:#fffdf7;color:#304b3c;box-shadow:0 3px 8px #263b3110;font-weight:650}.navigation>a.active svg{color:var(--coral)}svg.icon{width:20px;height:20px;vertical-align:middle;flex-shrink:0;stroke-width:1.7}.navigation small{margin-left:auto;border-radius:6px;background:#e6ebdf;padding:1px 6px}.side-bottom{margin-top:auto;padding:45px 10px 0}.small-sun{color:var(--coral);font-size:36px}.side-bottom p{font-size:13px;line-height:1.8;color:#798276}.side-bottom strong{font-weight:500;color:#475e4e}.settings-link{font-size:11px;display:flex;gap:8px;align-items:center;margin-top:32px;line-height:1.6}.settings-link svg{width:16px}.main-wrap{margin-left:253px;flex:1;min-width:0}.topbar{height:91px;display:flex;justify-content:space-between;align-items:center;padding:0 49px;border-bottom:1px solid var(--line)}.top-tag{font-size:10px;letter-spacing:2px;font-weight:650;color:#7b847c}.top-actions{display:flex;align-items:center;gap:22px}.connection{font-size:11px;color:#707c71;display:flex;gap:8px;align-items:center}.connection i{width:6px;height:6px;border-radius:50%;background:#7ba081}.avatar{background:#e8ebdf;border:1px solid #dce1d2;border-radius:50%;width:36px;height:36px;font-size:18px}main{max-width:1170px;margin:auto;padding:40px 49px 30px;outline:none}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:27px}.eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:1.8px;color:var(--muted);font-weight:650;margin:0 0 11px}h1{font-size:32px;letter-spacing:-1.1px;font-weight:650;line-height:1.2;margin:0 0 10px}h1 em{font-family:Georgia,serif;font-weight:400;color:var(--coral)}.subtitle{color:var(--muted);font-size:13px;line-height:1.7;margin:0}.date-badge{font-size:10px;border:1px solid var(--line);border-radius:99px;padding:9px 13px;white-space:nowrap;color:#687267}.hero{background:#f0e2be;border:1px solid #e6d8b6;border-radius:var(--radius);min-height:253px;position:relative;overflow:hidden;display:flex;padding:31px 33px;align-items:center}.hero-copy{position:relative;z-index:1;width:62%}.hero .eyebrow{color:#876e42}.hero h2{font-family:Georgia,serif;font-weight:400;font-size:33px;letter-spacing:-.8px;line-height:1.18;max-width:400px;margin:15px 0 10px}.hero p{font-size:12px;line-height:1.7;color:#7a725c;margin-bottom:20px;max-width:310px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;border-radius:10px;border:1px solid transparent;padding:11px 18px;font-size:12px;font-weight:600;transition:transform .15s,background .15s}.btn:hover{transform:translateY(-1px)}.btn-primary{background:var(--ink);color:#fffefa}.btn-coral{background:var(--coral);color:#fff}.btn-secondary{background:var(--paper);border-color:var(--line)}.btn-ghost{background:transparent;border-color:var(--line)}.hero-art{position:absolute;right:15px;bottom:-5px;width:330px;height:245px;pointer-events:none}.hero-art .sun{width:137px;height:137px;border-radius:50%;background:#dc7d62;position:absolute;right:63px;top:13px}.hero-art .ring{width:164px;height:164px;border:1px solid #bb9c6a;border-radius:50%;position:absolute;right:49px;top:0;opacity:.6}.mountain{position:absolute;bottom:-2px;right:-50px;width:310px;height:144px;background:#c4ccac;border-radius:80% 0 0 0;transform:rotate(-9deg)}.mountain.two{right:147px;bottom:-40px;width:180px;height:112px;background:#a9b697;border-radius:80% 80% 0 0;transform:rotate(16deg)}.jp-card{position:absolute;right:100px;top:66px;background:#fffcf0;box-shadow:3px 7px 0 #00000008;border:1px solid #e0d4b8;transform:rotate(-7deg);border-radius:14px;width:119px;height:152px;display:flex;flex-direction:column;justify-content:center;align-items:center}.jp-card b{font-size:56px;color:#5c7058;font-family:serif;font-weight:400}.jp-card span{font-size:9px;letter-spacing:3px;color:#969783;margin-top:8px}.little-star{position:absolute;top:54px;right:27px;font-size:41px;color:#968e63}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0 31px}.stat{display:flex;align-items:center;gap:13px;background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:17px}.stat-icon{background:var(--soft-green);border-radius:10px;width:37px;height:37px;display:grid;place-items:center;color:#6b7c60}.stat:nth-child(2) .stat-icon{background:#f8edd2;color:#aa873f}.stat:nth-child(3) .stat-icon{background:var(--soft-coral);color:#bd785f}.stat strong{font-size:21px;font-weight:600}.stat strong small{font-size:12px;color:#92988c;font-weight:400}.stat p{font-size:10px;color:var(--muted);margin:3px 0 0}.section-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 16px}.section-head h2{font-size:17px;font-weight:600;margin:0;letter-spacing:-.3px}.section-head span{font-size:11px;color:#92998d}.path-group-title{font-size:10px;letter-spacing:1.4px;font-weight:650;margin:24px 0 12px;color:#798473;display:flex;align-items:center;gap:8px}.path-group-title i{width:8px;height:8px;border-radius:50%;background:var(--coral)}.path-group-title.yellow i{background:#d7b14f}.lesson-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.lesson{display:flex;align-items:center;gap:16px;border:1px solid var(--line);border-radius:15px;background:var(--paper);padding:19px;text-align:left;min-width:0;transition:.15s}.lesson:hover{border-color:#b5bca6;box-shadow:0 3px 12px #27342707;transform:translateY(-2px)}.lesson-badge{height:48px;width:48px;border-radius:15px;display:grid;place-items:center;background:var(--soft-coral);color:#ba735b;flex-shrink:0}.lesson.yellow .lesson-badge{background:#f6edd3;color:#9a8349}.lesson.done .lesson-badge{background:var(--soft-green);color:#567253}.lesson-copy{flex:1}.lesson small{font-size:9px;text-transform:uppercase;letter-spacing:1px;color:#93988b}.lesson h3{font-size:13px;font-weight:650;margin:5px 0 5px}.lesson p{font-size:10px;color:#8c9287;margin:0;line-height:1.5}.lesson>.icon{width:15px;color:#a0a894}.future{margin-top:20px;padding:16px 19px;border:1px dashed #d8ddcc;border-radius:13px;display:flex;gap:13px;align-items:center;color:#808a7b;font-size:11px;line-height:1.6}.color-dots{display:flex;gap:4px;flex-shrink:0}.color-dots i{height:10px;width:10px;border-radius:50%}.quote-card{background:#eef0e6;margin-top:25px;border-radius:16px;text-align:center;padding:23px}.quote-card .jp{font-size:22px;margin:0 0 8px}.quote-card p{font-family:Georgia,serif;font-size:14px;color:#69725f;margin:0}.quote-card small{display:block;font-size:9px;letter-spacing:1px;color:#909787;margin-top:11px}footer{padding:20px 49px 28px;color:#949b8e;font-size:10px;display:flex;justify-content:space-between;max-width:1170px;margin:auto}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0}.searchbox{background:var(--paper);border:1px solid var(--line);border-radius:11px;display:flex;gap:10px;align-items:center;padding:0 14px;flex:1;min-width:190px}.searchbox input{border:0;background:transparent;color:var(--ink);width:100%;padding:14px 0;outline:none}.searchbox:focus-within{outline:2px solid var(--coral)}select{border:1px solid var(--line);border-radius:10px;padding:11px;background:var(--paper);color:var(--ink);font-size:12px}.phrase-list{display:grid;gap:12px}.phrase-card{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:22px;display:flex;gap:20px;align-items:center}.phrase-text{flex:1;min-width:0}.phrase-text .jp{font-size:21px;line-height:1.8;margin:9px 0;overflow-wrap:anywhere}.kana{font-size:12px;color:#8a887c;line-height:1.8}.es{font-size:13px;color:#657363;line-height:1.7}.pill{display:inline-block;background:var(--soft-green);color:#6e7e61;font-size:9px;font-weight:600;padding:5px 8px;border-radius:6px;letter-spacing:.3px}.phrase-actions{display:flex;flex-direction:column;gap:9px}.icon-btn{background:transparent;border:1px solid var(--line);width:38px;height:38px;border-radius:10px;display:inline-grid;place-items:center}.icon-btn.saved{background:#f5ead0;color:#ac8b3b;border-color:#e7d3a0}.empty{padding:45px 25px;text-align:center;background:var(--paper);border:1px solid var(--line);border-radius:20px;line-height:1.8}.empty h2{font-size:22px}.empty p{color:var(--muted);font-size:14px}.empty .icon{width:40px;height:40px;color:var(--coral)}.settings-grid{display:grid;gap:17px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:25px}.panel h2{font-size:17px;margin:0 0 10px}.panel p{font-size:13px;color:var(--muted);line-height:1.8}.switch-row{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--line);font-size:13px;gap:20px}.switch-row:last-child{border:0}.switch-row input{width:19px;height:19px;accent-color:var(--green)}.button-row{display:flex;gap:10px;flex-wrap:wrap}.small-note{font-size:11px!important;line-height:1.8;color:var(--muted)}.danger{color:#a9473c}.loading{text-align:center;padding:80px;color:var(--muted)}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,15px);background:#293c36;color:#fffefa;border-radius:12px;padding:14px 22px;font-size:13px;z-index:100;opacity:0;pointer-events:none;transition:.2s;max-width:90vw;box-shadow:0 5px 25px #0002}#toast.visible{opacity:1;transform:translate(-50%,0)}dialog{width:min(740px,calc(100% - 32px));max-height:92dvh;border:1px solid var(--line);border-radius:24px;background:var(--bg);color:var(--ink);padding:0;box-shadow:0 25px 100px #1b302433}dialog::backdrop{background:#20352f70;backdrop-filter:blur(4px)}.study-top{display:flex;justify-content:space-between;align-items:center;padding:22px 27px;border-bottom:1px solid var(--line);gap:15px}.study-top h2{font-size:16px;margin:0 0 4px}.study-top p{font-size:10px;margin:0;color:var(--muted)}.study-body{padding:24px 30px 28px}.step-pills{display:flex;gap:7px;margin-bottom:23px}.step-pills span{padding:7px 10px;background:#eaece3;border-radius:7px;font-size:10px;color:#8c9287}.step-pills span.current{background:var(--ink);color:#fff}.study-progress{height:4px;background:#e6e8dd;border-radius:9px;overflow:hidden;margin:0 0 22px}.study-progress>div{height:100%;background:var(--coral);transition:width .2s}.study-meta{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--muted)}.study-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;text-align:center;padding:29px 20px;min-height:228px;display:flex;align-items:center;flex-direction:column;justify-content:center;margin:13px 0 15px}.study-card .jp{font-size:27px;line-height:1.9;margin:5px 0 12px;overflow-wrap:anywhere}.study-card .es{font-size:16px;margin:12px 0}.study-card .kana{font-size:13px;margin:0}.study-card .small-note{margin:10px 0 0;max-width:480px}.sound-btn{border:0;border-radius:50%;width:66px;height:66px;background:var(--soft-coral);color:var(--coral);display:grid;place-items:center}.sound-btn svg{width:27px;height:27px}.audio-row{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 15px}.audio-row .btn{min-height:38px;padding:7px 12px;font-size:11px}.study-controls{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:20px}.study-controls .btn{min-width:110px}.text-btn{border:0;background:transparent;color:#74816c;font-size:11px;padding:10px}.choice-grid{display:grid;gap:9px}.choice{background:var(--paper);border:1px solid var(--line);border-radius:11px;text-align:left;padding:13px 15px;line-height:1.6;font-size:13px}.choice:hover{border-color:#b9c1a8}.choice.correct{background:#e5efdf;border-color:#9cb394;color:#355a35}.choice.wrong{background:#f9e5df;border-color:#d7a297;color:#a25340}.choice:disabled{opacity:1;cursor:default}.feedback{font-size:13px;line-height:1.8;color:#547749;margin:15px 0 0}.feedback.error{color:#ae6654}.done-art{width:85px;height:85px;border-radius:50%;background:#e8eedf;display:grid;place-items:center;margin:0 auto 20px;color:#567250}.done-art svg{width:40px;height:40px}.success-screen{text-align:center;padding:30px 10px}.success-screen h2{font-family:Georgia,serif;font-size:32px;font-weight:400}.success-screen p{font-size:14px;color:var(--muted);line-height:1.9}.success-screen .button-row{justify-content:center;margin-top:22px}.review-summary{display:flex;align-items:center;gap:25px;justify-content:space-between;margin-bottom:22px;background:#f0e2be;border-radius:18px;padding:25px}.review-summary h2{margin:0 0 8px;font-size:20px}.review-summary p{font-size:12px;color:#84795e;margin:0}.progress-track{height:6px;border-radius:9px;background:#e3e7da;overflow:hidden}.progress-track div{height:100%;background:#769270}.progress-label{display:flex;justify-content:space-between;margin:15px 0 9px;color:#86917d;font-size:11px}.list-caption{font-size:11px;color:var(--muted);margin:0 0 15px}.hidden{display:none!important}
@media(min-width:1450px){main{padding-top:50px}.hero-art{right:35px;width:355px}.hero{min-height:270px}.hero h2{font-size:38px}.lesson{padding:22px}}
@media(max-width:1100px){.sidebar{width:216px;padding:35px 18px}.main-wrap{margin-left:216px}main{padding:30px}.topbar{padding:0 30px}.hero-art{right:-40px;opacity:.85}.hero-copy{width:65%}.hero h2{font-size:30px}.lesson{gap:10px;padding:15px}.lesson-badge{width:40px;height:40px}footer{padding-left:30px;padding-right:30px}}
@media(max-width:760px){.sidebar{width:100%;height:68px;top:auto;bottom:0;padding:0;background:#f6f6eefa;border-top:1px solid var(--line);border-right:0;z-index:10;backdrop-filter:blur(12px)}.brand,.side-label,.side-bottom{display:none}.navigation{display:grid;grid-template-columns:repeat(4,1fr);gap:0;height:100%}.navigation>a{display:flex;flex-direction:column;gap:5px;justify-content:center;border-radius:0;padding:8px 2px;font-size:9px;position:relative}.navigation>a.active{background:transparent;box-shadow:none;color:var(--coral)}.navigation small{display:none}.main-wrap{margin:0 0 68px}.topbar{height:67px;padding:0 22px}.top-tag{font-size:9px;letter-spacing:1.2px}.top-actions{gap:13px}.connection{font-size:10px}.avatar{width:31px;height:31px}main{padding:27px 20px 18px}.page-heading{margin-bottom:21px}.date-badge{display:none}h1{font-size:29px}.subtitle{font-size:12px}.hero{min-height:252px;padding:25px 23px}.hero-copy{width:72%}.hero h2{font-size:29px;max-width:220px}.hero p{font-size:11px;max-width:205px}.hero-art{right:-125px;bottom:0;transform:scale(.8);transform-origin:bottom;opacity:.7}.hero .btn{padding:11px 13px}.stats{gap:7px;margin:15px 0 26px}.stat{padding:13px 8px;gap:6px;flex-direction:column;align-items:flex-start}.stat-icon{height:27px;width:27px;border-radius:8px}.stat-icon svg{height:16px;width:16px}.stat strong{font-size:21px}.stat p{font-size:9px}.lesson-grid{grid-template-columns:1fr}.lesson{padding:17px;gap:15px}.lesson-badge{height:44px;width:44px}.lesson h3{font-size:14px}.lesson p{font-size:11px}.section-head h2{font-size:17px}.section-head span{font-size:10px}.future{font-size:10px;gap:10px;padding:13px}.quote-card{margin-top:18px}footer{font-size:9px;padding:12px 20px 20px;gap:15px}footer span{display:none}.phrase-card{padding:18px;gap:10px}.phrase-text .jp{font-size:18px}.phrase-actions{gap:8px}.toolbar{gap:8px}.searchbox{flex-basis:100%}.toolbar select{flex:1;font-size:11px}.review-summary{flex-direction:column;align-items:flex-start;gap:15px}.panel{padding:20px}.study-top{padding:17px 18px}.study-body{padding:20px 18px}.study-card{padding:23px 14px;min-height:220px}.study-card .jp{font-size:23px}.study-card .es{font-size:14px}dialog{width:calc(100% - 20px);max-height:94dvh;border-radius:19px}.step-pills{gap:5px}.step-pills span{padding:7px 8px;font-size:9px}.study-controls .btn{min-width:90px}.study-controls{gap:8px}.study-controls .text-btn{font-size:10px}#toast{bottom:82px;min-width:240px;text-align:center}.success-screen{padding:20px 0}.success-screen h2{font-size:28px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.romaji{font-size:14px;color:#936047;line-height:1.8;margin:8px 0;overflow-wrap:anywhere}.romaji>span{display:block;font-size:8px;letter-spacing:1.4px;color:#969185;margin-bottom:2px;font-weight:650}.study-card .romaji{font-size:16px;margin:8px 0 3px;max-width:100%}@media(max-width:760px){.study-card .romaji{font-size:14px}.phrase-text .romaji{font-size:13px}}
/* A vertical journey on phones, a spacious learning desk on larger screens. */
body:has(dialog[open]){overflow:hidden}.traveler{width:61px;height:77px;flex-shrink:0}.xp-pill,.xp-counter{font-size:12px!important;color:#9c753a!important;background:#f7edcf;border:1px solid #e9d9ae;border-radius:99px;padding:7px 12px;white-space:nowrap}.journey{margin-top:10px}.journey-intro{display:flex;align-items:center;gap:17px;background:#edf0e6;padding:20px 24px;border-radius:18px;margin:18px 0 28px}.journey-intro strong{font-size:14px;font-weight:650}.journey-intro p{font-size:12px;color:var(--muted);margin:7px 0 0;line-height:1.6}.journey-intro .text-btn{padding:10px 0 0;color:#5c7459}.chapter-label{display:flex;gap:13px;align-items:center;margin:27px 0 15px;padding:17px 20px;border-radius:14px;background:#f6e5dd}.chapter-label>span{font-size:24px;font-family:Georgia,serif;color:#bc735d}.chapter-label b{display:block;font-size:15px}.chapter-label small{display:block;color:#8b7e71;font-size:11px;margin-top:5px}.chapter-label.yellow{background:#f3e8c8}.chapter-label.yellow>span{color:#a28442}.learning-path{list-style:none;margin:0 auto;padding:10px 0 15px;max-width:580px}.path-stop{display:flex;align-items:center;gap:25px;position:relative;min-height:155px;padding-left:calc(28px + var(--step)*60px)}.path-stop:before{content:'';position:absolute;width:80px;height:180px;border-left:3px dashed #d7ddce;top:65px;left:65px;transform:rotate(-23deg);transform-origin:top}.path-stop:nth-child(even):before{left:125px;transform:rotate(23deg)}.path-stop:last-child:before{display:none}.node-column{position:relative;flex-shrink:0;width:76px;z-index:1}.path-node{width:74px;height:74px;border-radius:50%;border:5px solid #fffefa;background:#f2d8c9;color:#ab6b51;box-shadow:0 5px 0 #d7b8a5,0 0 0 1px #e8d9cb;display:grid;place-items:center;transition:transform .15s}.path-node:hover{transform:translateY(-3px)}.path-node svg{width:28px;height:28px}.yellow .path-node{background:#ecd58f;color:#987d37;box-shadow:0 5px 0 #c9b57c,0 0 0 1px #e8d9b3}.completed .path-node{background:#dbe6cb;color:#587249;box-shadow:0 5px 0 #b2c0a3,0 0 0 1px #d1dcc4}.current{padding-top:27px;min-height:190px}.current .path-node{box-shadow:0 5px 0 #c3a373,0 0 0 7px #f1e6cc}.traveler-bubble{position:absolute;bottom:75px;left:4px;display:flex;align-items:center;gap:5px;pointer-events:none}.traveler-bubble .traveler{width:55px;height:69px;filter:drop-shadow(0 3px 0 #00000008)}.traveler-bubble>span{background:#334c3e;color:#fff;font-size:9px;white-space:nowrap;padding:6px 9px;border-radius:9px 9px 9px 1px}.stop-copy{position:relative;flex:1;min-width:0;padding:17px 0;z-index:1}.stop-label{font-size:9px;letter-spacing:1.4px;color:#9b9f90}.stop-copy h3{font-size:16px;margin:7px 0;letter-spacing:-.3px}.stop-copy p{font-size:11px;color:var(--muted);line-height:1.7;margin:0;max-width:270px}.node-stars{display:inline-flex;gap:3px;color:#d8dace;font-size:14px;margin-top:9px}.node-stars .earned{color:#c9a153}.path-link{border:0;background:transparent;font-size:10px;font-weight:650;color:#7a8b6b;margin-left:12px;min-height:36px;padding:4px}.path-link svg{width:12px;height:12px}.optional-route{border:1px solid var(--line);border-radius:14px;margin:20px 0}.optional-route summary{cursor:pointer;padding:17px 20px;font-size:12px;color:#72816b}.optional-route .learning-path{padding:0 15px}.trail-end{border:1px dashed #d1d9c6;border-radius:18px;padding:23px;text-align:center;margin:20px 0;background:#f1f3e9}.trail-end svg{display:block;margin:0 auto 10px;color:#91a27d;width:28px;height:28px}.trail-end strong{font-size:13px}.trail-end p{font-size:11px;color:#8b9681;line-height:1.8;margin:9px 0 0}
/* Welcome and level selection */
#welcome-dialog{width:min(520px,calc(100% - 24px));background:var(--bg)}.welcome-body{padding:25px 32px 22px}.welcome-art{position:relative;width:85px;margin:0 auto 12px;background:#e9eddd;border-radius:50%}.welcome-art .traveler{width:74px;height:87px;margin-left:5px}.welcome-spark{position:absolute;right:-12px;top:8px;font-size:29px;color:#d4ae67}.welcome-body>.eyebrow{text-align:center}.welcome-body h2{font-size:29px;letter-spacing:-.8px;margin:10px 0;line-height:1.2;text-align:center;font-weight:650}.welcome-body h2 em{font-family:Georgia,serif;color:var(--coral);font-weight:400}.welcome-body>p{font-size:12px;color:var(--muted);line-height:1.8;text-align:center}.field-label{display:block;font-size:12px;font-weight:650;margin:22px 0 9px}.welcome-body>select{width:100%;min-height:45px}.welcome-body fieldset{border:0;padding:0;margin:20px 0}.welcome-body legend{font-size:13px;font-weight:650;margin-bottom:12px}.level-option{display:flex;align-items:center;gap:10px;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:13px 12px;margin:8px 0;cursor:pointer}.level-option:has(input:checked){background:#f7eddb;border-color:#c5a478;box-shadow:0 2px 0 #d8c2a2}.level-option input{accent-color:var(--coral);width:17px;height:17px;flex-shrink:0}.level-icon{display:grid;place-items:center;width:31px;color:#92785b;flex-shrink:0}.level-option strong{display:block;font-size:12px}.level-option small{display:block;font-size:10px;color:#8b8b7b;line-height:1.6;margin-top:4px}.welcome-body>.btn{width:100%;min-height:48px}
/* Game board */
.game-dialog{width:min(780px,calc(100% - 30px));height:min(840px,94dvh);max-height:94dvh;overflow:hidden}.game-dialog[open]{display:flex;flex-direction:column}.game-dialog #study-content{height:100%;min-height:0;display:flex;flex-direction:column}.game-top{display:flex;align-items:center;gap:17px;padding:21px 26px;border-bottom:1px solid var(--line);flex-shrink:0;background:var(--bg)}.game-top>div{flex:1;min-width:0}.game-top h2{font-size:12px;font-weight:600;margin:0 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#697a68}.game-top .icon-btn{border:0}.game-track{background:#e3e7da;height:10px;border-radius:99px;overflow:hidden}.game-track i{display:block;height:100%;background:#9fb782;border-radius:99px;transition:width .2s}.game-scroll{padding:24px 32px;overflow-y:auto;overflow-x:hidden;flex:1;min-height:0;scrollbar-width:thin}.game-meta{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.3px;color:#969c8b;margin-bottom:20px}.game-instruction{font-size:24px;letter-spacing:-.7px;font-weight:650;line-height:1.35;margin:10px 0 19px}.meaning-prompt{font-size:14px;line-height:1.8;color:#6c7a62;margin:0 0 21px}.game-coach{display:flex;align-items:center;gap:16px;margin:5px 0 18px}.game-coach .traveler{width:52px;height:64px}.game-coach p{font-size:13px;line-height:1.7;background:#eaf0e1;padding:13px 16px;border-radius:14px 14px 14px 2px;color:#718264;margin:0}.game-scroll .study-card{margin:12px 0 20px;min-height:210px}.tile-jp{display:block;font-size:20px;line-height:1.7;overflow-wrap:anywhere}.tile-kana{display:block;font-size:11px;line-height:1.6;color:#888a7a;margin-top:3px;overflow-wrap:anywhere}.tile-romaji{display:block;font-size:12px;line-height:1.7;color:#946c4f;margin-top:5px;overflow-wrap:anywhere}.learn-card .tile-jp{font-size:29px}.learn-card .tile-romaji{font-size:16px}.learn-card .tile-kana{font-size:14px}.game-audio{display:flex;align-items:center;justify-content:center;gap:17px;margin:17px 0 25px}.game-audio .sound-btn{width:70px;height:70px;box-shadow:0 4px 0 #e5c5b8;border:2px solid #f6dace}.game-options{display:grid;grid-template-columns:1fr;gap:12px;margin:19px 0}.game-options.word-options{grid-template-columns:repeat(2,minmax(0,1fr))}.game-option{background:var(--paper);border:2px solid #e0e4d7;border-bottom-width:5px;border-radius:14px;padding:15px;text-align:left;min-height:61px;font-size:14px;line-height:1.6;overflow-wrap:anywhere;transition:.12s}.game-option:hover:not(:disabled),.word-chip:hover:not(:disabled){background:#f0f3e7;border-color:#bdcaaa}.game-option.selected,.match-tile.selected{border-color:#bca377;background:#faf0d9}.game-option.right{border-color:#9cb985;background:#e9f2dd}.game-option.wrong{border-color:#cf9d91;background:#f8e8e0}.game-option:disabled{opacity:1}.game-footer{border-top:1px solid var(--line);padding:18px 28px;background:#f1f3e8;display:flex;gap:18px;align-items:center;justify-content:space-between;flex-shrink:0}.game-footer>.btn{min-width:150px;min-height:48px;font-size:13px}.footer-hint{font-size:11px;color:#849078;line-height:1.7}.result-message{display:flex;flex-direction:column;gap:5px;font-size:11px;line-height:1.5}.result-message strong{font-size:15px}.result-message.right{color:#64824c}.result-message.try-again{color:#af735b}.answer-model{background:#eef0e6;border-radius:12px;padding:15px 18px;margin-top:18px}.answer-model>p{font-size:18px;line-height:1.8;margin:0}.answer-model small{font-size:12px;color:#7f8973;line-height:1.7}.answer-model .romaji{font-size:13px;margin:5px 0}.gap-sentence{display:flex;align-items:center;flex-wrap:wrap;gap:10px;background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:23px 17px;margin:15px 0 24px}.sentence-piece{text-align:center}.sentence-piece .tile-jp{font-size:19px}.sentence-piece .tile-romaji{font-size:11px}.blank-piece{display:grid;place-items:center;min-width:82px;min-height:63px;border:2px dashed #c8b18a;border-radius:10px;color:#b1966b;font-size:27px;padding:6px 12px}.blank-piece.filled{background:#ecf0df;border-color:#a9bb91}.sentence-tray{display:flex;flex-wrap:wrap;align-content:flex-start;gap:9px;background:#eeefe5;border:2px dashed #d3dac7;min-height:130px;padding:15px;border-radius:15px;margin:15px 0 20px}.sentence-tray>span{font-size:12px;color:#9da68f;align-self:center;text-align:center;width:100%;line-height:1.8}.word-bank{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:17px}.word-chip{border:1px solid #dedfce;border-bottom:4px solid #d5d9c7;border-radius:11px;background:var(--paper);padding:10px 13px;min-height:51px;max-width:100%;min-width:60px;text-align:center}.word-chip .tile-jp{font-size:17px}.word-chip .tile-romaji{font-size:11px}.word-chip.placed{border-color:#aebe99;background:#f8f9ee}.word-chip.used{opacity:.28;pointer-events:none}.matching-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:18px;margin:22px 0}.matching-board>div{display:grid;grid-auto-rows:minmax(95px,auto);gap:12px}.match-tile{background:var(--paper);border:2px solid #dce1d1;border-bottom-width:5px;border-radius:13px;padding:10px 9px;min-height:95px;overflow-wrap:anywhere}.audio-tile{display:flex;align-items:center;justify-content:center;gap:9px;font-size:12px;color:#937356}.match-tile .tile-jp{font-size:18px}.match-tile .tile-romaji{font-size:11px}.match-tile.matched{background:#e7efdd;border-color:#b2c89e;color:#668052;opacity:.65}.recall-cloud{font-size:45px;color:#c7c8b9;letter-spacing:6px;margin:10px}.game-complete{overflow-y:auto;text-align:center;padding:35px 30px}.celebrate{position:relative;width:130px;margin:0 auto 25px}.celebrate .traveler{height:132px;width:110px}.celebrate>span{color:#cfaa57;position:absolute;left:0;top:25px;font-size:32px}.celebrate>span:last-child{left:auto;right:-10px;top:55px;font-size:40px}.game-complete h2{font-family:Georgia,serif;font-size:36px;font-weight:400;margin:12px 0}.game-complete>p{color:#88917c;font-size:13px;line-height:1.8}.earned-stars{font-size:40px;letter-spacing:7px;color:#dddccb;margin:20px 0}.earned-stars .on{color:#d3ad56}.session-results{display:flex;justify-content:center;gap:50px;margin:27px 0}.session-results strong{display:block;font-size:27px;color:#5a7450}.session-results small{display:block;font-size:10px;color:#8b957f;margin-top:7px}.completion-actions{display:flex;justify-content:center;gap:12px;margin-top:25px}.game-dialog:has(.game-complete){height:auto;min-height:540px}.welcome-body .small-note{font-size:10px!important}
@media(min-width:761px){.journey{background:#fffefa80;border:1px solid var(--line);border-radius:22px;padding:27px}.game-footer:has(.result-message.right){background:#e9f0e0}.game-footer:has(.result-message.try-again){background:#f7e9df}}
@media(max-width:760px){html,body{max-width:100%;overflow-x:clip}.main-wrap{margin-bottom:calc(72px + env(safe-area-inset-bottom))}.sidebar{height:calc(68px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.topbar{height:60px;padding:0 18px}.top-tag{max-width:65%;font-size:9px}.connection{display:none}.topbar .avatar{height:36px;width:36px}.page-heading{display:block;margin-bottom:18px}.eyebrow{font-size:9px}h1{font-size:28px}.subtitle{font-size:12px}main{padding:24px 17px 15px}.hero{display:flex;flex-direction:column;align-items:stretch;padding:23px 22px 0;min-height:0}.hero-copy{width:100%;text-align:left}.hero h2{font-size:29px;max-width:none;margin-top:12px}.hero p{max-width:none;font-size:12px}.hero .btn{width:100%;min-height:48px}.hero-art{position:relative;align-self:center;right:auto;bottom:0;width:100%;height:123px;transform:none;opacity:1;margin-top:12px;overflow:hidden}.hero-art .sun{width:85px;height:85px;top:15px;right:calc(50% - 45px)}.hero-art .ring{width:104px;height:104px;top:6px;right:calc(50% - 54px)}.hero-art .jp-card{width:72px;height:94px;top:33px;right:calc(50% - 13px);border-radius:10px}.hero-art .jp-card b{font-size:34px}.hero-art .jp-card span{font-size:7px;letter-spacing:1px}.hero-art .mountain{width:220px;height:78px;right:-10px;bottom:-26px}.hero-art .mountain.two{right:auto;left:0;bottom:-45px;width:150px;height:84px}.hero-art .little-star{font-size:25px;top:38px;right:calc(50% - 93px)}.stats{margin:13px 0 24px;gap:7px}.stat{border-radius:12px;padding:12px 9px;gap:6px}.stat strong{font-size:20px}.stat strong small{font-size:10px}.stat p{line-height:1.5;font-size:9px}.journey .section-head{gap:12px}.journey .section-head h2{font-size:17px}.xp-pill{padding:6px 9px;font-size:10px!important}.journey-intro{padding:15px 13px;gap:11px;margin:15px 0 24px;border-radius:15px}.journey-intro .traveler{width:43px;height:60px}.journey-intro strong{font-size:12px;line-height:1.5;display:block}.journey-intro p{font-size:11px}.journey-intro .text-btn{font-size:10px}.chapter-label{padding:14px 15px;margin:21px 0 6px}.chapter-label b{font-size:14px}.chapter-label small{font-size:10px;line-height:1.6}.chapter-label>span{font-size:23px}.learning-path{padding:5px 0 10px}.path-stop{padding-left:6px;gap:17px;min-height:151px}.node-column{width:65px}.path-node{width:62px;height:62px;border-width:4px}.path-node svg{width:24px;height:24px}.path-stop:before,.path-stop:nth-child(even):before{height:100%;width:0;left:36px;top:77px;transform:none;border-left:3px dashed #d6dccb}.path-stop.current{padding-top:42px;min-height:187px}.traveler-bubble{left:2px;bottom:62px}.traveler-bubble .traveler{height:64px;width:50px}.traveler-bubble>span{font-size:8px;padding:5px 7px}.stop-copy{padding:18px 0}.stop-label{font-size:8px;letter-spacing:1px}.stop-copy h3{font-size:15px;line-height:1.4;margin:6px 0}.stop-copy p{font-size:11px;max-width:none}.path-link{font-size:10px;margin-left:7px}.node-stars{font-size:12px}.optional-route summary{font-size:11px;padding:16px}.optional-route .learning-path{padding:3px 9px}.trail-end{margin:10px 0 20px;padding:20px}.quote-card .romaji{font-size:13px;margin-top:9px}.phrase-card{flex-direction:column;align-items:stretch;padding:19px}.phrase-actions{flex-direction:row;justify-content:flex-end}.phrase-actions .icon-btn{height:44px;width:48px}.toolbar{flex-direction:column}.searchbox{flex-basis:auto;min-width:0}.toolbar select{min-height:45px;width:100%}.panel .button-row{flex-direction:column}.panel .btn{min-height:46px}.settings-link{font-size:12px}.game-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:env(safe-area-inset-top) 0 0;background:var(--bg)}.game-dialog[open]{display:flex}.game-dialog:has(.game-complete){height:100dvh;min-height:0}.game-top{padding:15px 15px 13px;gap:10px}.game-top .icon-btn{height:36px;width:32px;flex-shrink:0}.game-top h2{font-size:10px;margin-bottom:8px}.game-top .xp-counter{font-size:10px!important;padding:6px 9px}.game-track{height:9px}.game-scroll{padding:22px 18px 25px}.game-meta{font-size:8px;letter-spacing:1px;margin-bottom:19px}.game-instruction{font-size:23px;letter-spacing:-.6px;margin:7px 0 19px}.meaning-prompt{font-size:13px;line-height:1.7}.game-audio{margin:18px 0 25px}.game-audio .sound-btn{height:64px;width:64px}.game-options{gap:10px}.game-options.word-options{gap:10px}.game-option{padding:13px 10px;font-size:13px;min-height:66px;border-radius:12px}.tile-jp{font-size:20px}.tile-romaji{font-size:11px}.learn-card .tile-jp{font-size:27px}.learn-card .tile-romaji{font-size:15px}.game-scroll .study-card{min-height:230px;margin-bottom:20px;padding:28px 18px}.game-coach{gap:12px}.game-coach p{font-size:12px;padding:12px}.game-footer{padding:13px 18px calc(16px + env(safe-area-inset-bottom));gap:10px;flex-direction:column;align-items:stretch;box-shadow:0 -6px 18px #293c3605}.game-footer>.btn{width:100%;min-height:50px}.game-footer .footer-hint{font-size:10px;text-align:center;line-height:1.7}.game-footer:has([data-action="game-self"]){display:grid;grid-template-columns:1fr 1fr}.game-footer:has([data-action="game-self"])>.btn{min-width:0;padding:12px 8px;font-size:12px}.result-message{gap:3px;font-size:11px;padding:0 2px 4px}.result-message strong{font-size:14px}.result-message.right{color:#5d7b49}.gap-sentence{padding:17px 13px;gap:9px}.sentence-piece .tile-jp{font-size:18px}.sentence-piece .tile-romaji{font-size:10px}.blank-piece{min-width:62px;min-height:64px;padding:7px}.word-chip{padding:10px 11px;min-width:46px}.word-chip .tile-jp{font-size:17px}.word-chip .tile-romaji{font-size:10px}.sentence-tray{padding:12px;gap:8px;min-height:130px}.word-bank{gap:8px}.matching-board{gap:12px;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}.matching-board>div{gap:11px;grid-auto-rows:minmax(100px,auto)}.match-tile{min-height:100px;padding:10px 6px}.audio-tile{flex-direction:column;gap:7px;font-size:10px}.match-tile .tile-jp{font-size:18px}.match-tile .tile-romaji{font-size:10px}.game-complete{padding:40px 22px calc(28px + env(safe-area-inset-bottom));margin:auto 0}.game-complete h2{font-size:31px}.session-results{gap:40px}.completion-actions{flex-direction:column}.completion-actions .btn{min-height:50px}.game-scroll .small-note{font-size:10px!important}.answer-model>p{font-size:17px}.game-dialog~#toast{bottom:18px}#toast{z-index:150}.welcome-body{padding:23px 22px 18px}.welcome-body h2{font-size:27px}.welcome-body .level-option{padding:12px 10px}.welcome-body .level-icon{width:22px}.welcome-body fieldset{margin:20px 0}.welcome-body .small-note{font-size:10px!important}.welcome-body>select{font-size:14px}#welcome-dialog{width:calc(100% - 20px);max-height:94dvh;border-radius:20px}.switch-row{align-items:center}.switch-row select{max-width:45%}}
@media(max-width:360px){.game-scroll{padding:18px 13px}.game-instruction{font-size:21px}.game-options.word-options{gap:8px}.tile-jp{font-size:18px}.path-stop{gap:12px}.stop-copy h3{font-size:14px}.hero h2{font-size:26px}.level-option small{font-size:9px}.game-footer{padding-left:13px;padding-right:13px}}

.mobile-tag{display:none}.modal-toast{position:absolute;left:15px;right:15px;bottom:calc(18px + env(safe-area-inset-bottom));background:#293c36;color:#fffefa;border-radius:12px;padding:13px 17px;font-size:12px;line-height:1.7;z-index:20;box-shadow:0 5px 25px #0002;pointer-events:none}@media(max-width:760px){.desktop-tag{display:none}.mobile-tag{display:inline;font-size:16px;letter-spacing:-.5px;text-transform:none;color:#344b3c}.mobile-tag b{color:#c16c53}.game-dialog .modal-toast{bottom:calc(136px + env(safe-area-inset-bottom))}}
/* Reading bubbles, personal workshop and account studio */
.segmented{display:inline;line-height:1.9}.jp-word{display:inline;font:inherit;color:inherit;background:transparent;border:0;border-bottom:1.5px dotted #91a995;padding:2px 3px;margin:0 2px;cursor:pointer;border-radius:5px;line-height:inherit}.jp-word:hover,.jp-word[aria-expanded=true]{background:#e7eedf;color:#315b43}.jp-word:focus-visible{outline:2px solid #315b43;outline-offset:2px}.phrase-text,.study-card,.answer-model{position:relative}.gloss-bubble{display:flex;flex-direction:column;gap:7px;text-align:left;margin:14px 0 3px;background:#304f40;color:#fff;padding:16px 19px;border-radius:15px;font:400 15px/1.55 system-ui;box-shadow:0 8px 25px #27423120;max-width:440px}.gloss-bubble strong{font-size:22px}.gloss-bubble small{color:#dbe5d7}.gloss-bubble .text-btn{color:#e3efca;align-self:flex-end}.reading-hint{display:block;font-size:12px!important;color:var(--muted);margin:10px 0}.personal-intro{display:flex;gap:22px;align-items:center;justify-content:space-between;margin-bottom:22px}.personal-intro h2{margin-top:12px}.personal-card{flex-wrap:wrap}.personal-actions{display:flex;align-items:center;gap:20px}.editor-body{padding:30px;max-width:640px;margin:auto}.editor-body label{display:block;font-size:14px;font-weight:600;margin:18px 0}.editor-body input,.editor-body textarea{display:block;width:100%;max-width:100%;margin-top:8px;padding:13px;border:1px solid #d8ddcf;background:#fffdf8;color:#263e32;border-radius:10px;font:400 16px/1.5 system-ui;box-sizing:border-box}.editor-body textarea{resize:vertical}.editor-body .section-head{gap:10px}.account-symbol{display:grid;place-items:center;border-radius:20px;background:#e8eddd;width:60px;height:60px;margin-bottom:20px}.account-symbol svg{width:29px;height:29px}.account-card h2{overflow-wrap:anywhere}.account-card .text-btn{margin-top:20px}.google-button{gap:13px}.google-button b{background:white;color:#33664c;border-radius:50%;width:25px;height:25px;display:grid;place-items:center}.status-chip{display:block;font-size:12px;color:#6b725e;margin-top:12px}.studio-card{flex-wrap:wrap}.studio-card .button-row{width:100%;margin-top:12px}.recorder-panel{margin-top:20px;padding:20px;background:#eef1e6;border-radius:15px}.recorder-panel audio{display:block;width:100%;margin:15px 0}.recording-live{color:#a64235}.navigation a{white-space:nowrap}.btn[disabled]{cursor:not-allowed;opacity:.55}a.btn{text-decoration:none}
@media(max-width:760px){.navigation{grid-template-columns:repeat(5,minmax(0,1fr))!important}.navigation a{font-size:10px!important;padding-left:2px!important;padding-right:2px!important;gap:4px!important}.navigation a svg{width:20px;height:20px}.personal-intro{align-items:flex-start;flex-direction:column}.personal-intro>.btn{width:100%}.personal-actions{width:100%;flex-wrap:wrap;gap:15px}.personal-actions .btn{flex:1}.editor-body{padding:21px 18px}.editor-body>.btn{width:100%}.jp-word{padding:3px 2px;margin:0 1px}.gloss-bubble{max-width:100%;font-size:15px}.account-card .button-row{flex-direction:column;align-items:stretch}.studio-card .button-row .btn{flex:1}.recorder-panel .button-row{flex-direction:column}.panel .searchbox{width:100%;box-sizing:border-box}}
/* Context first: small readable teaching cards before each activity. */
.lesson-intro{padding:30px;max-width:700px;margin:auto}.intro-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.intro-heading{display:flex;align-items:center;gap:18px;margin:18px 0}.intro-heading .traveler{width:66px;flex-shrink:0}.intro-heading h2{font-size:27px;line-height:1.25;margin:5px 0}.intro-lead{line-height:1.7;color:#58665a}.intro-points{display:grid;gap:13px;margin:24px 0}.intro-points article{display:flex;gap:14px;padding:16px;background:#f1f2e8;border-radius:14px}.intro-number{flex:0 0 25px;width:25px;height:25px;border-radius:50%;background:#dce6d1;display:grid;place-items:center;color:#365341;font-size:12px;font-weight:700}.intro-points h3{font-size:19px;font-weight:550;overflow-wrap:anywhere;margin:0}.intro-points p{line-height:1.6;margin:7px 0 0}.intro-points .romaji{font-size:13px;color:#946650}.intro-example{border:1px solid #dce2d4;border-radius:14px;padding:20px}.intro-example .jp{font-size:21px}.intro-example .text-btn{display:flex;align-items:center;gap:8px;margin-top:14px}.intro-tip{display:flex;align-items:flex-start;gap:10px;line-height:1.6;margin:22px 0}.intro-tip svg{flex-shrink:0;margin-top:3px}.intro-start{width:100%}.verse-guide{margin:10px 6px 22px;display:flex;gap:8px;align-items:center}@media(max-width:760px){.lesson-intro{padding:20px 17px}.intro-heading h2{font-size:23px}.intro-points article{padding:14px 12px;gap:10px}.intro-top .pill{font-size:10px}.intro-heading .traveler{width:50px}.intro-points h3{font-size:17px}.intro-example{padding:15px}}
