/* ==========================================================================
   Presentation — shared stylesheet
   Designed for iPhone 16 Pro Max (430 × 932 CSS px, 3×), works on any phone.
   Sections: fonts · tokens · reset · stage/grain · ornaments · gate · slide chrome · letter · transitions.
   Mood: modern & minimal with "old romance" details — cream on ink, gold
   hairlines, roman numerals, ornamental flourishes, a whisper of film grain.
   ========================================================================== */

/* ---------- Self-hosted fonts (SIL Open Font License) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/playfair-display-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/playfair-display-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/pinyon-script-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/pinyon-script-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Design tokens ---------- */
:root {
  --ink: #120a0e;
  --ink-2: #1e1218;
  --cream: #f4ead9;
  --cream-dim: rgba(244, 234, 217, 0.72);
  --cream-faint: rgba(244, 234, 217, 0.42);
  --gold: #cfae66;
  --gold-soft: rgba(207, 174, 102, 0.55);
  --gold-hair: rgba(207, 174, 102, 0.32);
  --rose: #c98a8d;
  --wine: #5a1f2c;
  --glass: rgba(18, 10, 14, 0.42);
  --glass-strong: rgba(18, 10, 14, 0.62);

  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-script: "Pinyon Script", "Cormorant Garamond", cursive;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); color-scheme: dark; }
body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* ---------- Stage: one full-viewport frame ---------- */
.stage {
  position: fixed;
  inset: 0;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

/* Film grain — SVG noise, animated gently so it feels like projected film */
.stage::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 20;
  opacity: 0.09;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.6s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-1%, 4%); }
  80% { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .stage::after { animation: none; } }

/* ---------- Ornaments ---------- */
.ornament { display: block; color: var(--gold); fill: none; stroke: currentColor; }
.hairline {
  display: flex; align-items: center; gap: 10px;
  color: var(--gold-soft);
}
.hairline::before, .hairline::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, currentColor 40%, currentColor 60%, transparent);
}
.hairline > svg { width: 12px; height: 12px; flex: none; }

/* Corner brackets on cards */
.corners { position: absolute; inset: 0; pointer-events: none; }
.corners span {
  position: absolute; width: 22px; height: 22px;
  border: 1px solid var(--gold);
}
.corners span:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 3px; }
.corners span:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: 3px; }
.corners span:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: 3px; }
.corners span:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 3px; }

/* ==========================================================================
   GATE (index.html)
   ========================================================================== */
.gate__art {
  position: absolute; inset: -6%;
  background: url("../img/slide1.jpg") center / cover no-repeat;
  filter: blur(14px) saturate(0.85) brightness(0.55);
  transform: scale(1.06);
  z-index: 0;
}
.gate__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 70% at 50% 30%, rgba(90, 31, 44, 0.35), transparent 65%),
    linear-gradient(180deg, rgba(18, 10, 14, 0.55) 0%, rgba(18, 10, 14, 0.35) 45%, rgba(18, 10, 14, 0.85) 100%);
}
.gate {
  position: relative; z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--safe-top) + 24px) 28px calc(var(--safe-bottom) + 40px);
  opacity: 0;
  animation: fadeUp 1.1s var(--ease-out) 0.1s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.gate__header {
  text-align: center;
  margin-bottom: 34px;
}
.gate__eyebrow {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 22px;
}
.gate__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 9.4vw, 44px);
  line-height: 1.08;
  margin: 0;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-wrap: balance;
}
.gate__title em {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.32em;
  color: var(--gold);
  display: block;
  line-height: 0.85;
  margin-top: -0.06em;
}
.gate__sub {
  font-style: italic; font-size: 18px; color: var(--cream-dim); margin: 16px 0 0;
}
.gate__card {
  position: relative;
  padding: 30px 26px 26px;
  border: 1px solid rgba(207, 174, 102, 0.22);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.gate__label {
  display: block;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream-faint); margin-bottom: 14px;
}
.field {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 10px;
  transition: border-color 0.3s;
}
.field:focus-within { border-color: var(--gold); }
.field > svg { width: 17px; height: 17px; color: var(--gold); flex: none; }
.field.is-error { border-color: var(--rose); }
.field.is-error > svg { color: var(--rose); }
.field input {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 20px; letter-spacing: 0.22em;
  color: var(--cream); background: none; border: 0; outline: 0; padding: 4px 0;
  -webkit-user-select: text; user-select: text;
  caret-color: var(--gold);
}
.field input::selection { background: transparent; color: var(--gold); text-shadow: 0 0 12px rgba(207, 174, 102, 0.6); }
::selection { background: rgba(207, 174, 102, 0.35); color: var(--cream); }
.field input::placeholder { color: var(--cream-faint); letter-spacing: 0.06em; font-style: italic; }
.field__eye { width: 36px; height: 36px; display: grid; place-items: center; color: var(--cream-faint); flex: none; }
.field__eye svg { width: 17px; height: 17px; color: inherit; stroke-width: 1.2; }
.field__eye[aria-pressed="true"] { color: var(--gold); }
.gate__error {
  height: 22px; line-height: 22px; margin: 10px 0 0;
  font-style: italic; font-size: 16px; color: var(--rose);
  opacity: 0; transition: opacity 0.3s;
}
.gate__error.is-visible { opacity: 1; }
.gate__card.is-shaking { animation: shake 0.5s var(--ease-in-out); }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.btn-seal {
  margin-top: 12px;
  width: 100%;
  height: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  background: rgba(207, 174, 102, 0.06);
  position: relative;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s;
}
.btn-seal:active { transform: scale(0.985); background: rgba(207, 174, 102, 0.16); }
.btn-seal svg { width: 14px; height: 14px; }
.btn-seal[disabled] { opacity: 0.6; }
.gate__footer {
  margin-top: 56px; text-align: center;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-faint);
}
.gate__footer .hairline { width: 120px; margin: 0 auto 14px; }

