:root{--paper:#f8f9f4;--white:#fff;--ink:#263e31;--muted:#788075;--green:#31583f;--soft:#edf1e6;--line:#dfe4d9;--orange:#bd6b44;--serif:Georgia,'Times New Roman',serif;--sans:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color-scheme:light;font-family:var(--sans);color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button{border:0;background:none}button:disabled{cursor:not-allowed;opacity:.48}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #bb7849;outline-offset:4px}button{transition:background .18s,transform .18s}button:not(:disabled):active{transform:translateY(1px)}.hidden{display:none!important}.header{height:104px;padding:0 5.6%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:24px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:26px;font-weight:700;letter-spacing:-1.1px}.brand-light{font-weight:400}.brand-mark{width:44px;height:48px;border-radius:13px 13px 13px 3px;background:var(--green);color:#f6f7ed;display:grid;place-items:center;font-family:serif;font-size:33px;font-weight:400}.brand small{font-size:8px;letter-spacing:2px;display:block;margin-top:3px;font-weight:500}.header nav{display:flex;gap:28px;margin-left:-70px;height:100%;align-items:center}.nav-button{height:100%;font-size:14px;position:relative;color:var(--muted);padding:0 4px}.nav-button.active{color:var(--green);font-weight:600}.nav-button.active:after{content:'';position:absolute;bottom:0;left:4px;right:4px;height:3px;background:var(--green);border-radius:3px 3px 0 0}.icon-button{display:flex;align-items:center;justify-content:center;gap:6px;width:42px;height:42px;border:1px solid var(--line);border-radius:50%;font-size:23px;background:transparent}.icon-button:hover{background:var(--soft)}#sound{width:62px;border-radius:22px}.sound-status{font-size:9px;letter-spacing:1px}main{max-width:1370px;margin:auto;padding:42px 5.6% 0}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:34px;gap:20px}.eyebrow,.section-label,.stage-eyebrow{font-size:10px;font-weight:600;letter-spacing:1.9px}.eyebrow{margin:0 0 13px;color:#728269}.little-leaf{display:inline-block;transform:rotate(-40deg);font-size:17px;vertical-align:-2px;margin-right:5px}h1{font-family:var(--serif);font-size:44px;font-weight:400;letter-spacing:-1.8px;margin:0 0 13px;line-height:1.1}h1>span{color:var(--orange)}.page-heading p:not(.eyebrow){color:var(--muted);font-size:14px;margin:0;line-height:1.6}.daily{display:flex;align-items:center;gap:13px;font-size:12px}.daily-icon{color:var(--orange);font-size:30px}.daily strong{display:block;font-weight:600;font-size:13px;margin-bottom:5px}.daily div>span{font-size:11px;color:var(--muted)}.daily-ring{border:3px solid #e3e8dc;border-radius:50%;height:38px;width:38px;display:grid;place-items:center;font-size:16px;color:#788b70}.workspace{display:grid;grid-template-columns:268px minmax(0,1fr);gap:28px}.setup{border:1px solid var(--line);border-radius:15px;padding:24px 21px;background:#ffffff6b;align-self:start}.section-label{display:flex;justify-content:space-between;margin-bottom:26px;font-size:10px;letter-spacing:1.6px}.section-label>span{color:#acb4a6}fieldset{border:0;padding:0;margin:0 0 24px;min-width:0}legend{font-size:12px;font-weight:600;margin:0 0 12px;padding:0}.script-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.script-picker button{font-size:10px;border:1px solid var(--line);border-radius:7px;padding:12px 2px 9px;color:var(--muted);background:#fff}.script-picker button>span{display:block;font-family:serif;font-size:24px;line-height:1.2;margin-bottom:7px;color:var(--ink)}.script-picker button:last-child>span{font-size:20px;line-height:1.44}.script-picker button.selected{background:var(--soft);border-color:#829674;color:var(--green)}.modes{display:grid;gap:7px}.mode{padding:12px 10px;border:1px solid transparent;border-radius:8px;text-align:left;display:flex;align-items:center;gap:10px}.mode.selected{background:var(--soft);border-color:#ccd5c1}.mode:hover{background:#f0f2eb}.mode-icon{width:23px;font-size:26px;color:#6b8060;text-align:center}.mode strong{display:block;font-size:12px;font-weight:600;margin-bottom:5px}.mode small{display:block;font-size:10px;color:var(--muted)}.radio{width:13px;height:13px;border:1px solid #c8cec0;border-radius:50%;margin-left:auto}.selected .radio{border:4px solid var(--green)}.check-row{display:flex;align-items:center;gap:9px;font-size:12px;margin:0 0 15px;cursor:pointer}.check-row:last-child{margin:0}.check-row input{accent-color:var(--green);height:15px;width:15px;margin:0;cursor:pointer}.check-row small{display:inline;font-family:serif;margin-left:3px;font-size:11px;color:var(--muted)}.count{font-size:10px;color:var(--muted);margin-left:auto}.text-button{font-size:12px;padding:0;display:inline-flex;align-items:center;gap:8px;color:#59734f}.text-button:hover{color:var(--orange)}#customize{justify-content:space-between;width:100%;padding-bottom:19px;border-bottom:1px solid var(--line);font-size:11px}.pool-note{display:flex;align-items:center;gap:6px;font-size:10px;color:var(--muted);padding-top:17px}.status-dot{width:5px;height:5px;background:#779968;border-radius:50%;display:inline-block}.game-panel{position:relative;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;min-height:480px;isolation:isolate}.game-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:23px 26px;position:relative;z-index:2}.pill{background:#eef2e8;border:1px solid #e0e7d6;color:#67835b;border-radius:20px;padding:7px 10px;font-size:9px;letter-spacing:1px;font-weight:600;display:flex;gap:6px;align-items:center}#round-label{margin-left:auto;font-size:11px;color:#899081}#pause{width:28px;height:28px;font-size:15px}.game-content{position:relative;z-index:1;text-align:center;padding:10px 28px 80px;min-height:407px}.stage-eyebrow{font-size:9px;color:#859078;margin:10px 0 20px}.preview-kana{display:flex;justify-content:center;align-items:center;height:110px;margin:8px 0 18px}.preview-kana span{font-family:'Hiragino Mincho ProN','Yu Mincho',serif;font-size:76px;display:grid;place-items:center;width:104px;height:104px;border:1px solid #d6ddcc;border-radius:13px;transform:rotate(-9deg);background:#f2f4eb;box-shadow:0 6px 9px #263e3105;font-weight:400;line-height:1}.preview-kana span+span{transform:rotate(9deg);margin-left:-6px;background:#fcfaf3;border-color:#e8dec9;color:#9d7d4d}.game-content h2{font-family:var(--serif);font-size:30px;letter-spacing:-.7px;font-weight:400;margin:0 0 12px}.game-content>p:not(.stage-eyebrow):not(.answer-hint){font-size:12px;line-height:1.8;color:var(--muted);margin:0 0 22px}.primary{display:inline-flex;align-items:center;justify-content:center;gap:35px;border-radius:7px;background:var(--green);color:#fff;padding:14px 24px;font-size:12px;font-weight:500;box-shadow:0 3px 1px #203c2910}.primary:hover{background:#21472f}.primary>span{font-size:18px}.keyboard-hint{display:block;color:#9aa08f;font-size:10px;margin-top:13px}kbd{font-family:var(--sans);font-size:9px;border:1px solid #e0e4d9;border-radius:3px;padding:3px 5px;color:#858d7e;background:#fff;margin-left:3px}.landscape{position:absolute;height:107px;bottom:0;left:0;right:0;z-index:0;pointer-events:none}.landscape svg{display:block;height:100%;width:100%}.round-progress{height:3px;position:absolute;bottom:0;left:0;right:0;background:#b0bea5;z-index:3}.round-progress>div{height:100%;width:0;background:var(--green);transition:width .3s}.below-game{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#8b9282;font-size:10px;padding:17px 2px}.key-icon{font-size:16px;margin-right:5px}.below-game .text-button{font-size:10px}.learning-note{position:relative;display:flex;align-items:center;gap:15px;background:#edf1e6;border:1px solid #e0e6d6;border-radius:10px;padding:18px 20px;overflow:hidden}.note-icon{font-size:27px;color:#82976d}.learning-note strong{font-weight:500;font-size:12px}.learning-note p{font-size:10px;color:#7e8874;margin:6px 0 0;line-height:1.6}.note-kana{font-family:serif;font-size:54px;color:#d0dac3;margin-left:auto;line-height:1}.live-stats{display:flex;justify-content:center;gap:66px;margin-top:0}.live-stats small{font-size:9px;letter-spacing:1.3px;display:block;color:#8c9583;margin-bottom:7px}.live-stats strong{font-size:24px;font-weight:500;font-variant-numeric:tabular-nums}.combo{font-size:10px;color:#9a8059;margin-top:17px;height:13px}.current-kana{font-family:'Hiragino Mincho ProN','Yu Mincho',serif;font-size:100px;line-height:1.25;margin:8px 0 0;min-height:125px}.answer-hint{font-size:12px;color:#909985;margin:3px 0 10px;height:17px}.answer-hint.revealed{color:var(--orange);font-weight:600;letter-spacing:1px}#answer{width:210px;border:0;border-bottom:2px solid #a0b18e;background:#f5f7f0;text-align:center;font-size:22px;letter-spacing:3px;padding:9px 16px;border-radius:6px 6px 0 0;outline-offset:2px;color:var(--green)}#answer::placeholder{font-size:14px;letter-spacing:1px;color:#a0aa96}#answer.error{border-color:#c67b55;background:#fbf0e9;animation:shake .2s}.feedback{min-height:17px;margin:10px 0 15px;font-size:11px;color:#7a8b6d}.feedback.error{color:#ab5739}.play-actions{display:flex;justify-content:center;gap:28px}.play-actions .text-button{font-size:10px}#playing{padding-bottom:44px}#paused{padding-top:50px}.pause-symbol{font-size:42px;color:#8d9d7f;margin-bottom:26px}#end-paused{display:block;margin:20px auto}.results-icon{font-size:42px;color:#a98750;margin:8px 0 13px}.result-stats{display:flex;justify-content:center;gap:40px;margin:20px 0}.result-stats strong{display:block;font-size:28px;font-weight:500}.result-stats small{color:var(--muted);font-size:10px}.result-actions{display:flex;justify-content:center;gap:20px;align-items:center}.review-list{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:10px 0 18px}.review-list span{background:#f4f0e7;border-radius:5px;padding:6px 10px;font-size:12px}.review-caption{font-size:11px;color:var(--muted);margin:8px 0}footer{display:flex;align-items:center;justify-content:space-between;margin-top:40px;padding:23px 0;border-top:1px solid var(--line);font-size:10px;color:#9a9f92}.footer-brand{letter-spacing:.2px}.footer-brand>span{padding:0 7px}.footer-translation{font-size:10px;margin-left:8px;color:#a8ad9f}.view-toolbar{display:flex;justify-content:space-between;align-items:center;margin:25px 0}.segmented{display:flex;background:#e9eee1;padding:4px;border-radius:9px;gap:4px}.segmented button{padding:10px 18px;border-radius:6px;font-size:13px}.segmented .selected{background:white;box-shadow:0 1px 4px #0001}.chart-legend{display:flex;gap:7px;align-items:center;font-size:12px;color:var(--muted)}.chart-legend i{width:9px;height:9px;border-radius:3px;background:#fff;border:1px solid var(--line);margin-left:10px}.chart-legend i:nth-of-type(2){background:#e9dfbd}.chart-legend i:nth-of-type(3){background:#aec59f}.chart-section{margin-bottom:28px}.chart-section h2{font-family:var(--serif);font-size:25px;font-weight:400}.kana-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:9px}.kana-tile{border:1px solid var(--line);background:#fff;border-radius:9px;padding:14px 5px;text-align:center}.kana-tile>span{font-family:serif;font-size:30px;display:block;margin-bottom:8px}.kana-tile small{font-size:12px;color:var(--muted)}.kana-tile.practicing{background:#f3efdf;border-color:#e1d8b9}.kana-tile.growing{background:#e1ead9;border-color:#bfceb3}.progress-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:30px}.stat-card{background:#fff;border:1px solid var(--line);padding:27px;border-radius:12px}.stat-card>span{display:block;color:var(--muted);font-size:12px}.stat-card strong{font-family:var(--serif);font-size:40px;display:block;margin:15px 0 6px;font-weight:400}.stat-card small{color:var(--muted);font-size:11px}.history-panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:26px;margin-bottom:22px}.history-panel h2{font-family:var(--serif);font-size:25px;font-weight:400;margin:0 0 20px}.history-panel p{color:var(--muted);font-size:14px;line-height:1.7}.history-row{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:10px;align-items:center;padding:15px 0;border-top:1px solid var(--line);font-size:13px}.history-row small{display:block;margin-top:6px;color:var(--muted);font-size:11px}.empty-grove{text-align:center;padding:40px 20px}.empty-grove>span{font-size:45px;color:#839571}.empty-grove h2{margin-top:15px}dialog{border:1px solid var(--line);border-radius:16px;max-width:530px;width:calc(100% - 32px);padding:28px;color:var(--ink);background:var(--paper);box-shadow:0 25px 100px #14281930}dialog::backdrop{background:#20302466;backdrop-filter:blur(4px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-head h2{font-family:var(--serif);font-size:28px;font-weight:400;margin:0}.dialog-head .icon-button{flex-shrink:0}#dialog-content p{font-size:14px;line-height:1.7;color:var(--muted)}.row-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.row-option{display:flex;gap:8px;align-items:center;border:1px solid var(--line);border-radius:7px;padding:11px;background:#fff;font-size:12px}.row-option input{accent-color:var(--green)}.row-option small{display:block;color:var(--muted);margin-top:4px;font-family:serif}.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:16px}.help-list{padding-left:22px;line-height:1.8;font-size:14px;color:var(--muted)}.help-list li{margin-bottom:14px}.help-list strong{color:var(--ink)}.kana-detail{text-align:center;font-family:serif;font-size:84px}.storage-warning{color:#ac603d!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@keyframes shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@media(min-width:1450px){main{padding-left:60px;padding-right:60px}.game-panel{min-height:510px}.game-content{min-height:433px}.header{padding:0 max(5.6%,calc((100vw - 1250px)/2))}}
@media(max-width:1000px){main{padding:30px 4% 0}.header{padding:0 4%;height:90px}.workspace{grid-template-columns:235px minmax(0,1fr);gap:20px}.setup{padding:20px 16px}.header nav{margin-left:0;gap:18px}.daily{display:none}h1{font-size:40px}.live-stats{gap:40px}.kana-grid{grid-template-columns:repeat(7,1fr)}.learning-note p{max-width:300px}.note-kana{display:none}}
@media(max-width:700px){.header{height:80px;flex-wrap:wrap;position:relative;padding-bottom:0;gap:10px}.brand{font-size:23px}.brand-mark{width:37px;height:41px;font-size:29px}.brand small{font-size:7px}.header nav{order:3;width:100%;height:43px;justify-content:center;gap:32px;position:absolute;top:80px;left:0;background:var(--paper);border-bottom:1px solid var(--line)}.nav-button{font-size:12px}main{padding:72px 18px 0}.page-heading{margin-bottom:24px}.eyebrow{font-size:8px;letter-spacing:1.3px}h1{font-size:34px;letter-spacing:-1.3px}.page-heading p:not(.eyebrow){font-size:12px;max-width:320px}.workspace{display:flex;flex-direction:column;gap:20px}.setup{order:2;width:100%;display:grid;grid-template-columns:1fr 1fr;column-gap:22px}.section-label{grid-column:1/-1;margin-bottom:20px}.setup fieldset{margin-bottom:20px}.setup fieldset:nth-of-type(2){grid-column:2;grid-row:2/4}.mode{padding:11px 7px;gap:7px}.mode small{font-size:9px}.mode-icon{width:18px}.mode strong{font-size:11px}.script-picker button{font-size:9px}.script-picker button>span{font-size:22px}.pool-note{grid-column:1/-1}.check-row{font-size:11px}.check-row small{font-size:10px}#customize{grid-column:1/-1}.game-top{padding:18px}.game-panel{min-height:465px}.game-content{padding-left:18px;padding-right:18px;min-height:398px}.preview-kana{margin:15px 0 23px}.game-content h2{font-size:28px}.below-game{font-size:9px}.below-game .text-button{font-size:10px}.learning-note{padding:15px 13px}.learning-note p{font-size:10px}.game-content>p:not(.stage-eyebrow):not(.answer-hint){font-size:12px}.kana-grid{grid-template-columns:repeat(5,1fr);gap:6px}.kana-tile>span{font-size:26px}.view-toolbar{align-items:flex-start;gap:16px;flex-direction:column}.progress-cards{grid-template-columns:1fr 1fr;gap:10px}.stat-card{padding:19px}.stat-card strong{font-size:34px}.history-panel{padding:18px}.history-row{font-size:11px;grid-template-columns:1.3fr 1fr 1fr}.history-row>span:last-child{display:none}.result-stats{gap:25px}.result-stats strong{font-size:25px}.footer-translation{display:none}footer{font-size:9px;margin-top:26px}.live-stats{gap:45px}.play-actions{gap:24px}.row-options{gap:7px}.row-option{padding:10px 7px}dialog{padding:22px}.chart-legend{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@media(max-width:700px){.header{flex-wrap:nowrap}.brand small{display:none}.brand{flex-shrink:0}#sound{flex-shrink:0}}

/* Keep the solved kana visible for a short, gentle celebration. */
.answer-success .current-kana{color:#4a7948;animation:kana-success 650ms ease-out both}
.answer-success .current-kana::after{content:'✧';position:absolute;margin-left:12px;font:32px var(--sans);color:#a7894e;animation:success-spark 650ms ease-out both}
.answer-success #answer{background:#e7efdf;border-color:#62905a;color:#31583f;opacity:1}
.answer-success .feedback{color:#3e713d;font-weight:600;animation:success-message 220ms ease-out both}
@keyframes kana-success{0%{transform:scale(1)}35%{transform:scale(1.12) translateY(-4px)}70%{transform:scale(.98)}100%{transform:scale(1)}}
@keyframes success-spark{0%{opacity:0;transform:translateY(14px) scale(.5)}35%{opacity:1}100%{opacity:0;transform:translateY(-20px) scale(1.15)}}
@keyframes success-message{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.answer-success .current-kana,.answer-success .current-kana::after,.answer-success .feedback{animation:none!important}.answer-success .current-kana::after{display:none}}

.previous-answer{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:12px;padding:13px 20px;background:#f0f3ea;border:1px solid var(--line);border-radius:10px}
.previous-label{font-size:11px;letter-spacing:1.2px;color:#68765f;margin-right:auto}
.previous-kana{font-family:'Hiragino Mincho ProN','Yu Mincho',serif;font-size:32px;line-height:1.25;color:var(--ink)}
.previous-divider{color:#829276;font-size:18px}
#previous-romaji{font-size:16px;font-weight:500;color:var(--green);overflow-wrap:anywhere}
@media(max-width:700px){.previous-answer{gap:10px;padding:12px 14px}.previous-label{font-size:10px;letter-spacing:.8px}.previous-kana{font-size:28px}#previous-romaji{font-size:14px}}

/* Immersive game stage: the grove fills the viewport, controls stay peripheral. */
body{min-height:100dvh;background:radial-gradient(ellipse at 50% 40%,#fffffc 0%,#f2f5e9 65%,#e9efdf 100%)}
.header{height:76px;border:0;padding:0 32px;position:relative;z-index:5;background:transparent}
.brand{font-size:22px}.brand-mark{width:36px;height:40px;font-size:28px}
.header nav{height:auto;gap:6px;margin:0;position:absolute;left:50%;transform:translateX(-50%)}
.nav-button{height:auto;padding:10px 16px;border-radius:24px;font-size:13px}.nav-button.active{background:#e0e8d5}.nav-button.active:after{display:none}
.hud-actions{display:flex;align-items:center;gap:16px}.settings-button{font-size:14px;color:#627359;padding:10px;border-radius:20px}.settings-button:hover{background:#e4ecd9}
main{max-width:none;padding:0 24px;position:relative;z-index:1}
#practice-view{min-height:calc(100dvh - 76px);display:flex;align-items:center;justify-content:center;padding:12px 0 24px}
.workspace{display:block;width:100%;max-width:760px}.play-column{width:100%}
.game-panel{border:0;background:transparent;box-shadow:none;overflow:visible;min-height:0;border-radius:0}
.game-top{padding:0 30px 12px;max-width:540px;margin:auto}.pill{background:#e8eedf;font-size:11px}#round-label{font-size:12px}
.game-content{min-height:0;padding:18px 24px 26px}#playing{padding:8px 24px 24px}
#welcome{padding:26px 24px 40px}.stage-eyebrow{font-size:11px;letter-spacing:2.5px;margin:0 0 28px}
.preview-kana{height:160px;margin:12px 0 34px}.preview-kana span{width:142px;height:142px;font-size:100px;border-radius:20px;box-shadow:0 16px 40px #344f3010}
#welcome h1{font-size:44px;margin:0 0 18px}.game-content>p:not(.stage-eyebrow):not(.answer-hint){font-size:14px}.primary{font-size:15px;padding:16px 28px;border-radius:10px;min-width:210px}.keyboard-hint{font-size:12px}
.live-stats{gap:72px}.live-stats small{font-size:11px}.live-stats strong{font-size:28px}.combo{font-size:12px;margin:22px 0 8px;height:16px}
.current-kana{font-size:clamp(100px,17vh,168px);min-height:0;line-height:1.2;margin:18px 0 10px}
.answer-hint{font-size:14px;height:20px;margin-bottom:12px}#answer{width:250px;font-size:28px;padding:14px 18px;background:#ffffffb3;border:1px solid #b4c3a8;border-bottom:3px solid #829c70;border-radius:12px;box-shadow:0 8px 25px #45603a08}
.feedback{font-size:13px;margin:16px 0 18px;min-height:18px}.play-actions .text-button{font-size:12px}.play-actions{gap:36px}kbd{font-size:10px}
.round-progress{position:relative;max-width:420px;margin:0 auto;background:#d8e2cd;border-radius:5px;height:4px;overflow:hidden}
.previous-answer{width:fit-content;max-width:100%;min-width:270px;margin:20px auto 0;padding:10px 18px;background:#ffffff80;border-color:#d6dfcd;gap:18px}.previous-label{font-size:11px}.previous-kana{font-size:32px}
.below-game{max-width:500px;margin:18px auto 0;justify-content:center;gap:28px;font-size:11px}.below-game .text-button{font-size:12px}.storage-notice{font-size:12px;text-align:center;margin:8px 0 0}.storage-notice:empty{display:none}
body>.landscape{position:fixed;bottom:0;left:0;right:0;height:24vh;z-index:0;opacity:.75;pointer-events:none}
.in-round .brand,.in-round .header nav,.in-round .hud-actions{opacity:.45;transition:opacity .2s}.in-round .header:hover .brand,.in-round .header:hover nav,.in-round .header:hover .hud-actions,.in-round .header:focus-within nav,.in-round .header:focus-within .hud-actions{opacity:1}
#paused{padding:44px 24px 50px}.game-content h2{font-size:34px}#results{padding:24px 20px 32px}
#chart-view,#progress-view{max-width:1120px;margin:28px auto 60px;padding:28px;background:#f8faf2ee;border:1px solid #dce5d2;border-radius:20px}
#settings-dialog{max-width:450px}#settings-dialog .setup{display:block;border:0;background:none;padding:0;max-width:none;width:100%}#settings-dialog .section-label{display:none}#settings-dialog legend{font-size:14px}#settings-dialog .mode strong{font-size:14px}#settings-dialog .mode small{font-size:12px}#settings-dialog .script-picker button{font-size:12px}#settings-dialog .check-row{font-size:14px}#settings-dialog .pool-note{font-size:12px}#settings-note{font-size:13px;color:var(--muted)}#settings-note:empty{display:none}.settings-daily{display:flex;gap:14px;align-items:center;border-top:1px solid var(--line);margin-top:20px;padding-top:18px;font-size:12px;color:var(--muted)}.settings-daily strong{color:var(--ink)}
@media(max-width:700px){.header{height:66px;padding:0 16px;gap:10px;flex-wrap:nowrap}.brand{font-size:18px}.brand-mark{height:34px;width:30px;font-size:24px}.header nav{position:fixed;top:auto;bottom:12px;left:50%;width:auto;height:auto;border:1px solid #cedac2;flex-wrap:nowrap;gap:0;padding:4px;background:#f7faeff2;box-shadow:0 4px 20px #24401b10;white-space:nowrap;z-index:10}.nav-button{padding:9px 15px;font-size:12px}.hud-actions{gap:8px}.settings-button span{display:none}.settings-button{font-size:22px;padding:5px}#sound{width:50px;height:36px}main{padding:0 16px}#practice-view{min-height:calc(100dvh - 66px);padding:8px 0 78px}.workspace{display:block}.game-top{padding:0 4px 14px;gap:8px}#round-label{font-size:11px}.game-content,#playing{padding:8px 4px 20px}#welcome{padding:16px 0 26px}#welcome h1{font-size:34px}.preview-kana{height:125px;margin:6px 0 26px}.preview-kana span{width:115px;height:115px;font-size:80px}.live-stats{gap:42px}.live-stats strong{font-size:24px}.current-kana{font-size:116px;margin:12px 0}.combo{margin-top:16px}.below-game{margin-top:14px;gap:16px}.below-game>span{display:none}.previous-answer{margin-top:16px;min-width:0;gap:12px}.previous-kana{font-size:28px}#chart-view,#progress-view{margin:8px 0 80px;padding:18px}.in-round .header nav{opacity:.8}body>.landscape{height:20vh}}
@media(max-height:740px) and (min-width:701px){.header{height:62px}#practice-view{min-height:calc(100dvh - 62px);padding:4px 0 16px}.current-kana{font-size:112px;margin:10px 0}.combo{margin-top:12px}.game-content,#playing{padding-top:4px;padding-bottom:16px}.preview-kana{height:120px;margin:0 0 24px}.preview-kana span{width:110px;height:110px;font-size:80px}#welcome{padding:12px 0 24px}.previous-answer{margin-top:14px}.below-game{margin-top:12px}}

@media(min-width:701px) and (max-width:1000px){.header{padding:0 20px}.settings-button span{display:none}.settings-button{font-size:22px;padding:6px}.hud-actions{gap:10px}.nav-button{padding:10px 12px;font-size:12px}}

.pronunciation-setting{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);font-size:14px;line-height:1.5}.pronunciation-setting input{flex-shrink:0}

.replay-button{display:inline-flex;align-items:center;gap:7px;border:1px solid #b5c5a9;border-radius:20px;background:#f8fbf3;padding:9px 13px;font-size:13px;color:var(--green);min-height:38px}.replay-button:hover{background:#dfebd4}.replay-button:active{background:#cddfbd}.replay-button>span:first-child{font-size:11px}
@media(max-width:420px){.previous-answer{gap:9px;padding:10px 12px}.previous-label{font-size:9px;letter-spacing:.3px}.replay-button{padding:9px 11px}.replay-button>span:last-child{display:none}}

/* Kana chart cards keep reference details and pronunciation as separate controls. */
.kana-tile{padding:0;overflow:hidden;display:flex;flex-direction:column}
.kana-info{width:100%;padding:14px 5px 9px;text-align:center;flex:1}
.kana-info>span{font-family:serif;font-size:30px;display:block;margin-bottom:8px}
.kana-info small{font-size:12px;color:var(--muted)}
.kana-info:hover{background:#f7f9f3}
.kana-audio{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:8px 4px;border-top:1px solid #e5e9df;color:var(--green);font-size:10px;letter-spacing:.2px}
.kana-audio>span:first-child{font-size:8px}
.kana-audio:hover,.kana-audio.playing{background:#dfead7;color:#294f37}
.kana-audio.playing>span:first-child{animation:chart-audio-pulse .7s ease-in-out infinite alternate}
@keyframes chart-audio-pulse{to{transform:scale(1.35)}}
@media(max-width:700px){.kana-info>span{font-size:26px}.kana-audio{min-height:34px}.kana-audio>span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){.kana-audio.playing>span:first-child{animation:none}}

/* Phone layouts follow the visible area above the software keyboard. */
@media(max-width:700px){
  #pause{width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;border-radius:50%}
  .header{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .header nav{bottom:max(10px,env(safe-area-inset-bottom))}
  #practice-view{min-height:calc(var(--visible-height,100dvh) - 66px)}
  .play-column{min-width:0}
  .live-stats{justify-content:space-around;gap:12px}
  .current-kana{font-size:clamp(76px,18svh,116px)}
  #answer{max-width:100%;font-size:24px}
  .text-button,.icon-button,.settings-button,.nav-button,.kana-audio,.replay-button{min-height:44px}
  .play-actions{gap:20px}
  .previous-answer{max-width:100%;gap:10px}
  .previous-label{margin-right:0}
  #chart-view,#progress-view{padding:14px}
  .kana-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  .kana-info>span{font-size:clamp(20px,6vw,28px)}
  .result-actions{flex-wrap:wrap;gap:12px}
  dialog{max-height:calc(var(--visible-height,100dvh) - 24px);overflow-y:auto;padding:18px}
  .dialog-head{gap:12px}.dialog-head h2{font-size:26px}
  .check-row{min-height:44px}.check-row input{width:20px;height:20px;flex-shrink:0}
  .keyboard-hint,.play-actions kbd{display:none}
  .in-round .brand,.in-round .hud-actions{opacity:1}
  body.keyboard-open .header{height:48px}
  body.keyboard-open .header nav,body.keyboard-open .below-game{display:none}
  body.keyboard-open #practice-view{min-height:calc(var(--visible-height,100dvh) - 48px);padding:0 0 6px;align-items:flex-start}
  body.keyboard-open .game-top{padding-bottom:4px}
  body.keyboard-open #playing{padding:0 0 4px}
  body.keyboard-open .live-stats strong{font-size:19px}
  body.keyboard-open .live-stats small{font-size:9px;margin-bottom:2px}
  body.keyboard-open .combo{margin:5px 0 0;font-size:11px}
  body.keyboard-open .current-kana{font-size:clamp(52px,17vh,82px);margin:2px 0;line-height:1.1}
  body.keyboard-open .answer-hint{margin:2px 0 5px;font-size:12px;height:16px}
  body.keyboard-open #answer{padding:7px 12px}
  body.keyboard-open .feedback{margin:5px 0 0;font-size:11px}
  body.keyboard-open .previous-answer{margin-top:6px;padding:3px 10px}
  body.keyboard-open .previous-kana{font-size:24px}
  body.keyboard-open .replay-button{padding:5px 10px}
}
@media(max-width:360px){.brand{font-size:16px;gap:6px}.hud-actions{gap:4px}.previous-label{font-size:8px}.stat-card{padding:12px}.chart-legend{gap:4px;font-size:10px}}
