/* SALON ACADEMY — ブラック・ホワイト・グレー基調 / iPhone優先 */

:root {
  --bg: #f5f4f2;
  --surface: #ffffff;
  --surface-2: #efeeeb;
  --ink: #111112;
  --ink-2: #3a3a3c;
  --muted: #76767a;
  --line: #e2e1dd;
  --accent: #111112;
  --accent-ink: #ffffff;
  --danger: #b3261e;
  --ok: #2f5d3a;
  --warn: #7a5a12;
  --bar-bg: rgba(255, 255, 255, 0.86);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius: 14px;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  --tabbar-h: 58px;
  --topbar-h: 52px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #161618;
    --surface-2: #1f1f22;
    --ink: #f2f2f0;
    --ink-2: #cfcfcc;
    --muted: #9a9a9e;
    --line: #2b2b2f;
    --accent: #f2f2f0;
    --accent-ink: #0b0b0c;
    --danger: #ff8a80;
    --ok: #9fd0a8;
    --warn: #e6c27a;
    --bar-bg: rgba(18, 18, 20, 0.86);
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.02em; line-height: 1.4; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  display: flex; align-items: center; gap: 4px;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar-title {
  flex: 1; margin: 0 4px; font-size: 16px; letter-spacing: 0.12em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions { display: flex; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border: 0; background: transparent; border-radius: 12px; cursor: pointer; text-decoration: none;
}
.icon-btn svg, .tabbar svg, .ico {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn:active { background: var(--surface-2); }

/* ---------- Main view ---------- */
.view {
  padding: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px) 16px
           calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px);
  max-width: 760px; margin: 0 auto; outline: none; min-height: 100vh;
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 10.5px; letter-spacing: 0.04em;
}
.tabbar a.active { color: var(--ink); }
.tabbar a.active svg { stroke-width: 2; }

/* ---------- Typography helpers ---------- */
.eyebrow { font-size: 11px; letter-spacing: 0.24em; color: var(--muted); text-transform: uppercase; margin: 0 0 4px; }
.page-head { margin: 8px 0 18px; }
.page-head h2 { font-size: 24px; margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 28px 0 10px; font-family: var(--serif); font-size: 17px;
}
.section-title a { font-family: var(--sans); font-size: 13px; color: var(--muted); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: #0b0b0c; color: #f2f2f0; border-radius: 20px; padding: 26px 22px 22px;
  position: relative; overflow: hidden;
}
@media (prefers-color-scheme: dark) { .hero { background: #1a1a1d; border: 1px solid var(--line); } }
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%;
}
.hero h2 { margin: 0; font-size: 26px; letter-spacing: 0.14em; }
.hero p { margin: 8px 0 18px; color: #b9b9bc; font-size: 14px; }
.hero .search-field { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
.hero .search-field::placeholder { color: #9a9a9e; }

/* ---------- Cards & lists ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card + .card { margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 14px; min-height: 96px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; box-shadow: var(--shadow);
}
.tile:active, .list-item:active { transform: scale(0.99); }
.tile .tile-en { font-size: 10.5px; letter-spacing: 0.22em; color: var(--muted); }
.tile .tile-ja { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.tile .tile-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.list { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.list-item {
  display: flex; gap: 12px; align-items: center; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; box-shadow: var(--shadow); min-height: 64px;
}
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; line-height: 1.45; }
.list-item .li-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-item .chev { color: var(--muted); flex: none; }
.thumb {
  width: 56px; height: 56px; border-radius: 10px; flex: none; object-fit: cover;
  background: var(--surface-2); display: grid; place-items: center; color: var(--muted);
}
.num {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); flex: none;
  display: grid; place-items: center; font-family: var(--serif); font-size: 14px;
}

/* ---------- Badges & chips ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; line-height: 1.6; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
  white-space: nowrap;
}
.badge.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.badge.ok { color: var(--ok); border-color: currentColor; }
.badge.warn { color: var(--warn); border-color: currentColor; }
.badge.danger { color: var(--danger); border-color: currentColor; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 8px; margin: 0 -16px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; letter-spacing: 0.04em;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row > * { flex: 1; }
.fab {
  position: fixed; right: 18px; z-index: 15;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}
.fab svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

.fav-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; min-height: 36px;
}
.fav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- Forms ---------- */
.search-field, .field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 12px 14px; font-size: 16px; /* 16px未満だとiOSで自動ズームされる */
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--ink-2); }
.field .hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-section {
  margin: 22px 0 12px; padding: 10px 0 6px; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: 16px; font-weight: 600;
}
.form-section small { display: block; font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 12px; }

/* ---------- Article ---------- */
.article h2 { font-size: 24px; margin: 4px 0 8px; }
.article .lead { color: var(--ink-2); margin: 0 0 12px; }
.toc { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top)); z-index: 5;
  background: var(--bg); padding-top: 8px; }
.art-section { scroll-margin-top: calc(var(--topbar-h) + env(safe-area-inset-top) + 56px); margin: 18px 0; }
.art-section h3 {
  font-size: 18px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.art-section h3 .idx { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); font-family: var(--sans); }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.prose strong { font-weight: 700; }
.callout {
  border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 14px;
  border-radius: 0 12px 12px 0; margin: 12px 0; font-size: 14px;
}
.callout.warn { border-left-color: var(--warn); }
.diagram {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin: 14px 0;
}
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }

