:root {
  --comic-paper: #f7f3e8;
  --comic-ink: #26302a;
  --comic-green: #2f5233;
  --comic-gold: #b8860b;
  --comic-burgundy: #7a263a;
  --comic-line: #d6d0bd;
}
.site-header {
  position: static;
}
body {
  background: var(--comic-paper);
  color: var(--comic-ink);
}
.return-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 700;
}
.comic-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 48px;
}
.comic-intro {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 24px;
}
.comic-intro h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  margin: 10px 0;
}
.comic-intro > p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}
.progress {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 22px 0;
}
.progress span {
  font: 700 13px/1 var(--font-mono);
  color: var(--comic-burgundy);
}
.progress i {
  height: 4px;
  flex: 1;
  background: var(--comic-line);
  overflow: hidden;
}
.progress b {
  display: block;
  width: 16.666%;
  height: 100%;
  background: var(--comic-burgundy);
  transition: width 0.25s ease;
}
.scene {
  min-height: 580px;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 34px;
  align-items: stretch;
}
.scene[hidden] {
  display: none;
}
.story-copy,
.comic-panel {
  border: 1px solid var(--comic-line);
  background: #fffdf7;
  box-shadow: 0 18px 50px rgba(38, 48, 42, 0.08);
}
.story-copy {
  padding: clamp(28px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.scene-no {
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--comic-burgundy);
}
.story-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 18px 0;
}
.story-copy p,
.story-copy li {
  font-size: 17px;
  line-height: 1.7;
  color: #505750;
}
.story-copy ul {
  padding-left: 20px;
}
.story-copy blockquote {
  margin: 24px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--comic-gold);
  background: #f5efdf;
  font-weight: 700;
  line-height: 1.55;
}
.comic-panel {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  background: linear-gradient(165deg, #faf6e9 0 64%, #e8dfc9 64%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.comic-panel:before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px solid var(--comic-ink);
  pointer-events: none;
}
.person {
  position: relative;
  width: 128px;
  text-align: center;
  z-index: 2;
}
.person span {
  display: block;
  font: 800 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.person i {
  display: block;
  margin: auto;
  width: 74px;
  height: 74px;
  border: 4px solid var(--comic-ink);
  border-radius: 50%;
  background: #fff;
}
.person i:after {
  content: "";
  display: block;
  width: 70px;
  height: 98px;
  border: 4px solid var(--comic-ink);
  border-radius: 35px 35px 12px 12px;
  transform: translate(-2px, 68px);
  background: var(--comic-green);
}
.person.leon i:after {
  background: var(--comic-burgundy);
}
.person.athena i:after {
  background: #4f7660;
}
.person.banshee i:after {
  background: #3c4652;
}
.person.cobra i:after {
  background: #4d704c;
}
.person.dagger i:after {
  background: #a96f2a;
}
.person.heimdall i:after {
  background: #496b78;
}
.task-cloud {
  width: 48%;
  display: grid;
  gap: 10px;
  margin-left: 28px;
  z-index: 2;
}
.task-cloud b {
  background: #fff;
  border: 2px solid var(--comic-ink);
  padding: 13px 16px;
  transform: rotate(-1deg);
}
.task-cloud b:nth-child(even) {
  transform: rotate(1.4deg);
}
.speech {
  position: absolute;
  top: 62px;
  left: 52px;
  max-width: 245px;
  padding: 18px;
  background: #fff;
  border: 3px solid var(--comic-ink);
  border-radius: 50%;
  font-weight: 700;
  text-align: center;
  z-index: 3;
}
.duo,
.workshop {
  justify-content: space-around;
  padding: 80px;
}
.handoff {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--comic-ink);
  color: #fff;
  padding: 12px 20px;
  font-weight: 800;
  white-space: nowrap;
  z-index: 4;
}
.artifact {
  width: 210px;
  border: 4px solid var(--comic-ink);
  background: #fff;
  padding: 24px;
  text-align: center;
  z-index: 2;
}
.artifact b,
.artifact span {
  display: block;
}
.artifact span {
  margin-top: 10px;
  color: var(--muted);
}
.guard {
  gap: 60px;
}
.scanner {
  width: 250px;
  border: 4px solid var(--comic-ink);
  background: #fff;
  padding: 22px;
  display: grid;
  gap: 12px;
  z-index: 2;
}
.scanner b {
  color: var(--comic-burgundy);
}
.scanner span {
  border-bottom: 1px solid var(--comic-line);
  padding-bottom: 8px;
}
.scanner strong {
  background: var(--comic-green);
  color: #fff;
  padding: 12px;
  text-align: center;
}
.proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.proof-list span {
  padding: 8px 10px;
  background: #edf1ea;
  border: 1px solid #cad5c8;
  font-size: 14px;
  font-weight: 700;
}
.choices {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}
.choices button,
.comic-controls button,
#restart {
  min-height: 48px;
  border: 1px solid var(--comic-ink);
  background: #fff;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
}
.choices button:hover,
.choices button:focus-visible {
  background: var(--comic-ink);
  color: #fff;
}
.feedback {
  min-height: 58px;
  padding: 12px;
  background: #f5efdf;
  border-left: 4px solid var(--comic-gold);
}
.feedback.good {
  background: #e5efe4;
  border-color: var(--comic-green);
}
.feedback.bad {
  background: #f5e5e2;
  border-color: var(--comic-burgundy);
}
.home {
  gap: 42px;
}
.house {
  width: 210px;
  height: 170px;
  border: 5px solid var(--comic-ink);
  background: #fff;
  position: relative;
  display: grid;
  place-items: center;
  font-weight: 900;
  z-index: 2;
}
.house:before {
  content: "";
  position: absolute;
  width: 145px;
  height: 145px;
  border-left: 5px solid var(--comic-ink);
  border-top: 5px solid var(--comic-ink);
  transform: rotate(45deg);
  top: -76px;
  background: #cf9d5c;
  z-index: -1;
}
.boundary {
  position: absolute;
  bottom: 50px;
  background: #fff;
  border: 3px dashed var(--comic-burgundy);
  padding: 12px 18px;
  font-weight: 800;
}
.finale {
  flex-direction: column;
  gap: 55px;
}
.legion-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.legion-row span {
  background: var(--comic-ink);
  color: #fff;
  padding: 9px 12px;
  font: 700 11px/1 var(--font-mono);
}
.artifact.final {
  display: flex;
  width: auto;
  gap: 8px;
  padding: 15px;
}
.artifact.final b {
  background: #edf1ea;
  padding: 8px;
}
.end-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.end-actions a,
#restart {
  padding: 13px 16px;
  background: var(--comic-burgundy);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}
