/* ============================================================
 * 広告リスト「オーガニック化」蘇生戦略 — オレンジ風
 * 参考: kawai-seminar Vol.4（デザイン言語を自前で再実装）
 * オレンジ全面背景 ＋ 白角丸カード ＋ ブロックリビール見出し
 * ＋ フェードアップ ＋ JetBrains Mono ＋ ダークテーブル
 * ============================================================ */

:root {
  --c-bg:        #E96D47;   /* スライド全面オレンジ */
  --c-bg-dark:   #C85A3A;
  --c-section:   #1B1B1B;   /* セクション扉・濃色面 */
  --c-card:      #FFFFFF;
  --c-text:      #1B1B1B;   /* 白カード上の文字 */
  --c-on-bg:     #FFFFFF;   /* オレンジ上の文字 */
  --c-muted:     rgba(27, 27, 27, 0.55);
  --c-faint:     rgba(27, 27, 27, 0.35);
  --c-pos:       #1E7A4D;   /* 良い側（緑） */
  --c-neg:       #C0392B;   /* 悪い側（赤） */
  --c-accent-y:  #F5C76A;
  --card-shadow: 0 0.4cqw 1.5cqw rgba(0, 0, 0, 0.10);

  --font-main: 'Noto Sans JP', sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;
  --radius: 1.2cqw;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  font-family: var(--font-main);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
}
:lang(ja) { line-break: strict; }

