/* ───────── Tarjetas ───────── */
.card {
  border-radius: var(--radius-card);
  background-color: var(--card);
  background-image: linear-gradient(180deg, var(--glass-glow), transparent 40%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-ink); }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 20px; }
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ───────── Botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0 1.25rem;
  border: 0; border-radius: var(--radius-full);
  font-weight: 650; font-size: var(--text-base); white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: transform 300ms var(--ease-spring), filter 200ms, background-color 200ms, box-shadow 200ms;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:active { transform: scale(0.96); }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-lg { min-height: var(--tap-lg); font-size: 1.0625rem; padding: 0 1.5rem; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: var(--text-sm); }

/* Una sola por zona */
.btn-primary {
  background-image: var(--gloss), var(--flame-grad);
  color: var(--on-flame);
  box-shadow: var(--gloss-edge), 0 10px 24px -12px var(--flame);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
  background-image: var(--gloss-soft), var(--oxford);
  color: var(--oxford-ink);
  box-shadow: var(--oxford-edge);
}
.btn-secondary:hover { background-image: var(--gloss-soft), var(--oxford-hi); }

.btn-ghost { background: transparent; color: var(--flame-ink); }
.btn-ghost:hover { background: color-mix(in oklab, var(--flame) 10%, transparent); }

.btn-danger { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1px rgb(239 68 68 / 0.3); }

/* Botón de solo ícono (cerrar, menú). El área tocable sigue siendo de 48 px. */
.icon-btn {
  display: inline-grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: var(--radius-full);
  background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--soft); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 22px; height: 22px; }

/* Pill de acción: ícono en círculo; se reconoce como botón al instante */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 40px; padding: 0.25rem 1rem 0.25rem 0.3rem;
  border: 0; border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 650; cursor: pointer; white-space: nowrap;
  background-image: var(--gloss-soft), var(--oxford);
  color: var(--oxford-ink);
  box-shadow: var(--oxford-edge);
  transition: transform 300ms var(--ease-spring);
}
.pill:hover { background-image: var(--gloss-soft), var(--oxford-hi); }
.pill:hover .pill-icon { transform: rotate(-12deg) scale(1.08); }
.pill:active { transform: scale(0.96); }
.pill-icon { transition: transform 300ms var(--ease-spring); }
.pill-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.pill-icon svg { width: 16px; height: 16px; }

/* ───────── Campos ───────── */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
.input {
  display: block; width: 100%;
  min-height: 52px; padding: 0 14px;
  border-radius: var(--radius-field);
  border: 1px solid var(--line-strong);
  background: var(--card-2); color: var(--ink);
  font-size: var(--text-base);          /* 16 px: evita el zoom de iOS */
  transition: border-color 150ms, box-shadow 150ms;
}
.input::placeholder { color: color-mix(in oklab, var(--muted) 70%, transparent); }
.input:focus { outline: none; border-color: var(--brand-ui); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-ui) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { font-size: var(--text-sm); color: var(--bad); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .icon-btn { position: absolute; right: 2px; top: 2px; color: var(--muted); }

.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--flame); margin: 0; }

/* ───────── Etiquetas de estado ───────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 28px; padding: 0 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.tone-ok   { background: var(--ok-bg);   color: var(--ok); }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-bad  { background: var(--bad-bg);  color: var(--bad); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-gray { background: var(--soft);    color: var(--ink); }
.tone-brand { background: color-mix(in oklab, var(--brand-ui) 16%, transparent); color: var(--brand-ui); }

/* ───────── Avisos ───────── */
.note {
  border-radius: 1rem; padding: 12px 14px;
  background: var(--card-2);
  box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px var(--line);
  font-size: var(--text-sm);
}
.note-bad { box-shadow: inset 3px 0 0 var(--bad), inset 0 0 0 1px var(--line); }
.note-ok { box-shadow: inset 3px 0 0 var(--ok), inset 0 0 0 1px var(--line); }
.note svg { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; vertical-align: -4px; margin-right: 2px; }
/* El aviso que no se puede pasar por alto: arriba, con fondo rojo suave e ícono al lado */
.note-top { display: flex; align-items: flex-start; gap: 8px; background: color-mix(in oklab, var(--bad) 10%, var(--card-2)); font-weight: 600; }
.note-top svg { color: var(--bad); margin-top: 1px; }

/* ───────── Estado vacío ───────── */
.empty { display: grid; justify-items: center; gap: 10px; padding: 28px 12px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; }
.empty-icon svg { width: 30px; height: 30px; }
.empty p { max-width: 30ch; color: var(--muted); }

/* ───────── Avatar ───────── */
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  font-weight: 700; color: var(--on-brand, #fff);
  background: var(--gloss), linear-gradient(135deg, color-mix(in oklab, var(--brand) 62%, white), var(--brand) 55%, color-mix(in oklab, var(--brand) 75%, black));
  box-shadow: var(--gloss-edge);
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* La foto de Yo se toca para cambiarla: una camarita dorada en la esquina lo dice */
.avatar-edit { position: relative; flex-shrink: 0; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform 300ms var(--ease-spring); }
.avatar-edit:active { transform: scale(0.95); }
.avatar-cam {
  position: absolute; right: -2px; bottom: -2px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gloss), var(--flame-grad); color: var(--on-flame);
  box-shadow: 0 0 0 3px var(--card), var(--gloss-edge);
}
.avatar-cam svg { width: 15px; height: 15px; }
.photo-preview { display: grid; place-items: center; padding-top: 4px; }

