/* ===== Fuentes (incluidas en /fonts, sin peticiones a Google) ===== */
@font-face { font-family: "Sigmar One"; font-weight: 400; font-display: swap;
  src: url("fonts/sigmar-one-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Sigmar One"; font-weight: 400; font-display: swap;
  src: url("fonts/sigmar-one-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Caveat Brush"; font-weight: 400; font-display: swap;
  src: url("fonts/caveat-brush-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Caveat Brush"; font-weight: 400; font-display: swap;
  src: url("fonts/caveat-brush-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }

/* ===== Tokens ===== */
:root {
  --cobalt: #2431c4;
  --cobalt-deep: #18228f;
  --ink: #121533;
  --paper: #fbf8f1;
  --ribbon: #ff5a36;
  --foil: #f5c443;
  --pink: #ff9ec2;
  --mint: #7fd6b0;
  --line: #e3ddcc;
  --muted: #5b5e80;
  --wa: #0f7a3f;
  --error: #b3141c;
  --font: "Figtree", "Trebuchet MS", system-ui, sans-serif;
  --display: "Sigmar One", "Trebuchet MS", system-ui, sans-serif;
  --hand: "Caveat Brush", "Segoe Print", "Bradley Hand", cursive;
  --r-lg: 24px; --r-md: 14px; --r-sm: 10px;
  /* papel de envolver: destellos y puntos, muy suaves */
  --wrap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132'%3E%3Cg fill='%23fbf8f1' fill-opacity='.11'%3E%3Cpath d='M22 14l3.2 8.8L34 26l-8.8 3.2L22 38l-3.2-8.8L10 26l8.8-3.2z'/%3E%3Cpath d='M92 76l2.4 6.6L101 85l-6.6 2.4L92 94l-2.4-6.6L83 85l6.6-2.4z'/%3E%3Ccircle cx='80' cy='22' r='3'/%3E%3Ccircle cx='28' cy='88' r='3'/%3E%3Ccircle cx='118' cy='118' r='2'/%3E%3Ccircle cx='54' cy='56' r='2'/%3E%3C/g%3E%3Cg fill='%23f5c443' fill-opacity='.16'%3E%3Ccircle cx='108' cy='46' r='2.5'/%3E%3Ccircle cx='60' cy='112' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 17px/1.55 var(--font);
  background: var(--cobalt) var(--wrap) 0 0 / 132px 132px;
  min-height: 100vh; overflow-x: hidden;
}
svg.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--foil); outline-offset: 3px; }
.sheet :focus-visible, .tagbox :focus-visible { outline-color: var(--cobalt); }

/* ===== Estructura ===== */
.top { max-width: 960px; margin: 0 auto; padding: 18px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.langsw { color: var(--paper); font-weight: 700; font-size: 15px; text-underline-offset: 3px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font: 400 17px var(--display); letter-spacing: .01em; }
.brand svg { width: 34px; height: 34px; }
main { max-width: 960px; margin: 0 auto; padding: 8px 16px 40px; }

/* ===== Hero ===== */
.hero { display: grid; gap: 8px; padding: 28px 4px 12px; color: var(--paper); }
.hero h1 { margin: 0; font: 400 clamp(27px, 7.6vw, 56px)/1.14 var(--display); letter-spacing: .01em; text-wrap: balance; max-width: 15em; }
.lead { margin: 14px 0 0; font-size: clamp(17px, 4.4vw, 20px); max-width: 30em; color: #e8e9ff; text-wrap: pretty; }
.hero .hero-tag { --w: 190px; justify-self: center; margin: calc(var(--w) / 16 * 5.6) 0 6px; transform: rotate(-4deg); }

/* ===== Etiqueta de regalo ===== */
.tag-wrap { --w: 300px; position: relative; width: var(--w); font-size: calc(var(--w) / 16); transform-origin: 50% -5em; }
.tag-wrap.swing { animation: swing 3.4s cubic-bezier(.3,.6,.4,1) 1 both; }
.tag {
  position: relative; width: 100%; aspect-ratio: 320 / 440; background: var(--paper);
  clip-path: polygon(14% 0, 86% 0, 100% 7.5%, 100% 100%, 0 100%, 0 7.5%);
  -webkit-mask: radial-gradient(circle .62em at 50% 2em, transparent .6em, #000 .66em);
          mask: radial-gradient(circle .62em at 50% 2em, transparent .6em, #000 .66em);
  box-shadow: none;
}
.tag::after { /* tira de fibras del papel kraft, apenas visible */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(100deg, rgba(18,21,51,.025) 0 2px, transparent 2px 9px);
}
.tag-body { position: absolute; inset: 4.1em 1.5em 1.4em; display: flex; flex-direction: column; }
.hand { font-family: var(--hand); font-weight: 400; line-height: 1; margin: 0; color: var(--muted); }
.lbl { font-size: 1.7em; }
.to { position: relative; flex: 1; display: grid; place-items: center; border-bottom: .09em dashed rgba(18,21,51,.28); margin: .2em 0 .5em; }
.to > * { grid-area: 1 / 1; }
.to-q { font-family: var(--hand); font-weight: 400; font-size: 6.5em; color: rgba(18,21,51,.1); line-height: 1; transition: opacity .3s; }
.to-name { font-family: var(--hand); font-weight: 400; color: var(--ribbon); text-align: center; line-height: .95; max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; clip-path: inset(-.3em 100% -.3em 0); }
.from { font-size: 1.7em; color: var(--ink); min-height: 1.2em; padding-right: 2.1em; line-height: 1.05; }
.from span { font-weight: 400; }
.stamp { position: absolute; right: 1.1em; bottom: 1.1em; width: 3.1em; height: 3.1em; color: var(--ribbon); transform: rotate(-14deg); opacity: .9; }
.string { position: absolute; left: 50%; top: -5em; width: 3.75em; height: 8em; transform: translateX(-50%); overflow: visible; pointer-events: none; }
.revealed .to-q { opacity: 0; }
.revealed .to-name { animation: write 1.3s cubic-bezier(.55,.1,.35,1) .15s forwards; }

@keyframes swing { 0% { transform: rotate(9deg); } 16% { transform: rotate(-6.5deg); } 34% { transform: rotate(4.2deg); } 52% { transform: rotate(-2.4deg); } 70% { transform: rotate(1.2deg); } 86% { transform: rotate(-.5deg); } 100% { transform: rotate(0); } }
@keyframes write { to { clip-path: inset(-.3em -.3em -.3em 0); } }

/* ===== Hoja de papel (formulario y resultados) ===== */
.sheet { background: var(--paper); border-radius: var(--r-lg); padding: 22px 18px 24px; margin-top: 20px; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 18px 40px -18px rgba(8,10,60,.55); }
.sheet h2 { margin: 0; font: 400 19px/1.25 var(--display); letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.sheet h2 svg { color: var(--cobalt); width: 1.1em; height: 1.1em; }
.sheet .hint { margin: 6px 0 16px; color: var(--muted); font-size: 15px; max-width: 42em; text-wrap: pretty; }
.block + .block { margin-top: 28px; padding-top: 26px; border-top: 1.5px solid var(--line); }

.fields { display: grid; gap: 14px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 5px; }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=date], textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
input[type=text]::placeholder, textarea::placeholder { color: #9a9bb5; }
input[type=text]:hover, input[type=date]:hover, textarea:hover { border-color: #cfc8b3; }
textarea { resize: vertical; min-height: 76px; line-height: 1.4; }
input[aria-invalid=true] { border-color: var(--error); background: #fff6f5; }
.err { min-height: 1.2em; margin: 4px 0 0; font-size: 13.5px; color: var(--error); font-weight: 600; }

/* participantes */
#people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.person { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); }
.person[data-open=true] { border-color: var(--cobalt); }
.prow { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; padding: 10px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 800 17px var(--font); color: var(--ink); margin-top: 2px; }
.prow .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* etiqueta solo para lectores de pantalla */
.prow .err { margin: 2px 0 0; min-height: 0; }
.prow .err:empty { display: none; }
.ibtn { min-height: 48px; min-width: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: 700 14px var(--font); cursor: pointer; }
.ibtn:hover { border-color: var(--ink); }
.ibtn[aria-expanded=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ibtn .badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ribbon); color: var(--ink); display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; }
.ibtn .badge:empty { display: none; }
.ibtn .lab { display: none; }
.rmline { min-height: 44px; color: var(--muted); border-color: var(--line); font-size: 14.5px; }
.rmline:hover { color: var(--error); border-color: var(--error); background: transparent; }
.pextra { padding: 4px 14px 16px; display: grid; gap: 14px; border-top: 1.5px dashed var(--line); margin: 0 10px; padding-left: 0; padding-right: 0; padding-top: 14px; }
.ex-label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.ex-hint { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--paper); font-weight: 600; font-size: 14.5px; }
.chip input:hover + span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); text-decoration: line-through; text-decoration-color: var(--ribbon); text-decoration-thickness: 2px; }
.chip input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.none { color: var(--muted); font-size: 14px; margin: 0; }

.addrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btn { min-height: 48px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 15.5px var(--font); border-radius: var(--r-sm); border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { background: rgba(18,21,51,.06); }
.btn.dashed { border-style: dashed; border-color: #b9b29b; color: var(--muted); }
.btn.dashed:hover { border-color: var(--ink); color: var(--ink); }
.count { margin-left: auto; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.paste { margin-top: 12px; display: grid; gap: 10px; }
.paste p { margin: 0; color: var(--muted); font-size: 15px; }

.opt { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.sw { flex: none; width: 52px; height: 30px; border-radius: 15px; background: #cfc8b3; position: relative; transition: background .2s; margin-top: 2px; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.opt input:checked + .sw { background: var(--cobalt); }
.opt input:checked + .sw::after { transform: translateX(22px); }
.opt input:focus-visible + .sw { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.opt b { display: block; }
.opt span.t { color: var(--muted); font-size: 15px; }

.go {
  width: 100%; min-height: 60px; margin-top: 28px; border: 0; border-radius: var(--r-md); cursor: pointer;
  background: var(--ribbon); color: var(--ink); font: 400 17px var(--display); letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 6px 0 #c23a1c; transition: transform .12s, box-shadow .12s;
}
.go:hover { transform: translateY(2px); box-shadow: 0 4px 0 #c23a1c; }
.go:active { transform: translateY(6px); box-shadow: 0 0 0 #c23a1c; }
.go svg { width: 1.3em; height: 1.3em; }
#status { margin-top: 18px; padding: 12px 16px; border-radius: var(--r-sm); background: #fff3cf; font-weight: 600; font-size: 15px; }
#status:empty { display: none; }
#status.bad { background: #fde3e0; color: var(--error); }

/* resultados */
.progress { margin: 4px 0 16px; }
.progress .t { display: flex; justify-content: space-between; font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.bar { height: 10px; border-radius: 5px; background: #ebe5d3; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--cobalt); border-radius: 5px; transition: width .35s; }
.note { display: flex; gap: 12px; background: #fff3cf; border: 1.5px solid var(--foil); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; font-size: 15.5px; }
.note svg { color: var(--ink); margin-top: 2px; width: 1.4em; height: 1.4em; }
.note p { margin: 0; text-wrap: pretty; }
#list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 10px 10px 10px 10px; }
.res[data-sent=true] { background: #f3f1e8; }
.res .who { min-width: 0; }
.res .who b { display: block; font-size: 17px; overflow-wrap: anywhere; }
.res .who small { color: var(--muted); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.res .who small svg { width: 1em; height: 1em; color: var(--wa); }
.res .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.res .acts .btn { flex: 1 1 140px; min-height: 46px; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { background: #0b6434; }
.after { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.fine { margin: 16px 0 0; color: var(--muted); font-size: 14.5px; max-width: 40em; }

/* ===== Revelación ===== */
.reveal { display: grid; justify-items: center; text-align: center; padding: 14px 0 20px; color: var(--paper); }
.reveal h1 { margin: 0; font: 400 clamp(22px, 6.4vw, 36px)/1.18 var(--display); letter-spacing: .01em; text-wrap: balance; max-width: 14em; }
.reveal .sub { margin: 10px 0 0; color: #dfe1ff; font-size: 18px; }
.reveal .tag-wrap { --w: min(290px, 70vw); margin: calc(var(--w) / 16 * 5.4) 0 0; }
.reveal .go { width: auto; padding: 0 28px; margin-top: 26px; }
.after-box { display: grid; justify-items: center; gap: 16px; margin-top: 30px; width: 100%; }
.note-card { max-width: 400px; width: 100%; background: var(--foil); color: var(--ink); border-radius: 6px; padding: 18px 20px 20px; transform: rotate(-1.6deg); box-shadow: 0 14px 26px -14px rgba(8,10,60,.7); text-align: left; }
.note-card p { margin: 0; font-family: var(--hand); font-weight: 400; font-size: 28px; line-height: 1.15; text-wrap: pretty; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--paper); color: var(--ink); font-weight: 700; font-size: 15px; }
.pill svg { color: var(--cobalt); }
.keep { margin: 0; max-width: 28em; color: #dfe1ff; font-size: 15px; text-wrap: pretty; }
.own { color: var(--paper); font-weight: 700; }
.fade { animation: fadein .6s ease both; }
@keyframes fadein { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }


/* ===== Información (cómo funciona, FAQ) ===== */
.info { margin-top: 56px; color: var(--paper); }
.info h2 { margin: 0 0 18px; font: 400 clamp(22px, 6vw, 32px)/1.18 var(--display); letter-spacing: .01em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 0 60px; color: #e8e9ff; min-height: 48px; }
.steps li::before { font-family: var(--font); content: counter(s); position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--foil); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.steps b { display: block; color: var(--paper); font: 400 16px var(--display); letter-spacing: .02em; margin-bottom: 4px; }
.faq { margin-top: 44px; display: grid; gap: 10px; }
.faq details { background: rgba(10,14,80,.5); border-radius: var(--r-md); }
.faq summary { cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 700; font-size: 17px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border: solid var(--foil); border-width: 0 3px 3px 0; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq p { margin: 0; padding: 0 18px 18px; color: #dfe1ff; max-width: 44em; text-wrap: pretty; }

.ad-slot:empty { display: none; }
.ad-slot { margin: 28px auto 0; text-align: center; }

footer { max-width: 960px; margin: 0 auto; padding: 8px 20px 36px; color: #cfd1ff; font-size: 14.5px; }
footer p { margin: 0; max-width: 40em; text-wrap: pretty; }

/* ===== Pantallas grandes ===== */
@media (min-width: 560px) {
  .ibtn .lab { display: inline; }
  .fields.three, .fields.four { grid-template-columns: 1fr 1fr; }
  .res { grid-template-columns: auto 1fr auto; }
  .res .acts { grid-column: auto; flex-wrap: nowrap; }
  .res .acts .btn { flex: none; }
}
@media (min-width: 820px) {
  main { padding: 8px 24px 56px; }
  .top { padding-top: 26px; }
  .hero { grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: 56px 8px 24px; }
  .hero .hero-tag { --w: 250px; margin: 80px 40px 0 0; transform: rotate(-5deg); }
  .sheet { padding: 36px 40px 40px; margin-top: 28px; }
  .sheet h2 { font-size: 23px; }
  .fields.three { grid-template-columns: 1fr 1fr 1.3fr; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .steps li { padding: 62px 0 0; }
  .steps li::before { width: 50px; height: 50px; font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .tag-wrap.swing, .fade { animation: none; }
  .revealed .to-name { animation: none; clip-path: none; }
  .go, .sw, .sw::after, .bar i { transition: none; }
}


/* ===== Compartir: pestañas, enlace común, claves ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #ebe5d3; border-radius: var(--r-md); margin: 6px 0 18px; }
.seg button { min-height: 50px; padding: 6px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font: 700 15px/1.2 var(--font); cursor: pointer; }
.seg button[aria-selected=true] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(18,21,51,.18); }
.linkbox { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px; display: grid; gap: 10px; }
.linkbox input { font-size: 14px; color: var(--muted); text-overflow: ellipsis; }
.linkbox .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.linkbox .acts .btn { flex: 1 1 170px; }
.linkbox .fine { margin: 0; font-size: 13.5px; }
.linkbox .fine.bad { color: var(--error); font-weight: 600; }
.btn[aria-disabled=true], .btn:disabled { opacity: .45; pointer-events: none; }
#keyList { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
#keyList li { display: grid; grid-template-columns: 1fr minmax(120px, 44%); gap: 10px; align-items: center; }
#keyList label { font-weight: 700; overflow-wrap: anywhere; }
#keyList input { min-height: 44px; }

/* elegir quién eres */
.pickbox { width: 100%; max-width: 560px; text-align: left; margin-top: 26px; color: var(--ink); }
.namegrid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.namebtn { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 14px 6px 8px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); font: 700 17px var(--font); color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.namebtn:hover { border-color: var(--cobalt); }
.namebtn .avatar { margin: 0; flex: none; }
.pq { margin: 0 0 14px; font-size: 19px; font-weight: 700; text-wrap: balance; }
.pq small { display: block; margin-top: 6px; font-size: 15px; font-weight: 400; color: var(--muted); }
.pacts { display: grid; gap: 10px; margin-top: 16px; }
.pacts .go { margin-top: 0; }
@media (min-width: 560px) { .namegrid { grid-template-columns: 1fr 1fr; } }

/* ===== Pie, guías y páginas de contenido ===== */
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
footer nav a { color: var(--paper); text-underline-offset: 3px; }
.foot { max-width: 960px; margin: 0 auto; padding: 8px 20px 36px; color: #cfd1ff; font-size: 14.5px; }
.foot p { margin: 0; max-width: 40em; text-wrap: pretty; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
.foot nav a { color: var(--paper); text-underline-offset: 3px; }
.sitebar { max-width: 960px; margin: 0 auto; padding: 18px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topnav { display: flex; gap: 18px; font-size: 15px; font-weight: 600; }
.topnav a { color: var(--paper); text-underline-offset: 3px; }
.cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.cards a { display: block; height: 100%; box-sizing: border-box; padding: 16px 18px; background: var(--paper); color: var(--ink); border-radius: var(--r-md); text-decoration: none; box-shadow: 0 10px 24px -14px rgba(8,10,60,.6); }
.cards a:hover strong { text-decoration: underline; }
.cards strong { display: block; font: 400 18px/1.3 var(--display); letter-spacing: .01em; }
.cards span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.guides h2 { color: var(--paper); }
.crumbs { margin: 14px 4px 0; font-size: 14px; color: #cfd1ff; }
.crumbs a { color: var(--paper); text-underline-offset: 3px; }
.article { color: var(--ink); }
.article h1 { margin: 0; font: 400 clamp(25px, 6.4vw, 38px)/1.18 var(--display); letter-spacing: .01em; text-wrap: balance; }
.article h2 { display: block; margin: 34px 0 8px; font: 400 21px/1.25 var(--display); }
.article h3 { margin: 22px 0 4px; font: 800 17px/1.3 var(--font); }
.article p, .article li { font-size: 17px; line-height: 1.65; max-width: 40em; text-wrap: pretty; }
.article p { margin: 10px 0; }
.article ul, .article ol { padding-left: 1.3em; margin: 10px 0; }
.article li { margin: 6px 0; }
.article a { color: var(--cobalt); text-underline-offset: 3px; }
.article blockquote { margin: 16px 0; padding: 12px 16px; border-left: 5px solid var(--ribbon); background: #f2ecda; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 17px; line-height: 1.6; }
.article .lead2 { margin: 14px 0 0; font-size: 19px; line-height: 1.55; max-width: 38em; }
.article .upd, .legalnote { color: var(--muted); font-size: 14px; }
.legalnote { margin-top: 30px; padding-top: 14px; border-top: 1px dashed var(--line); }
.cta { margin-top: 36px; padding: 18px; background: var(--cobalt); color: var(--paper); border-radius: var(--r-md); }
.cta p { margin: 0 0 12px; }
.cta .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--ribbon); border-color: var(--ribbon); color: #fff !important; font-weight: 800; border-radius: 999px; text-decoration: none !important; }
.cta .btn:hover { background: #e84a26; }
.ctable { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.ctable th, .ctable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ad-slot.on { min-height: 120px; }
.ad-slot.on::before { content: "Publicidad"; display: block; margin-bottom: 4px; font-size: 12px; color: #cfd1ff; }
.docmain .ad-slot.on { margin-top: 24px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, 1fr); } .article.sheet { padding: 40px 48px 44px; } }

input[type=date] { min-height: 48px; font-family: inherit; }
.pill.add { border: 0; cursor: pointer; font-family: inherit; background: var(--foil); }
.pill.add:hover { filter: brightness(1.06); }
.ctable { display: block; overflow-x: auto; max-width: 100%; }
.ctable a { overflow-wrap: anywhere; }
.ctable th, .ctable td { min-width: 110px; }
.dateout { display: block; min-height: 1.3em; margin-top: 5px; color: var(--cobalt); font-weight: 700; font-size: 14.5px; }

/* ===== Mejoras UX (auditoría) ===== */
/* zonas táctiles de al menos 44px en cabecera, navegación y pie */
.brand { min-height: 44px; }
.langsw, .topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.foot nav { gap: 0 18px; }
.foot nav a, footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.cards a { border: 1px solid var(--line); }
/* en móvil el cartel del hero ocupa menos y el formulario sube */
@media (max-width: 559px) {
  .hero .hero-tag { --w: 140px; }
  .hero { padding-bottom: 4px; }
}

/* ===== Ideas de regalo (afiliados) ===== */
.gifts { width: 100%; max-width: 30em; margin-top: 8px; padding-top: 22px; border-top: 1px dashed rgba(255,255,255,.3); text-align: center; }
.gifts h2 { margin: 0; font: 400 21px/1.2 var(--display); color: var(--paper); }
.gifts .sub2 { margin: 4px 0 14px; color: #dfe1ff; font-size: 15px; }
.gifts .disc { margin: 14px auto 0; max-width: 30em; color: #cfd1ff; font-size: 13px; text-wrap: pretty; }
.pill.link { text-decoration: none; }
.pill.link:hover { filter: brightness(.95); }
.pill.link:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; }

.gift-ideas .pills { justify-content: flex-start; margin: 12px 0; }
.gift-ideas .pill.link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; }

/* ===== Donaciones: pastilla amarilla discreta, sin competir con el botón principal ===== */
.donate, .donate-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 18px 0 0; font-size: 15px; }
.donate { justify-content: center; text-align: center; }
.donate a, .donate-foot a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 22px; background: var(--foil); color: var(--ink);
  font-weight: 800; font-size: 15px; text-decoration: none;
  box-shadow: 0 2px 0 rgba(18, 21, 51, .28);
  transition: transform .15s ease, filter .15s ease;
}
.donate a::before, .donate-foot a::before { content: "☕" / ""; font-size: 17px; }
.donate a:hover, .donate-foot a:hover { filter: brightness(1.06); transform: translateY(-1px); }
.donate a:focus-visible, .donate-foot a:focus-visible { outline: 3px solid var(--ribbon); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .donate a, .donate-foot a { transition: none; } }
.donate-foot { margin: 18px 0 0; }

/* ===== Sorteo hecho: acciones secundarias, mismo ancho y mismo eje ===== */
.after { display: grid; grid-template-columns: 1fr; gap: 10px; }
.after .btn { width: 100%; background: #fff; border-color: #b9b29b; font-weight: 600; }
.after .btn:hover { background: var(--paper); border-color: var(--ink); }
.after + .fine, .after ~ .fine { max-width: none; text-align: center; }
@media (min-width: 560px) { .after { grid-template-columns: 1fr 1fr; } }

/* ===== Revelación compacta en móvil: etiqueta, presupuesto, fecha e ideas sin scroll ===== */
.pill.link { min-height: 44px; }
@media (max-width: 559px) {
  .reveal { padding-top: 6px; }
  .reveal h1 { font-size: 22px; }
  .reveal .sub { margin-top: 4px; font-size: 15px; }
  .reveal .tag-wrap { --w: 230px; margin-top: calc(var(--w) / 16 * 3.3); }
  .reveal .tag { aspect-ratio: 320 / 255; }
  .reveal .tag-body { inset: 3.1em 1.4em 3.5em; }
  .reveal .lbl { font-size: 1.45em; }
  .reveal .stamp { width: 2.4em; height: 2.4em; right: .9em; bottom: .8em; }
  .reveal .string { top: -3.3em; height: 5.6em; }
  .after-box { gap: 10px; margin-top: 14px; }
  #r-pills .pill { min-height: 34px; font-size: 14px; }
  #r-gifts { padding: 14px 14px 12px; }
  #r-gifts h2 { font-size: 19px; }
  #r-gifts .sub2 { margin: 2px 0 10px; font-size: 14px; }
  #r-gifts .disc { margin-top: 10px; font-size: 12.5px; line-height: 1.35; }
}
.pill.add { min-height: 44px; }
.own { display: inline-flex; align-items: center; min-height: 44px; }

/* símbolo de moneda dentro del campo de presupuesto (€ detrás en ES, $ delante en EN) */
.money { position: relative; display: block; }
.money::after { content: attr(data-cur); position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.money input { padding-right: 34px; }
.money[data-pre]::after { right: auto; left: 14px; }
.money[data-pre] input { padding-right: 14px; padding-left: 30px; }

/* enlace común: campo + botón de copiar en la misma fila */
.linkrow { display: flex; gap: 8px; }
.linkrow input { flex: 1 1 auto; min-width: 0; }
.linkrow .btn { flex: none; }
.linkbox .acts .btn.wa { flex: 1 1 100%; }

/* ===== Revelación: tarjeta de ideas (papel, como las guías), calendario secundario, Ko-fi discreto ===== */
.after-box .gifts { max-width: 30em; margin-top: 4px; padding: 18px 18px 16px; border: 0; border-radius: var(--r-lg); background: var(--paper); color: var(--ink); box-shadow: 0 10px 24px -14px rgba(8,10,60,.6); }
.after-box .gifts h2 { color: var(--ink); }
.after-box .gifts .sub2 { color: var(--muted); }
.after-box .gifts .disc { color: var(--muted); }
.pill.add { background: transparent; border: 1.5px solid rgba(255,255,255,.6); color: var(--paper); font-weight: 600; }
.pill.add svg { color: var(--paper); }
.pill.add:hover { background: rgba(255,255,255,.1); filter: none; }
.after-box .donate { margin: 0; gap: 0 6px; color: #dfe1ff; font-size: 14px; }
.after-box .donate a { min-height: 44px; padding: 0 4px; background: none; box-shadow: none; border-radius: 0; color: var(--paper); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.after-box .donate a::before { content: none; }
.after-box .donate a:hover { transform: none; }

/* ===== Rasca y gana ===== */
.to { overflow: hidden; border-radius: 6px 6px 0 0; }
.scratch { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .35s; }
.reveal .btn.skip { margin-top: 22px; color: var(--paper); border-color: rgba(255,255,255,.6); }
.reveal .btn.skip:hover { background: rgba(255,255,255,.1); }
@media (prefers-reduced-motion: reduce) { .scratch { transition: none; } }

/* ===== Revelación: línea legal mínima, como el nav del pie ===== */
.legal-min { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; margin-top: 6px; font-size: 13px; }
.legal-min a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--paper); text-underline-offset: 3px; }
.legal-min a + a::before { content: "·"; margin-right: 12px; margin-left: -4px; text-decoration: none; display: inline-block; color: #cfd1ff; }

/* ===== Etiqueta de la revelación: solo "Regalas a:" + nombre; la lámina cubre únicamente la zona del nombre ===== */
#r-tag .tag { aspect-ratio: 320 / 360; }
#r-tag .tag-body { inset: 4.1em 1.5em 4.6em; }
#r-tag .to { border: 0; margin: .3em 0 0; border-radius: 6px; }
#r-tag .to-name { clip-path: none; }
#r-tag.revealed .to-name { animation: pop .25s ease-out both; }
@keyframes pop { from { transform: scale(.96); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #r-tag.revealed .to-name { animation: none; } }
@media (max-width: 559px) { #r-tag .tag { aspect-ratio: 320 / 295; } #r-tag .tag-body { inset: 2.9em 1.4em 3.3em; } }

/* "No soy X": enlace discreto bajo el botón principal */
.btn.linkbtn, .linkbtn { justify-self: center; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink); font: 600 15px var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ===== Aviso de afiliado simplificado: enlace "Más información" con tap target de 44 px ===== */
.after-box .gifts .disc a { display: flex; align-items: center; justify-content: center; min-height: 44px; color: var(--cobalt); font-weight: 700; text-underline-offset: 3px; }

/* ===== Lazo de regalo al revelar (solo transform y opacity) ===== */
.bow { position: absolute; left: calc(50% - 2.8em); top: -1.8em; width: 5.6em; height: 4.48em; overflow: visible; pointer-events: none; opacity: 0; transform-origin: 50% 35%; }
.bow .tail { transform-box: fill-box; transform-origin: 50% 0; }
.bow .sp { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
#r-tag.revealed .bow { opacity: 1; animation: bow-in .5s cubic-bezier(.3,1.3,.5,1) both; }
#r-tag.revealed .bow .tail { animation: bow-tail .75s ease-out .3s both; }
#r-tag.revealed .bow .tr { animation-name: bow-tail-r; }
#r-tag.revealed .bow .sp { animation: bow-spark .5s ease-in-out both; }
#r-tag.revealed .bow .s1 { animation-delay: .35s; } #r-tag.revealed .bow .s2 { animation-delay: .5s; }
#r-tag.revealed .bow .s3 { animation-delay: .65s; } #r-tag.revealed .bow .s4 { animation-delay: .8s; }
@keyframes bow-in { 0% { transform: scale(0); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes bow-tail { 0% { transform: scaleY(0); } 55% { transform: scaleY(1.04) rotate(-4deg); } 80% { transform: scaleY(1) rotate(2deg); } 100% { transform: scaleY(1) rotate(0); } }
@keyframes bow-tail-r { 0% { transform: scaleY(0); } 55% { transform: scaleY(1.04) rotate(4deg); } 80% { transform: scaleY(1) rotate(-2deg); } 100% { transform: scaleY(1) rotate(0); } }
@keyframes bow-spark { 0% { opacity: 0; transform: scale(.3); } 40% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(.6); } }
@media (prefers-reduced-motion: reduce) {
  #r-tag.revealed .bow, #r-tag.revealed .bow .tail { animation: none; }
  .bow .sp { display: none; }
}

.after-box .gifts .disc b { color: var(--ink); }
/* ===== Ideas de regalo: mismo lenguaje que los botones (borde ink, sombra dura, sin degradados) ===== */
.gtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; text-align: left; }
.gtiles.three { grid-template-columns: repeat(3, 1fr); }
.gtile { display: flex; align-items: center; min-height: 64px; padding: 8px 12px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-md); box-shadow: 3px 3px 0 var(--ink); text-decoration: none; text-align: left; transition: transform .1s, box-shadow .1s; }
.gtile:hover, .gtile:focus-visible { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.gtile:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.gtile:active { transform: translate(2px, 2px); box-shadow: none; }
.gtxt { display: grid; gap: 2px; min-width: 0; }
.gtxt b { font: 800 17px/1.2 var(--font); }
.gtiles:not(.three) .gtxt b { white-space: nowrap; }
.gtxt small { font: 400 14px/1.25 var(--font); color: var(--muted); }
.gtile.hot { background: var(--ribbon); }
.gtile.hot small { color: var(--ink); }
.gtile.main { grid-column: 1 / -1; min-height: 72px; }
.gtile.thin .gtxt b { display: grid; gap: 0; }
.gtile.thin .up { font: 400 13px/1.2 var(--font); }
.gtile.thin .amt { font: 400 30px/1 var(--hand); white-space: nowrap; }
.gtiles:not(.three) .gtile:not(.main) { min-height: 76px; }
.gtile .price { display: inline-block; margin-left: 4px; padding: 2px 12px; background: var(--paper); color: var(--ink); font: 400 30px/1 var(--hand); vertical-align: -3px; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px); }
.gtile.wide { grid-column: 1 / -1; }
@media (max-width: 339px) { .gtiles:not(.three) { grid-template-columns: 1fr; } .gtile { padding: 8px 10px; } }
@media (prefers-reduced-motion: reduce) { .gtile { transition: none; } }

/* guías: enlaces de listas de compra y "Más información" con zona táctil de 44 px */
.article .linklist { list-style: none; padding-left: 0; }
.article .linklist li { margin: 0; }
.article .linklist a, .article a.tap { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }

/* portada: sin línea punteada, que sin "De:" chocaba con el sello */
.hero-tag .to { border: 0; }

/* portada: tarjetas de ideas con el mismo diseño que el resultado */
.gift-ideas .gtiles { max-width: 34em; margin: 14px 0; }

/* pie: enlace a la web del titular */
.madeby { margin-top: 6px; }
.madeby a { display: inline-flex; align-items: center; min-height: 44px; color: var(--paper); text-underline-offset: 3px; }
