@charset "UTF-8";
/* そらいろのねこ — Phase 1
   デザインの決まりは CLAUDE.md §4 が正。色はここの :root が実体。 */

/* ── 色と寸法 ─────────────────────────────────── */
:root {
  --sky-top:    #9ed9f2;
  --sky-mid:    #c7eaf9;
  --sky-bottom: #eef9ff;

  --ink:        #2e3546;   /* 濃紺。真っ黒は使わない */
  --ink-soft:   #5a6478;
  --ink-faint:  #8d95a6;

  --kou:        #4caf7d;   /* 森下航：ターミナル緑 */
  --sento:      #3d8fd1;   /* せんとくん：濃いめ空色 */
  --cat-pink:   #f2a0b5;   /* 差し色 */

  --paper:      #ffffff;
  --hill:       #7fc7a0;
  --hill-pale:  #cfe8d8;

  --tag-web:    #3d8fd1;
  --tag-tool:   #4caf7d;
  --tag-video:  #e2915f;
  --tag-note:   #b07fc9;

  --gut:  16px;          /* スマホの左右余白 */
  --r:    10px;          /* 角丸 */
  --dot:  4px;           /* ドット枠の1マス */

  /* 虹色の枠。空の背景に馴染むよう彩度を落としたパステル。
     ヒーローのドット虹が「主役の虹」で、こちらは枠の彩りにとどめる。 */
  --rainbow: linear-gradient(115deg,
             #e79dae 0%, #efc189 18%, #ded282 34%,
             #8ecaa4 52%, #81bfe2 70%, #b0a3dc 88%, #e79dae 100%);

  /* 枠の4辺だけを残すドットのマスク。--dot が1マス */
  --dot-frame:
    repeating-linear-gradient(90deg, #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2)) 0 0   / 100% var(--dot) repeat-x,
    repeating-linear-gradient(90deg, #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2)) 0 100% / 100% var(--dot) repeat-x,
    repeating-linear-gradient(0deg,  #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2)) 0 0   / var(--dot) 100% repeat-y,
    repeating-linear-gradient(0deg,  #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2)) 100% 0 / var(--dot) 100% repeat-y;

  --font-dot: "DotGothic16", "MS Gothic", monospace;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
               "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

/* ── 土台 ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: linear-gradient(180deg,
              var(--sky-top) 0%, var(--sky-mid) 38%, var(--sky-bottom) 72%, var(--sky-bottom) 100%);
  background-attachment: fixed;
  overflow-x: hidden;          /* 端の1〜2pxのはみ出しで横スクロールさせない */
}

img { max-width: 100%; height: auto; display: block; }

/* ドット絵はにじませない。対応していないブラウザ向けに crisp-edges を先に置く */
.hero-cat, .cloud, .rainbow, .ground-art, .walkcat, .intro__avatar,
.card__thumb--ph {
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); color: var(--ink);
  padding: 8px 14px; z-index: 50; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

:where(a, button):focus-visible {
  outline: 3px solid var(--kou);
  outline-offset: 2px;
}

/* ══ 1. ヒーロー ══════════════════════════════════ */
.hero {
  position: relative;
  min-height: 88svh;                    /* 下のセクションの頭を覗かせる */
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}
@supports not (min-height: 1svh) { .hero { min-height: 88vh; } }

/* 上層：空 */
.hero__sky { position: relative; height: 92px; }

.cloud { position: absolute; width: 96px; opacity: .92; }
.cloud--a { top: 14px; left: 6%; }
.cloud--b { top: 46px; left: 58%; width: 72px; opacity: .8; }
.cloud--c { top: 8px;  left: 82%; width: 56px; opacity: .7; }

/* サイト唯一の明示的な虹 */
.rainbow { position: absolute; top: 30px; right: 8%; width: 84px; }

/* 中層：タイトルと猫 */
.hero__mid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px var(--gut) 0;
  text-align: center;
}

.hero__title {
  font-family: var(--font-dot);
  font-weight: 400;
  margin: 0;
  line-height: 1.35;
  letter-spacing: .02em;
  font-size: clamp(1.45rem, 7.4vw, 3rem);
  text-shadow: 0 2px 0 rgba(255,255,255,.75);
}
.hero__title-l1, .hero__title-l2 { display: block; }
.hero__title-l2 { color: var(--sento); }

.hero__lead {
  margin: 0;
  font-size: .82rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* 猫は16×16のドット絵。1マスが整数ピクセルになるよう、幅は必ず16の倍数にする。
   clamp() で可変にすると1マスが半端な幅になってドットの並びが乱れる。 */
.hero-cat {
  width: 128px;              /* ×8 */
  height: auto;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.cta {
  font-family: var(--font-dot);
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 11px 26px;
  border-radius: var(--r);
  font-size: 1rem;
  box-shadow: 0 3px 0 var(--kou);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:hover, .cta:focus-visible { transform: translateY(2px); box-shadow: 0 1px 0 var(--kou); }

/* 下層：地面帯 */
.hero__ground {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: clamp(84px, 16vw, 132px);
  margin-top: 10px;
  border-bottom: var(--dot) solid var(--ink);
}
/* 左右で画面を半分ずつ。object-fit: contain なので、どの幅でも重ならず切れない */
.ground-art { width: 50%; height: 100%; object-fit: contain; }
.ground-art--town  { object-position: left bottom; }
.ground-art--hills { object-position: right bottom; }

/* ══ 歩く猫の帯（ゾーンの仕切り） ══════════════════
   フッターの .foot__walk と同じ作り: 虹色のドット線＋その上を歩く猫。
   セクションの外（main直下）に置くので、ゾーンの左右パディングに関係なく端まで伸びる。 */
.walkband {
  position: relative;
  overflow: hidden;
  height: 46px;
}
.walkband::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--dot);
  background: var(--rainbow);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2));
  mask: repeating-linear-gradient(90deg, #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2));
}
/* 猫は線の上を歩く（足が線に乗る）。
   線を帯の上端に置いて下を歩かせる案も試したが、足の下に何も無く
   宙づりに見えたので却下した（2026-09-22）。 */
.walkband__cat {
  position: absolute;
  left: 0;
  bottom: var(--dot);
  width: 34px;
}

/* ヒーローの地面帯を歩く小さい猫。大きな静止猫と役割を分けるため小さくする */
.hero-walkcat {
  position: absolute;
  left: 0;
  bottom: var(--dot);
  width: 30px;
  z-index: 1;
}

/* ══ 共通：ゾーン ═════════════════════════════════ */
.zone {
  padding: 34px var(--gut) 40px;
  position: relative;
}
.zone--kou   { --accent: var(--kou); }
.zone--sento { --accent: var(--sento); background: rgba(255,255,255,.34); }
.zone--more  { --accent: var(--ink-soft); }

/* せんとくんゾーンの頭は丘のモチーフに変わる。
   .zone の左右パディングの外まで伸ばしたいが、負のマージンや 100vw は
   横スクロールを生むので、.zone を基準に絶対配置する。 */
.zone--sento { padding-top: 62px; }
.zone--sento::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 26px;
  background:
    radial-gradient(28px 26px at 18% 100%, var(--hill) 98%, transparent 100%),
    radial-gradient(38px 26px at 52% 100%, var(--hill) 98%, transparent 100%),
    radial-gradient(30px 26px at 84% 100%, var(--hill) 98%, transparent 100%),
    linear-gradient(var(--hill-pale), var(--hill-pale));
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 8px;
  background-position: 0 0, 0 0, 0 0, 0 100%;
}

/* ── 自己紹介 ─────────────────────────────────── */
.intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--paper);
  border-radius: var(--r);
  padding: 16px 14px;
  margin: 0 0 22px;
  border: 2px solid var(--ink);
  box-shadow: 0 var(--dot) 0 var(--accent);
}
.intro__avatar { width: 56px; flex: none; margin-top: 2px; }
.intro__body { min-width: 0; }

.intro__name {
  font-family: var(--font-dot);
  font-weight: 400;
  font-size: 1.12rem;
  margin: 0 0 4px;
  color: var(--accent);
}
.intro__text { margin: 0 0 10px; font-size: .9rem; line-height: 1.85; }

.intro__links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: .8rem;
  padding: 6px 13px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
.btn--x    { border-color: var(--ink); }
.btn--note { border-color: var(--cat-pink); }
.btn:hover { background: var(--sky-bottom); }
/* 準備中の表示。リンクではなく span なので、キーボードでも押せない */
.btn--disabled, .is-disabled {
  color: var(--ink-faint);
  border-color: var(--ink-faint);
}
span.btn--disabled { display: inline-block; }

/* ── 一軍カード ───────────────────────────────── */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.card { min-width: 0; }

.card__link {
  position: relative;
  display: block;
  text-decoration: none;
  background: var(--paper);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(46,53,70,.18);
  transition: transform .14s ease, box-shadow .14s ease;
}

/* 虹色のドット枠。色は --rainbow が持ち、ドットの形はマスクで作る。
   4辺ぶんのマスクを重ねて、枠のところだけ虹を見せている。
   枠は文字の上に乗らないので、白いカード面の可読性は変わらない。 */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: var(--r);
  background: var(--rainbow);
  -webkit-mask: var(--dot-frame);
  mask: var(--dot-frame);
  transition: filter .14s ease;
}