/* Tus medidas: tres cajitas iguales */
.measures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.measure { display: grid; justify-items: start; gap: 8px; padding: 12px; border-radius: var(--radius-field); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.measure .li-icon { width: 34px; height: 34px; border-radius: 11px; }
.measure .li-icon svg { width: 18px; height: 18px; }
.measure > span:last-child { display: grid; gap: 2px; min-width: 0; }
.measure strong { font-size: var(--text-base); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── Lista con filas tocables ───────── */
.list { display: grid; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.list-item {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 10px 16px;
  border: 0; border-top: 1px solid var(--line);
  background: transparent; color: var(--ink); text-align: left; width: 100%;
  cursor: pointer;
}
.list-item:first-child { border-top: 0; }
.list-item:active { background: var(--soft); }
.list-item .li-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0; }
.list-item .li-icon svg { width: 18px; height: 18px; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; }
.list-item .li-sub { font-size: var(--text-sm); color: var(--muted); }
.list-item .li-chev { color: var(--muted); width: 18px; height: 18px; }
.list-item.danger { color: var(--bad); }
.list-item.danger .li-icon { --ic: #dc2626; --ic-ink: #fff; }

/* ───────── Íconos con brillo (los del logo) ─────────
 * Todo ícono en caja lleva el mismo acabado: degradado, reflejo arriba a la izquierda
 * y filo claro. --ic pinta el fondo (dorado si nadie dice otro) y --ic-ink el trazo. */
.li-icon, .empty-icon, .pill-icon, .m-brand-mark, .auth-mark {
  --ic: var(--flame); --ic-ink: var(--on-flame);
  background: var(--gloss), linear-gradient(145deg, color-mix(in oklab, var(--ic) 58%, white), var(--ic) 50%, color-mix(in oklab, var(--ic) 72%, black));
  color: var(--ic-ink);
  box-shadow: var(--gloss-edge), 0 6px 16px -8px color-mix(in oklab, var(--ic) 75%, transparent);
}
.pill-icon { box-shadow: var(--gloss-edge); }

/* ───────── Hoja desde abajo (bottom sheet) ───────── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: oklch(0 0 0 / 0.6);
  opacity: 0; transition: opacity 250ms ease;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px var(--gutter) calc(20px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--card);
  box-shadow: var(--shadow-pop), inset 0 1px 0 var(--line-strong);
  transform: translateY(100%);
  transition: transform 380ms var(--ease-out-expo);
}
.sheet-open .sheet-backdrop { opacity: 1; }
.sheet-open .sheet { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
@media (min-width: 640px) {
  .sheet { left: 50%; right: auto; width: 520px; margin-left: -260px; bottom: 24px; border-radius: 24px; }
}

/* ───────── Aviso emergente (no se cierra tocando afuera) ───────── */
.pgate { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: var(--gutter); }
.pgate-backdrop { position: absolute; inset: 0; background: oklch(0 0 0 / 0.7); opacity: 0; transition: opacity 220ms ease; }
.pgate-card {
  position: relative; width: min(400px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 0 20px 20px; border-radius: 26px; text-align: center;
  background: var(--card);
  box-shadow: var(--shadow-pop), inset 0 1px 0 var(--line-strong), 0 0 0 1px color-mix(in oklab, var(--gold) 45%, transparent);
  opacity: 0; transform: translateY(18px) scale(0.92);
  transition: transform 420ms var(--ease-spring), opacity 220ms ease;
}
.pgate.is-open .pgate-backdrop { opacity: 1; }
.pgate.is-open .pgate-card { opacity: 1; transform: none; }
/* La banda inclinada del color de la clase, con su filo dorado. */
.pgate-band {
  height: 74px; margin: 0 -20px;
  background: var(--gloss), linear-gradient(135deg, color-mix(in oklab, var(--type) 70%, white), var(--type) 55%, color-mix(in oklab, var(--type) 65%, black));
  clip-path: polygon(0 0, 100% 0, 100% 62%, 0 100%);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.pgate-mark { position: relative; display: inline-block; margin: -44px auto 10px; }
.pgate-mark .type-tile { box-shadow: 0 0 0 4px var(--card), inset 0 1px 0 oklch(1 0 0 / 0.5), inset 0 -3px 10px oklch(0 0 0 / 0.2), 0 10px 26px -8px var(--type); }
.pgate-ban {
  position: absolute; right: -6px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: var(--gloss), linear-gradient(145deg, #f87171, #dc2626 55%, #991b1b);
  box-shadow: 0 0 0 3px var(--card), var(--gloss-edge);
  animation: m-pop 520ms var(--ease-spring) 200ms both;
}
.pgate-ban svg { width: 18px; height: 18px; }
.pgate-card h2 { font-size: 1.3rem; margin-bottom: 10px; text-wrap: balance; }
.pgate-card p { text-wrap: pretty; }
.pgate-types { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.pgate-types li {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; font-weight: 650;
  background: color-mix(in oklab, var(--type) 10%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--type) 30%, transparent);
}
.pgate-types li span { flex: 1; }
.pgate-types .type-tile { width: 38px; height: 38px; flex: none; }
.pgate-types .type-tile svg { width: 26px; height: 26px; }
.pgate-ok { width: 20px; height: 20px; color: var(--ok); }
.pgate-actions { display: grid; gap: 8px; margin-top: 18px; }
.pgate-card.is-shaking { animation: pgate-shake 420ms ease; }
@keyframes pgate-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) {
  .pgate-card { transition: opacity 200ms ease; transform: none; }
  .pgate-card.is-shaking { animation: none; outline: 3px solid var(--gold); }
  .pgate-ban { animation: none; }
}
/* Chip de un tipo que su plan no incluye: candado chiquito. */
.type-chip.is-locked { opacity: 0.75; }
.type-chip .chip-lock { width: 13px; height: 13px; margin-left: 2px; opacity: 0.8; }

/* ───────── Toast ───────── */
.toasts {
  position: fixed; left: 0; right: 0; z-index: 60;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  display: grid; justify-items: center; gap: 8px;
  padding: 0 var(--gutter); pointer-events: none;
}
/* Con una hoja abierta, el aviso sube para no taparla. */
html:has(.sheet-open) .toasts { top: calc(var(--safe-top) + 12px); bottom: auto; }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: 480px; padding: 12px 16px;
  border-radius: 16px; background: #2b251c; color: #fff;
  box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line-strong);
  font-size: var(--text-sm); font-weight: 500;
  pointer-events: auto;
  animation: rise-in 350ms var(--ease-out-expo) both;
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.tone-ok svg { color: var(--ok); }
.toast.tone-bad svg { color: var(--bad); }
.toast .btn { min-height: 36px; padding: 0 12px; }

/* ───────── Esqueleto de carga ───────── */
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--soft), var(--card-2), var(--soft)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ───────── Tabla que en celular se vuelve tarjetas ───────── */
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 12px; text-align: left; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.actions { text-align: right; }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table td { padding: 2px 0; border: 0; }
  .table td.actions { text-align: left; padding-top: 8px; }
}

/* ═════════ Fase 1 · Billetera y recepción ═════════ */

.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.link-strong { color: inherit; text-decoration: none; }
.link-strong:hover { color: var(--flame-ink); text-decoration: underline; }
code { font: 600 0.9em ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 0.1em 0.4em; border-radius: 6px; background: var(--soft); }
.is-dim { opacity: 0.62; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.6rem; }

/* Lista dentro de una tarjeta: sin marco propio */
.card > .list { border: 0; border-radius: 0; background: transparent; margin: 0 -16px -6px; }
.feed-item { min-height: 52px; cursor: default; }
a.feed-item { cursor: pointer; color: inherit; text-decoration: none; }
.feed-dot { min-height: 30px; width: 30px; padding: 0; justify-content: center; flex-shrink: 0; }
.list-item .li-icon.li-ok { --ic: #16a34a; --ic-ink: #fff; }

/* Herramientas chicas debajo del título (pausar, ajustar, cancelar) */
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px; border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600; cursor: pointer; text-decoration: none;
}
.tool svg { width: 16px; height: 16px; transition: transform 300ms var(--ease-spring); }
.tool:hover svg { transform: scale(1.1); }
.tool:active { transform: scale(0.96); }

/* ───────── Piel premium ─────────
 * Brillo arriba, filo en degradado y sombra suave. Cada variante solo cambia
 * --pf (relleno), --pb (filo) y --pc (texto); lo elegido va lleno aparte. */
.tool, .chip, .segmented span, .day-chip {
  --pf: var(--card-2);
  --pb: linear-gradient(160deg, var(--line-strong), var(--line) 60%);
  --pc: var(--ink);
  border: 1px solid transparent;
  background-image: var(--gloss-soft), linear-gradient(var(--pf), var(--pf)), var(--pb);
  background-clip: padding-box, padding-box, border-box;
  background-origin: border-box;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 6px 16px -12px oklch(0 0 0 / 0.8);
  color: var(--pc);
  transition: transform 300ms var(--ease-spring), box-shadow 200ms;
}
.tool:hover, .chip:hover { --pb: linear-gradient(160deg, color-mix(in oklab, var(--flame) 55%, transparent), var(--line) 70%); }
/* Dorado: lo que te enseña o te lleva a otro lado */
.tool-how, .tool-gold {
  --pf: color-mix(in oklab, var(--flame) 13%, var(--card));
  --pb: var(--flame-grad);
  --pc: var(--flame-ink);
}
/* Rojo: quitar o dejar */
.tool-danger, .tool-danger:hover {
  --pf: color-mix(in oklab, #ef4444 11%, var(--card));
  --pb: linear-gradient(160deg, color-mix(in oklab, #ef4444 75%, transparent), color-mix(in oklab, #ef4444 22%, transparent));
  --pc: var(--bad);
}

/* Respuestas rápidas */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}
.chip:active { transform: scale(0.95); }

/* Chip de tipo de clase: cada uno con su color, con brillo; el elegido va lleno */
.chip.type-chip {
  --pf: color-mix(in oklab, var(--type) 18%, var(--card-2));
  --pb: linear-gradient(160deg, var(--type), color-mix(in oklab, var(--type) 30%, transparent) 70%);
}
.type-chip .dot { background: var(--type); box-shadow: 0 0 0 2px color-mix(in oklab, var(--type) 30%, transparent), 0 0 10px var(--type); }
.chip.type-chip.is-on {
  border-color: transparent; color: #fff; text-shadow: 0 1px 1px oklch(0 0 0 / 0.35);
  background: var(--gloss), linear-gradient(145deg, color-mix(in oklab, var(--type) 62%, white), var(--type) 50%, color-mix(in oklab, var(--type) 70%, black));
  box-shadow: var(--gloss-edge), 0 8px 20px -8px var(--type);
}
.type-chip.is-on .dot { background: #fff; box-shadow: 0 0 8px #fff; }
.chip-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--flame); }
.chip-check:has(input:checked) { --pf: color-mix(in oklab, var(--flame) 14%, var(--card-2)); --pb: var(--flame-grad); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Formularios largos */
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.label, fieldset.field > legend { font-size: var(--text-sm); font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }
.field-hint { font-size: var(--text-sm); color: var(--muted); }
.check-row { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 6px 0; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--flame); flex-shrink: 0; }

/* Opciones como tarjetas (elegir plan) */
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 14px; border-radius: var(--radius-field);
  border: 1px solid var(--line-strong); background: var(--card-2); cursor: pointer;
}
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--flame); flex-shrink: 0; }
.choice:has(input:checked) { border-color: var(--flame); box-shadow: 0 0 0 3px color-mix(in oklab, var(--flame) 20%, transparent); }
.choice-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.choice-title { font-weight: 650; }
.choice-sub { font-size: var(--text-sm); color: var(--muted); }
.choice-price { font-weight: 700; white-space: nowrap; }

