/* Alex Barber · móvil primero; tablet desde 720px, computador desde 1024px, grande desde 1600px. */
:root {
  --bg: #121010;
  --surface: #1c1917;
  --surface-2: #26221e;
  --ink: #f4ede3;
  --muted: #a89f93;
  --line: #36312b;
  --accent: #d4a65a;      /* latón */
  --accent-ink: #1a1408;
  --accent-soft: rgba(212, 166, 90, .14);
  --ok: #6bbf87;
  --danger: #ec8a73;
  --danger-soft: rgba(236, 138, 115, .12);
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --text: Inter, system-ui, sans-serif;
  --pad: clamp(16px, 5vw, 24px);
  --top-h: 60px;
  --foot-h: 112px; /* alto aproximado de la barra fija del botón en el celular */
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-color: var(--line) var(--bg); }
body {
  font-family: var(--text); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 7.5vw, 2.5rem); margin-bottom: 6px; }
em { font-style: normal; color: var(--ink); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; } /* el título recibe foco al cambiar de paso (lectores de pantalla) */
::selection { background: var(--accent); color: var(--accent-ink); }
input { caret-color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* ---------- Estructura ---------- */
.layout { width: 100%; }
.stage { min-width: 0; overflow-x: clip; } /* la entrada lateral de cada paso no crea scroll */

/* En el celular la barbería solo se ve en el inicio; los pasos ocupan toda la pantalla. */
body:not([data-step="inicio"]) .brand-panel { display: none; }

/* ---------- Cabecera de los pasos ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding-top: env(safe-area-inset-top);
}
body[data-step="inicio"] .top { display: none; }
.top-row { height: var(--top-h); padding: 0 var(--pad); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { grid-column: 2; text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.back {
  grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 2px;
  height: 44px; padding: 0 12px 0 6px; margin-left: -8px; border: 0; background: none; border-radius: 999px;
  font-weight: 600; color: var(--accent); cursor: pointer;
  transition: transform .16s var(--ease), background-color .2s;
}
.back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back:active { transform: scale(.94); background: var(--surface-2); }
.step-count { grid-column: 3; text-align: right; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress { height: 3px; background: var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 0 3px 3px 0; transition: width .4s var(--ease); }

/* ---------- Pantallas ---------- */
.screen, .screen-form { min-height: calc(100dvh - var(--top-h) - env(safe-area-inset-top)); display: flex; flex-direction: column; }
.screen-form { flex: 1; }
.screen-body { flex: 1; padding: 24px var(--pad); }
.screen-foot {
  position: sticky; bottom: 0; z-index: 5; display: grid; gap: 10px;
  padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}
.screen.enter-fwd { animation: in-fwd .34s var(--ease); }
.screen.enter-back { animation: in-back .34s var(--ease); }
@keyframes in-fwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes in-back { from { opacity: 0; transform: translateX(-28px); } }

.sub { color: var(--muted); font-size: 1.02rem; }
.chosen { margin: 14px 0 18px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .92rem; }
.chosen:empty { display: none; }
.note { color: var(--muted); font-size: .9rem; margin-top: 16px; }
.foot-hint { text-align: center; color: var(--muted); font-size: .85rem; }

/* Inicio en el celular: solo la barra del botón, fija abajo; la barbería va encima. */
.screen-home { min-height: 0; }
.home-intro { display: none; }
.screen-home .screen-foot { position: fixed; left: 0; right: 0; bottom: 0; }
body[data-step="inicio"] .brand-panel { padding-bottom: var(--foot-h); }

/* ---------- Panel de la barbería ---------- */
.hero {
  position: relative; display: grid; place-items: center; overflow: hidden;
  height: clamp(190px, 38svh, 340px); padding-top: env(safe-area-inset-top);
  background:
    radial-gradient(70% 60% at 50% 58%, rgba(212, 166, 90, .16) 0%, transparent 70%),
    radial-gradient(120% 90% at 50% 0%, #241f1a 0%, var(--bg) 70%);
}
.hero-art { width: min(100%, 440px); padding: 0 var(--pad); }
.scene { width: 100%; height: auto; max-height: 100%; }

/* Momento animado de la portada: el poste gira y las tijeras cortan. */
.pole-stripes { animation: pole 2.6s linear infinite; }
@keyframes pole { to { transform: translateY(66px); } }
.blade { transform-box: view-box; }
.blade-top { animation: snip-top 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
.blade-bottom { animation: snip-bottom 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes snip-top { 0%, 100% { transform: rotate(-14deg); } 45%, 55% { transform: rotate(0deg); } }
@keyframes snip-bottom { 0%, 100% { transform: rotate(14deg); } 45%, 55% { transform: rotate(0deg); } }
.snip { opacity: 0; animation: fall 2.4s ease-in infinite; }
.s2 { animation-delay: .15s; } .s3 { animation-delay: .3s; }
@keyframes fall { 0%, 45% { opacity: 0; transform: translateY(0); } 55% { opacity: 1; } 100% { opacity: 0; transform: translateY(34px) rotate(40deg); } }
.paused .scene * { animation-play-state: paused !important; }

.brand-body { position: relative; z-index: 1; margin-top: -28px; padding: 0 var(--pad) 24px; }
.logo {
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em;
  border: 4px solid var(--bg); margin-bottom: 14px;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
h1 { font-size: clamp(2.8rem, 14vw, 4.6rem); }
.place { color: var(--muted); font-size: 1.1rem; margin: 6px 0 16px; }
.status { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; font-weight: 600; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.dot-live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.open .dot-live { background: var(--ok); animation: live 3s var(--ease) infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(107, 191, 135, .45); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

.mine { margin-top: 24px; display: grid; gap: 10px; }
.mine-card { padding: 16px 18px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--r); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.mine-card small { grid-column: 1; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.mine-card b { grid-column: 1; font-size: 1.05rem; }
.mine-card span { grid-column: 1; color: var(--muted); font-size: .92rem; }
.mine-card button { grid-column: 2; grid-row: 1 / span 3; }

.list-title { font-size: 1.35rem; margin: 32px 0 6px; }
.price-list, .how { list-style: none; }
.price-list li, .how li { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.price-list li:last-child, .how li:last-child { border-bottom: 0; }
.price-list b, .how b { display: block; font-weight: 600; }
.price-list small, .how small { color: var(--muted); font-size: .9rem; }
.price { font-family: var(--display); font-weight: 800; font-size: 1.2rem; white-space: nowrap; }

/* Dónde estamos: dirección, mapa y "Cómo llegar". */
.where-text { display: grid; justify-items: start; gap: 10px; }
.where-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); }
.where-line span:not(.pin) { color: var(--ink); font-weight: 500; }
.pin { flex: none; display: grid; color: var(--accent); }
.pin svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.map { margin-top: 14px; height: clamp(180px, 28svh, 240px); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
/* El mapa de Google es claro; así combina con la página oscura. */
.map iframe { display: block; width: 100%; height: 100%; border: 0; filter: invert(.9) hue-rotate(180deg) saturate(.55) brightness(.95); }
.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.done-where { justify-content: center; margin-top: 16px; }
.where .where-line { flex-wrap: nowrap; align-items: flex-start; }
.where .pin { margin-top: 2px; }

.icon-tile { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent); transition: transform .25s var(--ease), background-color .2s; }
.icon-tile svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 72px; height: 72px; border-radius: 16px; }
.icon-lg svg { width: 36px; height: 36px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink);
  border: 1.5px solid var(--accent); border-radius: 999px;
  font-weight: 600; font-size: 1.05rem; cursor: pointer;
  transition: transform .16s var(--ease), background-color .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--danger); border-color: transparent; min-height: 48px; }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #1d0d08; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:not([disabled]):hover { filter: brightness(1.08); }
  .btn-ghost:not([disabled]):hover { border-color: var(--ink); filter: none; }
  .btn-danger:not([disabled]):hover { background: var(--danger-soft); filter: none; }
  .back:hover { background: var(--surface-2); }
}

/* ---------- Opciones: servicio, día, hora ---------- */
.option, .day, .slot {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  cursor: pointer; text-align: left;
  transition: border-color .18s, background-color .18s, color .18s, transform .16s var(--ease);
}
.option:active, .day:active, .slot:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .option:hover, .day:not([disabled]):hover, .slot:not([disabled]):hover { border-color: var(--accent); }
  .option:hover .icon-tile { transform: rotate(-8deg) scale(1.04); background: var(--accent-soft); }
}
[aria-pressed="true"].option, [aria-pressed="true"].day, [aria-pressed="true"].slot { border-color: var(--accent); background: var(--accent-soft); }
[aria-pressed="true"].option .icon-tile { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.options { display: grid; gap: 12px; margin-top: 22px; }
.option { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 12px 16px 12px 12px; border-radius: var(--r); }
.option b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.3rem; line-height: 1.1; margin-bottom: 4px; }
.option .meta { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.option .price { color: var(--accent); }

.weekdays, .days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(4px, 1.6vw, 10px); }
.weekdays { margin-bottom: 8px; font-size: .75rem; color: var(--muted); text-align: center; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.day { display: grid; place-items: center; align-content: center; text-align: center; padding: 8px 0; min-height: 64px; }
.day b { font-size: clamp(1.1rem, 4.5vw, 1.35rem); font-weight: 600; line-height: 1.1; }
.day small { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day.today small { color: var(--accent); font-weight: 600; }
.day[disabled] { cursor: not-allowed; opacity: .35; background: transparent; border-style: dashed; }

.period { font-family: var(--text); font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 10px; display: flex; justify-content: space-between; }
.period:first-child { margin-top: 0; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.empty { color: var(--muted); padding: 16px 0; }
.slot { min-height: 58px; display: grid; place-content: center; text-align: center; font-variant-numeric: tabular-nums; }
.slot b { font-weight: 600; font-size: 1.1rem; line-height: 1.15; }
.slot small { font-size: .72rem; color: var(--muted); line-height: 1.1; }
.slot[disabled] {
  cursor: not-allowed; color: #6d665d; font-weight: 500; text-decoration: line-through; border-style: dashed; border-color: #2d2924;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 7px);
}
.slot[disabled] small { color: inherit; }

/* ---------- Resumen y formulario ---------- */
.summary { padding: 6px 18px; margin: 20px 0 24px; }
.summary .row { display: grid; grid-template-columns: 22px auto 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary .row:last-child { border-bottom: 0; }
.summary svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.summary dt { color: var(--muted); }
.summary dd { text-align: right; font-weight: 600; }
.summary .total dd { color: var(--accent); font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.fields { display: grid; gap: 0 16px; }
.field { display: block; margin-bottom: 16px; min-width: 0; }
.field span { display: block; font-weight: 600; margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 56px; padding: 0 16px; font-size: 16px; /* 16px: sin zoom en iPhone */
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .18s, background-color .18s;
}
.field textarea { padding: 14px 16px; resize: vertical; line-height: 1.4; min-height: 84px; font: inherit; font-size: 16px; color: inherit; }
.field input::placeholder, .field textarea::placeholder { color: #8e867b; } /* 4.7:1 sobre el campo */
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }/* WhatsApp: el verde de la marca, para que se reconozca al vuelo. */
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-wa { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #25d366; color: #0b2a17; font-weight: 600; text-decoration: none; transition: transform .16s var(--ease), filter .2s; }
.btn-wa:active { transform: scale(.97); }
.wa-icon, .cal-icon { display: grid; }
.wa-icon svg { width: 20px; height: 20px; }
.cal-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.done-actions .btn { gap: 8px; }
.cal-note { text-align: center; margin-top: 8px; }
@media (hover: hover) and (pointer: fine) { .btn-wa:hover { filter: brightness(1.06); } }

.policy { margin-top: 4px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); border-left: 3px solid var(--accent); color: var(--muted); font-size: .92rem; line-height: 1.45; }
.policy b { color: var(--ink); font-weight: 600; }
.done-body .policy { max-width: 460px; margin: 16px auto 0; text-align: left; }
.break-note { margin: 10px 0 4px; }
.error { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-sm); padding: 12px 14px; }

/* ---------- Listo ---------- */
.done-body { text-align: center; }
.done-body .summary { text-align: left; }
.check { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; margin: 12px auto 20px; animation: pop .4s var(--ease); }
.check svg { width: 38px; height: 38px; fill: none; stroke: #0e2416; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .4s .15s var(--ease) forwards; }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Hoja de confirmación ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet {
  width: 100%; max-width: 540px; display: grid; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0;
  padding: 26px var(--pad) calc(20px + env(safe-area-inset-bottom));
  animation: up .32s var(--ease);
}
.sheet-title { font-size: 1.7rem; }
.sheet-text { color: var(--muted); margin-bottom: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96); } }

/* ---------- Aviso tipo toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%); width: max-content; max-width: calc(100% - 2 * var(--pad));
  background: var(--ink); color: var(--bg); font-weight: 600; padding: 14px 18px; border-radius: 14px;
  box-shadow: 0 12px 32px -12px rgba(0,0,0,.7);
  animation: toast-in .3s var(--ease);
}
.toast.out { opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

.demo-note { padding: 0 var(--pad) 16px; color: var(--muted); font-size: .8rem; text-align: center; }
body[data-step="inicio"] .demo-note { padding-bottom: calc(var(--foot-h) + 8px); }

/* ---------- Celulares pequeños (≤ 360px) ---------- */
@media (max-width: 360px) {
  .option { grid-template-columns: 56px 1fr; }
  .option .icon-lg { width: 56px; height: 56px; }
  .option .price { grid-column: 2; justify-self: start; font-size: 1.15rem; }
  .times { grid-template-columns: repeat(3, 1fr); }
  .mine-card { grid-template-columns: 1fr; }
  .mine-card button { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .weekdays, .days { gap: 4px; }
}


/* ---------- Tablet (720px – 1023px): una columna centrada, más aire ---------- */
@media (min-width: 720px) {
  :root { --pad: 32px; }
  .layout { max-width: 680px; margin: 0 auto; padding: 24px 24px 0; }
  .brand-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: clip; }
  body[data-step="inicio"] .brand-panel { padding-bottom: 0; margin-bottom: 20px; }
  .hero { padding-top: 0; height: clamp(220px, 30vh, 320px); background: radial-gradient(70% 60% at 50% 58%, rgba(212, 166, 90, .16) 0%, transparent 70%), radial-gradient(120% 90% at 50% 0%, #2a241e 0%, var(--surface) 70%); }
  .logo { border-color: var(--surface); }
  .brand-body { margin-top: 4px; } /* el logo va debajo de la ilustración, sin taparla */
  .brand-body { padding-bottom: 32px; }
  .stage { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: clip; margin-bottom: 24px; }
  .top { position: sticky; background: color-mix(in srgb, var(--surface) 90%, transparent); }
  .screen, .screen-form { min-height: 0; }
  .screen-body { padding: 32px var(--pad) 24px; }
  .screen-foot { padding: 16px var(--pad) 28px; background: linear-gradient(to top, var(--surface) 72%, transparent); }
  .screen-home .screen-foot { position: sticky; left: auto; right: auto; }
  .home-intro { display: block; }
  .how { margin-top: 20px; }
  .option, .day, .slot, .field input, .field textarea, .status, .summary, .mine-card { background-color: var(--bg); }
  .mine-card { background: var(--accent-soft); }
  .times { grid-template-columns: repeat(6, 1fr); }
  .fields { grid-template-columns: 1fr 1fr; }
  .done-body .summary { max-width: 460px; margin-inline: auto; }
  .screen[data-screen="listo"] .screen-foot { max-width: 460px; width: 100%; margin-inline: auto; padding-inline: 0; }
  .demo-note, body[data-step="inicio"] .demo-note { padding-bottom: 24px; }
  /* La confirmación de cancelar sale centrada, no pegada abajo. */
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; border-bottom: 1px solid var(--line); padding-bottom: 24px; animation: pop-in .25s var(--ease); }
}

/* Tablet en vertical: el botón de reservar queda fijo abajo, centrado con la columna. */
@media (min-width: 720px) and (max-width: 1023px) {
  .home-intro { display: none; }
  body[data-step="inicio"] .stage { background: none; border: 0; }
  body[data-step="inicio"] .brand-panel { margin-bottom: var(--foot-h); }
  .screen-home .screen-foot {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 16px max(var(--pad), calc((100vw - 680px) / 2 + 24px)) calc(20px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 72%, transparent);
  }
}

/* ---------- Computador (≥ 1024px): barbería fija a la izquierda, reserva a la derecha ---------- */
@media (min-width: 1024px) {
  :root { --pad: clamp(32px, 3vw, 48px); }
  .layout {
    max-width: 1240px; padding: 32px clamp(24px, 3vw, 48px) 0;
    display: grid; grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); gap: clamp(20px, 2.4vw, 36px); align-items: start;
  }
  body:not([data-step="inicio"]) .brand-panel { display: block; }
  .brand-panel {
    position: sticky; top: 32px; margin: 0 !important;
    max-height: calc(100dvh - 104px); overflow-y: auto; scrollbar-width: thin;
  }
  .hero { height: clamp(170px, 22vh, 260px); }
  .hero-art { width: min(100%, 380px); }
  .brand-body { padding-bottom: 28px; }
  .list-title { margin-top: 24px; }
  .price-list li { padding: 10px 0; }
  .place { margin-bottom: 14px; }
  h1 { font-size: clamp(2.8rem, 3.6vw, 4rem); }
  /* La tarjeta de reserva llena la pantalla hasta un tope; en pantallas altas todo queda centrado. */
  .stage { margin-bottom: 16px; min-height: min(calc(100dvh - 104px), 760px); display: flex; flex-direction: column; }
  .layout { min-height: calc(100dvh - 56px); align-content: center; } /* 56px: la nota de demo de abajo */
  .stage > .screen { flex: 1; }
  .brand { display: none; } /* el nombre ya está en el panel de la izquierda */
  .top { border-radius: 28px 28px 0 0; }
  .screen-body { padding-top: 40px; }
  h2 { font-size: clamp(2rem, 2.6vw, 2.6rem); }
  .home-intro { display: flex; flex-direction: column; justify-content: center; }
  .how { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .how li { grid-template-columns: 56px 1fr; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--bg); }
  .how li:last-child { border-bottom: 1px solid var(--line); }
  /* Dónde estamos, debajo de los pasos: texto a la izquierda, mapa a la derecha. */
  .home-intro .where { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
  .home-intro .where .list-title { margin: 0; font-size: 1.2rem; }
  .home-intro .map { margin: 0; height: clamp(120px, 18vh, 220px); border-radius: var(--r-sm); }
  .day { min-height: 76px; }
  .times { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .demo-note { padding: 0 var(--pad) 16px; }
}

/* En el panel del computador, WhatsApp va como ícono redondo junto al horario: así el panel cabe sin scroll. */
@media (min-width: 1024px) {
  .btn-wa-top { position: relative; width: 44px; padding: 0; justify-content: center; }
  .btn-wa-top .wa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .btn-wa-top .wa-icon svg { width: 22px; height: 22px; }
}

/* Portátiles con poca altura: el panel de la barbería se compacta para caber sin scroll. */
@media (min-width: 1024px) and (max-height: 880px) {
  .hero { height: clamp(120px, 17vh, 170px); }
  .hero-art { width: min(100%, 280px); }
  .logo { width: 64px; height: 64px; font-size: 1.45rem; margin-bottom: 8px; }
  h1 { font-size: clamp(2.4rem, 3vw, 3.2rem); }
  .place { margin: 2px 0 10px; }
  .list-title { margin: 18px 0 2px; font-size: 1.2rem; }
  .price-list li { grid-template-columns: 44px 1fr auto; padding: 8px 0; }
  .price-list .icon-tile { width: 44px; height: 44px; border-radius: 12px; }
  .price-list .icon-tile svg { width: 22px; height: 22px; }
  .price-list small { display: none; } /* lo que incluye cada servicio se ve en el paso 1 */
  .mine { margin-top: 14px; }
  .home-intro.screen-body { padding-top: 28px; }
  .how li { padding: 10px 14px; }
  .home-intro .where-text { gap: 6px; }
  .home-intro .where { margin-top: 12px; padding: 12px; }
}
@media (min-width: 1024px) {
  .brand-panel { scrollbar-color: var(--line) var(--surface); }
}

/* ---------- Pantallas grandes (≥ 1600px) ---------- */
@media (min-width: 1600px) {
  html { font-size: 17px; }
  .layout { max-width: 1360px; }
}
@media (min-width: 2400px) {
  html { font-size: 19px; }
  .layout { max-width: 1520px; }
}

/* ---------- Celular en horizontal: poca altura ---------- */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1023px) {
  .hero { height: 150px; }
  .hero-art { width: 260px; }
  .screen, .screen-form { min-height: 0; }
  /* El botón de reservar queda fijo abajo aunque la pantalla sea ancha. */
  .layout { padding-top: 12px; }
  .screen-home .screen-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 75%, transparent); }
  body[data-step="inicio"] .brand-panel { margin-bottom: var(--foot-h); }
  .home-intro { display: none; }
  .screen-home { border: 0; background: none; }
}

@media (prefers-reduced-motion: reduce) {
  .screen.enter-fwd, .screen.enter-back { animation: fade .2s ease; }
  .status.open .dot-live, .check, .sheet, .toast, .pole-stripes, .blade, .snip { animation: none; }
  .check svg { animation: none; stroke-dashoffset: 0; }
  .progress span { transition: none; }
}

/* ---------- Panel de Alex (admin.html) ---------- */
.admin-wrap { max-width: 640px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) var(--pad) 32px; }
.admin-top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 16px; }
.logo-sm { width: 48px; height: 48px; font-size: 1.05rem; border-width: 0; margin: 0; }
.admin-hello small { color: var(--muted); font-weight: 600; font-size: .85rem; }
.admin h1 { font-size: clamp(1.8rem, 7vw, 2.3rem); }
.admin h2 { font-size: clamp(1.5rem, 6vw, 1.9rem); }
.btn-icon { width: 44px; padding: 0; }
.btn-icon svg, .btn-round svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-wa.btn-round svg { fill: currentColor; stroke: none; }

.install { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 44px 14px 16px; margin-bottom: 14px; border-color: var(--accent); background: var(--accent-soft); }
.install b { display: block; }
.install span { color: var(--muted); font-size: .92rem; }
.install span b { display: inline; color: var(--ink); }
.share-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); color: #4ea1ff; font-size: .8rem; }
.install-x { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); margin-bottom: 18px; }
.tabs button { min-height: 44px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.admin-msg { margin-bottom: 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); }

