/* Chamba Scan: estilo "neo-brutalista" juguetón. Sin fuentes externas = carga instantánea. */
:root {
  --bg: #fff8ee;
  --ink: #17112b;
  --muted: #5b5470;
  --card: #ffffff;
  --violeta: #7c3aed;
  --lima: #c6f432;
  --rosa: #ff6fae;
  --cielo: #6ad5ff;
  --mango: #ffc23d;
  --borde: 3px solid var(--ink);
  --sombra: 5px 5px 0 var(--ink);
  --radio: 18px;
  --fuente: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120d22;
    --ink: #f4efff;
    --muted: #b8afd0;
    --card: #1e1636;
    --sombra: 5px 5px 0 #000;
    --borde: 3px solid #f4efff;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
a { color: var(--violeta); font-weight: 700; }
@media (prefers-color-scheme: dark) { a { color: var(--lima); } }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); margin: .2em 0; font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-top: 2em; font-weight: 850; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--lima); color: #17112b; padding: .5rem 1rem; z-index: 9; }

/* ---- barra superior ---- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  max-width: 980px; margin: 0 auto; padding: 1rem 1.2rem;
}
.logo {
  font-weight: 900; font-size: 1.5rem; text-decoration: none; color: var(--ink);
  letter-spacing: -0.04em; white-space: nowrap;
}
@media (max-width: 480px) {
  .topbar nav { gap: .25rem .8rem; justify-content: flex-end; }
  .topbar nav a { font-size: .85rem; }
}
.logo span { background: var(--lima); color: #17112b; padding: 0 .3em; border-radius: 8px; margin-left: 2px; transform: rotate(-3deg); display: inline-block; }
.topbar nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.topbar nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { text-decoration: underline wavy var(--rosa); }

main { max-width: 980px; margin: 0 auto; padding: 0 1.2rem 3rem; }

/* ---- portada ---- */
.hero { padding: 2.5rem 0 1rem; }
.pill {
  display: inline-block; background: var(--card); border: var(--borde); border-radius: 999px;
  padding: .2rem .9rem; font-size: .85rem; font-weight: 700; box-shadow: 3px 3px 0 var(--ink);
}
.subrayado { background: linear-gradient(transparent 55%, var(--rosa) 55%); padding: 0 .1em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.lead strong { color: var(--ink); }
.btn, .calc button {
  display: inline-block; font: inherit; font-weight: 850; font-size: 1.1rem; cursor: pointer;
  background: var(--lima); color: #17112b; border: 3px solid #17112b; border-radius: 14px;
  padding: .75rem 1.4rem; box-shadow: 4px 4px 0 #17112b; text-decoration: none;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover, .calc button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #17112b; }
.btn:active, .calc button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #17112b; }

/* ---- tarjetas ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem; }
.card {
  display: flex; flex-direction: column; gap: .4rem; padding: 1.2rem; min-height: 190px;
  border: 3px solid #17112b; border-radius: var(--radio); box-shadow: 5px 5px 0 #17112b;
  color: #17112b; text-decoration: none; font-weight: 500; transition: transform .12s;
}
.card:hover { transform: rotate(-1.2deg) translateY(-4px); }
.card strong { font-size: 1.2rem; line-height: 1.2; }
.card span { font-size: .95rem; }
.card-emoji { font-size: 2.2rem !important; }
.card-go { margin-top: auto; font-weight: 850; }
.c0 { background: var(--lima); } .c1 { background: var(--cielo); }
.c2 { background: var(--rosa); } .c3 { background: var(--mango); }

.porque .tres { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.porque .tres div { background: var(--card); border: var(--borde); border-radius: var(--radio); padding: 1.2rem; box-shadow: var(--sombra); }
.porque .tres span { font-size: 2rem; }
.porque h3 { margin: .3rem 0; }
.porque p { margin: 0; color: var(--muted); }

/* ---- páginas ---- */
.migas { font-size: .9rem; color: var(--muted); padding-top: 1rem; }
.hero-mini { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.hero-emoji {
  font-size: 2.6rem; background: var(--lima); border: 3px solid #17112b; border-radius: 16px;
  width: 4.2rem; height: 4.2rem; display: grid; place-items: center; box-shadow: 4px 4px 0 #17112b;
  transform: rotate(-6deg);
}

/* ---- calculadoras ---- */
.calc {
  display: grid; gap: 1rem; background: var(--card); border: var(--borde); border-radius: var(--radio);
  padding: 1.4rem; box-shadow: var(--sombra); margin: 1.5rem 0;
}
.calc label { display: grid; gap: .35rem; font-weight: 750; }
.calc small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.calc input[type=number], .calc input[type=date] {
  font: inherit; font-size: 1.15rem; padding: .65rem .8rem; border: var(--borde); border-radius: 12px;
  background: var(--bg); color: var(--ink); width: 100%; max-width: 22rem;
}
.calc input:focus { outline: 4px solid var(--cielo); outline-offset: 2px; }
.money { position: relative; display: block; max-width: 22rem; }
.money::before { content: "$"; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); font-weight: 850; }
.money input { padding-left: 1.8rem !important; }
.calc .check { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.calc .check input { width: 1.3rem; height: 1.3rem; accent-color: var(--violeta); }
.calc button { justify-self: start; }

.result:empty { display: none; }
.result {
  background: var(--violeta); color: #fff; border: 3px solid #17112b; border-radius: var(--radio);
  padding: 1.5rem; box-shadow: 5px 5px 0 #17112b; animation: pop .35s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.result .big { font-size: clamp(2.4rem, 8vw, 3.6rem); font-weight: 900; line-height: 1; margin: .2rem 0 .6rem; letter-spacing: -0.03em; }
.result .label { text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; font-weight: 800; opacity: .85; }
.result .error { background: var(--rosa); color: #17112b; padding: .6rem .9rem; border-radius: 10px; font-weight: 700; }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 1rem 0; }
.result dt { opacity: .9; } .result dd { margin: 0; font-weight: 800; text-align: right; }
.result .fun { background: var(--lima); color: #17112b; border-radius: 12px; padding: .7rem 1rem; font-weight: 700; margin-top: 1rem; }
.result .share {
  margin-top: 1rem; background: #fff; color: #17112b; border: 2px solid #17112b; border-radius: 10px;
  padding: .45rem .9rem; font: inherit; font-weight: 800; cursor: pointer;
}
.barra { display: flex; height: 26px; border-radius: 999px; overflow: hidden; border: 2px solid #17112b; margin: 1rem 0 .4rem; background: #fff; }
.barra span { display: block; height: 100%; transition: width .6s ease; }
.leyenda { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; }
.leyenda i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; border: 1px solid #17112b; margin-right: .3rem; vertical-align: -1px; }

/* ---- explicaciones ---- */
.explica, .faqs { max-width: 46rem; }
.pasos { padding-left: 1.3rem; }
.pasos li { margin: .5rem 0; }
.pasos li::marker { font-weight: 900; color: var(--violeta); }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 1.8rem; position: relative; margin: .5rem 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; font-weight: 900; background: var(--lima); color: #17112b; border-radius: 6px; width: 1.3rem; text-align: center; }
.dato {
  display: flex; gap: 1rem; align-items: flex-start; background: var(--mango); color: #17112b;
  border: 3px solid #17112b; border-radius: var(--radio); padding: 1rem 1.2rem; box-shadow: 4px 4px 0 #17112b; margin: 1.5rem 0;
}
.dato p { margin: 0; } .dato a { color: #17112b; }
.dato-emoji { font-size: 2rem; }
.nota { font-size: .9rem; color: var(--muted); }
.tabla-wrap { overflow-x: auto; }
.tabla { border-collapse: collapse; min-width: 300px; background: var(--card); border: var(--borde); border-radius: 12px; overflow: hidden; }
.tabla th, .tabla td { padding: .45rem 1.2rem; text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
.tabla th { background: var(--ink); color: var(--bg); }
.tabla .tu { background: var(--lima); color: #17112b; font-weight: 800; }

.faq { background: var(--card); border: var(--borde); border-radius: 14px; margin: .7rem 0; box-shadow: 3px 3px 0 var(--ink); }
.faq summary { cursor: pointer; padding: .8rem 1rem; font-weight: 800; list-style: none; }
.faq summary::after { content: "+"; float: right; font-weight: 900; }
.faq[open] summary::after { content: "–"; }
.faq div { padding: 0 1rem .4rem; color: var(--muted); }

.mas { margin-top: 3rem; }

/* ---- pie ---- */
.footer { border-top: var(--borde); padding: 1.5rem 1.2rem 2.5rem; max-width: 980px; margin: 2rem auto 0; }
.footer .small { font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- finiquito / liquidación ---- */
.result .small-note { font-size: .85rem; opacity: .9; margin: .3rem 0; }
.calc select {
  font: inherit; font-size: 1.05rem; padding: .6rem .8rem; border: var(--borde); border-radius: 12px;
  background: var(--bg); color: var(--ink); max-width: 22rem;
}
.calc .opciones { border: 2px dashed color-mix(in srgb, var(--ink) 40%, transparent); border-radius: 12px; padding: .6rem 1rem; }
.calc .opciones summary { cursor: pointer; font-weight: 800; }
.calc .opciones[open] { display: grid; gap: 1rem; }
.fuentes { background: var(--card); border: var(--borde); border-radius: var(--radio); padding: 1rem 1.3rem; margin: 2rem 0; max-width: 46rem; box-shadow: 3px 3px 0 var(--ink); }
.fuentes h2 { margin-top: 0; font-size: 1.2rem; }
.fuentes ul { margin: 0; padding-left: 1.2rem; }
.fuentes li { margin: .3rem 0; font-size: .95rem; }
.alerta { background: var(--rosa); color: #17112b; border: 3px solid #17112b; border-radius: var(--radio); padding: 1rem 1.2rem; box-shadow: 4px 4px 0 #17112b; margin: 1.5rem 0; }
.alerta a { color: #17112b; }
.derechos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.derecho { background: var(--card); border: var(--borde); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: 3px 3px 0 var(--ink); }
.derecho h3 { margin: .2rem 0 .4rem; font-size: 1.1rem; }
.derecho p { margin: 0 0 .5rem; color: var(--muted); font-size: .95rem; }
.derecho .art { font-size: .8rem; font-weight: 800; background: var(--lima); color: #17112b; border-radius: 6px; padding: .1rem .45rem; display: inline-block; }
.banner-derechos { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--violeta); color: #fff; border: 3px solid #17112b; border-radius: var(--radio); padding: 1.3rem; box-shadow: 5px 5px 0 #17112b; margin-top: 2.5rem; }
.banner-derechos h2 { margin: 0; color: #fff; }
.banner-derechos p { margin: .3rem 0 0; }
.banner-derechos .btn { margin-left: auto; }

/* ---- copy Gen Z: resultados, badges, estado vacío ---- */
.sueldo-fila { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.sueldo-fila .money { flex: 1 1 13rem; }
.calc input::placeholder { font-size: .9rem; opacity: .7; }
.result .titulo-res { font-weight: 900; font-size: 1.15rem; margin: 0 0 .6rem; }
.result--vacio {
  background: var(--card); color: var(--muted); border-style: dashed; box-shadow: none; animation: none;
}
.result--vacio .vacio { margin: 0; font-weight: 700; text-align: center; }
.badge { border: 2px solid #17112b; border-radius: 12px; padding: .65rem .9rem; margin: .7rem 0; font-size: .95rem; color: #17112b; }
.badge a { color: #17112b; }
.badge-green { background: #b8f5c9; }
.badge-red { background: #ffd0d6; }
.acciones { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.acciones .share { margin-top: 0; text-align: left; }
.share-alt { background: transparent !important; color: #fff !important; border-color: #fff !important; }

/* "Guardar captura": al imprimir / guardar PDF sólo queda el resultado */
@media print {
  body { background: #fff; }
  .topbar, .footer, .migas, .lead, form.calc, .explica, .faqs, .mas, .fuentes, .alerta, .acciones, .skip { display: none !important; }
  .result { box-shadow: none; animation: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result::after { content: "Calculado en chambascan.com · estimación con cifras oficiales"; display: block; margin-top: 1rem; font-size: .8rem; }
}

/* Celulares angostos: el menú baja debajo del logo */
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; row-gap: .4rem; }
  .topbar nav { width: 100%; justify-content: flex-start; }
}

/* Aviso de privacidad simplificado (sólo aparece si hay anuncios activos) */
.aviso-cookies {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 20; max-width: 46rem; margin: 0 auto;
  background: var(--card); color: var(--ink); border: var(--borde); border-radius: 14px; box-shadow: var(--sombra);
  padding: .9rem 1rem; display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; font-size: .85rem;
}
.aviso-cookies[hidden] { display: none; }
.aviso-cookies p { margin: 0; flex: 1 1 20rem; }
.aviso-cookies button { font: inherit; font-weight: 850; background: var(--lima); color: #17112b; border: 2px solid #17112b; border-radius: 10px; padding: .45rem 1rem; cursor: pointer; }
@media print { .aviso-cookies { display: none !important; } }

/* ================= Portada con superpoderes ================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-home { padding-top: 1.5rem; }
.hero-home .lead { margin: .3rem 0 1rem; }

/* Buscador por situación */
.buscador {
  display: flex; align-items: center; gap: .6rem; max-width: 36rem;
  background: var(--card); border: var(--borde); border-radius: 999px; padding: .35rem .5rem .35rem 1rem;
  box-shadow: var(--sombra);
}
.buscador input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 1.05rem; padding: .55rem 0; outline: none;
}
.buscador:focus-within { outline: 4px solid var(--cielo); outline-offset: 3px; }

/* Situaciones: tarjetas grandes, fáciles de tocar */
.situaciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.sit {
  display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; min-height: 150px;
  border: 3px solid #17112b; border-radius: var(--radio); box-shadow: 5px 5px 0 #17112b;
  color: #17112b; text-decoration: none; font-weight: 500; transition: transform .12s;
}
.sit:hover, .sit:focus-visible { transform: translateY(-4px) rotate(-1deg); }
.sit:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #17112b; }
.sit[hidden] { display: none; }
.sit strong { font-size: 1.2rem; line-height: 1.2; }
.sit-emoji { font-size: 2rem; }
.sit-txt { font-size: .9rem; }
.sit-tiempo { margin-top: auto; font-size: .8rem; font-weight: 800; background: #ffffffb0; border-radius: 999px; padding: .1rem .6rem; align-self: flex-start; }
.sin-resultados { font-weight: 700; margin-top: 1rem; }

/* Cálculo rápido */
.rapida {
  margin-top: 2.5rem; background: var(--card); border: var(--borde); border-radius: var(--radio);
  padding: 1.3rem; box-shadow: var(--sombra); display: grid; gap: .9rem;
}
.rapida-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.rapida h2 { margin: 0; }
.cuenta { margin: 0; background: var(--rosa); color: #17112b; border: 2px solid #17112b; border-radius: 999px; padding: .25rem .8rem; font-weight: 800; font-size: .9rem; }
.rapida-campo { display: grid; gap: .35rem; font-weight: 750; }
.rapida-campo input { font: inherit; font-size: 1.2rem; padding: .65rem .8rem; border: var(--borde); border-radius: 12px; background: var(--bg); color: var(--ink); width: 100%; }
.rapida-res { margin: 0; font-size: 1.05rem; }
.rapida-res strong { font-size: 2rem; display: block; letter-spacing: -0.02em; }
.rapida .btn { justify-self: start; }

/* Stories deslizables */
.stories { margin-top: 2.5rem; }
.desliza { font-size: .85rem; font-weight: 700; color: var(--muted); margin-left: .4rem; }
.stories-fila {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 70%); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: .3rem .3rem 1.2rem; overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
@media (min-width: 760px) { .stories-fila { grid-auto-columns: minmax(230px, 31%); } }
.dato-story {
  scroll-snap-align: start; display: flex; flex-direction: column; gap: .6rem; min-height: 210px;
  background: var(--violeta); color: #fff; border: 3px solid #17112b; border-radius: 22px; padding: 1.2rem;
  box-shadow: 5px 5px 0 #17112b; text-decoration: none; font-weight: 500;
}
.dato-story:nth-child(3n+2) { background: #17112b; }
.dato-story:nth-child(3n+3) { background: #0f766e; }
.dato-story p { margin: 0; font-size: 1.15rem; line-height: 1.35; }
.ds-emoji { font-size: 2rem; }
.ds-art { margin-top: auto; font-size: .8rem; font-weight: 800; opacity: .9; }

/* Barra inferior tipo app (sólo celular) */
.barra-inferior { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: 4.6rem; }
  .barra-inferior {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    background: var(--card); border-top: var(--borde); padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .barra-inferior a {
    display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .35rem 0; border-radius: 12px;
    font-size: .72rem; font-weight: 800; color: var(--ink); text-decoration: none; min-height: 48px; justify-content: center;
  }
  .barra-inferior a span { font-size: 1.3rem; line-height: 1; }
  .barra-inferior a[aria-current="page"] { background: var(--lima); color: #17112b; }
  .aviso-cookies { bottom: 5rem; }
  .situaciones { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .sit { min-height: 130px; padding: .85rem; }
  .sit strong { font-size: 1.02rem; }
  .sit-txt { display: none; }
}
@media print { .barra-inferior { display: none !important; } }
/* En celular el menú de arriba se oculta: la barra inferior lo reemplaza */
@media (max-width: 700px) { .topbar nav { display: none; } }
@media (max-width: 700px) { .situaciones { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-right: 5px; } }
@media (max-width: 330px) { .situaciones { grid-template-columns: minmax(0, 1fr); } }

/* Aviso simplificado v3: una línea discreta; la letra legal se despliega */
.aviso-cookies { align-items: center; padding: .55rem .8rem; gap: .4rem .8rem; font-size: .8rem; box-shadow: 3px 3px 0 var(--ink); }
.aviso-linea { flex: 1 1 18rem; }
.aviso-cookies button { padding: .3rem .8rem; }
.aviso-legal { flex: 1 1 100%; font-size: .7rem; line-height: 1.4; color: var(--muted); }
.aviso-legal summary { cursor: pointer; font-weight: 700; }
.aviso-legal p { margin: .3rem 0 0; }
@media (max-width: 700px) {
  .aviso-cookies { left: .5rem; right: .5rem; max-height: 45vh; overflow-y: auto; }
}

/* Páginas legales: sobrias, sin adornos */
.sobria { max-width: 46rem; font-size: .95rem; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sobria h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.sobria h2, .sobria h3 { font-size: 1em; font-weight: normal; line-height: inherit; letter-spacing: 0; margin: 6px 0; }
.sobria strong, .sobria b { font-weight: inherit; }
.sobria a { font-weight: normal; }
.sobria ul, .sobria ol { padding-left: 1.3rem; }
.sobria li, .sobria p, .sobria ul, .sobria ol { margin: 6px 0; }
.sobria .fuentes { box-shadow: none; border-width: 1px; }

/* Días festivos y tablas grandes */
.proximo {
  background: var(--lima); color: #17112b; border: 3px solid #17112b; border-radius: var(--radio);
  padding: 1rem 1.2rem; box-shadow: 5px 5px 0 #17112b; margin: 1.2rem 0; font-weight: 700;
}
.proximo strong { font-size: 1.4rem; display: block; }
.tabla caption { caption-side: top; text-align: left; font-weight: 800; padding: .6rem 0; color: var(--ink); }
.tabla-festivos td:first-child, .tabla-aguinaldo td:first-child { white-space: nowrap; }
.tabla-festivos tr.ya-paso { opacity: .45; }
.tabla-festivos tr.siguiente { background: var(--lima); color: #17112b; font-weight: 700; }
.tabla small { font-weight: 500; opacity: .8; }

/* En celular, las tablas grandes se vuelven tarjetas (una por fila) */
@media (max-width: 700px) {
  .tabla-festivos, .tabla-aguinaldo { min-width: 0; width: 100%; border: 0; background: transparent; }
  .tabla-festivos thead, .tabla-aguinaldo thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabla-festivos tr, .tabla-aguinaldo tr {
    display: block; background: var(--card); border: var(--borde); border-radius: 14px; margin: 0 0 .8rem;
    padding: .6rem .9rem; box-shadow: 3px 3px 0 var(--ink);
  }
  .tabla-festivos td, .tabla-aguinaldo td { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; border: 0; text-align: right; white-space: normal !important; }
  .tabla-festivos td::before, .tabla-aguinaldo td::before { content: attr(data-label); font-weight: 600; opacity: .7; text-align: left; }
  .tabla-festivos td:first-child, .tabla-aguinaldo td:first-child { font-size: 1.05rem; }
  .tabla-festivos td:first-child::before, .tabla-aguinaldo td:first-child::before { display: none; }
  .tabla-festivos tr.siguiente, .tabla-aguinaldo tr.tu { background: var(--lima); }
}

/* Campos de texto (carta de renuncia) */
.calc input[type=text] {
  font: inherit; font-size: 1.05rem; padding: .65rem .8rem; border: var(--borde); border-radius: 12px;
  background: var(--bg); color: var(--ink); width: 100%; max-width: 30rem;
}

/* La carta: hoja de papel dentro del resultado */
.carta {
  background: #fff; color: #111; border-radius: 10px; padding: 1.4rem 1.3rem; margin: .6rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.6; box-shadow: inset 0 0 0 1px #ddd;
}
.carta p { margin: 0 0 .9rem; }
.carta-der { text-align: right; }
.carta .firma { margin-top: 2.2rem; }

@media print {
  .result[data-out="renuncia"] { background: #fff !important; color: #000; border: 0; padding: 0; }
  .result[data-out="renuncia"]::after { content: none !important; }
  .result[data-out="renuncia"] > :not(.carta) { display: none !important; }
  .result[data-out="renuncia"] .carta { box-shadow: none; padding: 0; font-size: 12pt; }
  .hero-mini { display: none !important; }
  body:has(.result[data-out="renuncia"] .carta) .hero-mini { display: none !important; }
}

/* Modo adulto: checklist por etapa */
.etapa { background: var(--card); border: var(--borde); border-radius: var(--radio); padding: 1rem 1.2rem; margin: 1.4rem 0; box-shadow: var(--sombra); }
.etapa h2 { margin: 0 0 .3rem; }
.etapa-progreso { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: .9rem; margin: 0 0 .6rem; }
.barra-prog { flex: 0 1 12rem; height: 12px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--bg); }
.barra-prog span { display: block; height: 100%; background: var(--lima); transition: width .3s; }
.check-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.check-lista label { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .5rem; border-radius: 12px; cursor: pointer; }
.check-lista label:hover { background: color-mix(in srgb, var(--lima) 25%, transparent); }
.check-lista input { width: 1.5rem; height: 1.5rem; flex: none; margin-top: .15rem; accent-color: var(--violeta); }
.check-lista input:checked + span { opacity: .65; }

/* Escáner de recibo */
.calc .check { align-items: flex-start; font-weight: 500; }
.calc .check input { margin-top: .2rem; flex: none; }
.result .hallazgos { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .5rem; }
.result .hallazgos li { display: flex; gap: .6rem; background: #ffffff1f; border-radius: 10px; padding: .55rem .7rem; font-size: .95rem; }

/* Glosario */
.buscador-glosario { margin: 1rem 0; }
.glosario { display: grid; gap: .8rem; margin: 1.2rem 0 2rem; }
.glosario > div { background: var(--card); border: var(--borde); border-radius: 14px; padding: .8rem 1rem; box-shadow: 3px 3px 0 var(--ink); scroll-margin-top: 1rem; }
.glosario > div[hidden] { display: none; }
.glosario > div:target { background: var(--lima); color: #17112b; }
.glosario dt { font-weight: 900; font-size: 1.1rem; }
.glosario dd { margin: .25rem 0 0; color: var(--muted); }
.glosario > div:target dd { color: #17112b; }