/* Botones de una sola opción (método de pago) */
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 600;
}
.segmented input:checked + span { border-color: transparent; background: var(--gloss), var(--flame-grad); color: var(--on-flame); }
.segmented input:focus-visible + span { outline: 2px solid var(--flame); outline-offset: 2px; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .input { max-width: 90px; text-align: center; font-weight: 700; }
.stepper .icon-btn { background: var(--soft); }

/* Barra de clases: una sola pieza con brillo */
.credits { display: grid; gap: 6px; margin: 4px 0 6px; }
.credits-bar, .days-bar {
  position: relative; height: 12px; border-radius: var(--radius-full); overflow: hidden;
  background: color-mix(in oklab, var(--flame) 9%, var(--card-2));
  box-shadow: inset 0 1px 2px oklch(0 0 0 / 0.35), inset 0 0 0 1px color-mix(in oklab, var(--flame) 18%, transparent);
}
/* Dorado con brillo y un destello que pasa */
.credits-bar span, .days-bar span {
  position: relative; display: block; height: 100%; border-radius: inherit; overflow: hidden;
  background: var(--gloss), linear-gradient(90deg, var(--flame-to), var(--flame) 55%, var(--flame-from));
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.5), 0 0 12px -2px var(--flame);
  transition: width 600ms var(--ease-out-expo);
}
.credits-bar span::after, .days-bar span::after, .badge-live::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, oklch(1 0 0 / 0.6) 50%, transparent 70%);
  transform: translateX(-120%); animation: gold-sheen 3.6s ease-in-out 0.6s infinite;
}
@keyframes gold-sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.days-bar { height: 8px; }

