/* タメラボ サイトの見た目（じっけんノート）
   色: 黄 #FFC83D・墨 #1E2733・白。文字: M PLUS Rounded 1c（500 と 800）。
   シリーズの色は --sc（札の色。サムネイルの左上の札と同じ）。その地に乗せる字の色は --sc-on（白。白で 3:1 に届かない明るい色だけ墨・core/series_colors.py の text_on）。 */

:root {
  --yellow: #FFC83D;
  --yellow-soft: #FFF0C2;
  --ink: #1E2733;
  --ink-2: #444E5C;
  --ink-3: #66707E;
  --paper: #FBF8F1;
  --paper-2: #F3EDE0;
  --white: #FFFFFF;
  --line: #E4DCCB;
  --line-2: #D3C9B4;
  --grid: rgba(30, 39, 51, .045);
  --sc: #1E2733;
  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic UI", system-ui, sans-serif;
  --r: 16px;
  --gut: 16px;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gut: 24px; } }
@media (min-width: 1024px) { :root { --gut: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.65; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
b, strong { font-weight: 800; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.4; margin: 0; }
:where(h1, h2, h3, .card-title, .nw-title, .row-title) { font-feature-settings: "palt"; }
html[lang="en"] :where(h1, h2, h3, .card-title, .nw-title, .row-title) { font-feature-settings: normal; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 6px var(--yellow); }
.site-foot :focus-visible { outline-color: var(--yellow); box-shadow: none; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gut); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--ink-3); font-size: 14px; }
.lead { font-size: 18px; line-height: 1.9; color: var(--ink-2); }
html[lang="en"] .lead { line-height: 1.6; }
.ext::after { content: " ↗"; font-weight: 800; }
/* 題名の折り返し: 日本語は言葉の切れ目（<wbr>）だけで折り返す。長すぎる時だけ、どこででも折る */
.ph { word-break: keep-all; overflow-wrap: anywhere; }
:where(.ep-title, .nw-title, .card-title, .row-title, .pn-t, .short-q, .sr-title, .page-title) { overflow-wrap: anywhere; text-wrap: pretty; }

/* ───── 頭 ───── */
.site-head { background: var(--paper); border-bottom: 2px solid var(--ink); position: relative; z-index: 20; }
.head-row { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand .mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-weight: 800; font-size: 22px; letter-spacing: .05em; line-height: 1; }
.head-nav { display: none; margin-left: auto; gap: 26px; }
.head-nav a { font-weight: 800; font-size: 15px; text-decoration: none; padding: 6px 0; }
.head-nav a:hover, .head-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 5px; text-underline-offset: 6px; }
.lang-switch { margin-left: auto; font-size: 13px; font-weight: 800; text-decoration: none; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; background: var(--white); line-height: 1.6; }
.lang-switch:hover { background: var(--yellow); }
.lang-long { display: none; }
.menu { position: static; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 12px; padding: 5px 10px; font-size: 13px; font-weight: 800; background: var(--white); min-height: 40px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-icon { width: 16px; height: 10px; border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); position: relative; }
.menu-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 1.25px; border-top: 2.5px solid var(--ink); }
.menu[open] summary { background: var(--yellow); }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 2px solid var(--ink); padding: 14px var(--gut) 20px; box-shadow: 0 16px 24px rgba(30, 39, 51, .12); }
.menu-h { font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .08em; margin-bottom: 6px; }
.menu-series { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.menu-series li { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.menu-series li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; }
.menu-series a { text-decoration: none; padding: 7px 0; flex: 1; }
.menu-series span { color: var(--ink-3); padding: 7px 0; }
.menu-series small { font-size: 11px; margin-left: 6px; }
.menu-site { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1.5px dashed var(--line-2); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.menu-site a { font-weight: 800; font-size: 15px; text-decoration: none; display: inline-block; padding: 6px 0; }
.menu-site a[aria-current] { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 5px; text-underline-offset: 6px; }
@media (min-width: 860px) {
  .head-row { min-height: 72px; gap: 20px; }
  .brand .mark { width: 44px; height: 44px; }
  .brand-name { font-size: 24px; }
  .head-nav { display: flex; }
  .lang-switch { margin-left: 4px; }
  .lang-long { display: inline; }
  .lang-short { display: none; }
  .menu { display: none; }
}

/* ───── 見出し・部品 ───── */
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 18px; }
.sec-head h2, .more-h { font-size: 24px; display: inline-flex; align-items: center; gap: 12px; }
.sec-head h2::before, .more-h::before { content: ""; width: 15px; height: 15px; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--ink); flex: none; transform: translateY(1px); }
.sec-note { color: var(--ink-3); font-size: 14px; }
@media (min-width: 720px) { .sec-head h2, .more-h { font-size: 28px; } }