/* Q&A answer blocks */
.qa-block { margin: 0 0 12px; }
.qa-block .label { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 4px; }
.qa-block.conclusion {
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); padding: 14px 16px;
}
.qa-block.conclusion .label { color: inherit; opacity: 0.7; }
.qa-block.conclusion p { margin: 0; font-weight: 600; }

/* Products: official vs staff separation */
.source-panel { border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; border: 1px solid var(--line); background: var(--surface); }
.source-panel > header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.source-panel > header h3 { margin: 0; font-size: 16px; flex: 1; }
.source-panel.official { border-top: 3px solid var(--accent); }
.source-panel.staff { border-style: dashed; background: transparent; }
.kv { margin: 0; }
.kv dt { font-size: 12px; color: var(--muted); margin-top: 10px; }
.kv dd { margin: 2px 0 0; white-space: pre-wrap; }
.entry { border-top: 1px solid var(--line); padding: 10px 0; }
.entry:first-of-type { border-top: 0; }
.entry-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.entry-body { white-space: pre-wrap; margin-top: 4px; }

/* Media gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.gallery .media { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.gallery .media img, .gallery .media video { width: 100%; height: 100%; object-fit: cover; }
.gallery .media button {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
.gallery.single { grid-template-columns: 1fr; }
.gallery.single .media { aspect-ratio: 4 / 3; }
.gallery.single .media img { object-fit: contain; background: var(--surface-2); }
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.92);
  display: grid; place-items: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.lightbox img { max-height: 100vh; object-fit: contain; }

/* Empty states */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 14px; }
.empty .ico { width: 36px; height: 36px; margin: 0 auto 8px; display: block; }

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px); z-index: 60;
  background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; transition: 0.25s ease; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.notice {
  font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px;
  padding: 10px 12px; margin: 12px 0; line-height: 1.6;
}
.notice strong { color: var(--ink); }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
mark { background: rgba(127, 127, 127, 0.25); color: inherit; border-radius: 3px; padding: 0 1px; }

.status-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.status-table td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.status-table td:last-child { text-align: right; white-space: nowrap; }

