/* Newsreader (SIL Open Font License), alojada aquí para no depender de Google ni enviarle la IP de quien visita. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(fonts/newsreader.woff2) format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url(fonts/newsreader-italic.woff2) format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0d0b09;
  --ink: #f3ece2;
  --ink-2: rgb(243 236 226 / 0.64);
  --ink-3: rgb(243 236 226 / 0.4);
  --line: rgb(243 236 226 / 0.14);

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);

  /* Tamaño de cada foto del carrusel */
  --cw: clamp(108px, 24vw, 172px);
  --ch: calc(var(--cw) * 1.4);
  --radius: 14px;
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body { overflow: hidden; }

::selection { background: rgb(243 236 226 / 0.22); color: var(--ink); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

.screen {
  position: fixed;
  inset: 0;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* ─── Código ─────────────────────────────────────────── */
.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.gate-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 9vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1;
}
.gate-sub { margin: 0 0 36px; color: var(--ink-2); font-size: 15px; }
.dots { display: flex; gap: 18px; }
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.dot.on { background: var(--ink); border-color: var(--ink); transform: scale(1.04); }
.gate-msg { min-height: 1.4em; margin: 28px 0 0; color: var(--ink-2); font-size: 14px; max-width: 30ch; }
.gate-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px; /* evita el zoom de iOS */
  caret-color: transparent;
  border: 0;
  cursor: default;
}
.gate.busy .dot.on { opacity: 0.5; }

/* ─── Entrada ────────────────────────────────────────── */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  cursor: pointer;
}
.intro-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 8vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 14ch;
  opacity: 0;
}
.intro-tap { color: var(--ink-3); font-size: 15px; padding: 12px 16px; opacity: 0; }

/* ─── Carrusel ───────────────────────────────────────── */
.stage {
  display: grid;
  grid-template-rows: 1fr auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.stage.dragging { cursor: grabbing; }

.ring-wrap {
  position: relative;
  min-height: 0;
}
/* luz suave sobre el "suelo" donde se reflejan las fotos */
.ring-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(50% + var(--ch) * 0.5);
  width: min(900px, 160vw);
  height: calc(var(--ch) * 1.1);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgb(255 226 190 / 0.05), transparent);
  pointer-events: none;
}
.ring {
  position: absolute;
  inset: 0;
  perspective: 950px;
  perspective-origin: 50% 38%;
}

.card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cw);
  height: var(--ch);
  margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  border-radius: var(--radius);
  overflow: hidden;
  background: #1d1915;
  box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.6);
  -webkit-box-reflect: below 10px linear-gradient(transparent 64%, rgb(255 255 255 / 0.2));
  will-change: transform, opacity;
  backface-visibility: hidden;
  opacity: 0;
  cursor: inherit;
}
.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.card .shade {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
}
.card:focus-visible { outline-offset: 6px; border-radius: var(--radius); }

.caption {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-bottom: 8px;
  text-align: center;
  cursor: default;
}
.caption > * { opacity: 0; }
.caption-date {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  min-height: 1.3em;
}
.caption-count {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hint { margin: 14px 0 0; color: var(--ink-3); font-size: 13px; transition: opacity 600ms ease; }
.hint.gone { opacity: 0 !important; }
.letter-btn {
  margin-top: 14px;
  padding: 10px 16px;
  color: var(--ink-2);
  font-size: 14px;
  border-radius: 999px;
  transition: color 300ms ease, background-color 300ms ease, transform 160ms var(--ease-out);
}
.letter-btn:active { transform: scale(0.97); }
.letter-btn.ready { color: var(--bg); background: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .letter-btn:hover { color: var(--ink); }
  .letter-btn.ready:hover { color: var(--bg); }
}

/* ─── Foto abierta ───────────────────────────────────── */
.viewer { position: fixed; inset: 0; z-index: 10; }
.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(13 11 9 / 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}
.viewer-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.viewer-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: calc(max(16px, env(safe-area-inset-top)) + 52px) max(20px, env(safe-area-inset-right))
           calc(max(16px, env(safe-area-inset-bottom)) + 32px) max(20px, env(safe-area-inset-left));
}
.viewer-figure { margin: 0; flex: none; }
.viewer-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62svh;
  border-radius: var(--radius);
  clip-path: inset(0 round var(--radius));
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}
.viewer-text { width: 100%; max-width: 34rem; }
.v-date { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.v-body {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(21px, 2.1vw, 26px);
  line-height: 1.42;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.v-body p, .letter-body p { margin: 0 0 0.9em; }
.line { display: block; }

.close-btn {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(243 236 226 / 0.1);
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
}
.close-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.close-btn:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .close-btn:hover { background: rgb(243 236 226 / 0.18); }
}

@media (min-width: 900px) {
  .viewer-inner { flex-direction: row; gap: clamp(48px, 6vw, 96px); padding-inline: 6vw; }
  .viewer-figure img { max-width: 56vw; max-height: 82vh; }
  .viewer-text { width: 30rem; max-width: 34vw; flex: none; }
}

/* ─── Carta ──────────────────────────────────────────── */
.letter { position: fixed; inset: 0; z-index: 20; background: var(--bg); }
.letter-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(max(16px, env(safe-area-inset-top)) + 12vh) max(24px, env(safe-area-inset-right))
           calc(max(16px, env(safe-area-inset-bottom)) + 48px) max(24px, env(safe-area-inset-left));
}
.letter-body {
  max-width: 36rem;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: clamp(19px, 1.6vw, 21px);
  line-height: 1.62;
  text-wrap: pretty;
}
.letter-body:focus { outline: none; }
.letter-body p:first-child { font-style: italic; font-size: 1.35em; margin-bottom: 1.1em; }
.letter-body p:last-child { font-style: italic; margin-top: 1.6em; }
.letter-back {
  display: block;
  margin: 56px auto 0;
  padding: 12px 18px;
  color: var(--ink-2);
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: color 200ms ease, transform 160ms var(--ease-out);
}
.letter-back:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .letter-back:hover { color: var(--ink); }
}

