/*
 * css/sky.css  ·  the stage, the letter, the chrome around it, the Albums menu, hint and intro
 */

/* ── Stage ─────────────────────────────────────────────────────────────── */
.stage {
  position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab; z-index: var(--z-sky);
  background: var(--dusk-900); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.stage.is-dragging { cursor: grabbing; }
.stage.is-over-tile { cursor: pointer; }
.stage:focus-visible { outline: none; }
.kbd .stage:not(.has-focus-tile):focus::after {
  content: ""; position: absolute; inset: 8px; border: 2px solid rgba(242, 178, 108, .55); border-radius: 12px; pointer-events: none; z-index: 6;
}
#sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.alive {
  position: absolute; left: 0; top: 0; width: 100px; height: 100px; object-fit: cover; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity var(--t-breath) var(--ease-breath); background: transparent;
}
.alive { scale: 1.06; clip-path: inset(2.83%); transition: opacity var(--t-breath) var(--ease-breath), scale var(--t-breath) var(--ease-breath), clip-path var(--t-breath) var(--ease-breath); }
.alive.is-on { opacity: 1; scale: 1; clip-path: inset(0); }   /* the still breathes into its clip instead of jumping to its framing */
.alive-badge {
  position: absolute; left: 0; top: 0; z-index: 1; width: 21px; height: 21px; border-radius: 50%; pointer-events: none; transform-origin: 0 0;
  background: rgba(12, 9, 7, .45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238fd3c7' stroke-width='1.1'%3E%3Ccircle cx='10' cy='10' r='2.2' fill='%238fd3c7' stroke='none'/%3E%3Ccircle cx='10' cy='10' r='4.6'/%3E%3Ccircle cx='10' cy='10' r='7' stroke-dasharray='1.1 1.7'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(12, 9, 7, .72), rgba(12, 9, 7, 0) var(--band)),
    linear-gradient(to top, rgba(12, 9, 7, .78), rgba(12, 9, 7, 0) var(--band)),
    radial-gradient(125% 100% at 50% 50%, transparent 58%, rgba(12, 9, 7, .55) 100%);
}
.world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; z-index: var(--z-world); transition: opacity var(--t-dawn) linear; }
body.is-prelude .world { opacity: 0; transition: none; }
body.is-fading-in .world { opacity: 0; transition: none; }
/* the letter stays put while the viewer is open: the .97 backdrop already hides it, and it must never come back as a bare glow */
.grain {
  position: absolute; inset: -50%; pointer-events: none; z-index: var(--z-grain); opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (hover: hover) and (pointer: fine) { .grain { opacity: .07; mix-blend-mode: soft-light; } }

/* ── Hover tip (rides inside the hovered print) ─────────────────────────── */
.tip {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 4px;
  padding: 30px 12px 11px; color: var(--cream); opacity: 0; transition: opacity var(--t-glance) linear;
  background: linear-gradient(to top, rgba(12, 9, 7, .92), rgba(12, 9, 7, .62) 55%, rgba(12, 9, 7, 0));
}
.tip.is-on { opacity: 1; }
.tip.is-star { padding: 22px 9px 8px; gap: 3px; }
.tip.is-star .tip-album { font-size: 14px; line-height: 1.15; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tip.is-star .tip-date { font-size: 9px; letter-spacing: .12em; }
.tip-album { font: italic 400 15px/1.1 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip-date { font: 600 10px/1.2 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--mist); }

/* ── The letter: a lit sheet of linen at the centre of everything ─────── */
.letter {
  position: absolute; left: 0; top: 0; color: var(--ink-700); cursor: auto;
  user-select: text; -webkit-user-select: text; -webkit-touch-callout: default;
  --fs-kicker: 11.5px; --fs-title: 76px; --fs-body: 19px; --fs-lede: 25px;
  --pad-y: clamp(28px, 6%, 64px); --pad-x: clamp(24px, 8%, 76px);
}
.letter:focus { outline: none; }
.letter:focus-visible .letter-paper { outline: 2px solid var(--ember-300); outline-offset: 6px; }
/* sizes in world px (§5.3); xl and lg share the ≥ 1280 column */
.letter--medium { --fs-title: 64px; }
.letter--long { --fs-title: 54px; --fs-body: 18px; }
.letter.bp-md { --fs-title: 64px; --fs-body: 18px; --fs-lede: 23px; }
.letter.bp-md.letter--medium { --fs-title: 56px; }
.letter.bp-md.letter--long { --fs-title: 52px; }
.letter.bp-sm { --fs-title: 60px; --fs-body: 18px; --fs-lede: 22px; --fs-kicker: 11px; }
.letter.bp-sm.letter--medium { --fs-title: 52px; }
.letter.bp-sm.letter--long { --fs-title: 48px; }
.letter.bp-xs { --fs-title: 40px; --fs-body: 16.5px; --fs-lede: 19px; --fs-kicker: 9.5px; --pad-y: 28px; --pad-x: 22px; }
.letter.bp-xs.letter--medium { --fs-title: 38px; }
.letter.bp-xs.letter--long { --fs-title: 36px; }

.letter-paper {
  position: relative; border-radius: var(--r-paper); padding: var(--pad-y) var(--pad-x);
  background: radial-gradient(90% 70% at 50% 38%, #fffaf1, rgba(255, 250, 241, 0) 70%), var(--linen-50);
  box-shadow: var(--sh-paper);
}
.letter-paper::before { /* the letter gives off light: a slow, compositor-only breath */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 120px 14px rgba(255, 190, 120, .3), 0 0 40px 2px rgba(255, 214, 160, .25);
  animation: breathe 7s var(--ease-breath) infinite alternate;
}
@keyframes breathe { from { opacity: .45; } to { opacity: 1; } }
.letter-paper::after { /* paper tooth */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .3; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .45  0 0 0 0 .35  0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}
/* tri-fold creases: a real letter travelled in an envelope (medium and long letters only). Each fold is a soft
   valley and a soft ridge, with no hard edge anywhere */
.letter.has-creases .letter-paper {
  background:
    linear-gradient(to bottom, rgba(120, 80, 40, 0) calc(33.333% - 10px), rgba(120, 80, 40, .035) 33.333%, rgba(120, 80, 40, 0) calc(33.333% + 10px)),
    linear-gradient(to bottom, rgba(255, 255, 255, 0) calc(33.333% - 2px), rgba(255, 255, 255, .35) calc(33.333% + 2px), rgba(255, 255, 255, 0) calc(33.333% + 10px)),
    linear-gradient(to bottom, rgba(120, 80, 40, 0) calc(66.666% - 10px), rgba(120, 80, 40, .035) 66.666%, rgba(120, 80, 40, 0) calc(66.666% + 10px)),
    linear-gradient(to bottom, rgba(255, 255, 255, 0) calc(66.666% - 2px), rgba(255, 255, 255, .35) calc(66.666% + 2px), rgba(255, 255, 255, 0) calc(66.666% + 10px)),
    radial-gradient(90% 70% at 50% 38%, #fffaf1, rgba(255, 250, 241, 0) 70%), var(--linen-50);
}

.letter-kicker {
  margin: 0 0 .9em; font: 600 var(--fs-kicker)/1.3 var(--f-ui); letter-spacing: .24em; text-transform: uppercase;
  color: var(--ember-600); text-align: center; text-indent: .24em;
}
.letter-title {
  margin: 0; font: italic 500 var(--fs-title)/1.02 var(--f-display); letter-spacing: -.012em; color: var(--ink-900);
  font-optical-sizing: none; font-variation-settings: "opsz" 34; text-wrap: balance; text-align: center;
}
.letter-seal { display: flex; align-items: center; gap: 14px; max-width: 74%; margin: calc(var(--fs-body) * 1.15) auto; color: var(--ember-600); }
.letter-seal span { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(166, 79, 38, 0), rgba(166, 79, 38, .45), rgba(166, 79, 38, 0)); }
.letter-seal i {
  width: 2.3em; height: 2.3em; display: grid; place-items: center; flex: none; border: 1px solid rgba(166, 79, 38, .45); border-radius: 50%;
  font: italic 500 calc(var(--fs-body) * .9)/1 var(--f-display); padding-top: .08em;
}
.letter-body {
  font: 400 var(--fs-body)/1.6 var(--f-text); color: var(--ink-700); text-wrap: pretty; hanging-punctuation: first;
  font-variant-numeric: oldstyle-nums proportional-nums; hyphens: manual;
}
.letter-body p { margin: 0 0 .85em; }
.letter-body p:last-child { margin-bottom: 0; }
.letter--short .letter-body { font-size: var(--fs-lede); line-height: 1.45; font-style: italic; text-align: center; }
.letter--short .letter-body p { margin-bottom: .55em; }
.letter--medium .letter-body p:first-child::first-letter,
.letter--long .letter-body p:first-child::first-letter {
  float: left; font: 500 5.1em/.74 var(--f-display); color: var(--ember-600); margin: .07em .08em 0 0; font-style: normal;
}
.letter-signoff { margin: 1.5em 0 0; font: italic 400 var(--fs-body)/1.3 var(--f-text); color: var(--ink-500); }
.letter-signature {
  margin: -.12em 0 0; font: 400 calc(var(--fs-body) * 2.6)/1.05 var(--f-hand); color: var(--pen);
  transform: rotate(-3.5deg); transform-origin: 0 50%; padding: .08em 0 .02em .1em;
}
.letter--short .letter-signoff { font-size: calc(var(--fs-lede) * .76); margin-top: 1.1em; text-align: center; }
.letter--short .letter-signature { font-size: calc(var(--fs-lede) * 2.2); text-align: center; transform-origin: 50% 50%; }
.letter.is-card .letter-title { font-size: calc(var(--fs-title) * .9); }
/* a long letter keeps a comfortable measure (≈ 68 characters of Newsreader) inside the wider sheet; the sign-off follows the column */
.letter--medium, .letter--long { --col: min(100%, calc(var(--fs-body) * 28.5)); }
.letter.bp-xl.letter--long { --fs-body: 19px; }
.letter--medium .letter-body, .letter--long .letter-body { max-width: var(--col); margin-inline: auto; }
.letter--medium .letter-signoff, .letter--long .letter-signoff,
.letter--medium .letter-signature, .letter--long .letter-signature { margin-left: calc((100% - var(--col)) / 2 + var(--col) * .45); }
.letter.bp-xs.letter--medium .letter-signoff, .letter.bp-xs.letter--long .letter-signoff,
.letter.bp-xs.letter--medium .letter-signature, .letter.bp-xs.letter--long .letter-signature { margin-left: calc((100% - var(--col)) / 2 + var(--col) * .3); }
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
  .letter--medium .letter-body p:first-child::first-letter,
  .letter--long .letter-body p:first-child::first-letter {
    float: none; -webkit-initial-letter: 3; initial-letter: 3; font-size: 1em; line-height: 1; margin: 0 .12em 0 0;
  }
}

/* words write themselves in */
.letter [data-reveal] {
  opacity: 0; translate: 0 6px;
  transition: opacity var(--t-dawn) var(--ease-glide), translate var(--t-dawn) var(--ease-glide);
  transition-delay: calc(var(--i, 0) * var(--stagger, 0ms));
}
.letter.is-revealed [data-reveal] { opacity: 1; translate: 0 0; }

/* ── Chrome ────────────────────────────────────────────────────────────── */
.chrome {
  position: fixed; left: 0; right: 0; z-index: var(--z-chrome); display: flex; justify-content: space-between; gap: 12px; pointer-events: none;
  padding: 0 calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  transition: opacity var(--t-dawn) var(--ease-glide), transform var(--t-dawn) var(--ease-glide);
}
.chrome > * { pointer-events: auto; }
.chrome-top { top: 0; padding-top: calc(20px + var(--safe-t)); align-items: center; }
.chrome-bottom { bottom: 0; padding-bottom: calc(20px + var(--safe-b)); align-items: flex-end; }
.chrome-actions { display: flex; gap: 8px; }
body.is-intro .chrome, body.is-viewing .chrome, body.is-library .chrome { opacity: 0; }
body.is-intro .chrome > *, body.is-viewing .chrome > *, body.is-library .chrome > * { pointer-events: none; visibility: hidden; transition: visibility 0s var(--t-dawn); }
body.is-intro .chrome-top { transform: translateY(-10px); }
body.is-intro .chrome-bottom { transform: translateY(10px); }
body.is-viewing .chrome { transition-duration: 300ms; }

.mark { display: inline-flex; align-items: center; gap: 13px; height: 44px; min-width: 44px; padding: 0 8px 0 2px; border-radius: 22px; }
.mark-num {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid rgba(242, 178, 108, .7); background: rgba(18, 13, 10, .72);
  font: italic 500 20px/1 var(--f-display); color: var(--ember-300); padding-top: 1px;
  transition: background-color var(--t-breath) var(--ease-breath), color var(--t-breath) var(--ease-breath);
}
.mark-text { font: 600 11.5px/1 var(--f-ui); letter-spacing: .26em; text-transform: uppercase; color: var(--cream); text-shadow: 0 0 3px rgba(12, 9, 7, .9), 0 1px 14px rgba(0, 0, 0, .9); }
/* while the letter runs under the top chrome, the chips and the mark are solid, so neither stains nor shows through the paper */
.mark { transition: background-color var(--t-breath) var(--ease-breath); }
@media (min-width: 600px) { .mark { background: rgba(18, 13, 10, .62); padding-right: 16px; } }   /* "For Mom" reads over any photograph */
body.is-reading .mark { background: var(--dusk-800); box-shadow: 0 0 0 1px var(--haze); padding-right: 16px; }
body.is-reading .mark-num { background: var(--dusk-800); }
body.is-reading .chip { background: var(--dusk-800); }
@media (hover: hover) and (pointer: fine) { .mark:hover .mark-num { background: var(--ember-300); color: var(--dusk-900); } }
.mark:active .mark-num { transform: scale(.96); }

.slate { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: min(46vw, 560px); padding-bottom: 4px; text-shadow: 0 0 3px rgba(12, 9, 7, .8), 0 1px 18px rgba(0, 0, 0, .85); transition: opacity 360ms var(--ease-glide); }
.slate::before { /* a soft pool of dusk behind the words, so they read over any photograph */
  content: ""; position: absolute; z-index: -1; left: -60px; right: -80px; top: -36px; bottom: -40px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(12, 9, 7, .72), rgba(12, 9, 7, .45) 55%, rgba(12, 9, 7, 0));
}
.slate.is-tucked { opacity: 0; pointer-events: none; }
.slate-title { font: italic 400 26px/1.08 var(--f-display); color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 200ms linear, transform 420ms var(--ease-glide); }
.slate-row { display: flex; align-items: center; gap: 14px; min-width: 0; transition: opacity 200ms linear; }
.slate-meta { display: flex; align-items: center; gap: 10px; min-width: 0; font: 600 10.5px/1.3 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slate-meta::before { content: ""; flex: none; width: 18px; height: 1px; background: var(--ember-300); }
.slate-link { font: 600 10.5px/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ember-300); text-decoration: none; white-space: nowrap; padding: 8px 0; }
.slate-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.slate.is-swapping .slate-title { opacity: 0; transform: translateY(5px); }
.slate.is-swapping .slate-row { opacity: 0; }

.dock { display: flex; align-items: flex-end; gap: 12px; flex: none; transition: opacity 360ms var(--ease-glide); }
.dock.is-tucked { opacity: 0; pointer-events: none; }
.dock.is-tucked * { pointer-events: none; }
.dock > .minimap, .dock > .zoom { transition: opacity 360ms var(--ease-glide); }
.dock.is-tuck-tools > .minimap, .dock.is-tuck-tools > .zoom { opacity: 0; pointer-events: none; }
#dock-pill { min-width: 186px; }   /* fits "Back to the letter", so the minimap and zoom never jump when the label changes */
.minimap { width: 128px; height: 86px; border-radius: 10px; background: rgba(12, 9, 7, .82); border: 1px solid var(--haze); padding: 0; overflow: hidden; position: relative; touch-action: none; transition: border-color var(--t-breath); }
.minimap canvas { width: 100%; height: 100%; }
@media (hover: hover) and (pointer: fine) { .minimap:hover { border-color: rgba(242, 178, 108, .5); } }
.zoom { display: flex; flex-direction: column; border-radius: 22px; background: rgba(26, 20, 16, .82); border: 1px solid var(--haze); overflow: hidden; }
.zoom button { width: 44px; height: 43px; display: grid; place-items: center; transition: background-color var(--t-breath); }
.zoom button + button { border-top: 1px solid rgba(243, 232, 216, .1); }
.zoom button:hover { background: rgba(243, 232, 216, .07); }
.zoom button:focus-visible { outline-offset: -3px; border-radius: 20px; }
.zoom svg { width: 14px; height: 14px; stroke: var(--cream); stroke-width: 1.4; fill: none; stroke-linecap: round; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember-300); box-shadow: 0 0 0 3px rgba(242, 178, 108, .18), 0 0 14px rgba(242, 178, 108, .8); }
@media (hover: none), (pointer: coarse) { .zoom { display: none; } .stage { cursor: default; } }

