:root {
  color-scheme: dark;
  --ink: #080710;
  --ink-soft: #0d0b17;
  --paper: #f7f2f7;
  --mist: #b8b0bd;
  --muted: #746f7b;
  --pink: #ff3fbd;
  --cyan: #55e9f4;
  --line: rgb(255 255 255 / 13%);
  --line-soft: rgb(255 255 255 / 7%);
  --topbar: 88px;
  --spine: 180px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

* { box-sizing: border-box; }

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

body {
  color: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button,
a { -webkit-tap-highlight-color: transparent; }

button {
  color: inherit;
  font: inherit;
}

.deck-shell {
  position: relative;
  display: grid;
  grid-template-rows: var(--topbar) minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 62% 32%, rgb(66 38 91 / 18%), transparent 50%),
    linear-gradient(135deg, #090711 0%, #080710 48%, #090811 100%);
}

.deck-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .18;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 30% 20%, transparent 0 2px, rgb(255 255 255 / 2%) 3px 4px),
    linear-gradient(90deg, transparent 0 49.96%, rgb(255 255 255 / 2%) 50%, transparent 50.04%);
  background-size: 7px 7px, 100% 100%;
  mix-blend-mode: soft-light;
}

.topbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-width: 0;
  padding: 0 clamp(24px, 2.8vw, 48px);
  border-bottom: 1px solid var(--line-soft);
  background: rgb(8 7 16 / 86%);
  backdrop-filter: blur(22px);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--paper);
  text-decoration: none;
  font-family: Impact, Haettenschweiler, "Arial Narrow", sans-serif;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 400;
  letter-spacing: .005em;
  word-spacing: .04em;
  line-height: .9;
}

.brand i {
  display: block;
  width: 2px;
  height: 30px;
  background: var(--pink);
  transform: skew(-14deg);
  box-shadow: 0 0 18px rgb(255 63 189 / 24%);
}

.overview-trigger,
.text-action {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
}

.overview-trigger {
  justify-self: center;
  padding: 12px 14px;
  color: var(--mist);
}

.overview-trigger::after,
.download-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 2px;
  left: 12px;
  height: 1px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms var(--ease);
}

.overview-trigger:hover::after,
.overview-trigger:focus-visible::after,
.overview-trigger[aria-expanded="true"]::after,
.download-link:hover::after,
.download-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
}

.text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  transition: color 180ms ease;
}

.text-action:hover,
.text-action:focus-visible,
.overview-trigger:hover,
.overview-trigger:focus-visible {
  color: var(--cyan);
  outline: none;
}

.present-action {
  gap: 13px;
  padding-right: 0;
  color: var(--cyan);
}

.present-action svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
  transition: transform 220ms var(--ease);
}

.present-action:hover svg,
.present-action:focus-visible svg { transform: translate(2px, -2px); }

.presentation-workspace {
  display: grid;
  grid-template-columns: var(--spine) minmax(0, 1fr);
  min-height: 0;
  padding: 28px clamp(28px, 4vw, 72px) 22px clamp(26px, 3.4vw, 58px);
}

.chapter-spine {
  position: relative;
  display: grid;
  grid-template-rows: 26px minmax(0, 1fr);
  min-height: 0;
  padding: 4px 28px 0 0;
  border-right: 1px solid var(--line);
}

.spine-accent {
  width: 30px;
  height: 2px;
  background: var(--pink);
  box-shadow: 0 0 16px rgb(255 63 189 / 20%);
}

.chapter-list {
  display: grid;
  grid-template-rows: repeat(12, minmax(0, 1fr));
  min-height: 0;
  padding-block: 10px 8px;
}

.chapter-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #66616b;
  cursor: pointer;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: clamp(15px, 1.2vw, 20px);
  font-weight: 700;
  letter-spacing: -.02em;
  transition: color 180ms ease, transform 220ms var(--ease);
}

.chapter-button::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  transition: background 180ms ease, box-shadow 180ms ease, transform 220ms var(--ease);
}

.chapter-button:hover,
.chapter-button:focus-visible {
  color: var(--mist);
  outline: none;
  transform: translateX(3px);
}

.chapter-button.active {
  color: var(--pink);
}

.chapter-button.active::before {
  background: var(--pink);
  box-shadow: 0 0 14px rgb(255 63 189 / 50%);
  transform: scale(1.08);
}

.chapter-button span { min-width: 2ch; }

.stage-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 76px;
  min-width: 0;
  min-height: 0;
  padding-left: clamp(24px, 3.5vw, 58px);
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  touch-action: pan-y;
}