a.card__link:hover, a.card__link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 rgba(46,53,70,.18);
}
/* ホバーのときだけ、ほんの少し色を起こす */
a.card__link:hover::after,
a.card__link:focus-visible::after { filter: saturate(1.35); }
.card__link--dead { cursor: default; }

.card__badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 3;
  font-family: var(--font-dot);
  font-size: .68rem;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  letter-spacing: .06em;
}

.card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--sky-bottom);
  border-bottom: 2px solid var(--ink);
}
/* 画像が無いときのドット風プレースホルダ */
.card__thumb--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-dot);
  font-size: 1.5rem;
  letter-spacing: .12em;
  color: #fff;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(0deg,  rgba(255,255,255,.07) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 4px, transparent 4px 8px);
}

.card__body { display: block; padding: 13px 14px 15px; }

.card__name {
  display: block;
  font-family: var(--font-dot);
  font-size: 1.06rem;
  margin-bottom: 5px;
}
.card__note {
  display: block;
  font-size: .85rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 11px;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tag {
  font-size: .7rem;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .04em;
}
.tag--web   { background: var(--tag-web); }
.tag--tool  { background: var(--tag-tool); }
.tag--video { background: var(--tag-video); }
.tag--note  { background: var(--tag-note); }

.card__num {
  font-size: .76rem;
  color: var(--ink-soft);
  margin-left: auto;
}
.card__num b {
  font-family: var(--font-dot);
  font-weight: 400;
  font-size: .96rem;
  color: var(--ink);
  margin: 0 1px;
}

/* ── ほかにもつくったもの（二軍・明確に小さく） ── */
.more__head {
  font-family: var(--font-dot);
  font-weight: 400;
  font-size: 1.05rem;
  margin: 0 0 2px;
}
.more__lead { margin: 0 0 16px; font-size: .8rem; color: var(--ink-soft); }

.minis {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
/* 押せるカードは a、限定公開のカードは div（Tabで止まらないようにするため）。
   見た目の箱は同じなので、両方にこの指定を当てる。 */
.mini a,
.mini__box {
  display: block;
  text-decoration: none;
  background: rgba(255,255,255,.8);
  border: 2px solid rgba(46,53,70,.28);
  border-radius: 8px;
  padding: 9px 12px;
}
.mini a:hover { background: var(--paper); border-color: var(--ink); }

/* ── 限定公開（所有者しか見られないもの） ──
   バッジは一軍カードの「準備中」と同じ作りで、色だけ灰に落として控えめにする。 */
.mini--closed .mini__box {
  background: rgba(255,255,255,.5);
  border-style: dashed;
}
.mini--closed .mini__name { color: var(--ink-soft); }
.mini--closed .mini__note { color: var(--ink-faint); }
.mini__badge {
  display: inline-block;
  margin-left: 6px;
  vertical-align: 1px;
  font-family: var(--font-dot);
  font-size: .62rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--ink-faint);
  color: #fff;
  letter-spacing: .06em;
}
.mini__name {
  display: block;
  font-family: var(--font-dot);
  font-size: .9rem;
  margin-bottom: 1px;
}
.mini__note {
  display: block;
  font-size: .76rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ══ 5. フッター ══════════════════════════════════ */
.foot {
  border-top: var(--dot) solid var(--ink);
  background: rgba(255,255,255,.55);
  padding: 0 var(--gut) 26px;
  text-align: center;
}

.foot__walk {
  position: relative;
  overflow: hidden;
  height: 58px;
  margin: 0 calc(var(--gut) * -1);
}
/* 猫が歩く地面。カードの枠と同じ虹色のドットで1本引く */
.foot__walk::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--dot);
  background: var(--rainbow);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2));
  mask: repeating-linear-gradient(90deg, #000 0 var(--dot), transparent var(--dot) calc(var(--dot) * 2));
}
.walkcat { width: 44px; margin-top: 10px; }

