/* ============================================================
   Kokeniwa 苔庭 — サイト共通スタイル v3
   コンセプト: 苔むす庭。生成りの和紙・墨・苔緑・水・土・石。
   時間をかけて静かに育つ侘び寂びの世界観。
   CSS変数 + prefers-color-scheme でライト/ダーク自動切替。
   モーション原則: transform/opacityのみ・強めのease-out・200ms前後。
   ============================================================ */

:root {
  --bg: #f3f1e7;          /* 生成り・和紙 */
  --surface: #fbfaf3;     /* 浮いた紙 */
  --surface-2: #e8e5d5;   /* 沈んだ面・石 */
  --text: #23281f;        /* 墨（緑みの黒） */
  --text-muted: #67705d;  /* 苔がかったグレー */
  --border: #dcd8c7;
  --border-strong: #c3bda4;
  --primary: #4d6a38;         /* 苔緑 */
  --primary-strong: #3b5329;
  --primary-soft: #e4ebd4;
  --on-primary: #fbfaf3;
  --accent-reading: #4d6a38;  /* 苔 */
  --accent-uscpa: #2f7368;    /* 水 */
  --accent-legal: #96642a;    /* 土 */
  --accent-reading-soft: #e4ebd4;
  --accent-uscpa-soft: #daece8;
  --accent-legal-soft: #f0e6d0;
  --success: #2f7d4c;
  --success-soft: #dcefe0;
  --danger: #b0472f;          /* 紅殻・弁柄 */
  --danger-soft: #f6e4dd;
  --shadow: 0 1px 2px rgba(35, 40, 31, .05), 0 6px 20px rgba(35, 40, 31, .07);
  --shadow-lift: 0 4px 10px rgba(35, 40, 31, .08), 0 16px 40px rgba(35, 40, 31, .12);
  --radius: 12px;
  --radius-lg: 18px;
  /* 強めのカスタムイージング（標準easeでは弱い） */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Shippori Mincho", Georgia, "Times New Roman", serif;
  /* 庭シルエット（遠山→手前の苔石） */
  --garden-far: #e7e9d8;
  --garden-mid: #dae0c6;
  --garden-near: #c9d2ac;
  --garden-stone: #cdc8b5;
  --garden-lantern: #b7b19d;
  --garden-line: #cfd3bd;
  --garden-light: #e6b45f;
  --garden-moss: #8ba656;
  --garden-moss-2: #9fb96a;
  --garden-opacity: .7;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14180f;          /* 夜の苔庭 */
    --surface: #1c2115;
    --surface-2: #262c1c;
    --text: #e8e8db;
    --text-muted: #9aa088;
    --border: #2f3624;
    --border-strong: #475138;
    --primary: #a2c07c;         /* 月あかりの苔 */
    --primary-strong: #b8d296;
    --primary-soft: #26311a;
    --on-primary: #14180f;
    --accent-reading: #a2c07c;
    --accent-uscpa: #5cc0af;
    --accent-legal: #d6a866;
    --accent-reading-soft: #26311a;
    --accent-uscpa-soft: #17352f;
    --accent-legal-soft: #362a19;
    --success: #5cc584;
    --success-soft: #183324;
    --danger: #e58d78;
    --danger-soft: #3a221c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 20px rgba(0, 0, 0, .38);
    --shadow-lift: 0 4px 10px rgba(0, 0, 0, .5), 0 16px 40px rgba(0, 0, 0, .48);
    --garden-far: #1b2113;
    --garden-mid: #212a17;
    --garden-near: #29331c;
    --garden-stone: #2d3221;
    --garden-lantern: #38402a;
    --garden-line: #2c341f;
    --garden-light: #f0c073;
    --garden-moss: #6f9143;
    --garden-moss-2: #83a552;
    --garden-opacity: .85;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* ---------- 庭シルエット背景（枯山水: 遠山・石灯籠・苔石・砂紋・苔） ---------- */
.garden-bg {
  position: fixed; inset: auto 0 0 0; z-index: -1;
  height: min(40vh, 360px); pointer-events: none;
  opacity: var(--garden-opacity);
  -webkit-mask-image: linear-gradient(to top, #000 55%, transparent);
  mask-image: linear-gradient(to top, #000 55%, transparent);
}
.garden-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.garden-bg .g-far { fill: var(--garden-far); }
.garden-bg .g-mid { fill: var(--garden-mid); }
.garden-bg .g-near { fill: var(--garden-near); }
.garden-bg .g-stone { fill: var(--garden-stone); }
.garden-bg .g-lantern { fill: var(--garden-lantern); }
.garden-bg .g-light { fill: var(--garden-light); }
.garden-bg .g-moss { fill: var(--garden-moss); }
.garden-bg .g-moss-2 { fill: var(--garden-moss-2); }
.garden-bg .g-rake { stroke: var(--garden-line); stroke-width: 2.5; opacity: .8; }
@media (max-width: 640px) {
  .garden-bg { height: min(32vh, 240px); }
}

a { color: var(--primary); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration: underline; }
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.4; letter-spacing: .01em; font-weight: 600;
}
h1 { font-size: clamp(1.55rem, 4vw, 2.15rem); margin: .5em 0 .5em; }
h2 { font-size: clamp(1.22rem, 3vw, 1.5rem); margin: 2.2em 0 .7em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 .5em; }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .92em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .1em .4em;
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
}
pre code { background: none; border: none; padding: 0; }

blockquote {
  margin: 1.4em 0;
  padding: .7em 1.3em;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-family: var(--font-serif);
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--primary); color: var(--on-primary);
  padding: 8px 16px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- 繝倥ャ繝 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-serif);
  font-weight: 600; font-size: 1.18rem; letter-spacing: .02em;
  color: var(--text);
}
.brand:hover { text-decoration: none !important; }
.brand-mark { width: 22px; height: 22px; color: var(--primary); }
.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-muted); font-size: .9rem; font-weight: 600;
  padding: 6px 11px; border-radius: 999px;
  transition: background 150ms var(--ease-out), color 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
}
.site-nav a.active { color: var(--primary); background: var(--primary-soft); }

