/* ───────────────────────────────────────────────────────────────────────────
   The Atlas of the Unnamed - design system
   An engraver's chart on a drafting table. Warm parchment, sepia ink,
   verdigris seas, and one oxidized-vermilion accent reserved for the unnamed.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --paper:    #e7d8b8;
  --paper-hi: #f1e7cd;
  --paper-lo: #d8c39e;
  --paper-edge:#c9b289;

  --ink:      #221a0f;
  --ink-2:    #463a26;
  --ink-3:    #7b6a4c;
  --ink-faint:rgba(34,26,15,.46);
  --line:     rgba(34,26,15,.26);
  --hairline: rgba(34,26,15,.16);

  --sea-shallow:#a8c2ba;
  --sea-mid:   #5f8d86;
  --sea-deep:  #2f5552;

  --red:      #9c3a20;   /* the unnamed: oxidized vermilion ink */
  --red-soft: #b9543a;
  --red-wash: rgba(156,58,32,.10);
  --gold:     #a8772b;   /* selection, ornament */

  --serif: "Hoefler Text","Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,"Times New Roman",serif;
  --mono:  "SF Mono",ui-monospace,"Menlo","Cascadia Code",monospace;

  --shadow: 0 18px 50px -22px rgba(34,26,15,.55), 0 2px 8px -4px rgba(34,26,15,.4);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  overscroll-behavior: none;
}

button { font-family: var(--serif); color: inherit; cursor: pointer; }

/* small-caps utility for that engraved-label feel */
.smcp {
  font-variant: small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 0, "onum" 1;
  letter-spacing: .14em;
  text-transform: lowercase;
}

/* ── the chart ───────────────────────────────────────────────────────────── */
#map {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
#map.grabbing { cursor: grabbing; }
#map.pointing  { cursor: pointer; }

/* ── persistent wordmark, top-left ───────────────────────────────────────── */
.wordmark {
  position: fixed; top: 26px; left: 30px; z-index: 20;
  display: flex; flex-direction: column; gap: 1px;
  background: none; border: 0; padding: 4px 6px 4px 0;
  text-align: left; line-height: 1.02;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(231,216,184,.98), 0 0 7px rgba(231,216,184,.95), 0 1px 0 rgba(241,231,205,.6);
  transition: opacity .4s ease;
}
.wordmark-line {
  font-size: 15px; letter-spacing: .07em;
  font-variant: small-caps; font-feature-settings: "smcp" 1;
  color: var(--ink-2);
}
.wordmark-em {
  font-size: 25px; letter-spacing: .015em;
  font-style: italic; font-variant: normal;
  color: var(--ink);
  margin-top: 1px;
}
.wordmark:hover { opacity: .68; }

/* ── the sounding instrument, bottom-centre ──────────────────────────────── */
.sounding {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 20; width: min(540px, calc(100vw - 48px));
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.sounding-label {
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-3);
}
.sounding-row {
  position: relative; width: 100%;
  display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(241,231,205,.94), rgba(225,210,180,.92));
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,250,235,.5);
  backdrop-filter: blur(3px);
}
.sounding-row::before {  /* a hairline rule, like a ruled card */
  content: ""; position: absolute; left: 14px; right: 52px; bottom: 9px; height: 1px;
  background: var(--hairline);
}
#feeling {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: 0;
  font-family: var(--serif); font-size: 17px; font-style: italic;
  color: var(--ink); padding: 13px 6px 13px 16px;
}
#feeling::placeholder { color: var(--ink-faint); font-style: italic; }
#sound-btn {
  flex: 0 0 auto; width: 46px; height: 46px; margin: 0 3px;
  display: grid; place-items: center;
  background: none; border: 0; color: var(--ink-2);
  transition: color .25s ease, transform .25s ease;
}
#sound-btn:hover { color: var(--red); transform: translateY(1px); }

