/* The Skin Lab · Check-in Kiosk DEMO */
:root {
  --navy: #1B2845;
  --navy-deep: #10182C;
  --cream: #FAF6EE;
  --brass: #A88A5C;
  --brass-light: #C9A874;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: radial-gradient(120% 120% at 50% 0%, var(--navy) 0%, var(--navy-deep) 70%);
  color: var(--cream);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Idioma: solo se muestra el activo */
[data-l] { display: none; }
body[data-lang="es"] [data-l="es"] { display: inline; }
body[data-lang="en"] [data-l="en"] { display: inline; }
body[data-lang="es"] span.block[data-l="es"],
body[data-lang="en"] span.block[data-l="en"] { display: block; }

/* ── Pantallas ─ */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: max(24px, env(safe-area-inset-top)) 48px max(24px, env(safe-area-inset-bottom));
  opacity: 0;
  transition: opacity .35s ease;
}
.screen.active { display: flex; opacity: 1; }
.screen-inner {
  width: 100%;
  max-width: 820px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Tipografia ─ */
h1.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.2vw, 56px);
  line-height: 1.12;
  letter-spacing: .01em;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 18px;
}
.sub {
  font-size: 17px;
  font-weight: 300;
  color: rgba(250, 246, 238, .72);
  margin-top: 14px;
  line-height: 1.6;
  max-width: 560px;
}

/* ── Botones pill ─ */
.pill {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 22px 52px;
  min-height: 64px;
  min-width: 220px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, opacity .2s ease;
}
.pill:active { transform: scale(.97); }
.pill.brass { background: var(--brass); color: var(--navy-deep); }
.pill.brass:active { background: var(--brass-light); }
.pill.ghost {
  background: transparent;
  color: rgba(250, 246, 238, .75);
  border: 1px solid rgba(250, 246, 238, .35);
}
.pill:disabled { opacity: .35; pointer-events: none; }
.pill-row { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 44px; }

/* ── Barra superior del flujo ─ */
.flow-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}
.btn-back, .btn-restart {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(250, 246, 238, .65);
  border: 1px solid rgba(250, 246, 238, .28);
  border-radius: 999px;
  padding: 14px 26px;
  min-height: 48px;
  cursor: pointer;
}
.dots { display: flex; gap: 10px; }
.dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(250, 246, 238, .22);
}
.dots span.on { background: var(--brass-light); }

/* ── Welcome ─ */
#screen-welcome .wordmark { width: min(520px, 72vw); margin-bottom: 8px; }
#screen-welcome .rule {
  width: 72px; height: 1px; background: var(--brass);
  margin: 30px auto;
}
.corner-link {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, .4);
  text-decoration: none;
  background: none;
  border: none;
  padding: 14px;
  cursor: pointer;
}
.corner-link.left { left: 24px; }
.corner-link.right { right: 24px; }
.demo-tag {
  display: none;
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid rgba(168, 138, 92, .5);
  border-radius: 999px;
  padding: 7px 16px;
}
body:has(#screen-welcome.active) .demo-tag { display: block; }

/* ── Cards (profesional y servicio) ─ */
.cards { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; margin-top: 40px; width: 100%; }
.card {
  background: rgba(250, 246, 238, .05);
  border: 1px solid rgba(250, 246, 238, .16);
  border-radius: 22px;
  padding: 28px;
  min-width: 240px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
  color: var(--cream);
  text-align: center;
  font-family: var(--sans);
}
.card:active { transform: scale(.98); }
.card.selected { border-color: var(--brass-light); background: rgba(168, 138, 92, .14); }
.card .photo {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--brass);
  margin-bottom: 18px;
}
.card .name { font-family: var(--serif); font-size: 28px; }
.card .role {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--brass-light); margin-top: 8px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  width: 100%;
  margin-top: 36px;
}
.service-card {
  background: rgba(250, 246, 238, .05);
  border: 1px solid rgba(250, 246, 238, .16);
  border-radius: 20px;
  padding: 26px 22px;
  min-height: 120px;
  cursor: pointer;
  color: var(--cream);
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-card:active { transform: scale(.98); }
.service-card.selected { border-color: var(--brass-light); background: rgba(168, 138, 92, .14); }
.service-card .sname { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.service-card .sdesc { font-size: 13px; font-weight: 300; color: rgba(250, 246, 238, .6); line-height: 1.5; }
.service-card .stag {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass-light);
  margin-top: auto;
}

/* ── Formulario ─ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  width: 100%;
  max-width: 680px;
  margin-top: 36px;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 9px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--brass-light);
}
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 300;
  color: var(--cream);
  background: rgba(250, 246, 238, .06);
  border: 1px solid rgba(250, 246, 238, .22);
  border-radius: 16px;
  padding: 18px 20px;
  min-height: 60px;
  outline: none;
  width: 100%;
  -webkit-user-select: text;
  user-select: text;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass-light); }
.field select { appearance: none; -webkit-appearance: none; }
.bday-row { display: flex; gap: 12px; }
.bday-row select { flex: 1; }

/* ── Consentimiento ─ */
.consent-box {
  width: 100%;
  max-width: 720px;
  text-align: left;
  margin-top: 28px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 6px;
}
.q-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(250, 246, 238, .12);
}
.q-row .q-text { font-size: 16px; font-weight: 300; line-height: 1.5; flex: 1; }
.yn { display: flex; gap: 10px; }
.yn button {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  background: transparent;
  color: rgba(250, 246, 238, .7);
  border: 1px solid rgba(250, 246, 238, .3);
  border-radius: 999px;
  padding: 13px 26px;
  min-height: 48px; min-width: 76px;
  cursor: pointer;
}
.yn button.on { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.decl-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 0;
  cursor: pointer;
}
.decl-row .chk {
  width: 30px; height: 30px; flex: none;
  border: 1px solid rgba(250, 246, 238, .4);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--navy);
}
.decl-row.on .chk { background: var(--brass-light); border-color: var(--brass-light); }
.decl-row .decl-text { font-size: 14px; font-weight: 300; color: rgba(250, 246, 238, .78); line-height: 1.55; }
.sig-wrap { margin-top: 22px; }
.sig-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--brass-light);
  display: block; margin-bottom: 10px;
}
#sig-canvas {
  width: 100%;
  height: 180px;
  background: var(--cream);
  border-radius: 16px;
  touch-action: none;
  cursor: crosshair;
}
.sig-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.sig-clear {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .22em; text-transform: uppercase;
  background: none; border: none;
  color: rgba(250, 246, 238, .55);
  padding: 12px; cursor: pointer;
}