.foot__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-bottom: 14px;
}
.foot__col { font-size: .82rem; }
.foot__who {
  display: block;
  font-family: var(--font-dot);
  font-size: .86rem;
  margin-bottom: 2px;
}
.foot__col a { margin: 0 6px; color: var(--sento); }
.foot__col a.is-disabled { color: var(--ink-faint); }

.foot__copy {
  margin: 0;
  font-family: var(--font-dot);
  font-size: .78rem;
  color: var(--ink-soft);
}

/* バージョン表記。version.json が読めたときだけ中身が入る */
.foot__ver { margin: 6px 0 0; }
.foot__ver-link {
  font-family: var(--font-dot);
  font-size: .72rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-faint);
}
.foot__ver-link:hover { color: var(--sento); border-bottom-color: var(--sento); }

/* ══ 更新履歴ページ ═══════════════════════════════ */
/* 白いカード面＋虹色のドット枠。一軍カードと同じ見た目を、中身なしで使い回す */
.sheet {
  position: relative;
  background: var(--paper);
  border-radius: var(--r);
  padding: 16px 16px 18px;
}
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--r);
  background: var(--rainbow);
  -webkit-mask: var(--dot-frame);
  mask: var(--dot-frame);
}

.zone--log { --accent: var(--sento); min-height: 60vh; }

