/* ==========================================================================
   TUGYM · Demo móvil · style.css
   Una sola capa de estilos: tokens → base → componentes → pantallas → shell.
   ========================================================================== */

/* Las fuentes (Barlow y Barlow Condensed) van incrustadas en assets/fonts/fonts.css. */

:root {
  --app-w: 430px;
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --pad: 16px;
  --nav-bump: 26px; /* lo que sobresale la burbuja QR por encima de la barra */
  --bar-h: 32px; /* aviso fijo «Demo interactiva · datos ficticios» */

  --bg: #0b0b0b;
  --surface: #151515;
  --surface-2: #1b1b1b;
  --surface-3: #242424;
  --field: #101010;
  --line: #242424;
  --line-strong: #343434;
  --line-control: #6e6a63; /* bordes de campos y casillas: contraste ≥ 3:1 */

  --text: #f3efe8;
  --text-2: #b8b2a8;
  --text-3: #8c877e;

  --accent: #ff6f1a;
  --accent-press: #e55f0d;
  --accent-ink: #1a0e05;
  --accent-soft: rgba(255, 111, 26, .12);
  --accent-line: rgba(255, 111, 26, .5);

  --ok: #6fcf7a;
  --ok-soft: rgba(111, 207, 122, .14);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, .12);

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;

  --font-ui: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  scroll-padding-top: calc(var(--bar-h) + 8px);
  scroll-padding-bottom: calc(var(--nav-h) + var(--safe-b) + var(--nav-bump) + 14px);
}
html:has(.sticky-cta) { scroll-padding-bottom: calc(var(--nav-h) + var(--safe-b) + 96px); }
html.has-sheet { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.05; }
h2 { font-size: 22px; }
h3 { font: 600 16px/1.25 var(--font-ui); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
a, button, input, select, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:focus-visible, .entry-btn:focus-visible, .nav__item--qr:focus-visible { outline-color: #fff; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-s); font-weight: 600; }
.skip:focus { top: 8px; }

/* ---------- Shell ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: var(--app-w);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}
main {
  display: block;
  padding: 10px var(--pad) calc(var(--nav-h) + var(--safe-b) + 28px);
  outline: 0;
}
main:focus, main:focus-visible { outline: 0; }

/* Aviso persistente de demo: siempre visible al desplazarse, con reinicio a mano. */
.demo-bar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: var(--bar-h);
  padding: 0 var(--pad);
  background: rgba(11, 11, 11, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font: 600 11px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
}
.demo-bar__text { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.demo-bar__text::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.demo-bar__reset { flex: none; min-height: var(--bar-h); padding: 0 2px; color: var(--text-2); letter-spacing: .06em; text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__reset:hover { color: var(--text); }

/* ---------- Texto auxiliar ---------- */
.label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.label--time { display: inline-flex; align-items: center; gap: 5px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.label--time .i { width: 14px; height: 14px; }
.micro { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.lead { font-size: 14px; color: var(--text-2); }

/* ---------- Cabeceras de pantalla ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 14px; }
.home-head__greet { margin: 0 0 1px; font-size: 13px; color: var(--text-2); }
.home-head h1 { font-size: 32px; line-height: 1; letter-spacing: -.005em; overflow-wrap: anywhere; }
.home-head > div:first-child { min-width: 0; }
.home-head__actions { flex: none; display: flex; align-items: center; gap: 10px; }

.screen-head { display: flex; align-items: flex-start; gap: 6px; padding: 6px 0 16px; }
.screen-head .icon-btn { margin: -8px 2px 0 -12px; }
.screen-head__text { flex: 1; min-width: 0; }
.screen-head h1 { font-size: 28px; line-height: 1.05; }
.screen-head p { margin-top: 4px; font-size: 14px; color: var(--text-2); }
/* Con botón de volver, la flecha va en su propia fila y el título se alinea con el contenido. */
.screen-head:has(> a.icon-btn) { display: grid; grid-template-columns: 1fr auto; column-gap: 6px; }
.screen-head > a.icon-btn { grid-column: 1 / -1; margin: -10px 0 -2px -12px; }

.demo-pill { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.demo-pill span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--text-2); font: 700 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase;
}
.demo-pill span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.demo-pill:active span { background: var(--surface-2); }
.demo-pill:focus-visible { outline: 0; }
.demo-pill:focus-visible span { outline: 2px solid var(--accent); outline-offset: 2px; }

.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font: 700 14px/1 var(--font-ui); letter-spacing: .02em; color: var(--text);
}
.avatar--sm { width: 36px; height: 36px; font-size: 12px; }
.avatar--lg { width: 60px; height: 60px; font-size: 19px; background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.avatars { display: flex; flex: none; }
.avatars .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--bg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-m);
  background: var(--accent); color: var(--accent-ink);
  font: 600 15px/1.1 var(--font-ui); text-align: center;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { background: var(--accent-press); transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:active { background: var(--surface-2); }
.btn--danger { background: transparent; color: var(--danger); border-color: rgba(255, 107, 107, .45); }
.btn--danger:active { background: var(--danger-soft); }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn:disabled { background: var(--surface-3); color: var(--text-2); border-color: var(--line-strong); cursor: default; transform: none; }

.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--text-2); }
.icon-btn:active { background: var(--surface-2); color: var(--text); }
.icon-btn--danger { color: var(--text-3); }
.icon-btn--danger:active { color: var(--danger); background: var(--danger-soft); }

.link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 2px; color: var(--accent); font-weight: 600; font-size: 14px; }
.link .i { width: 16px; height: 16px; }
.link:active { opacity: .7; }
.link--muted { color: var(--text-2); }

/* ---------- Etiquetas, chips, estados ---------- */
.tag {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px;
  border: 1px solid var(--accent-line); border-radius: 6px;
  color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip--muted { background: var(--surface-3); color: var(--text-2); }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.badge .i { width: 15px; height: 15px; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot--ok { background: var(--ok); }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); }
.state--low .dot { background: var(--ok); }
.state--mid .dot { background: var(--accent); }
.state--high .dot { background: var(--danger); }

/* ---------- Tarjetas y bloques ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.block { margin-top: 22px; }
.block--tight { margin-top: 0; }
.block__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 28px; }
.stack > * + * { margin-top: 10px; }
.empty { padding: 14px 0; color: var(--text-2); font-size: 14px; }
.u-mt-10 { margin-top: 10px; }
.u-mt-12 { margin-top: 12px; }
.u-mt-14 { margin-top: 14px; }

.note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-m); font-size: 13px; line-height: 1.45; color: var(--text-2); }
.note .i { width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }
.note--version { display: block; border: 0; padding: 4px 0 0; }
.note__k { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.about-list li b { color: var(--text); }

/* ---------- Listas ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.list__item { display: flex; align-items: center; gap: 2px; padding-right: 6px; border-top: 1px solid var(--line); }
.list__item:first-child { border-top: 0; }
.list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; min-height: 62px; padding: 12px 14px; text-align: left; color: var(--text); }
.list__main:active { background: var(--surface-2); }
.list__main strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.list__main span { font-size: 13px; color: var(--text-2); }

.data { margin: 0; }
.data div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.data div:first-child { border-top: 0; padding-top: 4px; }
.data dt { color: var(--text-2); flex: none; }
.data dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }

.summary { margin: 0 0 16px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.summary div:first-child { border-top: 0; }
.summary dd { margin: 0; color: var(--text); font-weight: 500; }
.summary div:last-child { border-top: 1px solid var(--line-strong); }
.summary div:last-child dd { font: 700 20px/1 var(--font-display); }

/* ---------- Formularios ---------- */
.form { display: block; }
.field { display: block; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field__label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
legend.field__label { width: 100%; padding: 0; }
.field__hint { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-3); }
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line-control); border-radius: 10px;
  background: var(--field); color: var(--text);
  font: 400 16px/1.2 var(--font-ui); outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.is-error .input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.field__error { display: none; margin-top: 6px; font-size: 12px; color: var(--danger); }
.field.is-error .field__error, .field__error.is-on { display: block; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form__actions { margin-top: 20px; }
.form__actions .micro { margin-top: 10px; text-align: center; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
.seg__opt { min-height: 44px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 14px; text-align: center; }
.seg__opt:active { background: var(--surface-2); }
.seg__opt.is-sel { background: var(--surface-3); color: var(--accent); }

.chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chip-day { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text-2); font: 700 15px/1 var(--font-ui); text-align: center; }
.chip-day:active { background: var(--surface-2); }
.chip-day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.check { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { flex: none; width: 26px; height: 26px; margin-top: 1px; border: 1.5px solid var(--line-control); border-radius: 8px; display: grid; place-items: center; color: transparent; background: var(--field); transition: background .12s, border-color .12s; }
.check__box .i { width: 16px; height: 16px; stroke-width: 2.4; }
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--text-2); }
.check__text strong { color: var(--text); font-weight: 600; font-size: 15px; }
.check input:checked ~ .check__text strong { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--text-3); }

.stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: stretch; min-height: 48px; border: 1px solid var(--line-control); border-radius: 10px; background: var(--field); overflow: hidden; }
.stepper:has(input:focus) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stepper button:focus-visible, .list__main:focus-visible { outline-offset: -3px; border-radius: 8px; }
.stepper button { display: grid; place-items: center; color: var(--text-2); }
.stepper button:active { background: var(--surface-3); color: var(--text); }
.stepper label { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stepper label span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.stepper input { width: 100%; min-height: 26px; border: 0; background: none; text-align: center; color: var(--text); font: 600 16px/1 var(--font-ui); outline: 0; -moz-appearance: textfield; padding: 0; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.ex-row { padding: 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.ex-row__top { display: flex; gap: 6px; align-items: center; }
.ex-row__top .input { flex: 1; }
.ex-row__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ex-row.is-error { border-color: rgba(255, 107, 107, .5); }

/* ---------- Semana, horas, medidor ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 0 18px; }
.week__day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 60px; padding: 8px 0 8px; border-radius: 12px; color: var(--text-2); }
.week__day span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.week__day strong { font: 700 20px/1 var(--font-display); color: var(--text); }
.week__day:active { background: var(--surface-2); }
.week__day.is-today span { color: var(--accent); font-weight: 700; }
.week__day.is-sel { background: var(--accent); color: var(--accent-ink); }
.week__day.is-sel span, .week__day.is-sel strong { color: var(--accent-ink); }
.week__mark { position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.week__day.is-sel .week__mark { background: var(--accent-ink); }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.booking .week { margin: 12px 0; }
.booking .slots { margin-top: 0; }
.slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.slot small { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.slot:active { background: var(--surface-2); }
.slot.is-sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slot.is-sel small { color: var(--accent-ink); opacity: .75; }
.slot:disabled { color: var(--text-3); border-color: var(--line); background: transparent; cursor: default; }
.slot:disabled small { color: var(--text-3); }

.meter { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 12px; margin: 0; }
.meter i { display: block; background: var(--surface-3); border-radius: 2px; }
.meter i.on { background: var(--accent); }
.meter-scale { display: flex; justify-content: space-between; margin: 5px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- Inicio ---------- */
.member-card {
  display: grid; grid-template-columns: 1fr 96px; min-height: 120px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  overflow: hidden; color: var(--text);
}
.member-card:active { background: var(--surface-2); }
.member-card__main { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 16px 12px 15px 16px; min-width: 0; }
.member-card__plan { font: 700 36px/1 var(--font-display); text-transform: uppercase; color: var(--accent); letter-spacing: .005em; overflow-wrap: anywhere; }
.member-card__status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.member-card__tab {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  padding: 14px 14px 12px 30px;
  background: var(--accent); color: var(--accent-ink);
  clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%);
}
.member-card__brand { font: 800 13px/1 var(--font-display); font-style: italic; letter-spacing: .06em; }
.member-card__num { font: 600 12px/1 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .85; margin-top: auto; margin-bottom: 8px; }
.member-card__tab .i { width: 20px; height: 20px; stroke-width: 2.2; }

.entry-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 74px; margin-top: 10px; padding: 12px 12px 12px 18px;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--r-m);
}
.entry-btn:active { background: var(--accent-press); transform: translateY(1px); }
.entry-btn__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.entry-btn__text strong { font: 700 23px/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.entry-btn__text span { font-size: 13px; font-weight: 500; opacity: .85; }
.entry-btn__icon { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--accent-ink); color: var(--accent); display: grid; place-items: center; }
.entry-btn__icon .i { width: 26px; height: 26px; }
.entry-btn.is-inside { background: var(--surface); color: var(--text); border: 1px solid var(--accent-line); padding: 11px 11px 11px 17px; }
.entry-btn.is-inside .entry-btn__text span { color: var(--text-2); opacity: 1; }
.entry-btn.is-inside .entry-btn__icon { background: var(--accent); color: var(--accent-ink); }
.entry-btn.is-inside:active { background: var(--surface-2); }

