@import url("./tokens.css");

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

body {
  background: var(--bg-abyss);
  font-family: var(--font-jp);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  -webkit-font-smoothing: antialiased;
}

/* ---------- スライド枠 ---------- */
.slide {
  position: relative;
  width: var(--slide-w);
  height: var(--slide-h);
  padding: var(--pad-y) var(--pad-x);
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(147, 51, 234, 0.30), transparent 62%),
    radial-gradient(760px 460px at 4% 104%, rgba(0, 207, 255, 0.14), transparent 60%),
    linear-gradient(155deg, var(--bg-deep) 0%, var(--bg-base) 52%, var(--bg-abyss) 100%);
  display: flex;
  flex-direction: column;
}

/* うっすらグリッド。旧資料の回路基板テクスチャの代替 */
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
.slide > * { position: relative; z-index: 1; }

.slide-no {
  position: absolute;
  right: var(--pad-x);
  bottom: 26px;
  z-index: 2;
  font-size: var(--fs-eyebrow);
  letter-spacing: .16em;
  color: var(--text-muted);
}

/* ---------- 見出し ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--thh-red);   /* ← THHレッドはここだけ */
  border-radius: 2px;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1.24;
}
h1 .cy { color: var(--accent-cyan); }

.lead {
  margin-top: 10px;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
}

.head { margin-bottom: 28px; }

/* ---------- カード ---------- */
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.flex-fill { flex: 1; min-height: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card.cyan { border-color: var(--line-cyan); background: rgba(0, 207, 255, 0.07); }
.card.flat { background: rgba(255, 255, 255, 0.035); border-color: var(--line-hair); }

.card h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.35;
}
.card p {
  font-size: var(--fs-small);
  line-height: 1.75;
  color: var(--text-secondary);
}

.tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.t-cyan   { color: var(--accent-cyan); }
.t-purple { color: #C084FC; }
.t-orange { color: var(--accent-orange); }
.t-green  { color: var(--accent-green); }
.t-red    { color: #FF5A6A; }

.num {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  color: var(--thh-red);
}

/* ---------- 箇条書き ---------- */
ul.list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
ul.list li {
  position: relative;
  padding-left: 18px;
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--text-secondary);
}
ul.list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}
ul.list li b { color: var(--text-primary); font-weight: 700; }

/* ---------- 数値ブロック ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-size: 34px; font-weight: 900; line-height: 1.1; }
.stat .v small { font-size: 16px; font-weight: 700; margin-left: 2px; }
.stat .k { font-size: 12px; letter-spacing: .08em; color: var(--text-muted); }

/* ---------- 比較テーブル ---------- */
table.cmp { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
table.cmp th, table.cmp td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-hair);
  line-height: 1.6;
}
table.cmp thead th {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
}
table.cmp tbody th { color: var(--text-secondary); font-weight: 500; width: 152px; }
table.cmp td { color: var(--text-primary); font-weight: 500; }
table.cmp col.a { background: rgba(0, 207, 255, 0.05); }
table.cmp col.b { background: rgba(147, 51, 234, 0.10); }

/* ---------- 決定バー（赤の第二の使いどころ） ---------- */
.decide {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(230, 0, 18, 0.16), rgba(230, 0, 18, 0.03));
  border: 1px solid rgba(230, 0, 18, 0.42);
}
.decide .lbl {
  flex: none;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  color: #FF6470;
}
.decide p { font-size: 15px; font-weight: 600; line-height: 1.6; }

/* ---------- 表紙 ---------- */
.cover { justify-content: center; }
.cover h1 { font-size: var(--fs-title); line-height: 1.2; }
.cover .sub { margin-top: 18px; font-size: 20px; font-weight: 600; color: var(--accent-cyan); }
.cover .to {
  margin-top: 52px;
  padding: 18px 26px;
  border-left: 4px solid var(--thh-red);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 10px 10px 0;
  align-self: flex-start;
}
.cover .to .co { font-size: 24px; font-weight: 800; }
.cover .to .me { margin-top: 6px; font-size: 14px; color: var(--text-secondary); }

/* ---------- デモ導線（動画の代わり） ---------- */
.demo {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border: 1px dashed var(--line-cyan);
  border-radius: 12px;
  background: rgba(0, 207, 255, 0.06);
}
.demo .qr {
  flex: none;
  width: 76px; height: 76px;
  border-radius: 8px;
  background: #fff;
  display: grid; place-items: center;
  color: #0D0820; font-size: 10px; font-weight: 700;
}
.demo .u { font-size: 15px; font-weight: 700; color: var(--accent-cyan); }
.demo .d { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }

/* ---------- 画面表示：ビューポート幅に合わせて全体を縮小 ----------
   スライド自体は 1280x720 のまま。見た目だけ transform で縮める。
   印刷（PDF書き出し）には一切影響させない（@media screen で囲う）。 */
