/* Author: VIVI x Codex */
:root {
  --bg: #f3eee3;
  --paper: #fffaf0;
  --ink: #080706;
  --ink-soft: #372f2b;
  --line: #080706;
  --red: #ff2a1f;
  --yellow: #ffd324;
  --cyan: #00a6b8;
  --green: #9fd63d;
  --shadow: 9px 9px 0 #080706;
  --soft-shadow: 4px 4px 0 #080706;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(circle at 50% -8rem, rgba(255, 42, 31, 0.24), transparent 20rem),
    radial-gradient(circle at 110% 22rem, rgba(0, 166, 184, 0.24), transparent 18rem),
    linear-gradient(180deg, #fffaf0 0%, #f5ebd8 48%, #efe7dc 100%);
  overflow-x: hidden;
}

body::before,
body::after,
.page-noise,
.heat {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  content: "";
  z-index: 0;
  background:
    repeating-linear-gradient(90deg, rgba(8, 7, 6, 0.035) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(0deg, rgba(8, 7, 6, 0.028) 0 1px, transparent 1px 11px);
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  z-index: 0;
  background-image:
    radial-gradient(rgba(8, 7, 6, 0.16) 0.8px, transparent 0.8px),
    radial-gradient(rgba(8, 7, 6, 0.08) 0.9px, transparent 0.9px);
  background-position: 0 0, 5px 5px;
  background-size: 10px 10px;
  opacity: 0.42;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.page-noise {
  z-index: 3;
  background:
    linear-gradient(105deg, transparent 0 18%, rgba(255, 255, 255, 0.38) 18% 18.45%, transparent 18.45% 41%, rgba(8, 7, 6, 0.06) 41% 41.35%, transparent 41.35%),
    linear-gradient(72deg, transparent 0 58%, rgba(255, 211, 36, 0.18) 58% 59%, transparent 59%);
  opacity: 0.9;
}

.heat {
  z-index: 1;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.54;
}

.heat-a {
  top: 9rem;
  left: -6rem;
  width: 19rem;
  height: 19rem;
  background: var(--yellow);
}

.heat-b {
  top: 52rem;
  right: -7rem;
  width: 18rem;
  height: 18rem;
  background: var(--red);
}

.heat-c {
  left: 42%;
  bottom: 5rem;
  width: 16rem;
  height: 16rem;
  background: var(--cyan);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 12px 24px;
  color: var(--paper);
  background: rgba(8, 7, 6, 0.94);
  border-bottom: 5px solid var(--red);
  backdrop-filter: blur(16px);
}

.brand,
.topnav a,
.eyebrow,
.section-tag,
.step-badge,
.principle-no,
.quote-sticker,
.meter-label,
.mascot-tag,
.slide-rail span,
.dialogue-role,
.manual-role,
.role-board-tag,
.detail-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  font-size: 12px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topnav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 2px solid rgba(255, 250, 240, 0.68);
  font-size: 11px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.topnav a:hover {
  color: var(--ink);
  background: var(--yellow);
  transform: translateY(-2px);
}

.slide-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 70;
  display: grid;
  gap: 9px;
  transform: translateY(-50%);
}

.slide-rail a {
  display: grid;
  justify-items: end;
  min-width: 98px;
  padding: 9px 11px;
  color: var(--paper);
  background: rgba(8, 7, 6, 0.88);
  border: 2px solid rgba(255, 250, 240, 0.8);
  box-shadow: 4px 4px 0 rgba(255, 42, 31, 0.9);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.slide-rail span {
  color: var(--yellow);
  font-size: 10px;
}

.slide-rail b {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  font-weight: 900;
}

.slide-rail a.is-active {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--line);
  transform: translateX(-8px) skewX(-8deg);
}

.slide-rail a.is-active span {
  color: var(--red);
}

.page-shell {
  position: relative;
  z-index: 10;
  width: min(calc(100% - 92px), var(--content));
  margin: 0 auto;
  padding: 26px 0 120px;
}

.slide {
  position: relative;
  min-height: calc(100svh - 94px);
  display: grid;
  align-content: center;
  gap: 24px;
  margin-bottom: 34px;
  padding: clamp(16px, 2.4vw, 34px);
  border: 4px solid var(--line);
  background:
    linear-gradient(112deg, transparent 0 43%, rgba(255, 42, 31, 0.08) 43% 43.6%, transparent 43.6%),
    rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.slide::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -1;
  background:
    repeating-conic-gradient(from -18deg at 50% 50%, rgba(8, 7, 6, 0.08) 0deg 1deg, transparent 1deg 7deg);
  opacity: 0.4;
}

.slide::after {
  content: "BURN";
  position: absolute;
  right: -0.12em;
  bottom: -0.28em;
  z-index: -1;
  color: rgba(8, 7, 6, 0.045);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-weight: 900;
  font-size: clamp(7rem, 17vw, 19rem);
  line-height: 1;
  transform: rotate(-8deg);
}

.hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(22px, 3vw, 42px);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 211, 36, 0.62), transparent 14rem),
    linear-gradient(126deg, rgba(255, 42, 31, 0.14), transparent 48%),
    var(--paper);
}

