@font-face {
  font-family: "Roboto Slab";
  src: url("assets/fonts/roboto-slab.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kaushan Script";
  src: url("assets/fonts/kaushan.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #160707;
  --night-2: #210b0b;
  --bar: #0e0404;
  --cream: #fbf1dc;
  --cream-dim: rgba(251, 241, 220, 0.66);
  --gold: #f5c451;
  --gold-deep: #c98d22;
  --red: #e01f3d;
  --red-bright: #ff4a63;
  --red-deep: #8f0f22;
  --display: "Roboto Slab", Rockwell, Georgia, serif;
  --script: "Kaushan Script", "Brush Script MT", cursive;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.55;
}

button, input { font: inherit; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

/* ───────────── Stage ───────────── */

.stage {
  position: relative;
  isolation: isolate;
  height: 100vh;
  height: 100svh;
  min-height: 30rem;
  overflow: hidden;
  background: linear-gradient(180deg, #0f0404 0%, var(--night) 35%, #1d0909 100%);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  user-select: none;
  -webkit-user-select: none;
}

.stage::after {
  /* the refrain warms the room */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(150, 18, 36, 0.38) 100%);
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.stage.is-refrain::after { opacity: 1; }

.fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.topbar {
  position: absolute;
  z-index: 5;
  top: max(0.8rem, env(safe-area-inset-top));
  right: max(0.8rem, env(safe-area-inset-right));
  left: max(1rem, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }


.icon-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(251, 241, 220, 0.2);
  border-radius: 8px;
  background: var(--bar);
  color: var(--cream);
  cursor: pointer;
}
.icon-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ───────────── Lyric rail ───────────── */

.rail-wrap {
  position: relative;
  z-index: 3;
  overflow: hidden;
  transition: opacity 0.8s ease 0.2s;
  -webkit-mask-image: linear-gradient(to bottom, transparent 8%, #000 30%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent 8%, #000 30%, #000 78%, transparent);
}
.stage[data-state="intro"] .rail-wrap { opacity: 0; }

.rail {
  list-style: none;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left));
  max-width: 64rem;
  text-align: center;
  will-change: transform;
  transition: transform 0.85s var(--ease-out);
}
.rail.no-anim, .rail.no-anim * { transition: none !important; }

.r-line {
  --size: clamp(1.9rem, 7.4vw, 4.4rem);
  margin: 0;
  padding: 0.16em 0;
  font-weight: 800;
  font-size: var(--size);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--cream);
  opacity: 0.26;
  transform: scale(0.74);
  transition: opacity 0.5s ease, transform 0.75s var(--ease-out), line-height 0.4s ease, padding 0.4s ease;
  text-wrap: balance;
  cursor: pointer;
}
.r-line.stanza { margin-top: 0.9em; }
.r-line.is-near { opacity: 0.45; }
.r-line.is-past { opacity: 0.16; }
.r-line.is-active { opacity: 1; transform: scale(1); line-height: 2.05; padding-top: 0.35em; }

.r-line .w {
  display: inline-block;
  --p: 0%;
  color: transparent;
  background-image: linear-gradient(90deg, var(--gold) var(--p), var(--cream) var(--p));
  -webkit-background-clip: text;
  background-clip: text;
  transition: transform 0.3s var(--ease-spring);
  white-space: pre;
}
.r-line:not(.is-active) .w { --p: 0% !important; }
.r-line.is-past .w { --p: 100% !important; }
.r-line.is-active .w.on { transform: translateY(-0.07em); }

.r-line.refrain {
  font-size: calc(var(--size) * 1.14);
  font-family: var(--script);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
}
.r-line.refrain.is-active { line-height: 1.95; }
.r-line.refrain .w { background-image: linear-gradient(90deg, var(--red-bright) var(--p), var(--cream) var(--p)); }
.r-line.refrain .w:not(.oh) { background-image: linear-gradient(90deg, var(--gold) var(--p), var(--cream) var(--p)); }
.r-line.refrain.is-active .w.oh.on { transform: translateY(-0.12em) rotate(-5deg) scale(1.12); }

.r-line.enter .w { animation: wordIn 0.6s var(--ease-out) backwards; animation-delay: calc(var(--i) * 40ms); }
@keyframes wordIn { from { opacity: 0.3; transform: translateY(0.3em); } to { opacity: 1; transform: none; } }

.r-break {
  padding: 0.8em 0;
  font-family: var(--script);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
  color: var(--cream);
  opacity: 0.25;
  transform: scale(0.8);
  transition: opacity 0.5s ease, transform 0.75s var(--ease-out);
}
.r-break.is-active { opacity: 1; transform: scale(1); }

/* the bull that hops from word to word */
.bull {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: clamp(40px, 4.4vw, 62px);
  height: auto;
  pointer-events: none;
  opacity: 0;
  transform-origin: 50% 100%;
  transition: opacity 0.4s ease;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.45));
  will-change: transform;
}
.stage:not([data-state="intro"]) .bull.is-on { opacity: 1; }
.r-break small {
  display: block;
  margin-top: 0.5em;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.3em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.count { display: flex; justify-content: center; gap: 0.9rem; margin-top: 0.6em; height: 1.4rem; opacity: 0; transition: opacity 0.3s ease; }
.r-break.is-active.counting .count { opacity: 1; }
.count i {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid var(--gold-deep);
  transition: background 0.12s ease, transform 0.3s var(--ease-spring);
}
.count i.lit { background: var(--gold); border-color: var(--gold); transform: scale(1.3); }

/* ───────────── Cover ───────────── */

.cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 6rem 1.25rem 2.5rem;
  text-align: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.stage:not([data-state="intro"]) .cover { opacity: 0; visibility: hidden; pointer-events: none; }

.cover-text { display: flex; flex-direction: column; align-items: center; max-width: 46rem; }

.emblem {
  margin: 0 0 0.4rem;
  line-height: 0;
  animation: emblemIn 1s var(--ease-spring) 1.1s both;
}
.emblem img {
  display: block;
  width: min(86vw, 33rem, 52vh * 1.27);
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 58% 56% at 50% 50%, #000 66%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 56% at 50% 50%, #000 66%, transparent 100%);
  animation: sway 6s ease-in-out 2.2s infinite;
  transform-origin: 50% 90%;
}

.ribbon {
  margin: 0.3rem 0 1.8rem;
  padding: 0.7rem 3rem;
  background: #b0122c;
  color: var(--gold);
  font-weight: 800;
  font-size: clamp(1rem, 3.2vw, 1.45rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 1.2rem) 50%, 100% 100%, 0 100%, 1.2rem 50%);
  animation: unroll 0.7s var(--ease-out) 1.7s both;
}

