/* Load after plant-learning.css (or after the prototype's inline styles).
 * No theme attribute means 自然课堂. Theme choices keep their semantic roles.
 */
#bio-app, .screen,
#bio-app[data-theme="nature"], .screen[data-theme="nature"] {
  --ink:#263c32; --muted:#53665b; --line:#ccd5c7;
  --nav:#e9efe5; --model:#f8f8f0; --card:#fffdf7; --qa:#f2eef5;
  --bar:#f0eee7; --head:#fcfbf6; --button:#fffefb;
  --blue:#245e83; --blue-soft:#e3eef4;
  --purple:#6b4b91; --purple-soft:#ece5f4;
  --orange:#965019; --orange-soft:#f9ebd7;
  --control-line:#819185; --success:#336445; --success-soft:#e3eddf;
  --water:#279bc1; --sugar:#e29442;
  color-scheme:light; color:var(--ink); background:var(--model);
}
#bio-app[data-theme="sky"], .screen[data-theme="sky"] {
  --ink:#24364a; --muted:#55677e; --line:#ccd8e5;
  --nav:#edf2f8; --model:#f7fafc; --card:#fff; --qa:#f2eff9;
  --bar:#edf1f6; --head:#fff; --button:#fff;
  --blue:#255dc6; --blue-soft:#e7efff;
  --purple:#7146b8; --purple-soft:#f0eafa;
  --orange:#9a4b09; --orange-soft:#fff0de;
  --control-line:#8493a7; --success:#356b50; --success-soft:#e4f0e8;
  color-scheme:light;
}
#bio-app[data-theme="ocean"], .screen[data-theme="ocean"] {
  --ink:#e0e9f6; --muted:#b2bfd1; --line:#40516a;
  --nav:#202e43; --model:#101d30; --card:#22334a; --qa:#2b293f;
  --bar:#273242; --head:#19273a; --button:#2c3d55;
  --blue:#a3c4ff; --blue-soft:#29456c;
  --purple:#d5bbff; --purple-soft:#48365f;
  --orange:#ffd2a1; --orange-soft:#59402e;
  --control-line:#7e8fa7; --success:#bddcb5; --success-soft:#294632;
  color-scheme:dark;
}
/* The restrained background family distinguishes navigation, model, Q&A and
 * controls; colour accents identify actions rather than decorating every area.
 */
#bio-app .bio-head, .screen .app-head {background:var(--head);border-color:var(--line)}
#bio-app .bio-nav, #bio-app .bio-nav-rail,
.screen .navigation, .screen .nav-rail {background:var(--nav);border-color:var(--line)}
#bio-app .bio-model, .screen .model {background:var(--model)}
#bio-app .bio-qa, #bio-app .bio-qa-rail,
.screen .ask, .screen .qa-rail {background:var(--qa);border-color:var(--line)}
#bio-app .bio-functions, .screen .function-bar {background:var(--bar);border-color:var(--line)}
#bio-app .bio-detail, #bio-app .plant-qa__result,
.screen .model-card, .screen .answer-box, .screen .reference-view {
  background:var(--card);border-color:var(--line);color:var(--ink);
}
#bio-app #viewport {background:radial-gradient(ellipse at 50% 45%,var(--model) 45%,var(--nav) 100%)}
#bio-app button, #bio-app select, #bio-app textarea,
.screen button, .screen select, .screen textarea {border-color:var(--control-line)}
#bio-app .plant-qa__input textarea::placeholder,
.screen .question-area textarea::placeholder {color:var(--muted);opacity:1}
#bio-app .plant-qa__input button[type="submit"], .screen #send {
  color:var(--qa);background:var(--purple);border-color:var(--purple);
}
#bio-app .plant-qa__input button:not([type="submit"]), .screen #mic {
  color:var(--purple);background:var(--purple-soft);border-color:var(--purple);
}
#bio-app #bio-intro, #bio-app .plant-qa__read,
.screen #play, .screen #read-answer {
  color:var(--orange);background:var(--orange-soft);border-color:var(--orange);
}
#bio-app #bio-references, #bio-app [data-bio-locate], #bio-app .plant-qa__locate,
.screen #reference-toggle, .screen #jump-answer {
  color:var(--blue);background:var(--blue-soft);border-color:var(--blue);
}
#bio-app button:focus-visible, #bio-app a:focus-visible,
#bio-app textarea:focus-visible, #bio-app select:focus-visible,
.screen button:focus-visible, .screen a:focus-visible,
.screen textarea:focus-visible, .screen select:focus-visible {
  outline:3px solid var(--blue);outline-offset:2px;
}
#bio-app .bio-award, .screen .reward-badge {
  color:var(--success);background:var(--success-soft);border-color:var(--success);
}
/* Photograph pixels and scientific source figures retain their original colour.
 * A white backing prevents transparent source images inheriting the dark theme.
 */
#bio-app .bio-reference-body img, .screen .reference-body img {background:#fff}

/* Transport swatches describe substances, not the UI action accent. */
#bio-app .route-tabs i.blue,#bio-app .legend i.blue{background:var(--water)}
#bio-app .route-tabs i.orange,#bio-app .legend i.orange{background:var(--sugar)}
#bio-app .legend{color:var(--muted)}
#bio-app #bio-original-tools .primary{color:var(--orange);background:var(--orange-soft);border-color:var(--orange)}
#bio-app input[type="range"],#bio-app input[type="checkbox"]{accent-color:var(--blue)}
