@font-face{font-family:"Bodoni Moda";src:url(fonts/bodoni-moda.woff2) format("woff2");font-style:normal;font-weight:400 900;font-display:swap}
@font-face{font-family:"Bodoni Moda";src:url(fonts/bodoni-moda-italic.woff2) format("woff2");font-style:italic;font-weight:400 900;font-display:swap}
@font-face{font-family:"Pinyon Script";src:url(fonts/pinyon-script.woff2) format("woff2");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:"Jost";src:url(fonts/jost.woff2) format("woff2");font-style:normal;font-weight:100 900;font-display:swap}
/* Layout: one centred portrait stage that plays the story, then turns into a scrolling stationery card.
   On wide screens the sides show a Mallorcan "roba de llengües" ikat. Single, deliberate light theme. */
:root {
  --cream: #F9EFEE;
  --paper: #FFF9F8;
  --mares: #EDC4CC;        /* blush pink */
  --mares-deep: #E2AAB6;
  --terra: #B04569;        /* rose */
  --olive: #1F3D2E;        /* deep green */
  --blue: #2F5D8A;         /* Mediterranean blue */
  --ink: #1D2A23;
  --ink-soft: #5B6A61;
  --line: rgba(29, 42, 35, .14);
  --f-display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --f-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --f-ui: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --ikat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='92' viewBox='0 0 72 92'%3E%3Crect width='72' height='92' fill='%23F6E6E6'/%3E%3Cg id='f'%3E%3Cpath d='M18 10l7 14-3 2 8 20-8 20 3 2-7 14-7-14 3-2-8-20 8-20-3-2z' fill='%231F3D2E'/%3E%3Cpath d='M18 24l4 9-2 2 5 11-5 11 2 2-4 9-4-9 2-2-5-11 5-11-2-2z' fill='%23F6E6E6'/%3E%3Ccircle cx='18' cy='46' r='3' fill='%231F3D2E'/%3E%3C/g%3E%3Cpath d='M54 -36l7 14-3 2 8 20-8 20 3 2-7 14-7-14 3-2-8-20 8-20-3-2z' fill='%23D27896'/%3E%3Cpath d='M54 56l7 14-3 2 8 20-8 20 3 2-7 14-7-14 3-2-8-20 8-20-3-2z' fill='%23D27896'/%3E%3Cpath d='M54 -22l4 9-2 2 5 11-5 11 2 2-4 9-4-9 2-2-5-11 5-11-2-2zM54 70l4 9-2 2 5 11-5 11 2 2-4 9-4-9 2-2-5-11 5-11-2-2z' fill='%23F6E6E6'/%3E%3Ccircle cx='54' cy='0' r='3' fill='%23D27896'/%3E%3Ccircle cx='54' cy='92' r='3' fill='%23D27896'/%3E%3C/svg%3E");
  color-scheme: light;
}

[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

/* language switching */
#app[data-lang="en"] .es, #app[data-lang="es"] .en { display: none !important; }

#app {
  position: fixed; inset: 0;
  background: linear-gradient(rgba(249, 239, 238, .5), rgba(249, 239, 238, .5)), var(--ikat) center / 72px 92px, var(--cream);
}
.column {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: min(100%, 80vh); width: min(100%, 80dvh);
  transform: translateX(-50%);
  background: var(--cream);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(29,42,35,.08), 0 30px 80px rgba(29,42,35,.25);
}

/* ---------- top controls ---------- */
.lang {
  position: absolute; z-index: 60;
  top: calc(env(safe-area-inset-top, 0px) + 22px); right: 14px;
  display: flex; gap: 2px; padding: 3px;
  border-radius: 999px;
  background: rgba(251, 247, 239, .78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(29,42,35,.08);
}
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: .14em;
  padding: 6px 10px; border-radius: 999px; color: var(--ink-soft);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- cover / envelope (drag progress lives in --p, 0 closed to 1 open) ---------- */
#cover {
  --p: 0;
  position: absolute; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding-inline: 24px;
  padding-block: calc(env(safe-area-inset-top, 0px) + 56px) calc(env(safe-area-inset-bottom, 0px) + 40px);
  background:
    radial-gradient(120% 70% at 50% 45%, rgba(255,255,255,.55), transparent 70%),
    var(--cream);
  touch-action: none; -webkit-user-select: none; user-select: none;
  cursor: grab;
  transition: opacity .9s ease;
}
#cover.dragging { cursor: grabbing; }
#cover.gone { opacity: 0; pointer-events: none; }
.cover-top {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  opacity: calc(1 - var(--p) * 2.4);
  transform: translateY(calc(var(--p) * -28px));
}
.cover-greet { margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(22px, 6.4vw, 30px); color: var(--ink); text-wrap: balance; }
.cover-eyebrow { margin: 0; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--terra); }