/* ── Albums menu ──────────────────────────────────────────────────────── */
.menu {
  position: fixed; z-index: var(--z-menu); top: calc(76px + var(--safe-t)); right: calc(var(--gutter) + var(--safe-r));
  width: 360px; max-height: calc(100vh - 190px); overflow: auto; overscroll-behavior: contain;
  padding: 18px 8px 10px; border-radius: var(--r-panel); background: var(--dusk-800); border: 1px solid rgba(243, 232, 216, .1);
  box-shadow: var(--sh-panel); transform-origin: top right; animation: menu-in 420ms var(--ease-glide);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.menu-kicker { margin: 0 14px 10px; font: 600 10.5px/1.2 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--mist); }
.menu-row { position: relative; border-radius: 10px; transition: background-color var(--t-breath); }
.menu-row + .menu-row::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: rgba(243, 232, 216, .07); }
.menu-row:hover, .menu-row:focus-within { background: rgba(243, 232, 216, .05); }
.menu-pick { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px; row-gap: 5px; text-align: left; padding: 13px 14px 14px; border-radius: 10px; }
.menu-pick:focus-visible { outline-offset: -2px; }
.menu-title { font: italic 400 20px/1.15 var(--f-display); color: var(--cream); }
.menu-count { font: 400 15px/1 var(--f-text); color: var(--mist); font-variant-numeric: lining-nums tabular-nums; }
.menu-meta { grid-column: 1 / -1; padding-right: 92px; font: 600 10px/1.3 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--mist); }
.menu-pick[aria-current="true"] .menu-title { color: var(--ember-300); }
.menu-open {
  position: absolute; right: 6px; bottom: 5px; padding: 8px 8px; border-radius: 6px;
  font: 500 12px/1 var(--f-ui); color: var(--ember-300); text-decoration: none; opacity: .85;
}
.menu-open::after { content: " \2192"; }
.menu-open:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: none), (pointer: coarse) {
  .menu-open { display: inline-flex; align-items: center; min-height: 44px; bottom: 0; right: 4px; padding: 0 10px; }
  .slate-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin: -10px 0 -12px; }
}
.sym { font-family: var(--f-text); font-style: normal; font-weight: 400; margin-inline: .04em; }

