/* ============================================================
   Closet Fácil Colombia — v2
   PWA mobile-first · paleta madera/melamina (OKLch cálidos)
   ============================================================ */

/* ---- Tokens (dirección: human-approachable, ajustada a tonos madera) ---- */
:root {
  /* Superficies */
  --bg:        oklch(96% 0.012 70);          /* melamina cruda cálida */
  --surface:   oklch(99% 0.004 70);          /* hoja blanca */
  --surface-2: oklch(94% 0.018 65);          /* panel tallado */
  --fg:        oklch(22% 0.020 55);          /* nogal oscuro */
  --muted:     oklch(48% 0.025 60);           /* madera media */
  --border:    oklch(86% 0.020 65);           /* canto melamina */

  /* Acentos de marca */
  --accent:    oklch(55% 0.135 58);           /* melamina nogal */
  --accent-ink:oklch(99% 0.010 70);           /* texto sobre nogal */
  --accent-soft:oklch(92% 0.045 60);          /* nogal tenue */

  /* Acento secundario (cobre/bronce — herrajes) */
  --metal:     oklch(62% 0.095 55);
  --metal-soft:oklch(90% 0.030 65);

  /* Estados */
  --ok:        oklch(58% 0.135 145);
  --warn:      oklch(70% 0.135 70);
  --danger:    oklch(58% 0.180 28);
  --pay:       oklch(54% 0.165 145);          /* Nequi/Daviplata */

  /* Tipografía */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Radios y elevación */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px oklch(22% 0.02 55 / 0.06), 0 1px 1px oklch(22% 0.02 55 / 0.04);
  --shadow-2: 0 4px 12px oklch(22% 0.02 55 / 0.10), 0 1px 3px oklch(22% 0.02 55 / 0.06);
  --shadow-3: 0 12px 32px oklch(22% 0.02 55 / 0.14), 0 4px 8px oklch(22% 0.02 55 / 0.06);

  /* Canto melamina (efecto físico sutil) */
  --edge-mel: linear-gradient(180deg, oklch(86% 0.020 65), oklch(70% 0.030 60));

  --maxw: 480px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ---- Reset ligero ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; } /* no bloquear zoom */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible {
  outline: 3px solid var(--metal);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Layout: app shell mobile-first ---- */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* ---- Barra superior ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: calc(12px + var(--safe-t)) 14px 10px;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
  text-align: center;
  line-height: 1.1;
}
.topbar__mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow-1);
}
.topbar__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.topbar__sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.topbar__btn {
  width: 44px; height: 44px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--fg);
  cursor: pointer;
}
.topbar__btn:hover { background: var(--surface-2); }
.topbar__btn:active { background: var(--accent-soft); }

/* ---- Progreso ---- */
.progress {
  padding: 10px 16px 4px;
}
.progress__bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--metal), var(--accent));
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(.2,.8,.2,1);
}
.progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.progress__step b { color: var(--fg); font-weight: 600; }