/* «Vigente»: insignia dorada llena y la tarjeta con filo de oro */
.badge-live {
  position: relative; overflow: hidden; font-weight: 750;
  color: var(--on-flame); background: var(--gloss), var(--flame-grad);
  box-shadow: var(--gloss-edge), 0 6px 14px -8px var(--flame);
}
.card.is-live {
  border-color: transparent;
  background-image:
    radial-gradient(110% 70% at 100% 0%, color-mix(in oklab, var(--flame) 16%, transparent), transparent 62%),
    linear-gradient(180deg, var(--glass-glow), transparent 40%),
    linear-gradient(var(--card), var(--card)),
    linear-gradient(150deg, var(--flame-from), color-mix(in oklab, var(--flame) 35%, transparent) 30%, var(--line) 60%, color-mix(in oklab, var(--flame-to) 70%, transparent));
  background-clip: padding-box, padding-box, padding-box, border-box;
  background-origin: border-box;
  box-shadow: var(--shadow-card), 0 18px 40px -26px var(--flame);
}
@media (prefers-reduced-motion: reduce) { .credits-bar span::after, .days-bar span::after, .badge-live::after { animation: none; } }
.plan-card { display: grid; gap: 8px; }
.plan-card .card-head { margin-bottom: 0; align-items: flex-start; }