.comic-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 20px 0;
}
.comic-controls span {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.comic-controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.source-note {
  border-top: 1px solid var(--comic-line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.source-note p {
  margin: 5px 0;
}
@media (max-width: 760px) {
  .comic-shell {
    width: min(100% - 24px, 580px);
    padding-top: 34px;
  }
  .comic-intro {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .comic-intro h1 {
    font-size: 42px;
  }
  .scene {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .story-copy {
    padding: 26px 22px;
  }
  .story-copy h2 {
    font-size: 34px;
  }
  .comic-panel {
    min-height: 420px;
  }
  .comic-panel:before {
    inset: 10px;
  }
  .duo,
  .workshop {
    padding: 70px 20px;
  }
  .person {
    width: 100px;
  }
  .person i {
    width: 60px;
    height: 60px;
  }
  .person i:after {
    width: 58px;
    height: 80px;
    transform: translate(-3px, 55px);
  }
  .speech {
    top: 35px;
    left: 22px;
    font-size: 13px;
    max-width: 190px;
  }
  .handoff,
  .boundary {
    bottom: 25px;
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }
  .artifact {
    width: 145px;
    padding: 15px;
  }
  .guard,
  .home {
    gap: 20px;
  }
  .finale {
    min-height: 500px;
    padding: 45px 10px 125px;
  }
  .scanner {
    width: 180px;
    padding: 15px;
  }
  .comic-controls {
    grid-template-columns: 1fr 1fr;
  }
  .comic-controls span {
    display: none;
  }
  .comic-controls button {
    width: 100%;
  }
  .source-note {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