.back { margin: 0 0 18px; font-size: .84rem; }
.back a { color: var(--sento); text-decoration: none; }
.back a:hover { text-decoration: underline; }

.log-title {
  font-family: var(--font-dot);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 4px;
}
.log-lead { margin: 0 0 22px; font-size: .84rem; color: var(--ink-soft); }

.log-list { display: grid; gap: 14px; }

.log__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  font-weight: 400;
}
.log__ver {
  font-family: var(--font-dot);
  font-size: 1.1rem;
  color: var(--sento);
}
.log__date { font-size: .76rem; color: var(--ink-soft); }

.log__changes { margin: 0; padding-left: 1.15em; }
.log__changes li { font-size: .88rem; line-height: 1.8; }

.log-empty { margin: 14px 0 0; font-size: .84rem; color: var(--ink-soft); }
.log-empty a { color: var(--sento); }

/* ══ 動き（減らす設定のときは出さない） ═══════════ */
@media (prefers-reduced-motion: no-preference) {
  /* 歩く猫は全部この1つの動きを共有する。速さだけ場所ごとに変えて、
     同時に何匹も目に入らないようにずらす。 */
  @keyframes walk {
    from { transform: translateX(-60px); }
    to   { transform: translateX(calc(100vw + 60px)); }
  }
  /* 渡りきったあと画面の外でしばらく待つ歩き方。
     ずっと誰かが歩いている状態を避け、視界に入る猫を1匹程度に保つ。 */
  @keyframes walk-sparse {
    0%   { transform: translateX(-60px); }
    55%  { transform: translateX(calc(100vw + 60px)); }
    100% { transform: translateX(calc(100vw + 60px)); }
  }
  .walkcat      { animation: walk 9s linear infinite; }          /* フッターは従来どおり */
  .hero-walkcat { animation: walk-sparse 26s linear infinite; }  /* 遠くをゆっくり */
  .walkband--a .walkband__cat { animation: walk-sparse 21s linear infinite 5s; }
  .walkband--b .walkband__cat { animation: walk-sparse 24s linear infinite 13s; }
  .cloud--a { animation: drift 34s linear infinite; }
  .cloud--b { animation: drift 48s linear infinite; }
  @keyframes drift {
    from { transform: translateX(0); }
    50%  { transform: translateX(16px); }
    to   { transform: translateX(0); }
  }
}

/* ══ 画面が広いとき ═══════════════════════════════ */
@media (min-width: 600px) {
  :root { --gut: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .minis { grid-template-columns: repeat(2, 1fr); }
  .hero-cat { width: 160px; }   /* ×10 */
  .hero__sky { height: 116px; }
}

@media (min-width: 900px) {
  :root { --gut: 32px; }
  body { font-size: 17px; }

  .hero { min-height: 82svh; }
  .hero__sky { height: 140px; }
  .cloud--a { width: 132px; }
  .rainbow  { width: 108px; top: 44px; }
  .hero__mid { gap: 14px; }
  .hero__lead { font-size: .95rem; }
  .hero-cat { width: 176px; }  /* ×11 */

  .zone { padding: 52px max(32px, calc((100% - 1080px) / 2)) 60px; }
  .zone--sento { padding-top: 78px; }

  .intro { padding: 22px 22px; gap: 18px; align-items: center; }
  .intro__avatar { width: 76px; }
  .intro__name { font-size: 1.3rem; }
  .intro__text { font-size: .95rem; }

  .cards { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .minis { grid-template-columns: repeat(5, 1fr); }
  .more__head { font-size: 1.25rem; }
}

/* ══ 詳細ページ（detail/） ═══════════════════════
   トップの見た目（空色・白カード・ドット枠・DotGothic16）をそのまま使う。
   ここの指定は detail 配下だけで使うもので、トップには影響しない。 */

/* ── ① ヘッダー ── */
.detail-head { padding-bottom: 8px; }

.detail-kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 0 0 10px;
}
.detail-credit { font-size: .78rem; color: var(--ink-soft); }

.detail-title {
  font-family: var(--font-dot);
  font-weight: 400;
  font-size: clamp(1.7rem, 8vw, 2.6rem);
  margin: 0 0 6px;
  line-height: 1.25;
}
.detail-lead { margin: 0 0 18px; font-size: .92rem; color: var(--ink-soft); }

.detail-cta-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  margin: 0 0 18px;
}
.detail-cta {
  font-family: var(--font-dot);
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 13px 30px;
  border-radius: var(--r);
  font-size: 1.05rem;
  box-shadow: 0 3px 0 var(--kou);
  transition: transform .12s ease, box-shadow .12s ease;
}
.detail-cta:hover, .detail-cta:focus-visible {
  transform: translateY(2px); box-shadow: 0 1px 0 var(--kou);
}
.detail-cta-note { font-size: .74rem; color: var(--ink-faint); font-family: var(--font-dot); }

