:root {
  --fondo: #f6f1e9; --tarjeta: #ffffff; --texto: #2a1d12; --suave: #6f5f50; --borde: #e2d6c5;
  --marca: #8a3b12; --marca-osc: #6a2c0c; --ok: #1f8a45; --mal: #c0262d; --aviso: #c98a00;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo: #17120d; --tarjeta: #221a13; --texto: #f3eadf; --suave: #b6a796; --borde: #3a2e23;
    --marca: #d9773e; --marca-osc: #b85e2a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fondo); color: var(--texto); line-height: 1.45; }
header.top { background: var(--marca); color: #fff; padding: 18px 16px; }
header.top h1 { margin: 0; font-size: 1.35rem; }
header.top p { margin: 4px 0 0; opacity: .9; font-size: .95rem; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
label { display: block; font-size: .85rem; color: var(--suave); margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 11px 12px; font-size: 1rem; border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); color: var(--texto); }
input:focus, select:focus { outline: 2px solid var(--marca); border-color: transparent; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .fila { grid-template-columns: 1fr; } }
button, .boton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; font-size: 1rem; font-weight: 600; border: 0; border-radius: 8px; background: var(--marca); color: #fff; cursor: pointer; text-decoration: none; }
button:hover, .boton:hover { background: var(--marca-osc); }
button:disabled { opacity: .55; cursor: wait; }
button.sec, .boton.sec { background: transparent; color: var(--marca); border: 1px solid var(--marca); }
button.peligro { background: var(--mal); }
button.chico { padding: 6px 10px; font-size: .85rem; }
.ancho { width: 100%; }
.error { color: var(--mal); font-weight: 600; }
.nota { color: var(--suave); font-size: .9rem; }
.precios { width: 100%; border-collapse: collapse; font-size: .95rem; }
.precios th, .precios td { padding: 8px 6px; border-bottom: 1px solid var(--borde); text-align: left; }
.precios td.num, .precios th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .precios { font-size: .78rem; }
  .precios th, .precios td { padding: 6px 3px; }
  .precios th:first-child, .precios td:first-child { max-width: 74px; }
}
.etiqueta { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--borde); }
.etiqueta.actual { background: var(--marca); color: #fff; }
.etiqueta.menor { background: var(--mal); color: #fff; }
.asistente { border: 1px dashed var(--borde); border-radius: 10px; padding: 12px; margin-top: 12px; position: relative; }
.asistente .quitar { position: absolute; top: 8px; right: 8px; }
.total { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; font-weight: 700; margin: 14px 0; }
.centro { text-align: center; }
a { color: var(--marca); }