.hero-copy,
.hero-stage,
.quote-inner,
.chapter-head,
.manifesto-card,
.checklist-card,
.principle-card,
.manual-step,
.app-card,
.big-panel,
.final-burn,
.mascot-card,
.meter-card,
.detail-card,
.scene-banner,
.role-board {
  position: relative;
}

.hero-copy {
  min-width: 0;
  align-self: center;
  padding: clamp(18px, 3vw, 42px) 0;
}

.eyebrow,
.section-tag,
.meter-label,
.mascot-tag,
.quote-sticker,
.manual-role,
.role-board-tag,
.detail-kicker,
.dialogue-role {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 11px;
}

.title-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 13px 6px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: clamp(1.05rem, 1.75vw, 1.45rem);
  font-weight: 900;
  transform: rotate(-2deg);
}

.hero h1,
.chapter-head h2,
.final-burn .burn-line,
.quote-inner p,
.mascot-copy h2,
.card h3,
.principle-card h3,
.manual-step h3,
.app-card h3,
.big-panel h3,
.detail-card h3,
.scene-chip,
.dialogue-card p:last-child,
.big-quote,
.detail-quote {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero h1,
.chapter-head h2,
.final-burn .burn-line,
.quote-inner p,
.mascot-copy h2,
.card h3,
.principle-card h3,
.manual-step h3,
.app-card h3,
.big-panel h3,
.detail-card h3,
.scene-chip,
.dialogue-card p:last-child,
.big-quote,
.detail-quote {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-weight: 900;
}

.hero h1 {
  display: grid;
  gap: 3px;
  max-width: 9ch;
  color: var(--ink);
  font-size: clamp(4.1rem, 8.4vw, 8rem);
  line-height: 0.86;
  letter-spacing: -0.06em;
  text-shadow: none;
}

.title-accent {
  width: max-content;
  max-width: min(100%, 18ch);
  margin-top: 8px;
  padding: 9px 13px 7px;
  color: var(--paper);
  background: var(--red);
  border: 3px solid var(--line);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: none;
  box-shadow: var(--soft-shadow);
  transform: rotate(1.5deg);
}

.hero-lede {
  max-width: 23ch;
  margin: 26px 0 0;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: clamp(1.15rem, 1.55vw, 1.35rem);
  font-weight: 900;
  line-height: 1.65;
}

.hero-stickers,
.bullet-cloud,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-stickers {
  margin-top: 28px;
}

.hero-stickers span,
.bullet-cloud span,
.pill-row span,
.role-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 0.98rem;
  font-weight: 900;
}

.hero-stickers span:nth-child(1),
.bullet-cloud span:nth-child(1),
.pill-row span:nth-child(1),
.role-token:nth-of-type(2) {
  background: var(--yellow);
  transform: rotate(-3deg);
}

.hero-stickers span:nth-child(2),
.bullet-cloud span:nth-child(2),
.pill-row span:nth-child(2),
.role-token:nth-of-type(3) {
  color: var(--paper);
  background: var(--cyan);
  transform: rotate(2deg);
}

.hero-stickers span:nth-child(3),
.bullet-cloud span:nth-child(3),
.pill-row span:nth-child(3),
.role-token:nth-of-type(4) {
  color: var(--paper);
  background: var(--red);
  transform: rotate(-1.5deg);
}

.hero-stickers span:nth-child(4),
.bullet-cloud span:nth-child(4),
.pill-row span:nth-child(4),
.role-token:nth-of-type(5) {
  background: var(--green);
  transform: rotate(2.4deg);
}

.hero-stage {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  align-items: center;
}