/* Unlock transition: a slow curtain of ink */
.curtain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: var(--ink); opacity: 0;
  transition: opacity 0.7s var(--ease-in-out);
}
.curtain.is-closed { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   SLIDE (slides/slideN.html)
   ========================================================================== */
.slide { display: block; }
.slide__art {
  position: absolute; inset: 0; margin: 0; z-index: 0;
  overflow: hidden; background: var(--ink);
}
.slide__art img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform: scale(1.04);
  animation: kenburns 24s var(--ease-out) forwards;
}
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .slide__art img { animation: none; transform: none; } }

/* Legibility veils: soft at the top for the counter, heavier at the bottom for text + controls */
.slide__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 10, 14, 0.55) 0%, rgba(18, 10, 14, 0) 22%),
    linear-gradient(0deg, rgba(18, 10, 14, 0.88) 0%, rgba(18, 10, 14, 0.55) 26%, rgba(18, 10, 14, 0) 55%);
}

/* Top bar: roman counter + progress dashes */
.slide__top {
  position: absolute; z-index: 5;
  top: calc(var(--safe-top) + 18px); left: 0; right: 0;
  padding: 0 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.progress { display: flex; gap: 6px; }
.progress span { flex: 1; height: 2px; background: rgba(244, 234, 217, 0.22); border-radius: 2px; overflow: hidden; }
.progress span.is-done { background: var(--gold-soft); }
.progress span.is-current { background: rgba(207, 174, 102, 0.4); position: relative; }
.progress span.is-current::after {
  content: ""; position: absolute; inset: 0; background: var(--gold);
  transform-origin: left; transform: scaleX(var(--audio-progress, 0));
  transition: transform 0.25s linear;
}
.slide__meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--cream-dim);
}
.slide__meta .numeral { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.22em; color: var(--gold); }
.slide__meta > .ornament { width: 9px; height: 9px; }
.slide__meta .numeral small { font-family: var(--font-body); color: var(--cream-faint); letter-spacing: 0.22em; font-size: 12px; margin-left: 4px; }

/* Bottom HUD: prev · audio pill · next */
.slide__hud {
  position: absolute; z-index: 6;
  left: 18px; right: 18px;
  bottom: calc(var(--safe-bottom) + 22px);
  display: grid; grid-template-columns: 52px 1fr 52px; gap: 12px; align-items: center;
  opacity: 0; animation: fadeUp 0.9s var(--ease-out) 0.45s forwards;
}
.nav-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold-hair);
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--cream);
  transition: transform 0.2s var(--ease-out), background 0.2s, border-color 0.2s;
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn:active { transform: scale(0.94); background: var(--glass-strong); border-color: var(--gold); }
.nav-btn[aria-disabled="true"] { opacity: 0.15; pointer-events: none; }
.nav-btn--next { color: var(--gold); border-color: var(--gold-soft); }