.slide-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: min(100%, calc((100dvh - var(--topbar) - 126px) * 16 / 9));
  max-height: calc(100dvh - var(--topbar) - 126px);
  overflow: hidden;
  background: #090910;
  box-shadow:
    0 0 0 1px rgb(255 63 189 / 58%),
    0 0 0 2px rgb(85 233 244 / 13%),
    0 34px 76px rgb(0 0 0 / 58%),
    0 10px 24px rgb(10 3 20 / 46%);
}

.slide-frame::before {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  border: 1px solid transparent;
  border-image: linear-gradient(100deg, var(--pink), rgb(255 63 189 / 18%) 42%, rgb(85 233 244 / 84%)) 1;
  opacity: .72;
  pointer-events: none;
}

#slideImage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  opacity: 1;
  filter: saturate(1.02) contrast(1.015);
  transform: scale(1);
  transition: opacity 180ms ease, filter 360ms ease, transform 560ms var(--ease);
}

#slideImage.changing {
  opacity: .05;
  filter: saturate(.7) contrast(.9) blur(3px);
  transform: scale(1.008);
}

.hotspots {
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  outline: 0 solid transparent;
}

.hotspot:hover,
.hotspot:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  box-shadow: 0 0 30px rgb(85 233 244 / 25%);
}

.loading-sheen {
  position: absolute;
  z-index: 5;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgb(255 255 255 / 6%) 49%, transparent 60%);
  transform: translateX(-100%);
}

.loading-sheen.active {
  opacity: 1;
  animation: sheen 800ms ease infinite;
}

@keyframes sheen { to { transform: translateX(100%); } }

.control-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-width: 0;
}

.progress-cluster {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: clamp(22px, 3vw, 48px);
  min-width: 0;
}