.mascot-card,
.meter-card,
.quote-inner,
.chapter-head,
.manifesto-card,
.checklist-card,
.principle-card,
.manual-step,
.app-card,
.detail-card,
.big-panel,
.final-burn,
.scene-banner,
.role-board {
  border: 4px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.mascot-card {
  min-height: 430px;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  padding: clamp(28px, 4vw, 44px);
  border: 0;
  background:
    radial-gradient(circle at 46% 47%, rgba(255, 211, 36, 0.42), transparent 11rem),
    transparent;
  box-shadow: none;
  transform: none;
}

.mascot {
  position: relative;
  width: min(300px, 100%);
  height: 390px;
  margin: 0 auto;
  transform: scale(1.22);
  transform-origin: center;
}

.flame {
  position: absolute;
  left: 50%;
  border: 4px solid var(--line);
  border-radius: 55% 45% 55% 45% / 68% 40% 60% 32%;
  transform: translateX(-50%);
}

.flame-back {
  bottom: 8px;
  width: 142px;
  height: 186px;
  background: linear-gradient(180deg, var(--yellow), #ff8b19 48%, var(--red));
  animation: bob 2.6s ease-in-out infinite;
}

.flame-front {
  bottom: 36px;
  width: 82px;
  height: 124px;
  background: linear-gradient(180deg, #fff, #fff08c 55%, #ff9b26);
  animation: bob 2.1s ease-in-out infinite reverse;
}

.face {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: 66px;
  height: 42px;
  transform: translateX(-50%);
}

.eye,
.mouth {
  position: absolute;
  background: var(--line);
}

.eye {
  top: 8px;
  width: 12px;
  height: 16px;
  border-radius: 999px;
}

.eye-left {
  left: 9px;
}

.eye-right {
  right: 9px;
}

.mouth {
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 14px;
  border-radius: 0 0 999px 999px;
  border: 0;
  transform: translateX(-50%);
}

.spark {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 3px solid var(--line);
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 38% 64%, 0% 50%, 38% 36%);
}

.spark-a {
  left: 3px;
  top: 58px;
  animation: drift 2.8s ease-in-out infinite;
}

.spark-b {
  right: 7px;
  top: 24px;
  background: var(--cyan);
  animation: drift 2.2s ease-in-out infinite reverse;
}

.spark-c {
  right: 22px;
  bottom: 24px;
  background: var(--red);
  animation: drift 2.9s ease-in-out infinite;
}

.mascot-copy h2 {
  margin: 4px 0 8px;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.9;
}

.mascot-copy p,
.meter-card li,
.manual-step p,
.app-card p,
.big-panel p,
.card p,
.principle-card p,
.check-list li,
.detail-card p,
.section-note {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.78;
}

.speech-bubble {
  position: relative;
  margin-top: 16px;
  padding: 14px 16px;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
  font-weight: 900;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -12px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-right: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  transform: rotate(45deg);
}

.meter-card {
  display: none;
}

.meter-track {
  width: 100%;
  height: 20px;
  padding: 3px;
  background: #fff;
  border: 3px solid var(--line);
}

.meter-track span {
  display: block;
  width: var(--fill);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--yellow), var(--red));
}

.meter-card ul,
.check-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.meter-card li,
.check-list li {
  position: relative;
  padding-left: 23px;
  font-weight: 700;
}

.meter-card li + li,
.check-list li + li {
  margin-top: 8px;
}

.meter-card li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  background: var(--red);
  border: 2px solid var(--line);
  border-radius: 999px;
}

.quote-banner {
  place-items: center;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(8, 7, 6, 0.18) 0deg 1deg, transparent 1deg 6deg),
    var(--ink);
}

.quote-banner::after {
  color: rgba(255, 250, 240, 0.06);
}

.quote-inner {
  width: min(940px, 100%);
  padding: clamp(24px, 4vw, 48px);
  text-align: center;
  background: var(--paper);
  transform: rotate(-0.8deg);
}

.quote-sticker {
  display: inline-flex;
  padding: 8px 14px 7px;
  color: var(--paper);
  background: var(--red);
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.quote-inner p:last-child {
  font-size: clamp(2rem, 4.4vw, 4.35rem);
  line-height: 1.08;
}

.text-highlight {
  display: inline-block;
  padding: 0 0.12em;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
  transform: rotate(-2deg);
}

.chapter {
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
}

.chapter-head {
  grid-column: 1 / -1;
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(22px, 3vw, 36px);
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(255, 42, 31, 0.72), rgba(8, 7, 6, 0.02) 34%),
    var(--ink);
}