.player {
  height: 52px; min-width: 0;
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(207, 174, 102, 0.42);
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
}
.player__play {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  background: linear-gradient(180deg, #e2c47f 0%, var(--gold) 55%, #b18f48 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s var(--ease-out);
  position: relative;
}
.player__play:active { transform: scale(0.94); }
.player__play svg { width: 16px; height: 16px; }
.player__play .ico-pause { display: none; }
.player.is-playing .player__play .ico-play { display: none; }
.player.is-playing .player__play .ico-pause { display: block; }
.player__track { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.player__label {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--cream-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player.is-playing .player__label { color: var(--gold); }
.player__bar {
  position: relative; height: 14px; display: flex; align-items: center; cursor: pointer;
}
.player__bar::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(244, 234, 217, 0.22); }
.player__fill {
  position: absolute; left: 0; height: 1px; width: 100%; background: var(--gold);
  transform-origin: left; transform: scaleX(var(--audio-progress, 0));
}
.player__knob {
  position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(207, 174, 102, 0.22);
  left: calc(var(--audio-progress, 0) * 100%);
  transition: transform 0.2s;
}
.player.is-playing .player__knob { transform: scale(1.15); }
.player__time {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.06em; color: var(--cream-dim);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Closing ornament + replay link (last slide) */
.closing { position: absolute; left: 0; right: 0; top: calc(100% + 2px); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.closing .hairline { width: 100%; }
.closing .hairline svg { width: 10px; height: 10px; }
.replay {
  font-size: 17px; font-style: italic; letter-spacing: 0.04em; color: var(--gold);
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 0;
  text-decoration: none;
}
.replay svg { width: 14px; height: 14px; }

/* ==========================================================================
   LETTER SLIDES — one paragraph per page, scrollable inside a fixed frame
   ========================================================================== */
.slide--letter .slide__art img { filter: brightness(0.62) saturate(0.85); }
.slide--letter .slide__veil {
  background:
    linear-gradient(180deg, rgba(18, 10, 14, 0.7) 0%, rgba(18, 10, 14, 0.45) 30%, rgba(18, 10, 14, 0.45) 70%, rgba(18, 10, 14, 0.9) 100%);
}
.letter {
  position: absolute; z-index: 4;
  left: 0; right: 0;
  top: calc(var(--safe-top) + 84px);
  bottom: calc(var(--safe-bottom) + 100px);
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 56px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 56px), transparent 100%);
  opacity: 0; animation: fadeUp 1s var(--ease-out) 0.2s forwards;
}
.letter::-webkit-scrollbar { display: none; }
.letter__inner { padding: 34px 28px 70px; }
.letter__salutation {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 8.4vw, 38px); line-height: 1.1; margin: 0 0 22px;
  color: var(--cream); letter-spacing: 0.005em;
}
.letter__salutation em { font-family: var(--font-script); font-style: normal; color: var(--gold); font-size: 1.28em; line-height: 0.9; }
.letter__rule { width: 64px; margin: 0 0 24px; color: var(--gold-soft); }
.letter__rule svg { width: 10px; height: 10px; }
.letter p {
  font-family: var(--font-body); font-weight: 500;
  font-size: 21px; line-height: 1.58; letter-spacing: 0.004em;
  color: var(--cream); margin: 0 0 1.1em;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
  -webkit-user-select: text; user-select: text;
  hyphens: auto; -webkit-hyphens: auto;
}
.letter p:last-child { margin-bottom: 0; }
.letter p.has-dropcap::first-letter {
  font-family: var(--font-display); color: var(--gold);
  font-size: 3.1em; line-height: 0.78; float: left;
  padding: 0.08em 0.12em 0 0;
}
.letter p.letter__closing {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--gold-hair);
  font-style: italic; font-weight: 400; color: var(--cream-dim); font-size: 20px; line-height: 1.5;
}
.letter .closing { position: static; margin-top: 26px; }
.letter p.hint {
  position: static; margin: 26px 0 0; font-size: 15px; font-weight: 400; line-height: 1.4;
}

/* Scroll cue: appears only when the paragraph overflows, fades on first scroll */
.scroll-cue {
  position: absolute; z-index: 5; left: 0; right: 0;
  bottom: calc(var(--safe-bottom) + 80px);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold);
  pointer-events: none; opacity: 0; transition: opacity 0.5s;
  padding-bottom: 6px;
}
.scroll-cue svg { width: 12px; height: 12px; animation: bob 1.8s var(--ease-in-out) infinite; }
.scroll-cue.is-visible { opacity: 1; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Page transitions between slides */
.slide { opacity: 1; transition: opacity 0.45s var(--ease-in-out); }
.slide.is-leaving { opacity: 0; }
.slide.is-leaving .slide__art img { transition: transform 0.6s var(--ease-in-out); }

/* Swipe hint on the first slide only — sits in the text column */
.hint {
  position: absolute; left: 0; top: calc(100% + 12px); margin: 0; font-size: 15px; letter-spacing: 0.04em; font-style: italic;
  color: rgba(244, 234, 217, 0.55);
  opacity: 0; animation: hint 6s var(--ease-in-out) 1.4s forwards;
}
@keyframes hint { 0% { opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* Wider screens (tablet / desktop preview): keep a phone-like column */
@media (min-width: 640px) {
  .stage { width: min(100vw, 480px); left: 50%; transform: translateX(-50%); box-shadow: 0 0 0 1px var(--gold-hair), 0 60px 120px -40px rgba(0,0,0,0.9); }
  html, body { background: #0a0507; }
}
