:root {
  color-scheme: dark;
  --bg: #0a0a0a; --surface: #141414; --surface-2: #1c1c1c; --muted-bg: #262626;
  --text: #f5f5f4; --text-2: #b9b3a8; --text-3: #77726a; --border: #2b2925;
  --gold: #d4a24c; --gold-2: #f0c766; --accent: var(--gold); --accent-fg: #111;
  --ok: #4ade80; --ok-bg: #0d2a18; --warn: #fbbf24; --warn-bg: #2d2208; --err: #f87171; --err-bg: #2c1010;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(212,162,76,.14), transparent 70%); }
a { color: var(--gold-2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
[hidden] { display: none !important; }

.wrap { max-width: 600px; margin: 0 auto; padding: 24px 16px 48px; }
.wrap.wide { max-width: 1080px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.gold { color: var(--gold); }
.footer { text-align: center; margin-top: 28px; font-size: 13px; color: var(--text-3); }
.footer a { color: var(--text-3); }

/* ─── Marca ─── */
.brand { text-align: center; padding: 12px 0 20px; }
.brand .crown { width: 34px; height: 34px; color: var(--gold); margin: 0 auto -2px; display: block; }
.brand .crown svg, .icon-btn svg { width: 100%; height: 100%; display: block; }
.icon-btn svg { width: 18px; height: 18px; }
.brand h1 { font-size: 30px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { margin: 2px 0 0; color: var(--text-2); font-style: italic; }
.daybar { display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 16px; }
.daybar svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
.daybar strong { display: block; font-size: 16px; }
.daybar span { font-size: 13px; color: var(--text-2); }

/* ─── Botones y formularios ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent; background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--accent-fg); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); font-weight: 600; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--err-bg); color: var(--err); border-color: #5b1f1f; }
.btn.ok { background: var(--ok-bg); color: var(--ok); border-color: #1d4d30; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:focus-visible, .opt:focus-visible, .slot:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .tab:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); }
textarea.input { min-height: 80px; resize: vertical; }
.hint { font-size: 12px; color: var(--text-3); }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.hp { position: absolute; left: -9999px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }

/* ─── Reserva paso a paso ─── */
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--muted-bg); }
.steps span.on { background: var(--gold); }
.step { padding: 20px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-head h2 { font-size: 18px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color .15s; }
.opt:hover { border-color: var(--gold); }
.opt .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: #221c10; color: var(--gold); flex: none; }
.opt .ic svg { width: 24px; height: 24px; }
.opt .body { flex: 1; min-width: 0; }
.opt strong { display: block; font-size: 15px; }
.opt small { color: var(--text-2); }
.opt .price { font-weight: 700; color: var(--gold-2); white-space: nowrap; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #111; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.opt .avatar { width: 56px; height: 56px; font-size: 18px; box-shadow: 0 0 0 2px var(--gold); }
.photo-box { display: flex; gap: 16px; align-items: center; padding: 4px 0 18px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }

.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.dchip { flex: 0 0 64px; display: grid; justify-items: center; gap: 1px; padding: 8px 4px; border-radius: 12px; scroll-snap-align: start;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.dchip small { font-size: 11px; color: var(--text-2); text-transform: capitalize; }
.dchip strong { font-size: 20px; line-height: 1.1; }
.dchip.on { background: var(--gold); border-color: var(--gold); color: #111; }
.dchip.on small { color: #111; }
.dchip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.dchip:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot { min-height: 46px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer;
  font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.slot svg { width: 14px; height: 14px; color: var(--gold); }
.slot:hover { border-color: var(--gold); }
.empty { color: var(--text-2); text-align: center; padding: 28px 8px; }
.picked { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #1d1810; border: 1px solid #3d321b; margin-bottom: 16px; font-size: 14px; }
.picked b { color: var(--gold-2); }

/* ─── Estado de la cita ─── */
.status { text-align: center; padding: 28px 20px; }
.badge-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; }
.badge-ic svg { width: 28px; height: 28px; }
.badge-ic.pending { background: var(--warn-bg); color: var(--warn); }
.badge-ic.confirmed { background: var(--ok-bg); color: var(--ok); }
.badge-ic.off { background: var(--err-bg); color: var(--err); }
.status h1 { font-size: 22px; margin-bottom: 6px; }
.summary { display: grid; grid-template-columns: 100px 1fr; gap: 10px 14px; text-align: left; margin: 22px 0; padding: 18px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 14px; }
.summary dt { font-weight: 700; color: var(--gold); }
.summary dd { margin: 0; color: var(--text); word-break: break-word; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

/* ─── Etiquetas de estado ─── */
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--muted-bg); color: var(--text-2); }
.tag.pending { background: var(--warn-bg); color: var(--warn); }
.tag.confirmed { background: var(--ok-bg); color: var(--ok); }
.tag.rejected, .tag.expired, .tag.cancelled, .tag.failed { background: var(--err-bg); color: var(--err); }
.tag.logged { background: #1b2433; color: #93c5fd; }
.tag.sent { background: var(--ok-bg); color: var(--ok); }

@media (max-width: 420px) {
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary { grid-template-columns: 1fr; gap: 2px; }
  .summary dd { margin-bottom: 8px; }
}
.push-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.mine { display: grid; gap: 2px; padding: 14px 16px; margin-bottom: 12px; text-decoration: none; color: var(--text); border-color: #4a3a12; background: #17130a; }
.mine:hover { border-color: var(--gold); }
.mine .tag { justify-self: start; margin-bottom: 4px; }
.lookup-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); text-align: center; }
.lookup-box .lookup { text-align: left; margin-top: 12px; }
.linkish { border: 0; background: none; color: var(--gold-2); font-weight: 600; cursor: pointer; text-decoration: underline; padding: 4px; }
.err-text { color: var(--err); }

/* Autorización de datos (Ley 1581) */
.consent { margin: 4px 0 14px; }
.consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.consent input[type=checkbox] { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--gold); }
.consent .linkish { padding: 0; font-size: inherit; }
dialog.policy { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 20px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
dialog.policy::backdrop { background: rgba(0,0,0,.7); }
dialog.policy h2 { margin: 0 0 10px; font-size: 18px; color: var(--gold-2); }
dialog.policy p { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
dialog.policy b { color: var(--text); }
.legal { padding: 22px; }
.legal h1 { font-size: 22px; margin: 0 0 6px; color: var(--gold-2); }
.legal h2 { font-size: 16px; margin: 20px 0 6px; color: var(--gold); }
.legal p, .legal li { color: var(--text-2); font-size: 14px; }

/* Portada Hero del local (Estilo A), logo opcional y etiquetas de pasos */
.brand-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 8px;
  border: 2px solid var(--gold); box-shadow: 0 4px 16px rgba(0,0,0,.6); background: #0a0a0a; }
.brand.hero { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid #3a3222;
  min-height: 220px; padding: 92px 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.brand.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,10,.12) 0%, rgba(10,10,10,.55) 48%, rgba(10,10,10,.94) 100%); }
.brand.hero .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.brand.hero .hero-content { position: relative; z-index: 1; width: 100%; }
.brand.hero h1 { font-size: 28px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.7)); }
.brand.hero p { color: #d9d3c8; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.cover-preview { width: 160px; height: 96px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  overflow: hidden; display: grid; place-items: center; flex: none; color: var(--text-3); font-size: 12px; text-align: center; padding: 6px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.steps { margin-bottom: 6px; }
.step-labels { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 14px; font-size: 11px; color: var(--text-3); }
.step-labels span.on { color: var(--gold-2); font-weight: 700; }