/* ── Hint ─────────────────────────────────────────────────────────────── */
.hint {
  position: fixed; z-index: var(--z-hint); left: 50%; top: calc(22px + var(--safe-t)); max-width: calc(100vw - 32px);
  transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 10px; row-gap: 4px;
  padding: 11px 18px; border-radius: 22px; background: rgba(26, 20, 16, .9); border: 1px solid rgba(243, 232, 216, .12);
  font: 500 12.5px/1.3 var(--f-ui); color: var(--cream); text-align: center;
  transition: opacity 600ms var(--ease-glide), transform 800ms var(--ease-glide);
}
.hint.is-on { opacity: 1; transform: translate(-50%, 0); }
.hint i { font-style: normal; color: var(--ember-300); }
.hint b { font-weight: 500; color: var(--mist); }
.hint-sep { color: rgba(243, 232, 216, .3); }

/* ── Intro title card ─────────────────────────────────────────────────── */
.intro { position: fixed; inset: 0; z-index: var(--z-intro); display: grid; place-content: center; text-align: center; pointer-events: none; }
body:not(.is-intro) .intro:not(.is-b) { display: none; }
.intro-kicker { font: 600 12px/1 var(--f-ui); letter-spacing: .42em; text-indent: .42em; text-transform: uppercase; color: var(--ember-300); }
.intro-num {
  margin: .05em 0 0; font: italic 500 clamp(120px, min(38vh, 70vw), 420px)/.9 var(--f-display); color: var(--linen-50); letter-spacing: -.02em;
  font-optical-sizing: auto; text-shadow: 0 0 60px rgba(242, 178, 108, .45), 0 0 150px rgba(226, 121, 63, .35);
}
.intro-meta { margin: .7em 0 0; font: italic 400 18px/1.3 var(--f-text); color: var(--mist); font-variant-numeric: lining-nums; }
.intro > * { opacity: 0; transform: translateY(10px); }
.intro.is-a .intro-kicker { opacity: 1; transform: none; transition: opacity 1000ms var(--ease-glide) 150ms, transform 1000ms var(--ease-glide) 150ms; }
.intro.is-a .intro-num { opacity: 1; transform: none; transition: opacity 1400ms var(--ease-glide) 270ms, transform 1400ms var(--ease-glide) 270ms; }
.intro.is-a .intro-meta { opacity: 1; transform: none; transition: opacity 1000ms var(--ease-glide) 530ms, transform 1000ms var(--ease-glide) 530ms; }
.intro.is-b > * { opacity: 0; transition: opacity 700ms var(--ease-drift), transform 900ms var(--ease-drift); }
.intro.is-b .intro-num { /* the 55 dissolves as warm light, not as a grey ghost */
  transform: scale(1.35); color: rgb(255, 214, 160);
  text-shadow: 0 0 80px rgba(255, 190, 120, .7), 0 0 180px rgba(226, 121, 63, .5);
  transition: opacity 650ms var(--ease-drift), transform 900ms var(--ease-drift), color 400ms linear, text-shadow 400ms linear;
}
.intro.is-b .intro-kicker { transform: translateY(-24px); }
.intro.is-b .intro-meta { transform: translateY(24px); }