@media screen {
  html, body { overflow-x: hidden; }
  body {
    gap: calc(24px * var(--fit, 1));
    padding: calc(24px * var(--fit, 1)) 0;
  }
  .slide {
    transform: scale(var(--fit, 1));
    transform-origin: top center;
    /* 縮小した分だけ下に生まれる余白を詰める */
    margin-bottom: calc((var(--fit, 1) - 1) * var(--slide-h));
  }
}

/* ---------- 印刷（PDF書き出し） ---------- */
@page { size: 1280px 720px; margin: 0; }
@media print {
  body { background: none; padding: 0; gap: 0; }
  .slide { break-after: page; box-shadow: none; transform: none; margin-bottom: 0; }
  .slide:last-child { break-after: auto; }
}

/* ================================================================
   追加コンポーネント（第2版：自己紹介・構造分析・フェーズ・見積）
   ================================================================ */

/* ---------- 思想スライド：常識の書き換え ---------- */
.flip { display: flex; flex-direction: column; gap: 12px; }
.flip-row {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-hair);
}
.flip-row .old { font-size: 15px; color: var(--text-muted); }
.flip-row .arw { text-align: center; color: #C084FC; font-size: 20px; font-weight: 900; }
.flip-row .new { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.flip-row .new em { font-style: normal; color: var(--accent-cyan); }

.quote {
  margin-top: 18px;
  padding: 16px 22px;
  border-left: 3px solid var(--accent-cyan);
  background: rgba(0, 207, 255, 0.06);
  border-radius: 0 10px 10px 0;
}
.quote p { font-size: 15px; line-height: 1.75; color: var(--text-secondary); }
.quote .src { margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* ---------- 構造分析：レイヤー ---------- */
.layers { display: flex; flex-direction: column; gap: 10px; }
.layer {
  display: grid;
  grid-template-columns: 176px 1fr 232px;
  align-items: center;
  gap: 20px;
  padding: 15px 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
}
.layer.gap-layer { background: rgba(230, 0, 18, 0.10); border: 1px dashed rgba(230, 0, 18, 0.55); }
.layer .who { font-size: 16px; font-weight: 800; line-height: 1.4; }
.layer .who small { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); margin-top: 3px; letter-spacing: .06em; }
.layer .what { font-size: 13.5px; line-height: 1.7; color: var(--text-secondary); }
.layer .flow { font-size: 12px; line-height: 1.6; color: var(--accent-cyan); font-weight: 700; }
.layer.gap-layer .flow { color: #FF6470; }

/* ---------- フェーズ列 ---------- */
.phases { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.phase {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-hair);
  border-top: 3px solid var(--accent-purple);
}
.phase.is-new { border-top-color: var(--thh-red); background: rgba(230, 0, 18, 0.08); }
.phase.is-now { border-top-color: var(--accent-cyan); }
.phase .pn { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: var(--text-muted); }
.phase.is-new .pn { color: #FF6470; }
.phase .pt { font-size: 17px; font-weight: 800; line-height: 1.35; }
.phase .pd { font-size: 11px; color: var(--accent-cyan); font-weight: 700; letter-spacing: .04em; }
.phase ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.phase li { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); padding-left: 12px; position: relative; }
.phase li::before { content: "・"; position: absolute; left: 0; color: var(--text-muted); }
.phase .out {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-hair);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1.5;
}

/* ---------- ガントチャート ---------- */
.gantt { display: flex; flex-direction: column; gap: 8px; }
.gantt-head, .gantt-row {
  display: grid;
  grid-template-columns: 210px repeat(12, 1fr);
  align-items: center;
  gap: 3px;
}
.gantt-head span {
  font-size: 10.5px;
  text-align: center;
  color: var(--text-muted);
  letter-spacing: .04em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-hair);
}
.gantt-head span:first-child { text-align: left; padding-left: 4px; }
.gantt-row .task {
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--accent-purple);
  line-height: 1.35;
}
.gantt-row .task small { display: block; font-weight: 500; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.gantt-row.is-new .task { border-left-color: var(--thh-red); }
.bar {
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #0D0820;
  white-space: nowrap;
}
.bar.c-orange { background: var(--accent-orange); }
.bar.c-cyan   { background: var(--accent-cyan); }
.bar.c-red    { background: var(--thh-red); color: #fff; }
.bar.c-purple { background: var(--accent-purple); color: #fff; }
.bar.c-green  { background: var(--accent-green); }

/* ---------- 見積テーブル ---------- */
table.quote-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.quote-t th, table.quote-t td { padding: 12px 14px; border-bottom: 1px solid var(--line-hair); vertical-align: top; line-height: 1.6; }
table.quote-t thead th { font-size: 11px; letter-spacing: .1em; color: var(--text-muted); border-bottom: 1px solid var(--line-soft); }
table.quote-t .ph { font-weight: 800; white-space: nowrap; }
table.quote-t .amt { text-align: right; font-weight: 900; font-size: 17px; white-space: nowrap; }
table.quote-t .dsc { color: var(--text-secondary); font-size: 12.5px; }
table.quote-t tr.new-row { background: rgba(230, 0, 18, 0.09); }
table.quote-t tr.new-row .ph { color: #FF6470; }
.total-bar {
  margin-top: 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 22px;
  border-radius: 12px;
  background: rgba(0, 207, 255, 0.09);
  border: 1px solid var(--line-cyan);
}
.total-bar .lb { font-size: 15px; font-weight: 800; }
.total-bar .lb small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-secondary); margin-top: 4px; }
.total-bar .vv { font-size: 30px; font-weight: 900; color: var(--accent-cyan); }
.total-bar .vv small { font-size: 11.5px; color: var(--text-muted); display: block; text-align: right; font-weight: 500; margin-top: 3px; }

/* ---------- 自己紹介 ---------- */
.who-hero { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
.who-hero .name { font-size: 30px; font-weight: 900; line-height: 1.3; }
.who-hero .role { margin-top: 10px; font-size: 13px; color: var(--accent-cyan); font-weight: 700; letter-spacing: .06em; }
.who-hero .bio { margin-top: 14px; font-size: 13.5px; line-height: 1.8; color: var(--text-secondary); }
.work {
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 8px;
}
.work .wk { font-size: 11px; font-weight: 900; letter-spacing: .12em; color: var(--thh-red); }
.work .wt { font-size: 16.5px; font-weight: 800; line-height: 1.4; }
.work .wd { font-size: 12.5px; line-height: 1.7; color: var(--text-secondary); }
.work .wl { margin-top: auto; padding-top: 8px; font-size: 12px; font-weight: 700; color: var(--accent-cyan); line-height: 1.5; }

/* ---------- 未確定マーカー ---------- */
.todo {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(255, 107, 53, 0.22);
  border: 1px dashed var(--accent-orange);
  color: #FFB08A;
  font-size: 11.5px;
  font-weight: 700;
}

/* ================================================================
   第3版：目利き・費用対効果コンポーネント
   ================================================================ */

/* ---------- 前提の確認（コンパクト） ---------- */
.premise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.premise-col { display: flex; flex-direction: column; gap: 8px; }
.premise-col .pc-h {
  font-size: 12px; font-weight: 900; letter-spacing: .1em;
  color: var(--accent-cyan); padding-bottom: 7px; border-bottom: 1px solid var(--line-cyan);
}
.premise-col .pc-i {
  font-size: 12.8px; line-height: 1.65; color: var(--text-secondary);
  padding: 9px 12px; border-radius: 8px; background: rgba(255,255,255,.04);
}
.premise-col .pc-i b { color: #fff; font-weight: 700; }

/* ---------- 作る / 作らない ---------- */
.build-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.build-tbl th, .build-tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-hair); vertical-align: top; line-height: 1.6; }
.build-tbl thead th { font-size: 11px; letter-spacing: .1em; color: var(--text-muted); border-bottom: 1px solid var(--line-soft); }
.build-tbl .item { font-weight: 800; color: #fff; width: 210px; }
.build-tbl .verdict { width: 108px; font-weight: 900; white-space: nowrap; }
.build-tbl .no  { color: #FF6470; }
.build-tbl .yes { color: var(--accent-green); }
.build-tbl .why { color: var(--text-secondary); font-size: 12.5px; }
.build-tbl tr.drop { background: rgba(230,0,18,.06); }

/* ---------- 回収モデル ---------- */
.formula {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 20px; border-radius: 12px; flex-wrap: wrap;
  background: rgba(0,207,255,.07); border: 1px solid var(--line-cyan);
  font-size: 14px; font-weight: 700;
}
.formula .box {
  padding: 7px 13px; border-radius: 7px; background: rgba(255,255,255,.09);
  border: 1px dashed var(--accent-orange); color: #FFB08A; font-weight: 800;
}
.formula .op { color: var(--text-muted); font-size: 17px; }
.formula .res { color: var(--accent-cyan); font-weight: 900; }

.sens { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; }
.sens th, .sens td { padding: 10px 8px; border: 1px solid var(--line-hair); }
.sens thead th { font-size: 11.5px; color: var(--text-muted); background: rgba(255,255,255,.04); }
.sens tbody th { font-size: 12.5px; color: var(--text-secondary); background: rgba(255,255,255,.04); font-weight: 600; }
.sens td { font-weight: 800; color: #fff; }
.sens td.good { background: rgba(16,185,129,.16); color: #6EE7B7; }
.sens td.mid  { background: rgba(0,207,255,.10); }

.fill-note {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  padding: 11px 18px; border-radius: 10px;
  background: rgba(255,107,53,.10); border: 1px dashed var(--accent-orange);
  font-size: 13px; color: #FFCDB4; line-height: 1.6;
}