.detail-facts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: .8rem; color: var(--ink-soft);
}
.detail-facts b { font-family: var(--font-dot); font-weight: 400; color: var(--ink); font-size: .95rem; }

/* ── 見出しと本文 ── */
.detail-h2 {
  font-family: var(--font-dot); font-weight: 400;
  font-size: 1.25rem; margin: 0 0 16px;
}
.detail-h3 {
  font-family: var(--font-dot); font-weight: 400;
  font-size: 1.02rem; margin: 22px 0 8px; color: var(--sento);
}
.detail-h3:first-of-type { margin-top: 0; }
.detail-p { margin: 0 0 14px; font-size: .9rem; line-height: 1.9; }
.detail-p--muted { font-size: .8rem; color: var(--ink-soft); }
.detail-p code, .story__text code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .86em;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(46,53,70,.18);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ── ② 起承転結 ── */
.story { display: grid; gap: 16px; }
.story__item { padding: 0; overflow: hidden; }
.story__thumb {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-bottom: 2px solid var(--ink);
  background: var(--sky-bottom);
}
.story__body { padding: 14px 16px 18px; }
.story__label {
  display: inline-block; margin: 0 0 6px;
  font-family: var(--font-dot); font-size: .72rem; line-height: 1;
  padding: 5px 10px; border-radius: 4px;
  background: var(--sento); color: #fff; letter-spacing: .1em;
}
.story__head {
  font-family: var(--font-dot); font-weight: 400;
  font-size: 1.02rem; margin: 0 0 8px; line-height: 1.5;
}
.story__text { margin: 0; font-size: .87rem; line-height: 1.9; color: var(--ink-soft); }

/* ── ③ 設計全体像 ── */
.diagram { margin: 0; padding: 14px; }
.diagram__svg { width: 100%; height: auto; display: block; }
.diagram__cap {
  margin: 10px 2px 0; font-size: .76rem; color: var(--ink-soft); text-align: center;
}

/* ── ⑤ 数字 ── */
.numbers { margin-bottom: 16px; }
.numbers__list { margin: 0; display: grid; gap: 10px 20px; grid-template-columns: 1fr; }
.numbers__list > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 1px dotted rgba(46,53,70,.2); padding-bottom: 8px;
}
.numbers__list dt { font-size: .82rem; color: var(--ink-soft); }
.numbers__list dd { margin: 0; font-size: .82rem; text-align: right; }
.numbers__list b { font-family: var(--font-dot); font-weight: 400; font-size: 1.15rem; }

/* ── ⑥ 関連リンク・次へ ── */
.detail-links { margin: 0 0 22px; padding-left: 1.15em; }
.detail-links li { font-size: .88rem; line-height: 2; }
.detail-links a { color: var(--sento); }

.detail-next { margin: 0; }
.detail-next__link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 14px 18px;
  box-shadow: 0 var(--dot) 0 var(--sento);
  transition: transform .12s ease, box-shadow .12s ease;
}
.detail-next__link:hover, .detail-next__link:focus-visible {
  transform: translateY(2px); box-shadow: 0 1px 0 var(--sento);
}
.detail-next__label { font-size: .74rem; color: var(--ink-soft); }
.detail-next__name { font-family: var(--font-dot); font-size: 1rem; }

@media (min-width: 720px) {
  .story { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .numbers__list { grid-template-columns: repeat(2, 1fr); }
  .diagram { padding: 22px; }
  .detail-h2 { font-size: 1.45rem; }
  .detail-p { font-size: .95rem; }
}
