:root {
  color-scheme: dark;
  --black: #050504;
  --charcoal: #11100e;
  --stone: #2f281f;
  --paper: #f5ead8;
  --muted: #cbbdad;
  --dim: rgba(245, 234, 216, 0.66);
  --fire: #ffb36b;
  --ember: #db6934;
  --gold: #f0c46a;
  --sea: #496f77;
  --machine: #8fb9a7;
  --font-title: Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--black);
  color: var(--paper);
  font-family: var(--font-body);
  letter-spacing: 0;
  touch-action: pan-y;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .deck {
  overflow: hidden;
}

button {
  font: inherit;
}

.site-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 5px 5px, 8px 8px;
  mix-blend-mode: screen;
}

.progress-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: calc(3px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--fire), var(--gold));
  transition: width 360ms ease;
}

.topbar {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: calc(22px + env(safe-area-inset-left, 0px));
  right: calc(22px + env(safe-area-inset-right, 0px));
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.brand,
.top-button,
.counter,
.current-chapter {
  pointer-events: auto;
}

.brand {
  color: rgba(245, 234, 216, 0.84);
  text-decoration: none;
  font-family: var(--font-title);
  font-size: clamp(1rem, 0.86rem + 0.52vw, 1.28rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.current-chapter,
.counter {
  color: var(--dim);
  font-size: clamp(0.72rem, 0.68rem + 0.22vw, 0.82rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.counter {
  font-variant-numeric: tabular-nums;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.top-button,
.chapter-menu-button,
.icon-button,
.text-button,
.close-button,
.chapter-link,
.reader-jump {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(245, 234, 216, 0.22);
  border-radius: 7px;
  background: rgba(9, 8, 7, 0.74);
  color: var(--paper);
  cursor: pointer;
  box-shadow: 0 14px 44px rgba(0,0,0,0.25);
}

.top-button {
  padding: 0 12px;
  color: rgba(245, 234, 216, 0.82);
  font-size: 0.84rem;
}

.top-button:hover,
.chapter-menu-button:hover,
.icon-button:hover,
.text-button:hover,
.close-button:hover,
.chapter-link:hover,
.reader-jump:hover {
  border-color: rgba(255,179,107,0.7);
  background: rgba(44, 31, 20, 0.88);
}

.top-button:focus-visible,
.chapter-menu-button:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
.close-button:focus-visible,
.chapter-link:focus-visible,
.reader-jump:focus-visible {
  outline: 2px solid var(--fire);
  outline-offset: 3px;
}

.chapter-menu-button {
  display: none;
}

.chapter-nav {
  position: fixed;
  top: 50%;
  left: calc(22px + env(safe-area-inset-left, 0px));
  z-index: 23;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.chapter-link {
  width: 10px;
  height: 34px;
  min-width: 10px;
  min-height: 34px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  transition: width 220ms ease, background 220ms ease, border-color 220ms ease;
}

.chapter-link span {
  display: none;
}

.chapter-link.is-active {
  width: 18px;
  border-color: rgba(255,179,107,0.76);
  background: rgba(219,105,52,0.78);
}

.deck {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  background: var(--black);
  -webkit-overflow-scrolling: touch;
}

.slide {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  scroll-snap-align: start;
  padding:
    calc(104px + env(safe-area-inset-top, 0px))
    calc(9vw + env(safe-area-inset-right, 0px))
    calc(112px + env(safe-area-inset-bottom, 0px))
    calc(14vw + env(safe-area-inset-left, 0px));
}

.slide::before,
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.slide::before {
  z-index: -3;
  background:
    radial-gradient(circle at 18% 50%, rgba(255,179,107,0.2), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(255,255,255,0.07), transparent 22%),
    linear-gradient(115deg, #050505 0%, #11100e 50%, #1b130d 100%);
}

.slide::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.88), rgba(0,0,0,0.36) 54%, rgba(0,0,0,0.78)),
    radial-gradient(ellipse at center, transparent 34%, rgba(0,0,0,0.78));
}

.slide-content {
  position: relative;
  z-index: 3;
  width: min(100%, 880px);
  opacity: 0;
  overflow-wrap: break-word;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 700ms ease, transform 700ms ease, filter 700ms ease;
}

.slide.is-active .slide-content {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--fire);
  font-size: clamp(0.72rem, 0.68rem + 0.22vw, 0.8rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.slide-title {
  max-width: 960px;
  margin: 0;
  color: var(--paper);
  font-family: var(--font-title);
  font-size: clamp(2.25rem, 5.7vw, 4.5rem);
  font-weight: 500;
  line-height: 1.03;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

.slide-excerpt {
  max-width: 860px;
  margin: 28px 0 0;
  color: #fff1dc;
  font-family: var(--font-title);
  font-size: clamp(1.3rem, 2.6vw, 2.05rem);
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

.slide-meta {
  margin: 22px 0 0;
  color: var(--dim);
  font-size: clamp(0.88rem, 0.82rem + 0.2vw, 0.98rem);
  line-height: 1.6;
}

.visual {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.9;
}

.stone-wall,
.cave-mouth,
.fire-core,
.sea-line,
.ascent-line,
.sun-disc,
.ring-mark,
.black-box,
.glyph-wall,
.eagle-mark,
.serpent-mark {
  position: absolute;
  transition: opacity 650ms ease, transform 900ms ease;
}

.stone-wall {
  right: 0;
  top: 0;
  width: 55vw;
  height: 100svh;
  opacity: 0.42;
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 6% 100%, 16% 62%, 8% 34%);
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255,255,255,0.06) 18% 19%, transparent 19% 40%, rgba(255,255,255,0.04) 40% 41%, transparent 41%),
    linear-gradient(180deg, #1b1916, #30281f 55%, #100d0b);
}

.cave-mouth {
  right: 8vw;
  bottom: 5svh;
  width: 42vw;
  height: 68svh;
  border: 1px solid rgba(245,234,216,0.08);
  border-radius: 50% 50% 18% 18%;
  background:
    radial-gradient(ellipse at 52% 72%, rgba(0,0,0,0.98) 0 34%, rgba(0,0,0,0.52) 35% 48%, transparent 49%),
    radial-gradient(ellipse at 50% 18%, rgba(255,179,107,0.18), transparent 36%);
  box-shadow: inset 0 0 90px rgba(0,0,0,0.82);
}

.fire-core {
  left: 18vw;
  bottom: 15svh;
  width: 180px;
  height: 180px;
  border-radius: 50% 50% 44% 44%;
  background: radial-gradient(circle at 50% 52%, rgba(255,233,178,0.92), rgba(255,179,107,0.76) 34%, rgba(219,105,52,0.3) 58%, transparent 70%);
  filter: blur(2px);
  transform: scaleY(1.1);
}

.sea-line {
  right: 0;
  bottom: 20svh;
  width: 54vw;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(110,165,174,0.95), transparent);
  box-shadow: 0 32px 0 rgba(65,107,115,0.28), 0 64px 0 rgba(65,107,115,0.16);
}

.ascent-line {
  right: 18vw;
  bottom: 12svh;
  width: 2px;
  height: 62svh;
  opacity: 0;
  background: linear-gradient(0deg, rgba(255,179,107,0), rgba(245,234,216,0.3), rgba(240,196,106,0.9));
  transform: rotate(34deg);
  transform-origin: bottom;
}

.sun-disc {
  right: 10vw;
  top: 12svh;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  opacity: 0.16;
  background: radial-gradient(circle, rgba(255,231,165,0.96), rgba(240,196,106,0.42) 54%, transparent 68%);
}

.ring-mark {
  right: 11vw;
  top: 25svh;
  width: 310px;
  height: 310px;
  opacity: 0;
  border: 1px solid rgba(240,196,106,0.42);
  border-radius: 50%;
  box-shadow: 0 0 70px rgba(219,105,52,0.14), inset 0 0 60px rgba(221,156,90,0.09);
}

.ring-mark::before,
.ring-mark::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(245,234,216,0.22);
  border-radius: 50%;
}

.ring-mark::before {
  inset: 42px;
}

.ring-mark::after {
  inset: 94px;
}

.black-box {
  right: 11vw;
  top: 25svh;
  width: 360px;
  height: 240px;
  opacity: 0;
  border: 1px solid rgba(143,185,167,0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(143,185,167,0.14), rgba(0,0,0,0.12)), #050706;
  box-shadow: 0 0 100px rgba(143,185,167,0.14);
}

.black-box::before {
  content: "> returned language";
  position: absolute;
  left: 24px;
  top: 24px;
  color: rgba(181,221,204,0.72);
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
}

.glyph-wall {
  right: 12vw;
  bottom: 17svh;
  width: 340px;
  height: 220px;
  opacity: 0;
}

.glyph-wall svg {
  width: 100%;
  height: 100%;
  stroke: rgba(255,179,107,0.78);
  fill: none;
  stroke-width: 3;
}

.eagle-mark {
  right: 24vw;
  top: 16svh;
  width: 168px;
  height: 82px;
  opacity: 0;
  border-top: 2px solid rgba(245,234,216,0.38);
  transform: rotate(-8deg);
}

.eagle-mark::before,
.eagle-mark::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 92px;
  height: 54px;
  border-top: 2px solid rgba(240,196,106,0.55);
}

.eagle-mark::before {
  left: -52px;
  transform: rotate(-24deg);
  transform-origin: right top;
}

.eagle-mark::after {
  right: -52px;
  transform: rotate(24deg);
  transform-origin: left top;
}

.serpent-mark {
  right: 14vw;
  top: 58svh;
  width: 220px;
  height: 84px;
  opacity: 0;
  border-bottom: 2px solid rgba(240,196,106,0.48);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.serpent-mark::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: -7px;
  width: 10px;
  height: 10px;
  border-top: 2px solid rgba(245,234,216,0.5);
  border-right: 2px solid rgba(245,234,216,0.5);
  transform: rotate(45deg);
}

.theme-first .glyph-wall,
.theme-first .stone-wall,
.theme-first .fire-core,
.theme-first .cave-mouth {
  opacity: 0.78;
}

.theme-calypso::before {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.92), rgba(35,27,19,0.82) 47%, rgba(12,31,36,0.84)),
    radial-gradient(circle at 33% 58%, rgba(255,179,107,0.26), transparent 25%);
}

.theme-calypso .sea-line,
.theme-calypso .fire-core,
.theme-calypso .cave-mouth {
  opacity: 0.86;
}

.theme-plato::before {
  background:
    radial-gradient(circle at 82% 18%, rgba(240,196,106,0.28), transparent 24%),
    linear-gradient(130deg, #030303, #11100f 45%, #1d1b17);
}

.theme-plato .ascent-line,
.theme-plato .sun-disc,
.theme-plato .stone-wall {
  opacity: 0.88;
}

.theme-zarathustra::before {
  background:
    radial-gradient(ellipse at 80% 15%, rgba(221,156,90,0.3), transparent 27%),
    linear-gradient(145deg, #030303, #12120f 50%, #28190d);
}

.theme-zarathustra .ring-mark,
.theme-zarathustra .sun-disc,
.theme-zarathustra .cave-mouth,
.theme-zarathustra .eagle-mark,
.theme-zarathustra .serpent-mark {
  opacity: 0.88;
}

.theme-artificial::before {
  background:
    linear-gradient(120deg, #030303, #07100d 48%, #111716),
    repeating-linear-gradient(90deg, rgba(143,185,167,0.04) 0 1px, transparent 1px 28px);
}

.theme-artificial .black-box,
.theme-artificial .ascent-line {
  opacity: 0.88;
}

.theme-conclusion .ring-mark,
.theme-conclusion .fire-core,
.theme-conclusion .black-box {
  opacity: 0.5;
}

.controls {
  position: fixed;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 46px;
  height: 46px;
  font-size: 1.25rem;
}

.text-button {
  padding: 0 15px;
  font-size: 0.86rem;
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.reader-dialog,
.info-dialog {
  width: min(980px, calc(100vw - 36px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));
  max-height: calc(100svh - 36px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  padding: 0;
  border: 1px solid rgba(245,234,216,0.22);
  border-radius: 8px;
  background: rgba(8,8,7,0.97);
  color: var(--paper);
  box-shadow: 0 26px 110px rgba(0,0,0,0.78);
}

.reader-dialog::backdrop,
.info-dialog::backdrop {
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(5px);
}

.reader-shell,
.info-panel {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,179,107,0.12), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
}

.reader-shell {
  padding: 34px 40px 46px;
}

.info-panel {
  position: relative;
  padding: 42px;
}

.reader-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -34px -40px 24px;
  padding: 28px 40px 18px;
  background: linear-gradient(180deg, rgba(8,8,7,0.98), rgba(8,8,7,0.88));
  border-bottom: 1px solid rgba(245,234,216,0.1);
}

.panel-kicker {
  margin: 0 0 8px;
  color: var(--fire);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reader-toolbar h2,
.info-panel h2 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 500;
  line-height: 1.12;
}

.close-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  font-size: 1.35rem;
}

.info-panel .close-button {
  position: absolute;
  top: 16px;
  right: 16px;
}

.reader-nav {
  position: sticky;
  top: 88px;
  z-index: 3;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 14px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(8,8,7,0.92), rgba(8,8,7,0.72));
  -webkit-overflow-scrolling: touch;
}

.reader-jump {
  flex: 0 0 auto;
  padding: 0 13px;
  color: rgba(245,234,216,0.78);
  font-size: 0.82rem;
  white-space: nowrap;
}

.reader-jump.is-active {
  border-color: rgba(255,179,107,0.78);
  color: var(--paper);
  background: rgba(219,105,52,0.46);
}

.reader-article {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 0.92rem + 0.28vw, 1.08rem);
  line-height: 1.78;
  overflow-wrap: break-word;
}

.reader-section {
  scroll-margin-top: 154px;
  margin-bottom: 52px;
}

.reader-section h1,
.reader-section h2 {
  margin: 0 0 22px;
  color: var(--paper);
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.14;
}

.reader-section h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
}

