/* CARMIN — Premium, «Cazar», XP y el Pasaporte (premium.js, journal.js y push.js).
   Usa los tokens de app.css: el tema oscuro sale solo. El pasaporte es siempre de noche, con
   páginas de papel; la hoja de Premium imita las del sistema (iOS y Android). */
.lv-ring b { position: relative; font-size: calc(var(--s, 30px) * .42); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }

/* «Premium» en el botón del mapa de calor */
.pro-badge {
  position: absolute; top: 5px; right: 6px; z-index: 2; width: 15px; height: 15px; display: grid; place-items: center;
  border-radius: 50%; background: var(--carmin, #ff6b6b); color: #fff; box-shadow: 0 0 0 2px var(--surface);
}
.pro-badge svg { width: 9px; height: 9px; }
.heat-fab:has(.pro-badge:not([hidden])) { padding-right: 24px; }

/* Días con candado (ayer y más allá de mañana sin Premium) */
.day.locked { opacity: 1; background: repeating-linear-gradient(135deg, var(--fill) 0 6px, transparent 6px 12px); }
.day.locked .s.lock { display: grid; place-items: center; height: 31px; color: var(--muted); }
.day.locked .bar { background: var(--fill-2); }
.day.locked .k { font-weight: 700; letter-spacing: .02em; color: var(--gold-ink) !important; }

/* ── El pasaporte en la cabecera: icono y nivel ────────── */
.pass-btn { position: relative; }
.pb-lv {
  position: absolute; right: 3px; bottom: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff; background: var(--carmin, #ff6b6b); box-shadow: 0 0 0 2px var(--surface);
  font-variant-numeric: tabular-nums;
}

.lv-ring { position: relative; display: inline-grid; place-items: center; width: var(--s, 30px); height: var(--s, 30px); flex: none; }
.lv-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.lv-ring circle { fill: none; stroke-width: 3.4; }
.lv-ring .lv-track { stroke: var(--fill-2); }
.lv-ring .lv-prog { stroke: var(--carmin, #ff6b6b); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.lv-ring b { position: relative; font-size: calc(var(--s, 30px) * .42); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }

/* ── «Cazar este atardecer»: bajo la nota, también con la hoja recogida ── */
.catch-bar { margin-top: 10px; }
.catch-bar:empty { display: none; }
.cb-go {
  position: relative; overflow: hidden; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px 8px 8px; border: 0; border-radius: 16px;
  color: #fff; text-align: left; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent;
  background: var(--carmin, #ff6b6b); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(160, 40, 40, .18);
  transition: transform .15s var(--ease), background-color .15s;
}
.cb-go:active { transform: scale(.985); background: var(--carmin-press, #e05555); }
.cb-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--carmin, #ff6b6b); }
.cb-txt { flex: 1; min-width: 0; }
.cb-txt b, .cb-txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-txt b { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; }
.cb-txt small { font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.cb-xp { flex: none; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 8px; background: rgba(255, 255, 255, .24); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cb-go::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 2px 0 -2px; border: solid rgba(255, 255, 255, .8); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.cb-soon { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--fill); color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.cb-soon svg { flex: none; color: var(--gold-ink); }
.cb-done {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; text-align: left;
  color: var(--text); background: color-mix(in srgb, var(--tk) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tk) 30%, transparent);
}
.cb-done span:last-child { font-size: 14px; font-weight: 700; }
.cb-stamp { flex: none; width: 58px; height: 44px; display: grid; place-items: center; border-radius: 9px; background: #f3ead8; overflow: hidden; }
.cb-stamp .stamp-svg { width: 52px; height: auto; transform: rotate(var(--rot)); }
.jc-streak { margin: 0; font-size: 13.5px; font-weight: 650; color: var(--gold-ink); }
.jc-yday { display: block; margin-top: 8px; text-align: left; }
.jc-other { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.jc-done .tk { cursor: pointer; margin: 0; }
.log-box:empty { display: none; }
.log-box + #rateBox:not([hidden]) { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--card-line); }

/* ── Consejo de una sola vez ───────────────────────────── */
.coach {
  position: fixed; z-index: 2147483000; padding: 12px 14px 10px; border-radius: 14px; color: #fff; background: #1f1a2b;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35); font-size: 14px; line-height: 1.4; animation: rise .3s var(--ease);
}
.coach p { margin: 0 0 6px; }
.coach button { border: 0; background: none; color: #ffb454; font: inherit; font-weight: 800; padding: 2px 0; cursor: pointer; }
.coach::after { content: ''; position: absolute; left: calc(var(--ax) - 7px); bottom: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #1f1a2b; }
.coach.below::after { bottom: auto; top: -7px; border-top: 0; border-bottom: 7px solid #1f1a2b; }
.coached { box-shadow: 0 0 0 4px color-mix(in srgb, var(--carmin, #ff6b6b) 35%, transparent) !important; border-radius: 14px; }

/* ── Hojas inferiores, como las del sistema (Premium, cazar, ayuda) ── */
.bs-grab { display: none; flex: none; width: 36px; height: 5px; margin: 6px auto 8px; border-radius: 3px; background: var(--line-strong); }
.bs-x {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--muted); background: var(--fill-2);
}
.bs-head { align-items: flex-start; }
.bs-titles { flex: 1; min-width: 0; }
.bs-titles h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 719px), (max-height: 519px) {
  dialog.bsheet {
    inset: auto 0 0 0; top: auto; height: auto; max-height: calc(100% - 44px - var(--safe-top));
    border-radius: 14px 14px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .22);
  }
  dialog.bsheet[open] { animation: bs-in .42s var(--sheet-ease); }
  dialog.bsheet.closing { animation: bs-out .26s cubic-bezier(.4, 0, 1, 1) forwards; }
  .bsheet .sheet-inner { flex: 0 1 auto; padding-top: 0; }
  .bsheet .sheet-body { flex: 0 1 auto; }
  .bsheet .bs-grab { display: block; }
}
@keyframes bs-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes bs-out { to { transform: translateY(100%); } }

/* ── Cazar: la hoja ────────────────────────────────────── */
.lg-sub { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.log-sheet .lg-body { padding-top: 14px; }
.lg-photo {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 168px; padding: 18px;
  border-radius: 18px; cursor: pointer; text-align: center; color: var(--text); overflow: hidden;
  background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: background-color .2s;
}
.lg-photo:not(.on) { background-image: none; }
.lg-photo:active { background: var(--fill-2); }
.lg-photo b { font-size: 16.5px; font-weight: 750; }
.lg-photo small { font-size: 13px; color: var(--muted); }
.lg-cam { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 6px; background: var(--carmin, #ff6b6b); color: #fff; }
.lg-photo:not(.on) .lg-badge { background: var(--carmin-tint, rgba(255, 107, 107, .12)); color: var(--coral-ink); }
.lg-photo.on { padding: 0; min-height: 0; aspect-ratio: 4 / 3; }
.lg-photo.on img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lg-photo-acts { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; }
.lg-chip { position: relative; padding: 7px 12px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: rgba(20, 16, 32, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; }
.lg-badge { position: absolute; top: 10px; right: 10px; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: rgba(255, 255, 255, .22); color: #fff; }
.lg-sky { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 12px 2px 0; font-size: 13.5px; color: var(--text-2); }
.lg-sky span:first-child b { font-size: 22px; font-weight: 850; color: color-mix(in srgb, var(--sc) 80%, var(--ink)); }
.lg-lab { display: block; margin: 18px 2px 8px; font-weight: 750; font-size: 15px; }
.lg-lab i, .lg-row > i { font-style: normal; font-size: 12px; font-weight: 750; color: var(--gold-ink); margin-left: 4px; }
.lg-stars button { padding: 9px 0; font-size: 11.5px; }
.lg-row {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; text-align: left; padding: 12px 14px; border-radius: 14px;
  background: var(--fill); border: 1.5px solid transparent; color: var(--text); cursor: pointer; font: inherit;
}
.lg-row.on { background: color-mix(in srgb, var(--ok) 10%, var(--card)); border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.lg-row:disabled { cursor: default; }
.lg-rtxt { flex: 1; min-width: 0; }
.lg-rtxt b { display: block; font-size: 15px; }
.lg-rtxt small { display: block; font-size: 12.5px; color: var(--muted); }
.lg-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: #34c759; }
.lg-ok { color: var(--ok) !important; font-weight: 700; }
.lg-foot { flex: none; padding: 10px 0 calc(12px + var(--safe-bottom)); text-align: center; }
.lg-save { width: 100%; height: 52px; padding: 0 16px; font-size: 17px; font-weight: 700; border-radius: 14px; background: var(--carmin, #ff6b6b); }
.lg-foot p { margin: 8px 0 0; }

/* ── Pasaporte: siempre de noche, con páginas de papel ─── */
.passport {
  color-scheme: dark;
  --bg: #0d0b12; --surface: #0d0b12; --card: #17131f; --raised: #34303f; --card-line: rgba(255, 255, 255, .08);
  --fill: rgba(255, 255, 255, .065); --fill-2: rgba(255, 255, 255, .11); --text: #f4f1f8; --text-2: #d3ccdd; --muted: #9e97ae;
  --coral-ink: #ff8f8f; --gold-ink: #ffc46e; --ink: #fff; --line-strong: rgba(255, 255, 255, .2); --ok: #5fd394;
  --paper: #f3ead8; --paper-ink: #2a2236; --paper-mute: #8a6f5a; --stamp-ink: #e05555;
  --carmin: #ff6b6b; --carmin-press: #e05555;
  background: var(--bg);
}
.passport .sheet-head h1 { color: #fff; }
.ps-tabs { flex: none; display: flex; margin: 12px 0 2px; }
.ps-tabs button { flex: 1; }
.ps-tabs button[aria-selected="true"] { background: var(--raised); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.ps-head { display: flex; align-items: center; gap: 14px; padding: 14px 0 16px; }
.ps-lv { flex: 1; min-width: 0; }
.ps-lv small { display: block; font-size: 12px; color: var(--muted); }
.ps-lv b { display: block; font-size: 19px; font-weight: 850; letter-spacing: -.02em; margin: 1px 0 6px; }
.ps-streak { flex: none; text-align: center; padding: 9px 12px; border-radius: 14px; background: var(--fill); }
.ps-streak b { display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-streak .gl { width: 18px; height: 18px; color: var(--muted); }
.ps-streak.on .gl { color: #ff9f0a; fill: rgba(255, 159, 10, .25); }
.ps-streak small { font-size: 11px; color: var(--muted); }
.xp-bar { height: 6px; border-radius: 999px; background: var(--fill-2); overflow: hidden; margin: 0 0 6px; }
.xp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--carmin, #ff6b6b); transition: width 1.1s var(--ease); }
.ps-empty { margin: 24px 6px; text-align: center; color: var(--muted); line-height: 1.5; }
.passport .ps-month { margin: 18px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.passport .sheet-body { padding-left: 0; padding-right: 0; margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r)); }
.passport.on-log .sheet-body { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

.pp { --pw: min(84vw, 360px, calc((100vh - 270px) * .69)); padding-top: 8px; }
.pp-pager {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px calc((100% - var(--pw)) / 2) 22px; outline: none; -webkit-overflow-scrolling: touch;
}
.pp-pager::-webkit-scrollbar { display: none; }
.pp-page {
  position: relative; flex: 0 0 var(--pw); aspect-ratio: 5 / 7.1; margin: 0 7px; scroll-snap-align: center; scroll-snap-stop: always; overflow: hidden;
  border-radius: 6px 16px 16px 6px; transform-origin: 50% 50%; will-change: transform, opacity;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
}
/* Portada: piel carmín, letras de oro y el chip de los pasaportes electrónicos */
.pp-cover {
  display: flex; flex-direction: column; align-items: center; padding: 11% 8% 9%; cursor: pointer; text-align: center; color: #e9c77b;
  background: radial-gradient(120% 90% at 30% 15%, #a1213b 0%, #74132a 45%, #430a18 100%);
  box-shadow: inset 12px 0 18px -12px rgba(0, 0, 0, .7), inset -1px 0 0 rgba(255, 255, 255, .06), 0 24px 50px rgba(0, 0, 0, .5);
}
.pp-grain { position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background: repeating-radial-gradient(circle at 23% 31%, rgba(255, 255, 255, .5) 0 .5px, transparent .6px 3px), repeating-radial-gradient(circle at 71% 64%, rgba(0, 0, 0, .6) 0 .6px, transparent .7px 2.6px); }
.pp-cover p { position: relative; margin: 0; }
.gold, .pp-c1, .pp-c2, .pp-c3 { background: linear-gradient(180deg, #f6dc9c 0%, #d6a754 50%, #a8772c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pp-c1 { font-size: 15px; font-weight: 800; letter-spacing: .14em; line-height: 1.3; }
.pp-c2 { margin-top: 6px !important; font-size: 10px; font-weight: 700; letter-spacing: .32em; }
.pp-emblem { position: relative; width: 46%; margin: auto 0; color: #d9ae5d; filter: drop-shadow(0 1px 0 rgba(255, 240, 200, .25)) drop-shadow(0 -1px 0 rgba(0, 0, 0, .45)); }
.pp-c3 { font-size: 24px; font-weight: 900; letter-spacing: .4em; margin-right: -.4em !important; }
.pp-chip { position: relative; width: 34px; margin-top: 12px; color: #d9ae5d; opacity: .85; }
.pp-hint { position: absolute !important; bottom: 10px; left: 0; right: 0; font-size: 10.5px; letter-spacing: .08em; color: rgba(233, 199, 123, .55); }
@media (prefers-reduced-motion: no-preference) { .pp-hint { animation: blink 2.6s ease-in-out infinite; } }
/* Papel con guilloche y marca de agua */
.pp-paper {
  color: var(--paper-ink, #2a2236); background-color: var(--paper, #f3ead8);
  background-image:
    radial-gradient(circle at 50% 42%, rgba(255, 107, 107, .09), transparent 58%),
    repeating-radial-gradient(circle at 50% 130%, transparent 0 11px, rgba(150, 95, 60, .07) 11px 12px),
    repeating-linear-gradient(60deg, rgba(120, 80, 60, .035) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-60deg, rgba(120, 80, 60, .035) 0 1px, transparent 1px 7px);
}
.pp-page.pp-paper { box-shadow: inset 10px 0 14px -10px rgba(90, 60, 40, .45), 0 24px 50px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3); padding: 14px 16px 26px 20px; display: flex; flex-direction: column; }
.pp-wm { position: absolute; left: 50%; top: 48%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  border: 16px solid rgba(255, 107, 107, .055); box-shadow: inset 0 0 0 26px rgba(255, 180, 84, .04); }
.pp-ph { position: relative; display: flex; justify-content: space-between; gap: 8px; font-size: 8.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--paper-mute, #8a6f5a); }
.pp-in { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 10px; }
.pp-pn { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 9px; font-weight: 700; letter-spacing: .2em; color: var(--paper-mute, #8a6f5a); }
/* Página de datos */
.pp-data .pp-id { position: relative; display: flex; gap: 12px; margin-top: 12px; }
.pp-photo { position: relative; flex: none; width: 34%; aspect-ratio: 3 / 4; border-radius: 4px; overflow: visible; background: #e9dcc4; box-shadow: 0 0 0 1px rgba(90, 60, 40, .22); }
.pp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 4px; object-fit: cover; filter: sepia(.12) saturate(1.02) contrast(1.02); }
.pp-photo.ghost { color: var(--stamp-ink); }
.pp-engr { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 4px; opacity: .75; }
/* Laminado: un velo de líneas finas sobre la foto, como el de los pasaportes de verdad */
.pp-holo { position: absolute; inset: 0; border-radius: 4px; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 5px); mix-blend-mode: soft-light; }
.pp-seal { position: absolute; right: -16%; bottom: -10%; width: 52%; color: var(--stamp-ink); opacity: .6; transform: rotate(-14deg); mix-blend-mode: multiply; pointer-events: none; }
.pp-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-frow { display: flex; gap: 12px; }
.pp-frow.wide { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 16px; }
.pp-f { min-width: 0; }
.pp-f small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 7.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-mute, #8a6f5a); }
.pp-f b { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-xp { position: relative; height: 3px; margin: 12px 0 0; border-radius: 2px; background: rgba(90, 60, 40, .15); overflow: hidden; }
.pp-xp i { display: block; height: 100%; background: var(--stamp-ink); }
.pp-mrz {
  position: relative; margin-top: auto; padding: 8px 0 16px; display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  font: 600 calc((var(--pw) - 40px) / 27) / 1.25 'OCR B', 'OCR-B', ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .02em; color: #3a3046; white-space: nowrap;
}
/* Resumen */
.pp-hero { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pp-hero b { font-size: 52px; font-weight: 850; letter-spacing: -.05em; line-height: 1; color: var(--stamp-ink); font-variant-numeric: tabular-nums; }
.pp-hero span { font-size: 12px; font-weight: 700; color: var(--paper-mute, #8a6f5a); text-transform: lowercase; }
.pp-sts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 6px; margin-top: 10px; }
.pp-sts { padding-top: 10px; border-top: 1px solid rgba(90, 60, 40, .16); }
.pp-st b { display: block; font-size: 20px; font-weight: 850; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pp-st small { display: block; font-size: 9.5px; font-weight: 700; color: var(--paper-mute, #8a6f5a); }
.pp-cap { margin: 12px 0 5px; font-size: 8.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-mute, #8a6f5a); }
.pp-months { display: flex; gap: 4px; height: 56px; }
.pp-months span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.pp-months i { width: 100%; min-height: 2px; border-radius: 2px; background: var(--stamp-ink); }
.pp-months i[style*="height:0%"] { background: rgba(90, 60, 40, .18); }
.pp-months small { font-size: 8px; font-weight: 700; color: var(--paper-mute, #8a6f5a); text-transform: uppercase; }
.pp-colors { display: flex; height: 22px; border-radius: 3px; overflow: hidden; background: rgba(90, 60, 40, .1); }
.pp-colors i { flex: 1; min-width: 2px; }
/* Sellos */
.pp-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); gap: 4px; align-items: center; justify-items: center; }
.pp-slot { width: 100%; height: 100%; display: grid; place-items: center; }
.stamp-svg { display: block; max-width: 92%; height: auto; max-height: 100%; transform: rotate(var(--rot, 0deg)); mix-blend-mode: multiply; overflow: visible; }
.pp-slot .stamp-svg { width: 92%; }
.pp-slot.empty { grid-column: 1 / -1; grid-row: 1 / 3; }
.pp-slot.empty span { display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; border: 2.5px dashed rgba(138, 111, 90, .5); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-mute, #8a6f5a); text-align: center; padding: 16px; }
.pp-empty { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 12.5px; color: var(--paper-mute, #8a6f5a); padding: 0 12px; }
/* Colección, insignias y mapa sobre el papel */
.pp-count { display: flex; align-items: baseline; gap: 2px; margin: 0 0 10px; font-size: 13px; font-weight: 750; color: var(--paper-mute); }
.pp-count b { font-size: 30px; font-weight: 850; letter-spacing: -.04em; line-height: 1; color: var(--stamp-ink); }
.pp-count span { margin-left: 8px; font-size: 11px; font-weight: 650; }
.pp-kinds .pp-in > .ps-kinds { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pp-page .kd { display: flex; flex-direction: column; min-height: 0; text-align: left; border-radius: 3px; overflow: hidden; background: #fffdf8; box-shadow: 0 1px 2px rgba(60, 40, 30, .16), 0 0 0 1px rgba(90, 60, 40, .1); }
.pp-page .kd-sw { flex: 1; min-height: 0; aspect-ratio: auto; border-radius: 0; background: var(--k); }
.pp-page .kd:not(.got) { background: transparent; box-shadow: inset 0 0 0 1px rgba(90, 60, 40, .28); }
.pp-page .kd:not(.got) .kd-sw { filter: none; opacity: 1; background: repeating-linear-gradient(135deg, rgba(90, 60, 40, .07) 0 1px, transparent 1px 6px); }
.kd-lab { display: block; padding: 4px 5px 5px; }
.pp-page .kd small, .pp-page .kd.got small { margin: 0; font-size: 8.5px; font-weight: 750; line-height: 1.15; color: var(--paper-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-page .kd:not(.got) small { color: var(--paper-mute); font-weight: 600; }
.kd-lab em { display: block; margin-top: 1px; font-style: normal; font-size: 7px; font-weight: 700; letter-spacing: .06em; color: var(--paper-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-page .ps-badges { gap: 5px; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.pp-page .bd.got small { display: none; }
.pp-badges .pp-in > .ps-badges, .pp-kinds .pp-in > .ps-kinds { flex: 1; min-height: 0; }
.pp-badges .pp-in > .ps-badges { grid-template-rows: repeat(5, minmax(0, 1fr)); }
.pp-page .bd { overflow: hidden; min-height: 0; }
.pp-page .bd { padding: 2px; background: none; border-radius: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pp-page .bd-seal { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--paper-mute); box-shadow: inset 0 0 0 1.2px rgba(90, 60, 40, .35); border: 0; }
.pp-page .bd-seal .gl { width: 18px; height: 18px; }
.pp-page .bd:not(.got) .bd-seal { box-shadow: none; background: none; outline: 1.2px dashed rgba(90, 60, 40, .35); outline-offset: -1px; opacity: .7; filter: none; }
.pp-page .bd.got .bd-seal { color: var(--stamp-ink); box-shadow: inset 0 0 0 1.6px var(--stamp-ink), inset 0 0 0 3.2px #f3ead8, inset 0 0 0 4px var(--stamp-ink); transform: rotate(-6deg); }
.pp-page .bd b { font-size: 8.5px; margin-top: 3px; line-height: 1.15; font-weight: 750; }
.pp-page .bd:not(.got) b { color: var(--paper-mute); font-weight: 650; }
.pp-page .bd small { font-size: 8px; color: var(--paper-mute, #8a6f5a); font-variant-numeric: tabular-nums; }
.pp-page .bd.got { background: none; box-shadow: none; }
.pp-page .bd-bar { display: none; }
.ps-map { flex: 1; min-height: 0; border-radius: 10px; overflow: hidden; background: #e7dcc6; }
.ps-map.off { background: repeating-linear-gradient(45deg, rgba(90, 60, 40, .06) 0 6px, transparent 6px 12px); }
/* Candado (sin Premium): el contenido se intuye, desenfocado */
.pp-page.locked .pp-in { filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; -webkit-user-select: none; }
.pp-lock {
  position: absolute; left: 10%; right: 10%; top: 50%; transform: translateY(-50%); padding: 18px 14px 14px; border-radius: 18px; text-align: center; color: var(--paper-ink, #2a2236);
  background: rgba(255, 252, 245, .86); box-shadow: 0 14px 40px rgba(60, 30, 20, .25), 0 0 0 1px rgba(90, 60, 40, .15); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pp-lock .pw-crown { width: 42px; height: 42px; border-radius: 12px; }
.pp-lock .pw-crown svg { width: 22px; height: 22px; }
.pp-lock b { display: block; margin-top: 8px; font-size: 16px; font-weight: 850; }
.pp-lock p { margin: 4px 0 12px; font-size: 12.5px; line-height: 1.35; color: #5a4a44; }
.pp-lock .btn { width: 100%; padding: 11px; border-radius: 12px; background: var(--carmin, #ff6b6b); }
.pw-crown { position: relative; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: var(--carmin, #ff6b6b); }
.pw-crown svg { width: 28px; height: 28px; }
/* Navegación entre páginas */
.pp-nav { display: flex; align-items: center; justify-content: center; gap: 12px; }
.pp-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 70%; }
.pp-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .25); cursor: pointer; transition: width .25s var(--ease), background-color .25s; }
.pp-dots button[aria-selected="true"] { width: 20px; background: #fff; }
.pp-arrow { width: 32px; height: 32px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .1); font-size: 20px; line-height: 1; cursor: pointer; }
@media (hover: none) { .pp-arrow { display: none; } }
.passport .pp .ps-share, .passport .ps-share { display: block; width: calc(100% - var(--gutter-l) - var(--gutter-r)); margin: 18px auto 8px; padding: 14px; border-radius: 14px; font-size: 15.5px; }
.passport.on-log .ps-share { margin-left: 0; margin-right: 0; }
.passport .btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; }
.passport .pp-unlock { background: var(--carmin, #ff6b6b); color: #fff; }

/* ── El billete de un atardecer ────────────────────────── */
.tk {
  position: relative; display: flex; gap: 12px; padding: 14px 14px 14px 22px; margin: 0 0 10px; border-radius: 18px; overflow: hidden;
  background: var(--card); border: 1px solid var(--card-line); box-shadow: 0 1px 2px rgba(31, 24, 44, .05); cursor: pointer;
  transition: transform .15s var(--ease);
}
.tk:active { transform: scale(.99); }
.tk-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--tk); }
/* Muesca de billete entre el cuerpo y el talón */
.tk::before, .tk::after { content: ''; position: absolute; right: 84px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 1px solid var(--card-line); }
.tk::before { top: -8px; } .tk::after { bottom: -8px; }
.tk-main { flex: 1; min-width: 0; }
.tk-place { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-flag { font-size: 15px; }
.tk-when { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.tk-kind { margin: 6px 0 0; font-size: 13.5px; color: var(--text-2); }
.tk-stars { color: #f5a524; letter-spacing: 1px; font-size: 12px; white-space: nowrap; }
.tk-stars i { font-style: normal; color: var(--fill-2); }
.tk-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; }
.tk-tags span { font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.tk-side { flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-left: 2px dashed var(--card-line); padding-left: 12px; }
.tk-score { font-size: 32px; font-weight: 850; letter-spacing: -.04em; line-height: 1; color: color-mix(in srgb, var(--sc) 80%, var(--ink)); font-variant-numeric: tabular-nums; }
.tk-xp { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-ph { width: 44px; height: 44px; margin-top: 4px; border-radius: 10px; object-fit: cover; }
.tk.compact { margin: 0; }
.tk.compact .tk-ph { display: none; }
.tk-more { margin: -4px 0 14px; padding: 12px; border-radius: 16px; background: var(--fill); animation: rise .25s var(--ease); }
.tk-full { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.tk-acts { display: flex; gap: 8px; margin-top: 10px; }
.tk-acts .btn.ghost { width: auto; background: var(--raised); }

.ps-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
.kd { text-align: center; }
.kd small { display: block; margin-top: 5px; font-size: 10.5px; line-height: 1.2; color: var(--muted); }
.kd-sw { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; background: var(--k); }
.kd:not(.got) .kd-sw { filter: grayscale(1) brightness(.75); opacity: .35; }
.kd.got small { color: var(--text); font-weight: 650; }
.ps-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bd { padding: 12px 8px 10px; border-radius: 14px; background: var(--fill); text-align: center; }
.bd-ico { display: block; font-size: 28px; line-height: 1.1; }
.gl { display: block; width: 1em; height: 1em; }
.bd b { display: block; margin-top: 6px; font-size: 12px; line-height: 1.2; }
.bd small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.bd:not(.got) .bd-ico { filter: grayscale(1); opacity: .35; }
.bd.got { background: color-mix(in srgb, var(--gold) 14%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.bd-bar { display: block; height: 4px; margin: 6px 8px 0; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: var(--carmin, #ff6b6b); }
.ps-share { width: 100%; margin: 24px 0 8px; padding: 14px; border-radius: 14px; }

/* ── La celebración: el sello cae sobre la página ──────── */
.xp-dlg {
  border: 0; padding: 0; margin: auto; width: min(400px, calc(100% - 28px)); max-height: calc(100% - 28px - var(--safe-top) - var(--safe-bottom)); overflow: auto;
  border-radius: 28px; color: #fff; background: #141119; --carmin: #ff6b6b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}
.xp-dlg[open] { animation: xp-in .45s cubic-bezier(.2, 1.3, .4, 1); }
.xp-dlg::backdrop { background: rgba(10, 8, 18, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xp-dlg.closing { animation: sheet-out .2s var(--ease) forwards; }
@keyframes xp-in { from { opacity: 0; transform: scale(.9) translateY(18px); } to { opacity: 1; transform: none; } }
.xp-body { position: relative; padding: 18px 18px 16px; text-align: center; }
.cel-page {
  position: relative; height: 190px; border-radius: 6px 14px 14px 6px; display: grid; place-items: center; overflow: hidden;
  box-shadow: inset 10px 0 14px -10px rgba(90, 60, 40, .45), 0 18px 40px rgba(0, 0, 0, .4);
}
.cel-page .stamp-svg { width: 62%; max-height: 82%; }
@media (prefers-reduced-motion: no-preference) {
  .cel-page .stamp-svg { animation: slam .55s cubic-bezier(.25, 1.6, .5, 1) .35s both; }
  .cel-page { animation: thud .35s ease-out .62s; }
}
@keyframes slam { from { opacity: 0; transform: scale(2.4) rotate(-22deg); } 60% { opacity: 1; } to { opacity: 1; transform: scale(1) rotate(var(--rot)); } }
@keyframes thud { 30% { transform: translateY(3px) scale(.99); } }
.xp-kicker { margin: 14px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.xp-big { margin: 2px 0 10px; font-size: 54px; font-weight: 900; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.xp-big small { font-size: 20px; letter-spacing: 0; }
.xp-level { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); text-align: left; }
.xp-level .xp-bar { background: rgba(255, 255, 255, .14); margin: 8px 0 6px; }
.xp-level small { font-size: 12px; opacity: .8; }
.xp-lvl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.xp-level.up { box-shadow: 0 0 0 1.5px #ffd59a, 0 0 30px rgba(255, 213, 154, .35); }
.xp-up { font-weight: 900; color: #ffd59a; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { .xp-up { animation: pop .6s var(--ease) 1.3s both; } }
.xp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.xp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 12.5px; font-weight: 700; }
.xp-chip i { font-style: normal; font-size: 16px; }
.xp-chip .gl { width: 16px; height: 16px; color: #ffd59a; }
.kd-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--k); }
.xp-more { margin-top: 10px; text-align: left; }
.xp-more summary { cursor: pointer; font-size: 13px; font-weight: 700; opacity: .8; text-align: center; list-style: none; }
.xp-more summary::-webkit-details-marker { display: none; }
.xp-parts { list-style: none; margin: 8px 0 0; padding: 0; }
.xp-parts li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 2px; font-size: 13.5px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.xp-parts li b { color: #ffd59a; font-variant-numeric: tabular-nums; }
.xp-parts.static li { border-color: var(--card-line); }
.xp-parts.static li b { color: var(--gold-ink); }
.xp-actions { display: grid; gap: 8px; margin-top: 14px; }
.xp-actions .btn { width: 100%; padding: 14px; border-radius: 14px; font-size: 15.5px; }
.xp-actions > .btn { background: var(--carmin, #ff6b6b); }
.xp-row { display: flex; gap: 8px; }
.xp-actions .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; }
.tk-more-stamp { height: 120px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; }
.tk-more-stamp .stamp-svg { height: 100px; width: auto; }

/* ── Premium: hoja de compra con el aspecto del sistema ── */
.paywall { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif; }
html.native-android .paywall { font-family: Roboto, system-ui, sans-serif; }
.paywall .sheet-inner { padding-top: 0; }
.pw-nav { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 6px 0 2px; }
@media (min-width: 720px) and (min-height: 520px) { .pw-nav { padding-top: 0; } .paywall { max-height: min(780px, 90vh); } }
.pw-restore { border: 0; background: none; padding: 6px 0; font: inherit; font-size: 16px; color: var(--coral-ink); cursor: pointer; }
.pw-restore:disabled { opacity: .5; }
.pw-x { width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--muted); background: var(--fill-2); margin-left: auto; }
.pw-body { padding-top: 4px; }
.pw-hero { text-align: center; padding: 4px 8px 16px; }
.pw-appicon { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 16px; background: linear-gradient(180deg, #ff9a7b 0%, #ff6b6b 52%, #e9466a 100%); box-shadow: 0 6px 16px rgba(40, 10, 20, .18), inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.pw-appicon svg { width: 40px; height: 40px; }
.pw-hero h1 { margin: 14px 0 4px; font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; }
.pw-hero p { margin: 0; font-size: 15px; color: var(--muted); }
.pw-list { border-radius: 12px; background: var(--fill); overflow: hidden; }
.pw-row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: transparent;
  font: inherit; color: var(--text); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pw-row + .pw-row::before { content: ''; position: absolute; top: 0; left: 48px; right: 0; height: 1px; background: var(--card-line); }
.pw-row:active { background: var(--fill-2); }
.pw-radio { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line-strong); color: transparent; transition: background-color .15s, box-shadow .15s; }
.pw-radio svg { width: 15px; height: 15px; }
.pw-row[aria-checked="true"] .pw-radio { background: var(--carmin, #ff6b6b); box-shadow: none; color: #fff; }
.pw-rt { flex: 1; min-width: 0; }
.pw-rt b { display: flex; align-items: center; gap: 6px; font-size: 16.5px; font-weight: 600; }
.pw-rt small { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.pw-rp { flex: none; text-align: right; }
.pw-rp b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pw-rp small { display: block; font-size: 12px; color: var(--muted); }
.pw-tag { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; padding: 2px 7px; border-radius: 6px; color: #fff; background: var(--carmin, #ff6b6b); }
.pw-feats { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 2px; }
.pw-f { display: flex; gap: 12px; align-items: center; padding: 8px 2px; }
.pw-f b { display: block; font-size: 15.5px; font-weight: 600; }
.pw-f small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.pw-f > span:nth-child(2) { flex: 1; min-width: 0; }
.pw-f.hot b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--carmin, #ff6b6b); vertical-align: 2px; }
.pw-fi { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #fff; }
.pw-fi svg { width: 21px; height: 21px; }
.pw-passport { background: var(--carmin, #ff6b6b); }
.pw-heatmap { background: #2a2238; }
.pw-days { background: #ff9f0a; }
.pw-yesterday { background: #5e5ce6; }
.pw-foot { flex: none; padding: 10px 0 calc(10px + var(--safe-bottom)); border-top: 1px solid var(--card-line); background: var(--surface); text-align: center; }
.pw-foot:empty { display: none; }
.pw-cta {
  width: 100%; height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; cursor: pointer;
  font: inherit; font-size: 17px; font-weight: 600; color: #fff; background: var(--carmin, #ff6b6b); transition: transform .12s var(--ease), opacity .2s;
}
.pw-cta:active { transform: scale(.985); }
.pw-cta:disabled { opacity: .6; }
.pw-cta.ghost { background: var(--fill-2); color: var(--text); }
html.native-android .pw-cta { height: 48px; border-radius: 999px; font-weight: 500; letter-spacing: .01em; }
html.native-android .pw-list { background: transparent; display: grid; gap: 8px; }
html.native-android .pw-row { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line-strong); }
html.native-android .pw-row[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--carmin, #ff6b6b); background: var(--carmin-tint, rgba(255, 107, 107, .08)); }
html.native-android .pw-row + .pw-row::before { display: none; }
.pw-fine { margin: 8px 6px 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.pw-legal { display: flex; justify-content: center; gap: 8px; margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.pw-legal a { color: var(--muted); text-decoration: underline; }
.pw-wait { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 8px; color: var(--muted); text-align: center; border-radius: 12px; background: var(--fill); margin: 0; }
.pw-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: sh-spin .8s linear infinite; flex: none; }
.pw-active { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 14px; border-radius: 12px; background: var(--fill); font-weight: 700; font-size: 16px; }
.pw-tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #34c759; color: #fff; flex: none; }
.pw-tick svg { width: 14px; height: 14px; }
.pw-web { padding: 14px; border-radius: 12px; background: var(--fill); text-align: center; }
.pw-web b { font-size: 16px; }
.pw-web p { margin: 6px 0 0; color: var(--text-2); line-height: 1.45; font-size: 14px; }
.pw-stores { display: flex; gap: 8px; justify-content: center; margin-bottom: 6px; }
.pw-store { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 7px 16px 8px; border-radius: 10px; background: #000; color: #fff; font-size: 18px; font-weight: 600; line-height: 1.05; text-decoration: none !important; }
.pw-store small { font-size: 10px; font-weight: 500; }
.pw-done { text-align: center; padding: 12px 4px 4px; }
.pw-check { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #34c759; color: #fff; box-shadow: 0 12px 30px rgba(52, 199, 89, .35); }
.pw-check svg { width: 42px; height: 42px; }
@media (prefers-reduced-motion: no-preference) {
  .pw-check { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
  .pw-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s ease-out .2s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.pw-done h1 { margin: 14px 0 4px; font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.pw-done p { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.pw-done .pw-feats { text-align: left; }

/* ── Avisos: progreso, prueba y ayuda paso a paso (push.js) ── */
.alerts-help { margin: 10px 0 0 50px; background: var(--fill); color: var(--coral-ink); }
.alerts-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding-left: 50px; color: var(--text-2); }
.alerts-status .pw-spin { width: 14px; height: 14px; border-width: 2px; color: var(--muted); }
.al-ok, .al-warn { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 900; color: #fff; flex: none; }
.al-ok { background: var(--ok); }
.al-warn { background: var(--gold); color: #3a2400; }
.alerts.blocked .alerts-row { cursor: default; }
.push-help .sheet-head span { flex: 1; }
.ph-body { text-align: left; padding-top: 6px; }
.ph-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 180, 84, .18); color: var(--gold-ink); }
.ph-body h1 { margin: 14px 0 6px; font-size: 22px; font-weight: 850; letter-spacing: -.02em; }
.ph-text { margin: 0 0 14px; color: var(--text-2); line-height: 1.5; }
.ph-steps { counter-reset: ph; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ph-steps li { counter-increment: ph; position: relative; padding: 12px 14px 12px 50px; border-radius: 14px; background: var(--fill); line-height: 1.45; }
.ph-steps li::before {
  content: counter(ph); position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff; background: var(--carmin, #ff6b6b);
}
.ph-acts { display: grid; gap: 8px; margin-top: 18px; }
.ph-acts .btn { width: 100%; padding: 14px; border-radius: 14px; font-size: 15.5px; }
.ph-acts .btn.ghost { background: var(--fill); color: var(--text); }
@media (min-width: 720px) and (min-height: 520px) { .push-help { max-height: min(620px, 82vh); } }
dialog:focus { outline: none; }

/* ── Cazar: nota y copia en Fotos ──────────────────────── */
.lg-noteta, .mem-noteed textarea {
  display: block; width: 100%; resize: none; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--card-line);
  background: var(--fill); color: var(--text); font: inherit; font-size: 15px; line-height: 1.4; outline: none;
}
.lg-noteta:focus, .mem-noteed textarea:focus { border-color: color-mix(in srgb, var(--carmin, #ff6b6b) 60%, transparent); background: var(--surface); }
.lg-sw { cursor: pointer; }
.lg-sw .switch { flex: none; }
.lg-ico.gal { background: #ff9f0a; }

/* ── El recuerdo ───────────────────────────────────────── */
.mem-sheet .sheet-head { position: absolute; z-index: 3; right: var(--gutter-r); top: 18px; }
.mem-sheet .bs-x { background: rgba(20, 16, 32, .5); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mem-body { padding-top: 6px; }
.mem-hero {
  position: relative; aspect-ratio: 4 / 4.4; max-height: 62vh; width: 100%; border-radius: 22px; overflow: hidden; color: #fff;
}
.mem-hero:not(.paper) { background: #1b1630; }
.mem-hero.paper { border-radius: 6px 18px 18px 6px; box-shadow: inset 10px 0 14px -10px rgba(90, 60, 40, .4), 0 0 0 1px rgba(90, 60, 40, .12); }
.mem-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mem-hero.paper { color: var(--paper-ink, #2a2236); --paper-mute: #8a6f5a; }
.mem-hero.paper .mem-shade { display: none; }
.mem-hero.paper .mem-stamp { left: 50%; top: 40%; width: 64%; height: auto; transform: translate(-50%, -50%) rotate(-4deg); box-shadow: none; background: none; }
.mem-hero.paper .mem-stamp .stamp-svg { width: 100%; max-height: none; }
.mem-hero.paper .mem-cap b { text-shadow: none; }
.mem-hero.paper .mem-cap span { color: var(--paper-mute); opacity: 1; }
.mem-hero.paper .mem-photo { color: #fff; background: var(--carmin, #ff6b6b); -webkit-backdrop-filter: none; backdrop-filter: none; }
.mem-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 8, 18, .35) 0%, transparent 30%, transparent 55%, rgba(10, 8, 18, .72) 100%); }
.mem-stamp { position: absolute; top: 16px; left: 16px; width: 116px; height: 92px; border-radius: 10px; display: grid; place-items: center; transform: rotate(-4deg); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.mem-stamp .stamp-svg { width: 104px; max-height: 84px; }
.mem-cap { position: absolute; left: 18px; right: 18px; bottom: 54px; }
.mem-cap b { display: block; font-size: 26px; font-weight: 850; letter-spacing: -.02em; line-height: 1.1; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.mem-cap span { display: block; margin-top: 4px; font-size: 14px; opacity: .9; }
.mem-photo { position: absolute; left: 16px; bottom: 14px; padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(20, 16, 32, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; }
.mem-note { display: block; width: 100%; margin: 16px 0 0; padding: 0 4px; border: 0; background: none; text-align: left; font: inherit; font-size: 18px; line-height: 1.45; font-style: italic; color: var(--text); cursor: text; }
.mem-addnote { display: block; margin: 14px 0 0; padding: 10px 2px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 650; color: var(--coral-ink); cursor: pointer; }
.mem-noteed { display: grid; gap: 8px; margin-top: 14px; }
.mem-noteed .btn { justify-self: end; }
.mem-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 16px; border-radius: 16px; overflow: hidden; background: var(--card-line); }
.mem-f { padding: 12px 14px; background: var(--card); }
.mem-f small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mem-f b { display: block; margin-top: 3px; font-size: 16px; font-weight: 750; }
.mem-xp { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--fill); }
.mem-xp summary { cursor: pointer; font-size: 14px; color: var(--text-2); list-style: none; }
.mem-xp summary::-webkit-details-marker { display: none; }
.mem-xp summary b { color: var(--gold-ink); }
.mem-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.mem-acts .btn { padding: 13px; border-radius: 14px; }
.mem-acts .btn:first-child { grid-column: 1 / -1; background: var(--carmin, #ff6b6b); }
.mem-acts .btn.ghost { width: auto; }
.mem-acts .btn:last-child:nth-child(2) { grid-column: 1 / -1; }
.mem-del { display: block; margin: 16px auto 4px; color: var(--muted); }
.pp-slot { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.pp-slot:active .stamp-svg { transform: rotate(var(--rot, 0deg)) scale(.96); }

/* ── Compartir: estudio oscuro, cuatro estilos de un toque ── */
.share-sheet {
  color-scheme: dark;
  --surface: #0d0b12; --card: #17131f; --raised: #34303f; --card-line: rgba(255, 255, 255, .08); --fill: rgba(255, 255, 255, .065);
  --fill-2: rgba(255, 255, 255, .11); --text: #f4f1f8; --text-2: #d3ccdd; --muted: #9e97ae; --coral-ink: #ff8f8f; --line-strong: rgba(255, 255, 255, .2);
  --carmin: #ff6b6b; --carmin-press: #e05555;
  background: #0d0b12; color: var(--text);
}
.share-sheet .sheet-head h1 { color: #fff; }
.share-sheet .sh-stage { height: clamp(230px, 42svh, 620px); }
.share-sheet .sh-frame { box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); }
.sh-styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sh-styles button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 9px; border: 1.5px solid transparent; border-radius: 16px;
  background: var(--fill); color: var(--text-2); font: inherit; cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .12s;
}
.sh-styles button:active { transform: scale(.97); }
.sh-styles button[aria-checked="true"] { border-color: var(--carmin); background: rgba(255, 107, 107, .14); color: #fff; }
.sh-styles b { font-size: 12.5px; font-weight: 700; }
.sh-styles i { display: grid; place-items: center; width: 100%; max-width: 64px; aspect-ratio: 9 / 13; border-radius: 9px; font-style: normal; overflow: hidden; }
.st-sky { background: linear-gradient(180deg, #2a2040 0%, #a83a5e 60%, #ffb454 100%); }
.st-photo { background: linear-gradient(180deg, #3d4452, #8a6f5a); color: rgba(255, 255, 255, .9); }
.st-stamp { background: #f3ead8 radial-gradient(circle at 50% 50%, transparent 0 13px, #8a1c3c 13px 15px, transparent 15px 18px, rgba(138, 28, 60, .7) 18px 19px, transparent 19px); }
.st-min { background: linear-gradient(180deg, #0b0912 0%, #1d1430 60%, #ff8a4c 140%); color: #fff; font-weight: 900; font-size: 19px; letter-spacing: -.05em; }
.share-sheet .sh-fmts button { padding: 8px 6px; }
.share-sheet .sh-type button:disabled { opacity: .4; cursor: default; }
.share-sheet .sh-go { min-height: 54px; font-size: 17px; background: var(--carmin, #ff6b6b); }
.share-sheet .sh-foot { background: rgba(13, 11, 18, .92); }
.share-sheet .btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; }
.st-photo { background-size: cover !important; background-position: center !important; }
.st-photo.has svg { display: none; }

/* Acciones principales: carmín plano; al pulsar, un paso más oscuro. */
.btn:not(.ghost):not(.link):active, .pw-cta:not(.ghost):active, .lg-save:active { background: var(--carmin-press, #e05555); }

/* Premium: avisos en todos tus spots, y qué es gratis y qué es Premium */
.pw-alerts { background: #0a84ff; }
.pw-cmp { width: 100%; margin: 14px 0 6px; border-collapse: collapse; font-size: 13.5px; }
.pw-cmp caption { text-align: left; padding: 0 2px 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pw-cmp th, .pw-cmp td { padding: 9px 4px; border-top: 1px solid var(--card-line); }
.pw-cmp thead th { border-top: 0; padding-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.pw-cmp thead th:last-child { color: var(--coral-ink); }
.pw-cmp tbody th { text-align: left; font-weight: 550; line-height: 1.3; }
.pw-cmp td { width: 74px; text-align: center; white-space: nowrap; }
.pw-cmp td:last-child { background: var(--carmin-tint, rgba(255, 107, 107, .08)); }
.pw-cmp tbody tr:last-child td:last-child { border-radius: 0 0 10px 10px; }
.pw-y { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: var(--ok, #2f8a4f); }
.pw-cmp td:last-child .pw-y { background: var(--carmin, #ff6b6b); }
.pw-y svg { width: 13px; height: 13px; }
.pw-n { color: var(--muted); }
.pw-v { font-size: 12.5px; font-weight: 700; }
.ps-storage { margin: 16px 4px 8px; text-align: center; font-size: 12.5px; color: var(--muted); }