@media (min-width: 600px) {
  .grid-2.wide { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 図解の表示枠（準備中） ---------- */
.figure-placeholder {
  border-style: dashed; background: transparent; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px;
}
.figure-placeholder strong { color: var(--ink-2); font-size: 14px; }
.figure-placeholder .ico { width: 30px; height: 30px; }

/* ---------- サロンルール・先輩チェック ---------- */
.rule-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 10px; background: var(--surface); }
.rule-card.kind-check { border-left: 3px solid var(--accent); }
.rule-card header { display: flex; gap: 6px; }
.rule-card h4 { margin: 8px 0 6px; font-size: 15px; }
.rule-card ul { margin: 0; padding-left: 1.2em; font-size: 14px; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 26px; margin: 6px 0; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px;
  border: 1.5px solid var(--muted); border-radius: 4px;
}

/* ---------- 問題集 ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.grid-2 > .card + .card { margin-top: 0; }
.stat-num { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.2; }
.stat-num small { font-size: 14px; color: var(--muted); font-weight: 400; }
.genre-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 14px; }
.genre-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; }
.genre-stats .stat-num { font-size: 22px; }
.genre-stats span:last-child { font-size: 11px; color: var(--muted); }
.review-cta[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.quiz-cta { margin: 18px 0; }
.quiz-cta .thumb, .review-cta .thumb { font-family: var(--serif); font-size: 20px; color: var(--ink); }
.quiz-progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 0 0 14px; }
.quiz-progress span { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.quiz-q { font-size: 19px; margin: 10px 0 16px; line-height: 1.6; }
.choices { display: grid; gap: 10px; }
.choices.tf { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; min-height: 56px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  font-size: 15px; cursor: pointer; box-shadow: var(--shadow);
}
.choices.tf .choice { justify-content: center; min-height: 88px; }
.tf-mark { font-size: 34px; line-height: 1; }
.choice-key {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 12px; color: var(--muted);
}
.choice:disabled { cursor: default; color: var(--muted); }
.choice.is-answer { border: 2px solid var(--ok); color: var(--ink); }
.choice.is-answer .choice-key { background: var(--ok); border-color: var(--ok); color: #fff; }
.choice.is-wrong { border: 2px solid var(--danger); color: var(--ink); }
.feedback { display: flex; flex-direction: column; gap: 2px; border-radius: var(--radius); padding: 12px 16px; margin: 16px 0 12px; }
.feedback strong { font-size: 17px; }
.feedback.ok { background: var(--accent); color: var(--accent-ink); }
.feedback.ng { border: 2px solid var(--danger); color: var(--danger); }
.feedback.ng span { color: var(--ink); }
.result-score { text-align: center; padding: 18px 0; }
.result-score .stat-num { font-size: 48px; }

/* ---------- 拡張教材（STEP形式） ---------- */
.sub-title { font-size: 15px; margin: 18px 0 8px; }
.glossary { margin: 0; display: grid; gap: 8px; }
.glossary > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.glossary dt { font-weight: 700; font-size: 14px; }
.glossary dt small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 11px; }
.glossary dd { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 12px; box-shadow: var(--shadow); scroll-margin-top: 120px;
}
.step-head { display: flex; align-items: center; gap: 10px; }
.step-head h4 { margin: 0; font-size: 16px; }
.step-no {
  flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: var(--accent-ink);
  font-size: 9px; letter-spacing: 0.12em; line-height: 1.1;
}
.step-no b { font-family: var(--serif); font-size: 19px; letter-spacing: 0; }
.step > p { margin: 10px 0; }
.step-points { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.step-points .label { font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }
.step-points .checklist { margin: 4px 0 0; font-size: 13.5px; }
.why-link { display: inline-block; margin-top: 8px; color: var(--muted); }
.why-list { list-style: none; margin: 0; padding: 0; }
.why-list li { border-left: 2px solid var(--line); padding: 4px 0 4px 14px; margin: 0 0 14px; scroll-margin-top: 140px; }
.why-list li strong { margin-left: 6px; }
.why-list li p { margin: 4px 0 0; color: var(--ink-2); }
.cond-grid { display: grid; gap: 10px; }
.cond h4, .mistake h4 { margin: 6px 0 4px; font-size: 15px; }
.cond ul { margin: 0; padding-left: 1.2em; font-size: 14px; }
.mistake { border-left: 3px solid var(--danger); }
.mistake .kv dt:first-child { margin-top: 2px; }
.card.mistake + .card.mistake, .card.inline-q + .card.inline-q { margin-top: 10px; }
.inline-q-text { font-weight: 600; margin: 8px 0 12px; }
.inline-q .choice { min-height: 48px; }
.inline-q .choices.tf .choice { min-height: 64px; }
.inline-q .feedback { margin: 12px 0 6px; padding: 8px 14px; }
.refs ul { margin: 0; padding-left: 1.2em; }
.refs li { margin: 6px 0; }
.review-box { margin-top: 12px; }
.review-box summary { font-weight: 600; cursor: pointer; }
@media (min-width: 600px) { .cond-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- 体験型（インタラクティブ）教材 ---------- */
.lm-stage { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; align-items: center; }
.vessel { width: 100%; max-width: 240px; height: auto; margin: 0 auto; display: block; }
.vessel .vessel-base { fill: #fbf8ee; }
.vessel .layer { transition: fill-opacity 1.6s ease-in-out; }
.vessel .layer-label { fill: #fff; font-size: 15px; font-weight: 700; transition: opacity 1s ease; paint-order: stroke; stroke: rgba(0, 0, 0, 0.25); stroke-width: 2px; }
.vessel .vessel-outline { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.vessel .vessel-rim { stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.vessel .vessel-shine { stroke: #fff; stroke-opacity: 0.7; stroke-width: 5; stroke-linecap: round; }
.lm-swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.lm-swatch {
  width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--line);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line);
  transition: background-color 1.6s ease-in-out;
}
.lm-tone { font-size: 13px; line-height: 1.4; }
.lm-scale { list-style: none; padding: 0; margin: 14px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.lm-scale li {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  transition: background-color 0.6s, color 0.6s, border-color 0.6s;
}
.lm-scale li.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lm-progress { display: flex; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.lm-dot {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; cursor: pointer; color: var(--muted); transition: 0.3s;
}
.lm-dot.is-done { background: var(--surface-2); color: var(--ink); }
.lm-dot[aria-current="step"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lm-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lm-controls [data-act="next"] { grid-column: 1 / -1; grid-row: 1; min-height: 52px; font-size: 16px; }
.lm-controls .btn.small { min-height: 44px; }
.lm-explain { margin-top: 14px; }
.lm-explain h4 { margin: 2px 0 8px; font-size: 17px; }
.lm.is-playing [data-act="replay"] { opacity: 0.6; }
.science { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 0 12px 12px 0; padding: 12px 14px; }
.interactive-card .thumb { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .vessel .layer, .lm-swatch, .vessel .layer-label { transition-duration: 0.01s; }
}