.tape { display: inline-flex; align-items: center; gap: .4em; background: var(--sc); color: var(--sc-on, #fff); font-weight: 800; font-size: 13px; line-height: 1.5; padding: 3px 10px; border-radius: 8px; letter-spacing: .02em; white-space: nowrap; }
.tape b { font-variant-numeric: tabular-nums; opacity: .9; }
.tape-sm { font-size: 12px; padding: 1px 8px; border-radius: 7px; }
.chip { display: inline-block; font-size: 13px; line-height: 1.5; padding: 2px 10px; margin: 3px 6px 3px 0; border-radius: 999px; background: var(--white); border: 1.5px solid var(--line-2); color: var(--ink-2); }
.aka-h { font-size: 12.5px; font-weight: 800; color: var(--ink-3); margin-right: 10px; letter-spacing: .04em; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 800; line-height: 1.5; padding: 0 7px; border-radius: 6px; background: var(--yellow); color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); font-weight: 800; font-size: 15px; text-decoration: none; line-height: 1.3; transition: transform .12s, box-shadow .12s, background-color .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink); box-shadow: 3px 3px 0 var(--yellow); }

.crumbs ol { list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 13px; color: var(--ink-3); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--line-2); font-weight: 800; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ───── 回のカード ───── */
.card-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; } }
.card { display: grid; grid-template-columns: 128px 1fr; align-content: start; gap: 12px; text-decoration: none; background: var(--white); border: 1.5px solid var(--line-2); border-radius: 14px; overflow: hidden; transition: transform .14s, box-shadow .14s, border-color .14s; }
.card:hover { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--sc); }
.card-img { display: block; aspect-ratio: 16 / 9; background: var(--paper-2); align-self: start; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 10px 12px 10px 0; min-width: 0; }
.card-title { font-weight: 800; font-size: 15px; line-height: 1.5; max-width: 100%; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (min-width: 560px) {
  .card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; }
  .card-img { border-bottom: 1.5px solid var(--line); }
  .card-body { padding: 12px 14px 14px; gap: 6px; }
  .card-title { font-size: 16px; }
}

/* ───── トップ ───── */
.mast { padding-top: 26px; padding-bottom: 6px; }
.mast-title { font-size: 21px; line-height: 1.5; max-width: 26em; }
.mast-sub { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); max-width: 44em; line-height: 1.8; }
@media (min-width: 720px) { .mast { padding-top: 40px; } .mast-title { font-size: 28px; } .mast-sub { font-size: 15.5px; } }

