/* ============================================================================
   オトシゴ 公開サイト — デザイン言語 v2「原稿用紙 / GENKO」
   正本: web/DESIGN.md。ここで生 hex を新規に増やさない。
   ========================================================================== */

/* ---------- 1. トークン --------------------------------------------------- */

:root {
  /* 紙・墨・罫・緑・朱 */
  --paper: #f7f8f6;
  --paper-sunk: #f1f3f0;
  --sheet: #ffffff;
  --sumi: #161b18;
  --ink: #3e4642;
  /* --ink-muted は補助文の下限。紙背景で 4.5:1 を満たす値を選んである
     （#636C66: paper 5.10:1 / paper-sunk 4.87:1 / sheet 5.43:1 / 緑淡面 4.63:1）。これより
     明るくしない。--ink-faint は 2.46:1 しかないので、装飾と無効状態のみ。 */
  --ink-muted: #636c66;
  --ink-faint: #9aa29c;
  --rule: #e0e4df;
  --rule-strong: #c7cdc6;
  --midori: #1e5140;
  --midori-hover: #163e31;
  --midori-tint: #e7efe9;
  --midori-ring: rgba(30, 81, 64, 0.2);
  --shu: #b8412a;
  --shu-tint: #fbeee9;
  --on-sumi: #f7f8f6;
  --on-midori: #f2f7f3;

  /* 書体 */
  --font-display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho",
    "Noto Serif JP", serif;
  --font-ui: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Noto Sans JP", "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 形 */
  --r-control: 10px;
  --r-field: 12px;
  --r-card: 18px;
  --r-panel: 22px;
  --r-tag: 999px;

  /* 影 */
  --sh-card: 0 1px 2px rgba(22, 27, 24, 0.04), 0 12px 28px -18px rgba(22, 27, 24, 0.16);
  --sh-lift: 0 0 0 1px rgba(22, 27, 24, 0.05), 0 2px 4px rgba(22, 27, 24, 0.04),
    0 28px 56px -26px rgba(22, 27, 24, 0.24);

  /* 動き */
  --t-fast: 140ms;
  --t: 200ms;
  --t-slow: 280ms;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  /* 寸法 */
  --wrap: 1180px;
  --gut: 20px;
  --half: 590px; /* --wrap / 2 */

  color-scheme: light;
}

@media (min-width: 760px) {
  :root { --gut: 32px; }
}
@media (min-width: 1200px) {
  :root { --gut: 40px; }
}

/* ---------- 2. ベース ----------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

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

a { color: var(--midori); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--midori-hover); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--midori);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--midori-tint); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gut) * 2);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 3. 見出し・本文 ----------------------------------------------- */

h1, h2, h3, h4 { margin: 0; color: var(--sumi); font-weight: 400; }

.h1, h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(33px, 8.6vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.h2, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(25px, 5.4vw, 36px);
  line-height: 1.36;
  letter-spacing: -0.015em;
}

h3 { font-size: 20px; font-weight: 700; line-height: 1.6; }
h4 { font-size: 16px; font-weight: 700; line-height: 1.6; }

p { margin: 0; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

.lede {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  max-width: 34em;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.mark { color: var(--sumi); font-weight: 700; }

/* ---------- 4. ボタン ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding-inline: 24px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.btn-solid {
  background: var(--sumi);
  color: var(--on-sumi);
}
.btn-solid:hover {
  color: var(--on-sumi);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px rgba(22, 27, 24, 0.5);
}

.btn-line {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--sumi);
}
.btn-line:hover {
  color: var(--sumi);
  border-color: var(--sumi);
  transform: translateY(-1px);
}

.btn-quiet {
  height: 44px;
  padding-inline: 4px;
  background: none;
  border: 0;
  color: var(--midori);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--rule-strong);
}
.btn-quiet:hover { text-decoration-color: currentColor; }

.btn-sm { height: 40px; padding-inline: 18px; font-size: 14px; }

/* ---------- 5. タグ / チップ ----------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding-inline: 11px;
  border-radius: var(--r-tag);
  background: var(--paper-sunk);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}
.tag-brand { background: var(--midori-tint); color: var(--midori); }

.chip {
  height: 34px;
  padding-inline: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: var(--sheet);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--rule-strong); }
.chip.on {
  background: var(--midori-tint);
  border-color: var(--midori);
  color: var(--midori);
}

/* ---------- 6. ヘッダー ---------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 72px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  transition: box-shadow var(--t) var(--ease), backdrop-filter var(--t) var(--ease);
}
.site-head.scrolled {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--rule);
}
.site-head > .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--sumi);
  text-decoration: none;
  flex: none;
}
.brand svg { width: 27px; height: 27px; flex: none; }
.brand .word {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-right: auto;
}
.site-nav a {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.site-nav a:hover { color: var(--sumi); border-bottom-color: var(--rule-strong); }
.site-nav a[aria-current="page"] { color: var(--sumi); border-bottom-color: var(--midori); }

.head-cta { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }

/* ナビ内のCTA。<760px のドロワーでだけ現れる */
.nav-cta { display: none; }

/* ハンバーガー（<760px でのみ表示） */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  margin-left: auto;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-control);
  background: transparent;
  color: var(--sumi);
  cursor: pointer;
  place-items: center;
}
.nav-toggle .icon { width: 18px; height: 18px; }
.nav-toggle .bar-close { display: none; }
.site-head.menu-open .nav-toggle .bar-open { display: none; }
.site-head.menu-open .nav-toggle .bar-close { display: block; }

