/* ============================================================
   もぐらのAI — 横スクロール・パネル構成 ／ ライト×グリーン
   ・「はじめに」を中心に、左右どちらへも無限に回る
   ・パネルごとに背景・アクセント・レイアウトの型を変える
============================================================ */
:root {
  /* D2 の地。冷たい緑白をやめ、温かい紙色にした（2026-08-25 本人承認） */
  --bg:        #FAF9F5;
  --bg2:       #F4F2EC;
  --card:      rgba(255,255,255,0.72);
  --card-solid:#FFFFFF;
  --ink:       #14181A;
  --ink-soft:  #2C3A33;   /* 背景写真の上でも 4.5 を確保する濃さ（2026-08-25 実測で調整） */
  --muted:     #445349;   /* 同上 */   /* 小さい文字でも 4.5:1 を満たす濃さ */
  --line:      rgba(20,24,26,0.13);
  --line-soft: rgba(20,24,26,0.07);
  --green:     #0B5E43;   /* 深い緑。主色 */
  --green-dp:  #0B5E43;
  --green-lt:  #BFCFC5;
  --green-pale:#E7EFE9;
  --gold:      #C8B27A;   /* 金の細帯。天の2pxだけに使う */
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --display: 'Zen Kaku Gothic New', system-ui, sans-serif;
  --sans: 'Zen Kaku Gothic New', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --accent: #0B5E43;
  --label: #0B5E43;
  --grad: linear-gradient(90deg, #0B5E43 0%, #0B5E43 100%);
  --panel-bg: transparent;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* 枠線を全部外した以上、ブラウザ標準の枠も明示的に消す
   （消し忘れるとボタンだけ黒い枠が出る。2026-08-25 実際に出た） */
button, input, select, textarea { border: none; font: inherit; color: inherit; }

html { scroll-behavior: smooth; }
@view-transition { navigation: auto; }

/* 紙の地。①光の階調 ②紙の粒子 の2枚だけ。
   方眼も段組みの縦罫も外した（2026-08-25 本人指示「縦線も横線もいらない」）。
   線を引かずに、光と粒子だけで面に深みを出す。 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% -8%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(20,24,26,0) 72%, rgba(20,24,26,0.03) 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: radial-gradient(rgba(20,24,26,0.5) 0.4px, transparent 0.5px);
  background-size: 3px 3px;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--green-pale); color: var(--ink); }

/* ============ ページの背景写真 ============
   写真をそのまま敷くと文字が読めなくなるので、必ず紙色の薄膜を重ねる。
   膜の濃さは --veil で調整（既定 0.82）。写真は片側に寄せて置く。 */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-position: var(--bg-pos, right center);
  background-size: cover;
  background-repeat: no-repeat;
  opacity: var(--bg-opacity, 1);
}
.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    var(--veil-angle, 90deg),
    rgba(250,249,245, 0.96) 0%,
    rgba(250,249,245, 0.82) 42%,
    rgba(250,249,245, 0.70) 100%);
}

/* 膜の向き。全ページで「絵は右・文字は左」だと単調になるので振る
   （2026-08-25 本人指摘）。文字の位置も向きに合わせて動かす。 */
.dir-left  { --veil-angle: 90deg; }
.dir-top   { --veil-angle: 180deg; }
.dir-diag  { --veil-angle: 135deg; }
.dir-top .page   { justify-content: flex-start; padding-top: 132px; }
.dir-diag .page  { justify-content: flex-start; padding-top: 150px; }
@media (min-width: 900px) {
  .dir-top .page  { padding-top: 168px; }
  .dir-diag .page { padding-top: 186px; }
}

/* ============ ページの版面 ============
   2026-08-25 に1枚の長いページから7ページへ分割した。
   1節＝1ページなので、画面の高さに合わせず中身の分だけ伸ばす。 */
.page {
  width: 100%;
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 116px 20px 88px;
}
@media (min-width: 900px) { .page { padding: 150px 48px 110px; } }
.page-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ページ送りの足元 */
.site-foot {
  padding: 30px 20px 40px;
  position: relative;
  z-index: 2;
}
@media (min-width: 900px) { .site-foot { padding: 34px 48px 46px; } }
.foot-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.foot-mark { font-size: 1.02rem; font-weight: 900; letter-spacing: 0.02em; }
.foot-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }

/* 現在のページをタブで示す */
.tab[aria-current="page"] {
  color: var(--green);
  background: var(--green-pale);
  font-weight: 700;
}
.tab[aria-current="page"] .tab-no { color: var(--green); }

/* ============ 装飾（必ずこの層に入れる） ============
   パネル直下に置くと、はみ出した分だけ縦スクロールが伸びる */
.deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.watermark {
  position: absolute;
  right: 3vw;
  bottom: -3vh;
  font-family: var(--display);
  font-size: clamp(9rem, 26vw, 24rem);
  font-weight: 700;
  line-height: 1;
  color: rgba(20,24,26,0.032);
  user-select: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--label);
  text-transform: uppercase;
  margin-bottom: 22px;
  width: 100%;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--green); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1 { font-size: clamp(2.3rem, 6.4vw, 5.4rem); font-weight: 900; line-height: 1.14; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.7rem, 3.8vw, 3.1rem); font-weight: 900; line-height: 1.22; letter-spacing: -0.008em; }
.lead {
  color: var(--ink-soft);
  font-size: clamp(0.9rem, 1.15vw, 1.02rem);
  line-height: 2.05;
  max-width: 620px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  position: relative;
  overflow: hidden;
}
.btn-primary { background: var(--grad); color: #FFFFFF; box-shadow: 0 4px 14px rgba(5,150,105,0.24); }
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%);
  transform: translateX(-110%);
  transition: transform 0.7s;
}
.btn-primary:hover::before { transform: translateX(110%); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(5,150,105,0.34); }
.btn-ghost {
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font-weight: 700;
}
.btn-ghost:hover { border-color: var(--green); background: var(--green-pale); }

/* 天の縁。緑から金へ。ここだけは残す（版面の縁取りとして働く） */
.top-edge {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: linear-gradient(90deg, var(--green) 0%, var(--green) 62%, var(--gold) 62%, var(--gold) 100%);
}

/* ============ ヘッダー / タブ ============ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(250, 249, 245, 0.82);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px);
}
.bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
@media (min-width: 900px) { .bar { padding: 14px 40px; } }
.logo {
  font-family: var(--display);
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  flex-shrink: 0;
}
.logo-tag { font-family: var(--mono); font-size: 9.5px; color: var(--muted); letter-spacing: 0.2em; }
@media (max-width: 620px) { .logo-tag { display: none; } }

.tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab .tab-no { font-family: var(--mono); font-size: 9.5px; color: var(--muted); transition: color 0.25s; }
.tab:hover { color: var(--ink); background: var(--bg2); }
.tab[aria-selected="true"] { color: var(--green-dp); background: var(--green-pale); }
.tab[aria-selected="true"] .tab-no { color: var(--green-dp); }
@media (max-width: 760px) { .tab { padding: 8px 11px; font-size: 0.76rem; } .tab .tab-no { display: none; } }

/* ヘッダー下の進捗バー。縦スクロールでは「どこまで読んだか」を表す */
#rail {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.15s linear;
}

/* ============================================================
   01 INTRO — 方眼＋緑のにじみ
============================================================ */
.p-intro {
  --accent: #059669;
  --label: #047857;
  --grad: linear-gradient(115deg, #059669 0%, #34D399 100%);
}
.p-intro .deco::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(5,150,105,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5,150,105,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, #000 20%, transparent 76%);
}
.intro-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .intro-grid { grid-template-columns: 1.12fr 0.88fr; gap: 64px; } }
.term-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  background: #FFFFFF;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 26px;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(12,31,23,0.05);
}
.term-chip .mk { color: var(--green); font-weight: 700; }
.caret {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--green);
  animation: blink 1.1s steps(1) infinite;
  vertical-align: -2px;
  flex-shrink: 0;
}
@keyframes blink { 50% { opacity: 0; } }