.home main > section { margin-bottom: 48px; }
.home main > .mast { margin-bottom: 22px; }
.new .sec-head { margin-bottom: 14px; }
.nw { position: relative; }
.nw-ctrl { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.nw-segs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.nw-seg { flex: 1; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.nw-seg::before { content: none; }
.nw-fill { display: block; width: 100%; height: 6px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.nw-fill::after { content: ""; position: absolute; inset: 0; background: var(--sc); transform-origin: left; transform: scaleX(0); }
.nw-seg.is-done .nw-fill::after { transform: scaleX(1); }
.nw-seg.is-now .nw-fill::after { transform: scaleX(1); }
.js .nw-seg.is-now .nw-fill::after { transform: scaleX(0); animation: nwfill var(--dur, 6s) linear forwards; }
.nw.is-paused .nw-seg.is-now .nw-fill::after,
.nw:hover .nw-seg.is-now .nw-fill::after,
.nw:focus-within .nw-seg.is-now .nw-fill::after,
.nw.is-hidden-tab .nw-seg.is-now .nw-fill::after { animation-play-state: paused; }
@keyframes nwfill { to { transform: scaleX(1); } }
.nw-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; margin: 0 2px 0 6px; }
.nw-count b { color: var(--ink); }
.nw-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); cursor: pointer; padding: 0; }
.nw-btn:hover { background: var(--yellow); }
.nw-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nw-btn .i-play { fill: var(--ink); stroke-width: 1.5; }
.nw-pause .i-play, .nw.is-paused .nw-pause .i-pause { display: none; }
.nw.is-paused .nw-pause .i-play { display: block; }
.no-js .nw-ctrl { display: none; }
.nw-slides { display: grid; gap: 16px; }
.js .nw-slide:not(.is-on) { display: none; }
.nw-slide { display: grid; background: var(--white); border: 2px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: 6px 6px 0 var(--yellow); }
@media (prefers-reduced-motion: no-preference) { .js .nw-slide.is-on { animation: nwin .35s ease-out; } }
@keyframes nwin { from { opacity: 0; } to { opacity: 1; } }
.nw-img { display: block; min-width: 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.nw-img picture { display: block; width: 100%; height: 100%; min-width: 0; }
.nw-img img { width: 100%; height: 100%; object-fit: cover; }
.nw-text { min-width: 0; }
.nw-title, .nw-answer { max-width: 100%; }
.nw-text { padding: 16px 18px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.nw-date { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nw-title { font-size: 22px; line-height: 1.4; }
.nw-title a { text-decoration: none; }
.nw-title a:hover { text-decoration: underline; text-decoration-color: var(--sc); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.nw-answer { color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.nw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
@media (min-width: 900px) {
  .nw-slide { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; background: var(--white); }
  .nw-img { aspect-ratio: auto; border-bottom: 0; border-right: 2px solid var(--ink); align-self: stretch; display: flex; align-items: center; }
  .nw-img picture { height: auto; flex: 1 1 0; }
  .nw-img img { height: auto; aspect-ratio: 16 / 9; }
  .nw-text { padding: 30px 34px; justify-content: center; gap: 14px; }
  .nw-title { font-size: 30px; line-height: 1.35; }
  .nw-answer { font-size: 16px; }
}

.series-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .series-grid { grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 14px; } }
.sr { position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 14px 12px; background: var(--white); border: 1.5px solid var(--line-2); border-radius: 14px; text-decoration: none; transition: transform .14s, box-shadow .14s, border-color .14s; }
a.sr:hover { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--sc); }
.sr::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 5px; background: var(--sc); border-radius: 0 0 4px 4px; }
.sr-bubble { position: absolute; right: 12px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--sc); color: var(--sc-on, #fff); font-weight: 800; font-size: 14px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.sr-name { font-weight: 800; font-size: 16px; line-height: 1.45; margin-top: 6px; padding-right: 34px; }
.sr-short { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.sr-count { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.sr.is-soon { background: transparent; border-style: dashed; }
.sr.is-soon::before { opacity: .35; }
.sr.is-soon .sr-bubble { display: none; }
.sr.is-soon .sr-name { color: var(--ink-2); padding-right: 0; }
@media (max-width: 719px) {
  .sr.is-soon .sr-short { display: none; }
  .sr.is-soon { padding-bottom: 10px; }
  .sr-name { font-size: 15px; }
}
@media (min-width: 720px) { .sr { padding: 16px 16px 14px; } .sr-name { font-size: 17px; } .sr-short { font-size: 13px; } }

.tl-num { font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .06em; }
.tl-name { font-weight: 800; font-size: 16px; line-height: 1.5; }
.tl-lead { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

/* ───── 回のページ ───── */
.ep-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.ep-c { min-width: 0; }
.blk { padding-top: 26px; padding-bottom: 26px; }
.blk-label { font-size: 13px; letter-spacing: .08em; margin-bottom: 12px; }
.blk-label span { display: inline-flex; align-items: center; gap: 8px; }
.blk-label span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--ink); }
.ep-head { padding: 10px 0 6px; }
.ep-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ep-title { font-size: 27px; line-height: 1.38; margin-top: 12px; letter-spacing: .01em; max-width: 24em; }
.ep-title-tail { display: inline-block; font-size: .5em; color: var(--ink-3); margin-left: .25em; letter-spacing: .02em; vertical-align: .18em; white-space: nowrap; }
@media (max-width: 719px) { .ep-title-tail { display: block; margin: 6px 0 0; font-size: 14px; } }
@media (min-width: 720px) { .ep-title { font-size: 36px; } }
@media (min-width: 1024px) {
  .ep-grid { grid-template-columns: 128px minmax(0, 1fr); }
  .ep-grid > .ep-c { grid-column: 2; padding-left: 40px; border-left: 2px solid var(--yellow); }
  .ep-top > .ep-c { border-left-color: transparent; }
  .blk { padding-top: 0; padding-bottom: 0; }
  .blk > .ep-c { padding-top: 34px; padding-bottom: 34px; }
  .blk-label { grid-column: 1; grid-row: 1; position: sticky; top: 24px; align-self: start; text-align: right; margin: 34px 0 0; padding-right: 0; font-size: 14px; transform: translateX(9px); }
  .blk-label span { flex-direction: row-reverse; gap: 14px; }
  .blk-label span::before { width: 14px; height: 14px; background: var(--yellow); }
  .ep-title { font-size: 42px; }
  .ep-wide { max-width: 940px; }
}

.answer { list-style: none; counter-reset: a; margin: 0; padding: 16px 16px 16px 14px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 5px 5px 0 var(--yellow); max-width: 46em; }
.answer li { counter-increment: a; position: relative; padding-left: 42px; font-size: 16.5px; line-height: 1.8; margin: 6px 0; }
.answer li::before { content: counter(a); position: absolute; left: 0; top: .1em; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); font-weight: 800; font-size: 14px; line-height: 24px; text-align: center; }
html[lang="en"] .answer li { line-height: 1.6; }
@media (min-width: 720px) { .answer { padding: 20px 26px 20px 22px; } .answer li { font-size: 18px; padding-left: 48px; margin: 8px 0; } .answer li::before { width: 30px; height: 30px; line-height: 26px; } }
.aka { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.jump a { font-size: 13.5px; font-weight: 800; text-decoration: none; padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--white); }
.jump a::after { content: "↓"; margin-left: 5px; }
.jump a:hover { background: var(--yellow); }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; border: 2px solid var(--ink); background: var(--ink); }
.video-start { display: block; width: 100%; height: 100%; position: relative; }
.video-start img { width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: grid; place-items: center; transition: transform .14s; }
.video-play svg { width: 42px; height: 42px; fill: var(--ink); }
.video-start:hover .video-play { transform: scale(1.06); }
.video-dur { position: absolute; right: 12px; bottom: 12px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; padding: 2px 9px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.video iframe, .short iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.video-note a { color: var(--ink-2); font-weight: 800; }
@media (min-width: 720px) { .video-play { width: 92px; height: 92px; margin: -46px 0 0 -46px; } .video-play svg { width: 50px; height: 50px; } }

.bench { border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--white); }
.bench-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 10px 16px; background: var(--paper-2); border-bottom: 2px solid var(--ink); font-size: 13.5px; }
.bench-bar p { color: var(--ink-2); }
.bench-bar a { font-weight: 800; white-space: nowrap; }
.bench-frame { display: block; width: 100%; height: 640px; border: 0; background: #F7F5F0; }
@media (min-width: 1024px) { .bench-frame { height: 780px; } }

.sub { font-size: 14px; letter-spacing: .06em; color: var(--ink-2); margin: 0 0 12px; }
.flow { margin-bottom: 30px; max-width: 46em; }
.flow-bar { display: flex; gap: 3px; height: 10px; margin-bottom: 8px; }
.flow-bar span { background: var(--sc); border-radius: 3px; min-width: 6px; }
.flow-bar span:nth-child(even) { opacity: .5; }
.flow-list { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.flow-list a { display: grid; grid-template-columns: 62px 1fr; align-items: baseline; gap: 10px; padding: 8px 6px; border-bottom: 1.5px dashed var(--line-2); text-decoration: none; border-radius: 6px; }
.flow-list a:hover { background: var(--yellow-soft); }
.flow-t { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 7px; }
.flow-t::before { content: ""; width: 0; height: 0; border-left: 7px solid var(--sc); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.flow-l { font-size: 15px; line-height: 1.6; }

.prose { max-width: 41em; font-size: 16.5px; line-height: 1.95; overflow-wrap: anywhere; }
html[lang="en"] .prose { line-height: 1.7; }
@media (min-width: 720px) { .prose { font-size: 17px; } }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 22px; margin-top: 2.2em; padding-left: 14px; border-left: 6px solid var(--sc); line-height: 1.45; }
.prose h3 { font-size: 18.5px; margin-top: 1.9em; }
.prose h4 { font-size: 16.5px; margin-top: 1.6em; }
.prose > :first-child { margin-top: 0; }
.prose a { text-decoration: underline; text-decoration-color: var(--sc); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--yellow-soft); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose figure { margin: 1.8em 0; }
.prose figure img { width: 100%; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--white); }
.prose figcaption { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }
.prose blockquote { margin: 1.5em 0; padding: 14px 20px; background: var(--white); border-left: 5px solid var(--yellow); border-radius: 0 12px 12px 0; font-size: 1.06em; }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1.5px dashed var(--line-2); margin: 2em 0; }
.prose code { font-size: .92em; background: var(--paper-2); padding: 1px 5px; border-radius: 5px; }
.table-wrap { overflow-x: auto; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--white); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--paper-2); font-weight: 800; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 800; }
/* 10/20 運営者 R49「折り返しが多くて見づらい」: 表の中は語の途中で折らない（本文の overflow-wrap:anywhere が表に効いて
   列が 1 文字幅まで縮んでいた）・見出しも折り返してよい（長い見出しの列だけが広がっていた）・列の印は build.py が付ける */
