/* ============================================
   Omsubi presentation — stylesheet
   A4 landscape (1188 × 840) fixed-size stage
   ============================================ */

/* Omsubi color system
   Rice = quiet surface, Nori = structure, Ume = decision,
   Sasa = connected intelligence, Sesame = warmth, Ai = technical clarity. */
:root {
  --rice: #fffdf7;
  --rice-soft: #fbf6ea;
  --rice-wash: #f4efe4;
  --nori: #243c32;
  --nori-ink: #16251f;
  --nori-soft: #e9f0eb;
  --nori-panel: #4f6457;
  --nori-panel-deep: #405449;
  --ume: #b43b2f;
  --ume-deep: #8f2f27;
  --ume-soft: #d7715a;
  --ume-wash: #fff1ec;
  --ume-line: #e0afa5;
  --sasa: #4d7358;
  --sasa-deep: #365a43;
  --sasa-soft: #edf5ee;
  --sasa-line: #a7c5ad;
  --sesame: #c99b57;
  --sesame-soft: #f3e2c5;
  --ai: #557d84;
  --ai-soft: #e8f2f3;
  --clay: #7b5442;
  --clay-soft: #f0e2d7;

  --bg: #edf2ee;
  --paper: var(--rice);
  --paper-soft: var(--rice-soft);
  --ink: var(--nori-ink);
  --ink-soft: #34443c;
  --muted: #76776b;
  --line: #d9d4c7;
  --line-soft: #eee7dc;
  --accent: var(--ume);
  --accent-deep: var(--ume-deep);
  --accent-soft: var(--ume-soft);
  --accent-bad: var(--ume-deep);
  --accent-good: var(--sasa);
  --good-soft: var(--sasa-soft);
  --warm: var(--sesame);
  --cool: var(--ai);
  --cool-soft: var(--ai-soft);
  --shadow-paper: 0 30px 82px rgba(32, 56, 47, 0.22), 0 10px 28px rgba(78, 83, 71, 0.16);
  --slide-w: 1188px;
  --slide-h: 840px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(135deg, #e3ebe6 0%, #f3ecdf 48%, #e5eef0 100%);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Stage / slide container ===== */
.deck {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(36, 60, 50, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36, 60, 50, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
}

.stage {
  width: var(--slide-w);
  height: var(--slide-h);
  transform-origin: center;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.82), rgba(255, 253, 247, 0) 30%),
    var(--paper);
  box-shadow: var(--shadow-paper);
  border: 1px solid rgba(255, 253, 247, 0.72);
  padding: 30px 50px 34px;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.slide.active { display: flex; }

.slide::before {
  content: "";
  position: absolute;
  left: 50px;
  right: 50px;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ume), var(--sesame), var(--ai));
  opacity: 0.82;
}

/* ===== Header bar ===== */
.s-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(17, 18, 15, 0.12);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
  flex-shrink: 0;
  min-height: 28px;
}

.s-head .brand {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-transform: none;
}

.s-head .brand .dot {
  color: var(--accent);
  margin-right: 2px;
}

.s-head .section-tag {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.s-head .section-num {
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--accent);
}

/* ===== Body content area ===== */
.s-body {
  flex: 1 1 auto;
  padding: 16px 0 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

/* ===== Footer bar ===== */
.s-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  flex-shrink: 0;
  min-height: 22px;
}

.s-foot .page-num {
  font-family: "Noto Serif JP", serif;
  font-weight: 400;
}