.plate {
  position: relative;
  aspect-ratio: 4/5;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(12,31,23,0.1), 0 0 0 6px rgba(52,211,153,0.09);
}
.plate img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.plate-bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 9px 13px;
  background: #0F2E22;
  z-index: 2;
}
.plate-bar i { width: 9px; height: 9px; border-radius: 50%; }
.plate-bar i:nth-child(1) { background: #FF6058; }
.plate-bar i:nth-child(2) { background: #FFBD2E; }
.plate-bar i:nth-child(3) { background: #34D399; }
.plate-bar span { margin-left: 7px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.13em; color: #7FBFA3; }

/* ============ 作品のタイル ============
   時系列（今／次／その先）をやめ、作ったものを並べる形にした（2026-08-25 本人指示）。
   実物があるものだけ写真を付ける。まだ無いものは面を薄くして区別する。 */
.tiles {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}
@media (min-width: 720px)  { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }

.tile {
  background: rgba(255,255,255,0.72);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,24,26,0.10); }
.tile-shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--green-pale);
}
.tile-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.tile:hover .tile-shot img { transform: scale(1.04); }
.tile-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.tile-cat {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--label); margin-bottom: 10px;
}
.tile h3 { font-size: 1.06rem; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.tile p { font-size: 0.82rem; line-height: 1.95; color: var(--ink-soft); flex-grow: 1; }
.tile-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.tile-link {
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--green);
  text-decoration: underline; text-underline-offset: 3px;
}

/* タイルはどこを押してもリンク先へ行く（2026-08-26 本人指示）。
   リンクを増やすのではなく、既にあるリンクの当たり判定だけ面いっぱいに広げる。
   タイルごと <a> で包むと、中の説明文まで全部リンクの名前として
   読み上げられてしまうため、この形にしている。 */
.tile { position: relative; }
.tile-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.tile:has(.tile-link) { cursor: pointer; }
/* キーボードで辿ったとき、どのタイルにいるか分かるようにする */
.tile-link:focus-visible { outline: none; }
.tile-link:focus-visible::after {
  outline: 2px solid var(--green);
  outline-offset: -3px;
}
/* 面を押したときの手応え。押している間だけ少し沈む */
.tile:has(.tile-link):active { transform: translateY(-1px); }
/* まだ無いものは面を薄くして、写真の枠も置かない */
.tile-soon { background: rgba(255,255,255,0.34); }
.tile-soon:hover { transform: none; box-shadow: none; }
.tile-soon h3 { color: var(--ink-soft); }