/* ─── Botón oculto ───────────────────────────────────── */
.secret-btn {
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  opacity: 0;
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.secret-btn svg { width: 11px; height: 16px; fill: var(--ink); opacity: 0.16; transition: opacity 300ms ease; }
.secret-btn:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) {
  .secret-btn:hover svg { opacity: 0.45; }
}
.caption, .secret-btn { transition: opacity 500ms ease, transform 160ms var(--ease-out); }
.stage.pack-on .caption,
.stage.pack-on .secret-btn { opacity: 0 !important; pointer-events: none; }

/* ─── Sobre sorpresa ─────────────────────────────────── */
.pack-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  perspective: 1100px;
}
.pack-stage {
  --pw: clamp(168px, 46vw, 236px);
  position: absolute;
  left: 50%;
  top: 45%;
  width: var(--pw);
  translate: -50% -50%;
  opacity: 0;
}
.pack-float {
  animation: pack-float 5.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes pack-float {
  0%, 100% { transform: translateY(0) rotateZ(-0.6deg); }
  50% { transform: translateY(-8px) rotateZ(0.6deg); }
}
.pack {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.75;
  pointer-events: auto;
  transform-style: preserve-3d;
  transition: transform 500ms var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  outline-offset: 10px;
}
.pack-piece { position: absolute; inset: 0; }
.pack-piece { will-change: transform, opacity; }
.pack-body { z-index: 2; clip-path: inset(12.5% 0 0 0); }
.pack-top { z-index: 3; clip-path: inset(0 0 87.5% 0); }

.pack-art {
  --tooth: 4px;
  --seal: 12%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--tooth)) 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) 51% repeat-x;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--tooth)) 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) 51% repeat-x;
  font-family: var(--font-display);
  color: #fff;
}

