/* Recibito · estilos. Pensado para leer fácil: letra grande, alto contraste, botones grandes. */
:root {
  --bg: #09090a;
  --bg-2: #111113;
  --card: #161618;
  --card-2: #1d1d20;
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.24);
  --text: #f7f6f3;
  --muted: #d4d1ca;
  --blue: #3b82f6;
  --sky: #38bdf8;
  --blue-soft: #93c5fd;
  --grad: linear-gradient(120deg, #3b82f6, #38bdf8);
  --ink: #04101f;
  --gold: #d6b264;
  --gold-soft: #ead7a4;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --radius: 18px;
}
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
html.letra-1 { font-size: 21px; }
html.letra-2 { font-size: 24px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh;
  background-image: radial-gradient(90% 50% at 0% 0%, rgba(59, 130, 246, 0.16), transparent 60%),
                    radial-gradient(70% 40% at 100% 0%, rgba(56, 189, 248, 0.10), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--blue-soft); }
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 10px; }

.contenedor { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Encabezado */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 9, 10, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.cabecera::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); opacity: .85; }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.marca { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.marca img { width: 38px; height: 38px; border-radius: 10px; }
.btn-letra {
  min-height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--card); font-weight: 600; font-size: 16px; cursor: pointer; white-space: nowrap;
}
/* El encabezado no crece con «Letra más grande», así siempre entra en la pantalla. */
.btn-letra b { font-size: 1.05em; margin-right: 4px; }

/* main también es .contenedor: hay que ganarle al padding de .contenedor. */
main.contenedor { padding-top: 24px; padding-bottom: 40px; }

/* Tipografía */
h1 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.03em; font-weight: 650; }
h1 em, .acento { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; }
h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
h3 { font-size: 1.08rem; font-weight: 650; }
p { color: var(--text); }
.suave { color: var(--muted); }
.chico { font-size: .9rem; }
.espacio > * + * { margin-top: 16px; }
.espacio-grande > * + * { margin-top: 24px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 22px; border-radius: 16px;
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--text);
  font-weight: 650; font-size: 1rem; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .15s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn-principal { background: var(--grad); color: var(--ink); border: none; box-shadow: 0 10px 30px -12px rgba(56, 189, 248, .6); }
