/* ハケンおさらい塾：デザイン刷新版（2026-11-21）
   世界観：チャンネルのアイコン・バナーに合わせた 黄色・オレンジ・クリーム 基調。紺はスーツの色で、文字と締め色に使う。
   方針：モバイル優先／外部フォントなし（端末のフォント）／動きは CSS の軽いトランジションと、スクロールでのふわっと表示だけ。
   クラス名は app.js と共通。名前を変えるときは app.js も合わせて直すこと。 */
:root {
  --cream: #fff8ec;      /* 背景 */
  --cream-2: #fcefd6;    /* 背景の濃い面 */
  --yellow: #fbb637;     /* アイコンの背景の黄色 */
  --yellow-soft: #ffe7ad;
  --orange: #e2742f;     /* ハルのカーディガン */
  --orange-d: #c45d1c;
  --orange-soft: #fde4d2;
  --navy: #24324f;       /* 親分のスーツ・本文の締め色 */
  --ink: #2e2a26;
  --muted: #7a6f63;
  --line: #f0e2c8;
  --card: #ffffff;
  --ok: #2f8f5b;
  --ok-soft: #e3f4ea;
  --ng: #d2493a;
  --ng-soft: #fde7e3;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(120, 80, 20, .05), 0 6px 20px rgba(120, 80, 20, .08);
  --shadow-h: 0 2px 4px rgba(120, 80, 20, .06), 0 12px 28px rgba(120, 80, 20, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* 旧名（互換） */
  --main: var(--navy);
  --accent: var(--orange);
  --bg: var(--cream);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.85;
  font-size: 16px;
  word-break: auto-phrase;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--orange-d); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.45; margin: 0 0 .5em; color: var(--navy); letter-spacing: .01em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.2rem; margin-top: 1.4em; font-weight: 800; }
h3 { font-size: 1.04rem; }
p { margin: 0 0 .85em; }
code, .mono { font-family: ui-monospace, Menlo, monospace; background: var(--cream-2); border-radius: 6px; padding: 1px 6px; font-size: .9em; word-break: break-all; }
.mono { display: block; padding: 8px 10px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 8px; }