.prose th, .prose td { overflow-wrap: normal; word-break: normal; line-break: strict; }
.prose th { white-space: normal; min-width: 3.5em; }
.prose .t-long { min-width: 11em; }
.prose .t-mid { min-width: 6.5em; }
.prose .t-short { white-space: nowrap; }
@media (max-width: 719px) { .prose .t-long { min-width: 10.5em; } }
/* スマホ: 列が多く長い文の列がある表（build.py の t-cards）は 1 行ずつのカードに。各項目の上にその列の見出しを小さく（横に送らずに読める） */
@media (max-width: 719px) {
  .prose .table-wrap.t-cards { overflow: visible; border: 0; background: none; border-radius: 0; }
  .prose .t-cards table, .prose .t-cards tbody, .prose .t-cards tr, .prose .t-cards td { display: block; width: auto; }
  .prose .t-cards thead { display: none; }
  .prose .t-cards tr { border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--white); margin: 0 0 10px; padding: 8px 14px; }
  .prose .t-cards td { border: 0; padding: 4px 0; min-width: 0; white-space: normal; }
  .prose .t-cards td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 800; color: var(--muted, #6b746f); line-height: 1.5; }
  .prose .t-cards td.t-short { display: inline-block; margin-right: 14px; }
}
@media (min-width: 1000px) { .prose .table-wrap.t-wide { width: min(940px, calc(100vw - 340px)); max-width: none; } }
.prose .cite { margin-top: .4em; font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }
.prose details { background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: 0 18px; }
.prose details > summary { cursor: pointer; font-weight: 800; padding: 12px 0; list-style: none; display: flex; align-items: center; gap: 10px; }
.prose details > summary::-webkit-details-marker { display: none; }
.prose details > summary::before { content: "+"; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; font-size: 16px; line-height: 1; }
.prose details[open] > summary::before { content: "−"; }
.prose details > :not(summary) { margin: 0 0 14px; }
.prose details small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
.prose .note { font-size: 14.5px; line-height: 1.85; color: var(--ink-2); background: var(--white); border: 1.5px dashed var(--line-2); padding: 12px 16px; border-radius: 12px; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 20px; }