.history summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-weight: 600; }
.grid-2 { display: grid; gap: 20px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.danger-zone { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-card); }

/* Resumen en números (corte del día) */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.stat { display: grid; gap: 4px; }
.stat-num { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; }
.table tr.is-cancelled td { color: var(--muted); }
.table tr.is-cancelled td:nth-child(5) { text-decoration: line-through; }

.plan-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.plan-row .li-body { flex: 1; min-width: 200px; }
.plan-price { font-size: var(--text-lg); white-space: nowrap; }

/* Hoja más ancha para el formulario de activar plan */
@media (min-width: 640px) {
  .sheet:has(.sheet-wide) { width: 600px; margin-left: -300px; }
}

/* ═════════ Fase 2 · Clases ═════════ */

/* Fila de clase: hora · barra del color del tipo · nombre · semáforo */
.class-row { gap: 12px; }
.class-time { display: grid; justify-items: end; min-width: 48px; line-height: 1.1; flex-shrink: 0; }
.class-time strong { font-size: var(--text-base); font-variant-numeric: tabular-nums; }
.class-time small { font-size: 0.7rem; color: var(--muted); }
.class-bar {
  width: 5px; align-self: stretch; min-height: 36px; border-radius: var(--radius-full); flex-shrink: 0;
  background: linear-gradient(180deg, color-mix(in oklab, var(--type) 70%, white), var(--type));
}
.list-item:disabled { cursor: not-allowed; opacity: 0.55; }
.list-item[data-static]:disabled { cursor: default; opacity: 1; }
.list-item[aria-current="true"] { box-shadow: inset 3px 0 0 var(--flame); }

/* Esfera del tipo de clase: la misma forma que el botón de Entrenar (brillo arriba,
   resplandor alrededor) pero en el color de cada clase, con el dibujo en tinta oscura. */
.type-tile {
  --type-ink: color-mix(in oklab, var(--type) 22%, #0b0a08);
  display: grid; place-items: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%; color: var(--type-ink);
  background: var(--gloss), radial-gradient(circle at 50% 38%, color-mix(in oklab, var(--type) 55%, white), var(--type) 62%, color-mix(in oklab, var(--type) 70%, black));
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.5), inset 0 -2px 6px oklch(0 0 0 / 0.18), 0 0 16px -4px var(--type);
}
.type-tile svg { width: 29px; height: 29px; stroke-width: 1.1; }
.type-tile-lg { width: 54px; height: 54px; box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.5), inset 0 -3px 8px oklch(0 0 0 / 0.18), 0 0 22px -4px var(--type); }
.type-tile-lg svg { width: 39px; height: 39px; stroke-width: 0.95; }
.type-tile-xl { width: 68px; height: 68px; box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.5), inset 0 -3px 10px oklch(0 0 0 / 0.2), 0 0 30px -4px var(--type); }
.type-tile-xl svg { width: 50px; height: 50px; stroke-width: 0.85; }

/* Cartelera: una tarjeta por clase, con un resplandor del color del tipo */
.class-list { display: grid; gap: 10px; }
.class-card, .next-class {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px;
  text-align: left; color: inherit; cursor: pointer;
  border-radius: var(--radius-card); border: 1px solid var(--line);
  background: radial-gradient(130% 120% at 0% 0%, color-mix(in oklab, var(--type) 20%, transparent), transparent 58%), var(--card);
  box-shadow: var(--shadow-card);
}
.class-card:hover { border-color: color-mix(in oklab, var(--type) 45%, transparent); }
.class-card.is-mine { border-color: color-mix(in oklab, var(--flame) 55%, transparent); box-shadow: var(--shadow-card), 0 0 0 1px color-mix(in oklab, var(--flame) 30%, transparent); }
.class-card.is-dim { opacity: 0.6; }
.class-card.is-dim .type-tile { filter: grayscale(0.7); }
.cc-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cc-name { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-time strong { font-size: 1.0625rem; }
.cc-time small { color: var(--muted); font-size: 0.72rem; }
.cc-meta { font-size: var(--text-sm); color: var(--muted); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.cc-foot .badge { flex-shrink: 0; }
/* Un puntito por lugar: los libres se prenden con el color del tipo */
.cc-pips { display: grid; grid-template-columns: repeat(var(--cols), 7px); gap: 3px; }
.cc-pips i { width: 7px; height: 7px; border-radius: 2px; background: color-mix(in oklab, var(--muted) 30%, transparent); }
.cc-pips i.is-free { background: var(--type); box-shadow: 0 0 6px -1px var(--type); }
.cc-pips-none { flex: 1; }

/* Tu próxima clase: arriba de la cartelera, más grande */
.next-class { align-items: center; padding: 16px; border-color: color-mix(in oklab, var(--type) 40%, transparent);
  background: radial-gradient(140% 140% at 0% 0%, color-mix(in oklab, var(--type) 34%, transparent), transparent 62%), var(--card); }
.next-class .eyebrow { color: color-mix(in oklab, var(--type) 45%, var(--ink)); }
.next-name { font-weight: 800; font-size: var(--text-lg); letter-spacing: -0.02em; line-height: 1.15; }
.next-when { font-weight: 650; }
.next-class .li-chev { color: var(--muted); width: 20px; height: 20px; flex-shrink: 0; }

/* Cabeza de la hoja de una clase */
.class-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; border-radius: var(--radius-card);
  background: radial-gradient(140% 140% at 0% 0%, color-mix(in oklab, var(--type) 30%, transparent), transparent 62%), var(--card-2); }
.class-hero .li-body { flex: 1; min-width: 150px; display: grid; gap: 6px; }
.ch-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--text-sm); color: var(--muted); }
.ch-facts span { display: inline-flex; align-items: center; gap: 5px; }
.ch-facts svg { width: 15px; height: 15px; }
.ch-badge { flex-basis: 100%; }