/* ---------- 繝代Φ縺上★ ---------- */
.breadcrumbs {
  font-size: .82rem; color: var(--text-muted);
  margin: 20px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumbs .sep { opacity: .45; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs span[aria-current] { color: var(--text); font-weight: 600; }

/* ---------- 繝偵・繝ｭ繝ｼ ---------- */
.hero { padding: 64px 0 24px; text-align: center; }
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.7rem); margin: 0 0 .45em;
  letter-spacing: .02em;
  background: linear-gradient(115deg, var(--accent-reading) 15%, var(--accent-uscpa) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-muted); font-size: 1.02rem; max-width: 600px; margin: 0 auto; }

/* ---------- 繧ｫ繝ｼ繝・---------- */
.card-grid {
  display: grid; gap: 16px; margin: 30px 0;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out),
              border-color 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  a.card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: var(--border-strong);
  }
}
a.card:active { transform: translateY(-1px) scale(.99); }
.card h2, .card h3 { margin: .2em 0 .4em; font-size: 1.15rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.card .card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 12px;
  font-size: 1.35rem;
}
.card-reading .card-icon { background: var(--accent-reading-soft); }
.card-uscpa .card-icon { background: var(--accent-uscpa-soft); }
.card-legal .card-icon { background: var(--accent-legal-soft); }
.card-meta { margin-top: 14px; font-size: .8rem; color: var(--text-muted); }

/* 繝医ャ繝励・繧ｫ繝ｼ繝峨・謗ｧ縺医ａ縺ｪ繧ｹ繧ｿ繧ｬ繝ｼ蜈･蝣ｴ・亥・蝗槭・縺ｿ縺ｮ陬・｣ｾ・・*/
.hero + .card-grid > .card {
  opacity: 0;
  transform: translateY(10px);
  animation: card-in 500ms var(--ease-out) forwards;
}
.hero + .card-grid > .card:nth-child(2) { animation-delay: 60ms; }
.hero + .card-grid > .card:nth-child(3) { animation-delay: 120ms; }
@keyframes card-in { to { opacity: 1; transform: translateY(0); } }

/* ---------- 繝舌ャ繧ｸ ---------- */
.badge {
  display: inline-flex; align-items: center;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-b2 { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-c1 { background: var(--accent-reading-soft); color: var(--accent-reading); border-color: transparent; }
.badge-c2 { background: var(--accent-legal-soft); color: var(--accent-legal); border-color: transparent; }
.badge-n5, .badge-n4 { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-n3 { background: var(--accent-legal-soft); color: var(--accent-legal); border-color: transparent; }
.badge-n2, .badge-n1 { background: var(--accent-reading-soft); color: var(--accent-reading); border-color: transparent; }
.badge-cat { background: var(--surface-2); }

/* ---------- 荳隕ｧ ---------- */
.list-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin: 10px 0;
  color: var(--text);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out),
              transform 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .list-item:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow); }
}
.list-item:active { transform: scale(.995); }
.list-item .en {
  font-size: .96rem; color: var(--text);
  font-family: var(--font-serif);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.list-item .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 5px; }
.list-item .num { font-size: .8rem; color: var(--text-muted); font-weight: 600; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 24px; }
.chip {
  font-size: .84rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border);
  transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out),
              transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
}
.chip:active { transform: scale(.96); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip .count { opacity: .65; font-weight: 400; margin-left: 4px; }

/* ---------- 繧ｯ繧､繧ｺ ---------- */
.quiz {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 4vw, 34px);
  box-shadow: var(--shadow);
  margin: 20px 0;
}
.quiz-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.sentence-en {
  font-size: clamp(1.08rem, 2.5vw, 1.3rem);
  line-height: 1.75;
  font-family: var(--font-serif);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 20px;
}
.question-ja { font-weight: 700; margin: 0 0 14px; }

