:root {
  --paper: #f6f2e9;
  --paper-2: #fffdf8;
  --ink: #1f2d2a;
  --muted: #64716d;
  --line: #d8d2c7;
  --teal: #167d75;
  --teal-dark: #0d5d57;
  --teal-soft: #d8eeea;
  --amber: #efad43;
  --amber-soft: #fae8c5;
  --red: #c85d4d;
  --red-soft: #f4d9d2;
  --shadow: 0 1.2cqw 3cqw rgba(31, 45, 42, .14);
  font-family: "BIZ UDPGothic", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #17201e;
  color: var(--ink);
}

button { font: inherit; }

.deck {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.slide {
  container-type: size;
  position: absolute;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  padding: 4.7cqw 5.4cqw 3.8cqw;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(22,125,117,.08) 0 11%, transparent 11.2%),
    linear-gradient(135deg, var(--paper-2), var(--paper));
  opacity: 0;
  transform: translateX(6%) scale(.985);
  pointer-events: none;
  transition: opacity 280ms ease, transform 360ms ease;
}

.slide::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: .75cqw;
  background: var(--teal);
}

.slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

.slide.is-before { transform: translateX(-6%) scale(.985); }

.slide-header { position: relative; z-index: 2; }

.eyebrow {
  margin: 0 0 .7cqw;
  color: var(--teal);
  font-size: 1.05cqw;
  font-weight: 800;
  letter-spacing: .14em;
}

h1, h2, p { margin-top: 0; }

h2 {
  margin: 0;
  font-size: 3.15cqw;
  line-height: 1.18;
  letter-spacing: -.045em;
}

h2 span { color: var(--teal); }

.slide-footer {
  position: absolute;
  left: 5.4cqw;
  right: 3.4cqw;
  bottom: 1.3cqw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #66736f;
  font-size: .9cqw;
  letter-spacing: .02em;
}

.takeaway {
  position: absolute;
  left: 5.4cqw;
  bottom: 4.25cqw;
  margin: 0;
  font-size: 2cqw;
  font-weight: 700;
  letter-spacing: -.035em;
}

.takeaway strong { color: var(--teal-dark); }

.date-label {
  position: absolute;
  right: 3.5cqw;
  bottom: 4.5cqw;
  margin: 0;
  color: var(--muted);
  font-size: .92cqw;
  font-weight: 700;
  letter-spacing: .06em;
}

.speaker-notes { display: none; }

/* Cover */
.slide-cover {
  padding: 5.8cqw 5.5cqw 3.8cqw;
  background:
    linear-gradient(90deg, rgba(255,253,248,.98) 0 48%, rgba(216,238,234,.48) 100%),
    var(--paper);
}

.slide-cover::before { width: 1.1cqw; background: linear-gradient(var(--teal), var(--amber)); }

.cover-grid {
  height: 100%;
  display: grid;
  grid-template-columns: 46% 54%;
  align-items: center;
}

.cover-copy { position: relative; z-index: 3; }

.cover-copy h1 {
  margin: 0 0 1.8cqw;
  font-size: 5.15cqw;
  line-height: 1.03;
  letter-spacing: -.075em;
}

.cover-copy h1 span {
  color: var(--teal);
  background: linear-gradient(transparent 64%, rgba(239,173,67,.36) 64%);
}

.subtitle {
  margin: 0;
  font-size: 1.55cqw;
  line-height: 1.55;
  font-weight: 700;
}

.period {
  display: inline-block;
  margin: 1.6cqw 0 0;
  padding: .55cqw .95cqw;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .95cqw;
  font-weight: 800;
  letter-spacing: .08em;
}

.cover-visual {
  position: relative;
  align-self: stretch;
  display: grid;
  place-items: center;
}

.cover-visual::after {
  content: "";
  position: absolute;
  width: 35cqw;
  height: 35cqw;
  border-radius: 50%;
  border: 1px dashed rgba(22,125,117,.32);
  z-index: 0;
}

.cover-visual img {
  position: relative;
  z-index: 2;
  width: 41cqw;
  max-height: 31cqh;
  object-fit: contain;
  filter: drop-shadow(0 1.3cqw 1.4cqw rgba(31,45,42,.12));
}