.today { display: grid; gap: 2px; padding: 18px; margin-bottom: 8px; }
.today small { color: var(--muted); font-weight: 600; }
.today b { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.15; }
.today span { color: var(--muted); }
.today strong { color: var(--ink); }

.agenda-day h3 { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0 8px; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.agenda-day h3 span:first-child { color: var(--ink); }
.citas { list-style: none; display: grid; gap: 8px; }
.cita { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.cita-time { font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1; text-align: center; }
.cita-time small { display: block; font-family: var(--text); font-weight: 500; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.cita-who b { display: block; font-size: 1.05rem; }
.cita-who span { color: var(--muted); font-size: .92rem; }
.cita-who em { display: block; font-style: italic; font-weight: 400; color: var(--accent); font-size: .9rem; }
.cita-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.btn-round { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.cita-cancel { margin-left: auto; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--danger); font-weight: 600; cursor: pointer; }
.blocked-line { padding: 10px 14px; border-radius: var(--r-sm); border: 1px dashed var(--line); color: var(--muted); margin-bottom: 8px; }

.day.is-closed { border-style: dashed; background: var(--danger-soft); border-color: var(--danger); }
.day.is-closed small { color: var(--danger); font-weight: 600; }
.day.is-part { border-color: var(--danger); }
.day.is-part small { color: var(--danger); }
.day.has-citas { position: relative; }
.day.has-citas::after { content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 16px; color: var(--muted); font-size: .85rem; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: -8px; }
.key-full { background: var(--danger-soft); border: 1.5px dashed var(--danger); }
.key-part { border: 1.5px solid var(--danger); }
.key-cita { border-radius: 50%; width: 8px; height: 8px; background: var(--accent); }

.admin .sheet { max-height: 92dvh; overflow-y: auto; }
.or { text-align: center; color: var(--muted); font-size: .85rem; margin: 4px 0 -2px; }
.hours { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hours .field, .admin .sheet .field { margin-bottom: 0; }
.field select { width: 100%; min-height: 52px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.admin .field input { background: var(--bg); }
.block-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--danger); border-radius: var(--r-sm); background: var(--danger-soft); }
.block-row small { display: block; color: var(--muted); }
.clash-title { color: var(--ink); font-weight: 600; margin-top: 6px; }
.btn-wa.clash { margin-top: 6px; justify-content: flex-start; }
.btn-wa.clash svg { width: 20px; height: 20px; flex: none; }

.locked { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.locked p { color: var(--muted); max-width: 32ch; }

/* Botón "Mi panel" en la página de reservas: solo aparece en el celular de Alex. */
.btn-panel { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; text-decoration: none; }