.btn-ancho { width: 100%; }
.btn-peligro { border-color: rgba(248, 113, 113, .5); color: #fecaca; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .icono { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fila-botones { display: flex; flex-wrap: wrap; gap: 12px; }
.fila-botones > .btn { flex: 1 1 220px; }
.btn-volver { min-height: 48px; padding: 8px 16px 8px 10px; border-radius: 999px; font-size: .95rem; }

/* Etiqueta Pro */
.pro { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .9rem; font-weight: 700; letter-spacing: .04em;
  color: #1a1305; background: linear-gradient(120deg, #f6e8c3, var(--gold) 50%, #9c7a35); vertical-align: middle; }

/* Tarjetas */
.tarjeta { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.tarjeta-azul { background: linear-gradient(160deg, rgba(59,130,246,.22), rgba(56,189,248,.06) 60%), var(--card); border-color: rgba(96,165,250,.45); }
.monto { font-size: 2.3rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.monto-medio { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Menú de inicio */
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.menu .btn { justify-content: flex-start; text-align: left; min-height: 72px; padding: 14px 18px; }
.menu .btn .icono { width: 28px; height: 28px; color: var(--sky); }
.menu .btn small { display: block; font-weight: 500; color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* Detalle de cálculo */
.detalle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.detalle td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.detalle td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-weight: 600; }
.detalle .sub { display: block; color: var(--muted); font-size: .9rem; }
.detalle tr.total td { border-bottom: none; padding-top: 16px; font-size: 1.15rem; font-weight: 700; }
.detalle tr.resta td:last-child { color: #fecaca; }

/* Avisos */
.aviso { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(251,191,36,.45); background: rgba(251,191,36,.08); }
.aviso.info { border-color: rgba(96,165,250,.45); background: rgba(59,130,246,.10); }
.aviso.ok { border-color: rgba(74,222,128,.45); background: rgba(74,222,128,.08); }
.aviso p { font-size: .94rem; }
.aviso .simbolo { font-size: 1.2rem; line-height: 1.3; }
.legal { padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px dashed var(--line-2); font-size: .9rem; color: var(--muted); }
.legal b { color: var(--text); }

/* Asistente (preguntas de a una) */
.progreso { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.progreso .barra { flex: 1; height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.progreso .barra i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.pregunta h1 { font-size: 1.6rem; }
.opciones { display: grid; gap: 12px; }
.opcion {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left;
  padding: 16px 18px; min-height: 64px; border-radius: 16px; cursor: pointer;
  background: var(--card); border: 2px solid var(--line-2);
}
.opcion .marca-op { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; }
.opcion[aria-checked="true"] { border-color: var(--sky); background: rgba(56,189,248,.10); }
.opcion[aria-checked="true"] .marca-op { border-color: var(--sky); background: var(--sky); }
.opcion[aria-checked="true"] .marca-op::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.opcion b { display: block; font-size: 1.04rem; }
.opcion span.desc { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }

label.campo { display: block; font-weight: 600; }
label.campo > span { display: block; margin-bottom: 8px; }
label.campo small { display: block; font-weight: 400; color: var(--muted); margin-top: 6px; font-size: .9rem; }
input[type=text], input[type=number], input[type=date], input[type=month], select {
  width: 100%; min-height: 56px; padding: 12px 16px; border-radius: 14px;
  background: #0d0d0f; border: 2px solid var(--line-2); font-size: 1.05rem; color: var(--text);
}
input:focus, select:focus { border-color: var(--sky); outline: none; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .8; transform: scale(1.4); cursor: pointer; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }

/* Selector de horas por día */
.dias { display: grid; gap: 10px; }
.dia { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.dia.activo { border-color: rgba(96,165,250,.55); }
.dia b { font-size: 1.02rem; }
.contador { display: flex; align-items: center; gap: 8px; }
.contador button { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card-2); font-size: 1.5rem; font-weight: 700; cursor: pointer; }
.contador output { min-width: 4.6em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Navegación de meses */
.nav-mes { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.nav-mes h2 { text-align: center; }
.nav-mes .btn { min-height: 52px; padding: 8px 14px; font-size: .92rem; }

/* Listas de eventos e historial */
.lista { display: grid; gap: 10px; }
.evento { display: grid; grid-template-columns: 78px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.evento .cuando { text-align: center; border-radius: 12px; padding: 6px 4px; background: rgba(59,130,246,.15); border: 1px solid rgba(96,165,250,.35); }
.evento .cuando b { display: block; font-size: 1.5rem; line-height: 1.1; }
.evento .cuando span { font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.evento p { font-size: .9rem; color: var(--muted); }
.evento.pronto .cuando { background: rgba(251,191,36,.16); border-color: rgba(251,191,36,.5); }

/* Pie */
.pie { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.pie .titular { margin-top: 12px; }
.pie .links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 12px; }
.pie a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 48px; display: inline-flex; align-items: center; }
.pie .zojim { color: var(--gold-soft); }

/* Mensaje de confirmación */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 60;
  max-width: calc(100% - 32px); padding: 16px 22px; border-radius: 16px; font-weight: 650;
  background: #ecfdf5; color: #052e16; box-shadow: 0 20px 50px -10px rgba(0,0,0,.7);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .3s; opacity: 0; pointer-events: none;
}
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #fef2f2; color: #450a0a; }

dialog { margin: auto; max-width: min(520px, calc(100% - 32px)); border: 1px solid var(--line-2); border-radius: 20px; padding: 24px; background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.7); }

.oculto { display: none !important; }
.centro { text-align: center; }
.separador { height: 1px; background: var(--line); margin: 8px 0; }
.dos-col { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

@media (min-width: 720px) {
  h1 { font-size: 2.1rem; }
  .pregunta h1 { font-size: 1.9rem; }
  main.contenedor { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .cabecera, .pie, .btn, .nav-mes .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