.floating-tasks {
  position: absolute;
  z-index: 1;
  padding: .65cqw 1.05cqw;
  border-radius: .55cqw;
  background: rgba(255,255,255,.88);
  box-shadow: 0 .45cqw 1.2cqw rgba(31,45,42,.11);
  color: var(--teal-dark);
  font-size: 1cqw;
  font-weight: 800;
}
.task-a { top: 14%; left: 4%; transform: rotate(-5deg); }
.task-b { top: 24%; right: 3%; transform: rotate(4deg); }
.task-c { bottom: 25%; left: 0; transform: rotate(3deg); }
.task-d { bottom: 16%; right: 8%; transform: rotate(-5deg); }

.cover-quote {
  position: absolute;
  z-index: 4;
  right: 1.2cqw;
  bottom: 7.3cqw;
  padding: 1.05cqw 1.4cqw;
  border-radius: 1.1cqw 1.1cqw .1cqw 1.1cqw;
  background: var(--ink);
  color: #fff;
  font-size: 1.25cqw;
  line-height: 1.45;
  font-weight: 800;
  box-shadow: var(--shadow);
}

/* Slide 2 */
.pressure-scene {
  height: 31cqw;
  margin-top: 1.2cqw;
  display: grid;
  grid-template-columns: 27% 43% 23%;
  gap: 3.5%;
  align-items: center;
}

.human-side, .ai-side { position: relative; text-align: center; }
.human-side img { width: 19cqw; height: 18cqw; object-fit: contain; }
.ai-side img { width: 15cqw; height: 16cqw; object-fit: contain; }

.actor-label {
  margin: -.2cqw 0 .65cqw;
  font-size: 1.1cqw;
  font-weight: 900;
  letter-spacing: .04em;
}

.work-pile {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45cqw;
}

.work-pile span {
  padding: .42cqw .72cqw;
  background: var(--red-soft);
  border: 1px solid rgba(200,93,77,.25);
  border-radius: .35cqw;
  color: #7d352b;
  font-size: .9cqw;
  font-weight: 800;
  transform: rotate(-2deg);
}
.work-pile span:nth-child(even) { transform: rotate(2deg); }

.issue-stack {
  position: relative;
  display: grid;
  gap: .9cqw;
}

.issue-stack::before {
  content: "修正するほど会話が長くなる";
  position: absolute;
  right: -1.1cqw;
  top: -2.25cqw;
  color: var(--muted);
  font-size: .82cqw;
  font-weight: 700;
}

.issue-stack p {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 1cqw;
  padding: .8cqw 1.1cqw;
  border-left: .55cqw solid var(--red);
  background: rgba(255,255,255,.72);
  box-shadow: 0 .35cqw 1cqw rgba(31,45,42,.07);
}

.issue-stack b { min-width: 8cqw; font-size: 2.2cqw; letter-spacing: -.04em; }
.issue-stack small { color: var(--muted); font-size: .88cqw; font-weight: 700; }

.ai-job {
  display: inline-block;
  padding: .6cqw .95cqw;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 1cqw;
  font-weight: 900;
}