.slide-counter {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 72px;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.slide-counter strong {
  color: var(--pink);
  font-size: 24px;
  font-weight: 800;
}

.slide-counter i {
  color: #5c5661;
  font-style: normal;
}

.slide-counter span { color: #8d8791; }

.progress-track {
  flex: 0 1 620px;
  height: 3px;
  overflow: hidden;
  background: rgb(255 255 255 / 9%);
}

.progress-track span {
  display: block;
  width: calc(100% / 12);
  height: 100%;
  background: linear-gradient(90deg, var(--pink) 0 76%, var(--cyan));
  box-shadow: 0 0 14px rgb(255 63 189 / 24%);
  transition: width 420ms var(--ease);
}

.nav-cluster {
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
}

.nav-button {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #7f7985;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 220ms var(--ease);
}

.nav-button.next {
  border-color: rgb(255 63 189 / 72%);
  color: var(--pink);
}

.nav-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.nav-button:hover,
.nav-button:focus-visible {
  color: var(--paper);
  border-color: var(--cyan);
  background: rgb(85 233 244 / 5%);
  outline: none;
  transform: translateY(-2px);
}

.nav-button.next:hover,
.nav-button.next:focus-visible {
  border-color: var(--pink);
  background: rgb(255 63 189 / 7%);
}

.nav-button:disabled {
  opacity: .22;
  cursor: default;
  transform: none;
}

.thumbnail-panel {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  grid-template-rows: 118px minmax(0, 1fr);
  padding-inline: clamp(24px, 5vw, 82px);
  background:
    radial-gradient(circle at 50% 20%, rgb(95 37 100 / 15%), transparent 42%),
    rgb(8 7 16 / 98%);
  backdrop-filter: blur(30px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 220ms ease, visibility 220ms ease, transform 320ms var(--ease);
}

.thumbnail-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.thumbnail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.thumbnail-header > div {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

.thumbnail-kicker {
  color: var(--pink);
  text-transform: uppercase;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
}

.thumbnail-header strong {
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: clamp(26px, 3vw, 44px);
  font-stretch: condensed;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.thumbnail-header button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
}

.thumbnail-header button:hover,
.thumbnail-header button:focus-visible {
  border-color: var(--pink);
  color: var(--paper);
  outline: none;
}

.thumbnail-header svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.thumbnail-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: clamp(20px, 2.4vw, 38px) clamp(18px, 2.4vw, 34px);
  overflow-y: auto;
  padding: 42px 0 72px;
}

.thumbnail {
  position: relative;
  display: grid;
  grid-template-rows: auto 42px;
  gap: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.thumbnail img {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(.7) brightness(.76);
  transition: filter 240ms ease, border-color 220ms ease, transform 300ms var(--ease), box-shadow 300ms ease;
}

.thumbnail span {
  align-self: center;
  color: currentColor;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}

.thumbnail:hover,
.thumbnail:focus-visible {
  color: var(--paper);
  outline: none;
}

.thumbnail:hover img,
.thumbnail:focus-visible img,
.thumbnail.active img {
  filter: saturate(1) brightness(1);
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgb(0 0 0 / 40%);
}

.thumbnail.active { color: var(--pink); }
.thumbnail.active img { border-color: var(--pink); }

.present-hint {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 20px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgb(8 7 16 / 70%);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 240ms var(--ease);
}

.deck-shell.presenting {
  display: grid;
  grid-template-rows: 1fr;
  background: #030305;
}

.deck-shell.presenting .topbar,
.deck-shell.presenting .chapter-spine,
.deck-shell.presenting .control-rail { display: none; }

.deck-shell.presenting .presentation-workspace {
  grid-template-columns: 1fr;
  padding: 0;
}

.deck-shell.presenting .stage-column {
  grid-template-rows: 1fr;
  padding: 0;
}

.deck-shell.presenting .stage { padding: 0; }

.deck-shell.presenting .slide-frame {
  width: min(100vw, calc(100dvh * 16 / 9));
  max-height: 100dvh;
  box-shadow: none;
}

.deck-shell.presenting .slide-frame::before { opacity: 0; }
.deck-shell.presenting .present-hint { opacity: 1; transform: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  :root { --spine: 76px; }
  .chapter-spine { padding-right: 18px; }
  .chapter-button { gap: 12px; font-size: 14px; }
  .stage-column { padding-left: 24px; }
  .thumbnail-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --topbar: 58px; }

  .deck-shell { min-height: 420px; }

  .topbar {
    grid-template-columns: 1fr auto 1fr;
    padding-inline: 17px;
  }

  .brand { gap: 10px; font-size: 17px; letter-spacing: -.035em; }
  .brand i { height: 20px; }
  .overview-trigger { display: block; padding: 9px 7px; font-size: 9px; letter-spacing: .14em; }
  .top-actions { gap: 5px; }
  .text-action { min-height: 40px; padding: 0 8px; font-size: 10px; letter-spacing: .12em; }
  .download-link span { display: none; }
  .download-link { width: 36px; padding: 0; }
  .download-link::before {
    content: "↓";
    margin: auto;
    color: var(--paper);
    font-size: 18px;
  }
  .download-link::after { display: none; }
  .present-action { gap: 7px; }
  .present-action svg { width: 19px; height: 19px; }

  .presentation-workspace {
    grid-template-columns: 1fr;
    padding: 12px 8px 10px;
  }

  .chapter-spine { display: none; }
  .stage-column { grid-template-rows: minmax(0, 1fr) 64px; padding: 0; }

  .slide-frame {
    width: 100%;
    max-height: calc(100dvh - var(--topbar) - 88px);
    box-shadow: 0 0 0 1px rgb(255 63 189 / 45%), 0 22px 54px rgb(0 0 0 / 48%);
  }

  .control-rail { gap: 14px; padding: 0 8px; }
  .progress-cluster { gap: 14px; }
  .slide-counter { min-width: 62px; gap: 7px; font-size: 13px; }
  .slide-counter strong { font-size: 18px; }
  .progress-track { height: 2px; }
  .nav-cluster { gap: 8px; }
  .nav-button { width: 44px; height: 44px; }
  .nav-button svg { width: 21px; height: 21px; }

  .thumbnail-panel { grid-template-rows: 88px minmax(0, 1fr); padding-inline: 16px; }
  .thumbnail-header > div { gap: 12px; }
  .thumbnail-header strong { font-size: 25px; }
  .thumbnail-kicker { display: none; }
  .thumbnail-header button { width: 42px; height: 42px; }
  .thumbnail-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 12px; padding: 24px 0 44px; }
  .thumbnail { grid-template-rows: auto 30px; }
}

@media (max-height: 610px) and (orientation: landscape) {
  :root { --topbar: 54px; }
  .presentation-workspace { padding-block: 12px 8px; }
  .stage-column { grid-template-rows: minmax(0, 1fr) 54px; }
  .slide-frame { max-height: calc(100dvh - var(--topbar) - 74px); }
  .nav-button { width: 44px; height: 44px; }
  .control-rail { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Bonkers pass: controlled animation-studio mayhem, kept outside the slide safe zone. */
.deck-shell {
  background:
    url("/assets/bonkers-chaos-overlay-v1.png") center / cover no-repeat,
    radial-gradient(circle at 8% 88%, rgb(255 63 189 / 22%), transparent 32%),
    radial-gradient(circle at 91% 14%, rgb(85 233 244 / 17%), transparent 30%),
    linear-gradient(135deg, #06040b 0%, #120818 50%, #050710 100%);
}

.topbar {
  background: rgb(7 6 13 / 93%);
  border-bottom: 2px solid var(--paper);
  box-shadow:
    0 4px 0 var(--pink),
    0 7px 0 rgb(85 233 244 / 58%);
}

.brand {
  font-size: clamp(27px, 2.35vw, 38px);
  text-shadow: 3px 2px 0 rgb(255 63 189 / 44%);
  transform: rotate(-1.1deg);
}

.overview-trigger,
.text-action {
  border: 1px solid rgb(255 255 255 / 20%);
  padding-inline: 16px;
  background: rgb(5 4 10 / 72%);
  box-shadow: 3px 3px 0 rgb(255 63 189 / 16%);
}

.present-action {
  color: #080710;
  background: var(--pink);
  border-color: var(--paper);
  box-shadow: 4px 4px 0 var(--cyan);
  transform: rotate(1deg);
}
.present-action:hover,
.present-action:focus-visible { color: #080710; transform: rotate(-1deg) translateY(-2px); }

.chapter-spine {
  border-right: 2px dashed rgb(85 233 244 / 44%);
}

.chapter-button::before {
  width: 10px;
  height: 10px;
  border-radius: 44% 56% 38% 62%;
}

.chapter-button.active {
  color: #080710;
  background: var(--pink);
  padding: 5px 9px;
  clip-path: polygon(0 18%, 10% 15%, 15% 0, 28% 12%, 43% 3%, 52% 13%, 67% 0, 75% 14%, 94% 7%, 89% 28%, 100% 39%, 91% 52%, 100% 69%, 82% 73%, 86% 100%, 65% 88%, 54% 100%, 42% 89%, 23% 100%, 18% 82%, 0 88%, 8% 66%, 0 52%, 9% 39%);
  box-shadow: none;
}
.chapter-button.active::before { background: var(--cyan); box-shadow: 0 0 0 4px var(--paper); }

.slide-frame {
  border: 2px solid var(--pink);
  box-shadow:
    7px 5px 0 rgb(85 233 244 / 62%),
    -5px -4px 0 rgb(245 240 232 / 18%),
    0 38px 82px rgb(0 0 0 / 70%);
}
.slide-frame::before {
  inset: 5px;
  opacity: 1;
  border-width: 2px;
  transform: rotate(.16deg);
}
.slide-frame::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 7;
  inset: 10px 8px 7px 11px;
  border: 1px solid rgb(245 240 232 / 30%);
  pointer-events: none;
  transform: rotate(-.22deg);
}

.progress-track {
  height: 7px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / 11%) 0 18px, transparent 18px 25px);
  transform: skewX(-18deg) rotate(-.25deg);
  overflow: visible;
}
#progressBar {
  height: 7px;
  background: linear-gradient(90deg, var(--pink), var(--cyan), #ff8a2b);
  box-shadow: 0 0 0 2px rgb(8 7 16 / 80%), 0 0 18px rgb(255 63 189 / 66%);
}

.nav-button {
  width: 58px;
  height: 58px;
  background: #080710;
  border: 3px solid var(--paper);
  box-shadow: 5px 5px 0 var(--pink), -3px -3px 0 var(--cyan);
}
.nav-button.next { transform: rotate(-6deg) scale(1.03); }
.nav-button.previous { transform: rotate(6deg); }

.deck-shell.impact .slide-frame { animation: bonkers-impact 620ms cubic-bezier(.18,.92,.25,1); }
@keyframes bonkers-impact {
  0% { transform: scale(.965) rotate(-.8deg) translateX(-12px); filter: saturate(.8); }
  36% { transform: scale(1.012) rotate(.55deg) translateX(7px); }
  62% { transform: scale(.997) rotate(-.25deg) translateX(-3px); }
  100% { transform: scale(1) rotate(0) translateX(0); filter: saturate(1); }
}

.thumbnail-panel {
  background:
    url("/assets/bonkers-chaos-overlay-v1.png") center / cover no-repeat,
    rgb(8 7 16 / 97%);
}
.thumbnail.active img { box-shadow: 7px 7px 0 var(--cyan), -5px -5px 0 var(--pink); }

@media (max-width: 720px) {
  .deck-shell { background-size: auto 100%, auto, auto, auto; }
  .overview-trigger,
  .text-action { box-shadow: none; padding-inline: 8px; }
  .slide-frame { box-shadow: 3px 3px 0 rgb(85 233 244 / 45%), 0 22px 54px rgb(0 0 0 / 55%); }
  .slide-frame::after { display: none; }
  .nav-button { width: 48px; height: 48px; border-width: 2px; }
}

/* Cartoon-world art direction: the player is the show's overconfident stage manager. */
.deck-shell {
  background:
    radial-gradient(circle at 8% 88%, rgb(255 63 189 / 13%), transparent 28%),
    radial-gradient(circle at 91% 14%, rgb(85 233 244 / 10%), transparent 26%),
    linear-gradient(135deg, #07050d 0%, #11091a 52%, #060812 100%);
}

.deck-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10px;
  border: 1px solid rgb(255 63 189 / 24%);
  pointer-events: none;
  transform: rotate(-.08deg);
}

.topbar {
  border-bottom: 2px solid var(--pink);
  box-shadow: 0 5px 0 rgb(85 233 244 / 12%);
}

.brand { align-items: baseline; }
.brand small {
  color: var(--cyan);
  font-family: "Arial Narrow", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  white-space: nowrap;
  transform: rotate(-1deg);
}

.overview-trigger {
  border: 1px solid rgb(255 255 255 / 16%);
  background: rgb(255 255 255 / 4%);
  transform: rotate(-1deg);
}

.chapter-spine::before,
.chapter-spine::after {
  content: "";
  position: absolute;
  right: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background: var(--ink);
}
.chapter-spine::before { top: 12%; }
.chapter-spine::after { bottom: 12%; border-color: var(--pink); }

.chapter-button:nth-child(3n + 1) { transform: rotate(-1.2deg); }
.chapter-button:nth-child(3n + 2) { transform: translateX(4px) rotate(.7deg); }
.chapter-button:nth-child(3n) { transform: translateX(-2px) rotate(-.35deg); }
.chapter-button.active { transform: translateX(9px) rotate(-1deg) scale(1.07); }
.chapter-button.active::before { border-radius: 38% 62% 44% 56%; transform: scale(1.5, .75); }

.stage { perspective: 1200px; }

.slide-frame {
  overflow: hidden;
  transform: none;
  border: 1px solid var(--pink);
  box-shadow:
    4px 4px 0 rgb(85 233 244 / 22%),
    0 38px 80px rgb(0 0 0 / 64%);
  transition: transform 420ms var(--ease), box-shadow 420ms var(--ease);
}

.slide-frame::after {
  display: none;
}

.deck-shell.impact .slide-frame {
  animation: toon-impact 520ms cubic-bezier(.2,.9,.2,1);
}

@keyframes toon-impact {
  0% { transform: scale(.992) translateX(-4px); }
  48% { transform: scale(1.003) translateX(2px); }
  100% { transform: scale(1) translateX(0); }
}

.nav-button {
  border: 2px solid currentColor;
  border-radius: 54% 46% 48% 52%;
  box-shadow: 4px 4px 0 rgb(255 63 189 / 26%);
}
.nav-button.next { transform: rotate(-3deg); color: var(--cyan); }
.nav-button.previous { transform: rotate(3deg); }
.nav-button:hover:not(:disabled) { transform: translateY(-3px) rotate(0deg) scale(1.06); }
.progress-track { height: 4px; transform: skewX(-16deg); }
#progressBar { box-shadow: 0 0 13px rgb(255 63 189 / 54%); }

.thumbnail-panel {
  background:
    linear-gradient(rgb(14 11 20 / 90%), rgb(14 11 20 / 96%)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgb(85 233 244 / 7%) 32px 33px);
}
.thumbnail:nth-child(odd) { transform: rotate(-.5deg); }
.thumbnail:nth-child(even) { transform: rotate(.55deg); }
.thumbnail img { box-shadow: 5px 5px 0 rgb(85 233 244 / 12%); }

@media (max-width: 720px) {
  .brand small { display: none; }
  .slide-frame { overflow: hidden; transform: none; border-width: 1px; }
  .slide-frame::after { display: none; }
}

/* Official logo lockup */
.brand {
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
  transform: none;
  text-shadow: none;
}

.brand-logo {
  display: block;
  width: clamp(160px, 16.5vw, 236px);
  height: auto;
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(3px 3px 0 rgb(255 63 189 / 22%));
  transform: rotate(-1deg);
}

.brand small {
  align-self: center;
  padding-left: 12px;
  border-left: 2px solid var(--pink);
}

@media (max-width: 720px) {
  .brand { gap: 0; }
  .brand-logo { width: 112px; max-height: 50px; }
  .brand small { display: none; }
}