/* Bandas de sellado: lámina metálica con las estrías del prensado. */
.pa-seal {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--seal);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(90deg, rgb(255 252 255 / 0.3) 0 1px, rgb(50 34 62 / 0.2) 1px 2px, transparent 2px 3.5px),
    linear-gradient(180deg, #f6f1f9 0%, #d9c9e4 14%, #a891bd 38%, #6f5a86 58%, #bba6cd 82%, #7d6893 100%);
}
.pa-seal-top { top: 0; padding-top: 3%; }
.pa-seal-bottom { bottom: 0; padding-bottom: 3%; gap: 0.7em; }
.pa-seal::after {
  /* línea de soldadura entre el sello y el cuerpo */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.15), rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.15));
}
.pa-seal-top::after { bottom: 0; }
.pa-seal-bottom::after { top: 0; }
.pa-plate {
  padding: 0.18em 0.75em;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", var(--font-ui);
  font-size: calc(var(--pw) * 0.05);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #e8dcf1;
  background: linear-gradient(#2d2233, #17111b);
  border: 1px solid rgb(217 201 228 / 0.7);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgb(255 252 255 / 0.4), 0 2px 4px rgb(30 18 40 / 0.5);
}
.pa-tag {
  position: absolute;
  right: 6%;
  top: 34%;
  padding: 0.05em 0.35em;
  font-size: calc(var(--pw) * 0.042);
  font-weight: 800;
  color: #2d2233;
  background: #f6f1f9;
  border-radius: 3px;
}
.pa-small {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", var(--font-ui);
  font-size: calc(var(--pw) * 0.04);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgb(45 34 51 / 0.88);
  text-shadow: 0 1px 0 rgb(255 252 255 / 0.5);
}

/* Cuerpo: la ilustración, con el plástico ciñendo la carta de dentro. */
.pa-body {
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  top: var(--seal);
  bottom: var(--seal);
  overflow: hidden;
  background: linear-gradient(#3b2f45, #1b1420);
}
.pa-photo {
  position: absolute;
  inset: 2.5% 3%;
  border-radius: 3px;
  background-color: #1a131f;
  background-size: cover;
  background-position: center 35%;
  box-shadow: 0 0 0 1.5px rgb(217 201 228 / 0.6);
}
.pa-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(transparent 45%, rgb(38 28 46 / 0.25) 62%, rgb(22 16 28 / 0.88) 100%),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgb(16 10 20 / 0.45));
}
.pa-holo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgb(255 255 255 / 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 14%, rgb(255 255 255 / 0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 46%, rgb(255 255 255 / 0.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 30% 58%, rgb(255 255 255 / 0.4) 0 1px, transparent 1.5px),
    conic-gradient(from 210deg at 35% 30%, #ff8fb1, #ffd36e, #8affc1, #7fb2ff, #e08bff, #ff8fb1);
  mix-blend-mode: color-dodge;
  opacity: 0.14;
}
.pa-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17%;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.88;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.01em;
  color: #fff8e6;
  -webkit-text-stroke: calc(var(--pw) * 0.016) #2a1f33;
  paint-order: stroke fill;
  text-shadow: 0 calc(var(--pw) * 0.012) 0 #150f1a, 0 calc(var(--pw) * 0.03) calc(var(--pw) * 0.05) rgb(0 0 0 / 0.45);
}
.pa-t1 { font-size: calc(var(--pw) * 0.1); }
.pa-t2 { font-size: calc(var(--pw) * 0.15); }
.pa-pill {
  position: absolute;
  left: 50%;
  bottom: 8%;
  translate: -50% 0;
  padding: 0.12em 1.1em 0.18em;
  font-size: calc(var(--pw) * 0.058);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(#4b3c58, #2a1f33);
  border: 1.5px solid #d9c9e4;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgb(16 10 20 / 0.5);
  white-space: nowrap;
}
/* El contorno de la carta se marca a través del plástico. */
.pa-card-edge {
  position: absolute;
  inset: 3.5% 5.5% 3% 5.5%;
  border-radius: 9px;
  box-shadow:
    inset 0 1.5px 0 rgb(255 255 255 / 0.4),
    inset 1px 0 0 rgb(255 255 255 / 0.22),
    inset 0 -1.5px 0 rgb(0 0 0 / 0.35),
    inset -1px 0 0 rgb(0 0 0 / 0.25),
    0 0 0 1px rgb(0 0 0 / 0.14),
    0 1px 0 1px rgb(255 255 255 / 0.12);
}
/* Arrugas donde el plástico se junta en los sellos. */
.pa-pleat {
  position: absolute;
  left: 0;
  right: 0;
  height: 9%;
}
.pa-pleat-top {
  top: 0;
  background: repeating-linear-gradient(97deg, transparent 0 6px, rgb(255 252 255 / 0.28) 6px 7px, rgb(40 26 50 / 0.22) 7px 8.5px, transparent 8.5px 14px);
  -webkit-mask: linear-gradient(#000, transparent);
  mask: linear-gradient(#000, transparent);
}
.pa-pleat-bottom {
  bottom: 0;
  background: repeating-linear-gradient(83deg, transparent 0 6px, rgb(255 252 255 / 0.24) 6px 7px, rgb(40 26 50 / 0.2) 7px 8.5px, transparent 8.5px 14px);
  -webkit-mask: linear-gradient(transparent, #000);
  mask: linear-gradient(transparent, #000);
}
/* Bordes abombados: el plástico tenso hace volumen a los lados. */
.pa-bulge {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgb(255 252 255 / 0.5) 0, rgb(255 252 255 / 0) 2.5%, rgb(24 14 30 / 0.32) 5.5%, transparent 12%,
    transparent 88%, rgb(24 14 30 / 0.32) 94.5%, rgb(255 255 255 / 0) 97.5%, rgb(255 255 255 / 0.45) 100%);
}
/* Brillo del plástico: dos reflejos que recorren el sobre. */
.pa-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(104deg,
    transparent 16%, rgb(255 255 255 / 0.42) 24%, rgb(255 255 255 / 0.08) 29%, transparent 34%,
    transparent 56%, rgb(255 255 255 / 0.22) 62%, transparent 69%);
  background-size: 230% 100%;
  background-position: var(--sx, 0%) 0;
  mix-blend-mode: screen;
  animation: gloss 7s ease-in-out infinite;
  pointer-events: none;
}
.pack.tilting .pa-gloss { animation: none; }
@keyframes gloss {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

.pack-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -7%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.6), transparent);
  animation: pack-shadow 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pack-shadow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.75; }
}
.pack-stage.opened .pack-shadow { opacity: 0; transition: opacity 600ms ease; animation: none; }

/* Guía y línea de corte */
.pack-guide {
  position: absolute;
  z-index: 4;
  left: 7%;
  right: 7%;
  top: 12.5%;
  border-top: 1.5px dashed rgb(255 246 234 / 0.7);
  transition: opacity 250ms ease;
  pointer-events: none;
}
.pack-guide::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff6ea;
  box-shadow: 0 0 10px 2px rgb(255 230 190 / 0.9);
  animation: guide 1.9s var(--ease-ios) infinite;
}
@keyframes guide {
  0% { left: 0; opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
.pack.cutting .pack-guide, .pack.cut .pack-guide { opacity: 0; }
/* El corte es un trazo SVG: arranca recto y se va torciendo hacia arriba, como un plástico de verdad. */
.pack-cut {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}
.pack-cut path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.pc-glow { stroke: rgb(255 240 250 / 0.45); stroke-width: 7px; }
.pc-line { stroke: #fffaff; stroke-width: 1.8px; }
.pack-grip {
  position: absolute;
  z-index: 6;
  left: -16%;
  right: -16%;
  top: -10%;
  height: 34%;
  cursor: ew-resize;
  touch-action: none;
}
.pack.cut .pack-grip { display: none; }

.pack-hint {
  position: absolute;
  top: calc(100% + 32px);
  left: 50%;
  translate: -50% 0;
  width: max-content;
  max-width: min(320px, 86vw);
  margin: 0;
  text-align: center;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transition: color 300ms ease;
}
.pack-stage.opened .pack-hint { visibility: hidden; }

/* La tarjeta del interior */
.pack-card {
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 8%;
  top: 15.5%;
  aspect-ratio: 5 / 7;
  transform-style: preserve-3d;
  will-change: transform;
}
.pc-face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pc-back {
  background:
    radial-gradient(circle at 50% 50%, rgb(217 201 228 / 0.9) 0 15%, transparent 15.5%),
    radial-gradient(circle at 50% 50%, transparent 0 21%, rgb(217 201 228 / 0.35) 21.5% 22.5%, transparent 23%),
    linear-gradient(160deg, #33273d, #17111b);
  box-shadow: inset 0 0 0 calc(var(--pw) * 0.022) #bba6cd, inset 0 0 0 calc(var(--pw) * 0.03) #2a1f33, inset 0 0 0 calc(var(--pw) * 0.034) rgb(217 201 228 / 0.5);
}
.pc-front {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  padding: 14% 12%;
  text-align: center;
  background: linear-gradient(170deg, #fbf6ee, #efe5d6);
  color: #241a14;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 20px 40px -10px rgb(0 0 0 / 0.6);
  font-family: var(--font-serif);
  font-size: calc(var(--pw) * 0.062);
}
.pc-to { margin: 0; font-style: italic; color: #8a6a4e; font-size: 0.9em; }
.pc-body { font-style: italic; font-size: 1.22em; line-height: 1.32; text-wrap: balance; }
.pc-body p { margin: 0; }
.pc-date { margin: 0.4em 0 0; font-family: var(--font-ui); font-size: 0.62em; letter-spacing: 0.2em; color: #a78a6e; }

.pack-back {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px));
  translate: -50% 0;
  padding: 12px 18px;
  color: var(--ink-2);
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: color 200ms ease, transform 160ms var(--ease-out);
}
.pack-back.show { visibility: visible; }
.pack-back:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .pack-back:hover { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .dot, .hint, .letter-btn, .pack { transition-duration: 1ms; }
}
@media (prefers-reduced-motion: reduce) {
  .pack-float, .pa-gloss, .pack-shadow, .pack-guide::after { animation: none; }
}
.pack-stage:has(.pack.cutting) .pack-hint { visibility: hidden; }