/* ============================================================
   02 WORKS — 3本の柱を横に並置
============================================================ */
.p-works {
  --accent: #0E9F6E;
  --label: #06694A;
  --grad: linear-gradient(115deg, #0E9F6E 0%, #6EE7B7 100%);
}
.cols { display: grid; gap: 18px; margin-top: 30px; }
@media (min-width: 860px) { .cols { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.col-head {
  display: flex;
  align-items: baseline;
  gap: 11px;
  padding-bottom: 6px;
  margin-bottom: 18px;
}
.col-en { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.3em; color: var(--label); text-transform: uppercase; }
.col-ja { font-size: 0.92rem; font-weight: 700; }
.col-when { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: auto; }

.card {
  background: rgba(255,255,255,0.66);
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(12,31,23,0.04);
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.35s;
}
.card:hover { transform: translateY(-4px); border-color: var(--green-lt); box-shadow: 0 14px 34px rgba(12,31,23,0.1); }
.card:hover::before { opacity: 1; }
.card-dashed { background: rgba(255,255,255,0.28); box-shadow: none; }
.card-dashed:hover { transform: none; box-shadow: none; }
.card-dashed:hover::before { opacity: 0; }
.cat { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--label); margin-bottom: 9px; }
.card h3 { font-size: 1.04rem; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.card p { font-size: 0.81rem; color: var(--ink-soft); line-height: 1.9; }
.status {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.soon { display: grid; place-items: center; padding: 18px 0 22px; text-align: center; }
.soon-big {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.soon-small { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.28em; color: var(--muted); }

/* ============================================================
   03 METHOD — 横一列のフロー
============================================================ */
.p-method {
  --accent: #047857;
  --label: #04624A;
  --grad: linear-gradient(115deg, #047857 0%, #10B981 100%);
}
.p-method .deco::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(5,150,105,0.045) 0 1px, transparent 1px 20px);
}
.flow { display: grid; gap: 16px; margin-top: 34px; position: relative; }
@media (min-width: 900px) { .flow { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.flow::before { content: ''; display: none; }
@media (min-width: 900px) {
  .flow::before {
    display: block;
    position: absolute;
    top: 27px; left: 6%; right: 6%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--green-lt) 12%, var(--green) 88%, transparent);
    z-index: 0;
    border-radius: 2px;
  }
}
.step { position: relative; z-index: 1; }
.node {
  width: 54px; height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dp);
  background: #FFFFFF;
  margin-bottom: 16px;
  transition: all 0.35s var(--ease);
  box-shadow: 0 2px 10px rgba(12,31,23,0.05);
}
.step:hover .node {
  border-color: var(--green);
  background: var(--green-pale);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(5,150,105,0.18);
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 9px; }
.step p { font-size: 0.81rem; color: var(--ink-soft); line-height: 1.9; }
.step .tagline { margin-top: 14px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.24em; color: var(--muted); }

/* ============================================================
   04 ABOUT — 人物カード＋データ
============================================================ */
.p-about {
  --accent: #0D9488;
  --label: #0B6E67;
  --grad: linear-gradient(115deg, #0D9488 0%, #34D399 100%);
}
.p-about .deco::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(5,150,105,0.09) 1px, transparent 1.4px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 50%, #000 8%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 30% 50%, #000 8%, transparent 70%);
}
.about-grid { display: grid; gap: 30px; align-items: center; margin-top: 26px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 260px 1fr; gap: 46px; } }
.person {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  max-width: 260px;
  box-shadow: 0 6px 22px rgba(12,31,23,0.07);
}
.person .ph { aspect-ratio: 1/1; background: #fff; overflow: hidden; }
.person .ph img { width: 100%; height: 100%; object-fit: cover; }
.person .meta { padding: 15px 17px; background: rgba(255,255,255,0.5); }
.person .nm { font-weight: 700; font-size: 0.95rem; }
.person .id { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); margin-top: 2px; }
.person .loc { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.24em; color: var(--muted); margin-top: 9px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 13px; }
.chip {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--green-dp);
  background: #FFFFFF;
}
.bio p { font-size: 0.92rem; line-height: 2.05; margin-bottom: 14px; }
.hl { background: linear-gradient(transparent 60%, rgba(52,211,153,0.4) 60%); padding: 0 2px; }
.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 22px;
  padding-top: 20px;
}
@media (max-width: 560px) { .specs { grid-template-columns: 1fr 1fr; } }
.spec { border-radius: 11px; background: rgba(255,255,255,0.62); padding: 16px 18px; }
.spec b { display: block; font-size: 0.82rem; margin-bottom: 3px; }
.spec span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; color: var(--label); }

/* ============================================================
   05 DATA — グラフと表
   単一系列の大小比較なので色は1色（長さが量を表す）。
   値は全て直接ラベルを付け、同じ数値を表でも出す。
============================================================ */
.p-data {
  --accent: #0E9F6E;
  --label: #06694A;
  --grad: linear-gradient(115deg, #047857 0%, #34D399 100%);
  --bar: #059669;        /* 検証済み: 明度帯・彩度・対比すべてPASS */
  --grid: #CFE5D8;
}
.data-grid { display: grid; gap: 26px; margin-top: 26px; align-items: start; }
@media (min-width: 940px) { .data-grid { grid-template-columns: 1.15fr 0.85fr; gap: 40px; } }

.figure {
  background: var(--card);
  border-radius: 14px;
  padding: 20px 22px 16px;
  box-shadow: 0 2px 10px rgba(12,31,23,0.04);
}
.figure-head { margin-bottom: 18px; }
.figure-title { font-size: 0.95rem; font-weight: 700; }
.figure-sub { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }

/* --- 横棒グラフ --- */
/* 棒は絶対配置。flex の中で % 幅を指定すると縮められて
   全部同じ長さになってしまう（実測で判明）。 */
.chart { position: relative; }
.chart-rows { display: grid; gap: 11px; position: relative; z-index: 1; }
.metric-row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
@media (max-width: 480px) { .metric-row { grid-template-columns: 70px 1fr; gap: 9px; } }
.metric-name { font-size: 0.76rem; font-weight: 600; text-align: right; color: var(--ink); }
.metric-track { position: relative; height: 18px; }
.metric-fill {
  position: absolute;
  left: 0; top: 0;
  height: 18px;                    /* 24px以下。帯を埋めきらない */
  border-radius: 0 4px 4px 0;      /* 伸びる側だけ丸め、基線側は角のまま */
  background: var(--bar);
  width: var(--w);                 /* 既定は伸びた状態。アニメが動かない環境でも棒が消えない */
  transition: width 0.9s var(--ease), filter 0.2s;
}
/* まだ開いていないページだけ縮めておき、開いたときに伸ばす */
.deck-ready .page:not(.seen) .metric-fill { width: 0; }
.metric-row:hover .metric-fill { filter: brightness(1.1); }
.metric-val {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  margin-left: 9px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);               /* 値はデータ色を着ない */
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  left: var(--w);                  /* 既定は棒の先。棒と同じ理由でこの向きにする */
  transition: left 0.9s var(--ease), opacity 0.5s ease 0.4s;
}
.deck-ready .page:not(.seen) .metric-val { left: 0; opacity: 0; }
.metric-val span { font-size: 0.64rem; font-weight: 500; color: var(--muted); margin-left: 1px; }
/* 目盛り（1px・実線・控えめ） */
.chart-grid { position: absolute; top: 0; bottom: 0; left: 96px; right: 0; pointer-events: none; z-index: 0; }
@media (max-width: 480px) { .chart-grid { left: 79px; } }
.chart-grid i { display: none; }   /* 目盛りの縦線は外した（2026-08-25 本人指示） */
.chart-axis {
  margin-top: 9px;
  padding-left: 96px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  position: relative;
  height: 13px;
}
@media (max-width: 480px) { .chart-axis { padding-left: 79px; } }
.chart-axis i { position: absolute; transform: translateX(-50%); font-style: normal; }