/* ── chart controls, lower-right ─────────────────────────────────────────── */
.controls {
  position: fixed; right: 26px; bottom: 30px; z-index: 20;
  display: flex; flex-direction: column; gap: 8px;
}
.controls button {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 25%, rgba(241,231,205,.96), rgba(220,205,172,.92));
  border: 1px solid var(--line);
  color: var(--ink-2); font-size: 17px; line-height: 1;
  box-shadow: 0 6px 18px -10px rgba(34,26,15,.6), inset 0 1px 0 rgba(255,250,235,.55);
  transition: transform .18s ease, color .2s ease, border-color .2s ease;
}
.controls button:hover { transform: translateY(-1px); color: var(--ink); border-color: var(--ink-3); }
.controls button:active { transform: translateY(0); }
.controls button.on { color: var(--red); border-color: var(--red-soft); }
.controls button svg { display: block; }

/* ── currents: menu + drift player ───────────────────────────────────────── */
@keyframes menuIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.currents-menu {
  position: fixed; right: 26px; bottom: 82px; z-index: 25;
  width: min(332px, calc(100vw - 52px)); max-height: 62vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(243,234,214,.98), rgba(231,218,190,.97));
  border: 1px solid var(--line); border-radius: 3px;
  box-shadow: var(--shadow); backdrop-filter: blur(3px);
  padding: 16px 6px 8px; animation: menuIn .28s cubic-bezier(.22,.61,.36,1);
}
.cm-head {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 16px 11px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px;
}
.cm-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 16px; border-radius: 2px; transition: background .18s; }
.cm-item:hover { background: rgba(34,26,15,.05); }
.cm-name { font-size: 16.5px; color: var(--ink); font-style: italic; }
.cm-theme { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.42; margin-top: 2px; }

.current-player {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 26;
  width: min(560px, calc(100vw - 36px));
  background: linear-gradient(180deg, rgba(244,235,215,.97), rgba(230,217,188,.96));
  border: 1px solid var(--line); border-radius: 3px;
  box-shadow: var(--shadow); backdrop-filter: blur(3px);
  padding: 9px 12px; display: flex; align-items: center; gap: 12px;
  animation: menuIn .3s ease;
}
.cp-title { flex: 0 1 auto; min-width: 0; }
.cp-name { font-style: italic; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 200px; }
.cp-step { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.cp-dots { flex: 1 1 auto; display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.cp-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink-3); background: none; padding: 0; transition: background .2s, transform .2s, border-color .2s; }
.cp-dot.past { background: var(--ink-3); }
.cp-dot.on { background: var(--red); border-color: var(--red); transform: scale(1.3); }
.cp-nav { display: flex; gap: 6px; flex: 0 0 auto; }
.cp-nav button, .cp-close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink-2); font-size: 15px; line-height: 1; }
.cp-nav button:hover, .cp-close:hover { color: var(--ink); border-color: var(--ink-3); }
.cp-nav button:disabled { opacity: .32; cursor: default; }
.cp-close { color: var(--ink-3); font-size: 17px; flex: 0 0 auto; }

/* ── field-note drawer, right ────────────────────────────────────────────── */
.drawer {
  position: fixed; top: 0; right: 0; z-index: 30;
  width: min(390px, 92vw); height: 100%;
  background:
    linear-gradient(180deg, rgba(243,234,214,.97), rgba(232,219,191,.97));
  border-left: 1px solid var(--line);
  box-shadow: -28px 0 60px -30px rgba(34,26,15,.6);
  padding: 78px 34px 40px;
  overflow-y: auto; overflow-x: hidden;
  transform: translateX(100%);
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
  backdrop-filter: blur(2px);
}
.drawer.open { transform: translateX(0); }
.drawer::-webkit-scrollbar { width: 8px; }
.drawer::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 8px; }

.drawer-close {
  position: absolute; top: 22px; right: 24px;
  width: 34px; height: 34px; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--ink-3);
  font-size: 18px; line-height: 1; display: grid; place-items: center;
  transition: color .2s, border-color .2s;
}
.drawer-close:hover { color: var(--ink); border-color: var(--ink-3); }

