:root {
  --navy: #14284b;
  --navy-soft: #2c4a7c;
  --accent: #d9a441;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #d8dde6;
  --paper: #ffffff;
  --bg: #e9edf3;
  --sans: "Noto Sans JP", system-ui, sans-serif;
  --serif: "Noto Serif JP", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- ステージ（16:9の枠） ---------- */
.stage {
  position: fixed;
  inset: 0 0 56px;
  display: grid;
  place-items: center;
  padding: 16px;
}

.deck {
  position: relative;
  width: min(100%, calc((100dvh - 88px) * 16 / 9));
  aspect-ratio: 16 / 9;
  container-type: size;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(20, 40, 75, 0.15);
  padding: 4.5cqh 5cqw 3cqh;
  opacity: 0;
  transform: translateX(4%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
}
.slide.before { transform: translateX(-4%); }
.slide.active { opacity: 1; transform: none; pointer-events: auto; }

.slide-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 3px solid var(--navy);
  padding-bottom: 1.2cqh;
  margin-bottom: 3cqh;
}
.slide-head h2 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: clamp(18px, 4.2cqw, 40px);
  line-height: 1.3;
}
.page { color: var(--muted); font-size: clamp(11px, 1.4cqw, 14px); white-space: nowrap; }

.slide-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5cqh;
  font-size: clamp(13px, 2cqw, 20px);
  min-height: 0;
}

.slide-foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: clamp(9px, 1.2cqw, 12px);
  border-top: 1px solid var(--line);
  padding-top: 1cqh;
  margin-top: 2cqh;
}

.lead { color: var(--navy-soft); font-weight: 700; }
.note { color: var(--muted); font-size: 0.8em; }