/* ── Notas ─ */
.chips { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.chip {
  font-family: var(--sans); font-size: 15px; font-weight: 300;
  background: rgba(250, 246, 238, .06);
  color: rgba(250, 246, 238, .85);
  border: 1px solid rgba(250, 246, 238, .25);
  border-radius: 999px;
  padding: 15px 28px;
  min-height: 52px;
  cursor: pointer;
}
.chip.on { background: rgba(168, 138, 92, .2); border-color: var(--brass-light); }
#notes-text { margin-top: 22px; max-width: 680px; min-height: 90px; resize: none; }

/* ── Final y checkout ─ */
.done-name { color: var(--brass-light); font-style: italic; }
.status-line {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(250, 246, 238, .5);
  margin-top: 34px;
  line-height: 2;
}
.status-line .ok { color: var(--brass-light); }
.qr-row { display: flex; gap: 36px; flex-wrap: wrap; justify-content: center; margin-top: 40px; }
.qr-card {
  background: var(--cream);
  border-radius: 22px;
  padding: 26px 26px 20px;
  color: var(--navy);
  width: 290px;
}
.qr-card .qr-box { display: flex; justify-content: center; }
.qr-card .qr-box img, .qr-card .qr-box canvas { border-radius: 4px; }
.qr-card .qr-title {
  font-family: var(--serif); font-size: 22px;
  margin-top: 16px; line-height: 1.25;
}
.qr-card .qr-sub {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass); margin-top: 8px;
}
.countdown {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .25em; text-transform: uppercase;
  color: rgba(250, 246, 238, .35);
}

/* ── Identificacion: toggle celular / email ─ */
.id-toggle {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  background: rgba(250, 246, 238, .05);
  border: 1px solid rgba(250, 246, 238, .18);
  border-radius: 999px;
  padding: 6px;
}
.id-toggle button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, .65);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 14px 34px;
  min-height: 48px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.id-toggle button.on { background: var(--cream); color: var(--navy); }
.id-email-input {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 300;
  text-align: center;
  color: var(--cream);
  background: rgba(250, 246, 238, .06);
  border: 1px solid rgba(250, 246, 238, .22);
  border-radius: 18px;
  padding: 22px 30px;
  margin-top: 30px;
  width: min(560px, 80vw);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.id-email-input:focus { border-color: var(--brass-light); }

/* ── Teclado de celular ─ */
.phone-display {
  font-family: var(--mono);
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: .08em;
  color: var(--cream);
  background: rgba(250, 246, 238, .06);
  border: 1px solid rgba(250, 246, 238, .22);
  border-radius: 18px;
  padding: 18px 34px;
  margin-top: 30px;
  min-width: 340px;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 14px;
  margin-top: 26px;
  justify-content: center;
}
.keypad button {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 300;
  width: 96px; height: 76px;
  color: var(--cream);
  background: rgba(250, 246, 238, .06);
  border: 1px solid rgba(250, 246, 238, .2);
  border-radius: 20px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.keypad button:active { background: rgba(168, 138, 92, .25); transform: scale(.96); }
.keypad button.kp-aux {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, .6);
}
.demo-hint {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, .3);
  margin-top: 26px;
}

/* ── Tarjeta de cita encontrada ─ */
.match-card {
  background: rgba(250, 246, 238, .06);
  border: 1px solid rgba(168, 138, 92, .5);
  border-radius: 22px;
  padding: 30px 40px;
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 26px;
  text-align: left;
  max-width: 620px;
}
.match-card .mphoto {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--brass);
  flex: none;
}
.match-card .mmono {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px solid var(--brass);
  flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 38px;
  color: var(--brass-light);
}
.match-card .msvc { font-family: var(--serif); font-size: 30px; line-height: 1.2; }
.match-card .mwith { font-size: 15px; font-weight: 300; color: rgba(250, 246, 238, .7); margin-top: 6px; }
.match-card .mtime {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass-light); margin-top: 10px;
}

/* ── Foto ─ */
.photo-stage {
  position: relative;
  width: min(380px, 70vw);
  aspect-ratio: 3 / 4;
  margin-top: 26px;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(250, 246, 238, .05);
  border: 1px solid rgba(250, 246, 238, .2);
}
.photo-stage video, .photo-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.photo-stage img { display: none; }
.photo-stage.has-shot video { display: none; }
.photo-stage.has-shot img { display: block; }
.photo-fallback {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 30px;
  font-size: 15px; font-weight: 300;
  color: rgba(250, 246, 238, .6);
}
.photo-stage.no-cam video { display: none; }
.photo-stage.no-cam .photo-fallback { display: flex; }

/* iPad vertical */
@media (max-width: 900px) {
  .screen { padding-left: 28px; padding-right: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  h1.display { font-size: clamp(32px, 6vw, 44px); }
}
