/* Nihongo Garden blue study palette */
:root{--green:#315d83;--ink:#24384b;--muted:#63778a;--line:#dfe7ee;--cream:#f4f7fa;--accent:#c77d68;--soft-green:#e8f0f7;--paper:#fff}
body{background:#f4f7fa;color:#24384b}
aside{background:#fff;border-right-color:#dfe7ee}
.brand,.hero h2,.stat strong,.tile h3{color:#315d83}
.brand>span:first-child{color:#c77d68}
.brand-small{color:#768a9e}
.nav-label,header,.section-title>span{color:#718399}
nav button{color:#586e82}nav button:hover{background:#f0f5f9}nav button.active{background:#e7f0f7;border-color:#d3e1ec;color:#315d83}
#cloud-status{background:#f7fafc;border-color:#dfe7ee;color:#486b89}
.side-note{background:#f0f5f8;border-color:#e0e9ef;color:#6687a0}.side-note h3{color:#2c4b67}.side-note p{color:#687d8f}
main{color:#24384b}header{border-color:#dfe7ee}header b{color:#93a2b0}header button{color:#315d83;border-color:#dfe7ee}
.eyebrow{color:#5e7f9c}.subtitle{color:#687b8d}
.hero{background:linear-gradient(110deg,#e7f0f6 0%,#e7f0f6 58%,#edf3f8 100%);border-color:#d6e3ed;box-shadow:0 8px 24px #2c4b6710}
.hero-copy .pill,.pill{color:#456d8c;background:#ffffffc9}.hero p{color:#536e84}
.primary{background:#315d83;box-shadow:0 2px 4px #20415f18}.primary:hover{background:#264d70}.secondary{border-color:#d8e3ec;background:#fff;color:#315d83}
.srs-home{background:#fff;border-color:#dfe7ee;border-left-color:#5d86a6}.srs-home p{color:#687b8d}
.stat{background:#fff;border-color:#dfe7ee}.stat .icon,.tile .big-icon{background:#edf3f8;color:#4e7697}.stat strong{color:#315d83}.stat small{color:#6d7f90}
.tile{background:#fff;border-color:#dfe7ee}.tile:hover{border-color:#c5d7e5;box-shadow:0 8px 20px #29445d10}.tile:nth-child(n){background:#fff}.tile p{color:#6c7f90}.tile .arrow{color:#456f91}
.panel,.daily{background:#fff;border-color:#dfe7ee}.task-num{border-color:#dce6ee;color:#66849d}.task button{border-color:#d8e3ec;color:#315d83}
.lesson-field{color:#49677f}.lesson-field input,.lesson-field textarea,.lesson-field select,#lesson-filter{border-color:#dce5ed;background:#fff}
footer{border-color:#dfe7ee;color:#8697a6}#toast{background:#315d83}button:focus-visible,a:focus-visible{outline-color:#c77d68}
/* Match the learning tools to the same blue family. */
.srs-home{background:#edf4f8;border-color:#dce8f0}.srs-calendar>div{background:#fff;border-color:#dfe7ee}.srs-calendar span,.srs-calendar small,.srs-due-row small,.srs-session-top span,.srs-prompt{color:#778a9b}.srs-calendar strong,.srs-results strong{color:#315d83}.srs-progress{accent-color:#5b88aa}.srs-progress::-webkit-progress-bar{background:#e4edf3}.srs-progress::-webkit-progress-value{background:#5b88aa}.srs-ratings button{border-color:#d8e5ee;color:#315d83}.srs-ratings .srs-forget{background:#f7ebe7;border-color:#ecd5ce;color:#a86652}.srs-ratings .srs-hard{background:#f7f1e3;border-color:#eadfbf;color:#9a7841}.srs-ratings .srs-good{background:#e7f0f7;border-color:#cfdfeb;color:#3b6b8f}.srs-results span{background:#edf4f8;color:#617d94}.srs-explanation p{color:#708496}.srs-empty{background:#edf4f8;color:#496d89}
.kana-jumps a{color:#426f93;border-color:#d8e5ee;background:#fff}.kana-vowels,.kana-transform small{color:#7d91a2}.kana-transform strong,.kana-compare-cards button{color:#315d83}.kana-explanation{background:#eaf2f8;border-color:#d8e5ee}.kana-explanation.maru{background:#f8f0eb;border-color:#ecddd2}.kana-mark{color:#5d89aa}.kana-pronunciation{background:#edf4f8;color:#5b7891}.kana-compare-cards button{background:#eaf2f8;border-color:#d5e4ee}.kana-compare-cards p,.kana-explanation p{color:#71879a}
.practice-answer{border-color:#cfdfeb;background:#edf4f8}.practice-feedback{border-color:#d4e3ed;background:#eaf2f8}.practice-feedback.retry{background:#f8f0eb;border-color:#ecddd2}.practice-cloze input{border-bottom-color:#6c96b5;background:#f1f6f9}
.listening-prompt{background:#edf4f8;border-color:#d9e7ef}.listening-prompt p,.listening-prompt small{color:#71879a}.listening-prompt .speech-controls button{background:#fff}.listening-transcript{color:#315d83}.listening-transcript small{color:#788ea0}
.speech-controls>span{color:#788da0}.speech-controls button{border-color:#d7e4ed;background:#edf4f8;color:#456f91}.speech-controls button:hover{background:#e3eef5}.speech-controls button:focus-visible{outline-color:#6f97b3}#speech-panel{background:#315d83}
.library-banner{background:#eaf2f8;border-color:#d7e5ee}.library-banner p,.facet-hint,.entry-source{color:#75899a}.classification-fields{background:#f5f8fa;border-color:#dfe7ee}.classification-fields legend{color:#315d83}.facet{color:#657e93}.facet select,.search-box input{background:#fff;border-color:#d9e4ec}.taxonomy-badges span{background:#eaf2f8;color:#416d90}.taxonomy-badges .tag{background:#f7efe9;color:#9b725d}.topic-card{background:#fff}.topic-card small{color:#7d91a2}.topic-card.chosen{background:#e7f0f7;border-color:#9bb8cd}.text-button{color:#8d6e5b}.search-box{color:#657e93}
.bulk-steps{color:#7c91a2}.bulk-format{background:#edf4f8}.bulk-format p,.bulk-check,.bulk-table details,.bulk-save p{color:#657e93}.bulk-check input{accent-color:#315d83}.bulk-table{background:#fff}.bulk-table th{background:#eaf2f8;color:#4c7392}.bulk-table input:not([type=checkbox]),.bulk-table textarea,.bulk-table select{border-color:#dce5ed}.bulk-good{color:#3f7797}.bulk-table td:before{color:#75899a}
#cloud-status{background:#edf4f8;color:#496f8d;border-color:#d7e4ed}.cloud-conflict{border-color:#ead9bc;background:#faf5e9}.cloud-conflict p,.cloud-conflict details{color:#8f775d}
@media(max-width:700px){.hero{background:linear-gradient(110deg,#e7f0f6,#edf3f8)}.srs-home{background:#edf4f8}}

/* Warm study-paper visual direction inspired by Nhai Kanji's focused learning UI. */
:root{--green:#49634a;--ink:#302f29;--muted:#777267;--line:#e6dfd1;--cream:#f5f1e8;--accent:#b77b4a;--soft-green:#e9eddf;--paper:#fffdf8}
body{background:#f5f1e8;color:#302f29}
aside{background:#fffdf8;border-right-color:#e6dfd1}
.brand,.hero h2,.stat strong,.tile h3{color:#49634a}
.brand>span:first-child{color:#b77b4a}
.brand-small,.nav-label,header,.section-title>span{color:#827b6c}
nav button{color:#665f52}
nav button:hover{background:#f4f0e7}
nav button.active{background:#e9eddf;border-color:#d9e0cd;color:#49634a}
#cloud-status{background:#f8f5ed;border-color:#e6dfd1;color:#53684d}
.side-note{background:#f2eee4;border-color:#e5decf;color:#71805e}
.side-note h3{color:#3d5039}.side-note p{color:#777267}
main{color:#302f29}
header{border-color:#e6dfd1}header b{color:#999181}header button{color:#49634a;border-color:#e6dfd1}
.eyebrow{color:#7c725d}.subtitle{color:#777267}
.hero{background:linear-gradient(110deg,#eee9dc 0%,#f2eddf 58%,#e8ebdc 100%);border-color:#e3dbc9;box-shadow:0 8px 24px #4b463812}
.hero-copy .pill,.pill{color:#53684d;background:#fffdf8d9}.hero p{color:#625d50}
.primary{background:#49634a;box-shadow:0 2px 4px #33472c20}.primary:hover{background:#3d543e}
.secondary{border-color:#e2dbce;background:#fffdf8;color:#49634a}
.srs-home{background:#edf0e4;border-color:#dfe4d4;border-left-color:#758755}.srs-home p{color:#6d6a5f}
.stat{background:#fffdf8;border-color:#e6dfd1}.stat .icon,.tile .big-icon{background:#edf0e4;color:#65784d}.stat strong{color:#49634a}.stat small{color:#777267}
.tile{background:#fffdf8;border-color:#e6dfd1}.tile:hover{border-color:#cbd3bc;box-shadow:0 8px 20px #47483212}.tile:nth-child(n){background:#fffdf8}.tile p{color:#777267}.tile .arrow{color:#53684d}
.panel,.daily{background:#fffdf8;border-color:#e6dfd1}.task-num{border-color:#e2dbce;color:#75805d}.task button{border-color:#e2dbce;color:#49634a}
.lesson-field{color:#625d50}.lesson-field input,.lesson-field textarea,.lesson-field select,#lesson-filter{border-color:#e2dbce;background:#fffdf8}
footer{border-color:#e6dfd1;color:#918a7b}#toast{background:#49634a}button:focus-visible,a:focus-visible{outline-color:#b77b4a}
.srs-calendar>div{background:#fffdf8;border-color:#e6dfd1}.srs-calendar span,.srs-calendar small,.srs-due-row small,.srs-session-top span,.srs-prompt{color:#827b6c}
.srs-calendar strong,.srs-results strong{color:#49634a}.srs-progress{accent-color:#758755}.srs-progress::-webkit-progress-bar{background:#e4e4d8}.srs-progress::-webkit-progress-value{background:#758755}
.srs-ratings button{border-color:#e2dbce;color:#49634a}.srs-ratings .srs-good{background:#e9eddf;border-color:#d9e0cd;color:#49634a}
.srs-results span{background:#edf0e4;color:#5e704c}.srs-explanation p{color:#777267}.srs-empty{background:#edf0e4;color:#53684d}
.kana-jumps a{color:#53684d;border-color:#e2dbce;background:#fffdf8}.kana-vowels,.kana-transform small{color:#827b6c}
.kana-transform strong,.kana-compare-cards button{color:#49634a}.kana-explanation{background:#edf0e4;border-color:#dfe4d4}
.kana-mark{color:#758755}.kana-pronunciation{background:#edf0e4;color:#53684d}.kana-compare-cards button{background:#edf0e4;border-color:#dfe4d4}
.practice-answer{border-color:#dfe4d4;background:#edf0e4}.practice-feedback{border-color:#dfe4d4;background:#edf0e4}
.listening-prompt{background:#edf0e4;border-color:#dfe4d4}.listening-prompt p,.listening-prompt small{color:#777267}
.listening-transcript{color:#49634a}.speech-controls button{border-color:#e2dbce;background:#edf0e4;color:#53684d}
.speech-controls button:hover{background:#e5e9d8}#speech-panel{background:#49634a}
.library-banner{background:#edf0e4;border-color:#dfe4d4}.library-banner p,.facet-hint,.entry-source{color:#777267}
.classification-fields{background:#f6f3eb;border-color:#e6dfd1}.classification-fields legend{color:#49634a}
.facet{color:#665f52}.facet select,.search-box input{background:#fffdf8;border-color:#e2dbce}
.taxonomy-badges span{background:#edf0e4;color:#53684d}.topic-card{background:#fffdf8}.topic-card.chosen{background:#e9eddf;border-color:#aebc96}
.bulk-format{background:#edf0e4}.bulk-check,.bulk-table details,.bulk-save p{color:#665f52}.bulk-check input{accent-color:#49634a}
.bulk-table{background:#fffdf8}.bulk-table th{background:#edf0e4;color:#53684d}
#cloud-status{background:#edf0e4;color:#53684d;border-color:#dfe4d4}
.home-search{display:grid;grid-template-columns:minmax(210px,1fr) minmax(180px,1.3fr) auto;align-items:center;gap:16px;margin:22px 0 20px;padding:16px 18px;border:1px solid #e3dbc9;border-radius:18px;background:#fffdf8;box-shadow:0 8px 22px #4748320b}
.home-search label{display:flex;align-items:center;gap:12px;min-width:0}
.home-search-icon{display:grid;place-items:center;width:42px;height:42px;flex:none;border-radius:13px;background:#edf0e4;color:#49634a;font-size:29px;line-height:1}
.home-search-copy{display:grid;gap:3px}.home-search-copy strong{color:#3f4f38;font-size:14px}.home-search-copy small{color:#827b6c;font-size:12px}
.home-search input{width:100%;min-width:0;height:46px;padding:0 14px;border:1px solid #e2dbce;border-radius:12px;background:#faf8f2;color:#302f29;font:inherit;outline:none}
.home-search input:focus{border-color:#82936b;box-shadow:0 0 0 3px #75875520}.home-search input::placeholder{color:#a19a8b}
.home-search .primary{height:46px;white-space:nowrap}.home-search .primary span{margin-left:6px}
@media(max-width:760px){.home-search{grid-template-columns:1fr;gap:12px;margin:16px 0;padding:14px}.home-search input,.home-search .primary{width:100%}}

/* Clear navigation groups on desktop, compact quick links on phones. */
aside{padding:30px 17px 18px}
aside .brand{margin-bottom:28px}
.site-nav{display:grid;gap:15px;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 2px 8px}
.nav-group{display:grid;gap:4px}
.nav-group-label{margin:5px 10px 3px;font-size:9px;line-height:1.5;letter-spacing:1.15px;color:#8a826f;font-weight:700}
.site-nav button{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:8px 10px;border:1px solid transparent;border-radius:10px;background:transparent;text-align:left;color:#665f52;font-size:17px;line-height:1}
.site-nav button span{margin:0;font-size:12px;line-height:1.35}
.site-nav button:hover{background:#f4f0e7}
.site-nav button.active{background:#e9eddf;border-color:#d9e0cd;color:#49634a;font-weight:700}
#cloud-status{flex:none;margin-top:10px}
#mobile-bottom-nav,#mobile-more-menu{display:none}
@media(max-width:700px){
  body{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
  aside{position:relative;width:auto;inset:auto;padding:12px 15px 9px;border:0;border-bottom:1px solid #e6dfd1;box-shadow:none;display:block}
  aside .brand{display:block;margin:0;font-size:20px}
  aside .brand>span:first-child{font-size:25px}
  aside .brand-small{display:inline;font-size:8px;letter-spacing:1.5px;margin:0 0 0 8px}
  .site-nav,.side-note{display:none}
  #cloud-status{margin:8px 0 0;width:auto;min-height:28px;padding:5px 9px;font-size:10px}
  #mobile-bottom-nav{position:fixed;inset:auto 0 0;z-index:80;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:7px 5px calc(7px + env(safe-area-inset-bottom));border-top:1px solid #e6dfd1;background:#fffdf8;box-shadow:0 -5px 18px #302f2910}
  #mobile-bottom-nav button{display:grid;justify-items:center;align-content:center;gap:2px;min-width:0;min-height:45px;padding:3px 2px;border:0;border-radius:10px;background:transparent;color:#777267}
  #mobile-bottom-nav button>span{font-size:19px;line-height:1.1}
  #mobile-bottom-nav button small{font-size:9px;line-height:1.2;white-space:nowrap}
  #mobile-bottom-nav button.active{background:#e9eddf;color:#49634a;font-weight:700}
  #mobile-more-menu:not([hidden]){position:fixed;inset:auto 10px calc(63px + env(safe-area-inset-bottom));z-index:79;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:65vh;overflow-y:auto;padding:12px;border:1px solid #e6dfd1;border-radius:17px;background:#fffdf8;box-shadow:0 10px 35px #302f2924}
  #mobile-more-menu[hidden]{display:none}
  #mobile-more-menu button{display:flex;align-items:center;gap:9px;min-height:44px;padding:9px 10px;border:1px solid #e6dfd1;border-radius:11px;background:#fffdf8;color:#665f52;text-align:left;font-size:17px}
  #mobile-more-menu button span{font-size:11px;line-height:1.35}
  #mobile-more-menu button.active{background:#e9eddf;border-color:#cfd9be;color:#49634a;font-weight:700}
  main{margin:0;padding:0 16px 14px}
  footer{margin-bottom:5px}
}

/* Dark Kana workspace, based on the supplied reference video. */
body,body main{
 --bg:#171a2b;--panel:#0b101c;--text:#edf0f8;--green:#60a5fa;--ink:#edf0f8;--muted:#a3a9bd;--line:#30364b;--border:#30364b;--cream:#171a2b;--paper:#0b101c;--soft-green:#252a43;
 background:#171a2b;color:#edf0f8;color-scheme:dark
}
body aside{background:#101421;border-color:#30364b;color:#d5d9e8}
body nav button,body header{color:#b7bed3}
body nav button.active{background:#2563eb;color:#fff;border-color:#3b82f6}
body header,body .side-note,body #cloud-status{background:#101421;color:#c1c7dc;border-color:#30364b}
body .brand,body .side-note h3{color:#edf0f8}
body .panel,body .kana-compact-board,body .kana-section{background:#0b101c;color:#edf0f8;border-color:#30364b}
body h1,body h2,body h3,body strong{color:#f0f2fa}
body .subtitle,body .facet-hint,body .section-title>span,body .kana-stroke-credit{color:#a3a9bd}
body .tabs{background:#24283d;border:1px solid #30364b}
body .tabs button{background:transparent;color:#aeb5cd;border-color:transparent}
body .tabs button.selected,body .primary{background:#2563eb;color:#fff;border-color:#3b82f6}
body .secondary,body .speech-controls button{background:#20263c;color:#e0e4f5;border-color:#39415b}
body button:hover{filter:brightness(1.14)}
body input,body select{background:#171c2d;color:#edf0f8;border-color:#3b435d}
body label,body summary{color:#d5daec}
body .kana-compact-board [data-kana-detail]{background:#0d1321;color:#f2f3fa;border-color:#20283b}
body .kana-compact-board [data-kana-detail] small{color:#60a5fa}
body .kana-compact-board [data-kana-detail]:hover{background:#172f50;border-color:#3b82f6}
body .kana-board-columns h2,body #kana-combo h2{color:#aeb6ce}
body .stat{background:#141a2b;color:#e7eafa;border-color:#30364b}
body .stat strong{color:#93c5fd}
body .kana-flash-card{background:#172b48;color:#fff;border-color:#2563eb}
body .kana-flash-prompt,body .kana-flash-answer{color:#fff}
body .speech-controls{background:#171c30;border-color:#343c56}
body a{color:#93c5fd}
body #kana-detail-dialog,body #kana-study-dialog{--panel:#14192b;--text:#edf0f8;background:#14192b;color:#edf0f8;border-color:#3b435d}
body dialog h2,body dialog h3{color:#f1f3fb}
body dialog .secondary{background:#252b43;color:#e0e4f5;border-color:#3b435d}
body dialog .primary{background:#2563eb;color:#fff}
body .kana-writing-stage{background:#0b101c;border-color:#3b435d}
body dialog .facet-hint{color:#aeb6ce}
body dialog a{color:#93c5fd}
body .stroke-future{stroke:#b5b9cf55}
body .stroke-current{stroke:#60a5fa99}
body .stroke-done{stroke:#60a5fa}

/* Spacious, consistent alphabet practice controls. */
.kana-workspace #kana-listen-form{
 display:grid;grid-template-columns:minmax(160px,1fr) minmax(200px,1.4fr);
 gap:16px;margin:20px 0;padding:18px;background:#121a2a;
 border:1px solid #2b3b52;border-radius:12px;align-items:end
}
.kana-workspace #kana-listen-form label{
 display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;
 font-size:12px;font-weight:600;line-height:1.4;color:#aebed4
}
.kana-workspace #kana-listen-form select{
 display:block;box-sizing:border-box;width:100%;min-height:46px;
 margin:0;padding:10px 38px 10px 14px;border:1px solid #35465e;
 border-radius:8px;background-color:#1a2538;color:#edf5ff;font:inherit;font-size:14px;
 appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2393b4de' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
 background-position:right 13px center;background-repeat:no-repeat;cursor:pointer
}
.kana-workspace #kana-listen-form select:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}
.kana-workspace #kana-listen-form button{min-height:42px;margin:0;border-radius:8px;font-size:13px}
.kana-workspace button:focus-visible{outline:2px solid #60a5fa;outline-offset:3px}
.kana-workspace .kana-playing{outline-color:#60a5fa!important;background:#2563eb33!important}
.kana-workspace #kana-quiz-area{border-color:#2b3b52}
@media(max-width:600px){.kana-workspace #kana-listen-form{grid-template-columns:minmax(0,1fr);padding:14px;gap:14px}}

.kana-workspace #kana-practice-tools details .lesson-toolbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:16px 0}
.kana-workspace #kana-practice-tools details label{display:flex;gap:8px;align-items:center;color:#aebed4}
.kana-workspace #kana-row-rate{min-width:150px;min-height:42px;padding:9px 14px;border:1px solid #35465e;border-radius:8px;background:#1a2538;color:#edf5ff;font:inherit}
.kana-workspace #kana-practice-tools details button{min-height:42px;padding:9px 16px}
.kana-workspace #kana-row-status{color:#93c5fd;align-self:center}

.kana-workspace #kana-row-rate{
 appearance:none;min-height:46px;padding:10px 38px 10px 14px;border:1px solid #35465e;border-radius:8px;
 background-color:#1a2538;color:#edf5ff;font-size:14px;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2393b4de' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
 background-position:right 13px center;background-repeat:no-repeat;cursor:pointer
}
.kana-workspace #kana-practice-tools details label:has(#kana-row-rate){flex-direction:column;align-items:stretch;font-size:12px;font-weight:600;line-height:1.4}
.kana-letter-picker{padding:14px;border:1px solid #2b3b52;border-radius:12px;background:#121a2a}
.kana-letter-picker p{font-size:13px;color:#aebed4}
#kana-pick-letters{display:grid;grid-template-columns:repeat(auto-fill,minmax(75px,1fr));gap:8px;max-height:280px;overflow:auto}
.kana-workspace #kana-practice-tools .kana-letter-option{display:grid;grid-template-columns:auto 1fr;gap:3px 6px;align-items:center;padding:8px;border:1px solid #35465e;border-radius:8px;cursor:pointer;background:#1a2538}
.kana-letter-option:has(input:checked){border-color:#60a5fa!important}
.kana-letter-option input{width:16px;height:16px;margin:0;accent-color:#3b82f6}
.kana-letter-option span{font-size:22px;color:#edf5ff}
.kana-letter-option small{grid-column:2;font-size:10px;color:#93b4de}

/* Shared dark blue palette and typography across every workspace. */
:root{
 --bg:#171a2b;--panel:#0b101c;--text:#edf0f8;--green:#60a5fa;--ink:#edf0f8;
 --muted:#a3a9bd;--line:#30364b;--border:#30364b;--cream:#171a2b;
 --paper:#0b101c;--soft-green:#202b42;--accent:#60a5fa
}
body{font-family:'DM Sans','Noto Sans JP','Yu Gothic','Meiryo','Segoe UI',sans-serif;background:var(--bg);color:var(--text);color-scheme:dark}
body button,body input,body select,body textarea{font:inherit}
body h1,body h2,body h3,body h4{font-family:inherit;color:#f0f2fa}
body .hero{background:linear-gradient(120deg,#16263f,#152039);border-color:#303f59}
body .hero h2,body .tile h3,body .brand{color:#edf0f8}
body .hero p,body .tile p,body .side-note p,body .brand-small{color:#aebbd0}
body :is(.panel,.daily,.stat,.tile,.topic-card,.srs-home,.course-unit,.course-level,.course-summary,.schedule-day,.kanji-card,.achievement-grid>*,.study-focus,.dialogue-model,.dialogue-prompt,.lesson-audio){
 background:#0b101c;color:#edf0f8;border-color:#30364b
}
body .tile:nth-child(n){background:#0b101c}
body :is(.pill,.stat .icon,.tile .big-icon,.library-banner,.classification-fields,.taxonomy-badges span,.srs-results span,.srs-empty,.bulk-format,.course-number,.learning-field-group,.learning-readout,.kanji-readout,.kanji-mnemonic){
 background:#1c2940;color:#b8d9ff;border-color:#344661
}
body :is(.subtitle,.facet-hint,.entry-source,.eyebrow,.facet,.search-box,.lesson-field,.study-focus p,.course-status,.nav-label,footer,.stat small,.topic-card small,.srs-calendar span,.srs-calendar small,.srs-due-row small,.srs-session-top span,.srs-prompt){color:#a3afc5}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea){
 background-color:#1a2538;color:#edf5ff;border-color:#35465e;border-radius:8px
}
body :is(input,textarea)::placeholder{color:#8898af;opacity:1}
body :is(input[type=checkbox],input[type=radio],progress){accent-color:#3b82f6}
body .tabs{background:#24283d;border-color:#30364b}
body .tabs button{background:transparent;color:#aeb5cd}
body :is(.tabs button.selected,.primary,nav button.active){background:#2563eb;color:white;border-color:#3b82f6}
body .primary:hover{background:#1d4ed8}
body :is(.secondary,.task button,.speech-controls button,.srs-ratings button){background:#202c42;color:#dceaff;border-color:#394b66}
body :is(.secondary,.speech-controls button):hover{background:#2b3e5a}
body .text-button,body a{color:#93c5fd}
body :is(.srs-calendar>div,.bulk-table,.bulk-table td,.schedule-form){background:#111a2b;color:#dfe8f7;border-color:#30364b}
body :is(.bulk-table th,th){background:#202b42;color:#c6ddfa;border-color:#35465e}
body td{border-color:#30364b}
body :is(.practice-answer,.practice-feedback,.listening-prompt,.speech-controls,.kana-pronunciation,.kana-explanation){background:#18273d;color:#daeaff;border-color:#344a66}
body :is(.practice-feedback.retry,.srs-ratings .srs-hard,.cloud-conflict){background:#352c1b;color:#f5d995;border-color:#75603b}
body .srs-ratings .srs-forget{background:#361e2b;color:#ffc3ca;border-color:#754050}
body :is(.srs-ratings .srs-good,.practice-feedback.correct){background:#17362e;color:#a8eed0;border-color:#316c59}
body :is(.topic-card.chosen,.course-unit.completed,.schedule-day.today){border-color:#60a5fa;background:#152b46}
body :is(.flash,.memory-card,.game-card){background:#172b48;color:#edf5ff;border-color:#3d5e89}
body dialog{background:#14192b;color:#edf0f8;border-color:#3b435d}
body dialog::backdrop{background:#070d1bbd}
body #mobile-more-menu,body #bottom-nav{background:#101421;border-color:#30364b;color:#c5d4e9}
body #toast,body #speech-panel{background:#203e68;color:#edf5ff;border-color:#476995}
body button:focus-visible,body a:focus-visible,body input:focus-visible,body select:focus-visible,body textarea:focus-visible{outline:2px solid #60a5fa;outline-offset:3px}

/* Separate memory rating labels from their review intervals. */
body .kana-flash-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:stretch}
body .kana-flash-actions button[data-kana-flash-grade]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-width:125px;min-height:66px;padding:12px 18px;border:1px solid #394b66;border-radius:10px;font-family:inherit;line-height:1.3;white-space:normal}
body .kana-flash-actions button[data-kana-flash-grade] strong{display:block;font:600 15px/1.3 'DM Sans','Segoe UI',sans-serif;color:inherit}
body .kana-flash-actions button[data-kana-flash-grade] small{display:block;font:400 12px/1.4 'DM Sans','Segoe UI',sans-serif;color:inherit;opacity:.85}
body .kana-flash-actions .srs-forget{background:#361e2b;color:#ffc3ca;border-color:#754050}
body .kana-flash-actions .srs-hard{background:#352c1b;color:#f5d995;border-color:#75603b}
body .kana-flash-actions .primary{background:#2563eb;color:#fff}
body .kana-flash-session .kana-flash-card,body .kana-flash-session .kana-flash-card.revealed{background:#172b48;color:#edf5ff;border:1px solid #3d5e89}
body .kana-flash-session .kana-flash-prompt{color:#fff}
body .kana-flash-session .kana-flash-answer{color:#93c5fd}
body .kana-flash-session .kana-flash-card small{color:#b4c5df}

body select#lesson-filter,body select#lesson-filter option{background:#1a2538;color:#edf5ff}
body select#lesson-filter{min-height:44px;padding:10px 14px;border:1px solid #49617e;border-radius:8px}
.diary-daily-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0}
.diary-daily-items{display:grid;gap:8px;margin-top:14px;max-height:320px;overflow:auto}
.diary-daily-item{display:flex;flex-direction:column;gap:5px;align-items:flex-start;text-align:left;padding:12px;border:1px solid #35465e;border-radius:8px;background:#162238;color:#edf5ff;overflow-wrap:anywhere}
.diary-daily-item span{font-size:13px;color:#aebed4}
.diary-daily-item:hover{border-color:#60a5fa}
@media(max-width:700px){.diary-daily-sections{grid-template-columns:minmax(0,1fr)}}

body .course-level .course-unit.learning{background:#162d49;border-color:#4e94e8;box-shadow:inset 3px 0 #60a5fa}
body .course-level .course-unit.learning h3{color:#edf5ff}
body .course-level .course-unit.learning p{color:#b2c9e4}
body .course-level .course-unit.learning .course-status{background:#234b76;color:#c9e5ff}
body .course-level .course-unit.learning .course-number{background:#203e62;color:#a5d2ff}

/* Long journal titles stay within their Day card, including unspaced text. */
body .course-units{min-width:0}
body .course-level .course-unit{min-width:0;max-width:100%}
body .course-level .course-unit h3{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.5}
body .course-level .course-unit p,body .course-level .course-unit small{overflow-wrap:anywhere}
/* Listening quiz: reference layout, using the site's blue palette. */
body .kana-practice-tools h2{font-size:16px;letter-spacing:.04em;margin-bottom:20px}
body .kana-listen-setup[hidden]{display:none}
body .kana-listen-setup p{color:#a5aec1;font-size:14px;line-height:1.7}
body .kana-listen-setup fieldset{border:0;padding:0;margin:20px 0;display:flex;gap:8px;flex-wrap:wrap}
body .kana-listen-setup legend{margin-bottom:10px;font-weight:600}
body .kana-listen-setup label{position:relative;cursor:pointer}
body .kana-listen-setup input[type=radio]{position:absolute;opacity:0;width:1px;height:1px}
body .kana-listen-setup label span{display:block;padding:10px 16px;border-radius:8px;background:#202637;color:#bdc7db;border:1px solid #343e54}
body .kana-listen-setup input:checked+span{background:#2563eb;border-color:#4386ff;color:#fff}
body .kana-listen-setup input:focus-visible+span{outline:2px solid #96c2ff;outline-offset:3px}
body .kana-quiz-meta{display:flex;justify-content:space-between;gap:12px;color:#a6b1c7;font-size:13px}
body .kana-change-board{border:0;background:none;padding:4px;color:#72a8ff;cursor:pointer}
body #kana-quiz-area progress{display:block;width:100%;height:7px;margin:12px 0 24px;accent-color:#387aff}
body .kana-quiz-layout{display:grid;grid-template-columns:minmax(190px,31%) minmax(0,1fr);gap:24px}
body .kana-listening-card{background:#2563eb;border:1px solid #4c8aff;border-radius:9px;min-height:270px;text-align:center;padding:24px 16px;display:flex;align-items:center;flex-direction:column;justify-content:space-between;color:white}
body .kana-listening-card strong{font-size:11px;background:#0b152c;border-radius:20px;padding:4px 12px;color:white}
body .kana-headphones{font-size:64px;line-height:1.1;color:white}
body .kana-listening-card p{font-size:13px;line-height:1.6;color:white;margin:16px 0}
body .kana-listening-card button{width:48px;height:48px;border-radius:50%;border:0;background:#0b152c;color:white;font-size:22px;cursor:pointer}
body .kana-answer-panel{min-width:0}
body .kana-answer-panel h3{font-size:14px;margin:0 0 8px}
body .kana-shortcut-hint{font-size:12px;color:#8e9bb4;margin:0 0 16px}
body .kana-answer-panel .kana-quiz-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body .kana-answer-panel .kana-quiz-choices button{display:flex;align-items:center;gap:14px;min-height:72px;text-align:left;border-radius:7px;background:#0d1422;border:1px solid #303b51;padding:12px 16px;color:#edf2ff;font-size:30px;opacity:1;white-space:normal}
body .kana-quiz-choices button small{font-size:13px;color:#97a8c6;background:#1c2638;min-width:24px;text-align:center;border-radius:4px}
body .kana-quiz-choices button:hover:not(:disabled){background:#222e43;border-color:#6288c5}
body .kana-answer-panel .kana-quiz-choices .kana-answer-correct{background:#06251f;border-color:#32bd8e;color:#b5ffe1}
body .kana-answer-panel .kana-quiz-choices .kana-answer-wrong{background:#2b101c;border-color:#e3617c;color:#ffd6de}
body .kana-answer-panel .kana-quiz-choices .kana-answer-muted{opacity:.4}
body .kana-answer-feedback{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
body .kana-answer-feedback b{font-size:26px}body .kana-answer-feedback small{color:#a1aec5}
body .kana-quiz-stats{display:flex;gap:16px;flex-wrap:wrap;border-top:1px solid #2a3347;padding-top:18px;margin-top:20px;font-size:13px}
body .kana-quiz-stats span:first-child{color:#48d6a1}body .kana-quiz-stats span:nth-child(2){color:#ff7b93}
body .kana-quiz-result{padding:20px 0}
@media(max-width:650px){body .kana-quiz-layout{grid-template-columns:1fr;gap:18px}body .kana-listening-card{min-height:210px}body .kana-answer-panel .kana-quiz-choices button{padding:12px;gap:10px}body .kana-quiz-meta{flex-wrap:wrap}}
body #japanese-voice-dialog{width:min(540px,94vw);max-height:90vh;overflow:auto;box-sizing:border-box;padding:25px;border:1px solid #45658d;border-radius:14px;background:#111e33;color:#edf4ff}
body #japanese-voice-dialog::backdrop{background:#000a}
body #japanese-voice-dialog label{display:grid;gap:9px;margin:18px 0;font-size:14px;color:#bed3f0}
body #japanese-voice-dialog select,body #japanese-voice-dialog textarea{box-sizing:border-box;width:100%;padding:12px;background:#0a1425;border:1px solid #45658d;border-radius:8px;color:#edf4ff;font:inherit}
body #japanese-voice-dialog p{font-size:13px;line-height:1.7;color:#a8c0df}
body #japanese-voice-dialog h2{font-size:20px;margin:0}
body #japanese-voice-dialog .lesson-toolbar{gap:8px;flex-wrap:wrap}
body .header-actions{flex-wrap:wrap}