@media (max-width: 1023px) {
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 14px; }
}

@media (max-width: 759px) {
  .site-head { height: 64px; }
  .brand .word { font-size: 19px; }
  .nav-toggle { display: grid; }

  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 64px;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 8px var(--gut) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--sh-card);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
  }
  .site-head.menu-open .site-nav { visibility: visible; opacity: 1; transform: none; }
  .site-nav a {
    padding-block: 14px;
    font-size: 16px;
    border-bottom: 1px solid var(--rule);
    border-top: 0;
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--midori); }
  .head-cta { display: none; }
  /* `.site-nav a`（詳細度 0,1,1）が color を握るので、CTA 側も同じ詳細度で書く。
     クラスだけだと --ink が勝って「墨地に墨文字」になり読めなくなる。 */
  .site-nav a.nav-cta {
    display: inline-flex;
    margin-top: 16px;
    border-bottom: 0;
    color: var(--on-sumi);
  }
  .site-nav a.nav-cta:hover,
  .site-nav a.nav-cta[aria-current="page"] {
    color: var(--on-sumi);
    border-bottom-color: transparent;
  }

  /* JS 無効時はドロワーを開けない。ハンバーガーを消して、ナビをヘッダーの
     下に静的に並べる（リンクが一切見えなくなるのを防ぐ）。
     <html class="no-js"> は head のインラインスクリプトが即座に外す。 */
  .no-js .site-head { height: auto; }
  .no-js .site-head > .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-block: 10px 6px;
  }
  .no-js .nav-toggle { display: none; }
  .no-js .site-nav {
    position: static;
    width: 100%;
    padding: 4px 0 8px;
    background: none;
    border-bottom: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .no-js .site-nav a:last-of-type { border-bottom: 0; }
}

/* ---------- 7. 原稿用紙の枠（縦罫・区切り罫） -------------------------------- */

.ruled { position: relative; }
.ruled::before,
.ruled::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
  pointer-events: none;
  z-index: 0;
}
.ruled::before { left: max(0px, calc(50% - var(--half) - var(--gut))); }
.ruled::after { right: max(0px, calc(50% - var(--half) - var(--gut))); }

@media (max-width: 1023px) {
  .ruled::before,
  .ruled::after { display: none; }
}

.sec {
  position: relative;
  z-index: 1;
  padding-block: 128px;
}
.sec-flag { padding-block: 160px; }
.sec-tight { padding-block: 96px; }

.sec-line::before {
  content: "";
  position: absolute;
  top: 0;
  height: 1px;
  left: max(0px, calc(50% - var(--half) - var(--gut)));
  right: max(0px, calc(50% - var(--half) - var(--gut)));
  background: var(--rule);
}

@media (max-width: 899px) {
  .sec { padding-block: 80px; }
  .sec-flag { padding-block: 96px; }
  .sec-tight { padding-block: 64px; }
}

.sec-head { max-width: 46em; }
.sec-head .eyebrow { margin-bottom: 12px; }
.sec-head .lede { margin-top: 20px; }
.sec-head + * { margin-top: 56px; }

