/* subject-chem.css —— 化学の配色（エメラルド → ティール）。**自動で作る。直接直さない。**
   作り方：node scripts/build-subject-css.cjs（物理の CSS の青・藍・紫を使う宣言を抜き出し，html[data-subject="chem"] の下で緑に置きかえる）。
   効く所：解説の題に data-subject="chem" の印があるページ（viewer.js・hint.js が <html> に付ける）。2026-11-08，先生「配色も更新してテーマ色に」 */

/* ── base.css から ── */
html[data-subject="chem"] {
  --col-primary: #10b981;
  --col-primary-light: #d1fae5;
  --col-primary-dark: #059669;
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #0f766e 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, transparent 40%, rgba(15, 118, 110, 0.035) 100%);
  --bg-pattern: radial-gradient(rgba(16, 185, 129, 0.20) 1.2px, transparent 1.2px);
  --bg-image: radial-gradient(1200px 700px at 8% -8%, rgba(16, 185, 129, 0.13), transparent 60%),
    radial-gradient(1000px 620px at 95% 4%, rgba(15, 118, 110, 0.11), transparent 62%),
    radial-gradient(900px 600px at 45% 104%, rgba(20, 184, 166, 0.10), transparent 60%),
    var(--bg-pattern);
}
html[data-subject="chem"] .back-to-top {
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}
html[data-subject="chem"] .back-to-top:hover {
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.5);
}

/* ── components.css から ── */
html[data-subject="chem"] .card h3 {
  color: var(--col-primary, #0d9488);
}
html[data-subject="chem"] .gallery-link-btn {
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.28);
}
html[data-subject="chem"] .gallery-link-btn:hover {
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
html[data-subject="chem"] .gallery-link-btn:focus-visible {
  outline: 2px solid #0d9488;
}
html[data-subject="chem"] .sim-btn:hover {
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3) !important;
}
html[data-subject="chem"] summary:hover {
  background: rgba(13, 148, 136, 0.04);
}
html[data-subject="chem"] .hint-steps > li {
  background: #ecfdf5;
  border-left: 4px solid #059669;
}
html[data-subject="chem"] .hint-steps > li::before {
  background: #059669;
}
html[data-subject="chem"] .sim-math-readout.sim-readout {
  background: linear-gradient(120deg, rgba(13, 148, 136, 0.10), rgba(16, 185, 129, 0.10));
}
html[data-subject="chem"] .sim-embed input[type="range"] {
  accent-color: #10b981;
}
html[data-subject="chem"] .sim-embed input[type="range"]::-webkit-slider-thumb {
  background: #10b981;
}
html[data-subject="chem"] .sim-embed input[type="range"]::-moz-range-progress {
  background: #10b981;
}
html[data-subject="chem"] .sim-embed input[type="range"]::-moz-range-thumb {
  background: #10b981;
}

