/* 原田英語の英語指導法ラボ ― 「先生のノート × 黒板」ポップデザイン */
:root {
  --bg: #fff9ee;
  --bg2: #fff3dc;
  --paper: #ffffff;
  --ink: #1d1a16;
  --ink2: #57514a;
  --line: #1d1a16;
  --soft: #eadfcb;
  --grid: rgba(61, 139, 253, 0.07);
  --board: #1f4e3d;
  --board2: #173a2e;
  --chalk: #f4f1e8;
  --yellow: #ffd23f;
  --hl: rgba(255, 210, 63, 0.55);
  --coral: #ff6b5b;
  --blue: #3d8bfd;
  --green: #00a88f;
  --shadow: 4px 4px 0 var(--line);
  --shadow-s: 3px 3px 0 var(--line);
  --r: 16px;
  --font: 'Noto Sans JP', system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  --head: 'Zen Maru Gothic', 'Noto Sans JP', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #15171a; --bg2: #1c1f23; --paper: #202328; --ink: #f1ede4; --ink2: #b9b2a6; --line: #f1ede4; --soft: #343840;
    --grid: rgba(120, 170, 255, 0.06); --board: #183c30; --board2: #10291f; --hl: rgba(255, 210, 63, 0.35); color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #15171a; --bg2: #1c1f23; --paper: #202328; --ink: #f1ede4; --ink2: #b9b2a6; --line: #f1ede4; --soft: #343840;
  --grid: rgba(120, 170, 255, 0.06); --board: #183c30; --board2: #10291f; --hl: rgba(255, 210, 63, 0.35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.85; font-size: 16.5px;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--yellow); padding: 6px 10px; }
h1, h2, h3, .h2 { font-family: var(--head); font-weight: 900; line-height: 1.35; letter-spacing: 0.01em; }
b, strong { font-weight: 700; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-s); transition: transform 0.12s, box-shadow 0.12s; font-family: var(--head); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); }
.btn.primary { background: var(--yellow); color: #1d1a16; }

/* ---------- ヘッダー ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 2.5px solid var(--line); }
.head-in { max-width: 1160px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo-mark { width: 42px; height: 42px; flex: none; display: grid; place-items: center; background: var(--board); color: var(--yellow); font: 900 26px/1 var(--head); border: 2.5px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-s); transform: rotate(-4deg); }
.logo-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.logo-txt small { font-size: 11px; color: var(--ink2); font-weight: 700; }
.logo-txt b { font: 900 19px/1.2 var(--head); white-space: nowrap; }
.head-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); background: var(--paper); border-radius: 12px; font-size: 18px; cursor: pointer; text-decoration: none; color: var(--ink); }
.mode-btn { border: 2px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); padding: 7px 12px; font: 700 13px var(--head); cursor: pointer; display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.mode-btn .m-on { display: none; }
.mode-btn::before { content: '🍙'; }
html.deep-mode .mode-btn { background: var(--board); color: var(--yellow); }
html.deep-mode .mode-btn::before { content: '🎓'; }
html.deep-mode .mode-btn .m-on { display: inline; }
html.deep-mode .mode-btn .m-off { display: none; }
.gnav { max-width: 1160px; margin: 0 auto; padding: 0 16px 8px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.gnav::-webkit-scrollbar { display: none; }
.gnav a { flex: none; display: flex; gap: 4px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 2px solid transparent; text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.gnav a:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
@media (max-width: 720px) {
  .gnav { display: none; }
  .logo-txt b { font-size: 16px; }
  .mode-btn { padding: 6px 9px; font-size: 12px; }
  .icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 380px) { .logo-txt small { font-size: 10px; } .logo-txt b { font-size: 15px; } .mode-btn .m-off, html.deep-mode .mode-btn .m-on { display: none; } }

/* ---------- トップ ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at 30% 20%, #2a6650 0%, var(--board) 45%, var(--board2) 100%); color: var(--chalk); border-bottom: 3px solid var(--line); }
.hero-in { position: relative; z-index: 2; max-width: 1160px; margin: 0 auto; padding: 56px 16px 60px; }
.hero-kicker { display: inline-block; font: 700 13px var(--head); letter-spacing: 0.08em; background: var(--yellow); color: #1d1a16; padding: 4px 12px; border-radius: 6px; transform: rotate(-1.5deg); margin: 0 0 18px; }
.hero h1 { font-size: clamp(30px, 5.4vw, 58px); margin: 0 0 18px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.hero .hl { color: var(--yellow); background: linear-gradient(transparent 70%, rgba(255, 210, 63, 0.35) 70%); }
.hero-sub { max-width: 760px; font-size: 17px; opacity: 0.95; margin: 0 0 26px; }
.hero-sub b { color: var(--yellow); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-stats div { background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(244, 241, 232, 0.5); border-radius: 14px; padding: 10px 16px; min-width: 120px; }
.hero-stats b { display: block; font: 900 30px/1.1 var(--head); color: var(--yellow); }
.hero-stats span { font-size: 13px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn:not(.primary) { background: transparent; color: var(--chalk); border-color: var(--chalk); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35); }
.chalk { position: absolute; inset: 0; z-index: 1; pointer-events: none; font-family: 'Comic Sans MS', 'Segoe Print', var(--head); color: rgba(244, 241, 232, 0.13); font-weight: 700; }
.chalk span { position: absolute; font-size: clamp(22px, 3vw, 40px); white-space: nowrap; }
.chalk span:nth-child(1) { right: 6%; top: 12%; transform: rotate(-8deg); }
.chalk span:nth-child(2) { right: 14%; top: 42%; transform: rotate(5deg); }
.chalk span:nth-child(3) { right: 4%; bottom: 14%; transform: rotate(-3deg); }
.chalk span:nth-child(4) { right: 28%; bottom: 8%; transform: rotate(6deg); }
.chalk span:nth-child(5) { right: 30%; top: 8%; transform: rotate(-12deg); }
.chalk span:nth-child(6) { left: 58%; top: 64%; transform: rotate(-6deg); }
.chalk span:nth-child(7) { left: 70%; top: 26%; transform: rotate(9deg); }
@media (max-width: 720px) { .chalk span:nth-child(n + 4) { display: none; } .hero-in { padding: 36px 16px 40px; } }

.h2 { font-size: clamp(22px, 3vw, 30px); margin: 52px 0 18px; display: flex; align-items: center; gap: 10px; }
.h2::after { content: ''; flex: 1; height: 3px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); opacity: 0.25; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.how-card { background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-s); }
.how-card span { font-size: 30px; }
.how-card b { display: block; font: 900 18px var(--head); margin: 4px 0; }
.how-card p { margin: 0; font-size: 14.5px; color: var(--ink2); }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sec-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px; text-decoration: none; background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: transform 0.15s; overflow: hidden; }
.sec-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--c); }
.sec-card:hover { transform: translate(-2px, -3px) rotate(-0.4deg); }
.sec-card .se { font-size: 34px; margin-top: 4px; }
.sec-card b { font: 900 20px var(--head); }
.sec-card span:not(.se) { font-size: 14px; color: var(--ink2); }
.sec-card i { font-style: normal; font-weight: 700; color: var(--c); margin-top: auto; padding-top: 8px; filter: brightness(0.85); }
.more { text-align: right; font-weight: 700; }
.tama-banner { margin-top: 56px; margin-bottom: 40px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--yellow); color: #1d1a16; border: 3px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.tama-banner b { font: 900 19px var(--head); }
.tama-banner p { margin: 6px 0 0; font-size: 14.5px; }
.tb-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- カード ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; text-decoration: none; background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-s); border-top: 8px solid var(--c); transition: transform 0.12s, box-shadow 0.12s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); }
.card-sec { font-size: 12px; font-weight: 700; color: var(--ink2); }
.card-title { font: 900 17.5px/1.45 var(--head); }
.card-catch { font-size: 14px; color: var(--ink2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; font-size: 12.5px; }
.card .meta { font-weight: 700; color: var(--ink2); }
.lvs { display: flex; gap: 4px; }
.lv { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--bg2); border: 1.5px solid var(--soft); white-space: nowrap; }
.draft-tag { position: absolute; top: 8px; right: 8px; font-size: 11px; background: var(--coral); color: #fff; padding: 1px 8px; border-radius: 6px; font-weight: 700; }
.verdict-mini { font: 900 13px var(--head); color: #fff; background: var(--vc); padding: 2px 10px; border-radius: 6px; transform: rotate(-2deg); }
.ev { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1.5px solid currentColor; white-space: nowrap; }
.ev-stars { letter-spacing: -1px; }
.ev-strong { color: #0b7a5e; } .ev-moderate { color: #2d6bd6; } .ev-mixed { color: #b0560a; } .ev-limited { color: #8a6d00; } .ev-theory { color: #7b61ff; }
:root[data-theme='dark'] .ev-strong, :root[data-theme='dark'] .ev-moderate { filter: brightness(1.5); }

/* ---------- セクション見出し ---------- */
.sec-hero { max-width: 1160px; margin: 0 auto; padding: 26px 16px 26px; position: relative; }
.sec-hero::after { content: ''; display: block; height: 10px; margin-top: 18px; background: var(--c); border: 2.5px solid var(--line); border-radius: 999px; }
.sec-emoji { font-size: 44px; display: block; margin-top: 8px; }
.sec-hero h1 { font-size: clamp(28px, 4.5vw, 44px); margin: 4px 0 6px; }
.sec-hero p { margin: 0; color: var(--ink2); max-width: 780px; }
.sec-hero .count { font-weight: 700; margin-top: 6px; color: var(--ink); }
h2.grp { font-size: 22px; margin: 36px 0 14px; }
.crumbs { font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.crumbs a { color: var(--ink2); }

/* アクティビティの絞りこみ */
.finder { background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 18px; box-shadow: var(--shadow-s); }
.f-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.f-lab { font-weight: 900; font-family: var(--head); width: 44px; flex: none; }
.finder button { border: 2px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 4px 12px; font: 700 13.5px var(--font); cursor: pointer; }
.finder button.on { background: var(--yellow); color: #1d1a16; }
.f-count { margin: 4px 0 0; }
.finder .f-reset { background: transparent; border-style: dashed; margin-left: 8px; }
.card.hide { display: none; }

/* ---------- 記事 ---------- */
.article { max-width: 1160px; margin: 0 auto; padding: 18px 16px 40px; }
.a-head { max-width: 860px; }
.a-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 10px; }
.sec-chip { font-weight: 700; font-size: 13px; text-decoration: none; padding: 3px 12px; border-radius: 999px; background: var(--c); color: #fff; border: 2px solid var(--line); }
.rt { font-size: 12.5px; color: var(--ink2); font-weight: 700; }
.article h1 { font-size: clamp(26px, 4.2vw, 40px); margin: 6px 0 12px; }
.lead { font-size: 17.5px; font-weight: 500; margin: 0 0 14px; padding-left: 14px; border-left: 6px solid var(--c); }
.ev-note { font-size: 14px; color: var(--ink2); margin: 0 0 12px; }
.verify { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 2px dashed var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; margin: 12px 0 8px; }
.verify .v-ico { font-size: 26px; line-height: 1; }
.verify b { display: block; font-family: var(--head); font-size: 14.5px; }
.verify span { display: block; color: var(--ink2); }
.verify a { font-weight: 700; font-size: 13px; }
.act-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 12px 0; }
.act-info div { background: var(--paper); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.act-info dt { font-size: 12px; color: var(--ink2); font-weight: 700; }
.act-info dd { margin: 0; font: 900 16px var(--head); }
.verdict-stamp { display: inline-flex; flex-direction: column; align-items: center; border: 4px solid var(--vc); color: var(--vc); border-radius: 14px; padding: 6px 22px; transform: rotate(-4deg); margin: 6px 0 12px; background: var(--paper); }
.verdict-stamp span { font-size: 12px; font-weight: 700; }
.verdict-stamp b { font: 900 30px/1.1 var(--head); }

.a-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; margin-top: 18px; }
.toc-wrap { position: sticky; top: 110px; align-self: start; display: flex; flex-direction: column; gap: 12px; }
.toc { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; }
.toc b { font-family: var(--head); }
.toc ol { margin: 6px 0 0; padding-left: 20px; }
.toc li { margin: 3px 0; line-height: 1.5; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.mode-card { background: var(--bg2); border: 2px dashed var(--soft); border-radius: 14px; padding: 10px 12px; font-size: 12.5px; }
.mode-card p { margin: 4px 0 0; color: var(--ink2); }
@media (max-width: 900px) { .a-grid { grid-template-columns: 1fr; } .toc-wrap { position: static; } .mode-card { display: none; } }

.a-body { min-width: 0; max-width: 820px; }
.a-body > h2, .a-body section > h2 { font-size: clamp(21px, 3vw, 27px); margin: 44px 0 14px; padding: 6px 0 6px 14px; border-left: 8px solid var(--c); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 80%); border-radius: 4px; }
.a-body h3 { font-size: 19.5px; margin: 30px 0 10px; }
.a-body h3::before { content: '▶ '; color: var(--c); font-size: 0.8em; }
.a-body p { margin: 0 0 1.1em; }
.a-body strong { background: linear-gradient(transparent 62%, var(--hl) 62%); }
.a-body ul, .a-body ol { padding-left: 1.4em; }
.a-body li { margin: 0.3em 0; }
.a-body a { text-decoration-color: color-mix(in srgb, var(--c) 70%, transparent); text-underline-offset: 3px; }
.tw { overflow-x: auto; margin: 0 0 1.2em; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); }
.tw table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 480px; }
.tw th, .tw td { padding: 8px 12px; border-bottom: 1.5px solid var(--soft); text-align: left; vertical-align: top; }
.tw th { background: var(--bg2); font-family: var(--head); white-space: nowrap; }
.tw tr:last-child td { border-bottom: 0; }