/* ---------- 8. ヒーロー ---------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  padding-block: 88px 120px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 592px);
    gap: 64px;
  }
}
@media (max-width: 899px) {
  .hero { padding-block: 48px 72px; }
  .hero-grid { gap: 40px; }
}

.hero-copy .eyebrow { margin-bottom: 20px; }
.hero-copy h1 { margin-bottom: 24px; }
.hero-copy .lede { max-width: 30em; }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}
.hero-note {
  margin-top: 28px;
  font-size: 13px;
  color: var(--ink-muted);
}
@media (max-width: 559px) {
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-ctas .btn { width: 100%; }
}

/* ---------- 9. デモパネル（署名要素） --------------------------------------- */

.panel {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-lift);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule);
}
.panel-title { font-size: 14px; font-weight: 700; color: var(--sumi); }
.panel-sub { font-size: 12px; color: var(--ink-muted); }

.voice-rows { padding: 8px; display: grid; gap: 2px; }

.voice-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-control);
  transition: background var(--t-fast) var(--ease);
}
.voice-row.on { background: var(--midori-tint); }
.voice-row.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--midori);
  border-radius: 2px;
}

.voice-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.voice-pick::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
/* 装飾アイコン。--ink-faint を使ってよい数少ない箇所（文字ではない） */
.voice-avatar {
  width: 30px; height: 30px; flex: none;
  color: var(--ink-faint);
}
.voice-row.on .voice-avatar { color: var(--midori); }
.voice-meta { min-width: 0; display: block; }
.voice-name { display: block; font-size: 14.5px; font-weight: 700; color: var(--sumi); line-height: 1.5; }
.voice-desc {
  display: block;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-play {
  position: relative;
  z-index: 1;
  width: 32px; height: 32px; flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: var(--sheet);
  color: var(--sumi);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.row-play:hover { border-color: var(--sumi); }
.row-play .icon { width: 15px; height: 15px; }
.voice-row.playing .row-play { background: var(--sumi); border-color: var(--sumi); color: var(--on-sumi); }

.panel-body { padding: 16px 20px 20px; border-top: 1px solid var(--rule); }

.style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* 升目 ------------------------------------------------------------------- */

.genko {
  --cols: 20;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: var(--sheet);
}
.genko b {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(11px, 1.35vw, 15px);
  line-height: 1;
  color: var(--sumi);
  font-feature-settings: normal;
}
.genko b:nth-child(10n) { border-right-color: var(--rule-strong); }
.genko b.blank { color: transparent; }
.genko b.lit { animation: cellLit var(--t-slow) var(--ease); }

@keyframes cellLit {
  from { background: var(--midori-tint); }
  to { background: transparent; }
}

.genko-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.count {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.count .num { font-size: 15px; color: var(--sumi); font-weight: 500; }
/* 課金規則の注記（demo.js の renderCount が差し込む） */
.count-note { font-size: 12px; }

.play-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding-inline: 18px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--sumi);
  color: var(--on-sumi);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.play-main:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(22, 27, 24, 0.5); }
.play-main .icon { width: 16px; height: 16px; }

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
/* 静止時も波形に見えるよう、共有サウンドスケルトン 7:9:10:9:7 の比で立てる */
.eq i {
  display: block;
  width: 2px;
  height: 42%;
  border-radius: 1px;
  background: var(--rule-strong);
}
.eq i:nth-child(2), .eq i:nth-child(4) { height: 62%; }
.eq i:nth-child(3) { height: 82%; }
.is-playing .eq i { background: var(--midori); animation: eqBob 900ms var(--ease) infinite; }
.is-playing .eq i:nth-child(2) { animation-delay: 120ms; }
.is-playing .eq i:nth-child(3) { animation-delay: 240ms; }
.is-playing .eq i:nth-child(4) { animation-delay: 360ms; }
.is-playing .eq i:nth-child(5) { animation-delay: 480ms; }

@keyframes eqBob {
  0%, 100% { height: 28%; }
  50% { height: 100%; }
}

.panel-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.switching { opacity: 0; transition: opacity 180ms var(--ease); }
.reveal { animation: reveal var(--t-slow) var(--ease); }
@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 10. 証拠帯 ----------------------------------------------------- */

.proof {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-sunk);
}
.proof > .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px 32px;
  padding-block: 26px;
}
.proof p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-muted);
}
.proof .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--midori); }
.proof b { color: var(--sumi); font-weight: 700; }

/* ---------- 11. 12列グリッド ------------------------------------------------ */

