:root {
  --bg-top: #f5f0e5;
  --bg-bottom: #ece4d5;
  --ink: #132139;
  --ink-soft: #48607a;
  --paper: rgba(255, 252, 246, 0.88);
  --paper-strong: rgba(255, 252, 246, 0.96);
  --line: rgba(19, 33, 57, 0.09);
  --accent-a: #d4573f;
  --accent-b: #0c7a80;
  --accent-c: #d8992c;
  --shadow: 0 34px 72px rgba(18, 29, 46, 0.16);
  --radius: 32px;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-display: "M PLUS 1p", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-ui: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --font-symbol: "Material Symbols Rounded";
  --step-width: 1160px;
  --step-height: 720px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 14% 16%, rgba(212, 87, 63, 0.18), transparent 24%),
    radial-gradient(circle at 84% 14%, rgba(12, 122, 128, 0.17), transparent 24%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-size: auto, auto, 30px 30px, 30px 30px, auto;
}

a {
  color: var(--accent-b);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  border-radius: 999px;
  background: rgba(19, 33, 57, 0.08);
}

.fallback-message {
  display: none;
}

.impress-not-supported .fallback-message {
  display: block;
  width: min(680px, calc(100vw - 48px));
  margin: 10vh auto;
  padding: 28px 32px;
  border-radius: 24px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  line-height: 1.7;
}

.impress-supported .fallback-message {
  display: none;
}

#hud {
  position: fixed;
  inset: 22px 22px auto 22px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(18, 29, 46, 0.08);
  font-family: var(--font-ui);
}

.hud-chip-right {
  margin-left: auto;
}

.hud-label {
  color: var(--ink-soft);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#impress {
  pointer-events: none;
}

.step {
  position: relative;
  width: var(--step-width);
  min-height: var(--step-height);
  padding: 46px 50px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.22)),
    var(--paper);
  box-shadow: var(--shadow);
  pointer-events: auto;
  opacity: 0.12;
  transition:
    opacity 400ms ease,
    box-shadow 400ms ease;
}

.step.active {
  opacity: 1;
  box-shadow: 0 38px 96px rgba(18, 29, 46, 0.2);
}

.impress-on-overview .step {
  opacity: 0.84;
}

.impress-on-overview .overview-step,
.impress-on-overview .overview-step.active {
  width: 0;
  min-height: 0;
  padding: 0;
  opacity: 0;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.step.hero {
  background:
    radial-gradient(circle at top right, rgba(216, 153, 44, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.3)),
    var(--paper-strong);
}

.overview-step {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-b);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
}

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  max-width: none;
}

h1 {
  font-size: 3.55rem;
  font-weight: 800;
}

h2 {
  font-size: 2.28rem;
  font-weight: 800;
  margin-bottom: 22px;
}

h3 {
  font-size: 1.16rem;
  font-weight: 700;
  margin-bottom: 10px;
}

p,
li,
td,
th {
  font-size: 1rem;
  line-height: 1.62;
}

.lead {
  max-width: 36ch;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1.18rem;
  font-weight: 500;
}

h3,
.lead,
.eyebrow,
.signal-band span {
  text-wrap: balance;
}

h1,
.step:not(.closing) > h2 {
  white-space: nowrap;
}

li,
p,
.compact-list,
.bullet-list,
.ordered-list,
.hero-points,
.footnote {
  text-wrap: pretty;
}

.hero-grid,
.cards-grid,
.split,
.compare-grid,
.merge-board,
.badge-grid,
.loop-strip {
  display: grid;
}

.step > * {
  position: relative;
  z-index: 1;
}

.hero-grid {
  grid-template-columns: 1.28fr 0.72fr;
  gap: 28px;
  align-items: start;
}

.hero-stack {
  display: grid;
  gap: 18px;
}

.hero-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.icon-tile {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(19, 33, 57, 0.08);
  box-shadow: 0 12px 24px rgba(18, 29, 46, 0.06);
}

.icon-tile strong,
.icon-tile span {
  display: block;
}

.icon-tile strong {
  margin-bottom: 4px;
  padding-right: 26px;
  font-size: 0.96rem;
}

.icon-tile span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.accent-stage {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
  width: 320px;
  height: 196px;
  border-radius: 44px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.16)),
    rgba(255, 252, 246, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 18px 40px rgba(18, 29, 46, 0.06);
  backdrop-filter: blur(2px);
}

.accent-stage::before,
.accent-stage::after {
  position: absolute;
  display: block;
}

.accent-stage::before {
  content: attr(data-symbol);
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-symbol);
  font-size: 164px;
  line-height: 1;
  letter-spacing: normal;
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 48;
  color: rgba(12, 122, 128, 0.18);
}

.accent-stage::after {
  content: "";
  width: 132px;
  height: 132px;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
}

.accent-center {
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
}

.accent-right {
  right: 58px;
  bottom: 42px;
}

.accent-left {
  left: 58px;
  bottom: 42px;
}

.accent-shell-teal::before {
  color: rgba(12, 122, 128, 0.18);
}

.accent-shell-coral::before {
  color: rgba(212, 87, 63, 0.18);
}

.accent-shell-amber::before {
  color: rgba(216, 153, 44, 0.2);
}