sup.cites { line-height: 0; margin-left: 1px; }
a.cite { display: inline-block; font-size: 11px; font-weight: 700; text-decoration: none; background: var(--board); color: var(--yellow) !important; border-radius: 6px; padding: 1px 5px; margin-left: 2px; line-height: 1.4; vertical-align: super; }
a.cite:hover { background: var(--coral); color: #fff !important; }
a.gl { text-decoration: underline dotted 2px; text-decoration-color: var(--c); text-underline-offset: 4px; color: inherit; position: relative; }
.gl-tip { position: fixed; z-index: 80; max-width: min(280px, calc(100vw - 32px)); background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.6; padding: 8px 10px; border-radius: 10px; font-weight: 500; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2); pointer-events: none; }

/* ボックス */
.box { margin: 22px 0; background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-s); overflow: hidden; }
.box-head { display: flex; align-items: center; gap: 8px; font: 900 16px var(--head); padding: 9px 14px; border-bottom: 2.5px solid var(--line); background: var(--bh, var(--bg2)); color: var(--bht, var(--ink)); }
.box-head .bi { font-size: 19px; }
.box-body { padding: 14px 16px 4px; }
.box-body > *:last-child { margin-bottom: 12px; }
.box-point { --bh: var(--yellow); --bht: #1d1a16; }
.box-point .box-body { font-size: 16px; }
.box-point li { margin: 0.45em 0; }
.box-analogy { --bh: #ffe1ec; --bht: #7a1a3a; }
.box-research, .box-why { --bh: #e3efff; --bht: #123a7a; }
.box-try, .box-steps { --bh: #dff6ee; --bht: #0b5a45; border-color: var(--line); }
.box-try ol > li::marker, .box-steps ol > li::marker { font-weight: 900; color: var(--green); }
.box-caution { --bh: #ffe8e2; --bht: #8a2a12; }
.box-example, .box-variation, .box-level { --bh: #f0e9ff; --bht: #4a2a9a; }
.box-note { --bh: var(--bg2); }
.box-verdict { --bh: #fff0c2; --bht: #6b4b00; }
:root[data-theme='dark'] .box-head { --bh: var(--bg2) !important; --bht: var(--ink) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .box-head:not(.box-point .box-head) { --bh: var(--bg2); --bht: var(--ink); } }
.box-deep { border-style: solid; background: var(--board); color: var(--chalk); }
.box-deep > summary { list-style: none; cursor: pointer; --bh: var(--board2); --bht: var(--chalk); border-bottom-color: rgba(244, 241, 232, 0.35); flex-wrap: wrap; }
.box-deep > summary::-webkit-details-marker { display: none; }
.box-deep > summary::after { content: '＋ ひらく'; margin-left: auto; font-size: 12.5px; background: var(--yellow); color: #1d1a16; padding: 2px 10px; border-radius: 999px; }
.box-deep[open] > summary::after { content: '－ とじる'; }
.box-deep:not([open]) > summary { border-bottom: 0; }
.deep-label { font-size: 11px; background: var(--yellow); color: #1d1a16; padding: 1px 8px; border-radius: 6px; }
.box-deep .box-body { color: var(--chalk); }
.box-deep a { color: var(--yellow); }
.box-deep strong { background: none; color: var(--yellow); }
.box-deep a.cite { background: var(--yellow); color: #1d1a16 !important; }
.box-deep .tw { background: transparent; border-color: rgba(244, 241, 232, 0.5); }
.box-deep .tw th { background: rgba(255, 255, 255, 0.08); }
.dialog { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; }
.line { display: flex; gap: 10px; align-items: flex-start; }
.line .who { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 900 14px var(--head); border: 2px solid var(--line); }
.line.t .who { background: var(--board); color: var(--yellow); }
.line.s .who { background: var(--yellow); color: #1d1a16; }
.line .say { background: var(--bg2); border: 1.5px solid var(--soft); border-radius: 4px 14px 14px 14px; padding: 6px 12px; font-family: 'Segoe UI', Roboto, 'Helvetica Neue', var(--font); }
.line.note { font-size: 14px; color: var(--ink2); }
.speak { flex: none; border: 0; background: transparent; cursor: pointer; font-size: 17px; padding: 4px; }

/* 記事下 */
.tools .sub, .refs .sub { font-size: 13.5px; color: var(--ink2); margin-top: -4px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tool { display: flex; flex-direction: column; gap: 3px; text-decoration: none; background: var(--yellow); color: #1d1a16; border: 2.5px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-s); }
.tool b { font-family: var(--head); font-size: 16px; }
.tool span { font-size: 13px; }
.tool i { font-style: normal; font-size: 12px; font-weight: 700; margin-top: auto; }
.tool:hover { transform: translate(-1px, -1px); }
.refs ol { padding-left: 1.8em; font-size: 13.5px; line-height: 1.7; }
.refs li { margin: 0 0 10px; word-break: break-word; }
.refs li:target { background: var(--hl); border-radius: 6px; }
.vbadge { display: inline-block; font-size: 11px; font-weight: 700; background: #dff6ee; color: #0b5a45; border-radius: 6px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
.vbadge.warn { background: #ffe8e2; color: #8a2a12; }
.rnote { display: block; color: var(--ink2); font-size: 12.5px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 30px 0 10px; font-weight: 700; }
.share a, .share button { border: 2px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 4px 14px; text-decoration: none; font: 700 13.5px var(--font); cursor: pointer; }
.updated { font-size: 13px; color: var(--ink2); }
.draftbar { background: var(--coral); color: #fff; font-weight: 700; padding: 8px 16px; font-size: 13.5px; text-align: center; }

/* 用語集・表 */
.gl-tools { position: sticky; top: 100px; z-index: 5; background: var(--bg); padding: 10px 0; }
.gl-tools input, .ev-search, .big-search { width: 100%; font-size: 16px; padding: 12px 16px; border: 2.5px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); }
.gl-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gl-cats button { border: 2px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-weight: 700; cursor: pointer; }
.gl-cats button.on { background: var(--yellow); color: #1d1a16; }
.gl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 14px 0; }
.gl-item { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.gl-item { scroll-margin-top: var(--gl-tools-h, 0px); }
.gl-item:target { box-shadow: 0 0 0 4px var(--yellow); }
.gl-item dt b { font: 900 18px var(--head); }
.gl-item .en { margin-left: 8px; color: var(--ink2); font-size: 13.5px; font-style: italic; }
.gcat { float: right; font-size: 11px; background: var(--bg2); border-radius: 6px; padding: 1px 6px; }
.gl-item dd { margin: 4px 0 0; }
.gl-item .short { font-weight: 700; margin: 0 0 4px; }
.gl-item .long { font-size: 14px; color: var(--ink2); margin: 0 0 4px; }
.gpages { font-size: 13px; margin: 0; }
.gpages a { margin-right: 6px; }
.gl-item.hide { display: none; }
.ev-help { background: var(--paper); border: 2px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 14.5px; }
.ev-table td.es { font-weight: 900; font-family: var(--head); white-space: nowrap; }
.ev-table td.num { text-align: right; white-space: nowrap; }
.ev-table .q { font-size: 12.5px; color: var(--ink2); }
.ev-table th[data-sort] { cursor: pointer; }
.ev-table th[data-sort]::after { content: ' ⇅'; opacity: 0.5; }
.ev-table td.src { font-size: 12.5px; white-space: nowrap; }
.ev-table tr.hide { display: none; }
.sub { color: var(--ink2); font-size: 13.5px; }
.refdb { font-size: 14px; padding-left: 1.8em; }
.refdb li { margin-bottom: 12px; word-break: break-word; }
.refdb li.hide { display: none; }
.usedin { display: block; font-size: 12.5px; }
.search-res { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.search-res a { display: block; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; text-decoration: none; }
.search-res b { font-family: var(--head); }
.search-res span { display: block; font-size: 13.5px; color: var(--ink2); }
.prose { max-width: 820px; }
.prose h2 { font-size: 24px; margin-top: 34px; }
.steps4 li { margin-bottom: 10px; }

/* フッター */
.site-foot { margin-top: 60px; background: var(--board); color: var(--chalk); border-top: 3px solid var(--line); }
.foot-in { max-width: 1160px; margin: 0 auto; padding: 30px 16px 10px; display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.foot-brand b { font: 900 20px var(--head); color: var(--yellow); }
.foot-brand p { font-size: 14px; opacity: 0.9; }
.foot-tama a { color: var(--yellow); font-weight: 700; }
.foot-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; font-size: 14px; }
.foot-links a { text-decoration: none; opacity: 0.92; }
.foot-links a:hover { text-decoration: underline; }
.copy { max-width: 1160px; margin: 0 auto; padding: 10px 16px 26px; font-size: 12px; opacity: 0.75; }
@media (max-width: 720px) { .foot-in { grid-template-columns: 1fr; } }

@media print {
  .site-head, .site-foot, .toc-wrap, .share, .tools, .related, .verify a, .speak { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .a-grid { display: block; }
  details.box-deep { display: block; }
  details.box-deep > .box-body { display: block !important; }
  .box { box-shadow: none; break-inside: avoid; }
  .box-deep { background: #fff; color: #000; }
  .box-deep .box-body { color: #000; }
}

/* ---------- ハンバーガー・ドロワー ---------- */
.burger { width: 44px; height: 44px; border: 2.5px solid var(--line); background: var(--yellow); border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; box-shadow: 2px 2px 0 var(--line); padding: 0; flex: none; }
.burger span { display: block; width: 20px; height: 3px; background: #1d1a16; border-radius: 3px; transition: transform 0.25s, opacity 0.2s; }
html.drawer-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
html.drawer-open .burger span:nth-child(2) { opacity: 0; }
html.drawer-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.drawer-bg { position: fixed; inset: 0; z-index: 90; background: rgba(20, 18, 14, 0.45); opacity: 0; transition: opacity 0.25s; }
html.drawer-open .drawer-bg { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(360px, 88vw); background: var(--bg); border-left: 3px solid var(--line); transform: translateX(105%); visibility: hidden; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.28s; overflow-y: auto; overscroll-behavior: contain; padding: 0 14px calc(24px + env(safe-area-inset-bottom)); box-shadow: -6px 0 0 rgba(0, 0, 0, 0.12); }
html.drawer-open .drawer { transform: none; visibility: visible; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
html.drawer-open, html.drawer-open body { overflow: hidden; }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 0 10px; background: var(--bg); border-bottom: 2px dashed var(--soft); }
.drawer-head b { font: 900 18px var(--head); }
.drawer-x { width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 18px; cursor: pointer; }
.drawer-search { display: flex; gap: 6px; margin: 12px 0 8px; }
.drawer-search input { flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.drawer-search button { width: 46px; border: 2px solid var(--line); border-radius: 12px; background: var(--yellow); font-size: 18px; cursor: pointer; }
.drawer-mode { width: 100%; text-align: left; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); padding: 10px 12px; font: 700 14px var(--head); cursor: pointer; margin-bottom: 10px; }
.drawer-mode .m-on { display: none; }
html.deep-mode .drawer-mode { background: var(--board); color: var(--yellow); }
html.deep-mode .drawer-mode .m-on { display: inline; }
html.deep-mode .drawer-mode .m-off { display: none; }
.drawer-nav { display: flex; flex-direction: column; gap: 6px; }
.drawer-nav a { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 10px 12px; border: 2px solid var(--line); border-left: 8px solid var(--c, var(--line)); border-radius: 12px; background: var(--paper); min-height: 52px; }
.drawer-nav a:active { transform: scale(0.98); }
.drawer-nav .dn-ico { font-size: 24px; flex: none; width: 30px; text-align: center; }
.drawer-nav b { display: block; font: 900 15.5px/1.3 var(--head); }
.drawer-nav small { display: block; font-size: 12px; color: var(--ink2); line-height: 1.4; }
.drawer-nav .dn-home { font: 900 15.5px var(--head); }
.drawer-nav .dn-tama { background: var(--yellow); color: #1d1a16; font: 900 14.5px var(--head); justify-content: center; }

/* ---------- 上へ戻るボタン ---------- */
.totop { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 80; width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--line); background: var(--yellow); color: #1d1a16; box-shadow: 3px 3px 0 var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; cursor: pointer; opacity: 0; transform: translateY(16px) scale(0.9); transition: opacity 0.25s, transform 0.25s; }
.totop[hidden] { display: none; }
.totop.show { opacity: 1; transform: none; }
.totop span { font-size: 18px; }
.totop small { font: 900 10.5px var(--head); letter-spacing: 0.05em; margin-top: 2px; }
.totop.show:hover { transform: translateY(-3px); }
html.drawer-open .totop { display: none; }

/* ---------- スマホでの用語のふきだし ---------- */
.gl-pop { position: absolute; z-index: 70; max-width: min(320px, calc(100vw - 32px)); background: var(--ink); color: var(--bg); font-size: 14px; line-height: 1.65; padding: 10px 12px; border-radius: 12px; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25); }
.gl-pop a { color: var(--yellow); font-weight: 700; display: inline-block; margin-top: 4px; }
/* ---------- スマホの細かい調整 ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; line-height: 1.8; }
  .head-in { padding: 8px 12px; gap: 8px; }
  .head-tools { gap: 5px; }
  .head-tools a.icon-btn { display: none; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15.5px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-stats div { min-width: 0; padding: 8px 12px; }
  .hero-stats b { font-size: 24px; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .h2 { margin: 38px 0 14px; }
  .cards, .sec-grid, .how-grid, .gl-list, .tool-grid { grid-template-columns: 1fr; }
  .article { padding: 12px 14px 30px; }
  .article h1 { font-size: 25px; }
  .lead { font-size: 16px; }
  .a-body > h2, .a-body section > h2 { font-size: 21px; margin-top: 36px; }
  .box-body { padding: 12px 13px 2px; }
  .box-head { font-size: 15px; padding: 8px 12px; }
  .act-info { grid-template-columns: 1fr 1fr; }
  .verify { flex-direction: column; gap: 6px; }
  .finder { padding: 12px; }
  .f-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .f-row button { flex: none; }
  .f-lab { position: sticky; left: 0; background: var(--paper); z-index: 1; }
  .gl-tools { top: 62px; }
  .tama-banner { padding: 16px; }
  .tb-links .btn { flex: 1 1 100%; justify-content: center; }
  .share a, .share button { padding: 8px 14px; }
  .totop { width: 52px; height: 52px; }
  .refs ol, .refdb { padding-left: 1.4em; }
  .line .say { font-size: 15px; }
  .sec-hero { padding: 18px 14px; }
  /* 指で押しやすく：出典番号は見た目そのままで押せる範囲だけ広げる */
  a.cite { position: relative; }
  a.cite::after { content: ''; position: absolute; inset: -10px -1px; }
  .speak { min-width: 40px; min-height: 40px; }
  .toc li { margin: 0; }
  .toc a { display: inline-block; padding: 5px 0; }
  .crumbs a { display: inline-block; padding: 6px 0; }
  .crumbs { margin-bottom: 0; }
}

/* ---------- 先生の英語：通して再生・リピート練習 ---------- */
.play-ctl { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.play-ctl button { border: 2px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); padding: 6px 14px; font: 700 13.5px var(--head); cursor: pointer; min-height: 38px; }
.play-ctl .pc-all { background: var(--board); color: var(--yellow); }
.play-ctl .pc-rep { background: var(--yellow); color: #1d1a16; }
.play-ctl .pc-stop { background: var(--coral); color: #fff; }
.play-ctl.busy .pc-all, .play-ctl.busy .pc-rep { opacity: 0.45; }
.line { transition: transform 0.2s; border-radius: 14px; }
.line.now .say { background: var(--yellow); border-color: var(--line); color: #1d1a16; box-shadow: 2px 2px 0 var(--line); }
.line.now .who { transform: scale(1.12); }
.line.yourturn .say { background: #dff6ee; border-color: #0b5a45; color: #0b3d30; }
.line.yourturn .say::after { content: '  🗣️ Your turn!'; font-weight: 700; color: #0b5a45; white-space: nowrap; }

/* ---------- Codex のイラスト ---------- */
.hero { display: block; }
.hero-art { position: absolute; z-index: 1; right: 0; top: 0; bottom: 0; width: 46%; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%); mask-image: linear-gradient(90deg, transparent 0%, #000 32%); opacity: 0.95; }
.hero-in > * { max-width: 640px; }
.hero h1, .hero-sub { max-width: 640px; }
@media (max-width: 900px) {
  .hero-art { position: relative; width: 100%; height: 220px; }
  .hero-art img { -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 60%, transparent 100%); }
  .hero .chalk { display: none; }
}
.sec-card .se { width: 76px; height: 76px; object-fit: contain; margin-top: 6px; }
.sec-card .se.emoji { font-size: 40px; width: auto; height: auto; }
.sec-ico { display: block; width: 96px; height: 96px; object-fit: contain; margin-top: 6px; }
.sec-ico.emoji { font-size: 44px; width: auto; height: auto; }
.card-img { display: block; margin: -16px -16px 6px; aspect-ratio: 3 / 2; overflow: hidden; border-bottom: 2.5px solid var(--line); border-radius: 12px 12px 0 0; background: var(--bg2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img img { transform: scale(1.05); }
.card { overflow: hidden; }
.eyecatch { margin: 16px 0 0; max-width: 860px; border: 3px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 2; background: var(--bg2); }
.eyecatch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.setup-fig { margin: 18px 0; border: 2.5px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-s); }
.setup-fig img { display: block; width: 100%; height: auto; }
.setup-fig figcaption { font: 700 13.5px var(--head); padding: 8px 12px; border-top: 2px solid var(--line); background: var(--bg2); }
@media (max-width: 720px) { .eyecatch { border-radius: 14px; } .card-img { margin: -16px -16px 6px; } }

/* ---------- Motion ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 60; background: linear-gradient(90deg, var(--yellow), var(--coral)); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
body:not(.page-article) .progress { display: none; }
.hero h1 .ch { display: inline-block; white-space: pre; }
.card, .sec-card, .tool { will-change: transform; transition: transform 0.15s, box-shadow 0.15s; }

/* ---------- セクションのハブ（指導案・TESOL） ---------- */
.hub { margin-bottom: 10px; }
.grp-lead { margin: -6px 0 14px; color: var(--ink2); max-width: 820px; }
.road { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; counter-reset: r; }
.road li { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border: 2.5px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-s); position: relative; }
.road .rn { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--board); color: var(--yellow); font: 900 16px var(--head); border: 2px solid var(--line); }
.road b { display: block; font: 900 16px/1.4 var(--head); }
.road b a { text-decoration: none; }
.road b a:hover { text-decoration: underline; }
.road small { display: block; color: var(--ink2); font-size: 12.5px; }
.road .tb, .tb-row .tb { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; background: var(--yellow); color: #1d1a16; border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; text-decoration: none; }
.soon { color: var(--ink2); }
.soon::after { content: '（準備中）'; font-size: 11px; font-weight: 500; }
.tama-box { background: var(--yellow); color: #1d1a16; border: 3px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-s); margin: 6px 0 10px; }
.tama-box b { font: 900 17px var(--head); }
.tama-box p { margin: 4px 0 6px; font-size: 14px; }
.tb-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tama-box .tb { background: var(--paper); }
.tmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.tm { background: var(--paper); border: 2.5px solid var(--line); border-top: 8px solid var(--c); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-s); }
.tm b { display: block; font: 900 17px var(--head); }
.tm small { color: var(--ink2); }
.tm ul { margin: 6px 0 0; padding-left: 1.2em; }
.tm li { margin: 2px 0; }
.road.short { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 720px) { .road, .tmap { grid-template-columns: 1fr; } }

/* 前後のページ */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0 10px; }
.pn a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-s); }
.pn-next { text-align: right; }
.pn small { color: var(--ink2); font-size: 12px; font-weight: 700; }
.pn b { font: 900 15px/1.4 var(--head); }
@media (max-width: 720px) { .pn { grid-template-columns: 1fr; } .pn-next { text-align: left; } }

/* ---------- トップ（コンパクト・検索重視） ---------- */
.hero-home .hero-in { padding: 40px 16px 34px; }
.hero-home h1 { font-size: clamp(26px, 4.6vw, 50px); margin-bottom: 14px; }
.hero-search { display: flex; gap: 8px; max-width: 620px; margin: 0 0 12px; position: relative; z-index: 3; }
.hero-search input { flex: 1; min-width: 0; font-size: 17px; padding: 14px 16px; border: 3px solid var(--line); border-radius: 16px; background: #fff; color: #1d1a16; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); }
.hero-search button { flex: none; border: 3px solid var(--line); border-radius: 16px; background: var(--yellow); color: #1d1a16; font: 900 16px var(--head); padding: 0 18px; cursor: pointer; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); display: flex; align-items: center; gap: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 680px; margin-bottom: 16px; position: relative; z-index: 3; }
.chips a { text-decoration: none; font-size: 13.5px; font-weight: 700; color: var(--chalk); border: 1.5px solid rgba(244, 241, 232, 0.6); border-radius: 999px; padding: 4px 12px; background: rgba(255, 255, 255, 0.08); }
.chips a:hover { background: var(--yellow); color: #1d1a16; border-color: var(--yellow); }
.hero-home .hero-stats { margin-bottom: 0; position: relative; z-index: 3; }
.hero-home .hero-stats div { padding: 6px 12px; min-width: 0; }
.hero-home .hero-stats b { font-size: 24px; }
.hero-mascot { position: absolute; z-index: 4; right: 3%; bottom: -6px; width: clamp(110px, 16vw, 210px); height: auto; filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.25)); pointer-events: auto; cursor: pointer; }

.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rail-head .h2 { flex: 1; }
.rail-more { flex: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px 10px; text-decoration: none; background: var(--paper); border: 2.5px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-s); border-bottom: 7px solid var(--c); }
.tile-ico { width: 64px; height: 64px; object-fit: contain; }
.tile-ico.emoji { font-size: 36px; width: auto; height: auto; }
.tile b { font: 900 15.5px/1.3 var(--head); }
.tile small { font-size: 11.5px; color: var(--ink2); line-height: 1.4; }
.tile i { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 11px; font-weight: 900; background: var(--c); color: #fff; border-radius: 999px; padding: 0 7px; }
.how-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.how-mini { display: flex; flex-direction: column; gap: 1px; background: var(--bg2); border: 2px dashed var(--soft); border-radius: 14px; padding: 8px 12px; }
.how-mini span { font-size: 20px; }
.how-mini b { font: 900 14px var(--head); }
.how-mini small { font-size: 12px; color: var(--ink2); line-height: 1.45; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 280px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; margin: 0 -4px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.rail > .card { scroll-snap-align: start; }
.rail .card-catch { -webkit-line-clamp: 2; }
.rail-sec .h2 { margin-top: 36px; }
.tama-banner { position: relative; }
.tama-mascot { width: 92px; height: auto; flex: none; }
@media (max-width: 720px) {
  .hero-home .hero-in { padding: 22px 14px 18px; }
  .hero-home h1 { font-size: 23px; line-height: 1.4; padding-right: 86px; }
  .hero-home .hero-kicker { font-size: 11.5px; margin-bottom: 10px; }
  .hero-home .hero-art { display: none; }
  .hero-mascot { width: 92px; right: 8px; top: 34px; bottom: auto; }
  .hero-search input { font-size: 16px; padding: 12px; }
  .hero-search button span { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 12px; padding: 0 14px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { flex: none; }
  .hero-home .hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .hero-home .hero-stats div { padding: 5px 6px; text-align: center; }
  .hero-home .hero-stats b { font-size: 18px; }
  .hero-home .hero-stats span { display: block; font-size: 10.5px; line-height: 1.35; word-break: keep-all; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .tile { padding: 8px 4px 7px; border-radius: 12px; }
  .tile-ico { width: 44px; height: 44px; }
  .tile b { font-size: 13px; }
  .tile small { display: none; }
  .how-strip { display: flex; overflow-x: auto; gap: 8px; margin: 14px -14px 0; padding: 0 14px 4px; scrollbar-width: none; }
  .how-mini { flex: none; width: 170px; }
  .rail { grid-auto-columns: 78%; margin: 0 -14px; padding: 4px 14px 14px; }
  .rail-sec .h2 { margin-top: 26px; font-size: 20px; }
  .tama-mascot { width: 64px; position: absolute; right: 8px; top: -30px; }
}

/* ---------- マスコット（各ページ） ---------- */
.sec-hero { position: relative; }
.sec-mascot { position: absolute; right: 16px; bottom: 26px; width: clamp(84px, 12vw, 150px); height: auto; filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.18)); }
.box { position: relative; }
.box-mascot { position: absolute; right: -6px; top: -34px; width: 64px; height: auto; pointer-events: none; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.18)); z-index: 2; }
.box-deep .box-mascot { top: -30px; right: 54px; }
.box-point, .box-caution, .box-deep { overflow: visible; }
.box-point > .box-head, .box-caution > .box-head { border-radius: 13px 13px 0 0; }
.box-deep > summary { border-radius: 13px 13px 0 0; }
.box-deep:not([open]) > summary { border-radius: 13px; }
.nf-mascot { width: 160px; display: block; margin: 0 auto 10px; }
@media (max-width: 720px) {
  .sec-mascot { width: 72px; bottom: 30px; right: 10px; }
  .sec-hero h1 { padding-right: 70px; }
  .box-mascot { width: 50px; top: -26px; }
}
@media print { .hero-mascot, .sec-mascot, .box-mascot, .tama-mascot { display: none !important; } }
.owl-bubble { position: absolute; z-index: 6; right: calc(3% + 30px); bottom: clamp(120px, 17vw, 220px); max-width: 240px; background: #fff; color: #1d1a16; border: 2.5px solid var(--line); border-radius: 14px; padding: 8px 12px; font: 700 13.5px/1.5 var(--head); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3); opacity: 0; pointer-events: none; }
.owl-bubble::after { content: ''; position: absolute; right: 28px; bottom: -10px; border: 8px solid transparent; border-top-color: var(--line); border-bottom: 0; }
@media (max-width: 720px) { .owl-bubble { right: 10px; top: 128px; bottom: auto; max-width: 200px; font-size: 12.5px; } .owl-bubble::after { display: none; } }
@media (prefers-reduced-motion: reduce) { .owl-bubble { opacity: 1; } }

/* ---------- 横スクロールなし（原田さん 2026-10-18）：折り返し・ミニカード・表の積み重ね ---------- */
html, body { max-width: 100%; overflow-x: clip; }
.gnav { flex-wrap: wrap; overflow-x: visible; }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini { display: flex; flex-direction: column; text-decoration: none; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-s); border-bottom: 5px solid var(--c); min-width: 0; }
.mini img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 2px solid var(--line); background: var(--bg2); }
.mini-e { display: grid; place-items: center; aspect-ratio: 3 / 2; font-size: 30px; background: var(--bg2); border-bottom: 2px solid var(--line); }
.mini-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 6px 8px 7px; font: 900 13.5px/1.4 var(--head); }
.mini:hover { transform: translate(-1px, -2px); }
.tw { overflow-x: visible; }
.tw table { min-width: 0; table-layout: auto; }
.tw th, .tw td { word-break: break-word; overflow-wrap: anywhere; }
/* 表：見出しも折り返す。左の列（行の見出し）が縦書きのように細くならないよう最小幅をとる */
.tw { container-type: inline-size; container-name: tw; }
.tw th { white-space: normal; }
.tw table:not(.stack2) td:first-child { min-width: 5.5em; }
/* 列の多い表は、画面ではなく「表の置き場所」の幅で、1行を1枚のカードに切りかえる（タブレットや細い画面でもはみ出さない） */
@container tw (max-width: 760px) {
  .tw table.wide, .tw table.wide tbody, .tw table.wide tr, .tw table.wide td { display: block; width: 100%; }
  .tw table.wide thead { display: none; }
  .tw table.wide tr { border-bottom: 2px solid var(--line); padding: 6px 0; }
  .tw table.wide tr:last-child { border-bottom: 0; }
  .tw table.wide td { border: 0; padding: 4px 12px; min-width: 0; }
  .tw table.wide td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font: 900 11.5px var(--head); color: var(--ink2); }
  .tw table.wide td:first-child { font: 900 14.5px/1.5 var(--head); background: var(--bg2); padding: 7px 12px; border-radius: 6px; margin: 2px 0; }
}
@container tw (max-width: 520px) {
  .tw table.mid, .tw table.mid tbody, .tw table.mid tr, .tw table.mid td { display: block; width: 100%; }
  .tw table.mid thead { display: none; }
  .tw table.mid tr { border-bottom: 2px solid var(--line); padding: 6px 0; }
  .tw table.mid tr:last-child { border-bottom: 0; }
  .tw table.mid td { border: 0; padding: 4px 12px; min-width: 0; }
  .tw table.mid td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font: 900 11.5px var(--head); color: var(--ink2); }
}
@media (max-width: 720px) {
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mini-t { font-size: 12.5px; }
  .chips { flex-wrap: wrap; overflow-x: visible; margin: 0 0 12px; padding: 0; }
  .how-strip { display: grid; grid-template-columns: 1fr 1fr; overflow-x: visible; margin: 14px 0 0; padding: 0; }
  .how-mini { width: auto; }
  .f-row { flex-wrap: wrap; overflow-x: visible; }
  .f-lab { position: static; width: 100%; }
  /* 3列以上の表は、1行を1枚のカードに */
  .tw table.stack, .tw table.stack tbody, .tw table.stack tr, .tw table.stack td { display: block; width: 100%; }
  .tw table.stack thead { display: none; }
  .tw table.stack tr { border-bottom: 2px solid var(--line); padding: 6px 0; }
  .tw table.stack tr:last-child { border-bottom: 0; }
  .tw table.stack td { border: 0; padding: 4px 12px; }
  .tw table.stack td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font: 900 11.5px var(--head); color: var(--ink2); }
  .tw table:not(.stack) { font-size: 13.5px; }
  .ev-table thead { display: none; }
  .ev-table, .ev-table tbody, .ev-table tr, .ev-table td { display: block; width: 100%; }
  .ev-table tr { border-bottom: 2px solid var(--line); padding: 6px 0; }
  .ev-table td { border: 0; padding: 3px 12px; text-align: left !important; white-space: normal !important; }
  /* 数値は見出しが消えるので、小さなラベルをつけて横に並べる */
  .ev-table td[data-label] { display: inline-block; width: auto; padding-right: 4px; }
  .ev-table td[data-label]::before { content: attr(data-label); margin-right: 4px; font: 900 11.5px var(--head); color: var(--ink2); }
  .ev-table td.st:empty { display: none; }
  .toolbar { flex-wrap: wrap; }
}
@media (max-width: 720px) { .minis .mini:nth-child(n + 5) { display: none; } .rail-sec .h2 { margin-top: 22px; } }
@media (max-width: 720px) {
  /* 2列の表：左の列を見出し、右の列を説明として縦に */
  .tw table.stack2 td::before { content: none !important; }
  .tw table.stack2 td:first-child { font: 900 14.5px/1.5 var(--head); background: var(--bg2); padding: 7px 12px; border-radius: 6px; margin: 2px 0; }
  .tw table.stack2 td:not(:first-child) { padding: 4px 12px 8px; }
  .box-deep .tw table.stack2 td:first-child { background: rgba(255, 255, 255, 0.08); }
}
/* 記事の並び：広い画面は「左＝目次／右＝見出し→絵→本文」。目次は上から始まり、画面に貼りつかずに本文といっしょに流れる。
   900px 以下は1列で「見出し→絵→目次→本文」 */
.a-grid { grid-template-areas: "toc head" "toc fig" "toc body"; grid-template-rows: auto auto 1fr; row-gap: 0; }
.a-grid > .a-head { grid-area: head; max-width: 820px; }
.a-grid > .eyecatch { grid-area: fig; max-width: 820px; margin: 16px 0 22px; }
.a-grid > .toc-wrap { grid-area: toc; position: static; }
.a-grid > .a-body { grid-area: body; }
@media (max-width: 900px) { .a-grid { grid-template-areas: "head" "fig" "toc" "body"; grid-template-rows: auto; row-gap: 16px; } }
/* トップの緑の帯：チョーク風の飾り文字が絵の上に重なって見えるので、絵があるときは出さない */
.hero-home .chalk { display: none; }
/* 見出しが「を、」だけで1行にならない大きさに */
.hero-home h1 { font-size: clamp(26px, 3.3vw, 44px); }
/* 広い画面（1200px〜）では、緑の帯の中を「左＝文字／右＝絵」の2列にして、絵は内容の幅（1160px）の中に角丸のカードとして収める */
@media (min-width: 1200px) {
  .hero-home .hero-in > * { max-width: 540px; }
  .hero-home h1 { font-size: clamp(28px, 2.4vw, 34px); }
  .hero-home .hero-art { top: 34px; bottom: 34px; right: auto; left: calc(50% + 24px); width: min(556px, calc(50% - 44px)); border-radius: 20px; border: 3px solid rgba(255, 255, 255, 0.85); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); }
  .hero-home .hero-art img { -webkit-mask-image: none; mask-image: none; opacity: 1; object-position: 55% 45%; }
  .hero-home .hero-mascot { right: auto; top: auto; left: calc(50% + 24px + min(556px, calc(50% - 44px)) - 118px); bottom: 14px; width: 128px; }
}

/* トップの見出しの下の1行（何がのっているか） */
.hero-home .hero-lead { color: rgba(244, 241, 232, 0.92); font-size: 15px; line-height: 1.7; margin: -4px 0 16px; }
@media (max-width: 720px) { .hero-home .hero-lead { display: none; } }
.br-sp { display: none; }
@media (max-width: 720px) { .br-sp { display: inline; } }
@media (max-width: 720px) { .hero-home h1 { font-size: 22px; line-height: 1.45; } }
/* サイト内検索：件数・もしかして・本文の抜き出し */
.search-res .sr-count { margin: 10px 0 4px; font: 900 13px var(--head); color: var(--ink2); }
.search-res .sr-did { margin: 10px 0 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); }
.search-res mark { background: var(--hl); color: inherit; padding: 0 2px; border-radius: 3px; }