.occupancy { margin-top: 10px; }
.occupancy__figure { display: flex; align-items: flex-end; gap: 10px; margin: 8px 0 12px; }
.occupancy__figure strong { font: 700 58px/.9 var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.occupancy__figure > span { font-size: 13px; line-height: 1.2; color: var(--text-2); padding-bottom: 3px; }
.occupancy__cap { margin-left: auto; font-size: 12px; color: var(--text-3); padding-bottom: 3px; }

.photo-tile { display: block; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; background: var(--surface); color: var(--text); }
.photo-tile img { width: 100%; height: 132px; object-fit: cover; object-position: center 30%; filter: brightness(1.45) contrast(1.12) saturate(.85); }
.photo-tile__plate { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 12px 0 14px; border-top: 1px solid var(--line); }
.photo-tile__plate strong { font: 700 17px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.photo-tile__plate strong small { font: 600 11px/1 var(--font-ui); letter-spacing: .08em; color: var(--text-3); margin-left: 8px; }
.photo-tile__plate span { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.photo-tile__plate .i { width: 16px; height: 16px; }
.photo-tile:active { background: var(--surface-2); }

.routine-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.routine-card__text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.routine-card__text h3 { font-size: 17px; overflow-wrap: anywhere; }
.routine-card__text p { font-size: 13px; color: var(--text-2); }
.routine-card--full { flex-direction: column; align-items: stretch; }
.routine-card--full .label { color: var(--accent); }
.routine-card--full.is-done .label { color: var(--ok); }
.ex-list { margin: 8px 0 12px; }
.ex-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ex-list li:first-child { border-top: 0; }
.ex-list li > span { min-width: 0; overflow-wrap: anywhere; }
.ex-list b { flex: none; white-space: nowrap; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.about-list { margin: 0 0 16px; }
.label + .about-list { margin-top: 6px; }

.row-card { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 12px 12px 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--text); }
.row-card:active { background: var(--surface-2); }
.row-card__icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.row-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-card__text strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.row-card__text span { font-size: 13px; color: var(--text-2); }
.row-card__chev { color: var(--text-3); }

.news-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--text); }
.news-card:active { background: var(--surface-2); }
.news-card__meta { display: flex; align-items: center; gap: 10px; }
.news-card strong { font-size: 16px; font-weight: 600; line-height: 1.25; }
.news-card__text { font-size: 13px; color: var(--text-2); }
.news-card .link { min-height: 28px; margin-top: 2px; }

/* Filas abiertas: el contenido va sin caja, separado por filetes; las cajas se reservan a los objetos (carnet, aforo, foto, pase). */
.routine-card--flat, .row-card--flat, .news-card--flat { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding-left: 0; padding-right: 0; }
.routine-card--flat { padding-top: 12px; padding-bottom: 14px; }
.routine-card--flat .label { color: var(--accent); }
.routine-card--flat.is-done .label { color: var(--ok); }
.row-card--flat { padding-top: 12px; padding-bottom: 12px; }
.news-card--flat { padding-top: 12px; padding-bottom: 14px; }
.row-card--flat:active, .news-card--flat:active { background: transparent; opacity: .72; }
.block--flat .block__head { margin-bottom: 2px; }

.dev { margin-top: 30px; padding: 18px 0 0; border-top: 2px solid var(--text); }
.dev__kicker { margin: 0 0 6px; font: 700 22px/1.05 var(--font-display); text-transform: uppercase; }
.dev__text { margin: 0 0 14px; font-size: 14px; color: var(--text-2); }
.dev__text strong { color: var(--text); font-weight: 600; }
.dev__actions { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; }
.dev__actions .btn { padding: 0 12px; white-space: nowrap; }
.dev__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.dev__links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-3); }
.dev__links a:active { color: var(--accent); }