.fn-kind {
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}
.fn-kind.unnamed { color: var(--red); }
.fn-word {
  font-size: 38px; line-height: 1.04; font-weight: 400; margin: 0 0 2px;
  font-feature-settings: "onum" 1, "liga" 1;
}
.fn-word.unnamed { color: var(--red); font-style: italic; }
.fn-script {
  font-size: 23px; color: var(--ink-2); margin: 2px 0 0; font-weight: 400;
}
.fn-say {
  font-style: italic; color: var(--ink-3); font-size: 15px; margin: 8px 0 0;
}
.fn-say .lang { font-style: normal; }
.fn-say .lang::before { content: "· "; }
.fn-rule { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.fn-gloss {
  font-size: 19px; font-style: italic; line-height: 1.4; color: var(--ink);
  margin: 0 0 16px;
}
.fn-desc { font-size: 16px; line-height: 1.62; color: var(--ink-2); margin: 0 0 8px; }
.fn-literal {
  font-size: 14px; color: var(--ink-3); margin: 12px 0 0;
}
.fn-literal .lab { font-variant: small-caps; letter-spacing: .12em; }

/* coordinate readout - like a chart's lat/long corner */
.fn-coords {
  margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}
.fn-coords .lab { display: block; letter-spacing: .1em; text-transform: uppercase; font-size: 9.5px; margin-bottom: 4px; color: var(--ink-faint); }
.fn-coords .val { color: var(--ink-2); font-size: 14px; }

/* the bordering words, for an unnamed sounding */
.fn-borders { margin: 24px 0 0; }
.fn-borders > .lab {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); display: block; margin-bottom: 12px;
}
.border {
  margin: 0 0 14px; padding-left: 16px; position: relative;
  border-left: 1px solid var(--red-soft);
}
.border .bw { font-style: italic; font-size: 16px; color: var(--ink); }
.border .bl { font-size: 12.5px; color: var(--ink-3); }
.border .bl::before { content: " - "; }
.border .bp { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 3px; }

/* the feelings nearest a sounding - clickable cards, each with its meaning */
.fn-near { margin: 24px 0 0; }
.fn-near > .lab {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); display: block; margin-bottom: 12px;
}
.near {
  display: block; width: 100%; text-align: left; cursor: pointer;
  margin: 0 0 9px; padding: 9px 12px 10px 14px; position: relative;
  background: none; border: 1px solid var(--line); border-left: 2px solid var(--ink-3);
  border-radius: 2px; transition: border-color .18s, background-color .18s, transform .18s;
}
.near:hover { background: var(--paper-hi); border-left-color: var(--gold); transform: translateX(2px); }
.near.unnamed { border-left-color: var(--red-soft); }
.near.unnamed:hover { border-left-color: var(--red); }
.near-head { display: flex; align-items: baseline; gap: 8px; }
.near .nw { font-style: italic; font-size: 16px; color: var(--ink); }
.near.unnamed .nw { color: var(--red); }
.near .nl { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.near .nd { display: block; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin-top: 4px; }

/* an honesty / caveat note */
.fn-note {
  margin: 22px 0 0; padding: 13px 15px;
  background: var(--red-wash); border: 1px solid rgba(156,58,32,.22);
  border-radius: 2px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
}
.fn-note .lab { font-variant: small-caps; letter-spacing: .12em; color: var(--red); margin-right: 6px; }

.fn-confidence {
  margin-top: 20px; font-size: 12px; color: var(--ink-faint); font-style: italic;
}

/* the small button to read its location on the map */
.fn-locate {
  margin-top: 26px; width: 100%; padding: 12px;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink-2); font-size: 13px; letter-spacing: .08em;
  font-variant: small-caps;
  transition: border-color .2s, color .2s;
}
.fn-locate:hover { border-color: var(--ink-3); color: var(--ink); }

/* copy-a-permalink button */
.fn-share {
  margin-top: 26px; width: 100%; padding: 11px 12px;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink-3); font-size: 12px; letter-spacing: .14em;
  font-variant: small-caps; text-transform: lowercase;
  transition: border-color .2s, color .2s, background .2s;
}
.fn-share:hover { border-color: var(--ink-3); color: var(--ink); background: rgba(34,26,15,.03); }