/* 厚い記事の目次（deep_article.md がある回） */
.prose .toc { background: var(--white); border: 1.5px solid var(--line-2); border-radius: 12px; padding: 14px 20px 12px; }
.prose .toc-h { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--ink-3); }
.prose .toc ol, .prose .toc ul { list-style: none; margin: 0; padding: 0; }
.prose .toc ol > li { font-weight: 800; padding: 3px 0; }
.prose .toc ul { padding-left: 16px; }
.prose .toc ul li { font-weight: 500; font-size: .93em; padding: 2px 0; }
.prose .toc a { text-decoration: none; }
.prose .toc a::before { content: "›"; color: var(--sc); margin-right: 7px; font-weight: 800; }
.prose .toc a:hover { background: var(--yellow-soft); border-radius: 5px; }

.shorts { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.shorts li { scroll-snap-align: start; }
@media (min-width: 720px) { .shorts { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(190px, 220px)); gap: 18px; overflow: visible; } }
.short { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; border: 2px solid var(--ink); background: var(--sc); }
.short-start { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; color: var(--sc-on, #fff); text-decoration: none;
  background-image: linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 18px 18px; }
.short-k { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 999px; background: rgba(0, 0, 0, .22); font-variant-numeric: tabular-nums; }
.short-q { font-weight: 800; font-size: 19px; line-height: 1.45; text-wrap: balance; }
.short-play { width: 50px; height: 50px; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--ink); display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); }
.short-play svg { width: 28px; height: 28px; fill: var(--ink); }
.short-start:hover .short-play { transform: scale(1.06); }