.foot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 22px 0 4px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------- Pase ---------- */
.pass { background: #f6f3ee; color: #141414; border-radius: var(--r-l); padding: 16px 18px 14px; }
.pass__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pass__brand { font: 800 22px/1 var(--font-display); font-style: italic; letter-spacing: -.01em; }
.pass__brand b { color: var(--accent); }
.pass__kind { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6a655e; }
.pass__qr { width: min(228px, 68%); margin: 16px auto 12px; }
.pass__qr svg { display: block; width: 100%; height: auto; }
.pass__id { text-align: center; }
.pass__id strong { display: block; font-size: 17px; font-weight: 600; }
.pass__id span { font-size: 13px; color: #5c5750; }
.pass__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #cdc6bb; }
.pass__clock { font: 600 15px/1 var(--font-ui); font-variant-numeric: tabular-nums; color: #2b2824; }
.pass .tag { color: #9a4f17; border-color: #e6c9b2; }

.status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.status.is-in { border-color: rgba(111, 207, 122, .4); }
.status__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.status__text strong { font: 700 26px/1 var(--font-display); text-transform: uppercase; }
.status.is-in .status__text strong { color: var(--ok); }
.status .btn { flex: none; }

.steps { counter-reset: s; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 10px 0; }
.steps li > div { min-width: 0; }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); width: 32px; height: 32px; border: 1.5px solid var(--accent); border-radius: 50%; color: var(--accent); font: 700 13px/29px var(--font-display); text-align: center; }
.steps strong { display: block; font-size: 15px; font-weight: 600; }
.steps p { margin-top: 2px; font-size: 13px; color: var(--text-2); }

/* ---------- Membresía y clases ---------- */
/* Lista de planes seleccionable con un único botón de cambio */
.plan-list { border-top: 1px solid var(--line); }
.plan-row { position: relative; display: grid; grid-template-columns: 22px 1fr auto; column-gap: 12px; row-gap: 4px; align-items: center; width: 100%; min-height: 76px; padding: 13px 0 12px; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); }
.plan-row:active { background: var(--surface); }
.plan-row__sel { grid-row: 1 / span 2; width: 20px; height: 20px; border: 1.5px solid var(--line-control); border-radius: 6px; display: grid; place-items: center; }
.plan-row__sel::after { content: ''; width: 10px; height: 10px; border-radius: 3px; background: transparent; }
.plan-row[aria-checked="true"] .plan-row__sel { border-color: var(--accent); }
.plan-row[aria-checked="true"] .plan-row__sel::after { background: var(--accent); }
.plan-row__name { display: flex; align-items: center; gap: 8px; font: 700 22px/1 var(--font-display); text-transform: uppercase; }
.plan-row__name .tag { font: 700 11px/1 var(--font-ui); letter-spacing: .1em; min-height: 20px; }
.plan-row__price { grid-column: 3; grid-row: 1 / span 2; text-align: right; font: 700 22px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-row__price small { display: block; margin-top: 4px; font: 500 12px/1 var(--font-ui); color: var(--text-2); }
.plan-row__feat { grid-column: 2; font-size: 13px; line-height: 1.35; color: var(--text-2); }
.plan-row__feat b { font-weight: 500; color: var(--text-2); }
/* Pegada justo encima de la barra: el relleno inferior cubre la burbuja QR sin dejar franjas. */
.sticky-cta { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 2; margin-top: 12px; padding: 8px 0 calc(var(--nav-bump) + 4px); background: var(--bg); }
.sticky-cta .micro { margin-top: 8px; text-align: center; }

.current-plan { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--r-m); margin-bottom: 18px; }
.current-plan__name { font: 700 30px/1 var(--font-display); text-transform: uppercase; color: var(--accent); }
.current-plan__price { grid-column: 2; grid-row: 1 / span 2; text-align: right; font: 700 24px/1 var(--font-display); }
.current-plan__price small { display: block; margin-top: 3px; font: 500 12px/1 var(--font-ui); color: var(--text-2); }
.current-plan__status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

.packs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.pack { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-top: 1px solid var(--line); }
.pack:first-child { border-top: 0; }
.pack__name { display: flex; flex-direction: column; gap: 2px; }
.pack__name strong { font-size: 15px; font-weight: 600; }
.pack__name span { font-size: 12px; color: var(--text-2); }
.pack__price { font: 700 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.booking__summary { margin-top: 10px; text-align: center; }
.booking-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; border-top: 1px solid var(--line); }
.booking-item:first-child { border-top: 0; }
.booking-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.booking-item__text strong { font-size: 15px; font-weight: 600; }
.booking-item__text span { font-size: 13px; color: var(--text-2); }
.booking-item .btn { flex: none; }

/* ---------- Perfil ---------- */
.identity { display: flex; align-items: center; gap: 14px; }
.identity__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.identity__text strong { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.identity__text span { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.activity { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.activity div { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.activity strong { display: block; font: 700 30px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.activity span { font-size: 12px; color: var(--text-2); }
.log { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.log li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.log li:first-child { border-top: 0; }
.log__icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.log__icon--in { background: var(--accent-soft); color: var(--accent); }
.log__icon .i { width: 17px; height: 17px; }
.log li span:nth-child(2) { flex: 1; font-weight: 500; }
.log li time { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; }

/* ---------- Portada ---------- */
.cover {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: calc(100vh - var(--nav-h) - var(--safe-b) - var(--bar-h) - 10px);
  min-height: calc(100dvh - var(--nav-h) - var(--safe-b) - var(--bar-h) - 10px);
  margin: -10px calc(var(--pad) * -1) 0;
  padding: 88px 20px 24px;
}
body[data-screen="portada"] main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 10px); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; z-index: -2; }
.cover::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 11, 11, .25) 0%, rgba(11, 11, 11, .15) 35%, rgba(11, 11, 11, .94) 72%); }
.cover__logo { position: absolute; top: 18px; left: 20px; min-height: 44px; padding-top: 4px; font: 800 28px/1 var(--font-display); font-style: italic; letter-spacing: -.01em; color: #fff; }
.cover__logo b { color: var(--accent); }
.cover__logo small { display: block; margin-top: 4px; font: 600 10px/1 var(--font-ui); font-style: normal; letter-spacing: .22em; color: var(--text-2); }
.cover .tag { align-self: flex-start; margin-bottom: 14px; }
.cover h1 { margin-bottom: 10px; font: 800 54px/.95 var(--font-display); text-transform: uppercase; color: #fff; }
.cover h1 span { color: var(--accent); }
.cover p { margin-bottom: 18px; max-width: 30ch; font-size: 15px; color: var(--text-2); }
.cover .btn { width: 100%; }
.cover .btn + .btn { margin-top: 8px; }
.cover .micro { max-width: none; margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--text-3); }

.plan-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-opt { position: relative; display: block; padding: 12px 12px 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; min-height: 64px; }
.plan-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan-opt strong { display: block; font: 700 17px/1 var(--font-display); text-transform: uppercase; }
.plan-opt span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.plan-opt:has(input:checked), .plan-opt.is-sel { border-color: var(--accent); background: var(--accent-soft); }
.plan-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-opt--wide { grid-column: 1 / -1; }

/* ---------- Tour / guía / noticias ---------- */
.tour-list .row-card:last-child { border-bottom: 1px solid var(--line); }
.tour-list .row-card__text span { line-height: 1.35; }
.guide-col { padding: 14px 16px 16px; }
.guide-col .tag { margin-bottom: 8px; }
.guide-col h2 { margin-bottom: 4px; }
.guide-col + .guide-col { margin-top: 12px; }
.poster { border-radius: var(--r-m); border: 1px solid var(--line); }
.article { margin-bottom: 10px; }
.article .news-card__meta { margin-bottom: 2px; }

/* ---------- Resultado dentro de la hoja ---------- */
.result { text-align: center; padding: 6px 0 2px; }
.result__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.result__icon .i { width: 26px; height: 26px; stroke-width: 2.2; }
.result h2 { font-size: 28px; margin-bottom: 6px; }
.result p { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }

/* ---------- Navegación inferior ---------- */
.nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--app-w);
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 4px var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #0e0e0e; border-top: 1px solid var(--line);
  z-index: 30;
}
.nav__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 44px; color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .01em; }
.nav__item .i { width: 24px; height: 24px; }
.nav__item:active { color: var(--text); }
.nav__item.is-active { color: var(--accent); font-weight: 600; }
.nav__item--qr { gap: 0; color: var(--text-2); }
.nav__qr { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--bg); }
.nav__qr .i { width: 26px; height: 26px; stroke-width: 2; }
.nav__item--qr:active .nav__qr, .nav__item--qr.is-active .nav__qr { background: var(--accent-press); }
.nav__item--qr.is-active { color: var(--accent); }