.choices { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.choice {
  width: 100%; text-align: left;
  font: inherit; font-size: .98rem;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 13px 16px;
  cursor: pointer;
  display: flex; align-items: baseline; gap: 10px;
  transition: border-color 150ms var(--ease-out), background 150ms var(--ease-out),
              transform 120ms var(--ease-out), opacity 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .choice:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
}
.choice:active:not(:disabled) { transform: scale(.985); }
.choice:disabled { cursor: default; }
.choice .marker {
  font-weight: 700; color: var(--text-muted); flex-shrink: 0;
  width: 1.4em; text-align: center;
}
.choice.correct { border-color: var(--success); background: var(--success-soft); }
.choice.correct .marker { color: var(--success); }
.choice.wrong { border-color: var(--danger); background: var(--danger-soft); }
.choice.wrong .marker { color: var(--danger); }
.choice.dim { opacity: .5; }

.verdict { font-weight: 700; margin: 16px 0 0; display: none; }
.verdict.ok { color: var(--success); display: block; }
.verdict.ng { color: var(--danger); display: block; }

.reveal-btn {
  font: inherit; font-weight: 700; font-size: .95rem;
  background: var(--primary); color: var(--on-primary);
  border: none; border-radius: 999px;
  padding: 11px 28px; cursor: pointer;
  transition: background 150ms var(--ease-out), transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .reveal-btn:hover { background: var(--primary-strong); }
}
.reveal-btn:active { transform: scale(.97); }

.answer-panel {
  display: none;
  margin-top: 22px; padding-top: 20px;
  border-top: 1px dashed var(--border-strong);
}
.answer-panel.open { display: block; animation: panel-in 300ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.answer-panel h2 {
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); margin: 1.4em 0 .3em;
}
.answer-panel h2:first-child { margin-top: 0; }
.answer-panel p { margin: .2em 0 .8em; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0; }
.pager a {
  flex: 1; max-width: 48%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  color: var(--text); font-size: .9rem;
  transition: border-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .pager a:hover { text-decoration: none; border-color: var(--primary); }
}
.pager a:active { transform: scale(.985); }
.pager .dir { display: block; font-size: .75rem; color: var(--text-muted); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- 繝輔Λ繝・す繝･繧ｫ繝ｼ繝会ｼ井ｸ隕ｧ繧ｰ繝ｪ繝・ラ縲∝推繧ｫ繝ｼ繝牙句挨縺ｫ蜿崎ｻ｢・・---------- */
.fc-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 0 18px;
}
.fc-btn {
  font: inherit; font-weight: 700; font-size: .88rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 9px 20px; cursor: pointer;
  transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out),
              transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .fc-btn:hover { border-color: var(--primary); color: var(--primary); }
}
.fc-btn:active { transform: scale(.96); }
.fc-btn[aria-pressed="true"] {
  background: var(--primary); color: var(--on-primary); border-color: var(--primary);
}
.fc-bar-note { font-size: .82rem; color: var(--text-muted); }