.reader-section h2 {
  font-size: clamp(1.9rem, 4.8vw, 2.75rem);
}

.reader-subtitle {
  margin: -8px 0 22px;
  color: var(--fire);
  font-family: var(--font-title);
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  line-height: 1.3;
}

.reader-byline {
  color: var(--dim);
}

.reader-section p {
  margin: 0 0 18px;
}

.info-body {
  color: var(--muted);
  font-size: clamp(1rem, 0.92rem + 0.25vw, 1.06rem);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.info-body p {
  margin: 0 0 16px;
}

.info-body code {
  color: var(--paper);
}

.noscript-message {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    calc(40px + env(safe-area-inset-top,0px))
    calc(40px + env(safe-area-inset-right,0px))
    calc(40px + env(safe-area-inset-bottom,0px))
    calc(40px + env(safe-area-inset-left,0px));
}

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

  .current-wrap {
    justify-self: end;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-self: end;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .slide {
    padding:
      calc(132px + env(safe-area-inset-top,0px))
      calc(7vw + env(safe-area-inset-right,0px))
      calc(126px + env(safe-area-inset-bottom,0px))
      calc(11vw + env(safe-area-inset-left,0px));
  }

  .chapter-nav {
    left: calc(12px + env(safe-area-inset-left,0px));
  }

  .cave-mouth,
  .stone-wall,
  .black-box,
  .ring-mark,
  .glyph-wall,
  .eagle-mark,
  .serpent-mark {
    opacity: 0.3;
  }
}

@media (max-width: 640px) {
  .site-grain {
    opacity: 0.07;
  }

  .topbar {
    top: calc(10px + env(safe-area-inset-top,0px));
    left: calc(14px + env(safe-area-inset-left,0px));
    right: calc(14px + env(safe-area-inset-right,0px));
    grid-template-columns: minmax(0,1fr) auto;
  }

  .brand {
    max-width: 58vw;
  }

  .current-wrap {
    gap: 8px;
  }

  .current-chapter {
    display: none;
  }

  .top-actions {
    justify-self: stretch;
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 6px;
  }

  .top-button {
    padding: 0 6px;
    font-size: 0.78rem;
  }

  .chapter-menu-button {
    position: fixed;
    top: calc(102px + env(safe-area-inset-top,0px));
    left: calc(14px + env(safe-area-inset-left,0px));
    right: calc(14px + env(safe-area-inset-right,0px));
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
  }

  .chapter-menu-button span {
    color: var(--dim);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .chapter-menu-button strong {
    max-width: 58vw;
    overflow: hidden;
    color: var(--fire);
    font-size: 0.92rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chapter-nav {
    display: none;
    top: calc(152px + env(safe-area-inset-top,0px));
    left: calc(14px + env(safe-area-inset-left,0px));
    right: calc(14px + env(safe-area-inset-right,0px));
    max-height: 116px;
    transform: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    border: 1px solid rgba(245,234,216,0.18);
    border-radius: 8px;
    background: rgba(7,6,5,0.94);
    box-shadow: 0 16px 50px rgba(0,0,0,0.44);
    -webkit-overflow-scrolling: touch;
  }

  .chapter-nav.is-open {
    display: flex;
  }

  .chapter-link,
  .chapter-link:hover,
  .chapter-link.is-active {
    width: auto;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0 13px;
    color: rgba(245,234,216,0.84);
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .chapter-link span {
    display: inline;
  }

  .slide {
    padding:
      calc(158px + env(safe-area-inset-top,0px))
      calc(22px + env(safe-area-inset-right,0px))
      calc(126px + env(safe-area-inset-bottom,0px))
      calc(22px + env(safe-area-inset-left,0px));
  }

  .theme-opening .slide-title {
    font-size: clamp(2.65rem, 14vw, 3.7rem);
    line-height: 0.98;
  }

  .slide-title {
    font-size: clamp(1.88rem, 8.8vw, 2.66rem);
    line-height: 1.08;
  }

  .slide-excerpt {
    margin-top: 20px;
    font-size: clamp(1.13rem, 5.1vw, 1.48rem);
    line-height: 1.28;
  }

  .slide-meta {
    margin-top: 16px;
  }

  .eyebrow {
    margin-bottom: 11px;
  }

  .slide-content {
    filter: none;
    transform: translateY(10px);
    transition: opacity 420ms ease, transform 420ms ease;
  }

  .visual {
    opacity: 0.66;
  }

  .fire-core {
    left: 5vw;
    bottom: 9svh;
    width: 112px;
    height: 112px;
  }

  .cave-mouth {
    right: -12vw;
    bottom: 3svh;
    width: 78vw;
    height: 54svh;
  }

  .stone-wall {
    width: 74vw;
    height: 100svh;
  }

  .glyph-wall {
    right: 2vw;
    bottom: 12svh;
    width: 250px;
    height: 164px;
  }

  .sun-disc {
    right: -42px;
    top: 15svh;
    width: 166px;
    height: 166px;
  }

  .ring-mark {
    right: -70px;
    top: 28svh;
    width: 224px;
    height: 224px;
  }

  .black-box {
    right: -44px;
    top: 28svh;
    width: 240px;
    height: 170px;
  }

  .black-box::before {
    left: 18px;
    top: 18px;
    max-width: 190px;
    font-size: 0.82rem;
    white-space: normal;
  }

  .eagle-mark {
    right: 12vw;
    top: 20svh;
    width: 118px;
  }

  .serpent-mark {
    right: 1vw;
    top: 62svh;
    width: 150px;
  }

  .controls {
    left: calc(12px + env(safe-area-inset-left,0px));
    right: calc(12px + env(safe-area-inset-right,0px));
    bottom: calc(12px + env(safe-area-inset-bottom,0px));
    justify-content: space-between;
  }

  .text-button {
    flex: 1;
  }

  .reader-dialog,
  .info-dialog {
    width: calc(100vw - 16px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));
    max-height: calc(100svh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  }

  .reader-shell {
    padding:
      calc(22px + env(safe-area-inset-top,0px))
      calc(22px + env(safe-area-inset-right,0px))
      calc(30px + env(safe-area-inset-bottom,0px))
      calc(22px + env(safe-area-inset-left,0px));
  }

  .reader-toolbar {
    margin:
      calc(-22px - env(safe-area-inset-top,0px))
      calc(-22px - env(safe-area-inset-right,0px))
      18px
      calc(-22px - env(safe-area-inset-left,0px));
    padding:
      calc(18px + env(safe-area-inset-top,0px))
      calc(22px + env(safe-area-inset-right,0px))
      14px
      calc(22px + env(safe-area-inset-left,0px));
  }

  .reader-nav {
    top: 82px;
  }

  .info-panel {
    padding:
      calc(58px + env(safe-area-inset-top,0px))
      calc(22px + env(safe-area-inset-right,0px))
      calc(28px + env(safe-area-inset-bottom,0px))
      calc(22px + env(safe-area-inset-left,0px));
  }

  .info-panel .close-button {
    top: calc(10px + env(safe-area-inset-top,0px));
    right: calc(10px + env(safe-area-inset-right,0px));
  }
}

@media (max-width: 390px) {
  .slide {
    padding-top: calc(150px + env(safe-area-inset-top,0px));
    padding-bottom: calc(118px + env(safe-area-inset-bottom,0px));
  }

  .theme-opening .slide-title {
    font-size: clamp(2.34rem, 13vw, 3.08rem);
  }

  .slide-title {
    font-size: clamp(1.68rem, 8.1vw, 2.2rem);
  }

  .slide-excerpt {
    font-size: clamp(1.05rem, 4.8vw, 1.3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .deck {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .slide-content {
    filter: none;
    transform: none;
  }
}