/* ===== Typography ===== */
.eyebrow {
  font-family: "Noto Serif JP", serif;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.title {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 16px;
}

.title-sm {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

.lede {
  font-size: 18px;
  line-height: 1.78;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.lede strong {
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(to top, rgba(180, 59, 47, 0.13) 42%, transparent 42%);
  padding: 0 2px;
}

.lede + .lede { margin-top: 10px; }

.lede.lg {
  font-size: 20px;
  line-height: 1.8;
}

.lede.sm {
  font-size: 16px;
  line-height: 1.72;
}

.quote {
  font-family: "Noto Serif JP", serif;
  font-size: 21px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  padding: 16px 24px 16px 26px;
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(180, 59, 47, 0.07), rgba(255, 253, 247, 0.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  margin: 10px 0;
  font-style: normal;
}

.quote.lg {
  font-size: 25px;
}

.quote-author {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.08em;
}

/* ===== Cover slides ===== */
.cover {
  background:
    linear-gradient(135deg, rgba(180, 59, 47, 0.055), transparent 32%),
    linear-gradient(315deg, rgba(85, 125, 132, 0.07), transparent 36%),
    var(--paper);
  padding: 0;
}

.cover .s-body {
  padding: 70px 60px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cover .s-body > svg {
  filter: drop-shadow(0 12px 20px rgba(143, 47, 39, 0.12));
}

.cover-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: white;
  font-family: "Noto Serif JP", serif;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(180, 59, 47, 0.22);
  flex-shrink: 0;
}

.cover h1 {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  font-size: 84px;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1;
}

.cover .tagline {
  font-family: "Noto Serif JP", serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}

.cover .divider {
  width: 76px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--warm), transparent);
  margin: 0 auto 24px;
  flex-shrink: 0;
}

.cover .subtitle {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.cover .corner-label {
  position: absolute;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  z-index: 2;
}

.cover .corner-tl { top: 32px; left: 48px; }
.cover .corner-tr { top: 32px; right: 48px; font-family: "Noto Serif JP", serif; }
.cover .corner-bl { bottom: 32px; left: 48px; }
.cover .corner-br { bottom: 32px; right: 48px; }

/* ===== Column layouts ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  flex: 1 1 auto;
  min-height: 0;
}

.two-col-uneven {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 44px;
  flex: 1 1 auto;
  min-height: 0;
}

.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* ===== List style ===== */
.s-list {
  list-style: none;
  margin: 12px 0;
}

.s-list li {
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-soft);
  padding-left: 24px;
  position: relative;
  margin-bottom: 8px;
}

.s-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 14px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
}

.s-list.bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===== System chip grid ===== */
.sys-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px 0 12px;
}

.sys-chip {
  border: 1px solid var(--line);
  padding: 10px 8px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border-radius: 6px;
  font-weight: 500;
  box-shadow: 0 1px 0 rgba(255,255,255,0.75);
}

.sys-chip.empty {
  border-style: dashed;
  color: var(--muted);
  background: transparent;
}

/* ===== Comparison cards ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 14px 0;
}

.compare-card {
  padding: 16px 20px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(44, 37, 30, 0.06);
}

.compare-card.bad { background: var(--ume-wash); border-color: var(--ume-line); }
.compare-card.good { background: var(--good-soft); border-color: var(--sasa-line); }

.compare-label {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.compare-card.bad .compare-label { color: var(--accent-bad); }
.compare-card.good .compare-label { color: var(--accent-good); }

.compare-title {
  font-family: "Noto Serif JP", serif;
  font-size: 18.5px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.compare-body {
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--ink-soft);
}

.compare-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--muted);
}

/* ===== Big statement ===== */
.big-statement {
  font-family: "Noto Serif JP", serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  margin: 16px 0 12px;
  letter-spacing: 0.01em;
}

.big-statement .accent { color: var(--accent); }
.big-statement .light { font-weight: 300; color: var(--muted); }

/* ===== Example callout card ===== */
.example-card {
  background: var(--paper-soft);
  border-left: 3px solid var(--accent);
  padding: 15px 18px;
  margin: 10px 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.example-head {
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 7px;
  letter-spacing: 0.04em;
}

.example-body {
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-soft);
}

/* ===== FAQ ===== */
.faq-item {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-q {
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 9px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.faq-q .num {
  color: var(--accent);
  font-weight: 500;
  flex-shrink: 0;
}

.faq-a {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink-soft);
  padding-left: 22px;
}

.faq-a strong {
  font-weight: 600;
  color: var(--ink);
}

/* ===== Naming cards ===== */
.naming-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0 16px;
}

.naming-card {
  text-align: center;
  padding: 20px 16px;
  border-top: 2px solid var(--accent);
  background: var(--paper-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 24px rgba(44, 37, 30, 0.06);
}

.naming-num {
  font-family: "Noto Serif JP", serif;
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.3em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.naming-title {
  font-family: "Noto Serif JP", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--ink);
}

.naming-body {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink-soft);
}

/* ===== Insight box (dark callout) ===== */
.insight-box {
  background: linear-gradient(135deg, var(--nori-panel-deep), var(--clay));
  color: var(--rice);
  padding: 20px 26px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  margin: 12px 0;
  box-shadow: 0 16px 34px rgba(36, 60, 50, 0.16);
}

.insight-box::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(201, 155, 87, 0.24), transparent 65%);
}

.insight-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--warm);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.insight-text {
  font-family: "Noto Serif JP", serif;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 400;
}