.fc-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  margin: 0 0 8px;
}
.fc-cell {
  perspective: 900px;
  height: 88px;
  background: none; border: none; padding: 0;
  cursor: pointer; font: inherit;
  -webkit-tap-highlight-color: transparent;
  /* 繧ｳ繝斐・謚第ｭ｢: 繧ｫ繝ｼ繝蛾擇縺ｮ繝・く繧ｹ繝医・驕ｸ謚樔ｸ榊庄 */
  user-select: none; -webkit-user-select: none;
}
.fc-cell-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 320ms var(--ease-in-out);
}
.fc-cell.flipped .fc-cell-inner { transform: rotateY(180deg); }
.fc-cell:active .fc-cell-inner { filter: brightness(.98); }
.fc-cell-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  text-align: center; overflow: hidden;
}
@media (hover: hover) and (pointer: fine) {
  .fc-cell:hover .fc-cell-face { border-color: var(--border-strong); }
}
.fc-cell-num {
  position: absolute; top: 6px; left: 9px;
  font-size: .68rem; color: var(--text-muted); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fc-cell-term {
  font-size: 1.35rem; font-weight: 700;
  font-family: var(--font-serif); letter-spacing: .02em;
  line-height: 1.25;
}
.fc-cell-back {
  transform: rotateY(180deg);
  flex-direction: column; gap: 3px;
  background: linear-gradient(160deg, var(--primary-soft), var(--surface));
  border-color: var(--primary-soft);
}
.fc-cell-meaning { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.fc-cell-reading { font-size: .82rem; color: var(--text-muted); font-weight: 600; }
.fc-cell-example {
  font-size: .76rem; color: var(--text-muted); font-weight: 400;
  margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fc-cell.target .fc-cell-face { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fc-cell.target { scroll-margin-top: 90px; }

/* Vocabulary cards share the flashcard-grid UI (.fc-*). */
.card-jp .card-icon { background: var(--primary-soft); }

/* ---------- SNS / 謨呎攝 ---------- */
.sns-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px; margin: 16px 0;
  box-shadow: var(--shadow);
}
.sns-avatar {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
}
.sns-reading .sns-avatar { background: var(--accent-reading); }
.sns-uscpa .sns-avatar { background: var(--accent-uscpa); }
.sns-legal .sns-avatar { background: var(--accent-legal); }
.sns-kotsukotsu .sns-avatar { background: var(--primary); }
.sns-card h2, .sns-card h3 { margin: 0 0 2px; font-size: 1.1rem; }
.sns-card .handle { color: var(--text-muted); font-size: .88rem; }
.sns-card p { margin: 8px 0 14px; font-size: .93rem; color: var(--text-muted); }
.follow-btn {
  display: inline-block; font-weight: 700; font-size: .88rem;
  background: var(--text); color: var(--bg);
  border-radius: 999px; padding: 9px 24px;
  transition: transform 120ms var(--ease-out), opacity 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .follow-btn:hover { text-decoration: none; opacity: .85; }
}
.follow-btn:active { transform: scale(.97); }

.note-box {
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: var(--radius); padding: 16px 20px;
  color: var(--text-muted); font-size: .9rem; margin: 24px 0;
}

/* ---------- 繝悶Ο繧ｰ ---------- */
.article-list .list-item h2, .article-list .list-item h3 { margin: 0 0 4px; font-size: 1.1rem; }
.article-date { font-size: .8rem; color: var(--text-muted); }
.article-body { max-width: 720px; }
.article-body img { max-width: 100%; border-radius: var(--radius); }
.article-header { margin: 8px 0 30px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.article-header h1 { margin-bottom: .2em; }

/* ---------- 繧ｻ繧ｯ繧ｷ繝ｧ繝ｳ隕句・縺・---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 46px 0 4px;
}
.section-head h2 { margin: 0; }
.section-head .more { font-size: .88rem; font-weight: 600; }
.lead { color: var(--text-muted); max-width: 660px; }

/* ---------- 繝輔ャ繧ｿ ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
  background: transparent;
  padding: 40px 0 130px;
  text-align: center;
}
.footer-brand { font-weight: 800; margin: 0; }
.footer-tagline { color: var(--text-muted); font-size: .88rem; margin: 4px 0 16px; }
.footer-nav { display: flex; gap: 4px 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footer-nav a { font-size: .85rem; color: var(--text-muted); }
.copyright { font-size: .78rem; color: var(--text-muted); margin: 0; }

/* ---------- 繝ｬ繧ｹ繝昴Φ繧ｷ繝・---------- */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-nav { margin-left: -11px; }
  .hero { padding-top: 40px; }
  .sns-card { flex-direction: column; }
  .pager a { max-width: none; }
  .fc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fc-cell-inner { transition: none !important; }
  .hero + .card-grid > .card { animation: none; opacity: 1; transform: none; }
  .answer-panel.open { animation: none; }
  * { transition-duration: 0ms !important; }
}

/* ---------- inline vocabulary (Journal articles) ---------- */
.article-body ruby { ruby-position: over; }
.article-body rt {
  font-size: 0.55em;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.vb {
  position: relative;
  cursor: help;
  border-bottom: 1.5px dotted var(--accent-reading);
  outline: none;
}
.vb .vb-gloss {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.9em);
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 0.4em 0.7em;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 20;
}
.vb:hover .vb-gloss, .vb:focus .vb-gloss { opacity: 1; }

/* vocabulary recap box at the end of articles */
.article-body h2 + ul.vocab-list { margin-top: 0.75rem; }
.vocab-list {
  list-style: none;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.vocab-list li { margin: 0.45em 0; }
.vocab-box {
  margin: 2.5rem 0 1rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.vocab-box h2 { margin: 0 0 0.25rem 0; font-size: 1.15rem; }
.vocab-box .jp-sub { font-size: 0.85rem; font-weight: normal; color: var(--text-muted); margin-left: 0.5em; }
.vocab-box .vocab-list { background: none; border: none; padding: 0.25rem 0 0 0; }
.vocab-box .vocab-list li ruby { font-size: 1.15em; font-weight: 600; }
.vocab-box .vocab-gloss { color: var(--text-muted); }
.vocab-cta { margin: 0.75rem 0 0 0; font-size: 0.85rem; color: var(--text-muted); }