/* ── Phones ───────────────────────────────────────────────────────────── */
@media (max-width: 599px) {
  .chrome-top { padding-top: calc(14px + var(--safe-t)); }
  .chrome-bottom { padding-bottom: calc(14px + var(--safe-b)); }
  .mark-text { display: none; }
  .mark { padding: 0 2px; }
  .chip, .pill { font-size: 12.5px; padding: 0 15px; }
  .minimap, .zoom { display: none; }
  .slate { max-width: 60vw; gap: 6px; }
  .slate-title { font-size: 20px; }
  .slate-meta { font-size: 9.5px; letter-spacing: .16em; display: block; white-space: normal; line-height: 1.45; }   /* two lines rather than a broken phrase */
  .slate-meta::before { display: none; }
  .slate-row { flex-wrap: wrap; row-gap: 0; }
  .slate-link { font-size: 9.5px; display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin: -10px 0 -12px; }
  #dock-pill { min-width: 168px; }
  .menu {
    left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); width: auto; top: auto; bottom: calc(10px + var(--safe-b));
    max-height: 80vh; transform-origin: bottom center; animation-name: sheet-in;
  }
  .hint { top: calc(70px + var(--safe-t)); font-size: 11.5px; padding: 10px 14px; column-gap: 12px; white-space: nowrap; flex-wrap: nowrap; }
  .hint-sep { display: none; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
@media (max-width: 899px) { .minimap { width: 112px; height: 76px; } }

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .letter-paper::before { animation: none; opacity: .8; }
  .letter [data-reveal] { transition: none; }
  .chrome, .hint, .slate, .slate-title, .slate-row, .world { transition-duration: 1ms !important; }
  .menu { animation: none; }
}