.refs { margin: 0 0 26px; padding-left: 1.6em; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); max-width: 46em; }
.refs li { margin: .3em 0; }
.src { list-style: none; margin: 0 0 26px; padding: 0; counter-reset: s; max-width: 46em; }
.src li { counter-increment: s; border-bottom: 1.5px dashed var(--line-2); }
.src a { position: relative; display: flex; flex-direction: column; padding: 10px 6px 10px 38px; text-decoration: none; border-radius: 6px; }
.src a::before { content: counter(s); position: absolute; left: 4px; top: 13px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ink); font-size: 11.5px; font-weight: 800; line-height: 21px; text-align: center; font-variant-numeric: tabular-nums; background: var(--white); }
.src a:hover { background: var(--yellow-soft); }
.src-label { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; } /* 10/26 f127: 出典の名前に住所がそのまま入ると折り返せず、スマホで横にはみ出した */
.src-url { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; line-height: 1.6; }
.src-url::after { content: " ↗"; }
.credits { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.8; max-width: 46em; }

.more { border-top: 2px solid var(--ink); padding-top: 40px; padding-bottom: 64px; margin-top: 10px; }
.more .more-h { margin-bottom: 18px; }
.more .sub { margin-top: 34px; }
.pn { display: grid; gap: 12px; }
@media (min-width: 720px) { .pn { grid-template-columns: 1fr 1fr; gap: 16px; } }
.pn-a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 14px; border: 2px solid var(--ink); background: var(--white); text-decoration: none; }
a.pn-a:hover { box-shadow: 4px 4px 0 var(--sc); transform: translate(-2px, -2px); }
.pn-next { text-align: right; align-items: flex-end; }
.pn-k { font-size: 12.5px; font-weight: 800; color: var(--ink-3); }
.pn-t { font-weight: 800; font-size: 16px; line-height: 1.5; }
.pn-none { border: 1.5px dashed var(--line-2); background: transparent; color: var(--ink-3); font-size: 14px; justify-content: center; }
.pn-solo { padding: 14px 18px; border: 1.5px dashed var(--line-2); border-radius: 14px; color: var(--ink-2); font-size: 15px; }
.pn-solo a { font-weight: 800; margin-left: .5em; text-decoration-color: var(--sc); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ───── 広告の枠（まだ使っていない。README の「広告を入れる時」） ───── */
.ad-slot { margin: 8px 0; padding: 10px 0 14px; border-top: 1.5px dashed var(--line-2); border-bottom: 1.5px dashed var(--line-2); min-height: 120px; }
.ad-slot::before { content: "広告"; display: block; font-size: 11.5px; font-weight: 800; color: var(--ink-3); letter-spacing: .1em; margin-bottom: 6px; }
html[lang="en"] .ad-slot::before { content: "Advertisement"; }

/* ───── シリーズのページ ───── */
.sr-head { background: var(--sc); color: var(--sc-on, #fff); padding-bottom: 34px; margin-bottom: 18px;
  background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 24px 24px; border-bottom: 2px solid var(--ink); }
.sr-head .crumbs ol { color: inherit; opacity: .8; }
.sr-head .crumbs li + li::before { color: inherit; opacity: .6; }
.sr-k { margin-top: 22px; font-size: 13px; font-weight: 800; letter-spacing: .12em; opacity: .85; }
.sr-title { font-size: 38px; line-height: 1.25; margin-top: 4px; letter-spacing: .02em; }
.sr-intro { margin-top: 14px; max-width: 38em; font-size: 16px; line-height: 1.95; }
html[lang="en"] .sr-intro { line-height: 1.65; }
.sr-facts { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 14px; }
.sr-n { background: #fff; color: var(--ink); border-radius: 999px; padding: 2px 14px; font-weight: 800; }
.sr-n b { font-size: 18px; }
.sr-facts a { color: var(--sc-on, #fff); font-weight: 800; }
@media (min-width: 720px) { .sr-title { font-size: 56px; } .sr-intro { font-size: 17px; } .sr-head { padding-bottom: 46px; } }
.ep-list { list-style: none; margin: 0; padding: 0; }
.row { position: relative; display: grid; grid-template-columns: 1fr; gap: 12px; padding: 22px 0; border-bottom: 1.5px dashed var(--line-2); text-decoration: none; }
.row-n { position: absolute; left: 10px; top: 32px; z-index: 1; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; padding: 1px 9px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.row-img { display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line-2); background: var(--paper-2); }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.row-title { font-weight: 800; font-size: 20px; line-height: 1.45; }
.row-answer { color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.row:hover .row-title { text-decoration: underline; text-decoration-color: var(--sc); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.row:hover .row-img { border-color: var(--ink); }
@media (min-width: 720px) {
  .row { grid-template-columns: 88px 300px minmax(0, 1fr); gap: 26px; align-items: start; padding: 28px 0; }
  .row-n { position: static; background: none; color: var(--sc); font-size: 40px; line-height: 1; padding: 0; }
  .row-title { font-size: 23px; }
}
.sr-words { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; }
.other-series { padding-top: 40px; padding-bottom: 64px; }
.os-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.os-list a, .os-list span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--white); font-weight: 800; font-size: 14px; text-decoration: none; }
.os-list span { background: transparent; border-style: dashed; color: var(--ink-3); }
.os-list a::before, .os-list span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sc); }
.os-list a:hover { border-color: var(--ink); }
.os-list small { font-size: 12px; color: var(--ink-3); }

/* ───── 固定ページ ───── */
.page-wrap { max-width: 820px; padding-bottom: 72px; }
.page-title { font-size: 32px; margin: 18px 0 18px; }
@media (min-width: 720px) { .page-title { font-size: 40px; } }
.page-prose .lead { font-size: 18px; }
.page-prose h2 { border-left-color: var(--yellow); }
.page wrap > .more-h, .page-wrap > .more-h { margin-top: 48px; margin-bottom: 14px; }
.series-table { list-style: none; margin: 0; padding: 0; }
.series-table li { display: grid; gap: 2px 18px; padding: 12px 0; border-bottom: 1.5px dashed var(--line-2); }
@media (min-width: 720px) { .series-table li { grid-template-columns: 230px 1fr; } }
.st-name { font-weight: 800; display: inline-flex; align-items: center; gap: 10px; }
.st-name::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sc); flex: none; }
.st-short { color: var(--ink-2); font-size: 15px; }
.tool-cards { list-style: none; margin: 26px 0 36px; padding: 0; display: grid; gap: 12px; }
.tool-cards a { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 18px 20px; background: var(--white); border: 2px solid var(--ink); border-radius: 16px; text-decoration: none; }
.tool-cards a:hover { box-shadow: 5px 5px 0 var(--yellow); transform: translate(-2px, -2px); }
.tool-cards .tl-name { font-size: 20px; line-break: strict; }   /* 小さいかな・長音を行の頭に置かない（10/25 番頭）。言葉の切れ目は |phrase の <wbr> */
.tool-cards .tl-lead { font-size: 15px; }
.tl-method { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
/* タメラボ道具箱のシリーズのページ: ジャンルの見出しで並べる（10/25） */
.tool-genre { margin-top: 30px; }
.tg-h { display: flex; align-items: baseline; gap: 10px; font-size: 22px; margin: 0 0 4px; padding-bottom: 6px; border-bottom: 3px solid var(--ink); }
.tg-h small { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.tg-h small::after { content: " 回"; }
.tg-note { font-size: 13.5px; color: var(--ink-3); line-height: 1.7; margin: 8px 0 0; }
.tool-genre .tool-cards { margin-top: 14px; margin-bottom: 0; }
.nf-code { font-size: 120px; font-weight: 800; line-height: 1; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); margin-top: 30px; letter-spacing: .04em; }
.nf-wrap .lead { margin-bottom: 12px; }
.nf-wrap .lead a { font-weight: 800; }
.nf-wrap .more-h { margin-top: 48px; margin-bottom: 16px; }

/* ───── 足 ───── */
.site-foot { background: var(--ink); color: rgba(255, 255, 255, .86); margin-top: 0; border-top: 2px solid var(--ink); }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot-grid { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.3fr 1.2fr .9fr; gap: 40px; padding-top: 52px; } }
.foot-brand .brand-name { color: #fff; }
.foot-brand p { margin-top: 12px; font-size: 14px; line-height: 1.8; }
.foot-brand .ext { font-weight: 800; }
.foot-col h2 { font-size: 12.5px; letter-spacing: .1em; color: var(--yellow); margin-bottom: 10px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 2.1; }
.foot-series { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.foot-series li { display: flex; align-items: center; gap: 8px; }
.foot-series li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5); flex: none; }
.foot-series span { color: rgba(255, 255, 255, .55); }
.foot-copy { font-size: 12.5px; color: rgba(255, 255, 255, .55); padding-top: 16px; padding-bottom: 36px; border-top: 1px solid rgba(255, 255, 255, .12); }

@media print {
  body { background: #fff; }
  .site-head nav, .menu, .lang-switch, .jump, .bench, .nw-ctrl, .site-foot { display: none; }
}

/* ── ゲームの回（series.json の "kind": "game"・10/25 RICOFLUX）。押すまで読み込まない（音も押してから）。
   PC はこのページの中に縦長の枠で、スマホは全画面の play/ へ（site.js の data-game） ── */
.game { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; border: 2px solid var(--ink); background: var(--ink); }
.game.is-playing { aspect-ratio: auto; height: min(86vh, 860px); }
.game-start { display: block; width: 100%; height: 100%; position: relative; text-decoration: none; }
.game-start img { width: 100%; height: 100%; object-fit: cover; }
.game-btn { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px 12px 16px; border-radius: 999px; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); font-weight: 800; font-size: 18px; line-height: 1.2; white-space: nowrap; transition: transform .14s; }
.game-btn svg { width: 28px; height: 28px; fill: var(--ink); flex: none; }
.game-start:hover .game-btn { transform: translateX(-50%) scale(1.05); }
.game iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #cfeafc; }
.game-latest { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--sc); background: var(--white); border-radius: 0 10px 10px 0; font-size: 14px; }
.game-latest a { font-weight: 800; }
.howto { display: grid; gap: 10px; margin: 0; }
.howto > div { display: grid; grid-template-columns: 9em 1fr; gap: 4px 14px; padding: 12px 14px; background: var(--white); border: 2px solid var(--line); border-radius: 12px; }
.howto dt { font-weight: 800; }
.howto dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .howto > div { grid-template-columns: 1fr; } }
.credits-md h3 { font-size: 16px; margin-top: 1.4em; }
.sr-play { margin-top: 16px; }
.sr-play .btn { gap: 10px; background: var(--white); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }
.sr-play .btn:hover { background: var(--yellow); box-shadow: 4px 4px 0 rgba(0, 0, 0, .45); }
.sr-play small { font-weight: 800; opacity: .75; }
.sr-play { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sr-play-note { font-size: 13px; opacity: .9; max-width: 34em; }
.stage-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: 4px 14px; font-size: 14px; }
.stage-list b { font-variant-numeric: tabular-nums; margin-right: .3em; }
.prose h3 small { font-size: 13px; color: var(--ink-3); font-weight: 800; }