.env {
  position: relative; width: min(84%, 360px); aspect-ratio: 3 / 2;
  margin-top: 84px; perspective: 1100px;
  filter: drop-shadow(0 18px 24px rgba(110, 50, 70, .22));
  border-radius: 8px; outline: none;
}
.env:focus-visible { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--terra); }
#cover:not(.touched) .env { animation: floaty 3.6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-7px); } }
.env-back { position: absolute; inset: 0; z-index: 0; background: var(--mares-deep); border-radius: 6px; overflow: hidden; }
.env-back::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60%;
  background: var(--ikat) center / 36px 46px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.env-letter {
  position: absolute; left: 6%; right: 6%; top: 5%; height: 92%; z-index: 1;
  transform: translateY(calc(max(var(--p) - .16, 0) * -88%));
}
.letter-face {
  position: relative; box-sizing: border-box; width: 100%; height: 100%;
  background: var(--paper); border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 10%; gap: 4px;
}
.letter-face::before {
  content: ""; position: absolute; left: 16%; right: 16%; top: 5%; bottom: 8%;
  border: 1px solid var(--terra); border-radius: 50% 50% 3px 3px / 58% 58% 3px 3px; opacity: .7;
}
.letter-face .sprig { width: 34%; height: auto; }
.letter-face .mono { font-family: var(--f-display); font-size: clamp(28px, 8.6vw, 40px); line-height: 1; }
.letter-face .mono i { color: var(--terra); }
.letter-face .lplace { font-family: var(--f-script); font-size: clamp(20px, 5.6vw, 26px); color: var(--terra); line-height: 1.1; }
.letter-face .ldate { font-size: 10px; letter-spacing: .3em; color: var(--ink-soft); }
.env-front {
  position: absolute; inset: 0; z-index: 2; border-radius: 6px;
  background:
    linear-gradient(to top right, rgba(150,60,90,.10), transparent 52%),
    linear-gradient(to top left, rgba(150,60,90,.10), transparent 52%),
    var(--mares);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 3;
  transform-origin: 50% 0; transform-style: preserve-3d;
  transform: rotateX(calc(min(var(--p) * 4.5, 1) * 180deg));
}
#cover.flap-up .env-flap { z-index: 0; }
.flap-face { position: absolute; inset: 0; transform-origin: 50% 0; }
.flap-face::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, #F3D2D8, #E8B6C1);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 6px 6px 0 0;
}
#cover:not(.touched) .flap-face { animation: flapHint 3.4s ease-in-out 1.2s infinite; }
@keyframes flapHint { 0%, 55%, 100% { transform: rotateX(0deg); } 68% { transform: rotateX(34deg); } 80% { transform: rotateX(6deg); } }
.env-seal {
  position: absolute; left: 50%; top: 100%; z-index: 4;
  width: 23%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) scale(calc(1 + var(--p) * 4));
  opacity: calc(1 - var(--p) * 10);
  background: radial-gradient(circle at 34% 30%, #3A6A52, #1F3D2E 62%, #16301F);
  box-shadow: 0 2px 0 rgba(0,0,0,.12), inset 0 -3px 6px rgba(0,0,0,.18);
  display: grid; place-items: center;
  font-family: var(--f-display); font-style: italic; color: #F8D7DF;
  font-size: clamp(14px, 4.6vw, 20px); letter-spacing: -.02em;
}
.env-seal::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px dashed rgba(248,215,223,.55); }

.swipe-hint {
  margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--terra);
  opacity: calc(1 - var(--p) * 3);
}
.swipe-hint .chev { width: 22px; height: 30px; fill: none; stroke: var(--terra); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: chevUp 1.7s ease-in-out infinite; }
@keyframes chevUp { 0% { transform: translateY(9px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-9px); opacity: 0; } }
.hint-mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .hint-mouse { display: inline; } .hint-touch { display: none; } }
#cover.nudge .swipe-hint > span { animation: nudge .6s ease; }
@keyframes nudge { 30% { transform: translateY(-5px); } 60% { transform: translateY(2px); } }