.container { max-width: 760px; margin: 0 auto; padding: 18px 16px 48px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 248, 236, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
}
.header-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; min-width: 0; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: 0 0 40px; background: var(--yellow); box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(226, 116, 47, .35); }
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.brand-sub { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gnav { margin-left: auto; display: none; gap: 4px; }
.gnav a { text-decoration: none; color: var(--navy); font-size: .88rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; transition: background .2s var(--ease); }
.gnav a:hover { background: var(--yellow-soft); }

/* ---------- フッター ---------- */
.site-footer { text-align: center; font-size: .78rem; color: var(--muted); padding: 28px 16px 48px; background: var(--cream-2); }
.site-footer p { margin: 0 0 .35em; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 12px; }
.foot-links a { color: var(--navy); font-weight: 700; text-decoration: none; font-size: .85rem; }
.foot-install { margin: -4px 0 10px !important; }
.foot-install a { color: var(--muted); font-size: .74rem; }

/* ---------- 共通部品 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 20px 18px; margin: 0 0 18px;
  border: 1px solid rgba(240, 226, 200, .7); box-shadow: var(--shadow);
}
.section-label {
  display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .06em;
  color: var(--orange-d); background: var(--orange-soft); border-radius: 999px; padding: 3px 12px; margin-bottom: 10px;
}
.badge { display: inline-block; font-size: .72rem; border: 1px solid var(--orange); color: var(--orange); border-radius: 999px; padding: 0 8px; margin-left: 6px; vertical-align: middle; font-weight: 700; }
.muted { color: var(--muted); font-size: .9rem; }
.btn {
  font: inherit; font-weight: 800; display: inline-block; padding: 11px 22px; min-height: 46px; text-decoration: none; text-align: center;
  border: none; border-radius: 999px; background: var(--navy); color: #fff; cursor: pointer; margin-top: 12px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .12);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(36, 50, 79, .22); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn.accent { background: var(--orange); box-shadow: 0 3px 0 var(--orange-d); }
.btn.accent:hover { background: #ea7f3a; box-shadow: 0 6px 16px rgba(226, 116, 47, .35); }
.btn.ghost { background: #fff; color: var(--navy); border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--yellow); background: #fffdf7; }
.btn.big { font-size: 1.06rem; padding: 14px 26px; }
.btn.wide { display: block; width: 100%; }
.prog { display: inline-block; font-size: .7rem; font-weight: 800; color: var(--navy); background: var(--yellow-soft); border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: middle; }
.prog.full { background: var(--orange); color: #fff; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-size: .88rem; font-weight: 700; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--orange-d); }

/* ---------- スクロールでふわっと表示（JS が .reveal → .in を付ける。動きを減らす設定では無効） ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- トップ：ヒーロー ---------- */
.hero {
  position: relative; overflow: hidden; border: none; padding: 26px 20px 22px;
  background: radial-gradient(120% 90% at 100% 0%, #ffd98a 0%, rgba(255, 217, 138, 0) 60%), linear-gradient(160deg, #fff3d6 0%, #ffe3a6 100%);
}
.hero-grid { display: grid; gap: 14px; align-items: center; }
.hero-eyebrow { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .08em; color: var(--orange-d); background: #fff; border-radius: 999px; padding: 3px 12px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(196, 93, 28, .15); }
.hero h1 { font-size: 1.5rem; line-height: 1.45; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, rgba(251, 182, 55, .7) 62%); }
.hero p { color: #4a4036; font-size: .95rem; }
.hero-visual { margin: 0 -20px -22px; display: flex; justify-content: center; }
.hero-visual img { display: block; width: 100%; max-width: 300px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 22px 22px 0 0; -webkit-mask-image: linear-gradient(#000 90%, transparent); mask-image: linear-gradient(#000 90%, transparent); }
.hero .roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.hero .role { background: rgba(255, 255, 255, .75); border-radius: var(--radius-s); padding: 10px 12px; font-size: .86rem; line-height: 1.55; }
.hero .role b { color: var(--orange-d); display: block; }
.hero-cta { margin-top: 6px; }
.hero-cta .btn { display: block; }
.hero-meta { display: block; font-size: .76rem; color: var(--muted); margin-top: 8px; text-align: center; }
.hero-sub { display: block; color: var(--navy); font-weight: 700; font-size: .86rem; margin-top: 10px; text-align: center; }

/* ---------- エピソード一覧 ---------- */
.chap-head { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin: 26px 0 10px; color: var(--navy); }
.chap-head span { font-size: .72rem; font-weight: 800; color: #fff; background: var(--orange); border-radius: 999px; padding: 2px 11px; letter-spacing: .05em; }
.ep-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ep-item a {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: var(--radius); padding: 16px 44px 16px 18px; box-shadow: var(--shadow);
  border: 1px solid rgba(240, 226, 200, .7);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.ep-item a::after { content: "→"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--orange); font-weight: 800; transition: transform .22s var(--ease); }
.ep-item a:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.ep-item a:hover::after { transform: translate(4px, -50%); }
.ep-item a:active { transform: translateY(0); }
.ep-no { font-size: .76rem; color: var(--orange-d); font-weight: 800; letter-spacing: .03em; }
.ep-title { font-weight: 800; font-size: 1.04rem; display: block; color: var(--navy); line-height: 1.5; margin: 2px 0 4px; }
.ep-lead { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .86rem; color: var(--muted); line-height: 1.65; }
.ep-meta { display: inline-block; font-size: .72rem; color: var(--navy); background: var(--cream-2); border-radius: 999px; padding: 1px 10px; margin-top: 8px; font-weight: 700; }
.ep-item.extra a { background: linear-gradient(120deg, #fffaf0, #fff3dc); }
.ep-item a.ep-disabled { opacity: .6; box-shadow: none; }
.ep-item a.ep-disabled::after { content: ""; }
.ep-soon { font-size: .7rem; background: var(--line); color: var(--muted); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.season-note { font-size: .85rem; text-align: center; color: var(--muted); margin: 18px 0; }
/* 準備中マスコット（ハル＋机の層と親分の層を重ねる。背景透過）：親分だけ小さくカタカタ揺れる。視差効果を減らす設定では止める */
.season-note {  display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; }
.season-note > span:not(.prep-mascot) { max-width: 30em; line-height: 1.6; }
.prep-mascot { position: relative; display: block; width: 200px; aspect-ratio: 3 / 2; margin: 0 auto 12px; }
.prep-mascot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.prep-mascot.small { width: 132px; margin: 0; flex: none; }
/* 3層：base（ハル＋机＝静止）→ sweat（飛んだ汗が小さくポップ）→ oyabun（揺れ・足元を軸に） */
.prep-sweat { animation: prep-sweat 1.6s ease-in-out infinite; transform-origin: 15% 45%; }
@keyframes prep-sweat { 0%, 100% { opacity: .2; transform: translate(0, 0) scale(.9); } 50% { opacity: 1; transform: translate(-2px, -2px) scale(1); } }
.prep-oyabun { animation: prep-shake .9s ease-in-out infinite; transform-origin: 73% 95%; }
@keyframes prep-shake { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-2px) rotate(-1deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-2px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .prep-sweat, .prep-oyabun { animation: none; } }

.notes { margin: 0; padding-left: 0; list-style: none; }
.notes li { border-bottom: 1px dashed var(--line); padding: 8px 0; font-size: .92rem; }
.notes li:last-child { border-bottom: none; }
.notes b { color: var(--orange-d); }

.links3 { display: grid; gap: 10px; background: transparent; border: none; box-shadow: none; padding: 0; }
.links3 a {
  display: block; text-decoration: none; color: var(--ink); background: var(--card); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); border: 1px solid rgba(240, 226, 200, .7); transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.links3 a:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.links3 b { display: block; color: var(--navy); }
.links3 span { font-size: .84rem; color: var(--muted); }

/* ---------- エピソードページ ---------- */
.ep-head { margin-bottom: 14px; }
.ep-head .ep-theme { font-size: .8rem; color: var(--orange-d); font-weight: 700; }
.ep-head h1 { font-size: 1.55rem; margin-top: 4px; }
.prev-note { font-size: .85rem; background: var(--cream-2); border-radius: var(--radius-s); padding: 8px 12px; }

.toc { margin: 0 0 16px; }
.toc ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.toc a {
  display: block; text-align: center; white-space: nowrap; font-size: .84rem; font-weight: 700; text-decoration: none; color: var(--navy);
  background: #fff; border-radius: 999px; padding: 7px 4px; box-shadow: 0 1px 3px rgba(120, 80, 20, .1);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.toc a:hover { background: var(--yellow-soft); transform: translateY(-1px); }

.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-s); overflow: hidden;
  background: linear-gradient(135deg, #2a3754, #1c2740); color: #dfe4ee; display: grid; place-items: center; text-align: center; font-size: .86rem;
}
.video-frame .play { width: 62px; height: 62px; border-radius: 50%; background: var(--orange); margin: 0 auto 10px; position: relative; box-shadow: 0 6px 18px rgba(226, 116, 47, .45); }
.video-frame .play::after { content: ""; position: absolute; left: 25px; top: 19px; border-left: 17px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
/* YouTube の埋め込み（押されるまでは表紙の画像と再生ボタンだけ） */
.yt-frame { display: block; background: #000; }
.yt-lite { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-lite .play { position: absolute; left: 50%; top: 50%; margin: -31px 0 0 -31px; transition: transform .2s var(--ease); }
.yt-lite:hover .play, .yt-lite:focus-visible .play { transform: scale(1.08); }
.yt-lite:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-alt { font-size: .84rem; margin: 10px 0 12px; text-align: right; }

.quest { background: linear-gradient(150deg, #fff7e2, #ffeec8); border: none; }
.quest .quest-title { color: var(--orange-d); font-weight: 800; }
.quest blockquote { margin: 8px 0 0; font-weight: 800; font-size: 1.06rem; color: var(--navy); line-height: 1.7; }

/* 登場人物と用語 */
.cast { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cast li { display: flex; gap: 8px; align-items: center; font-size: .86rem; line-height: 1.4; background: var(--cream); border-radius: var(--radius-s); padding: 8px; }
.cast small { color: var(--muted); }
.terms-box { margin-top: 12px; }
.terms { margin: 0; }
.terms dt { font-weight: 800; color: var(--navy); margin-top: 10px; }
.terms dd { margin: 0 0 4px; font-size: .92rem; }
.gl-eps { display: block; margin-top: 4px; }
.yomi { font-weight: 400; color: var(--muted); font-size: .75rem; }
.chip {
  display: inline-block; font-size: .76rem; font-weight: 700; color: var(--navy); background: var(--cream-2); border-radius: 999px;
  padding: 4px 12px; margin: 4px 6px 0 0; text-decoration: none; min-height: 30px; transition: background .2s var(--ease);
}
.chip:hover { background: var(--yellow-soft); }

/* 開閉ボックス（台本・あらすじ・用語・もっと詳しく） */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.script > summary, details.recap-more > summary, .terms-box > summary, details.more > summary {
  cursor: pointer; font-weight: 800; color: var(--navy); padding: 11px 44px 11px 14px; border-radius: var(--radius-s);
  background: var(--cream); position: relative; transition: background .2s var(--ease);
}
details.script > summary:hover, details.recap-more > summary:hover, .terms-box > summary:hover, details.more > summary:hover { background: var(--cream-2); }
details.script > summary::after, details.recap-more > summary::after, .terms-box > summary::after, details.more > summary::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2.5px solid var(--orange); border-bottom: 2.5px solid var(--orange); transform: rotate(45deg); transition: transform .25s var(--ease);
}
details[open] > summary::after { transform: rotate(225deg); margin-top: -1px; }
details.recap-more, details.more { margin-top: 14px; }

/* 台本（チャット形式） */
.chapter { margin-top: 20px; }
.chapter-title { font-size: .86rem; font-weight: 800; color: var(--navy); background: var(--yellow-soft); border-radius: 999px; padding: 3px 12px; display: inline-block; }
.bubble-row { display: flex; gap: 8px; margin: 12px 0; align-items: flex-start; }
.bubble-row.right { flex-direction: row-reverse; }
.avatar { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #fff; background: #b3a796; }
.sp-oyabun .avatar { background: var(--navy); }
.sp-haru .avatar { background: var(--orange); }
.bubble-body { max-width: 82%; }
.bubble-row.right .bubble-body { text-align: right; }
.speaker { font-size: .74rem; color: var(--muted); }
.bubble { display: inline-block; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 16px; border-top-left-radius: 4px; padding: 9px 13px; line-height: 1.7; }
.bubble-row.right .bubble { border-radius: 16px; border-top-right-radius: 4px; }
.sp-haru .bubble { background: #fff2e8; border-color: #f7cfb3; }
.sp-oyabun .bubble { background: #eef1f7; border-color: #d3dae8; }
.sp-guest .bubble { background: #faf6ef; border-style: dashed; }
.bubble.inner { background: transparent; border-style: dashed; font-style: italic; color: #6b6055; }
.direction { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.direction::before { content: "🎬 "; }
.toggle-dir { font-size: .8rem; margin: 12px 0 0; display: flex; align-items: center; gap: 6px; }
.hide-dir .direction { display: none; }

/* おさらい */
.points { background: var(--cream); border-radius: var(--radius-s); padding: 12px 14px 12px 30px; margin: 0; }
.points li { margin-bottom: 6px; }
.points li::marker { color: var(--orange); }
.points.mini { margin-bottom: 8px; font-size: .92rem; }
.note-line {
  margin-top: 14px; font-weight: 800; text-align: center; color: var(--navy); border-radius: var(--radius-s); padding: 12px;
  background: #fffdf6; border: 2px dashed #f3c98f;
}
.recap-list { padding-left: 0; list-style: none; counter-reset: ch; margin: 12px 0 0; }
.recap-list li { position: relative; padding-left: 36px; margin-bottom: 12px; }
.recap-list li::before {
  counter-increment: ch; content: counter(ch); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: .8rem; font-weight: 800; display: grid; place-items: center;
}
.recap-list b { color: var(--navy); }

/* クイズ */
.quiz-progress { font-size: .82rem; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.quiz-bar { height: 8px; background: var(--cream-2); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.quiz-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: 999px; transition: width .45s var(--ease); }
.quiz-q { font-weight: 800; margin-bottom: 12px; color: var(--navy); animation: fadeUp .35s var(--ease); }
.choices { display: grid; gap: 10px; }
.choice {
  font: inherit; text-align: left; width: 100%; padding: 12px 14px; min-height: 54px; display: flex; flex-wrap: nowrap; gap: 10px; align-items: flex-start; position: relative;
  border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
  animation: fadeUp .35s var(--ease) both;
}
.choice:nth-child(2) { animation-delay: .04s; } .choice:nth-child(3) { animation-delay: .08s; } .choice:nth-child(4) { animation-delay: .12s; }
.choice .cn { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--cream-2); color: var(--navy); font-size: .8rem; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.choice:hover:not(:disabled) { border-color: var(--yellow); background: #fffcf3; transform: translateY(-1px); }
.choice:disabled { cursor: default; }
.choice.correct { border-color: var(--ok); background: var(--ok-soft); color: var(--ink); animation: pop .4s var(--ease); }
.choice.correct .cn { background: var(--ok); color: #fff; }
.choice.wrong { border-color: var(--ng); background: var(--ng-soft); color: var(--ink); text-decoration: line-through; text-decoration-color: rgba(210, 73, 58, .6); animation: shake .4s var(--ease); }
.choice.wrong .cn { background: var(--ng); color: #fff; }
.choice .tag { margin-left: auto; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 0 9px; background: #fff; color: var(--ok); align-self: center; text-decoration: none; display: inline-block; }
.choice .tag.mine { background: var(--navy); color: #fff; }
.feedback { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--cream); animation: fadeUp .35s var(--ease); }
.feedback .verdict { font-weight: 800; font-size: 1.05rem; }
.feedback.ok { background: var(--ok-soft); }
.feedback.ok .verdict { color: var(--ok); }
.feedback.ng { background: var(--ng-soft); }
.feedback.ng .verdict { color: var(--ng); }
.result { text-align: center; animation: fadeUp .4s var(--ease); }
.score { font-size: 2.8rem; font-weight: 800; color: var(--orange); line-height: 1.2; }
.score small { font-size: 1rem; color: var(--muted); }
.miss { text-align: left; background: var(--cream); border-radius: 14px; padding: 12px 14px; font-size: .9rem; }
.miss ul { margin: 6px 0 0; padding-left: 18px; }
.result-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* 詳しい解説 */
.explainer h3 { color: var(--navy); padding-left: 12px; border-left: 4px solid var(--yellow); margin-top: 20px; }
.draft-note { font-size: .76rem; color: var(--muted); background: var(--cream); border-radius: 10px; padding: 8px 12px; margin: 14px 0 0; }
.verify { color: var(--muted); font-size: .8em; }

/* 現場で使う・次の話へ・回遊 */
.tool-link {
  display: block; text-decoration: none; color: var(--ink); border-radius: 14px; padding: 14px 16px; background: var(--cream); margin-bottom: 10px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.tool-link:hover { background: var(--cream-2); transform: translateY(-1px); }
.tool-link b { display: block; color: var(--navy); }
.tool-link span { font-size: .86rem; color: var(--muted); }
.ep-nav { margin: 0 0 18px; }
.next-card {
  display: block; text-decoration: none; color: #fff; border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--orange) 0%, #f0943f 55%, var(--yellow) 130%); box-shadow: 0 8px 22px rgba(226, 116, 47, .3);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.next-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(226, 116, 47, .38); }
.nc-label { display: block; font-weight: 800; font-size: .82rem; opacity: .95; }
.nc-title { display: block; font-weight: 800; font-size: 1.12rem; margin: 2px 0 4px; }
.nc-lead { display: block; font-size: .85rem; opacity: .95; }
.nav-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: .9rem; }
.nav-row .btn { margin-top: 0; padding: 9px 16px; min-height: 44px; }
.more-eps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.more-eps a { display: block; text-decoration: none; color: var(--ink); background: var(--cream); border-radius: 14px; padding: 12px 14px; transition: background .2s var(--ease), transform .2s var(--ease); }
.more-eps a:hover { background: var(--cream-2); transform: translateY(-1px); }
.more-eps .me-no { display: block; font-size: .74rem; color: var(--orange-d); font-weight: 800; }
.more-eps .me-title { display: block; font-weight: 800; color: var(--navy); line-height: 1.5; }
.exam-card { background: linear-gradient(150deg, #fff, #fff6e2); }
.exam-card .soon { display: inline-block; font-size: .7rem; font-weight: 800; color: #fff; background: var(--navy); border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: middle; }

/* 関連記事 */
.related { list-style: none; padding: 0; margin: 0; }
.related li { border-bottom: 1px solid var(--line); padding: 8px 0; font-size: .92rem; color: var(--muted); }

/* 広告・PR（ダミー） */
.ad-slot { border: 1px dashed #dccbaa; border-radius: var(--radius-s); background: #fffcf5; color: var(--muted); text-align: center; padding: 12px 10px; margin: 0 0 18px; font-size: .8rem; }
.ad-label { display: inline-block; background: #b9ab93; color: #fff; font-size: .66rem; border-radius: 4px; padding: 0 6px; margin-bottom: 4px; letter-spacing: .05em; }
.ad-body { min-height: 90px; display: grid; place-items: center; }
.shop { text-align: left; background: #fff; border-style: solid; border-color: var(--line); margin: 12px 0 0; }
.shop-head { font-weight: 800; color: var(--ink); font-size: .9rem; margin-bottom: 8px; }
.shop-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.shop-list a { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.shop-cat { display: inline-block; font-size: .7rem; color: var(--orange-d); background: var(--orange-soft); border-radius: 999px; padding: 0 8px; }
.shop-name { display: block; font-weight: 800; margin-top: 2px; }
.shop-why { display: block; font-size: .85rem; color: var(--muted); }
.shop-hook { display: block; font-size: .82rem; color: var(--ink); background: #fff4e6; border-radius: 8px; padding: 4px 8px; margin-top: 4px; }
.shop-go { display: block; font-size: .78rem; color: var(--navy); margin-top: 2px; }
.shop-note { font-size: .72rem; margin: 8px 0 0; }
.edu .ad-slot { display: none; }

/* 用語集の50音ナビ */
.kana { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 0 16px; }
.kana a, .kana span { text-align: center; padding: 9px 0; border-radius: 12px; font-weight: 800; text-decoration: none; }
.kana a { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(120, 80, 20, .1); transition: background .2s var(--ease); }
.kana a:hover { background: var(--yellow-soft); }
.kana span { color: #cbbfab; background: rgba(255, 255, 255, .5); }

/* チェックシート */
.sheet h1 { font-size: 1.25rem; border-bottom: 3px solid var(--orange); padding-bottom: 4px; }
.sheet-head { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; gap: 4px; }
.checklist { list-style: none; padding: 0; margin: 10px 0 14px; }
.checklist li { border-bottom: 1px dotted var(--line); padding: 8px 0; }
.checklist input { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; accent-color: var(--orange); }
.sheet-table { width: 100%; border-collapse: collapse; font-size: .78rem; table-layout: fixed; }
.sheet-table th, .sheet-table td { border: 1px solid #b9ab93; padding: 4px; height: 34px; }
.sheet-table th { background: var(--cream-2); }
.sheet-foot { font-size: .75rem; color: var(--muted); margin-top: 10px; }
.steps li { margin-bottom: 6px; }

.placeholder { text-align: center; padding: 40px 16px; }
.placeholder .big { font-size: 2.2rem; }

/* 法人向け問い合わせ枠（?edu=1 では非表示） */
.biz-slot { border: 2px solid var(--yellow); }
.biz-list { margin: 0 0 10px; padding-left: 20px; }
.biz-mail { font-weight: 800; font-size: 1.05rem; word-break: break-all; }
.edu .biz-slot { display: none; }

/* 人物紹介（おまけ）/chars/ */
.cmap { width: 100%; height: auto; display: block; }
.cm-line { fill: none; stroke: var(--navy); stroke-width: 3; }
.cm-line.past { stroke: #b9ab93; stroke-dasharray: 8 7; stroke-width: 2.5; }
.cm-lbl rect { fill: #fff; stroke: var(--orange); stroke-width: 1.5; }
.cm-lbl text { font-size: 16px; text-anchor: middle; fill: var(--ink); font-weight: 700; }
.cm-ring { fill: var(--yellow-soft); stroke: var(--orange); stroke-width: 3; }
.cm-name { font-size: 22px; font-weight: 800; text-anchor: middle; fill: var(--navy); }
.cm-sub { font-size: 19px; text-anchor: middle; fill: #6b6055; }
.cm-place rect { fill: #fff3dc; stroke: #d7a35a; stroke-width: 2; }
.cm-place text { font-size: 18px; text-anchor: middle; fill: #6b4a1c; font-weight: 700; }
.cm-legend { font-size: .85rem; margin: 6px 0 0; }
.cmap-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmap-wrap .cmap { min-width: 620px; }
.char-card { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; }
.char-card > * { min-width: 0; }
.char-fig { text-align: center; background: radial-gradient(circle at 50% 60%, var(--yellow-soft), transparent 70%); border-radius: var(--radius-s); }
.char-fig img { max-width: 100%; height: auto; max-height: 240px; }
.char-tag { display: inline-block; font-size: .76rem; font-weight: 800; background: var(--orange); color: #fff; border-radius: 999px; padding: 1px 10px; }
.char-body h2 { margin: 6px 0 8px; }
.char-body h2 small { font-size: .8rem; color: var(--muted); font-weight: 400; }
.char-prof { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: .93rem; }
.char-prof dt { color: var(--muted); }
.char-prof dd { margin: 0; }
.guest-grid { display: grid; gap: 12px; margin-top: 8px; }
.guest { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.guest img { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow-soft); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(120, 80, 20, .15); }
.guest span { display: block; font-size: .88rem; }
.guest .guest-role { color: var(--orange-d); font-weight: 800; }

/* ---------- サイト限定公開の印（第0話） ---------- */
.site-only { display: inline-block; font-size: .68rem; font-weight: 800; color: #fff; background: var(--navy); border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: middle; letter-spacing: .03em; }
.site-only-note { font-size: .84rem; background: var(--yellow-soft); border-radius: 10px; padding: 8px 12px; margin: 10px 0 0; }

/* ---------- クイズ結果のリアクション ---------- */
.reactions { display: grid; gap: 10px; margin: 14px 0; text-align: left; }
.react { display: flex; gap: 10px; align-items: flex-start; animation: fadeUp .45s var(--ease) both; }
.react-face { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; background: var(--yellow-soft); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(120, 80, 20, .18); object-fit: cover; }
.react-body { position: relative; background: #fff2e8; border: 1px solid #f7cfb3; border-radius: 16px; border-top-left-radius: 4px; padding: 8px 12px; }
.react-oyabun .react-body { background: #eef1f7; border-color: #d3dae8; }
.react-name { display: block; font-size: .72rem; font-weight: 800; color: var(--muted); }
.react-body p { margin: 0; font-size: .92rem; line-height: 1.7; }

/* ---------- タブレット以上 ---------- */
@media (min-width: 640px) {
  body { font-size: 17px; }
  .container { padding: 28px 24px 56px; }
  h1 { font-size: 1.7rem; }
  .card { padding: 24px 26px; }
  .hero { padding: 34px 32px 0; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: end; }
  .hero-copy { padding-bottom: 30px; }
  .hero h1 { font-size: 1.4rem; }
  .hero-grid { grid-template-columns: 1.25fr .75fr; }
  .hero-visual { margin: 0; align-self: end; }
  .hero-visual img { max-width: 320px; }
  .hero-cta .btn { display: inline-block; }
  .hero-meta { display: inline-block; margin-left: 12px; text-align: left; }
  .hero-sub { text-align: left; }
  .links3 { grid-template-columns: repeat(2, 1fr); }
  .more-eps { grid-template-columns: repeat(2, 1fr); }
  .cm-swipe { display: none; }
  .char-card { grid-template-columns: 170px minmax(0, 1fr); gap: 16px; }
  .char-fig img { max-height: 300px; }
  .cmap-wrap .cmap { min-width: 0; }
  .guest-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .gnav { display: flex; }
  .hero h1 { font-size: 1.6rem; }
  .container { max-width: 820px; }
  .toc ul { grid-template-columns: repeat(6, 1fr); }
  .links3 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 印刷 ---------- */
@media print {
  .site-header, .site-footer, .no-print, .ad-slot, .back { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card { border: none; padding: 0; box-shadow: none; }
  .container { max-width: none; padding: 0; }
  .reveal { opacity: 1; transform: none; }
  .sheet-table th, .sheet-table td { height: 28pt; }
}

/* ===== 2026-11-22 all-in-one ===== */
/* トップ：ヒーロー直下の4つの入口（横並び。スマホは2×2） */
.quick4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 18px; }
.quick4 a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); background: var(--card); border-radius: var(--radius); padding: 14px 12px; box-shadow: var(--shadow); border: 1px solid rgba(240, 226, 200, .7); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.quick4 a:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.quick4 b { color: var(--navy); font-size: .98rem; }
.quick4 span:not(.q-ico) { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.q-ico { font-size: 1.5rem; line-height: 1.2; }
@media (min-width: 640px) { .quick4 { grid-template-columns: repeat(4, 1fr); } }

/* ホーム画面に追加 */
.install { position: relative; background: linear-gradient(150deg, #fff, #fff3d6); }
.install[hidden] { display: none; }
.install-tap { display: grid; grid-template-columns: 156px 1fr; gap: 12px; align-items: center; cursor: pointer; padding-right: 32px; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.install-tap:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.install-tap:active .install-img { transform: scale(.97); }
.install-img { width: 156px; height: auto; aspect-ratio: 3 / 2; border-radius: 12px; object-fit: contain; transition: transform .15s ease; }
.install-head { display: block; color: var(--navy); font-size: 1.05rem; line-height: 1.5; }
.install-head::after { content: " ›"; display: inline-block; transition: transform .25s ease; }
.install.open .install-head::after { transform: rotate(90deg); }
.install-detail { margin-top: 12px; padding: 12px 14px; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(36, 50, 79, .10); transform-origin: top center; animation: install-pop .26s cubic-bezier(.2, .9, .3, 1.25) both; cursor: pointer; }
.install-detail[hidden] { display: none; }
@keyframes install-pop { from { opacity: 0; transform: scale(.9) translateY(-6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.install-lead { margin: 0 0 4px; font-size: .9rem; font-weight: 700; color: var(--navy); }
.install-ios { margin: 6px 0 0; padding-left: 20px; font-size: .86rem; }
.install-other { margin: 6px 0 0; font-size: .86rem; }
.install-close { position: absolute; top: 6px; right: 8px; border: none; background: transparent; font-size: 1.2rem; color: var(--muted); cursor: pointer; width: 36px; height: 36px; border-radius: 50%; }
.install-close:hover { background: var(--cream-2); }
@media (max-width: 420px) { .install-tap { grid-template-columns: 1fr; padding-right: 0; text-align: center; } .install-img { width: 210px; margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { .install-detail { animation: none; } .install-img, .install-head::after { transition: none; } }
.edu .install { display: none; }

/* 登場人物欄（ゲストだけ・顔アイコン） */
.cast-head { font-size: .8rem; font-weight: 800; color: var(--muted); margin: 12px 0 0; }
.avatar.face { object-fit: cover; background: var(--yellow-soft); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(120, 80, 20, .15); width: 44px; height: 44px; flex: 0 0 44px; padding: 0; }

/* チェックシート（場面ごと） */
.scene-grid { display: grid; gap: 12px; margin-bottom: 18px; }
.scene-link { display: flex; flex-direction: column; gap: 2px; }
.scene-link .q-ico { font-size: 1.6rem; }
.scene-prog { display: inline-block; align-self: flex-start; margin-top: 6px; font-size: .74rem; font-weight: 800; color: var(--navy); background: var(--yellow-soft); border-radius: 999px; padding: 1px 10px; }
@media (min-width: 640px) { .scene-grid { grid-template-columns: 1fr 1fr; } }
.checklist.tap li { padding: 0; }
.checklist.tap label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; cursor: pointer; border-radius: 10px; transition: background .15s var(--ease); }
.checklist.tap label:hover { background: var(--cream); }
.checklist.tap input { flex: 0 0 22px; width: 22px; height: 22px; margin: 3px 0 0; }
.checklist.tap input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(226, 116, 47, .6); }
.ck-count { font-weight: 800; color: var(--orange-d); font-size: .9rem; margin: 0; }
.sheet-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.sheet-btns .btn { margin-top: 0; }
.related-eps { text-align: center; margin-bottom: 18px; }
.calc-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .calc-grid { grid-template-columns: 1fr 1fr; } }
.calc-item label { display: block; margin-bottom: 6px; }
.calc-item label b { display: block; color: var(--navy); }
.calc-item label span { font-size: .82rem; color: var(--muted); }
.calc-item input[type="date"] { font: inherit; width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; min-height: 48px; }
.calc-item input[type="date"]:focus { border-color: var(--yellow); outline: none; }
.calc-out { margin: 8px 0 0; background: var(--cream); border-radius: 12px; padding: 10px 12px; font-size: .9rem; min-height: 3.2em; }
.calc-out b { color: var(--orange-d); font-size: 1.05rem; }
.calc-note { font-size: .76rem; margin: 12px 0 0; }

/* 検定 */
.exam-modes { display: grid; gap: 10px; }
.exam-modes .btn { margin-top: 0; }
.exam-last { font-size: .85rem; color: var(--navy); font-weight: 700; margin: 10px 0 0; }
.exam-from { font-weight: 400; color: var(--muted); }
.ex-h { margin: 22px 0 10px; font-size: 1rem; }
.ch-stats { display: grid; gap: 10px; }
.ch-row { display: grid; grid-template-columns: 1fr; gap: 4px; background: var(--cream); border-radius: 12px; padding: 10px 12px; }
.ch-row.weak { background: var(--orange-soft); }
.ch-name { font-weight: 800; color: var(--navy); font-size: .9rem; }
.weak-tag { display: inline-block; margin-left: 6px; font-size: .68rem; color: #fff; background: var(--orange); border-radius: 999px; padding: 0 8px; vertical-align: middle; }
.ch-bar { height: 10px; background: #fff; border-radius: 999px; overflow: hidden; }
.ch-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: 999px; transition: width .6s var(--ease); }
.ch-pct { font-size: .8rem; color: var(--muted); }
.weak-note { margin: 12px 0 0; font-size: .92rem; }
.review { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.rv-from { font-size: .76rem; color: var(--orange-d); font-weight: 800; margin: 0 0 2px; }
.rv-q { font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.rv-a { font-size: .9rem; margin: 0 0 6px; }
.rv-mine { color: var(--ng); }
.rv-ex { font-size: .88rem; color: #4a4036; margin: 0 0 6px; }
@media (min-width: 640px) { .exam-modes { grid-template-columns: repeat(3, auto); justify-content: start; } }
[hidden] { display: none !important; }