/* ── about / colophon ────────────────────────────────────────────────────── */
.about {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(40,30,16,.34);
  backdrop-filter: blur(6px);
  animation: fade .5s ease;
}
.about-sheet {
  position: relative;
  width: min(660px, calc(100vw - 40px)); max-height: min(86vh, 760px);
  overflow-y: auto;
  background:
    radial-gradient(140% 120% at 15% 0%, var(--paper-hi), var(--paper)) ,
    var(--paper);
  border: 1px solid var(--paper-edge);
  box-shadow: var(--shadow);
  padding: 54px 56px 46px;
}
.about-close {
  position: absolute; top: 18px; right: 20px;
  width: 34px; height: 34px; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--ink-3);
  font-size: 20px; line-height: 1;
}
.about-close:hover { color: var(--ink); }
.about-body h1 {
  font-size: 30px; font-weight: 400; font-style: italic; margin: 0 0 6px;
  letter-spacing: .01em;
}
.about-lede {
  font-size: 18px; line-height: 1.5; color: var(--ink-2); font-style: italic;
  margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--hairline);
}
.about-body h2 {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 400; margin: 30px 0 10px;
}
.about-body p { font-size: 15.5px; line-height: 1.72; color: var(--ink-2); margin: 0 0 15px; }
.about-body em { font-style: italic; color: var(--ink); }
.ink-red { color: var(--red); }
.about-colophon {
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--hairline);
  font-style: italic; color: var(--ink-3); font-size: 14.5px; line-height: 1.7;
}

/* ── first-touch hint ────────────────────────────────────────────────────── */
.hint {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
  z-index: 15; pointer-events: none; text-align: center;
  display: flex; flex-direction: column; gap: 5px; align-items: center;
  max-width: min(92vw, 720px);
  transition: opacity .8s ease;
}
.hint.gone { opacity: 0; }
.hint-key { font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em;
  text-shadow: 0 0 10px rgba(231,216,184,.95), 0 0 4px rgba(231,216,184,.95); }