.cover-hint { margin: 14px 0 0; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); letter-spacing: .04em; opacity: calc(1 - var(--p) * 3); }
.cover-foot { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); left: 0; right: 0; margin: 0; font-size: 11px; letter-spacing: .34em; color: var(--ink-soft); }

#cover.opened .env-letter { transition: transform 1.15s cubic-bezier(.6,0,.2,1), opacity .7s ease .5s; transform: translateY(-34%) scale(2.6); opacity: 0; }
#cover.opened .env-back, #cover.opened .env-front, #cover.opened .env-flap { transition: opacity .45s ease; opacity: 0; }
#cover.opened .env { filter: none; }
#cover.opened .cover-top, #cover.opened .swipe-hint, #cover.opened .cover-hint, #cover.opened .cover-foot { transition: opacity .35s ease; opacity: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; text-decoration: none;
  padding: 15px 28px; border-radius: 999px;
  background: var(--olive); color: var(--paper);
  font-size: 14px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(31, 61, 46, .28);
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31, 61, 46, .34); }
.btn:active { transform: translateY(1px); }

/* ---------- story stage ---------- */
#stage { position: absolute; inset: 0; z-index: 20; background: var(--cream); --u: .6; cursor: pointer; }
#stage[hidden] { display: none; }
#art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene { display: none; }
.scene.on { display: inline; animation: sceneIn 1.3s cubic-bezier(.4,0,.2,1) both, sceneClock 600s linear both; }
@keyframes sceneIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sceneClock { from { visibility: inherit; } to { visibility: inherit; } }
#stage.paused *, #stage.paused *::before, #stage.paused *::after { animation-play-state: paused !important; }

.progress {
  position: absolute; z-index: 30; left: 14px; right: 14px;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  display: flex; gap: 4px; pointer-events: none;
}
.progress i { flex: 1; height: 3px; border-radius: 2px; background: rgba(29,42,35,.16); overflow: hidden; }
.progress b { display: block; height: 100%; width: 0; background: rgba(29,42,35,.82); }
#stage[data-tone="light"] .progress i { background: rgba(251,247,239,.25); }
#stage[data-tone="light"] .progress b { background: rgba(251,247,239,.9); }