/* ---- Contenido principal ---- */
main {
  flex: 1;
  padding: 8px 16px 24px;
}
.screen { display: none; animation: fade .35s ease; }
.screen.is-active { display: block; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.headline {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 18px 0 4px;
  font-size: clamp(26px, 7vw, 32px);
}
.subhead {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 18px;
  max-width: 42ch;
}

/* ---- Bienvenida ---- */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 6px 0 0;
}
.welcome__hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(160deg, oklch(78% 0.08 70), oklch(48% 0.06 55));
  min-height: 188px;
  display: grid;
  place-items: end center;
  padding: 18px;
  box-shadow: var(--shadow-2);
}
.welcome__hero svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .92; }
.welcome__hero-tag {
  position: relative;
  z-index: 1;
  background: color-mix(in oklch, var(--surface) 92%, transparent);
  color: var(--fg);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-1);
}
.welcome__value {
  display: grid;
  gap: 10px;
}
.value-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.value-card__ic {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.value-card__t {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 2px;
}
.value-card__d {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.price-pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
}
.price-pill__amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.price-pill__methods {
  font-size: 12.5px;
  opacity: .9;
}

/* ---- Steps genéricos ---- */
.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  margin: 14px 0 2px;
  letter-spacing: -0.01em;
}
.step__hint {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 16px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.field__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.field__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

/* Stepper numérico */
.num {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.num__btn {
  border: none;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 26px;
  font-weight: 700;
  width: 48px;
  min-height: 56px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s;
}
.num__btn:hover { background: var(--accent-soft); }
.num__btn:active { background: color-mix(in oklch, var(--accent) 80%, var(--surface)); color: var(--accent-ink); }
.num__display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.num__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.num__unit {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Tarjetas de opción */
.options {
  display: grid;
  gap: 10px;
}
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
  min-height: 60px;
}
.opt:hover { border-color: var(--metal-soft); }
.opt:active { transform: scale(.985); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__ic {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--accent);
}
.opt__body { flex: 1 1 auto; min-width: 0; }
.opt__t { font-weight: 600; font-size: 15.5px; margin: 0; }
.opt__d { font-size: 13px; color: var(--muted); margin: 1px 0 0; line-height: 1.4; }
.opt__price { font-size: 13px; font-weight: 600; color: var(--accent); margin-left: auto; }
.opt.is-selected {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent) 8%, var(--surface));
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.opt.is-selected .opt__ic { background: var(--accent); color: var(--accent-ink); }

/* Chips de columnas / cantidades */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  flex: 1 1 0;
  min-width: 64px;
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--metal-soft); }
.chip.is-selected {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Toggle */
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  min-height: 52px;
}
.toggle__t { font-weight: 600; font-size: 15px; margin: 0; }
.toggle__d { font-size: 12.5px; color: var(--muted); margin: 1px 0 0; }
.switch {
  position: relative;
  width: 48px; height: 28px;
  flex: 0 0 auto;
}
.switch input { position: absolute; opacity: 0; }
.switch__track {
  position: absolute; inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background .2s;
}
.switch__knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-1);
  transition: transform .2s;
}
.switch input:checked ~ .switch__track { background: var(--accent); border-color: var(--accent); }
.switch input:checked ~ .switch__knob { transform: translateX(20px); }

/* ---- Plano SVG del resultado ---- */
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 12px 10px;
  box-shadow: var(--shadow-1);
  margin-bottom: 20px;
}
.plan__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 8px;
}
.plan__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.plan__dim { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan__svg {
  width: 100%;
  height: auto;
  background: oklch(97% 0.008 70);
  border-radius: 10px;
  display: block;
}
.plan__legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 7px 12px;
  margin-top: 10px;
  padding: 10px 6px 4px;
  font-size: 12px;
}
.legend__item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.legend__swatch {
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 1px solid oklch(70% 0.02 60 / .4);
  flex: 0 0 auto;
}