.chapter-principles .chapter-head {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  align-self: start;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: start;
  gap: 22px;
  align-content: start;
  padding: clamp(26px, 3vw, 42px);
}

.chapter-principles .chapter-head h2 {
  font-size: clamp(4rem, 6.6vw, 7rem);
}

.chapter-principles .section-lede {
  max-width: none;
  align-self: start;
}

.chapter-principles .section-note {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.6;
  align-self: end;
}

.chapter-head .section-tag,
.chapter-head .section-note {
  color: var(--yellow);
}

.chapter-head h2 {
  color: var(--paper);
  font-size: clamp(3rem, 5.8vw, 6rem);
  line-height: 0.88;
}

.section-lede {
  max-width: 18ch;
  margin: 0;
  padding: 16px 18px;
  color: var(--ink);
  background: var(--yellow);
  border: 4px solid var(--line);
  box-shadow: var(--soft-shadow);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: clamp(1.35rem, 2.25vw, 2rem);
  font-weight: 900;
  line-height: 1.5;
}

.scene-banner,
.chapter-grid,
.principles-stack,
.manual-track,
.application-grid,
.detail-grid,
.big-panel,
.final-burn {
  grid-column: 1 / -1;
}

.scene-banner {
  padding: 22px;
  background:
    repeating-linear-gradient(135deg, rgba(8, 7, 6, 0.06) 0 5px, transparent 5px 14px),
    var(--paper);
}

.scene-chip {
  display: inline-flex;
  padding: 8px 14px;
  margin-bottom: 14px;
  background: var(--cyan);
  color: var(--paper);
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
  font-size: 1.35rem;
}

.dialogue-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dialogue-row-single,
.theory-grid-single {
  grid-template-columns: 1fr;
}

.dialogue-card {
  padding: 18px;
  background: #fff;
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.main-voice {
  background: #ffe5dc;
  transform: rotate(-1deg);
}

.side-voice {
  background: #e7fbff;
  transform: rotate(1deg);
}

.dialogue-card p:last-child {
  font-size: clamp(1.55rem, 2.45vw, 2.4rem);
  line-height: 1.2;
}

.chapter-grid,
.principles-stack,
.manual-track,
.application-grid,
.detail-grid {
  display: grid;
  gap: 18px;
}

.theory-grid,
.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chapter-theory-followup {
  grid-template-columns: 1fr;
  align-items: start;
  align-content: start;
  min-height: auto;
}

.chapter-theory-followup .scene-banner,
.chapter-theory-followup .chapter-grid {
  max-width: none;
  width: 100%;
  margin: 0 auto;
}

.chapter-theory-followup .checklist-card {
  min-height: auto;
}

.principles-stack,
.manual-track {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chapter-principles .principles-stack {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 8px;
}

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

.manifesto-card,
.checklist-card,
.principle-card,
.manual-step,
.app-card,
.detail-card,
.big-panel {
  padding: clamp(20px, 2.4vw, 30px);
}

.manifesto-card,
.manual-step:nth-child(2),
.app-card-page,
.quote-card {
  transform: rotate(-1deg);
}

.checklist-card,
.manual-step:nth-child(3),
.app-card-expression {
  transform: rotate(1deg);
}

.principle-card:nth-child(2),
.manual-step:nth-child(4),
.app-card-system {
  transform: rotate(-0.6deg);
}

.card h3,
.principle-card h3,
.manual-step h3,
.app-card h3,
.big-panel h3,
.detail-card h3 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 0.96;
}

.big-quote,
.detail-quote {
  color: var(--ink);
  font-size: clamp(2rem, 3.6vw, 4rem);
  line-height: 1.08;
}

.quote-card .detail-quote {
  font-size: clamp(2.55rem, 4.4vw, 5rem);
  font-weight: 900;
  line-height: 1.02;
}

.principle-card,
.manual-step,
.app-card,
.detail-card,
.manifesto-card,
.checklist-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.chapter-principles .principle-card {
  min-height: 470px;
  padding: clamp(26px, 2.6vw, 34px);
}

.chapter-principles .principle-card h3 {
  font-size: clamp(1.9rem, 2.35vw, 2.8rem);
  line-height: 1;
}

.principle-title-line {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.principle-card:nth-child(1),
.manual-step:nth-child(1),
.app-card-page {
  background: linear-gradient(180deg, #fffaf0, #fff0a6);
}

.principle-card:nth-child(2),
.manual-step:nth-child(2),
.app-card-expression {
  background: linear-gradient(180deg, #fffaf0, #e7fbff);
}

.principle-card:nth-child(3),
.manual-step:nth-child(3),
.quote-card {
  background: linear-gradient(180deg, #fffaf0, #ffe1dc);
}

.principle-card:nth-child(4),
.manual-step:nth-child(4),
.app-card-system {
  background: linear-gradient(180deg, #fffaf0, #eafecc);
}

.principle-no,
.step-badge {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--paper);
  background: var(--ink);
  border: 3px solid var(--line);
  box-shadow: 3px 3px 0 var(--red);
  font-size: 14px;
}

.manual-role {
  color: var(--cyan);
}

.step-example {
  margin-top: auto;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 1rem;
  font-weight: 900;
}

.manual-break-line {
  display: block;
  white-space: nowrap;
}

.app-card {
  justify-content: flex-end;
}

.big-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(270px, 0.9fr);
  gap: 22px;
  align-items: center;
  background:
    radial-gradient(circle at 80% 15%, rgba(255, 211, 36, 0.58), transparent 9rem),
    linear-gradient(135deg, rgba(0, 166, 184, 0.14), transparent 50%),
    var(--paper);
}

.panel-side {
  display: grid;
}

.role-board {
  padding: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.role-token + .role-token {
  margin-top: 10px;
}

.final-burn {
  padding: clamp(28px, 5vw, 68px);
  color: var(--paper);
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 250, 240, 0.18) 0deg 1deg, transparent 1deg 7deg),
    var(--red);
}

.burn-line {
  color: var(--paper);
  font-size: clamp(2.45rem, 5.8vw, 6.4rem);
  line-height: 1;
  text-align: center;
  text-shadow: 5px 5px 0 var(--line);
}

.ending-tagline {
  width: fit-content;
  max-width: min(100%, 28ch);
  margin: 24px auto 0;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--line);
  box-shadow: var(--soft-shadow);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
  font-weight: 900;
  line-height: 1.6;
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px) rotate(-0.4deg) scale(0.985);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) rotate(0deg) scale(1);
}