.hint-key svg { vertical-align: -2px; margin: 0 2px 0 1px; }
.hint-do { font-size: 12px; font-style: italic; color: var(--ink-faint); letter-spacing: .03em;
  text-shadow: 0 0 10px rgba(231,216,184,.95), 0 0 4px rgba(231,216,184,.95); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── the overture (first-run introduction) ───────────────────────────────────
   A show-don't-tell front door: four airy beats, each anchored to one real
   feeling, narrated over a living thumbnail of the actual chart. */
.overture {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0;
  padding: 30px 24px;
  background:
    radial-gradient(130% 110% at 50% 8%, var(--paper-hi), var(--paper) 58%, var(--paper-lo)) ,
    var(--paper);
  opacity: 0; transition: opacity .7s ease;
  overflow-y: auto;
}
.overture.ov-show { opacity: 1; }
.overture.ov-leaving { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
body.overture-on #hint { opacity: 0 !important; }

.ov-skip {
  position: fixed; top: 22px; right: 26px; z-index: 2;
  background: none; border: 0; color: var(--ink-3);
  font-size: 12.5px; letter-spacing: .12em; font-variant: small-caps;
  padding: 6px 4px; transition: color .2s ease;
}
.ov-skip:hover { color: var(--ink); }

.ov-mark {
  font-size: 13px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 4px; text-align: center;
}
.ov-mark em { font-style: italic; text-transform: none; letter-spacing: .04em; color: var(--ink-2); }
.ov-eyebrow { display: none; } /* step is shown in the pips; reserved hook */

.ov-stage {
  display: flex; flex-direction: column; align-items: center;
  width: min(620px, 100%); margin: 22px 0 26px;
}

/* the changing caption */
.ov-text { text-align: center; width: 100%; }
.ov-text.ov-in { animation: ovTextIn .6s cubic-bezier(.22,.61,.36,1); }
@keyframes ovTextIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ov-lead { font-size: 25px; line-height: 1.34; font-style: italic; color: var(--ink); margin: 0 0 26px; }
.ov-h { font-size: 27px; line-height: 1.26; font-weight: 400; font-style: italic; color: var(--ink); margin: 0 0 16px; letter-spacing: .005em; }
.ov-body { font-size: 16.5px; line-height: 1.7; color: var(--ink-2); margin: 0 auto; max-width: 30em; }
.ov-body em { font-style: italic; color: var(--ink); }
.ov-sub { font-size: 14.5px; line-height: 1.62; color: var(--ink-3); font-style: italic; margin: 18px auto 0; max-width: 30em; }
.ov-red { color: var(--red); }

.ov-quote { margin: 0 0 24px; }
.ov-quote blockquote {
  margin: 0; font-size: 20px; line-height: 1.5; font-style: italic; color: var(--ink-2);
  max-width: 26em; margin-inline: auto;
}
.ov-quote figcaption { margin-top: 14px; }
.ov-quote .ov-w { font-size: 26px; font-style: italic; color: var(--ink); }
.ov-quote .ov-l { font-size: 13px; letter-spacing: .14em; font-variant: small-caps; color: var(--ink-3); margin-left: 12px; }
.ov-redquote { color: var(--ink-2); }
.ov-redquote .ov-w { color: var(--red); font-style: italic; font-size: 16px; }

/* the living thumbnail of the chart */
.ov-chart {
  width: min(330px, 78vw); margin-top: 26px;
  transition: opacity .6s ease, max-height .6s ease, margin-top .5s ease;
  overflow: visible;
}
.ov-chart.reveal-hidden { opacity: 0; max-height: 0; margin-top: 0; pointer-events: none; }
.ov-svg { width: 100%; height: auto; display: block; overflow: visible; }

/* frame: disc, ring, axes, rim labels */
.ov-disc { fill: rgba(168,194,186,.16); }
.ov-ring { fill: none; stroke: rgba(34,26,15,.30); stroke-width: 1; }
.ov-axis { stroke: rgba(34,26,15,.14); stroke-width: 1; }
.ov-rim {
  fill: var(--ink-3); font-family: var(--serif); font-size: 9px;
  font-variant: small-caps; letter-spacing: .14em;
  text-anchor: middle; dominant-baseline: middle;
}
.ov-frame, .ov-rim { opacity: 0; transition: opacity .55s ease; }
.reveal-named .ov-frame, .reveal-unnamed .ov-frame, .reveal-you .ov-frame,
.reveal-named .ov-rim, .reveal-unnamed .ov-rim, .reveal-you .ov-rim { opacity: 1; }

/* named dots - settle in with a tiny stagger */
.ov-dot { opacity: 0; transform-box: fill-box; transform-origin: center; }
.reveal-named .ov-dot, .reveal-unnamed .ov-dot, .reveal-you .ov-dot {
  animation: ovDotIn .5s ease forwards; animation-delay: var(--d, 0ms);
}
@keyframes ovDotIn { from { opacity: 0; transform: scale(.2); } to { opacity: .9; transform: scale(1); } }

/* named labels */
.ov-lab { fill: var(--ink); font-family: var(--serif); font-size: 9.5px; font-style: italic; opacity: 0; transition: opacity .5s ease .25s; }
.ov-lab-hi { fill: var(--ink); font-size: 11px; }
.ov-lab-red { fill: var(--red); }
.reveal-named .ov-lab:not(.ov-lab-red), .reveal-unnamed .ov-lab:not(.ov-lab-red), .reveal-you .ov-lab:not(.ov-lab-red) { opacity: .92; }
.reveal-unnamed .ov-lab-red, .reveal-you .ov-lab-red { opacity: 1; }
.ov-hi { fill: none; stroke: var(--gold); stroke-width: 1.4; opacity: 0; }
.reveal-named .ov-hi { opacity: 1; animation: ovPulse 2.4s ease-in-out infinite; }
@keyframes ovPulse { 0%,100% { opacity: .35; r: 6.5; } 50% { opacity: .9; r: 8; } }

/* unnamed soundings - vermilion, bloom on the third beat */
.ov-sound { opacity: 0; }
.reveal-unnamed .ov-sound, .reveal-you .ov-sound { animation: ovSoundIn .55s ease forwards; animation-delay: var(--d, 0ms); }
@keyframes ovSoundIn { from { opacity: 0; } to { opacity: 1; } }
.ov-sound-halo { fill: none; stroke: var(--red); stroke-width: 1; stroke-dasharray: 1.5 2.5; }
.ov-sound-cross { stroke: var(--red); stroke-width: 1.2; }

/* "you are here" plumb - drops on the final beat */
.ov-you { opacity: 0; }
.reveal-you .ov-you { animation: ovYouIn .7s cubic-bezier(.22,.61,.36,1) forwards .15s; }
@keyframes ovYouIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ov-you-line { stroke: var(--red); stroke-width: 1.6; }
.ov-you-dot { fill: var(--red); }
.ov-you-t { fill: var(--red); font-family: var(--serif); font-size: 9.5px; font-style: italic; }

/* the final-beat doors */
.ov-doors { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.ov-door {
  padding: 12px 22px; border: 1px solid var(--line); border-radius: 2px;
  background: linear-gradient(180deg, rgba(241,231,205,.9), rgba(225,210,180,.85));
  color: var(--ink-2); font-size: 14.5px; font-style: italic;
  box-shadow: inset 0 1px 0 rgba(255,250,235,.5);
  transition: border-color .2s, color .2s, transform .18s, background .2s;
}
.ov-door:hover { border-color: var(--ink-3); color: var(--ink); transform: translateY(-1px); }
.ov-door-red { color: var(--red); border-color: rgba(156,58,32,.4); }
.ov-door-red:hover { color: var(--red); border-color: var(--red); background: var(--red-wash); }

/* navigation: back · pips · next */
.ov-nav { display: flex; align-items: center; gap: 22px; }
.ov-btn { background: none; border: 0; color: var(--ink-3); font-size: 14px; font-style: italic; padding: 8px 6px; transition: color .2s; }
.ov-btn:hover { color: var(--ink); }
.ov-pips { display: flex; gap: 9px; align-items: center; }
.ov-pip { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink-3); background: none; padding: 0; transition: background .25s, transform .25s, border-color .25s; }
.ov-pip.on { background: var(--red); border-color: var(--red); transform: scale(1.25); }

.ov-replay {
  margin-top: 26px; background: none; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink-3); font-size: 12px; letter-spacing: .14em; font-variant: small-caps;
  text-transform: lowercase; padding: 9px 16px; transition: border-color .2s, color .2s;
}
.ov-replay:hover { border-color: var(--ink-3); color: var(--ink); }

@media (max-width: 560px) {
  .ov-lead { font-size: 21px; }
  .ov-h { font-size: 22px; }
  .ov-body { font-size: 15.5px; }
  .ov-quote blockquote { font-size: 17.5px; }
  .ov-quote .ov-w { font-size: 22px; }
  .ov-chart { width: min(300px, 82vw); }
  .ov-nav { gap: 16px; }
  .ov-doors { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* a touch of responsiveness for narrow screens */
@media (max-width: 560px) {
  .wordmark { top: 18px; left: 18px; }
  .wordmark-em { font-size: 21px; }
  .sounding { bottom: 18px; width: calc(100vw - 28px); }
  .sounding-label { display: none; }            /* the placeholder already says it */
  #feeling { font-size: 16px; padding: 12px 6px 12px 14px; }  /* 16px avoids iOS zoom-on-focus */
  .controls { right: 12px; bottom: 78px; gap: 10px; }
  .controls button { width: 42px; height: 42px; }  /* larger touch targets */
  .hint { bottom: 116px; gap: 3px; }
  .hint-key, .hint-do { font-size: 11px; line-height: 1.4; }
  .about-sheet { padding: 46px 22px 34px; }
  .about-body h1 { font-size: 25px; }
  .about-lede { font-size: 16px; }
  .drawer { width: 100vw; padding: 64px 22px 36px; }
  .fn-word { font-size: 32px; }
  .currents-menu { right: 12px; bottom: 78px; width: calc(100vw - 24px); }
  .current-player { top: 12px; width: calc(100vw - 20px); gap: 8px; padding: 8px 10px; }
  .cp-name { max-width: 110px; font-size: 13px; }
  .cp-dots { gap: 4px; }
  .cp-nav button, .cp-close { width: 32px; height: 32px; }
}