.g12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.c12 { grid-column: span 12; }
.c7 { grid-column: span 12; }
.c6 { grid-column: span 12; }
.c5 { grid-column: span 12; }
.c4 { grid-column: span 12; }
.c3 { grid-column: span 12; }

@media (min-width: 760px) {
  .c6 { grid-column: span 6; }
  .c4 { grid-column: span 6; }
  .c3 { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .c7 { grid-column: span 7; }
  .c5 { grid-column: span 5; }
  .c4 { grid-column: span 4; }
  .c3 { grid-column: span 3; }
}

/* ---------- 12. カード ----------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}
.card-flat { background: var(--paper-sunk); border-color: transparent; }
.card > .icon { width: 22px; height: 22px; color: var(--midori); }
.card h3 { font-size: 18px; }
.card p { font-size: 14.5px; line-height: 1.85; color: var(--ink-muted); }
.card .shot { margin-top: 8px; }

.shot {
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-sunk);
}
.shot img { width: 100%; display: block; }
.shot-lift { box-shadow: var(--sh-card); border-color: transparent; }
.shot-cap {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ステップ */
/* 図版は幅560px以上を保つため、最大2列（監査 #18） */
.steps { display: grid; gap: 56px 24px; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); }
@media (max-width: 559px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
.step-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.step-no {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--midori);
  letter-spacing: 0.08em;
}
.step h3 { font-size: 17px; }
.step p { margin-top: 14px; font-size: 14.5px; line-height: 1.85; color: var(--ink-muted); }

/* コード */
.code {
  margin-top: 8px;
  padding: 18px 20px;
  background: var(--paper-sunk);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--sumi);
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.code .dim { color: var(--ink-muted); }

/* ---------- 13. 料金カード -------------------------------------------------- */

.plans {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}
.plan-pop { border-color: var(--sumi); box-shadow: var(--sh-card); }
.plan-badge {
  position: absolute;
  top: -13px;
  left: 32px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  border-radius: var(--r-tag);
  background: var(--sumi);
  color: var(--on-sumi);
  font-size: 12px;
  font-weight: 700;
}
.plan h3 { font-size: 18px; }
.plan-for { margin-top: 6px; font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; }
.price { margin-top: 24px; display: flex; align-items: baseline; gap: 6px; }
.price .amt {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--sumi);
}
.price .per { font-size: 13px; color: var(--ink-muted); }
.plan-cta { margin-top: 20px; }
.plan-cta .btn { width: 100%; }
.quota {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.7;
}
.quota b { color: var(--sumi); font-weight: 700; }
.plan ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.plan li::before {
  content: "";
  width: 16px; height: 16px;
  margin-top: 5px;
  background: var(--midori);
  clip-path: polygon(14% 47%, 5% 57%, 39% 90%, 96% 24%, 86% 15%, 38% 70%);
}
.plan li.na { color: var(--ink-muted); }
.plan li.na::before {
  background: var(--rule-strong);
  clip-path: polygon(12% 20%, 20% 12%, 50% 42%, 80% 12%, 88% 20%, 58% 50%, 88% 80%, 80% 88%, 50% 58%, 20% 88%, 12% 80%, 42% 50%);
}
.plan-fill { flex: 1 1 auto; }

.note {
  padding: 20px 24px;
  background: var(--paper-sunk);
  border-radius: var(--r-card);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-muted);
}
.note b { color: var(--sumi); font-weight: 700; }

.fine {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-muted);
}

/* ---------- 14. 表 --------------------------------------------------------- */

.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--sheet);
}
table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--paper-sunk);
  color: var(--sumi);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
thead th:first-child { text-align: left; }
tbody th {
  text-align: left;
  font-weight: 700;
  color: var(--sumi);
  padding: 14px 16px;
  line-height: 1.6;
  vertical-align: top;
}
tbody td {
  text-align: center;
  padding: 14px 12px;
  color: var(--ink-muted);
  line-height: 1.6;
  vertical-align: top;
}
tbody tr + tr th,
tbody tr + tr td { border-top: 1px solid var(--rule); }
tbody td .num { color: var(--sumi); font-size: 14px; }

.tbl-legal { min-width: 520px; }
.tbl-legal tbody th { width: 30%; background: var(--paper-sunk); white-space: nowrap; }
.tbl-legal tbody td { text-align: left; color: var(--ink); }
@media (max-width: 559px) {
  .tbl-legal { min-width: 460px; }
  .tbl-legal tbody th { white-space: normal; }
}