@keyframes bob {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-9px);
  }
}

@keyframes drift {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(14deg);
  }
}

@media (max-width: 1200px) {
  .slide-rail {
    display: none;
  }

  .page-shell {
    width: min(calc(100% - 34px), var(--content));
  }

  .principles-stack,
  .manual-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topnav {
    justify-content: flex-start;
  }

  .hero,
  .chapter,
  .big-panel,
  .theory-grid,
  .detail-grid,
  .application-grid,
  .dialogue-row {
    grid-template-columns: 1fr;
  }

  .chapter-principles .chapter-head {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    min-width: 0;
    max-width: none;
    font-size: clamp(3rem, 12vw, 3.75rem);
  }

  .mascot-card {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
    padding: 20px 8px 26px;
  }

  .mascot {
    width: min(220px, 100%);
    height: 290px;
    transform: scale(1.08);
  }

  .section-lede {
    max-width: none;
  }

  .slide {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 18px), var(--content));
    padding-top: 12px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .topnav a {
    min-height: 30px;
    padding: 0 9px;
    font-size: 10px;
  }

  .slide {
    padding: 14px;
    border-width: 3px;
    box-shadow: 5px 5px 0 var(--line);
  }

  .hero-copy {
    padding: 10px 0;
  }

  .hero h1 {
    text-shadow: none;
  }

  .title-accent {
    display: block;
    width: fit-content;
    max-width: calc(100% - 8px);
    font-size: clamp(1.15rem, 6.2vw, 1.55rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .hero-stickers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    max-width: min(260px, 100%);
  }

  .hero-stickers span {
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.82rem;
    line-height: 1.12;
    text-align: center;
    overflow-wrap: anywhere;
    transform: none !important;
  }

  .principles-stack,
  .manual-track {
    grid-template-columns: 1fr;
  }

  .mascot-card,
  .meter-card,
  .quote-inner,
  .chapter-head,
  .manifesto-card,
  .checklist-card,
  .principle-card,
  .manual-step,
  .app-card,
  .detail-card,
  .big-panel,
  .final-burn,
  .scene-banner,
  .role-board {
    border-width: 3px;
    box-shadow: 5px 5px 0 var(--line);
  }

  .quote-inner p:last-child,
  .burn-line {
    line-height: 1.12;
  }

  .mascot {
    width: min(190px, 100%);
    height: 248px;
    transform: scale(1);
  }
}