/* ── viewer.css から ── */
html[data-subject="chem"] .viewer-page-header p {
  color: #0f766e;
}
html[data-subject="chem"] .viewer-page-header h1 {
  background: linear-gradient(135deg, #10b981, #0f766e);
  -webkit-background-clip: text;
  background-clip: text;
  border-image: linear-gradient(90deg, #10b981, #0f766e) 1;
}
html[data-subject="chem"] .viewer-page-header h1 mjx-container {
  color: #0d9488;
  -webkit-text-fill-color: #0d9488;
}
html[data-subject="chem"] .card-tab:hover {
  background: rgba(16, 185, 129, 0.06);
}
html[data-subject="chem"] .card-tab--active {
  background: linear-gradient(135deg, var(--col-main), #34d399);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
html[data-subject="chem"] .explanation-tab-nav .tab-nav-btn:hover:not(:disabled) {
  background: var(--col-primary, #0d9488);
  box-shadow: 0 6px 24px rgba(13, 148, 136, 0.35);
}
@media (max-width: 768px) {
  html[data-subject="chem"] button,
  html[data-subject="chem"] .btn-sm,
  html[data-subject="chem"] .btn-reaction,
  html[data-subject="chem"] .tab-btn {
    -webkit-tap-highlight-color: rgba(13, 148, 136, 0.2);
    tap-highlight-color: rgba(13, 148, 136, 0.2);
  }
}

/* ── explanation-v2.css から ── */
html.expl-v2[data-subject="chem"] {
  --ev-indigo: #0f766e;
  --ev-green: #2563eb;
}
html.expl-v2[data-subject="chem"] .card strong.kw {
  color: #134e4a;
}
html.expl-v2[data-subject="chem"] .card > h3 {
  border-image: linear-gradient(90deg, #10b981, #0f766e) 1;
}
html.expl-v2[data-subject="chem"] .card > h3 .q-no {
  background: linear-gradient(135deg, #10b981, #0f766e);
  -webkit-background-clip: text;
  background-clip: text;
}
html.expl-v2[data-subject="chem"] .card > h3 .q-tx {
  background: linear-gradient(transparent 60%, rgba(16, 185, 129, 0.16) 60%, rgba(15, 118, 110, 0.16) 100%);
}
html.expl-v2[data-subject="chem"] .card .intuition {
  border: 1.5px solid rgba(15, 118, 110, 0.26);
  border-left: 5px solid #0d9488;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.045);
}
html.expl-v2[data-subject="chem"] .card .intuition:has(> .scene) > .intuition-title {
  border-top: 1px dashed rgba(15, 118, 110, 0.28);
}
html.expl-v2[data-subject="chem"] .card .intuition .scene::before {
  background: rgba(15, 118, 110, 0.12);
}
html.expl-v2[data-subject="chem"] .card ol.step-list > li {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.16);
}
html.expl-v2[data-subject="chem"] .card ol.step-list > li::before {
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.3);
}
html.expl-v2[data-subject="chem"] .card ol.step-list > li > ul > li::marker {
  color: #10b981;
}
html.expl-v2[data-subject="chem"] .card.v2b .fig-steps__text > .aim,
html.expl-v2[data-subject="chem"] .card.v2b .aim {
  border: 1.5px solid rgba(13, 148, 136, 0.42);
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.035);
}
html.expl-v2[data-subject="chem"] .card.v2b .aim::before {
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}
html.expl-v2[data-subject="chem"] .card .box-note {
  border: 2px solid rgba(37, 99, 235, 0.5);
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.055);
}
html.expl-v2[data-subject="chem"] .card .box-note-label {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
html[data-subject="chem"] .card a.lec-link:not([hidden]) {
  border: 1.5px solid rgba(15, 118, 110, 0.28);
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.06);
  color: #134e4a;
}
html[data-subject="chem"] .card a.lec-link:hover {
  background: rgba(13, 148, 136, 0.13);
}
html[data-subject="chem"] .card a.lec-link .lec-link-path {
  color: #115e59;
}
html.expl-v2[data-subject="chem"] .card details > summary {
  color: #134e4a;
}
html.expl-v2[data-subject="chem"] .card details > summary::before {
  color: #0d9488;
}

/* ── viewer-stage.css から ── */
html[data-subject="chem"] .vw-rail-btn {
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  color: #047857;
}
html[data-subject="chem"] .vw-rail-btn:hover {
  background: #d1fae5;
}
html[data-subject="chem"] .vw-rail-btn:focus-visible {
  outline: 2px solid #059669;
}
html[data-subject="chem"] .vw-back {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
html[data-subject="chem"] .vw-back:hover,
html[data-subject="chem"] .vw-back:focus-visible {
  background: #d1fae5;
  border-color: #6ee7b7;
}
html[data-subject="chem"] .vw-rail-btn.ann-tap-on {
  background: #059669;
  border-color: #059669;
}
html[data-subject="chem"] .vw-rail-btn.ann-tap-on:hover {
  background: #047857;
}
html.expl-v2[data-subject="chem"] .viewer-page-header::before,
html.vw-chrome[data-subject="chem"] .viewer-page-header::before {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0), #10b981);
}
html.expl-v2[data-subject="chem"] .viewer-page-header::after,
html.vw-chrome[data-subject="chem"] .viewer-page-header::after {
  background: linear-gradient(90deg, #0f766e, rgba(15, 118, 110, 0));
}
html[data-subject="chem"] #prob-title-header .vw-h1-src {
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #f0fdfa;
  color: #115e59;
}
html[data-subject="chem"] .vw-title-qr:hover,
html[data-subject="chem"] .vw-title-qr:focus-visible {
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
html[data-subject="chem"] .vw-title-qr__txt {
  color: #047857;
}
html[data-subject="chem"] .vw-card-nav__next {
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 3px 12px rgba(15, 118, 110, 0.28);
}
html[data-subject="chem"] .vw-card-nav__next:hover {
  box-shadow: 0 5px 16px rgba(15, 118, 110, 0.38);
}
html[data-subject="chem"] .vw-card-ann .expl-ann-btn {
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 999px;
  color: #047857;
}
html[data-subject="chem"] .vw-card-ann .expl-ann-btn:hover {
  background: #d1fae5;
}
html[data-subject="chem"] .vw-card-ann .expl-ann-btn:focus-visible {
  outline: 2px solid #059669;
}
html[data-subject="chem"] .vw-card-ann .expl-ann-btn.ann-tap-on {
  background: #059669;
  border-color: #059669;
}
html[data-subject="chem"] .vw-fig-tool {
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  color: #047857 !important;
}
html[data-subject="chem"] .vw-fig-tool:hover {
  background: #d1fae5;
}
html[data-subject="chem"] .vw-recbar__title {
  background: linear-gradient(135deg, #10b981, #0f766e);
  -webkit-background-clip: text;
  background-clip: text;
}
html[data-subject="chem"] .vw-recbar__tab.is-on {
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.28);
}
html[data-subject="chem"] .vw-recbar__more {
  color: #0f766e;
}
html[data-subject="chem"] .vw-recbar__btn.is-on {
  background: #f0fdfa;
  color: #134e4a;
  box-shadow: inset 0 -3px 0 #0d9488;
}
html[data-subject="chem"] body.rec-mode.rec-step .rec-now::after {
  background: linear-gradient(180deg, #10b981, #0d9488);
}
html[data-subject="chem"] .vw-rec-next button {
  border: 1px solid rgba(13, 148, 136, 0.35);
  color: #0f766e;
}
html[data-subject="chem"] body.rec-video .vid-hl,
html[data-subject="chem"] body.rec-video .vid-hl * {
  color: #134e4a !important;
}
html[data-subject="chem"] body.rec-video .lv-box--exam {
  --lv-box: #0f766e;
}
html[data-subject="chem"] body.rec-video .lv-box--moshimo {
  --lv-box: #0f766e;
}
html[data-subject="chem"] .vid-subst {
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.22);
}
html[data-subject="chem"] .vid-band {
  background: linear-gradient(100deg, rgba(16, 185, 129, 0.95), rgba(13, 148, 136, 0.95) 55%, rgba(15, 118, 110, 0.93));
  box-shadow: 0 20px 60px rgba(15, 118, 110, 0.32);
}
html[data-subject="chem"] .vid-band__tx {
  text-shadow: 0 6px 22px rgba(4, 47, 46, 0.38);
}
html[data-subject="chem"] .vw-video__btn {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #134e4a;
  box-shadow: 0 1px 4px rgba(15, 118, 110, 0.12);
}
html[data-subject="chem"] .vw-video__btn:hover,
html[data-subject="chem"] .vw-video__btn:focus-visible {
  background: #ccfbf1;
}
html[data-subject="chem"] .vw-video__btn[aria-expanded="true"] {
  background: #ccfbf1;
  box-shadow: inset 0 0 0 1px #5eead4;
}
html[data-subject="chem"] .vw-video__len {
  color: #0f766e;
}
html[data-subject="chem"] .ytm-copy:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}
html[data-subject="chem"] .ytm-foot a {
  color: #047857;
}
html[data-subject="chem"] .ytm-url {
  border: 2px dashed #6ee7b7;
  border-radius: 10px;
  background: #ecfdf5;
}
html[data-subject="chem"] .ytm-url .ytm-label {
  color: #047857;
}
html[data-subject="chem"] .ytm-url-now a {
  color: #047857;
}
html[data-subject="chem"] .ytm-url-btn {
  background: #059669;
}