.cover-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; animation: fadeUp 0.6s var(--ease-out) 2.1s both; }

.start {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 6px;
  padding: 0.9rem 1.5rem;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--red-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.start svg { width: 1rem; height: 1rem; fill: currentColor; }
.start:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--red-deep); }
.start:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-deep); }
.start.ghost { background: var(--cream); color: var(--night); box-shadow: 0 4px 0 #b9a888; }
.start.ghost:hover { box-shadow: 0 6px 0 #b9a888; }
.start.ghost:active { box-shadow: 0 1px 0 #b9a888; }

/* ───────────── Dock ───────────── */

.dock {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem max(1rem, env(safe-area-inset-right)) max(0.7rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--bar);
  border-top: 1px solid rgba(251, 241, 220, 0.1);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out);
}
.stage[data-state="intro"] .dock { opacity: 0; transform: translateY(100%); pointer-events: none; }
.stage.idle .dock { opacity: 0.35; }

.play {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring);
}
.play:active { transform: scale(0.92); }
.play svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.play .i-pause { display: none; }
.stage.playing .play .i-pause { display: block; }
.stage.playing .play .i-play { display: none; }

.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; font-size: 0.85rem; margin-bottom: 0.25rem; }
.section-now { font-family: var(--script); font-size: 1.05rem; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { color: var(--cream-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }

.track { position: relative; height: 1.1rem; }
.segments, .fill { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; pointer-events: none; }
.segments { display: flex; gap: 2px; }
.segments span { height: 100%; border-radius: 2px; background: rgba(251, 241, 220, 0.18); }
.segments span.refrain { background: rgba(224, 31, 61, 0.55); }
.segments span.inst { background: rgba(251, 241, 220, 0.08); }
.fill { right: auto; width: 0; background: var(--gold); }
.track .seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

.voice { display: grid; gap: 0.2rem; width: 9.5rem; cursor: pointer; }
.voice-label { display: flex; gap: 0.5rem; justify-content: space-between; font-size: 0.85rem; color: var(--cream-dim); }
.voice-val { color: var(--cream); font-variant-numeric: tabular-nums; }
.voice-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.1rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.voice-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--cream) var(--v, 100%), rgba(251, 241, 220, 0.18) var(--v, 100%)); }
.voice-range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(251, 241, 220, 0.18); }
.voice-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--cream); }
.voice-range::-webkit-slider-thumb { -webkit-appearance: none; width: 1.05rem; height: 1.05rem; margin-top: -0.4rem; border-radius: 50%; background: var(--gold); border: 0; }
.voice-range::-moz-range-thumb { width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--gold); border: 0; }

.status { position: absolute; z-index: 7; left: 50%; bottom: 6rem; transform: translateX(-50%); margin: 0; color: var(--gold); text-align: center; }

.stage :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ───────────── Page below ───────────── */