.caps { position: absolute; inset: 0; z-index: 25; pointer-events: none; }
.cap {
  position: absolute; left: 50%;
  top: calc(50% + (var(--cy) - 700) * var(--u) * 1px);
  width: calc(var(--cw, 640) * var(--u) * 1px);
  transform: translate(-50%, 0);
  text-align: center; color: var(--ink);
  animation: capIn 1s cubic-bezier(.2,.7,.3,1) .42s both;
}
.cap.leaving { animation: capOut .45s ease both; }
@keyframes capIn { from { opacity: 0; transform: translate(-50%, calc(14px * var(--u))); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes capOut { to { opacity: 0; transform: translate(-50%, calc(-10px * var(--u))); } }
.cap .pre {
  display: block; margin-bottom: calc(14px * var(--u));
  font-family: var(--f-ui); font-weight: 500; text-transform: uppercase;
  letter-spacing: .24em; font-size: calc(23px * var(--u)); color: var(--terra);
}
.cap .main {
  display: block; font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: calc(var(--fs, 52) * var(--u) * 1px); line-height: 1.14; text-wrap: balance;
  text-shadow: 0 0 calc(24px * var(--u)) rgba(251,247,239,.7);
}
.cap .sub {
  display: block; margin-top: calc(16px * var(--u));
  font-family: var(--f-ui); font-size: calc(27px * var(--u)); line-height: 1.4; letter-spacing: .02em;
  color: var(--ink-soft); text-wrap: balance;
  animation: subIn .9s cubic-bezier(.2,.7,.3,1) var(--sd, 0s) both;
}
@keyframes subIn { from { opacity: 0; transform: translateY(calc(10px * var(--u))); } to { opacity: 1; transform: none; } }
#stage[data-tone="light"] .cap { color: #FBF7EF; }
#stage[data-tone="light"] .cap .main { text-shadow: 0 2px calc(26px * var(--u)) rgba(5,15,34,.7); }
#stage[data-tone="light"] .cap .sub { color: rgba(251,247,239,.86); }
#stage[data-tone="light"] .cap .pre { color: #F6C1CF; }

.ctrl {
  position: absolute; z-index: 30;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 10px 16px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  background: rgba(251,247,239,.82); color: var(--ink);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(29,42,35,.12);
}
.ctrl.skip { right: 14px; }
.ctrl.mute { left: 14px; bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 22px); padding: 9px; z-index: 60; }
.ctrl svg { width: 16px; height: 16px; display: block; }
.nav {
  position: absolute; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(255, 249, 248, .82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(29, 42, 35, .14);
}
.nav button {
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--ink);
  transition: background .2s;
}
.nav button:hover { background: rgba(29, 42, 35, .07); }
.nav button:active { background: rgba(29, 42, 35, .12); }
.nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav svg .fill { fill: currentColor; stroke: none; }
.navhint {
  position: absolute; z-index: 30; left: 50%; transform: translateX(-50%); white-space: nowrap;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
  padding: 9px 16px; border-radius: 999px; background: rgba(29,42,35,.78); color: var(--paper);
  font-size: 12px; letter-spacing: .06em; pointer-events: none;
  animation: hintInOut 5.5s ease 1.2s both;
}
@keyframes hintInOut { 0% { opacity: 0; transform: translate(-50%, 8px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
#stage { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.pausenote {
  position: absolute; z-index: 30; left: 50%; transform: translateX(-50%); white-space: nowrap;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
  padding: 12px 20px; border-radius: 999px; background: rgba(29,42,35,.82); color: var(--paper);
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; pointer-events: none;
}

/* ---------- save the date card: every size scales with --k so it fits one screen ---------- */
#card {
  --k: 1;
  position: absolute; inset: 0; z-index: 10;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(90% 40% at 50% 0%, rgba(237,196,204,.4), transparent 70%),
    var(--paper);
}
.card-inner {
  box-sizing: border-box; min-height: 100%;
  max-width: 460px; margin: 0 auto;
  padding-inline: 20px;
  padding-block: calc(env(safe-area-inset-top, 0px) + 64px * var(--k)) calc(env(safe-area-inset-bottom, 0px) + 16px * var(--k));
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
#card.show .rise { animation: rise .9s cubic-bezier(.2,.7,.3,1) both; animation-delay: calc(var(--i, 0) * 100ms + 150ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.arch { position: relative; margin: 0; flex: none; height: calc(262px * var(--k)); aspect-ratio: 3 / 4; max-width: 100%; }
.arch::before {
  content: ""; position: absolute; inset: calc(-10px * var(--k));
  border: 1px solid var(--olive);
  border-radius: 50% 50% 4px 4px / 36% 36% 4px 4px;
}
.arch img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block;
  border: calc(6px * var(--k)) solid var(--mares);
  border-radius: 50% 50% 4px 4px / 37.5% 37.5% 4px 4px;
  box-sizing: border-box; background: var(--mares);
}
.std-script { margin: calc(20px * var(--k)) 0 0; font-family: var(--f-script); font-size: calc(44px * var(--k)); line-height: 1.1; color: var(--terra); font-weight: 400; }
.names { margin: calc(2px * var(--k)) 0 0; font-family: var(--f-display); font-weight: 500; font-size: calc(50px * var(--k)); line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.names i { color: var(--terra); font-weight: 400; }
.kicker { margin: calc(10px * var(--k)) 0 0; font-size: max(10px, calc(11px * var(--k))); letter-spacing: .32em; text-transform: uppercase; color: var(--ink-soft); }
.date { margin-top: calc(16px * var(--k)); display: flex; flex-direction: column; align-items: center; gap: calc(3px * var(--k)); }
.date .dow { font-size: max(10px, calc(11px * var(--k))); letter-spacing: .32em; text-transform: uppercase; color: var(--terra); font-weight: 500; }
.date .full { font-family: var(--f-display); font-style: italic; font-size: calc(27px * var(--k)); line-height: 1.1; }
.venue { margin: calc(7px * var(--k)) 0 0; font-size: max(10px, calc(12px * var(--k))); letter-spacing: .2em; text-transform: uppercase; }
.venue span { color: var(--ink-soft); }
.weekend {
  list-style: none; margin: calc(16px * var(--k)) 0 0; padding: calc(10px * var(--k)) 0;
  width: 100%; max-width: 360px; display: grid; grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}
.weekend li { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.weekend li + li { border-left: 1px solid var(--line); }
.weekend .d { font-size: max(9px, calc(10px * var(--k))); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.weekend .n { font-family: var(--f-display); font-size: calc(32px * var(--k)); line-height: 1.05; font-variant-numeric: lining-nums; }
.weekend li.main .n { color: var(--terra); }
.weekend .l { font-size: max(11px, calc(12.5px * var(--k))); line-height: 1.3; }
.cal-btn { margin-top: calc(18px * var(--k)); padding: calc(13px * var(--k)) calc(26px * var(--k)); font-size: max(11px, calc(13px * var(--k))); }
.cal-btn svg { width: 18px; height: 18px; }
.note { margin: calc(12px * var(--k)) 0 0; font-size: max(12px, calc(13px * var(--k))); color: var(--ink-soft); font-style: italic; font-family: var(--f-display); }
.replay {
  margin-top: calc(4px * var(--k)); border: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: max(11px, calc(12px * var(--k))); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  padding: calc(8px * var(--k)) 14px; border-radius: 999px;
}
.replay:hover { background: rgba(29,42,35,.05); }
.replay svg { width: 15px; height: 15px; }

.sheet-backdrop { position: absolute; inset: 0; z-index: 70; background: rgba(29,42,35,.38); animation: fadeIn .25s ease both; }
.cal-sheet {
  position: absolute; z-index: 71; left: 12px; right: 12px; max-width: 420px; margin: 0 auto;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: var(--paper); border-radius: 20px; padding: 18px 16px 8px;
  box-shadow: 0 20px 50px rgba(29,42,35,.3);
  display: grid; gap: 8px;
  animation: sheetUp .35s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-title { margin: 0 0 6px; text-align: center; font-family: var(--f-display); font-style: italic; font-size: 22px; }
.cal-sheet a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line); font-size: 15px;
  transition: border-color .2s;
}
.cal-sheet a:hover { border-color: var(--terra); }
.cal-sheet a small { color: var(--ink-soft); font-size: 12px; }
.sheet-close { border: 0; background: none; cursor: pointer; padding: 12px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }


/* ---------- story keyframes (SVG) ---------- */
@keyframes move { from { transform: translate(var(--fx, 0px), var(--fy, 0px)); } to { transform: translate(var(--tx, 0px), var(--ty, 0px)); } }
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 45% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes swing { from { transform: rotate(var(--r1)); } to { transform: rotate(var(--r2)); } }
@keyframes stride { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(var(--r1)); } 75% { transform: rotate(var(--r2)); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(var(--b, -6px)); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(var(--d, -100px)); } }
@keyframes fall { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 0px), var(--dy, 300px)); } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes stamp { 0% { transform: scale(1.9) rotate(var(--rot)); opacity: 0; } 55% { opacity: .92; } 75% { transform: scale(.93) rotate(var(--rot)); } 100% { transform: scale(1) rotate(var(--rot)); opacity: .92; } }
@keyframes floatUp { 0% { transform: translateY(0) scale(.3); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-240px) scale(1); opacity: 0; } }
@keyframes vis { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 1; } }
@keyframes aur { from { transform: translateX(-36px) scaleY(.88); } to { transform: translateX(36px) scaleY(1.14); } }
@keyframes ballX { from { transform: translateX(0); } to { transform: translateX(var(--bx)); } }
@keyframes ballY { from { transform: translateY(0); } to { transform: translateY(var(--by)); } }
@keyframes grow { from { transform: scale(var(--s1)); } to { transform: scale(var(--s2)); } }
@keyframes dash { to { stroke-dashoffset: -80; } }
@keyframes trainScroll {
  0% { transform: translateX(0); animation-timing-function: linear; }
  15.6% { transform: translateX(-430px); animation-timing-function: cubic-bezier(.33,.5,.5,1); }
  26% { transform: translateX(-650px); }
  54% { transform: translateX(-650px); animation-timing-function: cubic-bezier(.5,0,.67,.5); }
  64.3% { transform: translateX(-860px); animation-timing-function: linear; }
  100% { transform: translateX(-1840px); }
}
}