.insight-text .em {
  color: var(--warm);
  font-weight: 500;
}

/* ===== Diagram helpers ===== */
.diagram {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  color: var(--ink);
  overflow: visible;
  text-rendering: geometricPrecision;
  /* Baseline breathing room around every figure. Slides that need to
     override (e.g. tightly packed comparison decks) set an inline style. */
  margin: 14px 0 16px;
}

/* When a figure sits inside a column with its own padding/gap, the column
   takes care of vertical rhythm — avoid double-stacking margins. */
.two-col .diagram,
.two-col-uneven .diagram {
  margin-top: 8px;
  margin-bottom: 8px;
}

svg text {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

svg [stroke="#a8321e"] { stroke: var(--accent); }
svg [stroke="#b94327"] { stroke: var(--accent); }
svg [stroke="#d4a574"] { stroke: var(--warm); }
svg [stroke="#4a6b32"],
svg [stroke="#6a8c4a"] { stroke: var(--accent-good); }
svg [stroke="#0e0e0e"],
svg [stroke="#1a1a1a"] { stroke: var(--nori); }
svg [fill="#a8321e"] { fill: var(--accent); }
svg [fill="#b94327"] { fill: var(--accent); }
svg [fill="#4a6b32"],
svg [fill="#6a8c4a"] { fill: var(--accent-good); }
svg [fill="#0e0e0e"],
svg [fill="#1a1a1a"] { fill: var(--nori); }
svg [fill="#e6c89a"] { fill: var(--sesame-soft); }

.diagram * {
  vector-effect: non-scaling-stroke;
}

.diagram rect,
.diagram circle,
.diagram ellipse,
.diagram path,
.diagram line {
  shape-rendering: geometricPrecision;
}

.diagram text {
  paint-order: stroke;
  stroke: rgba(255, 253, 247, 0.78);
  stroke-width: 1.35px;
  stroke-linejoin: round;
}

.diagram .svg-text-light,
.diagram .svg-text-accent,
.diagram .svg-text-label,
.diagram .svg-text-warm,
.diagram text[style*="fill:#"],
.diagram text[style*="fill: #"],
.diagram text[style*="fill: rgb"],
.diagram text[style*="fill:rgb"],
.diagram text[fill],
.diagram .svg-text-light + tspan {
  stroke: transparent;
  paint-order: normal;
}

.diagram-caption {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 6px;
  text-transform: uppercase;
}

/* SVG colored elements via classes (used as attribute classes inside SVG) */
.svg-box-bad     { fill: var(--ume-wash); stroke: var(--ume-line); }
.svg-box-good    { fill: var(--good-soft); stroke: var(--sasa-line); }
.svg-box-neutral { fill: #fbfaf5; stroke: var(--line); }
.svg-box-dark    { fill: var(--nori-panel); stroke: var(--nori-panel); }
.svg-box-accent  { fill: var(--ume-wash); stroke: var(--accent); }

.svg-line        { stroke: var(--line); stroke-width: 1.15; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svg-line-dashed { stroke: #958f83; stroke-width: 1.1; fill: none; stroke-dasharray: 4 4; stroke-linecap: round; }
.svg-line-accent { stroke: var(--accent); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svg-line-strong { stroke: var(--ink); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.svg-text       { font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; fill: var(--ink); font-size: 14px; font-weight: 500; }
.svg-text-sm    { font-size: 13px; fill: var(--ink-soft); }
.svg-text-xs    { font-size: 12px; fill: var(--muted); letter-spacing: 0.04em; }
.svg-text-accent{ fill: var(--accent); font-weight: 700; }
.svg-text-light { fill: var(--rice); }
.svg-text-mute  { fill: var(--muted); }
.svg-text-label { font-family: "Noto Serif JP", serif; font-weight: 600; font-size: 15px; fill: var(--accent); letter-spacing: 0.08em; }

.svg-x-mark { stroke: var(--accent-bad); stroke-width: 2; fill: none; stroke-linecap: round; }
.svg-check  { stroke: var(--accent-good); stroke-width: 2; fill: none; stroke-linecap: round; }

.diagram [fill="#1a1a1a"] { fill: var(--nori-panel); }
.diagram [fill="#2a2a2a"] { fill: var(--nori-panel-deep); }
.diagram [fill="#2a2520"] { fill: var(--nori-panel); }
.diagram [fill="#3a2a25"],
.diagram [fill="#322a22"] { fill: var(--clay); }
.diagram [fill="#f8f6f0"],
.diagram [fill="#faf7f0"] { fill: var(--rice-soft); }
.diagram [fill="#fbf7ee"] { fill: var(--paper-soft); }
.diagram [fill="#fbeee6"],
.diagram [fill="#fef6f4"] { fill: var(--ume-wash); }
.diagram [fill="#faf1ee"] { fill: var(--ume-wash); }
.diagram [fill="#f0f5ea"] { fill: var(--good-soft); }
.diagram [fill="#f7fbf2"] { fill: var(--sasa-soft); }
.diagram [fill="white"] { fill: var(--paper); }
.diagram [stroke="#1a1a1a"] { stroke: var(--nori-panel); }
.diagram [stroke="#3a3a3a"],
.diagram [stroke="#3a342c"] { stroke: var(--nori-panel); }
.diagram [stroke="#d4d0c4"] { stroke: var(--line); }
.diagram [stroke="#e6e3da"] { stroke: var(--line-soft); }
.diagram [stroke="#a8321e"],
.diagram [stroke="#b94327"] { stroke: var(--accent); }
.diagram [stroke="#d4a574"] { stroke: var(--warm); }
.diagram [stroke="#4a6b32"],
.diagram [stroke="#6a8c4a"] { stroke: var(--accent-good); }
.diagram [stroke="#0e0e0e"] { stroke: var(--nori); }
.diagram [fill="#0e0e0e"] { fill: var(--nori); }

/* Normalize older inline SVG colors into the Omsubi tokens. */
.diagram *[style*="fill:#a8321e"],
.diagram *[style*="fill: #a8321e"],
.diagram *[style*="fill:#8c2614"],
.diagram *[style*="fill: #8c2614"] { fill: var(--accent) !important; }
.diagram *[style*="fill:#b94327"],
.diagram *[style*="fill: #b94327"] { fill: var(--accent-soft) !important; }
.diagram *[style*="fill:#4a6b32"],
.diagram *[style*="fill: #4a6b32"],
.diagram *[style*="fill:#6a8c4a"],
.diagram *[style*="fill: #6a8c4a"] { fill: var(--accent-good) !important; }
.diagram *[style*="fill:#d4a574"],
.diagram *[style*="fill: #d4a574"] { fill: var(--warm) !important; }
.diagram *[style*="fill:#7a7770"],
.diagram *[style*="fill: #7a7770"] { fill: var(--muted) !important; }
.diagram *[style*="stroke:#a8321e"],
.diagram *[style*="stroke: #a8321e"],
.diagram *[style*="stroke:#b94327"],
.diagram *[style*="stroke: #b94327"] { stroke: var(--accent) !important; }
.diagram *[style*="stroke:#4a6b32"],
.diagram *[style*="stroke: #4a6b32"],
.diagram *[style*="stroke:#6a8c4a"],
.diagram *[style*="stroke: #6a8c4a"] { stroke: var(--accent-good) !important; }
.diagram *[style*="stroke:#d4a574"],
.diagram *[style*="stroke: #d4a574"] { stroke: var(--warm) !important; }

/* ===== Side-by-side comparison panes ===== */
.diagram-compare {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}

.diagram-pane {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(44, 37, 30, 0.05);
}

.diagram-pane.dark {
  background: var(--paper-soft);
  border-color: var(--warm);
}

.diagram-pane-label {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.diagram-pane.dark .diagram-pane-label { color: var(--clay); }

.vs-mark {
  font-family: "Noto Serif JP", serif;
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  font-weight: 300;
}

/* ===== Metric / stat rows ===== */
.metric { display: flex; flex-direction: column; padding: 10px 0; }

.metric-value {
  font-family: "Noto Serif JP", serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  margin: 10px 0;
}

/* ===== Navigation chrome ===== */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(255, 253, 248, 0.45);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 12px 28px rgba(32, 56, 47, 0.18);
  backdrop-filter: blur(10px);
  font-family: serif;
  line-height: 1;
}

.nav-btn:hover {
  background: var(--paper);
  transform: translateY(-50%) scale(1.08);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 3px;
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-prev { left: 20px; }
.nav-next { right: 20px; }

.deck-back {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(255, 253, 248, 0.45);
  box-shadow: 0 12px 28px rgba(32, 56, 47, 0.18);
  backdrop-filter: blur(10px);
  font-family: "Noto Serif JP", serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.deck-back:hover {
  background: var(--paper);
  transform: translateY(-1px);
}

@media print {
  .deck-back { display: none !important; }
}

.nav-counter {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 253, 248, 0.9);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-family: "Noto Serif JP", serif;
  color: var(--ink);
  z-index: 1000;
  letter-spacing: 0.1em;
  box-shadow: 0 12px 28px rgba(32, 56, 47, 0.18);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 253, 248, 0.45);
  backdrop-filter: blur(10px);
}

.nav-counter .title-text {
  max-width: 280px;
  font-size: 11px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-counter .num {
  font-weight: 500;
  color: var(--accent);
}

/* ===== Utility classes ===== */
.flex-center { display: flex; align-items: center; justify-content: center; }
.mt-auto { margin-top: auto; }
.mb-md { margin-bottom: 12px; }
.mt-md { margin-top: 12px; }
.mt-lg { margin-top: 20px; }

/* ===== Animation ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide.active {
  animation: fadeIn 0.35s ease-out;
}

/* ============================================
   Table of contents
   ============================================ */
.toc-redesign {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.toc-acts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 20px 0 18px;
}

.toc-act {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 18px 0 22px;
  border-left: 2px solid var(--accent);
}

.toc-act::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 18px;
  top: 96px;
  height: 1px;
  background: linear-gradient(90deg, rgba(180, 59, 47, 0.7), rgba(201, 155, 87, 0.45));
}

.toc-act-final {
  border-left-color: var(--cool);
}

.toc-act-final::after {
  background: linear-gradient(90deg, rgba(180, 59, 47, 0.65), rgba(85, 125, 132, 0.75));
}

.toc-act-head {
  min-height: 86px;
}

.toc-act-label {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.toc-act-title {
  font-family: "Noto Serif JP", serif;
  font-size: 34px;
  line-height: 1.14;
  font-weight: 500;
  color: var(--ink);
}

.toc-act-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 28px;
}

.toc-act-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  position: relative;
  padding-right: 52px;
}

.toc-act-num {
  font-family: "Noto Serif JP", serif;
  font-size: 20px;
  line-height: 1.2;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.toc-act-item-title {
  font-family: "Noto Serif JP", serif;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
}

.toc-act-item p {
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.52;
  color: var(--ink-soft);
}

.toc-act-pages {
  position: absolute;
  right: 0;
  top: 4px;
  font-family: "Noto Serif JP", serif;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.toc-appendix-line {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 11px 0 0;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

.toc-appendix-line span {
  font-family: "Noto Serif JP", serif;
  color: var(--accent);
  letter-spacing: 0.18em;
  font-size: 12.5px;
}

.toc-appendix-line strong {
  font-family: "Noto Serif JP", serif;
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
}

.toc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
  margin-top: 10px;
  flex: 1 1 auto;
  align-content: start;
}

.toc-grid.toc-grid-chapters {
  gap: 8px 18px;
}

.toc-row {
  display: grid;
  grid-template-columns: 48px 1fr 66px;
  gap: 13px;
  align-items: start;
  padding: 12px 15px 13px;
  background: var(--paper-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 6px 18px rgba(44, 37, 30, 0.06);
}

.toc-grid-chapters .toc-row {
  grid-template-columns: 42px 1fr 56px;
  gap: 10px;
  padding: 9px 12px 10px;
}

.toc-row.toc-row-appendix {
  border-left-color: var(--clay);
  background: var(--rice-wash);
}

.toc-row-num {
  font-family: "Noto Serif JP", serif;
  font-size: 25px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.06em;
  border-right: 1px solid var(--line);
  padding: 4px 14px 4px 0;
  text-align: center;
}

.toc-row.toc-row-appendix .toc-row-num { color: var(--clay); }

.toc-grid-chapters .toc-row-num {
  font-size: 22px;
  padding-right: 10px;
}

.toc-row-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.toc-row-eyebrow {
  font-family: "Noto Serif JP", serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.toc-row-title {
  font-family: "Noto Serif JP", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.toc-grid-chapters .toc-row-title {
  font-size: 15.5px;
  line-height: 1.32;
}

.toc-row-summary {
  font-size: 12px;
  line-height: 1.58;
  color: var(--ink-soft);
}

.toc-grid-chapters .toc-row-summary {
  font-size: 11.1px;
  line-height: 1.45;
}

.toc-row-pages {
  font-family: "Noto Serif JP", serif;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-align: right;
  padding-top: 6px;
  white-space: nowrap;
  border-left: 1px solid var(--line);
  padding-left: 12px;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.toc-grid-chapters .toc-row-pages {
  font-size: 9.5px;
  padding-left: 8px;
}

.toc-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 42px;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 2px;
}

.toc-flow {
  position: relative;
  padding: 0 0 0 34px;
}

.toc-flow::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 32px;
  bottom: 66px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--warm), var(--cool));
}

.toc-flow-label,
.toc-side-label {
  font-family: "Noto Serif JP", serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 4px;
}

.toc-step {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: start;
  padding: 6px 0 7px;
  border-bottom: 1px solid rgba(217, 212, 199, 0.72);
}

.toc-step::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 17px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(180, 59, 47, 0.055);
}

.toc-step-end::before {
  border-color: var(--clay);
  box-shadow: 0 0 0 5px rgba(123, 84, 66, 0.07);
}

.toc-step-num {
  font-family: "Noto Serif JP", serif;
  font-size: 21px;
  line-height: 1.1;
  color: var(--accent);
  font-weight: 300;
}

.toc-step-kicker {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1px;
}

.toc-step-title {
  font-family: "Noto Serif JP", serif;
  font-size: 16px;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 600;
}

.toc-step p {
  display: none;
}

.toc-step-page {
  font-family: "Noto Serif JP", serif;
  font-size: 10.5px;
  color: var(--muted);
  text-align: right;
  padding-top: 16px;
  white-space: nowrap;
}

.toc-side {
  position: relative;
  padding: 28px 0 0 28px;
  align-self: stretch;
}

.toc-side-rule {
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 58px;
  width: 1px;
  background: linear-gradient(180deg, rgba(180, 59, 47, 0.7), rgba(201, 155, 87, 0.7), rgba(85, 125, 132, 0.55));
}

.toc-side-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(217, 212, 199, 0.72);
}

.toc-side-item:last-child {
  border-bottom: none;
}

.toc-side-num {
  font-family: "Noto Serif JP", serif;
  font-size: 20px;
  line-height: 1;
  color: var(--clay);
  font-weight: 300;
}

.toc-side-title {
  font-family: "Noto Serif JP", serif;
  font-size: 15.5px;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 600;
}

.toc-side p {
  font-size: 11.6px;
  line-height: 1.58;
  color: var(--ink-soft);
  margin-top: 5px;
}

.toc-side-faq {
  margin-top: 6px;
  padding-top: 20px;
}

/* ============================================
   Chapter opener
   ============================================ */
.chapter-opener {
  background:
    linear-gradient(135deg, rgba(180, 59, 47, 0.07), transparent 38%),
    linear-gradient(315deg, rgba(36, 60, 50, 0.05), transparent 42%),
    var(--paper);
}

.chapter-opener .s-body {
  padding: 12px 0 8px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.chapter-opener-inner {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.chapter-mark {
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 500;
  padding-left: 0.55em;
}

.chapter-num {
  font-family: "Noto Serif JP", serif;
  font-size: 120px;
  font-weight: 200;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

.chapter-num.chapter-num-faq {
  font-size: 104px;
  font-weight: 300;
}

.chapter-rule {
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 0 0 26px;
}

.chapter-title {
  font-family: "Noto Serif JP", serif;
  font-size: 56px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 18px;
}

.chapter-subtitle {
  font-family: "Noto Serif JP", serif;
  font-size: 20px;
  line-height: 1.65;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  max-width: 820px;
  font-weight: 400;
}

.chapter-toc {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  width: 100%;
  max-width: 600px;
}

.chapter-toc.chapter-toc-tight {
  gap: 7px;
  padding-top: 16px;
}

.chapter-toc-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: baseline;
  text-align: left;
}

.chapter-toc-num {
  font-family: "Noto Serif JP", serif;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 500;
  text-align: right;
}

.chapter-toc-text {
  font-size: 17px;
  color: var(--ink);
  line-height: 1.45;
  font-weight: 400;
}

/* ===== Print ===== */
@media print {
  @page {
    size: A4 landscape;
    margin: 0;
  }
  html, body { background: white; overflow: visible; height: auto; }
  .deck { position: static; }
  .stage { transform: none !important; width: 297mm; height: 210mm; }
  .slide {
    display: flex !important;
    page-break-after: always;
    box-shadow: none;
    position: relative;
    inset: auto;
    width: 297mm;
    height: 210mm;
  }
  .nav-btn, .nav-counter { display: none !important; }
}