h2 {
  margin: 2.6rem 0 0.4rem;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  line-height: 1;
  color: var(--red-bright);
}
.lede { margin: 0 0 1.6rem; color: var(--cream-dim); }
.sheet { padding-bottom: 2.5rem; }

.verses { display: grid; gap: 1.4rem 3rem; }
@media (min-width: 820px) { .verses { grid-template-columns: 1fr 1fr; } }

.verse ol { list-style: none; margin: 0; padding: 0; }
.verse button {
  display: block;
  width: 100%;
  margin-left: -0.5rem;
  padding: 0.2rem 0.5rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
}
.verse button.refrain { font-weight: 700; color: #ff8a9a; }
.verse button:hover { color: var(--gold); }
.verse button.is-on { background: rgba(224, 31, 61, 0.24); color: var(--gold); }

/* ── "O dia": a full-screen map story; scenes scroll over a sticky map ── */
.day { position: relative; border-top: 1px solid rgba(251, 241, 220, 0.12); }

.story-map { position: sticky; top: 0; z-index: 0; height: 100vh; height: 100svh; }
.map-box { position: absolute; inset: 0; background: #1a0909; }
.map-box.no-map .mapa { display: none; }
.mapa { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-box .maplibregl-map { position: absolute; }
.map-box .maplibregl-ctrl-bottom-right { bottom: auto; top: 3.6rem; }

.story-bar {
  position: absolute;
  z-index: 3;
  top: max(0.8rem, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border-radius: 999px;
  background: var(--bar);
  border: 1px solid rgba(251, 241, 220, 0.12);
  transform: translateX(-50%);
  max-width: calc(100% - 1.5rem);
  overflow-x: auto;
  scrollbar-width: none;
}
.story-bar button {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: transparent;
  color: rgba(251, 241, 220, 0.4);
  font-weight: 700;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease;
}
.story-bar button.is-past { color: var(--cream); }
.story-bar button.is-now { background: var(--gold); color: var(--night); }

.story { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.scene {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 5rem max(1rem, 5vw) 3rem;
}
.panel {
  position: relative;
  width: min(27rem, 100%);
  padding: 1.3rem 1.4rem 1.2rem;
  border: 1px solid rgba(251, 241, 220, 0.12);
  border-radius: 12px;
  background: rgba(22, 7, 7, 0.94);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  opacity: 0.25;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.6s ease, transform 0.7s var(--ease-out), border-color 0.4s ease;
}
.scene.is-now .panel { opacity: 1; transform: none; }
.ev.is-now .panel { border-color: color-mix(in srgb, var(--bulb) 60%, transparent); }

.scene-intro .panel, .scene-end .panel { text-align: center; }
.scene-intro h2 { margin: 0 0 0.5rem; }
.scene-intro p { margin: 0; color: var(--cream-dim); }
.scroll-hint { margin-top: 0.8rem !important; font-size: 1.6rem; color: var(--gold) !important; animation: floatA 1.6s ease-in-out infinite; }
.end-big { margin: 0; font-family: var(--script); font-size: clamp(3rem, 9vw, 4.6rem); line-height: 1; color: var(--red-bright); }
.scene-end p { margin: 0.4rem 0 0; color: var(--cream-dim); }

.ev-when { display: flex; align-items: center; gap: 0.7rem; margin: 0; }
.badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--bulb);
  color: var(--night);
  font-weight: 800;
  font-size: 0.9rem;
}
.ev-time { display: inline-block; font-weight: 800; font-size: clamp(2rem, 5.6vw, 2.7rem); line-height: 1; letter-spacing: -0.02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.ev.is-now .ev-time { animation: stamp 0.6s var(--ease-spring) 0.15s both; }
.panel h3 { margin: 0.4rem 0 0.3rem; font-family: var(--script); font-weight: 400; font-size: clamp(1.55rem, 4.2vw, 1.95rem); line-height: 1.15; color: var(--red-bright); }
.panel h3 em { font-style: normal; color: var(--cream); }
.ev .panel > p:not(.ev-when):not(.ev-meta):not(.next) { margin: 0; color: var(--cream-dim); }
.ev-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0.8rem 0 0; font-size: 0.85rem; }
.ev-meta .walk { color: var(--cream-dim); }
.ev-meta .walk::before { content: "→ "; color: var(--gold); }
.ev-meta a { color: var(--gold); font-weight: 700; text-underline-offset: 3px; }
.ev-meta a:hover { color: var(--cream); }
.next { margin: 0.9rem 0 0; padding-top: 0.7rem; border-top: 1px dashed rgba(251, 241, 220, 0.15); font-size: 0.85rem; color: var(--cream-dim); }
.next b { color: var(--gold); margin: 0 0.25rem; }

.ev-icon { position: absolute; top: 1rem; right: 1rem; width: 3rem; height: 3rem; overflow: visible; }
.ev.is-now .notes .n1 { animation: floatA 2.2s ease-in-out infinite; }
.ev.is-now .notes .n2 { animation: floatA 2.2s ease-in-out 1.1s infinite; }

/* map markers */
.stop-pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #2a2a2a;
  border-radius: 50%;
  background: #3a2a26;
  color: var(--night);
  font: 800 0.8rem/1 var(--display);
  transition: background 0.3s ease, transform 0.4s var(--ease-spring), box-shadow 0.5s ease;
}
.stop-pin.is-lit { background: var(--pin); box-shadow: 0 0 18px 4px color-mix(in srgb, var(--pin) 60%, transparent); }
.stop-pin.is-lit { z-index: 1; }
.stop-pin.is-now { z-index: 2; }
.walker-pin, .santa-pin { z-index: 3; }
/* the chase: Pais Natais running from the bull */
.walker-pin { width: 46px; pointer-events: none; }
.santa-pin { width: 30px; pointer-events: none; }
.walker-pin .bob, .santa-pin .bob { display: block; }
.fig {
  display: block;
  width: 100%;
  height: auto;
  transform: translate(var(--ox, 0px), var(--oy, 0px)) scaleX(var(--fx, 1));
  transition: transform 0.35s ease;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.6));
}
.santa-pin .bob { animation: pant 0.9s ease-in-out var(--d, 0s) infinite alternate; }
.is-running .santa-pin .bob { animation: run 0.26s ease-in-out var(--d, 0s) infinite alternate; }
.is-running .walker-pin .bob { animation: gallop 0.3s ease-in-out infinite alternate; }
@keyframes run { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-6px) rotate(5deg); } }
@keyframes gallop { from { transform: translateY(0) rotate(3deg); } to { transform: translateY(-4px) rotate(-4deg); } }
@keyframes pant { from { transform: translateY(0); } to { transform: translateY(-2px); } }

