:root{color-scheme:light;--paper:#fcfdff;--surface:#ffffff;--ink:#414654;--green:#487869;--muted:#646d7b;--line:#e8edf2;--tint:#e6f6ee;--amber:#8a6174;--danger:#97576a;--radius:28px;font-family:"Hiragino Sans","Yu Gothic",Meiryo,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}
button,select{font:inherit;color:inherit}
button{min-height:44px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:10px 18px;border:1px solid var(--line);border-radius:8px;background:transparent;transition:background .15s,color .15s}
button:hover:not(:disabled){background:var(--tint)}
button:disabled{cursor:default;opacity:.6}
button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #628fc3;outline-offset:4px}
::selection{background:#dceeff;color:#414654}
*{scrollbar-color:#c7d7e4 var(--paper)}
a{color:inherit;text-decoration:none}
p{line-height:1.9;margin:0}
svg{flex:none}
h1,h2,h3,h4{margin:0;text-wrap:balance}
h1{font-size:30px;letter-spacing:-.025em;font-weight:600}
h2{font-size:27px;line-height:1.65;font-weight:600}
h3{font-size:17px;line-height:1.7}
h4{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:8px}
.app-shell{max-width:1680px;margin:auto;display:grid;grid-template-columns:250px 1fr;min-height:100vh}
.sidebar{padding:36px 22px 28px;background:#ffffff;border-right:1px solid var(--line);position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:12px;margin:0 4px 48px;font-weight:600;font-size:17px}
.brand-symbol{font-family:"Hiragino Maru Gothic ProN","Hiragino Sans","Yu Gothic",sans-serif;font-size:30px;background:var(--green);color:var(--surface);width:44px;height:48px;display:grid;place-items:center;border-radius:3px}
.brand small{display:block;font-size:10px;font-weight:400;letter-spacing:.1em;margin-top:5px;color:var(--muted)}
nav{display:flex;flex-direction:column;gap:8px}
.nav-item{justify-content:flex-start;border:0;border-radius:6px;font-size:14px;padding:13px 14px;gap:12px}
.nav-item.active{background:var(--green);color:var(--surface)}
.nav-item.active:hover{background:#396656}
.nav-item small{margin-left:auto;font-variant-numeric:tabular-nums}
.sidebar-foot{margin-top:auto;padding:40px 12px 0}
.mini-progress{display:flex;justify-content:space-between;font-size:11px;margin-bottom:12px}
.mini-progress strong{font-weight:500;font-variant-numeric:tabular-nums}
.sidebar-foot p{font-size:11px;color:var(--muted);margin-top:16px}
.workspace{min-width:0}
.topbar{height:76px;padding:0 46px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px;color:var(--muted)}
.draft{font-size:10px;color:var(--amber);padding:5px 8px;background:#fff0f5;border-radius:4px;letter-spacing:.03em}
main{max-width:1030px;margin:auto;padding:43px 48px 24px}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}
.page-heading p{font-size:13px;color:var(--muted);margin-top:10px}
.translation{white-space:nowrap;background:var(--surface);font-size:12px;border-radius:6px;padding:8px 12px}
.translation strong{font-weight:500;font-size:10px}
.switch{width:26px;height:15px;border-radius:15px;background:#cbd6df;padding:3px;display:flex}
.switch:before{content:'';width:9px;height:9px;border-radius:50%;background:#fff}
.switch.on{background:var(--green);justify-content:flex-end}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px;font-size:12px}
.toolbar label{display:flex;gap:10px;align-items:center;min-width:0}
.toolbar select{max-width:240px;min-width:0;padding:9px 24px 9px 10px;min-height:44px;border:1px solid var(--line);border-radius:6px;background:var(--surface);font-size:12px}
.daily-count{color:var(--muted);white-space:nowrap}
.daily-count strong{color:var(--ink);font-weight:500;margin-left:10px;font-variant-numeric:tabular-nums}
.daily-track{display:grid;grid-template-columns:repeat(10,1fr);gap:7px;margin-bottom:28px}
.daily-track button{border:0;border-top:3px solid var(--line);border-radius:0;font-size:11px;color:var(--muted);min-height:36px;padding:7px 0 3px;font-variant-numeric:tabular-nums}
.daily-track button.current{border-color:var(--green);color:var(--green);font-weight:700}
.daily-track button.done{border-color:var(--green);color:var(--green)}
.daily-track svg{width:14px;height:14px}
.exercise-top{display:flex;justify-content:space-between;padding:0 3px 13px;font-size:12px;font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.study-card{background:var(--surface);border-radius:var(--radius);box-shadow:0 9px 35px -19px #48786940;padding:24px 38px 30px;overflow-wrap:anywhere}
.card-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:20px;margin-bottom:22px;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}
.dot{margin:0 7px;color:#bac5cf}
.bookmark{padding:6px 9px;min-height:38px;border:0;font-size:11px;white-space:nowrap}
.bookmark svg{width:17px;height:17px}
.bookmark.active{color:var(--green);background:var(--tint)}
.bookmark.active svg{fill:#cceadb}
.ja,.zh{white-space:pre-wrap}
.scene{margin-bottom:18px}
.context{font-size:15px;line-height:1.95}
.zh{font-size:13px;color:var(--muted);line-height:1.9;margin-top:8px}
.zh.scene{font-weight:400;font-size:15px}
.target{margin:27px 0 22px;background:#edf7ff;padding:19px 22px;border-radius:3px}
.section-label{font-size:11px;color:var(--muted);margin-bottom:10px}
blockquote{margin:0;font-size:21px;font-family:"Hiragino Maru Gothic ProN","Hiragino Sans","Yu Gothic",sans-serif;line-height:1.9}
blockquote .ja:before{content:'「'}
blockquote .ja:after{content:'」'}
.prompt{font-size:16px;font-weight:600;margin-top:24px}
.zh.prompt{font-size:13px;font-weight:400;margin-top:7px}
.choices{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.choices:empty{display:none}
.choice,.example{display:flex;text-align:left;align-items:flex-start;justify-content:flex-start;gap:15px;padding:16px 18px;border:1px solid var(--line);border-radius:7px;line-height:1.8;font-size:15px}
.choice span:nth-child(2){min-width:0}
.choice p{line-height:1.8}
.choice-letter{flex:none;width:26px;height:26px;display:grid;place-items:center;font-size:11px;color:var(--muted);border:1px solid var(--line);border-radius:50%;margin-top:1px}
.choice.selected{background:var(--tint);border-color:var(--green)}
.choice.selected .choice-letter{color:var(--surface);background:var(--green);border-color:var(--green)}
.choice.correct{border-color:var(--green);opacity:1}
.choice.incorrect{border-color:var(--danger);background:#fff0f4;opacity:1}
.choice-feedback{display:block;color:var(--ink);font-size:11px}
.group+.group{border-top:1px solid var(--line);padding-top:30px;margin-top:30px}
.card-actions{margin-top:36px;border-top:1px solid var(--line);padding-top:23px}
.hint{font-size:12px;color:var(--muted);font-weight:400}
.primary{background:var(--green);color:var(--surface);border-color:var(--green);min-height:50px;padding:12px 26px;font-size:14px}
.primary:hover:not(:disabled){background:#396656;color:var(--surface)}
.card-actions>.primary{width:100%;margin-top:15px}
.card-actions>.hint{text-align:center}
.answer{margin-top:34px;padding-top:27px;border-top:1px solid var(--line);scroll-margin-top:24px;outline:0;animation:reveal .25s ease-out}
.answer-heading{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.recommended{padding:20px 0 26px;font-size:23px;font-family:"Hiragino Maru Gothic ProN","Hiragino Sans","Yu Gothic",sans-serif;line-height:1.85;color:var(--green)}
.recommended .zh{font-family:"Hiragino Sans","Yu Gothic",sans-serif;font-size:14px}
.result{font-size:11px;padding:5px 9px;border-radius:4px}
.ok{background:var(--tint);color:var(--green)}
.retry{background:#fff0f4;color:var(--danger)}
.alternative{border-top:1px solid var(--line);padding:22px 0;font-size:16px}
.nuance{font-size:12px;color:var(--muted);margin-top:7px}
.alternative .nuance:first-of-type{margin-bottom:9px}
.explanation,.addenda{border-top:1px solid var(--line);padding-top:25px;margin-top:8px;font-size:14px}
.explanation h3,.addenda h3{margin-bottom:14px}
.addenda{margin-top:25px}
.zh-inline{color:var(--muted);font-size:13px;font-weight:400}
.assessment{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:15px}
.assessment button{font-size:13px}
.assessment button.chosen{background:var(--tint);border-color:var(--green)}
footer{font-size:10px;line-height:1.9;text-align:center;color:var(--muted);margin-top:28px}
.empty{padding:65px 25px;text-align:center;background:var(--surface);border-radius:var(--radius)}
.empty h2{font-size:23px;margin-bottom:15px}
.empty p{font-size:14px;color:var(--muted);margin-bottom:25px}
.empty button{margin:5px}
.empty-mark{margin-bottom:20px}
.empty-mark svg{height:40px;width:40px}
.progress-page{background:var(--surface);border-radius:var(--radius);padding:35px}
.progress-page>h2{font-size:25px;margin-bottom:10px}
.progress-page>p{font-size:13px}
.progress-numbers{display:grid;grid-template-columns:2fr 1fr 1fr;gap:18px;padding:30px 0}
.progress-numbers strong{display:block;font-size:36px;font-weight:500;font-variant-numeric:tabular-nums}
.progress-numbers small{font-size:15px;color:var(--muted)}
.progress-numbers span{font-size:11px;color:var(--muted)}
progress{appearance:none;width:100%;height:5px;border:0;border-radius:0;display:block;background:var(--line);accent-color:var(--green)}
progress::-webkit-progress-bar{background:var(--line)}
progress::-webkit-progress-value{background:var(--green)}
progress::-moz-progress-bar{background:var(--green)}
.progress-page>h3{margin-top:36px;margin-bottom:15px}
.category-row{display:grid;grid-template-columns:150px 1fr 50px 20px;gap:18px;text-align:left;width:100%;border:0;border-top:1px solid var(--line);border-radius:0;padding:16px 0;font-size:12px}
.category-row span:nth-last-child(2){text-align:right;font-variant-numeric:tabular-nums}
.score-note{margin-top:30px;padding-top:25px;border-top:1px solid var(--line)}
.score-note p{font-size:13px;margin-top:10px}
.loading,.load-error{padding:70px;text-align:center}
.load-error button{margin-top:25px}
.storage-warning{background:#fff0f5;padding:15px;font-size:13px;margin-bottom:20px}
@keyframes reveal{from{clip-path:inset(0 0 12%);opacity:.7}
to{clip-path:inset(0);opacity:1}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media(min-width:1450px){main{padding-top:55px}
.study-card{padding:30px 48px 36px}
}
@media(max-width:1100px){.app-shell{grid-template-columns:212px 1fr}
.sidebar{padding:28px 14px}
.brand{font-size:15px;gap:8px}
.nav-item{font-size:12px;padding:13px 10px}
.topbar{padding:0 30px}
main{padding:32px 28px}
.study-card{padding:22px 28px}
.toolbar select{max-width:200px}
}
@media(max-width:760px){.app-shell{display:block}
.sidebar{position:static;height:auto;padding:16px 18px 0;border-right:0;border-bottom:1px solid var(--line)}
.brand{margin:0 0 18px;font-size:16px}
.brand-symbol{height:36px;width:35px;font-size:25px}
.brand small{font-size:9px}
.sidebar nav{flex-direction:row;overflow-x:auto;gap:3px;padding-bottom:10px}
.nav-item{padding:10px 12px;min-height:42px;white-space:nowrap;font-size:11px;gap:7px;flex-shrink:0}
.nav-item svg{width:16px;height:16px}
.sidebar-foot{display:none}
.topbar{height:43px;padding:0 20px;font-size:9px}
.draft{font-size:9px;padding:4px 5px}
main{padding:26px 18px 22px}
.page-heading{gap:10px;margin-bottom:24px;align-items:flex-start}
h1{font-size:24px}
.page-heading p{font-size:11px;max-width:220px;line-height:1.9}
.translation{font-size:10px;padding:8px;gap:5px;min-height:38px}
.switch{width:22px}
.toolbar{gap:10px;margin-bottom:15px;font-size:11px;flex-wrap:wrap}
.toolbar select{font-size:11px;max-width:205px}
.jump-label{width:100%}
.jump-label select{flex:1;max-width:none}
.daily-count{font-size:10px}
.daily-count strong{margin-left:4px}
.daily-track{gap:5px;margin-bottom:22px}
.study-card{padding:18px 20px 24px}
.card-meta{gap:4px;font-size:9px;margin-bottom:22px;padding-bottom:13px}
.dot{margin:0 4px}
.bookmark{font-size:9px;gap:5px;padding:4px 3px}
.bookmark svg{width:15px;height:15px}
h2{font-size:22px}
.context{font-size:14px}
.target{padding:16px;margin-top:23px}
blockquote{font-size:19px}
.prompt{font-size:15px}
.choice,.example{font-size:14px;padding:14px 12px;gap:10px}
.answer-heading{gap:10px}
.recommended{font-size:21px}
.assessment{gap:8px}
.assessment button{font-size:11px;padding:10px 5px;gap:5px}
.assessment svg{width:17px;height:17px}
.progress-page{padding:24px 18px}
.progress-page>h2{font-size:21px}
.progress-numbers{grid-template-columns:1fr 1fr;gap:20px}
.progress-numbers>div:first-child{grid-column:span 2}
.category-row{grid-template-columns:120px 1fr 36px;gap:10px;font-size:11px}
.category-row svg{display:none}
.empty{padding:45px 20px}
.empty h2{font-size:21px}
footer{font-size:9px}
.load-error,.loading{padding:40px 20px}
}


/* Confirmed visual revision: a centered, airy card in three pastel colors. */
:root { --pink:#fbdde7; --blue:#edf7ff; --mint:#e6f6ee; }

.app-shell { display:block; max-width:none; }

.sidebar { position:relative; height:auto; width:min(1160px,100%); margin:auto; padding:24px 28px 16px; flex-direction:row; align-items:center; justify-content:space-between; gap:28px; border:0; background:transparent; }

.brand { margin:0; gap:10px; font-size:16px; white-space:nowrap; }

.brand-symbol { width:44px; height:44px; border-radius:16px; background:var(--pink); color:#755360; font-size:26px; }

.brand small { font-size:10px; letter-spacing:.035em; }

.sidebar nav { flex-direction:row; gap:5px; }

.nav-item { min-height:42px; padding:10px 13px; font-size:12px; border-radius:16px; gap:7px; white-space:nowrap; }

.nav-item.active,.nav-item.active:hover { background:var(--blue); color:#466a88; }

.nav-item:hover:not(:disabled) { background:#f3f8fc; }

.sidebar-foot { display:none; }

.topbar { justify-content:center; height:auto; border:0; padding:0; }

.topbar>span:first-child { display:none; }

.draft { background:transparent; font-size:9px; color:#747482; padding:0; }

main { max-width:790px; padding:20px 24px 28px; }

.page-heading { margin-bottom:12px; gap:16px; }

h1 { font-size:17px; font-weight:600; letter-spacing:0; }

.page-heading p { display:none; }

.translation { border:0; background:var(--mint); border-radius:14px; min-height:36px; padding:8px 12px; font-size:11px; }

.toolbar { margin-bottom:10px; font-size:11px; }

.toolbar select { border:0; background:#f1f6fb; min-height:36px; padding:7px 26px 7px 12px; border-radius:12px; }

.daily-count { font-size:11px; }

.daily-track { display:flex; justify-content:center; gap:10px; margin:3px 0 13px; }

.daily-track button { border:0; border-radius:50%; width:30px; height:30px; min-height:30px; padding:0; font-size:10px; background:#f1f5f9; color:#637083; }

.daily-track button.current { background:var(--pink); color:#795267; }

.daily-track button.done { background:var(--mint); color:#487869; }

.exercise-top { font-size:10px; padding:0 15px 9px; }

.study-card { border-radius:28px; background:#fff; box-shadow:0 14px 55px -19px #abbcce4d,0 5px 20px -12px #eac5d966; padding:26px 38px 28px; }

.card-meta { margin-bottom:25px; padding-bottom:17px; font-size:11px; border-color:#f0f2f6; }

.card-meta>span { background:var(--blue); border-radius:10px; padding:7px 11px; color:#50697e; }

.bookmark { border-radius:12px; min-height:36px; padding:7px 10px; }

.bookmark.active { background:#fff0f5; color:#8b6173; }

.bookmark.active svg { fill:#f7d4e2; }

h2.scene { font-size:27px; letter-spacing:.015em; margin-bottom:14px; }

.context { font-size:15px; line-height:1.95; }

.target { background:var(--blue); padding:23px 24px; border-radius:20px; margin:25px 0 22px; }

.section-label { color:#55718a; font-size:11px; margin-bottom:10px; }

blockquote { font-size:22px; line-height:1.85; font-weight:500; }

.prompt { font-size:16px; margin-top:22px; }

.card-actions { margin-top:25px; padding-top:18px; border-color:#f0f2f6; }

.card-actions>.hint { font-size:11px; }

button { border-radius:16px; }

.primary { background:var(--pink); color:#654657; border:0; min-height:52px; font-weight:600; border-radius:18px; }

.primary:hover:not(:disabled) { background:#f7cddb; color:#654657; }

.card-actions>.primary { margin-top:13px; }

.choice,.example { border-radius:17px; border-color:#e6edf5; padding:17px 20px; }

.choice.selected { background:var(--blue); border-color:#8ab4d4; }

.choice.selected .choice-letter { background:#dceeff; color:#466a88; border-color:transparent; }

.choice.correct { border-color:#79ac97; background:var(--mint); }

.choice.incorrect { border-color:#d7a1b0; background:#fff0f4; }

.choice-letter { border:0; background:#f1f5f9; }

.result { border-radius:12px; padding:6px 12px; }

.recommended { color:#416b5c; font-size:23px; }

.assessment button { border-radius:16px; }

.assessment button.chosen { background:var(--mint); border-color:#add3be; }

.assessment button:hover:not(:disabled) { background:var(--mint); }

.alternative h4 { color:#646d7b; }

.progress-page,.empty { border-radius:28px; box-shadow:0 14px 55px -19px #abbcce4d; }

.progress-numbers>div:first-child strong { color:#548272; }

.category-row { border-radius:0; }

footer { font-size:10px; margin-top:24px; color:#6d7483; }

@media(min-width:1450px) { main { padding-top:24px; }
 .study-card { padding:30px 42px; }
 }

@media(max-width:1100px) { .sidebar { padding:20px; gap:16px; }
 .nav-item { padding:10px; font-size:11px; }
 main { padding:20px 24px; }
 }

@media(max-width:760px) {
 .sidebar { padding:18px 28px 19px; justify-content:flex-start; border-bottom:1px solid var(--line); }

 .brand { font-size:15px; gap:9px; }

 .brand-symbol { width:36px; height:36px; border-radius:13px; font-size:23px; }

 .brand small { font-size:9px; }

 .sidebar nav { position:fixed; z-index:10; bottom:0; left:0; right:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:3px; padding:8px 7px calc(8px + env(safe-area-inset-bottom)); background:#ffffff; border-top:1px solid #edf1f6; overflow:visible; box-shadow:0 -6px 25px -16px #aabbd4; }

 .nav-item { flex-direction:column; gap:5px; min-height:53px; padding:7px 1px; border-radius:14px; font-size:9px; white-space:nowrap; position:relative; }

 .nav-item svg { width:18px; height:18px; }

 .nav-item small { position:absolute; top:4px; right:9px; background:var(--pink); color:#654657; border-radius:8px; font-size:9px; padding:1px 4px; }

 .topbar { padding:0 16px; }

 .draft { font-size:8px; }

 main { padding:18px 16px 100px; }

 h1 { font-size:15px; }

 .page-heading { align-items:center; margin-bottom:10px; }

 .translation { border-radius:12px; min-height:34px; padding:7px 10px; font-size:10px; }

 .toolbar { gap:8px; font-size:10px; margin-bottom:8px; }

 .toolbar select { font-size:10px; max-width:180px; min-height:34px; padding:7px 22px 7px 10px; }

 .jump-label { width:100%; }

 .jump-label select { max-width:none; }

 .daily-count { font-size:10px; }

 .daily-track { gap:7px; margin:4px 0 12px; }

 .daily-track button { width:25px; height:25px; min-height:25px; font-size:9px; }

 .exercise-top { font-size:9px; padding:0 9px 8px; }

 .study-card { padding:20px 22px 24px; border-radius:25px; box-shadow:0 10px 35px -12px #abbcce40; }

 .card-meta { font-size:9px; gap:6px; padding-bottom:14px; margin-bottom:21px; }

 .card-meta>span { padding:7px 8px; border-radius:9px; }

 .bookmark { padding:5px; gap:4px; font-size:9px; }

 .bookmark svg { width:15px; height:15px; }

 h2.scene { font-size:23px; line-height:1.6; }

 .context { font-size:14px; }

 .target { padding:18px; margin:22px 0 19px; border-radius:18px; }

 blockquote { font-size:20px; }

 .prompt { font-size:15px; margin-top:20px; }

 .card-actions { margin-top:23px; padding-top:16px; }

 .card-actions>.hint { font-size:10px; }

 .primary { min-height:50px; font-size:13px; }

 .choice,.example { padding:14px 12px; border-radius:15px; }

 .recommended { font-size:21px; }

 .progress-page,.empty { border-radius:25px; }

 footer { font-size:9px; margin-top:22px; }

}


/* Chinese translations: a consistent pale-yellow reading aid. */
:root { --translation-paper:#fffef5; --translation-ink:#706657; }
.study-card .zh {
 background:var(--translation-paper);
 color:var(--translation-ink);
 border-radius:12px;
 padding:9px 12px;
 margin-top:9px;
 font-family:"PingFang SC","Microsoft YaHei","Hiragino Sans",sans-serif;
 font-weight:400;
 line-height:1.85;
}
.study-card .zh-inline,.section-label [lang="zh-Hans"] {
 background:var(--translation-paper);
 color:var(--translation-ink);
 border-radius:6px;
 padding:2px 5px;
}
.study-card .zh.nuance { font-size:12px; }
@media(max-width:760px) { .study-card .zh { padding:8px 11px; border-radius:11px; } }

/* Optional readings annotate only practice text, never the Chinese translation. */
.reading-controls { display:flex; align-items:center; gap:8px; }
.furigana-toggle { background:var(--blue); border:0; border-radius:14px; min-height:36px; font-size:11px; padding:8px 12px; gap:6px; }
.furigana-toggle strong { font-size:10px; font-weight:500; }
.furigana-toggle[aria-pressed="true"] { background:#dceeff; color:#466a88; }
ruby { ruby-align:center; ruby-position:over; }
rt { font-family:"Hiragino Sans","Yu Gothic",sans-serif; font-size:.52em; font-weight:400; color:#596679; line-height:1.1; }
.ja:has(ruby) { line-height:2.35; }
@media(max-width:760px) { .reading-controls { gap:6px; } .furigana-toggle { padding:7px 9px; border-radius:12px; min-height:34px; font-size:10px; } .page-heading { flex-wrap:wrap; } }

/* Browser-provided Japanese speech, separated from learning actions. */
.new-directions { margin:0 0 22px; }
.new-directions p { font-size:12px; color:#596679; margin:0 0 10px; }
.new-directions p span { margin-left:8px; font-size:11px; }
.new-directions>div { display:flex; flex-wrap:wrap; gap:8px; }
.new-directions button { min-height:40px; padding:9px 13px; font-size:12px; border:0; border-radius:13px; background:#edf7ff; color:#466078; }
.new-directions button:nth-child(3n+2) { background:#fff0f4; color:#795461; }
.new-directions button:nth-child(3n) { background:#eff8f2; color:#476653; }
.new-directions button[aria-pressed="true"] { outline:2px solid currentColor; outline-offset:2px; }
@media(max-width:760px) { .new-directions { margin-bottom:18px; } .new-directions>div { gap:7px; } .new-directions button { min-height:40px; padding:8px 10px; font-size:11px; } }
.speech-tools { margin:0 0 22px; }
.speech-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.speech-actions button { min-height:40px; padding:8px 11px; border:0; background:#edf7ff; color:#466a88; font-size:11px; border-radius:12px; gap:6px; }
.speech-actions button svg { width:16px; height:16px; }
.speech-actions button[data-action="stop-speech"] { background:#f4f5f8; color:#596679; }
.speech-rate,.speech-voice { display:flex; align-items:center; gap:6px; font-size:10px; color:#646d7b; }
.speech-rate { margin-left:auto; }
.speech-tools select { font:inherit; color:#414654; border:1px solid #e8edf2; background:white; padding:7px 9px; border-radius:10px; min-height:36px; max-width:100%; }
.speech-voice { margin-top:9px; }
.speech-voice select { width:190px; min-height:30px; padding:5px 8px; }
.speech-status { font-size:11px; line-height:1.7; color:#646d7b; margin-top:8px; }
.speech-status:empty { display:none; }
@media(max-width:760px) { .speech-actions { gap:6px; } .speech-actions button { padding:8px; font-size:10px; } .speech-rate { gap:4px; } .speech-rate select { padding:7px 5px; } .speech-tools { margin-bottom:20px; } }

/* Flashcard front, answer back, and horizontal deck navigation. */
[hidden] { display:none!important; }
.new-directions { margin:0 0 12px; }
.new-directions>summary { cursor:pointer; width:fit-content; min-height:34px; display:flex; align-items:center; gap:8px; padding:6px 11px; color:#466a88; background:#edf7ff; border-radius:12px; font-size:11px; list-style:none; }
.new-directions>summary::-webkit-details-marker { display:none; }
.new-directions>summary:before { content:"＋"; font-size:15px; }
.new-directions[open]>summary:before { content:"−"; }
.new-directions>summary span { color:#646d7b; font-size:10px; }
.new-directions>div { margin-top:10px; }
.study-card { touch-action:pan-y; min-height:540px; transition:transform .16s ease-out; background:linear-gradient(145deg,#ffe7f2 0%,#fff1e5 38%,#fff8df 62%,#e5ebff 100%); }
.study-card[data-side="back"] { background:linear-gradient(150deg,#e9f6ff 0%,#f4faf6 30%,#fff7e4 66%,#eeebff 100%); }
.card-front,.card-back { min-height:410px; outline:none; }
.card-back { display:flex; flex-direction:column; justify-content:space-between; }
.card-back .answer { border-top:0; margin-top:0; padding-top:8px; animation:reveal .25s ease-out; }
.card-back .recommended { min-height:205px; display:flex; flex-direction:column; justify-content:center; font-size:26px; line-height:1.8; padding:28px 0; }
.card-back .recommended .ja { color:#416b5c; }
.card-back .card-actions { margin-top:26px; }
.answer-details { border-top:1px solid #e8edf2; padding-top:16px; }
.answer-details>summary { cursor:pointer; display:inline-flex; align-items:center; gap:8px; min-height:42px; padding:9px 14px; background:#edf7ff; color:#466a88; border-radius:14px; font-size:12px; font-weight:600; list-style:none; }
.answer-details>summary::-webkit-details-marker { display:none; }
.answer-details>summary:after { content:"＋"; font-size:16px; font-weight:400; }
.answer-details[open]>summary:after { content:"−"; }
.answer-details .alternative:first-of-type { margin-top:18px; }
.flip-back { width:100%; border:0; color:#466a88; background:#edf7ff; margin-top:12px; }
.swipe-hint { text-align:center; color:#798797; font-size:10px; line-height:1.5; margin:-8px 0 18px; }
.gesture-status:empty { display:none; }
.gesture-status { text-align:center; color:#646d7b; font-size:12px; margin:0 0 8px; }
.card-pager { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:10px; margin:20px auto 0; max-width:510px; }
.card-pager button { border:0; background:#edf7ff; color:#466a88; border-radius:16px; min-height:44px; padding:10px 16px; font-size:12px; }
.card-pager button:last-child { background:#e6f6ee; color:#487869; }
.card-pager span { color:#646d7b; font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
@media(max-width:760px) {
 .study-card { min-height:490px; }
 .card-front,.card-back { min-height:360px; }
 .card-back .recommended { min-height:160px; font-size:22px; }
 .swipe-hint { margin:-9px 0 15px; font-size:9px; }
 .card-pager { gap:6px; margin-top:16px; }
 .card-pager button { padding:9px 12px; font-size:11px; }
}
@media(prefers-reduced-motion:reduce) { .study-card { transition:none; } }