/* ---- Resumen materiales ---- */
.summary {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.summary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 2px 0;
}
.summary__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}
.summary__opt {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.mat-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.mat-row__ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.mat-row__t { font-weight: 600; font-size: 14.5px; margin: 0; line-height: 1.2; }
.mat-row__d { font-size: 12.5px; color: var(--muted); margin: 1px 0 0; }
.mat-row__qty {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mat-row__qty b { font-family: var(--font-display); font-size: 17px; }
.mat-row__qty span { font-size: 11.5px; color: var(--muted); display: block; }

.stat-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.stat {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  text-align: center;
}
.stat__n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.stat__l {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* ---- Pago / activación ---- */
.pay {
  position: relative;
  background: linear-gradient(160deg, color-mix(in oklch, var(--pay) 14%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in oklch, var(--pay) 30%, var(--border));
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
  margin-bottom: 18px;
  overflow: hidden;
}
.pay__lock-flare{
  position:absolute; top:-40px; right:-40px;
  width:120px; height:120px; border-radius:50%;
  background: color-mix(in oklch, var(--pay) 18%, transparent);
  filter: blur(8px); pointer-events:none;
}
.pay__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; position: relative;
}
.pay__ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--pay);
  color: #fff;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.pay__t { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 0; }
.pay__d { font-size: 12.5px; color: var(--muted); margin: 1px 0 0; }

.pay__methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.method {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
}
.method__ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.method--nequi .method__ic { background: oklch(56% 0.18 250); }
.method--daviplata .method__ic { background: oklch(58% 0.15 145); }

.pay__code {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.code-box {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  text-align: center;
}
.code-box__l { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.code-box__v {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--fg);
  margin-top: 2px;
}
.code-box--locked .code-box__v { color: var(--muted); filter: blur(3px); user-select: none; }

.pay__cta {
  display: block;
  width: 100%;
  border: none;
  background: var(--pay);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  min-height: 52px;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-2);
  transition: transform .12s, background .15s;
}
.pay__cta:hover { background: oklch(50% 0.165 145); }
.pay__cta:active { transform: scale(.98); }
.pay__cta:disabled { background: var(--muted); cursor: not-allowed; opacity: .7; box-shadow: none; }
.pay__cta-note { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 8px; }

.activation {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.activation__input {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--fg);
  min-height: 52px;
  text-transform: uppercase;
}
.activation__input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.activation__input::placeholder { color: var(--muted); letter-spacing: 0.18em; font-size: 13px; }
.activation__btn {
  flex: 0 0 auto;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 0 18px;
  border-radius: var(--r-md);
  min-height: 52px;
  cursor: pointer;
}
.activation__btn:hover { background: oklch(48% 0.135 58); }

/* ---- Botones de descarga ---- */
.downloads {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.dl {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid;
  background: var(--surface);
  text-decoration: none;
  min-height: 52px;
  transition: transform .12s, box-shadow .15s;
  opacity: .5;
  pointer-events: none;
}
.dl.is-unlocked { opacity: 1; pointer-events: auto; }
.dl:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.dl__ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.dl--pdf { border-color: oklch(58% 0.12 28); }
.dl--pdf .dl__ic { background: oklch(58% 0.12 28); color: #fff; }
.dl--pdf .dl__label { color: oklch(40% 0.13 30); }
.dl--csv { border-color: var(--metal); }
.dl--csv .dl__ic { background: var(--metal); color: #fff; }
.dl--csv .dl__label { color: oklch(45% 0.10 55); }
.dl--wa { border-color: var(--ok); }
.dl--wa .dl__ic { background: var(--ok); color: #fff; }
.dl--wa .dl__label { color: oklch(40% 0.13 150); }
.dl__body { flex: 1 1 auto; min-width: 0; }
.dl__label { font-weight: 700; font-size: 14.5px; margin: 0; line-height: 1.1; }
.dl__sub { font-size: 12px; color: var(--muted); margin: 1px 0 0; }
.dl__lock {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---- Navegación inferior ---- */
.nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.btn {
  border: none;
  border-radius: var(--r-md);
  min-height: 52px;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .12s, background .15s, color .15s;
  padding: 0 18px;
}
.btn:active { transform: scale(.98); }
.btn--ghost {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--fg);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost:disabled { opacity: .4; pointer-events: none; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-2);
}
.btn--primary:hover { background: oklch(48% 0.135 58); }
.btn--primary:disabled { background: var(--muted); cursor: not-allowed; box-shadow: none; opacity: .7; }

/* CTA principal flotante (solo bienvenida) */
.cta-block {
  padding: 0 16px;
  margin-top: auto;
}
.btn--start {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  min-height: 56px;
  font-size: 17px;
  border: none;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  transition: transform .12s, background .15s;
}
.btn--start:hover { background: oklch(48% 0.135 58); }
.btn--start:active { transform: scale(.98); }

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%; bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%) translateY(20px);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 60;
  max-width: 90vw;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Estado de éxito ---- */
.success-glow {
  text-align: center;
  padding: 30px 20px 10px;
}
.success-glow__ic {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--ok) 16%, var(--surface));
  color: var(--ok);
  display: grid; place-items: center;
  animation: pop .4s cubic-bezier(.2,1.6,.4,1);
}
@keyframes pop {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-glow__t {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 4px;
}
.success-glow__d { color: var(--muted); font-size: 14px; margin: 0 0 24px; }

/* ---- Install banner ---- */
.install {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 16px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  font-size: 13.5px;
}
.install.is-show { display: flex; }
.install__t { flex: 1 1 auto; font-weight: 600; }
.install__btn {
  border: none;
  background: var(--accent-ink);
  color: var(--accent);
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  min-height: 36px;
}
.install__close {
  background: transparent;
  border: none;
  color: var(--accent-ink);
  width: 30px; height: 30px;
  opacity: .7;
  cursor: pointer;
  font-size: 18px;
}

/* ---- Helpers ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hint-strip {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px;
  background: color-mix(in oklch, var(--metal) 8%, var(--surface));
  border-left: 3px solid var(--metal);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin: 12px 0 4px;
  line-height: 1.45;
}

/* ---- Ajustes de breakpoints ---- */
@media (min-width: 600px) {
  :root { --maxw: 560px; }
  .stat-strip { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  :root { --maxw: 640px; }
  body { background: oklch(92% 0.010 70); }
  .app {
    margin: 24px auto;
    min-height: auto;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-3);
    border: 1px solid var(--border);
  }
  .nav, .topbar { border-radius: 0; }
}

/* Respeta movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
