/* ============================================
   場面の中身（紙もの版）— 10種のブロック
   次の回はこの中から並べ替えて中身を差し替える。
   ============================================
   共通の作り:
     .card        白いカード。紙が1枚のっている見た目（縁＋下に影）
     .card > .no  左肩に飛び出す番号タブ（色は .is-coral / .is-blue / .is-plain）
     .card .band  色のついた帯。見出しと小見出しが入る
     .card .body  白い中身
   ============================================ */

/* ── 共通：白いカードと番号タブ ───────────────────────────────────────── */
.card {
  position: relative;
  margin-left: 12px;              /* 番号タブが左へ飛び出すぶんを空けておく */
  border: 2px solid var(--card-line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 5px 0 rgba(90, 70, 40, .07), 0 14px 26px rgba(90, 70, 40, .09);

  .no {
    position: absolute;
    left: -22px;
    top: -6px;
    display: grid;
    place-items: center;
    min-width: 62px;
    height: 68px;
    padding: 0 10px;
    border-radius: 12px 4px 4px 14px;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.04em;
    box-shadow: 0 4px 0 rgba(90, 70, 40, .16);
  }

  .band {
    padding: 12px 18px 12px 56px;
    border-radius: 15px 15px 0 0;

    b {
      display: block;
      font-size: 32px;
      font-weight: 900;
      line-height: 1.2;
      letter-spacing: -.035em;
    }

    p {
      margin: 2px 0 0;
      color: #52463a;
      font-size: 19px;
      font-weight: 700;
    }
  }

  .body { padding: 14px 16px 16px }

  &.is-coral {
    .no { background: var(--coral) }
    .band { background: var(--coral-tint) }
  }

  &.is-blue {
    .no { background: var(--blue) }
    .band { background: var(--blue-tint) }
  }

  &.is-plain {
    .no { background: #8d8375 }
    .band { background: #e7e0d2 }
  }
}

/* ============================================
   1. hook — つかみ。紙の上に大きく置くだけ
   ============================================ */
.bk-hook {
  justify-content: center;
  padding-bottom: 210px;
}

.hk-line {
  position: relative;
  margin: 0;
  font-size: 58px;
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: -.045em;

  em {
    position: relative;
    color: var(--coral);
    font-style: normal;

    /* 黄色い蛍光ペン。文字の下半分に敷く */
    &::before {
      content: "";
      position: absolute;
      z-index: -1;
      left: -6px;
      right: -6px;
      bottom: 10px;
      height: 24px;
      border-radius: 6px;
      background: var(--yellow);
      opacity: .85;
    }

    /* 打ち込みカーソル。🚨 文字より先に出さない（opacity:0 を素の姿にして、
       animation-delay のあいだは何も出ないようにする。出すと真っ白な画面に
       線だけが立つ）。文字の最後にぶら下げるので、文字に重ならない */
    &::after {
      content: "";
      position: absolute;
      right: -16px;
      bottom: 12px;
      width: 6px;
      height: 52px;
      border-radius: 3px;
      background: var(--coral);
      opacity: 0;
      animation: hk-blink 1s steps(1, end) .55s infinite;
    }
  }
}

@keyframes hk-blink {
  0%, 50% { opacity: 1 }
  50.01%, 100% { opacity: 0 }
}

/* ============================================
   2. title — 名前を見せる
   ============================================ */
.bk-title {
  justify-content: center;
  padding-bottom: 200px;
}

.ti-eyebrow {
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 7px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .1em;
}

.ti-name {
  position: relative;
  margin: 0;
  font-size: 132px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.06em;

  &::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: -8px;
    bottom: 12px;
    width: 232px;
    height: 34px;
    border-radius: 8px;
    background: var(--yellow);
  }
}

.ti-date {
  margin: 14px 0 0;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: #e6dfd0;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ti-from {
  position: relative;
  margin: 24px 12px 0 12px;
  padding: 14px 18px 16px 72px;
  border: 2px solid var(--card-line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 5px 0 rgba(90, 70, 40, .07);

  .no {
    position: absolute;
    left: -22px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 82px;
    height: 44px;
    padding: 0 9px;
    border-radius: 12px 4px 4px 12px;
    color: #fff;
    background: var(--blue);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.05em;
    box-shadow: 0 4px 0 rgba(90, 70, 40, .16);
  }

  p {
    margin: 0;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.03em;
  }
}

.ti-stamp {
  align-self: flex-start;
  margin: 24px 0 0;
  padding: 10px 20px;
  border: 3px solid var(--coral);
  border-radius: 14px;
  color: var(--coral);
  background: #fff6ef;
  font-size: 24px;
  font-weight: 900;
  rotate: -3deg;

  b { font-size: 31px }
}

/* ============================================
   3. real — 公式資料の実例
   ============================================ */
.bk-real {
  justify-content: flex-start;
  padding: 94px 26px 186px;
}

/* 同じく1行に収める（12字・枠476px） */
.rl-tag { font-size: 36px }

/* この場面は縦に詰まっているので、帯とカードの余白を少し削る */
.bk-real .band { padding: 10px 18px 10px 56px }
.bk-real .body { padding: 12px 16px 13px }

.rl-in .body p {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.02em;
}

.rl-arrow {
  margin: 4px 0;
  color: var(--coral);
  font-size: 32px;
  font-weight: 900;
  text-align: center;
}

.rl-out {
  ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  li {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 14px;
    border-radius: 11px;
    background: #eef3f6;

    span {
      min-width: 96px;
      color: #52463a;
      font-size: 19px;
      font-weight: 800;
    }

    i {
      color: var(--teal);
      font-size: 27px;
      font-style: normal;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }
  }
}

.rl-none {
  margin: 12px 0 0;
  padding: 9px 0;
  border-radius: 10px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rl-src {
  /* 左下のかざりに重なるので、紙の下地を敷いて読めるようにする */
  align-self: flex-start;
  margin: 8px 0 0;
  max-width: 352px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(247, 241, 227, .88);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

/* ============================================
   4. cards — できるのは、この3つだけ（この版の代表画面）
   ============================================ */
.bk-cards {
  justify-content: flex-start;
  padding: 92px 26px 180px;
  gap: 14px;
}

/* 🚨 この見出しは1行に収める。2行になると3枚目のカードが字幕の帯へ潜り込む（実測 875px）。
   12字 × 40px で 444px・枠は 476px。38px にして余白を持たせる */
.cd-head { font-size: 38px }

.cd-card .body { padding: 12px 14px 14px }

/* 棒グラフ：左に藍のラベル、そこから青緑が伸びる */
.cd-bars {
  display: grid;
  gap: 8px;

  i {
    position: relative;
    display: block;
    height: 42px;
    border-radius: 10px;
    background: var(--track);

    /* ラベルの右端から --w のぶんだけ伸びる。--w は 0〜1 の数（％ではない） */
    &::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: calc(134px + (100% - 134px) * var(--w, 0));
      height: 100%;
      border-radius: 10px;
      background: var(--teal);
    }

    em {
      position: absolute;
      z-index: 2;
      left: 0;
      top: 0;
      display: grid;
      place-items: center;
      width: 134px;
      height: 100%;
      border-radius: 10px;
      color: #fff;
      background: var(--navy);
      font-size: 19px;
      font-style: normal;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }
  }
}

/* 3段階のチップ。当てはまるものだけ黄色 */
.cd-scale {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;

  span {
    padding: 11px 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #dce3e8;
    color: #52463a;
    font-size: 19px;
    font-weight: 800;
    text-align: center;

    &.on {
      border-color: var(--yellow-deep);
      background: var(--yellow);
      color: var(--ink);
      font-weight: 900;
    }
  }
}

.cd-prob {
  /* 🚨 右下にキャラが重なる（左端 388px）。棒と数字をその手前で止める */
  padding-right: 118px;
  display: flex;
  gap: 10px;
  align-items: center;

  i {
    position: relative;
    display: block;
    flex: 1;
    height: 30px;
    border-radius: 999px;
    background: var(--track);

    &::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: calc(100% * var(--w, 0));
      height: 100%;
      border-radius: 999px;
      background: var(--teal);
    }
  }

  b {
    padding: 4px 12px;
    border-radius: 999px;
    color: #fff;
    background: var(--navy);
    font-size: 20px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }
}

/* ============================================
   5. versus — 前と今を並べる
   ============================================ */
.bk-versus {
  justify-content: center;
  gap: 18px;
  padding: 110px 26px 240px;
}

.vs-col {
  .band b { font-size: 28px }
  .body { padding: 16px 16px 14px }

  small {
    display: block;
    margin-top: 10px;
    color: var(--ink-mid);
    font-size: 16px;
    font-weight: 700;
  }
}

/* 1文字ずつ書いている感じ：幅が伸び縮みする棒 */
.vs-stream {
  margin: 0;
  height: 26px;
  border-radius: 999px;
  background: #e4e9ec;
  overflow: hidden;

  span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #8d8375;
    animation: vs-type 2.6s steps(22, end) infinite;
  }
}

@keyframes vs-type {
  0% { width: 0 }
  86%, 100% { width: 100% }
}

.vs-burst {
  margin: 0;
  padding: 9px 0;
  border-radius: 11px;
  color: #fff;
  background: var(--teal);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  animation: vs-pop 2.6s ease-out infinite;
}

@keyframes vs-pop {
  0% { scale: .9; opacity: .5 }
  8% { scale: 1.05; opacity: 1 }
  16%, 100% { scale: 1; opacity: 1 }
}

/* ============================================
   6. numbers — 数字で見せる
   ============================================ */
.bk-numbers {
  justify-content: center;
  gap: 16px;
  padding: 96px 26px 200px;
}

.nm-row {
  .no { font-size: 19px; height: 60px }
  .band { padding: 10px 18px 10px 56px }
  .band b { font-size: 25px }
  .body { padding: 12px 16px 14px }

  p {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin: 0;
    font-size: 27px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }

  s {
    color: var(--ink-soft);
    font-size: 22px;
    font-weight: 700;
  }

  em {
    color: var(--coral);
    font-size: 48px;
    font-style: normal;
    letter-spacing: -.04em;
  }
}

.nm-stamp {
  /* 右下はキャラが立つので左へ寄せる */
  align-self: flex-start;
  margin-top: 4px;
  padding: 11px 24px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 5px 0 rgba(120, 90, 20, .22);
  font-size: 25px;
  font-weight: 900;
  rotate: -2deg;

  b { font-size: 33px }
}

.nm-src {
  max-width: 340px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

/* ============================================
   7. caution — 正直な注意点（このシリーズの芯・削らない）
   ============================================ */
.bk-caution {
  justify-content: center;
  padding: 96px 30px 210px;
}

.ct-q { margin-bottom: 26px; font-size: 52px }

.ct-x {
  margin: 0 0 18px;
  color: var(--coral);
  font-size: 84px;
  font-weight: 900;
  line-height: 1;
}

.ct-cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;

  div {
    padding: 12px 10px;
    border: 2px solid var(--card-line);
    border-radius: 14px;
    background: var(--card);
    text-align: center;
  }

  b {
    display: block;
    color: #52463a;
    font-size: 17px;
    font-weight: 800;
  }

  i {
    color: var(--ink);
    font-size: 36px;
    font-style: normal;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.04em;
  }
}

.ct-zero {
  padding: 13px 0;
  border-radius: 14px;
  background: var(--yellow);
  box-shadow: 0 5px 0 rgba(120, 90, 20, .22);
  text-align: center;

  b { font-size: 30px; font-weight: 900; letter-spacing: -.03em }
}

.ct-note {
  display: block;
  max-width: 300px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

/* ============================================
   8. ryuichi — 私見の枠。付箋に書いた見た目にして、他と混ざらないようにする
   ============================================ */
.bk-ryuichi {
  justify-content: center;
  padding: 100px 26px 210px;
}

.ry-note {
  position: relative;
  padding: 30px 24px 26px;
  border-radius: 6px;
  background: #fff8e2;
  box-shadow: 0 6px 0 rgba(120, 90, 20, .1), 0 18px 30px rgba(90, 70, 40, .12);
  rotate: -1.2deg;
}

.ry-tape {
  position: absolute;
  left: 50%;
  top: -14px;
  width: 128px;
  height: 30px;
  translate: -50% 0;
  rotate: -2deg;
  background: rgba(245, 201, 69, .75);
  box-shadow: inset 0 0 0 1px rgba(160, 120, 20, .18);
}

.ry-tag {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .08em;
}

.ry-body {
  max-width: 340px;
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -.03em;
}

.ry-punch {
  max-width: 420px;
  margin: 0;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.34;
  letter-spacing: -.04em;

  em {
    color: var(--coral);
    font-style: normal;
  }
}

/* ============================================
   9. story — ジェボンズの逆説
   ============================================ */
.bk-story {
  justify-content: center;
  padding: 92px 26px 196px;
}

.st-era {
  margin: 0 0 10px;
  color: var(--ink-mid);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .06em;
}

.st-loco {
  width: 100%;
  max-width: 300px;
  margin: 0 auto 6px;
  fill: #6b533a;
  overflow: visible;
}

.st-smoke circle {
  fill: #b9aa95;
  opacity: 0;
  animation: st-smoke 2.4s ease-out infinite;

  &:nth-child(2) { animation-delay: .8s }
  &:nth-child(3) { animation-delay: 1.6s }
}

@keyframes st-smoke {
  0% { opacity: .55; translate: 0 0; scale: .5 }
  100% { opacity: 0; translate: -22px -30px; scale: 1.7 }
}

/* 🚨 SVG の既定の transform-box は view-box。fill-box にしないと
   transform-origin: center が「図形の中心」ではなく「画面の中心」になり、
   車輪がその場で回らず画面中心のまわりを公転して枠外へ出る（2026-09-19 実際に出た） */
.st-wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: st-roll 2.6s linear infinite;
}

.st-tyre { fill: none; stroke: #4a3a28; stroke-width: 5 }
.st-spokes line { stroke: #4a3a28; stroke-width: 2.6; stroke-linecap: round }
.st-hub { fill: #4a3a28 }
.st-window { fill: var(--blue-tint) }
.st-rail { fill: var(--coral); opacity: .55 }

@keyframes st-roll { to { rotate: 360deg } }

.st-lead {
  margin: 10px 0 12px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -.03em;

  b { color: var(--blue) }
}

.st-graph {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  overflow: visible;
}

.st-ax { stroke: #c9bda6; stroke-width: 2 }
.st-expect { fill: none; stroke: #b0a289; stroke-width: 4; stroke-dasharray: 8 7; stroke-linecap: round }
.st-real { fill: none; stroke: var(--coral); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round }

.st-turn {
  margin: 14px 0 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.04em;

  em {
    color: var(--coral);
    font-style: normal;
  }
}

/* ============================================
   10. end — 締め
   ============================================ */
.bk-end {
  justify-content: center;
  padding: 100px 30px 210px;
}

.en-lead {
  margin: 0 0 18px;
  color: var(--ink-mid);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.en-punch {
  max-width: 420px;
  margin: 0 0 22px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: -.045em;

  em {
    position: relative;
    color: var(--ink);
    font-style: normal;

    &::before {
      content: "";
      position: absolute;
      z-index: -1;
      left: -6px;
      right: -6px;
      bottom: 4px;
      height: 22px;
      border-radius: 6px;
      background: var(--yellow);
    }
  }
}

.en-name {
  margin: 0;
  font-size: 25px;
  font-weight: 800;

  b {
    color: var(--coral);
    font-size: 34px;
    font-weight: 900;
  }
}