/* ---------- 15. 3原則帯 ---------------------------------------------------- */

.creed {
  padding: 56px;
  background: var(--midori);
  color: var(--on-midori);
  border-radius: var(--r-panel);
}
.creed h2 { color: var(--on-midori); }
.creed ol {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.creed li { border-top: 1px solid rgba(242, 247, 243, 0.24); padding-top: 20px; }
.creed .no {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(242, 247, 243, 0.6);
  margin-bottom: 10px;
}
.creed h3 { color: var(--on-midori); font-size: 17px; }
.creed p { margin-top: 8px; font-size: 14px; line-height: 1.85; color: rgba(242, 247, 243, 0.78); }
.creed .btn-line { border-color: rgba(242, 247, 243, 0.4); color: var(--on-midori); margin-top: 40px; }
.creed .btn-line:hover { border-color: var(--on-midori); color: var(--on-midori); background: rgba(242, 247, 243, 0.08); }

@media (max-width: 899px) {
  .creed { padding: 32px 24px; border-radius: var(--r-card); }
}

/* ---------- 16. 原則リスト（safety） ----------------------------------------- */

.principles { display: grid; gap: 0; }
.principle {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding-block: 28px;
  border-top: 1px solid var(--rule);
}
.principle:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 559px) {
  .principle { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding-block: 22px; }
}
.principle .no {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--midori);
  letter-spacing: 0.08em;
  padding-top: 6px;
}
.principle h3 { font-size: 19px; }
.principle p { margin-top: 8px; font-size: 14.5px; line-height: 1.9; color: var(--ink-muted); }

.layers { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); }
@media (max-width: 559px) {
  .layers { grid-template-columns: minmax(0, 1fr); }
}
.layer {
  padding: 28px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}
.layer h3 { margin-top: 14px; font-size: 18px; }
.layer ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.layer li {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-muted);
  padding-left: 16px;
  border-left: 2px solid var(--rule);
}
.layer li b { color: var(--sumi); font-weight: 700; }

/* ---------- 17. FAQ -------------------------------------------------------- */

.faq { border-top: 1px solid var(--rule); max-width: 60em; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sumi);
  cursor: pointer;
  list-style: none;
  line-height: 1.7;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 12px; height: 12px; flex: none;
  border-right: 1.6px solid var(--ink-muted);
  border-bottom: 1.6px solid var(--ink-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq .a {
  padding-bottom: 24px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-muted);
  max-width: 52em;
}

/* ---------- 18. CTA 帯 ----------------------------------------------------- */

.cta-band {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  padding-block: 128px;
  text-align: center;
}
.cta-band .wrap { display: grid; justify-items: center; gap: 24px; }
.cta-band svg { width: 34px; height: 34px; color: var(--midori); }
.cta-band h2 { max-width: 18em; }
.cta-band p { font-size: 15px; color: var(--ink-muted); max-width: 40em; line-height: 1.9; }
.cta-band .btn { margin-top: 8px; }
@media (max-width: 899px) {
  .cta-band { padding-block: 80px; }
}

/* ---------- 19. フッター ---------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-sunk);
  padding-block: 80px 40px;
}
.foot-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
@media (min-width: 1024px) {
  .foot-grid { grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr)); }
}
.foot-brand p {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-muted);
  max-width: 24em;
}
/* フッター列の見出しは H2（H1 → H4 の飛びを作らないため）。
   見た目は小さな見出しのままにするので、明朝の H2 スケールを打ち消す。 */
.foot-col h2 {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--sumi);
  margin-bottom: 14px;
}
.foot-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.foot-col a {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-muted);
  text-decoration: none;
}
.foot-col a:hover { color: var(--sumi); text-decoration: underline; }

.foot-meta {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* ---------- 20. 下層ページのヒーロー ----------------------------------------- */

.page-head {
  position: relative;
  z-index: 1;
  padding-block: 80px 56px;
}
.page-head .eyebrow { margin-bottom: 18px; }
.page-head h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.24; }
.page-head .lede { margin-top: 24px; }
.page-head .hero-note { margin-top: 20px; }
@media (max-width: 899px) {
  .page-head { padding-block: 48px 40px; }
}

/* ---------- 21. トースト ---------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translate(-50%, 12px);
  padding: 12px 20px;
  border-radius: var(--r-control);
  background: var(--sumi);
  color: var(--on-sumi);
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 22. reduced motion --------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