.pressure-takeaway { color: #7d352b; }

/* Slide 3 */
.memory-scene {
  height: 31cqw;
  margin-top: .8cqw;
  display: grid;
  grid-template-columns: 20% 55% 20%;
  gap: 2.5%;
  align-items: center;
}

.memory-before, .memory-after { text-align: center; }
.memory-before img, .memory-after img { width: 15cqw; height: 15cqw; object-fit: contain; }
.memory-before p, .memory-after p { margin: .1cqw 0 .65cqw; font-size: .95cqw; font-weight: 800; }

.leaving-jobs { display: flex; justify-content: center; gap: .4cqw; }
.leaving-jobs span {
  padding: .35cqw .65cqw;
  border-radius: .35cqw;
  background: var(--amber-soft);
  color: #80591d;
  font-size: .82cqw;
  font-weight: 800;
}

.memory-system {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.1cqw;
  align-items: stretch;
}

.memory-system::before, .memory-system::after {
  position: absolute;
  top: 50%;
  color: var(--teal);
  font-size: 2.2cqw;
  font-weight: 900;
}
.memory-system::before { content: "→"; left: -2.25cqw; }
.memory-system::after { content: "→"; right: -2.25cqw; }

.task-document, .test-gate {
  min-height: 19cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25cqw;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 1cqw;
  box-shadow: var(--shadow);
  text-align: center;
}

.task-document img { width: 10.5cqw; height: 11cqw; object-fit: contain; margin-bottom: .5cqw; }
.task-document strong, .test-gate strong { display: block; font-size: 1.25cqw; }
.task-document span, .test-gate span:not(.check-mark) { display: block; margin-top: .3cqw; color: var(--muted); font-size: .8cqw; font-weight: 700; }

.test-gate { background: var(--teal-soft); border-color: rgba(22,125,117,.35); }
.check-mark {
  display: grid;
  place-items: center;
  width: 6.7cqw;
  height: 6.7cqw;
  margin-bottom: 1cqw;
  border: .48cqw solid var(--teal);
  border-radius: 50%;
  color: var(--teal);
  font-size: 4.2cqw;
  line-height: 1;
  font-weight: 900;
}

.result-ticket {
  display: inline-block;
  padding: .55cqw .8cqw;
  border: .18cqw solid var(--teal);
  border-radius: .35cqw;
  color: var(--teal-dark);
  font-size: .9cqw;
  font-weight: 900;
  letter-spacing: .08em;
  transform: rotate(-3deg);
}

/* Slide 4 */
.team-scene {
  height: 31.5cqw;
  margin-top: .4cqw;
  display: grid;
  grid-template-columns: 15% 5% 22% 4% 25% 22%;
  gap: 1.2%;
  align-items: center;
}

.human-director { text-align: center; }
.human-director img { width: 12cqw; height: 12cqw; object-fit: contain; }
.human-director p { margin: .1cqw 0 .6cqw; font-size: .9cqw; font-weight: 900; }
.human-director div { display: flex; justify-content: center; flex-wrap: wrap; gap: .35cqw; }
.human-director span { padding: .35cqw .55cqw; background: var(--amber-soft); border-radius: .3cqw; font-size: .75cqw; font-weight: 800; }

.handoff-arrow { color: var(--teal); font-size: 2cqw; font-weight: 900; text-align: center; }
.handoff-arrow span { display: block; margin-bottom: .2cqw; color: var(--muted); font-size: .68cqw; white-space: nowrap; }

.ai-role {
  position: relative;
  min-height: 24cqw;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
}

.ai-role img { width: 13.2cqw; height: 14.7cqw; object-fit: contain; margin-bottom: .15cqw; }
.role-code img { width: 17cqw; }
.ai-role strong { display: block; font-size: 1.55cqw; }
.ai-role > span { margin-top: .2cqw; color: var(--muted); font-size: .78cqw; font-weight: 800; }

.role-command {
  margin: .1cqw 0 .2cqw;
  color: var(--teal-dark);
  font-size: .8cqw;
  font-weight: 900;
  letter-spacing: .12em;
}

.design-handoff {
  position: relative;
  z-index: 4;
  align-self: center;
  padding: .55cqw .38cqw;
  border: 1px solid var(--line);
  border-radius: .25cqw;
  background: #fff;
  color: var(--teal-dark);
  box-shadow: 0 .35cqw .8cqw rgba(31,45,42,.1);
  font-size: .68cqw;
  font-weight: 900;
  transform: rotate(-5deg);
  text-align: center;
}

/* Slide 5 */
.review-scene {
  height: 26cqw;
  margin-top: 1.3cqw;
  display: grid;
  grid-template-columns: 34% 25% 34%;
  gap: 3.5%;
  align-items: stretch;
}

.implementation-room, .review-room {
  position: relative;
  padding: 1.1cqw;
  border-radius: 1.1cqw;
  overflow: hidden;
  text-align: center;
}

.implementation-room { background: var(--amber-soft); }
.review-room { background: #fff; border: .18cqw solid var(--teal); }
.room-label { margin: 0; font-size: .9cqw; font-weight: 900; letter-spacing: .04em; }
.implementation-room img, .review-room img { width: 17cqw; height: 18cqw; object-fit: contain; }
.review-room img { width: 13.8cqw; }

.context-noise span {
  position: absolute;
  padding: .3cqw .45cqw;
  border-radius: .25cqw;
  background: rgba(255,255,255,.78);
  color: #7a5b29;
  font-size: .67cqw;
  font-weight: 800;
  transform: rotate(-5deg);
}
.context-noise span:nth-child(1) { left: 1cqw; top: 5cqw; }
.context-noise span:nth-child(2) { right: 1cqw; top: 7cqw; transform: rotate(4deg); }
.context-noise span:nth-child(3) { left: 1.2cqw; bottom: 3cqw; transform: rotate(3deg); }
.context-noise span:nth-child(4) { right: 1.2cqw; bottom: 2.7cqw; }

.context-wall {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .55cqw;
  border-left: .24cqw dashed var(--line);
  border-right: .24cqw dashed var(--line);
}

.context-wall p { margin: 0 0 .25cqw; color: var(--muted); font-size: .75cqw; font-weight: 800; }
.context-wall span {
  min-width: 9.5cqw;
  padding: .43cqw .8cqw;
  border: 1px solid var(--line);
  border-radius: .35cqw;
  background: #fff;
  color: var(--teal-dark);
  font-size: .85cqw;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 .25cqw .5cqw rgba(31,45,42,.06);
}
.context-wall b { position: absolute; right: -1.5cqw; color: var(--teal); font-size: 2cqw; }
.reviewer-name { margin: -.8cqw 0 0; color: var(--teal-dark); font-size: .9cqw; font-weight: 900; letter-spacing: .12em; }

.review-loop {
  margin: .8cqw auto 0;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: .65cqw;
  padding: .52cqw .8cqw;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 .3cqw 1cqw rgba(31,45,42,.07);
  font-size: .82cqw;
  font-weight: 900;
}
.review-loop b { color: var(--teal); }
.review-loop em { padding: .28cqw .55cqw; border-radius: 999px; background: var(--red-soft); color: #813a2e; font-style: normal; font-size: .75cqw; }
.review-takeaway { bottom: 4cqw; font-size: 1.72cqw; }

/* Slide 6 */
.uat-lead {
  width: fit-content;
  margin: .55cqw auto 0;
  padding: .42cqw .82cqw;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 1cqw;
  font-weight: 900;
}

.uat-scene {
  height: 24.2cqw;
  margin-top: .15cqw;
  display: grid;
  grid-template-columns: repeat(3, 21%) 29%;
  gap: 2.6%;
  align-items: end;
}

.persona { text-align: center; }
.persona img { width: 13cqw; height: 16cqw; object-fit: contain; }
.persona p { margin: -.1cqw 0 0; }
.persona strong { display: block; font-size: 1cqw; }
.persona span { display: block; margin-top: .18cqw; color: var(--muted); font-size: .72cqw; line-height: 1.35; font-weight: 700; }

.uat-result {
  align-self: center;
  padding: 1.5cqw 1cqw;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}
.uat-result strong { display: block; font-size: 4.4cqw; line-height: 1; letter-spacing: -.08em; }
.uat-result strong span { font-size: 1.5cqw; letter-spacing: 0; }
.uat-result p { margin: .55cqw 0 0; font-size: .75cqw; line-height: 1.45; font-weight: 800; }

.test-comparison {
  display: grid;
  grid-template-columns: 1fr 3.2cqw 1fr;
  align-items: stretch;
  gap: .6cqw;
  width: 74%;
  margin: .35cqw auto 0;
}
.test-comparison > div:not(.comparison-arrow) {
  padding: .6cqw 1cqw;
  border: 1px solid var(--line);
  border-radius: .55cqw;
  background: #fff;
  text-align: center;
}
.test-comparison span { display: block; margin-bottom: .2cqw; color: var(--muted); font-size: .7cqw; font-weight: 900; letter-spacing: .06em; }
.test-comparison strong { font-size: 1cqw; }
.test-comparison .uat-highlight { border-color: var(--teal); background: var(--teal-soft); }
.test-comparison .uat-highlight span, .test-comparison .uat-highlight strong { color: var(--teal-dark); }
.comparison-arrow { display: grid; place-items: center; color: var(--amber); font-size: 1.8cqw; font-weight: 900; }
.uat-takeaway { bottom: 3.9cqw; font-size: 1.55cqw; }

/* Slide 7 */
.finale-scene {
  height: 30cqw;
  margin-top: .5cqw;
  display: grid;
  grid-template-columns: 27% 20% 48%;
  gap: 2.5%;
  align-items: center;
}

.product-owner { text-align: center; }
.product-owner img { width: 19cqw; height: 18cqw; object-fit: contain; }
.human-decisions { display: flex; flex-wrap: wrap; justify-content: center; gap: .4cqw; }
.human-decisions span { padding: .42cqw .68cqw; border-radius: .35cqw; background: var(--amber-soft); color: #76521c; font-size: .75cqw; font-weight: 900; }

.final-quote {
  position: relative;
  padding: 1.5cqw 1.3cqw;
  border-radius: 1.15cqw 1.15cqw .15cqw 1.15cqw;
  background: var(--ink);
  color: #fff;
  font-size: 1.28cqw;
  line-height: 1.5;
  font-weight: 700;
  box-shadow: var(--shadow);
  text-align: center;
}
.final-quote strong { color: #fbd58e; font-size: 1.55cqw; }
.final-quote::after { content: "→"; position: absolute; right: -2.4cqw; top: 42%; color: var(--teal); font-size: 2.1cqw; }

.ai-operation { text-align: center; }
.final-ai-team {
  height: 17cqw;
  display: flex;
  justify-content: center;
  align-items: end;
}
.final-ai-team img {
  width: 10.8cqw;
  height: 12.6cqw;
  margin: 0 -.7cqw;
  object-fit: contain;
}
.final-ai-team img:nth-child(2) { position: relative; z-index: 2; width: 14cqw; height: 15cqw; }
.qrun-flow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .36cqw; margin-top: .45cqw; }
.qrun-flow span { padding: .48cqw .62cqw; border-radius: .32cqw; background: var(--teal-soft); color: var(--teal-dark); font-size: .82cqw; font-weight: 900; }
.qrun-flow i { color: var(--teal); font-style: normal; font-size: .82cqw; font-weight: 900; }
.finale-takeaway { bottom: 3.9cqw; font-size: 1.7cqw; }
.credit { position: absolute; right: 3.5cqw; bottom: 2.55cqw; margin: 0; color: #84908c; font-size: .65cqw; }

/* Controls and notes */
.deck-controls {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .55rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(18,27,25,.82);
  color: #fff;
  box-shadow: 0 .5rem 2rem rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 180ms ease;
}
.deck-controls:hover, .deck-controls:focus-within { opacity: 1; }
.deck-controls button {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.11);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}
.deck-controls button:hover { background: var(--teal); }
#counter { min-width: 3.3rem; text-align: center; font-size: .78rem; font-weight: 800; }

.progress { position: fixed; z-index: 22; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.12); }
.progress span { display: block; width: calc(100% / 7); height: 100%; background: var(--amber); transition: width 250ms ease; }

.rotate-hint { display: none; }

.notes-panel {
  position: fixed;
  z-index: 30;
  right: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: min(38rem, 42vw);
  padding: 1.25rem 1.35rem;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 1rem;
  background: rgba(20,28,27,.96);
  color: #f6f4ee;
  box-shadow: 0 1rem 4rem rgba(0,0,0,.35);
  transform: translateX(calc(100% + 2rem));
  transition: transform 220ms ease;
}
.notes-panel.is-open { transform: translateX(0); }
.notes-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: .75rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.notes-heading strong { font-size: 1rem; }
.notes-heading button { border: 0; background: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
#notes-content { padding-top: .65rem; font-size: .92rem; line-height: 1.75; }
#notes-content p { margin: 0 0 .85rem; }

@media (max-width: 820px) {
  .deck-controls { opacity: .9; bottom: .4rem; }
  .notes-panel { width: calc(100vw - 2rem); }
}

@media (orientation: portrait) and (max-width: 820px) {
  .rotate-hint {
    position: fixed;
    z-index: 24;
    top: .75rem;
    left: 50%;
    display: block;
    transform: translateX(-50%);
    padding: .45rem .75rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(18,27,25,.82);
    color: #fff;
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 .35rem 1.4rem rgba(0,0,0,.22);
    backdrop-filter: blur(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  @page { size: 13.333in 7.5in; margin: 0; }
  html, body { overflow: visible; background: #fff; }
  .deck { display: block; width: auto; height: auto; overflow: visible; }
  .slide {
    position: relative;
    display: block;
    width: 13.333in;
    height: 7.5in;
    opacity: 1;
    transform: none;
    page-break-after: always;
    break-after: page;
  }
  .deck-controls, .progress, .notes-panel, .rotate-hint { display: none !important; }
}