.plan-link { margin-top: 1.1rem; color: var(--cream-dim); font-size: 0.95rem; font-weight: 700; text-decoration: none; animation: fadeUp 0.6s var(--ease-out) 2.4s both; }
.plan-link:hover { color: var(--gold); }

@keyframes floatA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 760px) {
  .scene { align-items: flex-end; padding: 4.5rem 0.75rem max(1rem, env(safe-area-inset-bottom)); }
  .scene-intro, .scene-end { align-items: center; }
  .panel { width: 100%; padding: 1rem 1.1rem; }
  .ev-time { font-size: 2rem; }
  .story-bar button { padding: 0.3rem 0.5rem; font-size: 0.78rem; }
}

.foot { padding: 1rem 0 3rem; color: var(--cream-dim); border-top: 1px solid rgba(251, 241, 220, 0.12); }

.tuner {
  position: fixed;
  z-index: 20;
  right: 1rem;
  bottom: 7rem;
  width: min(22rem, calc(100% - 2rem));
  padding: 1rem;
  border-radius: 8px;
  background: var(--cream);
  color: var(--night);
  font-size: 0.95rem;
}
.tuner p { margin: 0 0 0.7rem; }
.tuner .tap { width: 100%; padding: 0.8rem; border: 0; border-radius: 6px; background: var(--red); color: #fff; cursor: pointer; }
.tuner textarea { width: 100%; margin-top: 0.7rem; font: 0.8rem/1.4 ui-monospace, monospace; }

/* ───────────── Keyframes ───────────── */

@keyframes emblemIn {
  0% { opacity: 0; transform: translateY(-60px) scale(0.7) rotate(-8deg); }
  60% { opacity: 1; transform: translateY(6px) scale(1.03) rotate(1.5deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg) translateY(-4px); } }
@keyframes stamp {
  0% { opacity: 0; transform: translateY(-0.5em) scale(1.7) rotate(-12deg); }
  60% { opacity: 1; transform: translateY(0.04em) scale(0.94) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes unroll { from { clip-path: polygon(50% 0, 50% 0, 50% 50%, 50% 100%, 50% 100%, 50% 50%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ───────────── Small screens ───────────── */

@media (max-width: 640px) {
  .ribbon { padding: 0.6rem 2.2rem; }
  .cover { padding-top: 5rem; }
  .dock {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "play time" "voice voice";
    gap: 0.5rem 0.8rem;
  }
  .play { grid-area: play; width: 2.8rem; height: 2.8rem; }
  .timeline { grid-area: time; }
  .voice { grid-area: voice; width: auto; grid-template-columns: auto 1fr; align-items: center; gap: 0.8rem; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .cover { padding-top: 3.5rem; }
  .r-line { --size: clamp(1.5rem, 7vh, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.15s !important; }
}