.hero-points {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-points li {
  background: rgba(19, 33, 57, 0.08);
}

.callout {
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(19, 33, 57, 0.08);
}

.callout.warning {
  border-left: 8px solid var(--accent-a);
}

.callout-title {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  background: rgba(12, 122, 128, 0.12);
  color: var(--accent-b);
  letter-spacing: 0.02em;
}

.pill.light {
  background: rgba(19, 33, 57, 0.08);
  color: var(--ink);
}

.cards-grid {
  gap: 18px;
}

.cards-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.panel,
.compare-card,
.source-card,
.badge-card,
.loop-step,
.signal-band {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(19, 33, 57, 0.08);
  box-shadow: 0 14px 28px rgba(18, 29, 46, 0.06);
}

.card[data-symbol]::before,
.panel[data-symbol]::before,
.compare-card[data-symbol]::before,
.source-card[data-symbol]::before,
.badge-card[data-symbol]::before,
.loop-step[data-symbol]::before,
.signal-band[data-symbol]::before,
.icon-tile[data-symbol]::before {
  content: attr(data-symbol);
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-symbol);
  font-size: 34px;
  line-height: 1;
  letter-spacing: normal;
  color: rgba(12, 122, 128, 0.26);
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
}

.compare-card.before[data-symbol]::before,
.card.accent-a[data-symbol]::before,
.loop-step[data-symbol="draw"]::before,
.loop-step[data-symbol="arrow_forward"]::before,
.panel[data-symbol="warning"]::before {
  color: rgba(212, 87, 63, 0.24);
}

.card.accent-c[data-symbol]::before,
.loop-step.final-step[data-symbol]::before,
.panel[data-symbol="rocket_launch"]::before,
.source-card.final[data-symbol]::before {
  color: rgba(216, 153, 44, 0.28);
}

.loop-step[data-symbol]::before {
  top: 18px;
  right: 18px;
  font-size: 30px;
}

.signal-band[data-symbol] {
  padding-right: 72px;
}

.signal-band[data-symbol]::before {
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  font-size: 30px;
}

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(19, 33, 57, 0.08);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
}

.accent-a .card-index {
  background: rgba(212, 87, 63, 0.14);
  color: var(--accent-a);
}

.accent-b .card-index {
  background: rgba(12, 122, 128, 0.14);
  color: var(--accent-b);
}

.accent-c .card-index {
  background: rgba(216, 153, 44, 0.16);
  color: #91630b;
}

.bullet-list,
.compact-list,
.ordered-list {
  margin: 0;
  padding-left: 1.15em;
}

.bullet-list,
.compact-list {
  padding-left: 0;
  list-style: none;
}

.bullet-list li,
.compact-list li {
  position: relative;
  padding-left: 1.45em;
}

.bullet-list li::before,
.compact-list li::before {
  content: "check_circle";
  position: absolute;
  left: 0;
  top: 0.06em;
  font-family: var(--font-symbol);
  font-size: 1em;
  line-height: 1;
  color: var(--accent-b);
  font-variation-settings:
    "FILL" 1,
    "wght" 500,
    "GRAD" 0,
    "opsz" 20;
}

.compact-list li::before {
  content: "arrow_forward";
  color: rgba(19, 33, 57, 0.6);
}

.bullet-list li + li,
.compact-list li + li,
.ordered-list li + li {
  margin-top: 8px;
}

.compact-list li {
  font-size: 0.94rem;
}

.split,
.compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tone {
  background:
    radial-gradient(circle at top right, rgba(12, 122, 128, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.7);
}

.compare-card.before {
  background:
    radial-gradient(circle at top right, rgba(212, 87, 63, 0.11), transparent 28%),
    rgba(255, 255, 255, 0.68);
}

.compare-card.after {
  background:
    radial-gradient(circle at top right, rgba(12, 122, 128, 0.14), transparent 28%),
    rgba(255, 255, 255, 0.7);
}

.mini-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(19, 33, 57, 0.08);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.signal-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  background:
    radial-gradient(circle at top right, rgba(216, 153, 44, 0.16), transparent 32%),
    rgba(255, 255, 255, 0.72);
}

.signal-band strong {
  font-family: var(--font-display);
  font-size: 1.14rem;
}

.signal-band span {
  color: var(--ink-soft);
}

.signal-band.highlight {
  margin-top: 20px;
}

.merge-board {
  grid-template-columns: 1fr auto 1fr auto 1.05fr;
  gap: 14px;
  align-items: center;
}

.merge-plus,
.merge-arrow,
.flow-arrow {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-a);
  text-align: center;
}

.source-card.final {
  background:
    radial-gradient(circle at top right, rgba(216, 153, 44, 0.16), transparent 28%),
    rgba(255, 255, 255, 0.72);
}

.badge-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.badge-card {
  display: grid;
  gap: 10px;
}

.badge-card.emphasis {
  background:
    radial-gradient(circle at top right, rgba(12, 122, 128, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.72);
}

.badge-code {
  color: var(--ink-soft);
}

.loop-strip {
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.loop-step {
  display: grid;
  gap: 10px;
}

.loop-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(212, 87, 63, 0.15);
  color: var(--accent-a);
  font-family: var(--font-display);
  font-weight: 800;
}

.loop-step.emphasis {
  background:
    radial-gradient(circle at top right, rgba(12, 122, 128, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.72);
}

.loop-step.final-step span {
  background: rgba(12, 122, 128, 0.16);
  color: var(--accent-b);
}

.closing-grid {
  margin-top: 28px;
}

.footnote {
  margin: 18px 0 0;
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.96rem;
}

.ordered-list li::marker {
  color: var(--accent-a);
  font-weight: 700;
}

.closing h2 {
  max-width: 18ch;
}

@media (max-width: 1280px) {
  .step {
    width: 1060px;
    min-height: 680px;
    padding: 40px 42px;
  }

  h1 {
    font-size: 3.08rem;
  }

  h2 {
    font-size: 2rem;
  }

  h1,
  .step:not(.closing) > h2 {
    white-space: normal;
  }

  .loop-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .loop-strip .flow-arrow {
    display: none;
  }

  .accent-stage {
    width: 280px;
    height: 168px;
  }

  .accent-stage::before {
    font-size: 140px;
  }
}