/* ── Chrome (transparent, floats over orange) ── */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 22px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.nav-right { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.nav-section-label {
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.05em;
  max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slide-counter {
  position: fixed; bottom: 14px; right: 22px;
  font-family: var(--font-mono);
  font-size: 12px; color: rgba(255,255,255,0.5); letter-spacing: 0.05em;
  z-index: 200;
}
.nav-menu-btn {
  width: 34px; height: 34px;
  border: none; background: none; cursor: pointer;
  color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: color 0.15s, background 0.15s;
}
.nav-menu-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* ── Stage / Canvas (full bleed 16:9) ── */
.slide-stage {
  position: fixed; inset: 0;
  background: #000;
  display: grid; place-items: center;
  overflow: hidden;
}
.slide-canvas {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  overflow: hidden;
  container-type: inline-size;
}

/* ── Slide base (orange) ── */
.slide {
  position: absolute; inset: 0;
  padding: 5cqw 7cqw 5cqw;
  display: flex; flex-direction: column; justify-content: center;
  gap: 2.4cqw;
  overflow-y: auto;
  background: var(--c-bg);
  color: var(--c-on-bg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.slide::-webkit-scrollbar { width: 0.6cqw; }
.slide::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 0.3cqw; }
.slide.active { opacity: 1; pointer-events: auto; }

/* セクション扉（ダーク） */
.slide.section {
  background: var(--c-bg);
  align-items: center; justify-content: center; text-align: center;
  gap: 1.8cqw;
}
/* 表紙 */
.slide.cover {
  background: var(--c-bg);
  align-items: flex-start;
  justify-content: center;
  gap: 1.7cqw;
  padding-left: 8cqw;
}

/* ── Entrance animations ── */
.slide > *:not(.headline) { opacity: 0; transform: translateY(1.3cqw); }
.slide.active > *:not(.headline) { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.45s ease; }
.slide.active > *:nth-child(2) { transition-delay: 0.18s; }
.slide.active > *:nth-child(3) { transition-delay: 0.26s; }
.slide.active > *:nth-child(4) { transition-delay: 0.34s; }
.slide.active > *:nth-child(5) { transition-delay: 0.42s; }
.slide.active > *:nth-child(6) { transition-delay: 0.50s; }

.headline { position: relative; width: fit-content; clip-path: inset(0 100% 0 0); }
.slide.active .headline { animation: reveal 0.55s 0.05s ease forwards; }
.slide.section .headline { margin-left: auto; margin-right: auto; }
@keyframes reveal { to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .slide > *:not(.headline) { opacity: 1; transform: none; }
  .headline { clip-path: none; }
}

/* ── Typography ── */
.slide-hero { font-size: 5.4cqw; font-weight: 900; line-height: 1.12; letter-spacing: -0.03em; }
.slide-h1   { font-size: 4.4cqw; font-weight: 900; line-height: 1.16; letter-spacing: -0.03em; }
.slide-h2   { font-size: 3.2cqw; font-weight: 900; line-height: 1.22; letter-spacing: -0.02em; }
.slide-h3   { font-size: 1.9cqw; font-weight: 700; line-height: 1.4; }
.slide-body { font-size: 1.6cqw; font-weight: 400; line-height: 1.7; }
.slide-small{ font-size: 1.15cqw; font-weight: 400; line-height: 1.55; opacity: 0.75; }
.mono { font-family: var(--font-mono); }

.headline.slide-h2 { margin-bottom: 0.4cqw; }
.lead { font-size: 1.65cqw; line-height: 1.7; color: rgba(255,255,255,0.92); max-width: 78cqw; }
.slide.section .lead, .slide.cover .lead { margin-left: auto; margin-right: auto; }

/* ── Cover specifics ── */
.cover-chip {
  display: inline-block;
  border: 0.16cqw solid rgba(255,255,255,0.9);
  color: #fff; font-weight: 700; font-size: 1.25cqw;
  padding: 0.5cqw 1.5cqw; border-radius: 0.5cqw; letter-spacing: 0.02em;
}
.cover-title { color: #fff; line-height: 1.6; }
.hl-box {
  background: var(--c-section); color: #fff;
  padding: 0 1cqw; border-radius: 0.5cqw;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cover-desc { font-size: 1.5cqw; line-height: 1.75; color: rgba(255,255,255,0.92); max-width: 66cqw; }
.cover-deco { position: absolute; color: rgba(255,255,255,0.20); font-weight: 900; pointer-events: none; line-height: 1; }

/* ── Section divider ── */
.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.05cqw; font-weight: 700; letter-spacing: 0.12em;
  color: #fff; background: var(--c-section);
  padding: 0.35cqw 1.2cqw; border-radius: 0.5cqw; margin-bottom: 0.4cqw;
}
.section-sub { font-size: 1.6cqw; color: rgba(255,255,255,0.92); max-width: 64cqw; margin: 0 auto; }
.bridge-img { display: block; height: 15cqw; width: auto; margin: 0.6cqw auto; }

/* ── White card ── */
.card {
  background: var(--c-card); color: var(--c-text);
  border-radius: var(--radius);
  padding: 2.4cqw 2.8cqw;
  box-shadow: var(--card-shadow);
}

/* ── Items grid (cards) ── */
.items {
  display: flex; gap: 1.8cqw; width: 100%; margin-top: 0.4cqw;
  align-items: stretch;
}
.items.col { flex-direction: column; gap: 1.2cqw; }
.o-item {
  flex: 1; background: var(--c-card); color: var(--c-text);
  border-radius: var(--radius); padding: 2cqw 2.2cqw;
  box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 0.7cqw;
}
.items.col .o-item { flex-direction: row; align-items: center; gap: 1.6cqw; padding: 1.6cqw 2.2cqw; }
.o-num {
  width: 3cqw; height: 3cqw; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-bg); color: #fff; border-radius: 50%;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.5cqw;
}
.o-badge {
  width: 3cqw; height: 3cqw; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-section); color: #fff; border-radius: 0.5cqw;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.6cqw;
}
.o-item-label { font-size: 1.55cqw; font-weight: 700; color: var(--c-text); line-height: 1.35; }
.o-item-desc { font-size: 1.25cqw; color: var(--c-muted); line-height: 1.55; }
.items.col .o-item-body { display: flex; flex-direction: column; gap: 0.3cqw; }
.items.col .o-item-desc { font-size: 1.3cqw; }

/* arrow between step items */
.o-arrow { display: flex; align-items: center; color: rgba(255,255,255,0.85); font-size: 2.2cqw; font-weight: 900; flex-shrink: 0; }

/* problem variant (赤系) */
.o-item.warn { box-shadow: var(--card-shadow); }
.o-item.warn .o-num { background: var(--c-neg); }

/* ── Before / After ── */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; width: 100%; align-items: stretch; }
.ba-col { background: var(--c-card); color: var(--c-text); border-radius: var(--radius); padding: 2cqw 2.4cqw; box-shadow: var(--card-shadow); display: flex; flex-direction: column; }
.ba-chip { font-family: var(--font-mono); font-size: 1.05cqw; font-weight: 700; letter-spacing: 0.04em; padding: 0.3cqw 1cqw; border-radius: 0.5cqw; align-self: flex-start; margin-bottom: 1cqw; }
.ba-chip.ng { background: rgba(192,57,43,0.12); color: var(--c-neg); }
.ba-chip.ok { background: rgba(30,122,77,0.12); color: var(--c-pos); }
.ba-body { font-size: 1.45cqw; line-height: 1.65; color: var(--c-text); }

/* ── Emphasis strip (dark) ── */
.emph {
  background: var(--c-section); color: #fff;
  border-radius: var(--radius); padding: 1.7cqw 2.4cqw;
  font-size: 1.5cqw; line-height: 1.6; box-shadow: var(--card-shadow);
}
.emph .hl { color: var(--c-accent-y); font-weight: 700; }
.emph strong { color: #fff; font-weight: 700; }

/* ── Data table ── */
.o-table { width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); background: var(--c-card); }
.o-table table { width: 100%; border-collapse: collapse; background: var(--c-card); color: var(--c-text); table-layout: fixed; }
.o-table th, .o-table td { padding: 1.0cqw 1.5cqw; text-align: left; font-size: 1.35cqw; line-height: 1.45; vertical-align: middle; }
.o-table thead th { background: var(--c-section); color: #fff; font-weight: 700; font-size: 1.2cqw; letter-spacing: 0.02em; }
.o-table tbody td { border-bottom: 1px solid rgba(27,27,27,0.08); }
.o-table tbody tr:last-child td { border-bottom: none; }
.o-table tbody td:first-child { font-weight: 700; color: var(--c-text); }
.o-table .sec-row td { background: var(--c-bg); color: #fff; font-weight: 700; font-size: 1.2cqw; }
.o-table .pos { color: var(--c-pos); font-weight: 700; font-family: var(--font-mono); }
.o-table .neg { color: var(--c-neg); font-weight: 700; font-family: var(--font-mono); }
.o-table td.center, .o-table th.center { text-align: center; }
.o-pill { display: inline-block; background: rgba(233,109,71,0.15); color: var(--c-bg-dark); font-family: var(--font-mono); font-weight: 700; font-size: 1.3cqw; padding: 0.15cqw 1cqw; border-radius: 999px; }
.o-pill.hot { background: var(--c-bg); color: #fff; }

/* ── Bar chart (data slide) ── */
.barchart { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 2.4cqw 3cqw; display: flex; align-items: flex-end; justify-content: center; gap: 6cqw; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 26cqw; }
.bar-num { font-family: var(--font-mono); font-weight: 700; font-size: 2cqw; margin-bottom: 0.6cqw; }
.bar { width: 7cqw; border-radius: 0.5cqw 0.5cqw 0 0; }
.bar-label { font-size: 1.35cqw; font-weight: 700; color: var(--c-text); margin-top: 1cqw; }
.bar-sub { font-family: var(--font-mono); font-size: 1.05cqw; color: var(--c-muted); }

/* ── Big stat block ── */
.stat-box { background: var(--c-card); color: var(--c-text); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 2.4cqw 2.6cqw; display: flex; flex-direction: column; gap: 0.6cqw; justify-content: center; }
.stat-num { font-family: var(--font-mono); font-weight: 700; font-size: 5cqw; line-height: 1; color: var(--c-bg-dark); }
.stat-num .u { font-size: 1.8cqw; }
.stat-cap { font-size: 1.3cqw; color: var(--c-muted); line-height: 1.55; }

/* ── Metric cards ── */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8cqw; width: 100%; }
.metric { background: var(--c-card); color: var(--c-text); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 2.2cqw 2cqw; display: flex; flex-direction: column; gap: 0.9cqw; height: 100%; }
.metric-label { font-family: var(--font-mono); font-size: 1.05cqw; font-weight: 700; color: var(--c-bg-dark); letter-spacing: 0.02em; }
.metric-val { font-size: 2.4cqw; font-weight: 900; line-height: 1.05; color: var(--c-text); letter-spacing: -0.01em; }
.metric-val .u { font-size: 1.25cqw; font-weight: 400; color: var(--c-muted); }
.metric-desc { font-size: 1.2cqw; color: var(--c-muted); line-height: 1.55; }

/* ── Checklist ── */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw 2.4cqw; width: 100%; background: var(--c-card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 2.2cqw 2.6cqw; }
.check { display: flex; align-items: flex-start; gap: 1cqw; font-size: 1.35cqw; color: var(--c-text); line-height: 1.5; }
.check-box { width: 1.6cqw; height: 1.6cqw; border-radius: 0.3cqw; background: var(--c-bg); flex-shrink: 0; margin-top: 0.1cqw; display: flex; align-items: center; justify-content: center; }
.check-box::after { content: ''; width: 0.85cqw; height: 0.5cqw; border-left: 0.22cqw solid #fff; border-bottom: 0.22cqw solid #fff; transform: rotate(-45deg) translateY(-0.1cqw); }

/* row helper */
.row { display: flex; gap: 2cqw; width: 100%; align-items: stretch; }
.row.center { align-items: center; }
.grow { flex: 1; }

/* footnote on orange */
.foot { font-size: 1.1cqw; color: rgba(255,255,255,0.75); margin-top: 1cqw; }

/* ── VS comparison（広告 vs オーガニック） ── */
.vs { display: grid; grid-template-columns: 1fr 5.5cqw 1fr; align-items: stretch; width: 100%; }
.vs-col { background: var(--c-card); color: var(--c-text); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 2.2cqw 2.4cqw; display: flex; flex-direction: column; gap: 1cqw; }
.vs-col.win  { border-top: 0.5cqw solid var(--c-pos); }
.vs-col.lose { border-top: 0.5cqw solid var(--c-neg); }
.vs-tag { align-self: flex-start; font-family: var(--font-mono); font-size: 1.05cqw; font-weight: 700; padding: 0.3cqw 1cqw; border-radius: 0.5cqw; }
.vs-col.win  .vs-tag { background: rgba(30,122,77,0.12); color: var(--c-pos); }
.vs-col.lose .vs-tag { background: rgba(192,57,43,0.12); color: var(--c-neg); }
.vs-title { font-size: 1.95cqw; font-weight: 900; color: var(--c-text); line-height: 1.25; }
.vs-list { list-style: none; display: flex; flex-direction: column; gap: 0.7cqw; margin-top: 0.2cqw; }
.vs-list li { font-size: 1.35cqw; color: var(--c-body); line-height: 1.5; padding-left: 1.8cqw; position: relative; }
.vs-col.win  .vs-list li::before { content: '✓'; position: absolute; left: 0; color: var(--c-pos); font-weight: 900; }
.vs-col.lose .vs-list li::before { content: '×'; position: absolute; left: 0; color: var(--c-neg); font-weight: 900; }
.vs-mid { display: flex; align-items: center; justify-content: center; }
.vs-badge { width: 4.6cqw; height: 4.6cqw; border-radius: 50%; background: var(--c-section); color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 1.7cqw; display: flex; align-items: center; justify-content: center; box-shadow: var(--card-shadow); }

/* ── Vertical stepper（縦の段階フロー） ── */
.vstep { display: flex; flex-direction: column; width: 100%; }
.vstep-row { display: flex; gap: 1.6cqw; align-items: flex-start; position: relative; padding-bottom: 1.3cqw; }
.vstep-row:last-child { padding-bottom: 0; }
.vstep-row:not(:last-child)::before { content: ''; position: absolute; left: 1.4cqw; top: 2.8cqw; height: 100%; width: 0.2cqw; background: rgba(255,255,255,0.45); }
.vstep-num { width: 2.8cqw; height: 2.8cqw; border-radius: 50%; background: #fff; color: var(--c-bg-dark); font-family: var(--font-mono); font-weight: 700; font-size: 1.35cqw; display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 1; }
.vstep-row.bad .vstep-num { background: var(--c-section); color: #fff; }
.vstep-card { background: var(--c-card); color: var(--c-text); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 1.25cqw 1.9cqw; flex: 1; display: flex; align-items: baseline; gap: 1.2cqw; }
.vstep-card.bad { background: var(--c-section); color: #fff; }
.vstep-label { font-size: 1.55cqw; font-weight: 700; flex-shrink: 0; }
.vstep-desc { font-size: 1.3cqw; color: var(--c-muted); }
.vstep-card.bad .vstep-desc { color: rgba(255,255,255,0.7); }

/* ── Horizontal timeline（Day配信） ── */
.tl { position: relative; width: 100%; padding: 2.2cqw 1.5cqw 0; }
.tl-line { position: absolute; left: 3cqw; right: 3cqw; top: 3.3cqw; height: 0.25cqw; background: rgba(255,255,255,0.35); border-radius: 1cqw; }
.tl-line .fill { position: absolute; left: 0; top: 0; height: 100%; width: 48%; background: #fff; border-radius: 1cqw; }
.tl-nodes { display: flex; justify-content: space-between; position: relative; }
.tl-node { display: flex; flex-direction: column; align-items: center; gap: 0.55cqw; width: 6cqw; }
.tl-dot { width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: #fff; }
.tl-day { font-family: var(--font-mono); font-size: 1cqw; font-weight: 700; color: #fff; }
.tl-cap { font-size: 0.92cqw; color: rgba(255,255,255,0.88); text-align: center; line-height: 1.3; }

/* ── Flowchart（SVGラッパ） ── */
.flow { width: 100%; display: flex; align-items: center; justify-content: center; }
.flow svg { width: 100%; height: auto; max-height: 36cqw; }

/* ── Big statement（締めの変化用・ダーク全面でない強調） ── */
.statement { font-size: 2.3cqw; font-weight: 900; line-height: 1.4; color: #fff; letter-spacing: -0.01em; text-align: center; }
.statement .u { color: var(--c-section); background: #fff; padding: 0 0.6cqw; border-radius: 0.3cqw; }

/* ── Transform band（現状→変換→目標） ── */
.xform { display: grid; grid-template-columns: 1fr 7cqw 1fr; align-items: stretch; width: 100%; }
.xform-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4cqw; }
.xform-arrow .ar { font-size: 2.6cqw; color: #fff; font-weight: 900; }
.xform-arrow .lb { font-family: var(--font-mono); font-size: 0.95cqw; color: rgba(255,255,255,0.9); text-align: center; line-height: 1.3; }

/* ── Sidebar ── */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 290; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar { position: fixed; top: 0; right: 0; bottom: 0; width: 300px; background: var(--c-card); z-index: 300; transform: translateX(300px); transition: transform 0.25s ease; display: flex; flex-direction: column; overflow: hidden; }
.sidebar.open { transform: translateX(0); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid rgba(27,27,27,0.1); flex-shrink: 0; }
.sidebar-title { font-size: 13px; font-weight: 700; color: var(--c-text); letter-spacing: 0.04em; }
.sidebar-close-btn { width: 28px; height: 28px; border: none; background: none; cursor: pointer; color: var(--c-muted); font-size: 14px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.sidebar-close-btn:hover { background: rgba(27,27,27,0.06); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; cursor: pointer; border: none; background: none; width: 100%; text-align: left; transition: background 0.1s; }
.sidebar-item:hover { background: rgba(233,109,71,0.08); }
.sidebar-item.active { background: rgba(233,109,71,0.15); }
.sidebar-item-num { font-family: var(--font-mono); font-size: 11px; color: var(--c-faint); min-width: 22px; font-weight: 700; }
.sidebar-item-label { font-size: 13px; color: var(--c-text); font-weight: 400; line-height: 1.4; }
.sidebar-item.active .sidebar-item-label { color: var(--c-bg-dark); font-weight: 700; }
.sidebar-item.active .sidebar-item-num { color: var(--c-bg-dark); }

/* ── Notes panel ── */
.notes-panel { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(27,27,27,0.95); color: #f0eeeb; transform: translateY(100%); transition: transform 0.2s ease; max-height: 30vh; overflow-y: auto; z-index: 190; border-top: 2px solid var(--c-bg); backdrop-filter: blur(8px); }
.notes-panel.visible { transform: translateY(0); }
.notes-content { padding: 16px 24px 20px; font-size: 13px; line-height: 1.8; }

/* ── Click nav areas ── */
.click-prev { position: fixed; top: 40px; left: 0; bottom: 0; width: 15%; z-index: 100; cursor: w-resize; }
.click-next { position: fixed; top: 40px; right: 0; bottom: 0; width: 15%; z-index: 100; cursor: e-resize; }