/* --- 表 --- */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.tbl caption {
  text-align: left;
  font-size: 0.74rem;
  color: var(--muted);
  padding-bottom: 9px;
}
.tbl th, .tbl td { padding: 11px 12px; text-align: left; }
.tbl th {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--label);
  font-weight: 700;
}
.tbl td { color: var(--ink-soft); }
.tbl td:first-child { color: var(--ink); font-weight: 600; }
.tbl tbody tr:nth-child(odd) { background: rgba(255,255,255,0.55); }
.tbl tbody tr:hover { background: rgba(255,255,255,0.85); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- 状態のしるし（色だけに頼らず必ず文字を添える） --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-live  { color: #046C4E; border-color: #A7E8C8; background: #E7F8EF; }
.pill-prep  { color: #8A5A00; border-color: #F2DCA8; background: #FDF6E4; }
.pill-plan  { color: #4F6B5D; border-color: #D3E7DB; background: #F2F8F4; }

/* ============================================================
   06 CONTACT — ターミナルを主役に
============================================================ */
.p-contact {
  --accent: #059669;
  --label: #047857;
  --grad: linear-gradient(115deg, #10B981 0%, #059669 100%);
}
.contact-grid { display: grid; gap: 30px; align-items: center; margin-top: 26px; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 0.95fr 1.05fr; gap: 48px; } }
.terminal {
  background: #10241C;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(12,31,23,0.18);
}
.terminal .tbar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: #0B2419;
}
.terminal .tbar i { width: 9px; height: 9px; border-radius: 50%; }
.terminal .tbar i:nth-child(1) { background: #FF6058; }
.terminal .tbar i:nth-child(2) { background: #FFBD2E; }
.terminal .tbar i:nth-child(3) { background: #34D399; }
.terminal .tbar span { margin-left: 7px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.13em; color: #7FBFA3; }
.terminal pre {
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 2;
  color: #A7F3D0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 34vh;
  overflow: auto;
}
.copy-btn {
  background: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  background: #FFFFFF;
  border-radius: 8px;
  color: var(--green-dp);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover { background: var(--green-pale); }
.meta-row {
  display: flex;
  gap: 34px;
  margin-top: 26px;
  padding-top: 20px;
  flex-wrap: wrap;
}
.meta-row .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.26em; color: var(--label); margin-bottom: 4px; font-weight: 600; }
.meta-row .v { font-size: 0.86rem; font-weight: 500; }
.foot { margin-top: 30px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }

/* ============ 出現アニメ ============
   既定は「見えている」。JSの初期化が最後まで通ったときだけ隠して出す。
   JSが落ちても内容が消えないようにこの向きにしてある。 */
.deck-ready .rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
/* 一度見たページは出したまま（戻るたびに動くと読み込み直しに見えるため） */
.deck-ready .page.seen .rv { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .deck { scroll-behavior: auto; }
  .deck-ready .rv { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .btn-primary::before { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