/* ---------- 表紙 ---------- */
.slide-cover {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
}
.slide-cover .slide-body { align-items: flex-start; }
.slide-cover .slide-foot { color: rgba(255, 255, 255, 0.6); border-color: rgba(255, 255, 255, 0.2); }
.eyebrow {
  color: var(--accent);
  letter-spacing: 0.3em;
  font-weight: 700;
  border: 1px solid var(--accent);
  padding: 0.2em 0.9em;
}
.cover-title {
  font-family: var(--serif);
  font-size: clamp(26px, 6.5cqw, 64px);
  line-height: 1.25;
}
.cover-sub { opacity: 0.85; }
.cover-meta { display: flex; gap: 2em; font-size: 0.85em; opacity: 0.8; border-left: 3px solid var(--accent); padding-left: 1em; }
.hint { font-size: 0.75em; opacity: 0.6; animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- アジェンダ ---------- */
.agenda { list-style: none; counter-reset: a; display: grid; gap: 1.6cqh; }
.agenda li {
  counter-increment: a;
  display: flex;
  align-items: center;
  gap: 1em;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 1cqh;
}
.agenda li::before {
  content: counter(a, decimal-leading-zero);
  font-family: var(--serif);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.4em;
}

/* ---------- サマリー / CTA ---------- */
.slide-summary .slide-body, .slide-cta .slide-body { align-items: center; text-align: center; }
.big-message {
  font-family: var(--serif);
  color: var(--navy);
  font-size: clamp(22px, 5cqw, 52px);
  line-height: 1.4;
}
.big-message span {
  background: linear-gradient(transparent 65%, rgba(217, 164, 65, 0.35) 65%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- 会社概要 ---------- */
.profile { border-collapse: collapse; width: 100%; }
.profile th, .profile td { border-bottom: 1px solid var(--line); padding: 1.3cqh 1em; text-align: left; }
.profile th { width: 28%; color: var(--navy); background: #f3f6fa; white-space: nowrap; }

/* ---------- 沿革 ---------- */
.timeline { list-style: none; position: relative; display: grid; gap: 1.8cqh; padding-left: 1.2em; }
.timeline::before { content: ""; position: absolute; left: 0.3em; top: 0.5em; bottom: 0.5em; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; gap: 1.2em; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.2em;
  top: 0.55em;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper);
}
.year { color: var(--navy); font-weight: 700; min-width: 4.5em; }

/* ---------- カード ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.card { border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 2.5cqh 1.5cqw; background: #fafbfd; }
.card-icon { font-size: 1.5em; }
.card h3 { color: var(--navy); font-size: 1.05em; margin: 0.4em 0; }
.card p { font-size: 0.88em; color: #444; }

/* ---------- 背景と課題 ---------- */
.points { display: grid; gap: 0.6cqh; justify-items: center; }
.point { display: flex; align-items: center; gap: 1em; width: 100%; border: 1px solid var(--line); padding: 1.5cqh 1.5em; }
.point:last-child { border: 2px solid var(--accent); background: #fdf8ee; font-weight: 700; }
.label { background: var(--navy); color: #fff; font-size: 0.8em; padding: 0.2em 0.8em; white-space: nowrap; }
.arrow { color: var(--line); font-size: 0.8em; }

/* ---------- ロードマップ ---------- */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); }
.phase {
  background: var(--navy);
  color: #fff;
  padding: 2.5cqh 3cqw 2.5cqh 4cqw;
  clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%, 10% 50%);
}
.phase:first-child { clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%); padding-left: 2cqw; }
.phase:nth-child(2) { background: var(--navy-soft); }
.phase:nth-child(3) { background: #4a6fa5; }
.phase-name { color: var(--accent); font-size: 0.75em; font-weight: 700; letter-spacing: 0.1em; }
.phase h3 { font-size: 1em; }
.phase p { font-size: 0.8em; opacity: 0.9; }

/* ---------- 料金 ---------- */
.slide-pricing .slide-body { align-items: center; }
.pricing { border: 2px solid var(--navy); border-radius: 8px; padding: 3cqh 5cqw; text-align: center; min-width: 50%; }
.plan { color: var(--navy-soft); font-weight: 700; }
.price { font-family: var(--serif); color: var(--navy); font-size: clamp(36px, 8cqw, 80px); line-height: 1.2; }
.price span { font-size: 0.3em; color: var(--muted); }
.pricing ul { list-style: none; text-align: left; display: inline-grid; gap: 0.3em; margin-top: 1cqh; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 2cqh; }
.faq dt { color: var(--navy); font-weight: 700; }
.faq dd { padding-left: 1.4em; color: #444; }

/* ---------- ナビ ---------- */
.controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.counter { color: var(--muted); font-size: 14px; min-width: 4em; text-align: center; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; }
.progress-bar { height: 100%; background: var(--accent); transition: width 0.3s ease; }

/* ---------- スマホ縦：全画面の縦長スライド ---------- */
@media (max-aspect-ratio: 1/1) {
  .stage { padding: 12px 12px 0; }
  .deck { width: 100%; height: 100%; aspect-ratio: auto; container-type: normal; }
  .slide { padding: 24px 20px 16px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  /* 中身が長いときは slide-body ごと伸ばして、スライド全体を縦スクロールさせる */
  .slide-body { flex: 1 0 auto; min-height: auto; }
  /* 続きがあるときは下端をフェードさせて「↓」を出す */
  .slide.can-scroll::after {
    content: "↓";
    position: sticky;
    bottom: -16px;
    flex-shrink: 0;
    height: 48px;
    margin: -48px -20px -16px;
    display: grid;
    place-items: end center;
    padding-bottom: 6px;
    font-size: 14px;
    color: var(--muted);
    background: linear-gradient(transparent, var(--paper) 70%);
    pointer-events: none;
    animation: blink 2s infinite;
  }
  .page { display: none; }
  .slide-head h2 { word-break: auto-phrase; overflow-wrap: anywhere; }
  .big-message, .honne-message { word-break: auto-phrase; overflow-wrap: anywhere; }
  .slide-cta .big-message { font-size: 23px; }
  .card { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
  .card-icon { grid-row: span 2; font-size: 1.3em; }
  .card h3 { margin: 0; }
  .st-text { font-size: 13px; }
  .slide-head { margin-bottom: 20px; }
  .slide-head h2 { font-size: 22px; }
  .slide-body { font-size: 15px; gap: 16px; justify-content: flex-start; }
  .slide-summary .slide-body, .slide-cta .slide-body, .slide-cover .slide-body, .slide-pricing .slide-body { justify-content: center; }
  .cover-title { font-size: 32px; }
  .big-message { font-size: 26px; }
  .price { font-size: 56px; }
  .cards, .roadmap { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 14px 16px; }
  .phase, .phase:first-child { clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%); padding: 14px 16px 22px; }
  .timeline { gap: 14px; }
  .timeline li { flex-direction: column; gap: 0; }
  .profile th { width: 34%; padding: 10px 8px; }
  .profile td { padding: 10px 8px; }
  .point { padding: 12px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .slide-foot { font-size: 10px; margin-top: 16px; flex-direction: column; }
  .cover-meta { flex-direction: column; gap: 0; }
}

/* ========== 素の話（theme: honne / yuno） ========== */
.theme-dark {
  --paper: #11151f;
  --ink: #ece9e2;
  --muted: #8f96a3;
  --line: #2b3242;
  --hl: #d9a441;
  background: var(--paper);
  color: var(--ink);
}
.theme-yuno { --hl: #f0a37a; background: radial-gradient(120% 90% at 85% 0%, #2a1c1a 0%, var(--paper) 60%); }
.theme-dark .slide-head { border-bottom: none; margin-bottom: 2cqh; }
.theme-dark .slide-head h2 { color: var(--ink); font-weight: 600; }
.theme-dark .slide-head h2::before { content: ""; display: inline-block; width: 0.6em; height: 2px; background: var(--hl); vertical-align: middle; margin-right: 0.5em; }

.honne-message {
  font-family: var(--serif);
  font-size: clamp(20px, 4.4cqw, 46px);
  line-height: 1.5;
  white-space: pre-line;
}
.honne-message.small { font-size: clamp(17px, 3.2cqw, 32px); }
.caption { color: var(--muted); font-size: 0.9em; white-space: pre-line; }
.slide-break .slide-body, .slide-statement .slide-body { padding: 0 4cqw; }

/* 順番に出てくる */
.rv { opacity: 0; }
.slide.active .rv { animation: rise 0.7s ease both; animation-delay: calc(0.25s + var(--d) * 0.35s); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 人生グラフ */
.lg-wrap { width: 100%; }
.lifegraph { width: 100%; max-height: 42cqh; display: block; margin: 0 auto; overflow: visible; }
.lg-axis { stroke: var(--line); stroke-width: 2; }
.lg-label { fill: var(--muted); font-size: 24px; font-family: var(--sans); }
.lg-line { fill: none; stroke: var(--line); stroke-width: 5; stroke-linecap: round; }
.lg-line.on { stroke: var(--hl); stroke-width: 8; stroke-dasharray: 1; stroke-dashoffset: 1; }
.slide.active .lg-line.on { transition: stroke-dashoffset 1.4s ease 0.4s; stroke-dashoffset: 0; }
.lg-dot { fill: var(--line); }
.lg-dot.on { fill: var(--hl); }
.lg-star { fill: var(--muted); }
.lg-star.on { fill: var(--hl); filter: drop-shadow(0 0 8px var(--hl)); }

.steps { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em 0.4em; }
.steps li { position: relative; border: 1px solid var(--hl); color: var(--ink); border-radius: 999px; padding: 0.15em 0.9em; font-size: 0.9em; }
.steps li + li { margin-left: 1.4em; }
.steps li + li::before { content: "→"; color: var(--muted); position: absolute; left: -1.3em; }
.steps.no-flow li + li { margin-left: 0; }
.steps.no-flow li + li::before { content: none; }

/* Before / After */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 2cqw; }
.ba-box { border: 1px solid var(--line); border-radius: 8px; padding: 3cqh 2.5cqw; }
.ba-box p { font-family: var(--serif); font-size: 1.3em; white-space: pre-line; margin-top: 0.5em; }
.ba-box.before { color: var(--muted); }
.ba-box.after { border-color: var(--hl); box-shadow: 0 0 0 1px var(--hl) inset; }
.ba-label { font-size: 0.7em; letter-spacing: 0.2em; font-weight: 700; color: var(--muted); }
.ba-box.after .ba-label { color: var(--hl); }
.ba-arrow { align-self: center; color: var(--hl); font-size: 1.8em; }

/* 循環図 */
.cy-grid { display: grid; grid-template-columns: 38% 1fr; gap: 4cqw; align-items: center; }
.cycle { width: 100%; max-height: 62cqh; display: block; }
.cy-arc { fill: none; stroke: var(--hl); stroke-width: 3; }
.cy-head { fill: var(--hl); }
.cy-node circle { fill: #1b2130; stroke: var(--hl); stroke-width: 2; }
.cy-node text { fill: var(--ink); font-size: 20px; font-weight: 700; font-family: var(--sans); }
.slide .cy-node { opacity: 0; }
.slide.active .cy-node { animation: rise 0.6s ease both; animation-delay: calc(0.3s + var(--d) * 0.35s); }

/* 打ち消し線リスト */
.strikes { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4em 1.6em; color: var(--muted); }
.strikes s { text-decoration-thickness: 2px; }
.strikes b { color: var(--hl); margin-left: 0.2em; }

/* ボケ */
.aside { color: var(--muted); font-size: 0.72em; opacity: 0.85; border-left: 2px solid var(--hl, var(--accent)); padding-left: 0.7em; }

/* 変わり始めた瞬間 */
.turn { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; position: relative; }
.turn > li { position: relative; border-top: 3px solid var(--line); padding-top: 1.5cqh; }
.turn > li:last-child { border-color: var(--hl); }
.turn > li + li::before { content: "→"; position: absolute; left: -2.3cqw; top: -0.85em; color: var(--hl); background: var(--paper); padding: 0 0.2em; }
.turn-stage { font-size: 0.75em; letter-spacing: 0.15em; color: var(--muted); font-weight: 700; }
.turn > li:last-child .turn-stage { color: var(--hl); }
.turn-voice { font-family: var(--serif); font-size: 1.1em; line-height: 1.5; margin: 0.4em 0 0.6em; }
.turn-feels { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35em; }
.turn-feels li { font-size: 0.72em; border: 1px solid var(--line); border-radius: 999px; padding: 0 0.7em; color: var(--muted); }
.turn > li:nth-child(2) .turn-feels li { border-color: var(--hl); color: var(--ink); }

/* 追いかけっこ */
.chase { width: 100%; max-height: 38cqh; display: block; margin: 0 auto; overflow: visible; }
.ch-them { fill: none; stroke: var(--muted); stroke-width: 5; stroke-linecap: round; }
.ch-me { fill: none; stroke: var(--hl); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.slide.active .ch-me { transition: stroke-dashoffset 1.6s ease 0.4s; stroke-dashoffset: 0; }
.ch-gap { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 5; }
.ch-label { font-size: 30px; font-weight: 700; font-family: var(--sans); }
.ch-label.them { fill: var(--muted); }
.ch-label.me { fill: var(--hl); }

/* ハブ図（スマホは hub-list に切り替え） */
.hub-wrap { width: 100%; }
.hub-list { display: none; }
.hub { width: 100%; max-height: 56cqh; display: block; margin: 0 auto; }
.hub-line { stroke: var(--line); stroke-width: 2; }
.hub-node rect { fill: #1d1a1f; stroke: var(--hl); stroke-width: 2; }
.hub-node text { fill: var(--ink); font-size: 28px; font-family: var(--sans); font-weight: 500; }
.hub-center { fill: var(--hl); }
.hub-center-text { fill: var(--paper); font-size: 26px; font-weight: 700; font-family: var(--serif); }
.slide .hub-node { opacity: 0; }
.slide.active .hub-node { animation: rise 0.5s ease both; animation-delay: calc(0.6s + var(--d) * 1s); }

/* 階段 */
.stairs-grid { display: grid; grid-template-columns: 45% 1fr; gap: 4cqw; align-items: end; }
.stairs { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; height: 42cqh; gap: 4px; }
.stairs li { height: var(--h); background: linear-gradient(180deg, color-mix(in srgb, var(--hl) 35%, transparent), transparent); border-top: 3px solid var(--hl); padding: 0.6em 0.5em; display: flex; flex-direction: column; }
.st-when { font-size: 0.72em; color: var(--hl); font-weight: 700; }
.st-text { font-size: 0.9em; font-weight: 700; }

/* DAY 1 → 3 */
.days { list-style: none; display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 2cqw; }
.days li { border-top: 3px solid var(--line); padding-top: 2cqh; }
.days li:last-child { border-color: var(--hl); }
.day { display: block; font-size: 0.75em; letter-spacing: 0.15em; color: var(--muted); font-weight: 700; margin-bottom: 0.4em; }
.days p { font-family: var(--serif); font-size: 1.2em; line-height: 1.5; white-space: pre-line; }
.days li:last-child .day, .days li:last-child p { color: var(--hl); }
.days li:last-child p { font-size: 1.4em; }

/* フォーム */
.slide-form .slide-body { align-items: center; text-align: center; }
.form-btn { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; padding: 0.8em 2.2em; border-radius: 999px; box-shadow: 0 6px 16px rgba(20, 40, 75, 0.25); }
.form-btn.disabled { background: var(--line); color: var(--muted); box-shadow: none; }

/* 充電ゲージ */
.closing-grid { display: grid; grid-template-columns: 1fr 40%; gap: 4cqw; align-items: center; }
.gauges { list-style: none; display: grid; gap: 2.5cqh; }
.gauges li { display: grid; grid-template-columns: 1fr auto; gap: 0.3em 0.8em; align-items: center; }
.g-label { font-size: 0.85em; font-weight: 700; }
.g-note { font-size: 0.75em; color: var(--muted); }
.gauges li:last-child .g-note { color: var(--hl); font-weight: 700; }
.g-bar { grid-column: 1 / -1; position: relative; height: 1.4em; border: 2px solid var(--muted); border-radius: 4px; padding: 2px; }
.g-bar::after { content: ""; position: absolute; right: -7px; top: 30%; width: 4px; height: 40%; background: var(--muted); border-radius: 0 2px 2px 0; }
.g-bar span { display: block; height: 100%; width: 0; background: var(--muted); border-radius: 2px; }
.gauges li:last-child .g-bar { border-color: var(--hl); }
.gauges li:last-child .g-bar::after { background: var(--hl); }
.gauges li:last-child .g-bar span { background: var(--hl); box-shadow: 0 0 12px var(--hl); }
.slide.active .g-bar span { width: var(--v); transition: width 1.2s ease 1.6s; }

/* 締め */
.closing-line { font-size: 0.95em; }
.slide-closing .honne-message { margin-top: 1cqh; }

@media (max-aspect-ratio: 1/1) {
  .honne-message { font-size: 22px; }
  .honne-message.small { font-size: 19px; }
  .theme-dark .slide-body { justify-content: center; }
  .cy-grid { gap: 16px; }
  .slide-break .slide-body, .slide-statement .slide-body { justify-content: center; padding: 0; }
  .lifegraph { max-height: none; }
  .lg-label { font-size: 34px; }
  .ba { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); justify-self: center; }
  .cy-grid { grid-template-columns: 1fr; }
  .cy-wrap { max-width: 300px; margin: 0 auto; width: 100%; }
  .turn { grid-template-columns: 1fr; gap: 22px; }
  .days { grid-template-columns: 1fr; gap: 20px; }
  .turn > li + li::before { content: "↓"; left: 0; top: -1.35em; }
  .closing-grid, .stairs-grid { grid-template-columns: 1fr; gap: 16px; }
  .stairs { height: 180px; }
  .chase { max-height: none; }
  .ch-label { font-size: 40px; }
  .hub-wrap { display: none; }
  .hub-list { display: grid; justify-items: center; gap: 14px; }
  .hub-list p { background: var(--hl); color: var(--paper); font-family: var(--serif); font-weight: 700; font-size: 18px; border-radius: 999px; padding: 10px 22px; }
  .hub-list ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .hub-list li { border: 1px solid var(--hl); border-radius: 999px; padding: 2px 12px; font-size: 14px; }
  .ba-arrow.text { transform: none; font-size: 1.2em; }

}
