/* White shell and vivid controls; lesson artwork and reader geometry are retained. */
:root { --shell-blue:#126ee6; --shell-text:#24364b; --shell-muted:#607187; --shell-line:#dee7f2; background:#ffffff; }
body { background:#ffffff; }
#app { background:#ffffff; border-color:#ffffff; box-shadow:none; }
#app > .header { background:#ffffff; border-bottom:1px solid #edf1f6; }
#app > .header .brand { color:var(--shell-blue); font-weight:700; letter-spacing:-.04em; }
#app > .header .paw { color:#126ee6; font-size:24px; }
#app > .header .local-label { background:#ffffff; color:var(--shell-blue); border:1px solid #c8dcf7; font-size:11px; letter-spacing:.08em; padding:5px 10px; }
#homeView, #mapView, #mineView { background:#ffffff; color:var(--shell-text); }
#homeView button:focus-visible, #mapView button:focus-visible, #mineView button:focus-visible,
#primaryNav button:focus-visible { outline:3px solid var(--shell-blue); outline-offset:3px; }

/* Keep the full-height illustrated home and its existing content order. */
#homeView .today-card { border-color:var(--shell-line); background:#ffffff; box-shadow:none; }
#homeView .today-copy { background:#ffffff; }
#homeView .today-copy h1 { color:var(--shell-blue); font-weight:600; }
#homeView .start-reading { background:var(--shell-blue); color:#ffffff; border:1px solid var(--shell-blue); box-shadow:none; letter-spacing:.06em; transition:background .16s; }
#homeView .start-reading svg { width:26px; height:26px; padding:5px; border-radius:50%; background:#ffffff; color:var(--shell-blue); }
#homeView .today-card:active .start-reading { background:#085fce; border-color:#085fce; }

/* Custom academy, landscape map and front-facing scholar: one optical family. */
#primaryNav { background:#ffffff; border-color:#e6edf5; box-shadow:none; }
#primaryNav button { width:30%; max-width:96px; min-height:52px; min-width:0; padding:0; gap:3px; color:var(--shell-muted); line-height:1.2; }
#primaryNav .nav-icon { display:grid; place-items:center; width:44px; height:35px; border-radius:0; background:#ffffff; box-shadow:none; }
#primaryNav svg { width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
#primaryNav .nav-wash { fill:currentColor; fill-opacity:.06; stroke:none; }
#primaryNav .nav-fine { stroke-width:1.3; }
#primaryNav .nav-route { stroke-width:1.6; stroke-dasharray:1.5 2.8; }
#primaryNav .nav-dot { fill:currentColor; stroke:none; }
#primaryNav button.selected { color:var(--shell-blue); font-weight:650; }
#primaryNav button.selected .nav-icon { background:#ffffff; box-shadow:none; }
#primaryNav button.selected .nav-wash { fill-opacity:.12; }
#primaryNav button.selected .nav-solid { fill:currentColor; }
#primaryNav button:active { color:#085fce; }
#primaryNav button:active .nav-icon { background:#ffffff; }

/* Atlas structure, images, grade routes and city navigation are unchanged. */
#mapView #mapRoute { padding-top:21px; }
#mapView .atlas-intro { margin-bottom:20px; }
#mapView .atlas-intro > p { color:var(--shell-muted); letter-spacing:.08em; }
#mapView .atlas-intro h2 { color:var(--shell-blue); font-weight:650; }
#mapView .atlas-footprints { color:var(--shell-blue); background:#ffffff; border-color:#c8dcf7; }
#mapView .atlas-footprints strong { color:var(--shell-blue); font-variant-numeric:tabular-nums; }
#mapView .atlas-mode { background:#ffffff; border:1px solid #c8dcf7; border-radius:17px; padding:4px; }
#mapView .atlas-mode button { background:#ffffff; color:var(--shell-muted); font-weight:550; }
#mapView .atlas-mode button[aria-pressed=true] { background:var(--shell-blue); color:#ffffff; box-shadow:none; }
#mapView .atlas-grade-picker button { color:var(--shell-muted); }
#mapView .atlas-grade-picker button > span { background:#ffffff; border-color:#c8dcf7; color:var(--shell-blue); border-radius:13px; font-weight:600; }
#mapView .atlas-grade-picker button[aria-pressed=true] > span { background:var(--shell-blue); border-color:var(--shell-blue); color:#ffffff; box-shadow:none; }
#mapView .atlas-grade-picker button[aria-pressed=true] { color:var(--shell-blue); font-weight:650; }
#mapView .atlas-grade-intro > span { color:var(--shell-blue); }
#mapView .atlas-grade-intro p { color:var(--shell-muted); }
#mapView .atlas-book { border:1px solid var(--shell-line); border-radius:23px; background:#ffffff; box-shadow:none; }
#mapView .atlas-book-head { background:#ffffff; border-bottom:1px solid #e6edf5; }
#mapView .atlas-book-head > img { opacity:1; }
#mapView .atlas-book-head p { color:var(--shell-muted); }
#mapView .atlas-book-head h3 { color:var(--shell-blue); letter-spacing:.03em; }
#mapView .atlas-book-head span { background:#ffffff; color:var(--shell-blue); border-color:#d5e4f4; }
#mapView .atlas-book-mark { color:#126ee6; opacity:1; }
#mapView .atlas-stations { background:#ffffff; }
#mapView .atlas-station { color:var(--shell-text); }
#mapView .atlas-station:not(:nth-child(3n+1))::before { border-color:#b7d5f7; }
#mapView .atlas-node { background:#ffffff; border-color:#a8cbf4; color:var(--shell-blue); box-shadow:0 0 0 5px #ffffff; font-size:14px; font-weight:550; font-variant-numeric:tabular-nums; }
#mapView .atlas-station-title { font-weight:600; }
#mapView .atlas-station small { color:var(--shell-muted); }
#mapView .atlas-station.is-done .atlas-node { background:var(--shell-blue); border-color:var(--shell-blue); color:#ffffff; box-shadow:0 0 0 5px #ffffff,0 0 0 6px #bfd8f3; }
#mapView .atlas-station.is-done small { color:var(--shell-blue); }
#mapView .atlas-station.is-pending { color:#7d8a9c; }
#mapView .atlas-station.is-pending .atlas-node { background:#ffffff; border-color:#dce4ee; color:#8190a2; }
#mapView .atlas-station:active .atlas-node { border-color:var(--shell-blue); }
#mapView .atlas-extra summary, #mapView .atlas-footnote, #mapView .atlas-map-help,
#mapView .atlas-map-help span, #mapView .atlas-area-note, #mapView .atlas-place-note,
#mapView .atlas-empty { color:var(--shell-muted); }
#mapView .atlas-region-picker button { background:#ffffff; border-color:#c8dcf7; color:var(--shell-blue); }
#mapView .atlas-region-picker button small { color:var(--shell-muted); }
#mapView .atlas-region-picker button[aria-pressed=true] { background:var(--shell-blue); border-color:var(--shell-blue); color:#ffffff; }
#mapView .atlas-region-picker button[aria-pressed=true] small { color:#ffffff; }
#mapView .atlas-geo-board { background:#ffffff; border-color:#c9ddf1; box-shadow:none; }
#mapView .atlas-geographic > rect { fill:#ffffff; }
#mapView .geo-province { fill:#ffffff; stroke:#8dbce2; }
#mapView .geo-province-name { fill:#607187; }
#mapView .geo-dot, #mapView .geo-pin.in-region .geo-dot { fill:#126ee6; }
#mapView .geo-pin.is-done .geo-dot { fill:var(--shell-blue); }
#mapView .geo-pin.is-selected .geo-dot { fill:#126ee6; }
#mapView .geo-pin text, #mapView .geo-pin.is-selected text { fill:var(--shell-blue); }
#mapView .geo-picture-ring { fill:#ffffff; stroke:#6ba9e3; }
#mapView .geo-pin.is-selected .geo-picture-ring { stroke:#126ee6; }
#mapView .atlas-geo-title { color:var(--shell-blue); border:1px solid #d5e4f4; background:#ffffff; border-radius:10px; }
#mapView .atlas-map-controls button { color:var(--shell-blue); background:#ffffff; border-color:#bfd8f3; box-shadow:none; }
#mapView .atlas-city-picker button { background:#ffffff; border-color:#c8dcf7; color:var(--shell-blue); }
#mapView .atlas-city-picker button small { color:var(--shell-muted); }
#mapView .atlas-city-picker button[aria-pressed=true] { background:#ffffff; border-color:#126ee6; color:#126ee6; }
#mapView .atlas-city-picker button.is-done { box-shadow:inset 0 -2px 0 var(--shell-blue); }
#mapView .atlas-city-detail { background:#ffffff; border-color:var(--shell-line); box-shadow:none; }
#mapView .atlas-city-head { background:#ffffff; }
#mapView .atlas-city-head h3 { color:var(--shell-blue); }
#mapView .atlas-city-head p, #mapView .atlas-city-head span { color:var(--shell-muted); }
#mapView .atlas-city-symbol { background:#ffffff; border-color:#c8dcf7; color:var(--shell-blue); }
#mapView .atlas-poem-row { background:#ffffff; color:var(--shell-text); border-color:#e6edf5; }
#mapView .atlas-poem-row small { color:var(--shell-muted); }
#mapView .atlas-row-mark { color:var(--shell-blue); background:#ffffff; border-color:#bfd8f3; }
#mapView .atlas-row-action, #mapView .atlas-place-note a { color:var(--shell-blue); }
#mapView .atlas-poem-row.is-done .atlas-row-mark { background:var(--shell-blue); color:#ffffff; border-color:var(--shell-blue); }

/* Keep all six approved figures; the cards and account surfaces are white. */
#mineView .page-head { padding-top:23px; padding-bottom:10px; }
#mineView .page-head .eyebrow { color:var(--shell-blue); font-size:11px; font-weight:550; letter-spacing:.14em; }
#mineView .page-head h2 { color:var(--shell-blue); margin:6px 0 0; font-size:28px; font-family:'Songti SC','STSong',serif; letter-spacing:.04em; }
#mineView .scholar-section { padding:12px 18px 22px; color:var(--shell-text); }
#mineView .scholar-hero { position:relative; display:flex; align-items:center; min-height:210px; padding:25px 22px; margin-top:4px; overflow:hidden; border:1px solid #c8dcf7; border-radius:24px; text-align:left; background:#ffffff; }
#mineView .scholar-hero::before { display:none; }
#mineView .scholar-hero-copy { position:relative; z-index:1; }
#mineView .scholar-hero-copy > span { display:inline-block; border-bottom:1px solid #c8dcf7; padding-bottom:8px; color:var(--shell-blue); font-size:11px; letter-spacing:.12em; }
#mineView .scholar-hero h3 { color:var(--shell-blue); font-size:35px; line-height:1.3; margin:13px 0; letter-spacing:.1em; }
#mineView .scholar-hero p { color:var(--shell-muted); font-size:12px; margin:8px 0 0; }
#mineView .scholar-hero p strong { font-size:19px; color:var(--shell-blue); font-weight:600; font-variant-numeric:tabular-nums; }
#mineView .scholar-portrait { position:absolute; right:4px; bottom:0; width:162px; height:208px; }
#mineView .scholar-character { display:block; width:100%; height:100%; object-fit:contain; object-position:center bottom; }
#mineView .scholar-next { max-width:none; margin:0 0 27px; padding:17px 6px 0; color:var(--shell-muted); font-size:12px; text-align:left; }
#mineView .scholar-next [role=progressbar] { margin-top:11px; height:6px; background:#ffffff; border:1px solid #d6e3f2; }
#mineView .scholar-next i { background:var(--shell-blue); box-shadow:none; }
#mineView .scholar-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; font-size:17px; letter-spacing:.04em; font-weight:650; }
#mineView .scholar-heading > span { font-size:10px; color:var(--shell-muted); font-weight:400; letter-spacing:0; }
#mineView .scholar-grid { gap:13px 9px; }
#mineView .scholar-medal { padding:10px 4px 13px; border:1px solid var(--shell-line); border-radius:48px 48px 16px 16px; background:#ffffff; overflow:hidden; }
#mineView .scholar-figure { height:134px; margin:0 auto 9px; width:100%; }
#mineView .scholar-medal h4 { font-size:18px; letter-spacing:.08em; margin:6px 0; color:var(--shell-text); }
#mineView .scholar-medal p { color:var(--shell-muted); font-size:11px; margin:7px 0 9px; }
#mineView .scholar-medal small { border:1px solid #c8dcf7; border-radius:7px; padding:3px 6px; font-size:10px; line-height:1.4; background:#ffffff; color:var(--shell-blue); }
#mineView .scholar-medal.is-locked .scholar-character { filter:grayscale(.65) saturate(.7); opacity:.7; }
#mineView .scholar-medal.is-locked h4 { color:var(--shell-muted); }
#mineView .scholar-medal.is-locked small { color:var(--shell-muted); background:#ffffff; border-color:#dce4ee; }
#mineView .scholar-medal.is-current { border-color:var(--shell-blue); background:#ffffff; box-shadow:inset 0 0 0 1px var(--shell-blue); }
#mineView .scholar-medal.is-current h4 { color:var(--shell-blue); }
#mineView .scholar-medal.is-current small { color:#ffffff; background:var(--shell-blue); border-color:var(--shell-blue); }
#mineView .scholar-note { margin-top:20px; color:var(--shell-muted); line-height:1.9; }
#mineView .reward-section { margin:0 18px 14px; padding:18px; border:1px solid var(--shell-line); border-radius:18px; background:#ffffff; box-shadow:none; }
#mineView .reward-section h3 { color:var(--shell-text); font-size:16px; }
#mineView .reward-section p { color:var(--shell-muted); font-size:12px; line-height:1.9; }
#mineView .reward-section summary { color:var(--shell-blue); font-weight:550; font-size:14px; line-height:1.8; cursor:pointer; }
#mineView .secondary { color:var(--shell-blue); background:#ffffff; border-color:#bfd8f3; border-radius:11px; }
#mineView .secondary:active { background:#ffffff; border-color:var(--shell-blue); }
#mineView .secondary:disabled { color:#8190a2; background:#ffffff; border-color:#dce4ee; }
#mineView .danger { color:#cc482a; }
#mineView .catalog-entry { border-color:#e6edf5; }
#mineView .catalog-entry h4, #mineView .catalog-filters label { color:var(--shell-text); }
#mineView .catalog-entry small, #mineView .catalog-count, #mineView .catalog-pending { color:var(--shell-muted); }
#mineView .catalog-sources a { color:var(--shell-blue); }
#mineView .catalog-filters select, #mineView .catalog-filters input { border-color:#c8dcf7; background:#ffffff; color:var(--shell-text); }

@media(max-width:340px) {
  #mineView .scholar-hero { padding-left:18px; min-height:195px; }
  #mineView .scholar-portrait { width:140px; height:193px; right:0; }
  #mineView .scholar-hero h3 { font-size:30px; }
  #mineView .scholar-figure { height:112px; }
  #mineView .scholar-heading > span { font-size:9px; }
  #mineView .scholar-medal p { font-size:9px; }
}
@media(prefers-reduced-motion:reduce) { #homeView .start-reading { transition:none; } }

/* Use the same blue controls after entering a lesson. Retain red only while recording. */
#overlay .study-head, #overlay .study-head button, #overlay .pinyin-toggle,
#overlay #lessonHeading, #overlay .reading-scroll { color:var(--shell-blue); }
#overlay .pinyin-toggle input { accent-color:var(--shell-blue); }
#overlay.picturebook-reading .pinyin-toggle input:checked { background-color:var(--shell-blue); }
#overlay .reading-bar { background:#ffffff; border-color:var(--shell-line); box-shadow:none; }
#overlay .reading-controls > button, #overlay .reading-controls .control-label { color:var(--shell-blue); }
#overlay .reading-controls .control-icon { background:#ffffff; color:var(--shell-blue); border:1px solid #c8dcf7; box-shadow:none; }
#overlay .reading-controls #recordBtn .control-icon { background:var(--shell-blue); border-color:var(--shell-blue); color:#ffffff; }
#overlay .reading-controls > button.playing .control-icon { background:var(--shell-blue); border-color:var(--shell-blue); color:#ffffff; }
#overlay .reading-controls > button:disabled, #overlay .reading-controls > button:disabled .control-label { color:#8190a2; }
#overlay .reading-controls > button:disabled .control-icon,
#overlay .reading-controls > button.unavailable .control-icon { background:#ffffff; color:#8190a2; border-color:#dce4ee; }
#overlay .reading-controls #recordBtn.recording .control-icon { background:#cc482f; border-color:#cc482f; color:#ffffff; }
#overlay .reading-controls #recordBtn.recording small { color:#cc482f; }
#overlay .reading-controls > button + button::before { background:var(--shell-line); }
#overlay .section-listen, #overlay .g1-listen, #overlay .secondary,
#overlay .practice-map, #overlay .lesson-content summary { color:var(--shell-blue); background:#ffffff; border-color:#c8dcf7; }
#overlay .section-listen.playing, #overlay .g1-listen[aria-pressed=true],
#overlay .g1-word[aria-pressed=true], #overlay .g1-answers button[aria-pressed=true] { background:#ffffff; border-color:var(--shell-blue); color:var(--shell-blue); }
#overlay .section-listen:disabled, #overlay .g1-listen:disabled,
#overlay .secondary:disabled { color:#8190a2; background:#ffffff; border-color:#dce4ee; }
#overlay .practice-card, #overlay .practice-card.completed { background:#ffffff; border-color:var(--shell-line); }
#overlay .practice-mark, #overlay .practice-card.completed .practice-mark { background:var(--shell-blue); color:#ffffff; }
#overlay .complete-practice, #overlay .practice-card.completed .complete-practice,
#overlay .reading-bar .g1-complete { background:var(--shell-blue); border-color:var(--shell-blue); color:#ffffff; box-shadow:none; }
#overlay .g1-picture { background:#ffffff; border-color:var(--shell-line); }
#overlay .g1-picture[aria-pressed=true] { border-color:var(--shell-blue); }
#overlay .g1-caption, #overlay .g1-picture[aria-pressed=true] .g1-caption { color:var(--shell-blue); }
#overlay #lessonContent { color:var(--shell-text); --g1-line:var(--shell-line); }
#overlay .lesson-content h2, #overlay .lesson-content h3, #overlay .g1-heading,
#overlay .g1-line h3, #overlay .g1-practice-heading, #overlay .g1-knowledge-title,
#overlay .g1-word, #overlay .g1-answers button { color:var(--shell-text); }
#overlay .lesson-content p, #overlay .g1-examples, #overlay .g1-pinyin,
#overlay .g1-heading > span, #overlay .g1-tip, #overlay .g1-feedback,
#overlay .section-audio-note { color:var(--shell-muted); }
#overlay .g1-blanks i { border-color:#b7c6d9; }
#overlay .g1-blanks b { color:var(--shell-muted); }
#overlay .reading-bar .app-status { color:var(--shell-text); background:#ffffff; border-color:var(--shell-line); }
#appStatus { color:#ffffff; background:var(--shell-blue); }
#readingSettingsDialog, #confirmDialog { color:var(--shell-text); background:#ffffff; border-color:var(--shell-line); }
#readingSettingsDialog button, #confirmDialog .secondary { color:var(--shell-blue); background:#ffffff; border-color:#c8dcf7; }
#readingSettingsDialog input { accent-color:var(--shell-blue); }
#readingSettingsDialog select { color:var(--shell-text); background:#ffffff; border-color:#c8dcf7; }
#confirmDialog .primary { background:var(--shell-blue); color:#ffffff; box-shadow:none; }