/* ---------- Hoja inferior (dialog) ---------- */
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto;
  width: 100%; max-width: var(--app-w); max-height: min(90dvh, 760px);
  padding: 0; border: 0; border-radius: 20px 20px 0 0;
  background: var(--surface-2); color: var(--text);
  overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
}
.sheet::backdrop { background: rgba(0, 0, 0, .62); }
.sheet__inner { position: relative; padding: 10px 18px calc(18px + var(--safe-b)); }
.sheet__handle { width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--line-strong); }
.sheet__close { position: absolute; top: 10px; right: 8px; }
.sheet__head { padding-right: 44px; margin-bottom: 14px; }
.sheet__head h2 { font-size: 28px; margin-top: 6px; }
.sheet__head p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.sheet__actions { display: grid; gap: 8px; margin-top: 16px; }
.sheet__actions .link { justify-content: center; }
.sheet__actions .micro { text-align: center; }
.sheet .lead { margin-bottom: 8px; }
.lead strong { color: var(--text); }
.sheet__body-text { font-size: 14px; color: var(--text-2); }
.check-list li { border-top: 1px solid var(--line); }
.check-list li:first-child { border-top: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + var(--nav-bump) + 10px);
  transform: translateX(-50%) translateY(16px);
  width: calc(min(100%, var(--app-w)) - 40px); max-width: 360px;
  padding: 12px 16px; border-radius: 10px;
  background: #f3efe8; color: #141414;
  font-size: 14px; font-weight: 500; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Presentación en escritorio ---------- */
