/* One icon size and stroke system across desktop, tablet and phone. */
.brand-mark,.auth-logo{border-radius:12px}.buddy-stage.bg-night:before{content:"";width:180px;height:24px;background:url('assets/icons/scene-stars.svg') center/contain no-repeat}.buddy-stage.bg-cafe:before{content:"";width:24px;height:24px;background:url('assets/icons/scene-coffee.svg') center/contain no-repeat}
.lb-icon{display:inline-block;width:18px;height:18px;min-width:18px;max-width:24px;flex:0 0 auto;vertical-align:-.2em;color:currentColor;overflow:visible;stroke-width:1.75}.lb-icon+span{vertical-align:middle}.btn .lb-icon,.round-btn .lb-icon,.text-btn .lb-icon{width:17px;height:17px;min-width:17px;margin-right:4px}.btn .lb-icon:only-child,.round-btn .lb-icon:only-child{margin:0}.nav-item .lb-icon,.mobile-nav .lb-icon{width:21px;height:21px;min-width:21px}.side-nav svg{stroke-width:1.75}.card-top .lb-icon,.tag .lb-icon,.new-badge .lb-icon{width:16px;height:16px;min-width:16px}.empty-icon .lb-icon,.ai-spark .lb-icon,.class-hero>span>.lb-icon,.stat-icon .lb-icon,.folder-icon .lb-icon,.resource-icon .lb-icon{width:24px;height:24px;min-width:24px}.appearance-choice-icon .lb-icon{width:18px;height:18px}.pron .lb-icon,.focus-pron .lb-icon{width:16px;height:16px;margin-right:4px}.fav .lb-icon{width:19px;height:19px}.fav.on .lb-icon{fill:currentColor;fill-opacity:.15}.reward-icon .lb-icon,.achievement-icon .lb-icon,.reward-card .lb-icon,.more-grid .lb-icon{width:22px;height:22px;min-width:22px}.coin-icon .lb-icon{color:var(--warn)}.mobile-nav button span:has(>.lb-icon){display:flex;align-items:center;justify-content:center}.mobile-nav button span .lb-icon{font-size:inherit}.buddy-notes .lb-icon,.buddy-spark .lb-icon{width:20px;height:20px}.source-language-toggle .lb-icon{width:16px;height:16px}.class-hero>span,.ai-spark,.empty-icon{font-size:24px}.folder-icon,.resource-icon{width:44px;height:44px;border-radius:12px}.close-btn,.focus-close{display:inline-flex;align-items:center;justify-content:center}.lofi-controls{border:1px solid var(--line);border-radius:16px;padding:12px 16px;margin-bottom:16px}.topbar .coin-pill .lb-icon{color:var(--warn)}
.library-main-toolbar{align-items:flex-end;gap:12px}.library-quick-search{min-width:250px;flex:1 1 350px}.quick-search-label{font-size:12px;font-weight:650;display:block;margin-bottom:7px;color:var(--accent2)}.library-quick-search>input{padding-left:42px;padding-right:40px;height:46px}.library-quick-search>.lb-icon{position:absolute;left:14px;bottom:14px;color:var(--muted);pointer-events:none}.library-quick-search .search-clear{position:absolute;right:8px;bottom:7px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted)}.library-quick-search .search-clear:hover{background:var(--panel3);color:var(--text)}.library-quick-search .search-clear.hidden{display:none}.library-quick-search input::-webkit-search-cancel-button{display:none}.library-search-summary{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin:-5px 0 20px}.library-search-summary>span{color:var(--accent2)}
.natural-speech{border-top:1px solid #3e2b50;margin-top:16px;padding-top:10px}.natural-toggle{border:0;background:transparent;color:#c7acf3;display:flex;align-items:center;gap:9px;width:100%;text-align:left;padding:6px 0;font:inherit;font-size:12px;font-weight:650;cursor:pointer}.natural-toggle>span{flex:1}.natural-toggle small{font-size:9px;border:1px solid #5b4078;border-radius:5px;padding:2px 5px;margin-left:5px;letter-spacing:.6px;color:#baa5d1}.natural-toggle>.lb-icon:last-child{width:15px;height:15px;min-width:15px}.natural-panel{border:1px solid #4c3564;background:linear-gradient(130deg,#281933,#1a1126);border-radius:13px;padding:15px;margin-top:10px}.natural-label{margin:0 0 8px;font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#baa3d4}.natural-guide{font-size:18px;line-height:1.55;color:#e9d9ff;margin:0 0 10px;overflow-wrap:anywhere}.natural-notes,.natural-intro{font-size:12px;line-height:1.65;color:#b7a6c9;margin:0 0 12px}.natural-audio{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.natural-audio>.text-btn{margin-left:auto;font-size:11px}.natural-hint{display:block;margin-top:10px;font-size:10px;line-height:1.5;color:#a391b7}.natural-stale{font-size:12px;color:var(--warn)}.natural-generate{display:inline-flex;align-items:center;gap:6px}.natural-generate:disabled .lb-icon{opacity:.65}.natural-form{border:1px solid var(--line);border-radius:14px;padding:16px;background:#191020}.natural-form>small{display:block;color:var(--muted);font-size:11px;margin:7px 0 12px}.natural-form textarea{line-height:1.6}.natural-form .form-error{font-size:12px}.focus-content .natural-speech{text-align:left;max-width:700px;margin:20px auto 0}.focus-content .natural-guide{font-size:22px}.hide-pron .natural-guide{visibility:visible}.new-badge:before{content:none!important}
@media(max-width:700px){.library-quick-search{min-width:0;flex-basis:100%;width:100%}.library-main-toolbar .filter-select{min-width:0}.natural-panel{padding:13px}.natural-guide{font-size:17px}.focus-content .natural-guide{font-size:20px}.natural-audio .btn{padding:8px 10px}.natural-audio>.text-btn{margin-left:0}.lofi-controls{padding:12px}.library-search-summary{font-size:10px}.quick-search-label{font-size:11px}.card-actions .round-btn{font-size:11px}.natural-form{padding:13px}}

.folder-icon-picker{display:flex;gap:8px;flex-wrap:wrap}.folder-icon-choice{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--muted)}.folder-icon-choice[aria-pressed="true"]{color:#eee4ff;border-color:var(--accent);background:#372344}.folder-icon-choice .lb-icon,.appearance-icon .lb-icon{width:18px;height:18px;min-width:18px}

.natural-batch-notice{padding:16px 18px;margin:12px 0;border:1px solid var(--border,#49385d);border-radius:14px;background:var(--panel,#181225);color:var(--text,#eee8f7);line-height:1.65;font-size:.9rem;overflow-wrap:anywhere}
.natural-batch-notice strong{display:block;color:var(--text,#eee8f7)}
.natural-pending-note{font-size:.82rem;line-height:1.6;color:var(--muted,#b9accd)}
.natural-pending-label{margin-left:8px}

.translator-source{padding:14px;border-radius:12px;background:var(--panel);border:1px solid var(--line,#49385d);overflow-wrap:anywhere}.vocab-selection{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.vocab-group h3{margin:20px 0 10px}.translator-vocab-row{display:flex;align-items:flex-start;gap:14px;padding:14px;margin:8px 0;border:1px solid var(--line,#49385d);border-radius:14px;cursor:pointer}.translator-vocab-row input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;margin:4px 0;accent-color:#a77bed}.translator-vocab-row>span{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.translator-vocab-row.already{opacity:.68;cursor:default}.vocab-added{color:#81d9ba}.source-language-toggle input[type=radio]{width:20px;height:20px;flex:0 0 20px;accent-color:#a77bed}.source-language-toggle label{display:flex;align-items:center;gap:8px}#translatorVocab .form-actions{position:sticky;bottom:0;background:var(--panel,#181225);padding-top:14px;z-index:1}

#translatorVocab .translator-source,#translatorSentencePrepare .translator-source{font-size:14px;line-height:1.6;color:var(--text)}

/* Content maintenance, language-specific voices and licensed music. */
.voice-pickers,.voice-locales{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}.language-voice{display:flex;flex-wrap:wrap;align-items:end;gap:9px;padding:14px;border:1px solid var(--line);border-radius:16px;background:rgba(133,84,200,.07);min-width:0}.language-voice label{flex:1 1 220px;min-width:0}.language-voice select{display:block;width:100%;margin-top:8px}.language-voice small{flex-basis:100%;color:var(--muted);line-height:1.5}.audio-sliders label{display:block;min-width:0}.audio-sliders output{font-weight:700}.quick-voices{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:14px}.quick-voices summary{cursor:pointer;display:flex;align-items:center;gap:8px;color:var(--text);font-weight:600}.quick-voices .voice-pickers{grid-template-columns:1fr}.focus-voice-access{margin-top:15px;font-size:14px}.content-pending{padding:10px 0;display:flex;flex-wrap:wrap;gap:10px;color:var(--muted);font-size:13px}.audit-list article{overflow-wrap:anywhere}.study-music{padding:20px;margin-bottom:20px;border:1px solid rgba(212,184,255,.25);border-radius:24px;background:radial-gradient(ellipse at 100% 0,rgba(129,100,205,.18),transparent 65%),var(--glass-surface);box-shadow:var(--glass-highlight);display:grid;gap:16px;min-width:0}.study-music-heading{display:flex;align-items:center;gap:14px}.study-music-heading>.lb-icon{width:32px;height:32px;color:#c5a3ff}.study-music-heading small{display:block;color:var(--muted);margin-top:5px}.study-music>label select{margin-top:7px;width:100%}.music-transport{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.music-transport .lofi-toggle{flex:1;min-width:150px}.music-transport>.btn:not(.lofi-toggle){padding:10px;min-width:42px}.music-progress-row{display:flex;align-items:center;gap:14px}.music-progress-row>span{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);font-size:13px}.music-progress-row input{min-width:0;flex:1}.music-preferences{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.music-preferences>label:first-child{flex:1;min-width:160px}.music-check{display:flex;gap:8px;align-items:center;font-size:13px}.music-check input{width:18px;height:18px;accent-color:#ae7bff}.music-status{margin:0;color:#ff95ac}.music-status:empty{display:none}.study-music small,.music-credits{font-size:12px;color:var(--muted);line-height:1.7}.study-music a{color:#c5a3ff}.music-credits summary{cursor:pointer}.music-credits p{margin:8px 0}.study-music input[type=range]{accent-color:#a276eb}.study-music .lb-icon{flex-shrink:0}.quick-voices select{max-width:100%}#contentAuditProgress{font-size:14px;color:#b7a1d8}
@media(max-width:620px){.voice-pickers,.voice-locales{grid-template-columns:1fr}.study-music{padding:14px}.language-voice{padding:11px}.music-preferences{gap:12px}.music-transport{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:6px}.music-transport .lofi-toggle{font-size:13px;min-width:0;padding:10px 6px;line-height:1.4}.music-transport>.btn:not(.lofi-toggle){min-width:44px;min-height:44px;padding:10px}.music-progress-row{gap:8px}.focus-voice-access .quick-voices{padding:8px}}

.audio-sliders input[type=range],.voice-pickers input[type=range]{accent-color:#a276eb}

/* Repetition controls share the full available track width. */
.repeat-panel input[type=range]{box-sizing:border-box;display:block;width:100%;max-width:none;padding:0;margin:14px 0;border:0}
.repeat-speed-slider{--range-progress:100%;appearance:none;height:44px;min-height:44px;background:transparent}
.repeat-speed-slider::-webkit-slider-runnable-track{height:7px;border-radius:10px;background:linear-gradient(to right,var(--accent) 0 var(--range-progress),var(--line) var(--range-progress) 100%)}
.repeat-speed-slider::-moz-range-track{height:7px;border-radius:10px;background:linear-gradient(to right,var(--accent) 0 var(--range-progress),var(--line) var(--range-progress) 100%)}
.repeat-speed-slider::-webkit-slider-thumb{appearance:none;width:22px;height:22px;margin-top:-7.5px;border:2px solid var(--accent2);border-radius:50%;background:var(--accent)}
.repeat-speed-slider::-moz-range-thumb{width:20px;height:20px;border:2px solid var(--accent2);border-radius:50%;background:var(--accent)}
.repeat-speed-scale{display:flex;justify-content:space-between;gap:12px}.repeat-speed-scale span:last-child{text-align:right}
.repeat-loop-option{display:flex;align-items:center;gap:10px;min-height:48px;margin:12px 0}.repeat-loop-option input{width:20px;height:20px;margin:0}
.repeat-pause-control{display:block;margin:24px 0}.repeat-pause-control output{display:block;margin-top:8px;color:var(--accent2)}
.repeat-panel input:disabled,.repeat-panel button:disabled{opacity:.45}
.rest-library-details{border-top:1px solid var(--line);padding-top:20px;margin-top:22px}.rest-library-details summary{cursor:pointer;font-weight:600}.rest-sentence-row{display:flex;gap:14px;justify-content:space-between;align-items:center;padding:18px 0;border-bottom:1px solid var(--line)}.rest-sentence-row p,.book-sentence-row p{line-height:1.65;margin:5px 0}.rest-sentence-row small{display:block;line-height:1.6;color:var(--muted)}.rest-sentence-row>.btn{flex-shrink:0}.book-selection-bar,.book-batch-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:20px 0}.book-sentence-row{display:flex;gap:15px;padding:20px 0;border-bottom:1px solid var(--line)}.book-sentence-row input{width:21px;height:21px;flex-shrink:0;margin-top:6px;accent-color:var(--accent)}.book-sentence-row .english{font-size:19px}@media(max-width:550px){.rest-sentence-row{display:block}.rest-sentence-row>.btn{margin-top:12px}.book-batch-actions .btn{flex:1;font-size:12px}.book-batch-actions .primary{flex-basis:100%}}
.fundamentals-banner{margin:20px 0;display:flex;align-items:center;justify-content:space-between;gap:20px}.fundamentals-banner>div{display:flex;gap:18px;align-items:center}.fundamentals-banner .lb-icon{width:32px;height:32px;flex-shrink:0;color:var(--accent2)}.fundamentals-banner b{font-size:22px}.fundamentals-banner small{color:var(--muted)}.fundamental-guide{max-width:850px;margin:20px auto;line-height:1.75}.fundamental-guide section{margin:25px 0}.fundamental-guide h3{color:var(--accent2);font-size:18px;margin-bottom:10px}.fundamental-guide .english{font-size:20px;color:var(--text)}.fundamental-example{border-left:3px solid var(--accent);padding:10px 18px;margin:16px 0;background:rgba(145,80,210,.06);border-radius:0 10px 10px 0}.fundamental-example p{margin:4px 0}.fundamental-example p:not(.english){color:var(--muted)}.fundamental-two{display:grid;grid-template-columns:1fr 1fr;gap:24px}.fundamental-practice{border:1px solid var(--line);border-radius:18px;padding:20px}.fundamental-practice input{display:block;width:100%;margin:14px 0}.fundamental-practice details{margin-top:15px}.fundamental-expand{border-top:1px solid var(--line);padding-top:24px}.fundamental-expand summary{cursor:pointer;font-weight:600}@media(max-width:650px){.fundamentals-banner{align-items:start;flex-direction:column}.fundamentals-banner b{font-size:19px}.fundamental-two{grid-template-columns:1fr;gap:0}.fundamental-guide .english{font-size:18px}}
.ai-work{position:fixed;z-index:150;right:20px;bottom:100px;display:flex;align-items:center;gap:16px;max-width:calc(100vw - 32px);padding:12px 16px;background:#241933;border:1px solid #7754a0;border-radius:16px;box-shadow:0 8px 30px #0005}.ai-work.hidden{display:none}.local-ai-facts{display:grid;grid-template-columns:1fr 1.5fr;gap:10px}.local-ai-facts dd{margin:0}.natural-voice-setup{margin-top:24px;border-top:1px solid #49385e;padding-top:16px}.dictation-actions,.conversation-help-choices{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.conversation-ai{margin-top:20px}.conversation-ai-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.conversation-ai textarea{width:100%;margin-bottom:12px}.conversation-correction,.conversation-answer{padding:18px;border:1px solid #45335c;border-radius:16px;margin:14px 0;background:#151021}.conversation-answer .english{font-size:1.15rem}.conversation-answer small{color:#bcabd0}.conversation-answer .form-actions{justify-content:flex-start}.conversation-answer-list{display:grid;gap:8px}@media(max-width:600px){.conversation-ai-options{grid-template-columns:1fr}.local-ai-facts{grid-template-columns:1fr}.local-ai-facts dd{margin-bottom:8px}.ai-work{right:12px;bottom:88px}.conversation-answer{padding:14px}.conversation-help-choices .btn{flex:1 1 45%}}

.conversation-ai>small.muted{display:block;margin-top:14px;line-height:1.6}
#naturalVoiceConfig .check-row{display:flex;align-items:center;gap:12px;margin:18px 0;cursor:pointer}
#naturalVoiceConfig .check-row input[type=checkbox]{width:22px;height:22px;min-height:22px;flex:0 0 22px;margin:0;padding:0;accent-color:#a77bed}
#naturalConfigError,#naturalConfigStatus{overflow-wrap:anywhere}

/* Library filters are grid items: they must not inherit the old flex width:0. */
.library-main-toolbar{display:grid;grid-template-columns:minmax(200px,1fr) minmax(150px,200px) minmax(150px,180px) auto;align-items:end;gap:12px}
.library-main-toolbar .library-quick-search{min-width:0;width:100%;grid-column:auto}
.library-main-toolbar .library-filter{display:grid;gap:7px;min-width:0;margin:0;font-size:12px;font-weight:650;color:var(--accent2)}
.library-main-toolbar .library-filter select{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:46px;margin:0;flex:none;text-overflow:ellipsis}
.library-main-toolbar>.btn.primary{grid-column:auto;min-height:46px}
@media(max-width:900px){
  .library-main-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .library-main-toolbar .library-quick-search,.library-main-toolbar>.btn.primary{grid-column:1/-1}
}
@media(max-width:700px){
  .library-main-toolbar .library-filter,.library-main-toolbar .quick-search-label{font-size:12px}
  .library-main-toolbar .library-filter select,.library-main-toolbar .library-quick-search>input{font-size:16px}
}

/* The current repetition form uses repeat-lang-*; keep its checkboxes compact. */
.repeat-lang-box{margin:20px 0;text-align:left}
.repeat-lang-box>.muted{font-size:12px;margin:7px 0 12px}
.repeat-lang-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.repeat-lang-option{display:flex;align-items:center;gap:10px;min-width:0;min-height:48px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel3);font-size:14px;cursor:pointer}
.repeat-lang-option:has(input:checked){border-color:var(--accent);background:#302044}
.repeat-panel input[type=checkbox]{width:20px;max-width:20px;min-width:20px;height:20px;min-height:20px;padding:0;margin:0;flex:0 0 20px;accent-color:var(--accent)}
.source-language-toggle input[type=radio]{min-height:20px;padding:0;margin:0}

/* Status changes remain reversible after their notification disappears. */
.toast{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 12px;max-width:min(520px,calc(100vw - 32px));visibility:hidden}
.toast.show{visibility:visible;pointer-events:auto}
.toast-message{grid-column:1;grid-row:1;align-self:center}
.toast-close{grid-column:2;grid-row:1;display:grid;place-items:center;width:44px;min-width:44px;height:44px;padding:10px;border:0;border-radius:12px;color:var(--text);background:transparent;cursor:pointer;touch-action:manipulation}
.toast-close:hover{background:var(--panel3)}
.toast-close:focus-visible{outline:3px solid var(--accent2);outline-offset:2px}
.toast>span{min-width:0;overflow-wrap:anywhere}
.toast.show:has(.toast-action){pointer-events:auto}
.toast-action{grid-column:1/-1;justify-self:end;flex-shrink:0;min-height:44px;padding:8px 14px;border:1px solid var(--accent2);border-radius:10px;color:var(--text);background:var(--panel3);font:inherit;font-weight:700;cursor:pointer}
.toast-action:focus-visible{outline:3px solid var(--accent2);outline-offset:3px}
.learning-undo{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0 20px}
.learning-undo small{color:var(--muted);overflow-wrap:anywhere}
@media(max-width:700px){.toast{right:16px;left:16px;bottom:calc(88px + env(safe-area-inset-bottom));flex-wrap:wrap}.toast-action{margin-left:auto}.learning-undo .btn{min-height:44px}}

/* A held field is revealed without changing the global study controls. */
.study-peek-hint{color:var(--muted);font-size:13px;line-height:1.5;margin:12px 0}
.library-grid .study-card [data-study-peek]{filter:none;cursor:pointer;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-radius:6px;min-height:32px}
.library-grid [data-study-peek] .study-peek-content{display:block;filter:blur(7px);pointer-events:none}
.library-grid [data-study-peek].is-peeking .study-peek-content{filter:none}
.library-grid [data-study-peek]:focus-visible{outline:2px solid var(--accent2);outline-offset:4px}
.library-grid.hide-pron .natural-guide{filter:blur(7px)}
.library-grid.hide-pron .natural-guide[data-study-peek]{filter:none}

/* Optional word audio stays folded, preserving the reading/card layout. */
.sentence-word-audio{margin:12px 0;color:var(--muted);font-size:14px;text-align:left}
.sentence-word-audio summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:7px;width:fit-content;touch-action:manipulation}
.sentence-word-audio .word-audio-hide,.sentence-word-audio[open] .word-audio-show{display:none}
.sentence-word-audio[open] .word-audio-hide{display:inline}
.sentence-word-audio summary:after{content:'＋';margin-left:6px}
.sentence-word-audio[open] summary:after{content:'−'}
.sentence-word-audio summary:focus-visible{outline:2px solid var(--accent2);border-radius:6px}
.word-audio-options{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0}
.word-audio-options label{display:flex;align-items:center;gap:6px;margin:0;white-space:nowrap;font-size:13px}
.word-audio-options input{width:20px;height:20px;accent-color:var(--accent)}
.word-audio-tokens{display:flex;flex-wrap:wrap;gap:6px}
.word-audio-tokens button{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:10px;padding:8px 11px;min-height:44px;max-width:100%;overflow-wrap:anywhere;background:var(--panel3);touch-action:manipulation}
.word-audio-tokens button.selected{border-color:var(--accent2);background:var(--panel2)}
.hide-en .sentence-word-audio{display:none}
.book-sentence-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.book-sentence-row>div{min-width:0}
.book-selection-bar{flex-wrap:wrap}