/* Chips de tipo con su dibujo en lugar del puntito */
.type-chip svg { width: 18px; height: 18px; stroke-width: 1.5; color: var(--type); }
.type-chip.is-on svg { color: #fff; }

.class-head { display: flex; align-items: center; gap: 12px; }
.class-head .class-bar { min-height: 44px; }
.class-when { font-weight: 650; font-size: 1.0625rem; }

/* Tira de días que se desliza con el pulgar */
.day-strip {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  display: grid; place-items: center; gap: 2px; flex-shrink: 0; scroll-snap-align: start;
  min-width: 58px; min-height: 62px; padding: 6px 10px;
  border-radius: 16px; cursor: pointer;
}
.day-chip small { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.day-chip strong { font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.day-chip:active { transform: scale(0.96); }
.day-chip[aria-selected="true"] { border-color: transparent; background: var(--gloss), var(--flame-grad); color: var(--on-flame); box-shadow: var(--gloss-edge), 0 8px 20px -10px var(--flame); }
.day-chip[aria-selected="true"] small { color: color-mix(in oklab, var(--on-flame) 75%, transparent); }

.chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex-shrink: 0; }
.chip.is-on { border-color: transparent; background: var(--gloss), var(--flame-grad); color: var(--on-flame); box-shadow: var(--gloss-edge), 0 8px 18px -10px var(--flame); }

.segmented-full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.segmented-full span { justify-content: center; text-align: center; width: 100%; padding: 0 8px; white-space: nowrap; }

/* Barra de cupo: lo ocupado, con el color del semáforo */
.seat-bar span { background: linear-gradient(90deg, color-mix(in oklab, var(--brand-ui) 70%, white), var(--brand-ui)); }
.seat-warn span { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.seat-bad span { background: linear-gradient(90deg, #f87171, #ef4444); }
.sheet-actions { margin-top: 6px; }

/* Lista de clase: filas grandes, un toque = llegó */
.roster-head { display: flex; align-items: center; gap: 14px; }
.roster-head .class-bar { min-height: 48px; }
.roster-head h2 { font-size: var(--text-lg); }
.roster-count { display: grid; justify-items: end; text-align: right; flex-shrink: 0; }
.roster-count strong { font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.roster-count small { font-size: 0.72rem; color: var(--muted); }
.roster-row, .booking-row { border-top: 1px solid var(--line); }
.roster-row:first-child, .booking-row:first-child { border-top: 0; }
.roster-row .list-item, .booking-row .list-item { border-top: 0; }
.roster-tap { min-height: 72px; }
.roster-tap:disabled { opacity: 1; cursor: default; }
.roster-check {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line-strong); color: transparent;
  transition: background 200ms, transform 300ms var(--ease-spring);
}
.roster-check svg { width: 18px; height: 18px; }
.is-here .roster-tap { background: color-mix(in oklab, var(--ok-bg) 60%, transparent); }
.is-here .roster-check { background: var(--ok); border-color: var(--ok); color: #fff; transform: scale(1.06); }
.roster-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px 76px; margin-top: -4px; }
.booking-row .roster-tools { padding-left: 78px; }
.roster-mini { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* Horario semanal: una columna por día en escritorio, una tarjeta por día en celular */
.week { display: grid; gap: 12px; }
.week-day { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card); }
.week-empty { padding: 4px 2px; }
.week-slot {
  display: grid; gap: 2px; text-align: left; min-height: var(--tap); padding: 8px 10px 8px 12px;
  border: 0; border-radius: 12px; cursor: pointer; color: var(--ink);
  background: color-mix(in oklab, var(--type) 13%, var(--card-2));
  box-shadow: inset 4px 0 0 var(--type);
  transition: transform 300ms var(--ease-spring);
}
.week-slot strong { font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.week-slot small { font-size: 0.72rem; }
.week-slot:hover { transform: translateY(-1px); }
.week-slot:active { transform: scale(0.97); }
@media (min-width: 1100px) {
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .week-day { padding: 10px 8px; }
}

/* Muestras de color para el tipo de clase */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 40px; height: 40px; }
.swatch input[type="radio"] { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span {
  display: block; width: 100%; height: 100%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 28%, rgb(255 255 255 / 0.45), transparent 45%), var(--c);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
}
.swatch input:checked + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch input:focus-visible + span { outline: 3px solid var(--flame); outline-offset: 2px; }
.swatch-custom input { width: 40px; height: 40px; padding: 0; border: 1px dashed var(--line-strong); border-radius: 50%; background: none; cursor: pointer; }

/* ═══════════ Fase 2b · Mapa de lugares, lista de espera ═══════════ */

/* El mapa crece con su contenedor; si el salón es grande se desliza de lado
   en vez de encoger los lugares por debajo de 44 px tocables. */
.spot-map { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter); scrollbar-width: thin; }
.spot-map svg { display: block; width: 100%; min-width: var(--sm-min); max-width: min(560px, calc(var(--sm-min) * 1.45)); margin: 0 auto; touch-action: manipulation; }
.sm-frame { fill: color-mix(in oklab, var(--card) 70%, transparent); stroke: var(--line-strong); }
/* Espejo de vidrio: el degradado y los reflejos vienen del SVG; aquí el resplandor */
.sm-mirror > rect { stroke: oklch(1 0 0 / 0.7); stroke-width: 1; filter: drop-shadow(0 0 6px oklch(0.85 0.04 210 / 0.45)); }
.sm-glint path { fill: oklch(1 0 0 / 0.35); }
.sm-mirror-tag { font: 600 9.5px/1 var(--font); letter-spacing: 0.16em; fill: #22313a; text-anchor: middle; dominant-baseline: middle; }
/* Coach: placa dorada con su muñequito */
.sm-coach rect { fill: color-mix(in oklab, var(--gold) 14%, var(--card)); stroke: var(--gold); stroke-width: 1.4; filter: drop-shadow(0 0 5px color-mix(in oklab, var(--gold) 45%, transparent)); }
.sm-coach-ic { fill: var(--gold-ink); }
.sm-coach-plus { stroke: color-mix(in oklab, var(--gold) 14%, var(--card)); stroke-width: 1.6; paint-order: stroke; }
.sm-coach-tag { font: 600 10px/1 var(--font); letter-spacing: 0.06em; fill: var(--gold-ink); text-anchor: middle; dominant-baseline: middle; }
/* Puerta: la hoja y su vuelta punteada */
.sm-door-leaf { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.sm-door-swing { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 3; }
.sm-door-tag { font: 600 7.5px/1 var(--font); letter-spacing: 0.08em; fill: var(--muted); }
.sm-cell { fill: transparent; stroke: var(--line); stroke-dasharray: 3 4; cursor: pointer; }
.sm-cell:hover { fill: color-mix(in oklab, var(--flame) 8%, transparent); }

/* Cada lugar: aro del color de su estado, el dibujo o el número, y su bolita con el número */
.sm-art { transition: transform 300ms var(--ease-spring); transform-box: fill-box; transform-origin: center; }
/* --sm-in: el fondo de adentro del círculo; las líneas que separan piezas del dibujo usan ese color */
.sm-spot { --sm-in: var(--card-2); }
/* --sm-type: el color del tipo de clase (verde si no hay tipo, en el editor del admin) */
.sm-ring { fill: var(--sm-in); stroke: var(--sm-type, var(--ok)); stroke-width: 2; }
.sm-icon { fill: color-mix(in oklab, var(--ink) 84%, var(--card-2)); stroke: none; }
.sm-icon .sm-l, .sm-icon .sm-cut { fill: none; stroke: color-mix(in oklab, var(--ink) 84%, var(--card-2)); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.sm-icon .sm-l.is-thin { stroke-width: 1.05; }
.sm-icon .sm-cut { stroke: var(--sm-in); stroke-width: 0.9; }
.sm-icon .sm-cut.is-thin { stroke-width: 0.7; }
.sm-big { font: 800 17px/1 var(--font); text-anchor: middle; dominant-baseline: middle; font-variant-numeric: tabular-nums; fill: var(--ink); pointer-events: none; }
.sm-big.is-long { font-size: 13px; }
.sm-badge circle { fill: var(--page); stroke: var(--sm-type, var(--ok)); stroke-width: 1.4; }
.sm-badge text { font: 700 8.5px/1 var(--font); text-anchor: middle; dominant-baseline: middle; font-variant-numeric: tabular-nums; fill: var(--ink); pointer-events: none; }
.sm-slash { stroke: var(--bad); stroke-width: 2.2; stroke-linecap: round; }

.sm-spot.is-free { --sm-in: color-mix(in oklab, var(--sm-type, var(--ok)) 7%, var(--card-2)); }
.sm-spot:is(.is-mine, .is-selected) .sm-ring { stroke: color-mix(in oklab, var(--sm-type, #ffc20e) 45%, white); filter: drop-shadow(0 0 7px color-mix(in oklab, var(--sm-type, var(--flame)) 70%, transparent)); }
.sm-spot:is(.is-mine, .is-selected) .sm-big { fill: color-mix(in oklab, var(--sm-type, #ffc20e) 20%, #0b0a08); }
.sm-spot:is(.is-mine, .is-selected) .sm-badge circle { stroke: var(--sm-type, var(--flame)); }
/* Ocupado: naranja */
.sm-spot.is-taken { --sm-in: color-mix(in oklab, #f97316 16%, var(--card-2)); }
.sm-spot.is-taken .sm-ring { stroke: #f97316; }
.sm-spot.is-taken .sm-big { fill: var(--warn); }
.sm-spot.is-taken .sm-badge circle { stroke: #f97316; }
/* Fuera de servicio: rojo, con su diagonal */
.sm-spot.is-off { --sm-in: color-mix(in oklab, #ef4444 8%, var(--card-2)); }
.sm-spot.is-off .sm-ring { stroke: #ef4444; }
.sm-spot.is-off .sm-icon { opacity: 0.45; }
.sm-spot.is-off .sm-big, .sm-spot.is-off .sm-badge text { fill: var(--muted); }
.sm-spot.is-off .sm-badge circle { stroke: #ef4444; }
.sm-spot.is-off .sm-slash { stroke: #ef4444; }

.sm-spot.is-tap { cursor: pointer; outline: none; }
.sm-spot.is-tap:hover .sm-art { transform: scale(1.06); }
.sm-spot.is-tap:active .sm-art { transform: scale(0.94); }
.sm-spot.is-tap:focus-visible .sm-ring { stroke: var(--flame); stroke-width: 3.5; }

/* Leyenda: un círculo por estado y su nombre debajo */
.sm-legend { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; justify-items: center; text-align: center; font-size: 0.75rem; line-height: 1.2; color: var(--muted); max-width: 360px; margin: 0 auto; }
.sm-key { display: grid; justify-items: center; gap: 5px; }
.sm-key svg { width: 26px; height: 26px; }
.sm-key .sm-spot .sm-ring { filter: none; }
.sm-key .is-mine .sm-ring { stroke: color-mix(in oklab, var(--sm-type, #ffc20e) 45%, white); }
@media (prefers-reduced-motion: reduce) { .sm-art { transition: none; } .sm-spot.is-tap:is(:hover, :active) .sm-art { transform: none; } }

/* Lugar en la lista de recepción: «Bici 12» junto al nombre */
.spot-chip {
  display: inline-flex; align-items: center; min-width: 2.4em; justify-content: center; padding: 2px 8px;
  border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--flame-ink); background: color-mix(in oklab, var(--flame) 14%, var(--card-2));
}

/* Lista de espera */
.wait-pos {
  display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%;
  font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--flame-ink);
  background: color-mix(in oklab, var(--flame) 14%, var(--card-2)); box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--flame) 45%, transparent);
}
.wait-card { display: flex; gap: 14px; align-items: center; }

/* Editor del mapa */
.map-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.map-grid-size { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.map-grid-size .input { max-width: 76px; }
.room-row { display: flex; align-items: flex-start; gap: 12px; }
.room-row .li-body { flex: 1; min-width: 0; }
.room-row .pill { flex-shrink: 0; }
.room-row .li-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.room-row .li-icon svg { width: 20px; height: 20px; }
.map-tool-pick span { display: inline-flex; align-items: center; gap: 6px; }
.map-tool-pick span svg { width: 16px; height: 16px; flex-shrink: 0; }
.roster-health { display: flex !important; align-items: center; gap: 4px; color: var(--warn); font-weight: 600; }
.roster-health svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Recepción · Cortesías */
.day-count { font-size: 0.66rem; font-weight: 700; color: var(--flame-ink); white-space: nowrap; }
.day-count.is-zero { color: var(--muted); opacity: 0.6; }
.day-chip[aria-selected="true"] .day-count { color: var(--on-flame); opacity: 1; }
/* Fila: lo de la persona y [Llegó] a la derecha; las herramientas abajo, alineadas con el nombre */
.trial-row { display: grid; gap: 10px; align-items: stretch; cursor: default; padding-top: 14px; padding-bottom: 12px; }
.trial-row:active { background: transparent; }
.trial-row.is-dim { opacity: 0.6; }
.trial-main { display: flex; align-items: flex-start; gap: 14px; }
.trial-main .li-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.trial-main > .pill { align-self: center; flex-shrink: 0; }
.trial-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.trial-badges a.badge { text-decoration: none; }
.trial-tools { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 58px; }
.trial-tools .tool { min-height: 36px; padding: 0 11px; }
.waiver-sign { display: grid; gap: 8px; justify-items: start; margin: 0; }
.waiver-sign img { width: min(100%, 360px); border-radius: var(--radius-field); background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
textarea.wv-body { font-size: 0.9375rem; line-height: 1.55; min-height: 320px; }

/* Alta rápida de recepción: dos campos por renglón (nombre y apellidos, monto y nota). */
.quick-name { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; align-items: start; }
.quick-name .field { min-width: 0; }
.quick-name [hidden] + .field { grid-column: 1 / -1; }