.desk { display: none; }
@media (min-width: 560px) {
  body { background: #060606; }
  .app { background: var(--bg); border-left: 1px solid #1c1c1c; border-right: 1px solid #1c1c1c; }
}
@media (min-width: 1024px) {
  .desk {
    display: block; position: fixed; top: 50%; transform: translateY(-50%);
    right: calc(50% + var(--app-w) / 2 + 48px); width: min(270px, calc(50% - var(--app-w) / 2 - 72px));
    color: var(--text-2); font-size: 14px;
  }
  .desk__brand { margin: 0 0 14px; font: 800 34px/1 var(--font-display); font-style: italic; color: #fff; }
  .desk__brand b { color: var(--accent); }
  .desk__title { margin: 0 0 10px; font: 700 22px/1.1 var(--font-display); color: var(--text); text-transform: uppercase; }
  .desk__text { margin: 0 0 12px; line-height: 1.5; }
  .desk__text strong { color: var(--text); }
  .desk__text a { color: var(--accent); }
  .desk .btn { display: flex; width: max-content; max-width: 100%; margin-top: 6px; }
  .desk__mail { display: flex; width: fit-content; align-items: center; min-height: 44px; margin-top: 8px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
  .desk__mail:hover { color: var(--text); }
  .desk__try { margin: 0 0 14px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
  .desk__try .label { display: block; margin-bottom: 4px; }
  .desk__try a { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text-2); }
  .desk__try a:hover { color: var(--accent); }
  .desk__try .i { width: 16px; height: 16px; color: var(--accent); }
}
/* Ventanas de escritorio bajas (portátiles con escalado): sin los atajos, la nota cabe entera. */
@media (min-width: 1024px) and (max-height: 620px) {
  .desk { max-height: calc(100vh - 24px); overflow-y: auto; }
  .desk__try { display: none; }
}

/* ---------- Pantallas estrechas ---------- */
@media (max-width: 374px) {
  :root { --pad: 14px; }
  .home-head h1 { font-size: 29px; }
  .member-card { grid-template-columns: 1fr 86px; }
  .member-card__tab { padding: 12px 10px 10px 26px; }
  .member-card__num { font-size: 11px; }
  .member-card__plan { font-size: 32px; }
  .entry-btn__text strong { font-size: 21px; }
  .occupancy__figure strong { font-size: 52px; }
  .cover h1 { font-size: 46px; }
  .screen-head h1 { font-size: 26px; }
  .dev__actions { grid-template-columns: 1fr; }
  .chips { gap: 4px; }
}

/* ---------- Interacción con ratón ---------- */
@media (hover: hover) {
  .btn:hover:not(:disabled) { filter: brightness(1.06); }
  .btn--ghost:hover:not(:disabled), .btn--danger:hover:not(:disabled) { background: var(--surface-2); filter: none; }
  .link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .nav__item:hover { color: var(--text); }
  .nav__item.is-active:hover { color: var(--accent); }
  .list__main:hover, .row-card:hover, .news-card:hover, .member-card:hover { background: var(--surface-2); }
  .icon-btn:hover { background: var(--surface-2); color: var(--text); }
  .week__day:hover:not(.is-sel):not(:disabled), .slot:hover:not(.is-sel):not(:disabled), .seg__opt:hover:not(.is-sel), .chip-day:hover:not([aria-pressed="true"]) { background: var(--surface-2); }
}

/* ---------- Movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet-in { from { transform: translateY(28px); opacity: .5; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
