/* ==========================================================
   APP THE DOC (PWA) — estilos
   Mismos colores y tipografías que la web y el backoffice.
   Mobile first; en pantallas grandes se centra en una columna
   con forma de móvil.
   ========================================================== */
:root {
  --red: #c61b18;
  --red-deep: #773231;
  --red-grad: linear-gradient(115deg, var(--red) 0%, var(--red-deep) 100%);
  --black: #0a0a0a;
  --ink: #141414;
  --steel: #1e1e1e;
  --app-bg: var(--black);                  /* fondo de las pantallas */
  --line: rgba(255, 255, 255, .1);
  --white: #fff;
  --muted: #a3a3a3;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;   /* textos */
  --font-ui: "Barlow", system-ui, sans-serif;      /* títulos de pantalla y botones */
  --radius: 10px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --gutter: 1.5rem;
  /* Zonas seguras (notch, barra de inicio) en la app instalada */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Antetítulo (como en la web) ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--red);
}

/* ---------- Botones ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  height: 54px;
  padding: 0 1.2rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  touch-action: manipulation;
  transition: filter .2s, background-color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: scale(.985); }
/* Rojo: acción principal */
.btn--red {
  background: var(--red-grad);
  border-color: var(--red);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
.btn--red:hover { filter: brightness(1.12); }
.btn--red[aria-busy="true"] { pointer-events: none; opacity: .7; }
/* Oscuro: sobre el degradado de bienvenida */
.btn--dark { background: var(--black); border-color: rgba(0, 0, 0, .5); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.btn--dark:hover { background: var(--ink); }

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: .65rem; }
.field__label { font-family: var(--font-ui); font-weight: 700; font-size: 1.1rem; }
.field input {
  width: 100%;
  height: 56px;
  padding: 0 1rem;
  font: inherit;
  font-size: 1.05rem;   /* más de 16px: iOS no hace zoom al enfocar */
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--radius);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #7a7a7a; }
.field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(198, 27, 24, .25); }
.field input.is-invalid { border-color: var(--red); }

.field__pass { position: relative; display: block; }
.field__pass input { padding-right: 3.6rem; }
.field__toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--white);
  background: none;
  border: 0;
  cursor: pointer;
}
.field__toggle svg { width: 24px; height: 24px; }
.field__toggle .eye-on,
.field__toggle[aria-pressed="true"] .eye-off { display: none; }
.field__toggle[aria-pressed="true"] .eye-on { display: block; }

/* ==========================================================
   PANTALLAS DE ACCESO
   ========================================================== */
.auth {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--app-bg);
}
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 1.2rem) var(--gutter) calc(var(--safe-bottom) + 2rem);
  animation: screen-in .35s var(--ease);
}
@keyframes screen-in { from { opacity: 0; transform: translateX(16px); } }

/* ---------- 1 · Bienvenida: degradado de marca (nada cruza el texto) ---------- */
.screen--welcome {
  position: relative;
  text-align: center;
  background:
    radial-gradient(110% 55% at 50% 0%, rgba(198, 27, 24, .45) 0%, transparent 65%),
    linear-gradient(170deg, var(--red-deep) 0%, #3a1716 40%, var(--black) 78%);
  animation: none;
}
.screen--welcome > * { position: relative; }
.welcome__guest {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 1.6rem;
  padding: .85rem 1rem;
  text-align: left;
  background: rgba(10, 10, 10, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.welcome__guest .ico-fill { width: 26px; height: 26px; fill: var(--red); stroke: none; }
.welcome__guest span { flex: 1; display: grid; }
.welcome__guest small { font-size: .78rem; color: var(--muted); }
.welcome__guest b { font-family: var(--font-ui); font-weight: 700; font-size: 1rem; }
.welcome__guest > svg:last-child { width: 18px; height: 18px; color: var(--muted); }
.welcome__logo { width: 52%; max-width: 230px; margin: 18dvh auto 0; }
.welcome__foot { margin-top: auto; }
.welcome__title { font-family: var(--font-ui); font-weight: 700; font-size: clamp(1.7rem, 7.4vw, 2.05rem); line-height: 1.15; }
.welcome__text { margin: 1rem auto 0; max-width: 22rem; font-size: 1.05rem; line-height: 1.55; color: rgba(255, 255, 255, .88); }
.welcome__foot .btn { margin-top: 2.2rem; }
.welcome__login { margin-top: 1.4rem; font-size: .98rem; color: rgba(255, 255, 255, .85); }
.welcome__login a { margin-left: .5rem; font-weight: 700; color: var(--white); }

/* ---------- 2 · Acceder: cabecera con volver ---------- */
.screen__head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; }
.screen__back { position: absolute; left: -.6rem; display: grid; place-items: center; width: 44px; height: 44px; }
.screen__title { font-family: var(--font-ui); font-weight: 700; font-size: clamp(1.4rem, 6.2vw, 1.65rem); }
.screen__intro { margin-top: 2.6rem; text-align: center; font-size: 1.1rem; line-height: 1.6; }

.auth__form { display: grid; gap: 1.6rem; margin-top: 2.6rem; }
.auth__forgot { justify-self: end; margin-top: -.8rem; font-family: var(--font-ui); font-weight: 500; font-size: .92rem; color: var(--muted); }
.auth__forgot:hover { color: var(--white); }
.auth__msg {
  padding: .8rem 1rem;
  font-size: .9rem;
  line-height: 1.45;
  color: #ffb3b1;
  background: rgba(198, 27, 24, .14);
  border-left: 3px solid var(--red);
  border-radius: 4px;
}
.auth__msg.is-info { color: #d0d0d0; background: rgba(255, 255, 255, .06); border-left-color: var(--muted); }
.auth__submit { margin-top: .2rem; }

.legal { margin-top: auto; padding-top: 2.5rem; text-align: center; font-size: .9rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.legal a { font-weight: 700; color: var(--white); }

/* Pantallas grandes: la app se ve como un móvil centrado */
@media (min-width: 600px) {
  .auth-page {
    display: grid;
    place-items: center;
    padding: 2rem 0;
    background: radial-gradient(900px 500px at 50% -10%, rgba(198, 27, 24, .2) 0%, transparent 60%), var(--black);
  }
  .auth { width: 420px; min-height: 0; border: 1px solid var(--line); border-radius: 36px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
  .screen { min-height: min(860px, calc(100dvh - 4rem)); }
}

/* ---------- Aviso breve ---------- */
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 1.5rem);
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: .8rem 1.1rem;
  font-size: .92rem;
  color: var(--white);
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  transform: translateX(-50%);
}

/* ==========================================================
   AVISO DE INSTALAR LA APP
   ========================================================== */
.install {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 1rem);
  display: flex;
  align-items: center;
  gap: .8rem;
  width: min(440px, calc(100vw - 2rem));
  padding: .7rem .7rem .7rem .8rem;
  background: var(--steel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
  transform: translateX(-50%);
  animation: install-in .45s var(--ease);
}
.install img { flex: none; border-radius: 9px; }
.install span { flex: 1; display: grid; gap: .1rem; font-size: .9rem; }
.install small { font-size: .78rem; color: var(--muted); }
.install__btn {
  height: 38px;
  padding: 0 1rem;
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.install__close { display: grid; place-items: center; width: 34px; height: 34px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.install__close svg { width: 20px; height: 20px; }
@keyframes install-in { from { opacity: 0; transform: translate(-50%, 20px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   APP — estructura (inicio y resto de pantallas con pestañas)
   El contenido hace scroll dentro de .app__main; la cabecera y
   la barra de pestañas quedan fijas encima (efecto cristal).
   ========================================================== */
.app-page { overflow: hidden; background: var(--black); }
.app {
  position: relative;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: var(--black);
}
/* Brillo rojo de fondo, como en la web */
.app::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -20% -40% auto auto;
  width: 120%;
  height: 60%;
  background: radial-gradient(closest-side, rgba(198, 27, 24, .28), transparent 70%);
  pointer-events: none;
}
.app__main {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 84px) 0 calc(var(--safe-bottom) + 118px);
  scrollbar-width: none;
}
.app__main::-webkit-scrollbar { display: none; }
.app__end {
  margin-top: 2.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .18);
}
.app__end em { font-style: italic; font-weight: 700; letter-spacing: .1em; }

@media (min-width: 600px) {
  .app-page {
    display: grid;
    place-items: center;
    height: 100vh;
    background: radial-gradient(900px 500px at 50% -10%, rgba(198, 27, 24, .2) 0%, transparent 60%), #050505;
  }
  .app { width: 420px; height: min(880px, calc(100dvh - 4rem)); border: 1px solid var(--line); border-radius: 40px; box-shadow: 0 40px 100px rgba(0, 0, 0, .7); }
}

/* Entrada escalonada de los bloques */
.rv { animation: rv-in .7s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms); }
@keyframes rv-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }

/* ---------- Cabecera ---------- */
.topbar {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: calc(var(--safe-top) + .9rem) var(--gutter) .8rem;
  transition: background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: rgba(10, 10, 10, .72);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--red), var(--red-deep), #ff6a4d, var(--red));
  padding: 2px;
}
.avatar span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: .04em;
  background: var(--ink);
  border: 2px solid var(--black);
  border-radius: 50%;
}
.topbar__hello { flex: 1; display: grid; line-height: 1.15; }
.topbar__hello small { font-size: .8rem; color: var(--muted); }
.topbar__hello b { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; text-transform: uppercase; letter-spacing: .01em; }
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}
.icon-btn__dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 9px;
  height: 9px;
  background: var(--red);
  border: 2px solid var(--black);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(198, 27, 24, .7);
  animation: ping 2.4s infinite;
}
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 8px rgba(198, 27, 24, 0); } }

/* ---------- Secciones ---------- */
.home-sec { margin-top: 2.2rem; }
.home-sec:first-child { margin-top: .4rem; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--gutter); margin-bottom: .9rem; }
.sec-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; line-height: 1; }
.sec-head h2 em { font-style: italic; color: var(--red); }
.sec-head a { font-family: var(--font-ui); font-weight: 600; font-size: .9rem; color: var(--muted); }

/* Carrusel horizontal con imán */
.rail {
  display: flex;
  gap: .85rem;
  padding: .2rem var(--gutter) .6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: none; scroll-snap-align: start; }

.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 30px;
  padding: 0 .8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: rgba(10, 10, 10, .45);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.glass-chip svg { width: 15px; height: 15px; stroke-width: 2.6; }
.glass-chip .ico-fill { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.glass-chip--ok { color: var(--white); background: rgba(198, 27, 24, .85); border-color: rgba(255, 255, 255, .25); }

/* ---------- 1 · Tu próxima carrera ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
  margin: 0 var(--gutter);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(198, 27, 24, .15);
  cursor: pointer;
  isolation: isolate;
}
.hero__img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.16) translate(-2%, -1%); } }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, .55) 0%, rgba(10, 10, 10, 0) 28%, rgba(10, 10, 10, .35) 52%, rgba(10, 10, 10, .96) 100%),
    linear-gradient(115deg, rgba(198, 27, 24, .35) 0%, transparent 45%);
}
/* Brillo que cruza la tarjeta al entrar */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sheen 1.6s .9s var(--ease) forwards;
  pointer-events: none;
}
@keyframes sheen { to { transform: translateX(120%); } }
.hero__top { display: flex; justify-content: space-between; gap: .5rem; padding: 1rem; }
.hero__body { padding: 0 1.2rem 1.2rem; }
.hero__meta { display: flex; align-items: center; gap: .3rem; font-size: .82rem; color: rgba(255, 255, 255, .8); }
.hero__meta svg { width: 14px; height: 14px; margin-left: .2rem; }
.hero__title {
  margin-top: .4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: .9;
  text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .5);
}
.hero__title em { display: block; font-style: italic; color: var(--white); -webkit-text-stroke: 0; background: linear-gradient(90deg, #fff 0%, #ffb0a6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__count { display: flex; align-items: center; gap: .9rem; margin-top: 1rem; }
.hero__count b {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 5.2rem;
  line-height: .8;
  font-variant-numeric: tabular-nums;
  background: var(--red-grad);
  background: linear-gradient(180deg, #ff4d3a 0%, var(--red) 55%, var(--red-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 24px rgba(198, 27, 24, .45));
}
.hero__count span { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.05; letter-spacing: .08em; text-transform: uppercase; }
.hero__count small { display: block; margin-top: .35rem; font-family: var(--font-body); font-weight: 400; font-size: .78rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.hero__svc {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.1rem;
  padding: .7rem .9rem;
  font-size: .9rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
.hero__svc svg { width: 18px; height: 18px; color: #ff8577; }
.hero__svc b { flex: 1; min-width: 0; overflow: hidden; font-family: var(--font-ui); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.hero__svc span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.hero__svc svg:last-child { width: 16px; height: 16px; color: var(--muted); }

/* ---------- 2 · Mis bicis ---------- */
.bike {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 252px;
  padding: .5rem;
  color: var(--white);
  background: linear-gradient(160deg, #1d1d1d 0%, #111 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  cursor: pointer;
  text-align: left;
  transition: transform .2s;
}
.bike:active { transform: scale(.98); }
.bike__photo { position: relative; height: 150px; overflow: hidden; border-radius: 18px; }
.bike__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.bike:hover .bike__photo img { transform: scale(1.05); }
.bike__info { display: grid; gap: .1rem; padding: .8rem .6rem .5rem; }
.bike__info small { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.bike__info h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; line-height: 1; text-transform: uppercase; }
.bike__info p { font-size: .82rem; color: var(--muted); }
.bike--add {
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 190px;
  padding: 1.2rem;
  text-align: center;
  font: inherit;
  background: transparent;
  border: 1.5px dashed rgba(255, 255, 255, .22);
}
.bike--add b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; }
.bike--add small { font-size: .78rem; line-height: 1.4; color: var(--muted); }
.bike__plus { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: .4rem; background: var(--red-grad); border-radius: 50%; box-shadow: 0 10px 30px rgba(198, 27, 24, .45); }
.bike__plus svg { width: 26px; height: 26px; stroke-width: 2.4; }

/* ---------- 3 · Próximas carreras ---------- */
.race {
  position: relative;
  width: 172px;
  height: 236px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  cursor: pointer;
  isolation: isolate;
}
.race img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.race:hover img { transform: scale(1.06); }
.race::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, .2) 0%, transparent 35%, rgba(10, 10, 10, .92) 100%); }
.race.is-mine { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 16px 40px rgba(198, 27, 24, .3); }
.race__date {
  position: absolute;
  top: .6rem;
  left: .6rem;
  display: grid;
  justify-items: center;
  min-width: 48px;
  padding: .35rem .4rem .3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: rgba(10, 10, 10, .5);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.race__date b { font-weight: 800; font-size: 1.45rem; line-height: 1; letter-spacing: 0; }
.race__chip { position: absolute; top: .7rem; right: .6rem; padding: .2rem .55rem; font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; background: rgba(255, 255, 255, .9); color: var(--black); border-radius: 999px; }
.race__body { position: absolute; inset: auto 0 0; padding: .9rem; }
.race__mine { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: .35rem; padding: .15rem .5rem; font-family: var(--font-display); font-weight: 700; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; background: var(--red); border-radius: 999px; }
.race__mine svg { width: 12px; height: 12px; stroke-width: 3; }
.race h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: .98; text-transform: uppercase; }
.race p { display: flex; align-items: center; gap: .2rem; margin-top: .3rem; font-size: .75rem; color: rgba(255, 255, 255, .75); }
.race p svg { width: 13px; height: 13px; }

/* ---------- 4 · Para ti: promoción en forma de ticket ---------- */
.promo {
  --notch: 13px;
  position: relative;
  margin: 0 var(--gutter);
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #e0261f 0%, var(--red) 35%, var(--red-deep) 100%);
  box-shadow: 0 24px 50px rgba(198, 27, 24, .3);
  isolation: isolate;
}
/* Rayas inclinadas de fondo y brillo que pasa cada pocos segundos */
.promo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-linear-gradient(-60deg, rgba(255, 255, 255, .05) 0 14px, transparent 14px 40px);
}
.promo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%);
  transform: translateX(-130%);
  animation: sheen-loop 5s 2s infinite;
  pointer-events: none;
}
@keyframes sheen-loop { 0% { transform: translateX(-130%); } 30%, 100% { transform: translateX(130%); } }
.promo__main { padding: 1.3rem 1.3rem 1.1rem; }
.promo__tag { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.promo__value { margin-top: .2rem; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 3.4rem; line-height: .85; text-transform: uppercase; }
.promo h3 { margin-top: .3rem; font-family: var(--font-ui); font-weight: 700; font-size: 1.2rem; }
.promo__note { margin-top: .25rem; font-size: .85rem; color: rgba(255, 255, 255, .82); }
/* Línea perforada con muescas a los lados */
.promo__stub {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: 1rem 1.3rem;
  border-top: 2px dashed rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .18);
}
.promo__stub::before, .promo__stub::after {
  content: "";
  position: absolute;
  top: calc(var(--notch) * -1 - 1px);
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  background: var(--black);
  border-radius: 50%;
}
.promo__stub::before { left: calc(var(--notch) * -1); }
.promo__stub::after { right: calc(var(--notch) * -1); }
.promo__stub small { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.promo__stub code { font-family: "Roboto Mono", ui-monospace, monospace; font-weight: 500; font-size: 1.2rem; letter-spacing: .08em; }
.promo__copy {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 42px;
  padding: 0 1rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .9rem;
  color: var(--red);
  background: var(--white);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s, background-color .2s, color .2s;
}
.promo__copy:active { transform: scale(.95); }
.promo__copy svg { width: 17px; height: 17px; }
.promo__copy.is-done { color: var(--white); background: #1f9d55; }
.promo__foot { padding: .7rem 1.3rem .9rem; font-size: .76rem; color: rgba(255, 255, 255, .78); background: rgba(0, 0, 0, .18); }

/* ---------- 5 · Últimas compras ---------- */
.list-card {
  margin: 0 var(--gutter);
  list-style: none;
  background: linear-gradient(160deg, #1a1a1a 0%, #111 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.list-card li + li { border-top: 1px solid var(--line); }
.list-card a { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; }
.list-card__ico { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.list-card__ico svg { width: 20px; height: 20px; }
.list-card__ico--servicio { color: #ff8577; background: rgba(198, 27, 24, .16); }
.list-card__ico--reparacion { color: #ffc46b; background: rgba(214, 150, 60, .14); }
.list-card__txt { flex: 1; display: grid; min-width: 0; }
.list-card__txt b { overflow: hidden; font-family: var(--font-ui); font-weight: 600; font-size: .95rem; white-space: nowrap; text-overflow: ellipsis; }
.list-card__txt small { overflow: hidden; font-size: .78rem; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.list-card__amt { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }

/* ---------- Barra de pestañas (cristal flotante) ---------- */
.tabbar {
  position: absolute;
  z-index: 6;
  left: .8rem;
  right: .8rem;
  bottom: calc(var(--safe-bottom) + .8rem);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: .45rem;
  background: rgba(24, 24, 24, .72);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}
.tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .2rem;
  padding: .5rem 0 .4rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .7rem;
  color: rgba(255, 255, 255, .55);
  border-radius: 20px;
  transition: color .25s;
}
.tab svg { width: 23px; height: 23px; }
.tab.is-active { color: var(--white); background: linear-gradient(180deg, rgba(198, 27, 24, .4) 0%, rgba(198, 27, 24, .14) 100%); box-shadow: inset 0 0 0 1px rgba(198, 27, 24, .5); }
.tab.is-active svg { filter: drop-shadow(0 0 10px rgba(255, 80, 60, .7)); }
.tab:active { transform: scale(.94); }

/* ==========================================================
   CARRERAS — calendario
   ========================================================== */
.app__main--page { padding-top: 0; }
.page-head { padding: calc(var(--safe-top) + 1.4rem) var(--gutter) 0; }
.page-head__title { margin-top: .35rem; font-family: var(--font-display); font-weight: 800; font-size: 3.1rem; line-height: .9; text-transform: uppercase; }
.page-head__title em { font-style: italic; color: var(--red); }
.page-head__lead { margin-top: .7rem; font-size: .95rem; line-height: 1.5; color: var(--muted); }

.cal-bar {
  position: sticky;
  z-index: 4;
  top: 0;
  display: grid;
  gap: .7rem;
  margin-top: 1.4rem;
  padding: .7rem var(--gutter) .8rem;
  transition: background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.cal-bar.is-stuck {
  padding-top: calc(var(--safe-top) + .7rem);
  background: rgba(10, 10, 10, .78);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
/* Segmentado tipo iOS */
.seg-app { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 14px; }
.seg-app button { height: 38px; font-family: var(--font-ui); font-weight: 700; font-size: .92rem; color: var(--muted); background: none; border: 0; border-radius: 10px; cursor: pointer; transition: color .2s, background-color .2s; }
.seg-app button.is-active { color: var(--white); background: var(--red-grad); box-shadow: 0 6px 18px rgba(198, 27, 24, .35); }
.chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 34px; padding: 0 1rem; font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .7); background: transparent; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; cursor: pointer; transition: all .2s; }
.chips button.is-active { color: var(--black); background: var(--white); border-color: var(--white); }

/* Próxima carrera destacada */
.cal-feat {
  position: relative;
  display: block;
  height: 300px;
  margin: .6rem var(--gutter) 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .5);
  isolation: isolate;
}
.cal-feat.is-mine { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 24px 50px rgba(198, 27, 24, .25); }
.cal-feat img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-in-out infinite alternate; }
.cal-feat::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, .35) 0%, transparent 35%, rgba(10, 10, 10, .95) 100%); }
.cal-feat__count { position: absolute; top: .9rem; left: .9rem; }
.cal-feat__body { position: absolute; inset: auto 0 0; padding: 1.1rem 4.4rem 1.1rem 1.1rem; }
.cal-feat h2 { margin-top: .5rem; font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; line-height: .92; text-transform: uppercase; }
.cal-feat h2 em { display: block; font-style: italic; color: #ff8577; }
.cal-feat p { display: flex; align-items: center; gap: .3rem; margin-top: .45rem; font-size: .82rem; color: rgba(255, 255, 255, .8); }
.cal-feat p svg { width: 14px; height: 14px; }
.cal-feat__go { position: absolute; right: 1rem; bottom: 1.1rem; display: grid; place-items: center; width: 46px; height: 46px; background: var(--red-grad); border-radius: 50%; box-shadow: 0 10px 26px rgba(198, 27, 24, .5); }

.cal-month { margin: 1.8rem var(--gutter) .7rem; font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.cal-month::after { content: ""; display: inline-block; width: 40px; height: 1px; margin-left: .8rem; vertical-align: middle; background: var(--line); }

.cal-row {
  display: grid;
  grid-template-columns: 42px 78px 1fr;
  align-items: center;
  gap: .8rem;
  margin: 0 var(--gutter) .65rem;
  padding: .6rem;
  background: linear-gradient(160deg, #1a1a1a 0%, #111 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform .15s;
}
.cal-row:active { transform: scale(.985); }
.cal-row.is-mine { border-color: rgba(198, 27, 24, .7); background: linear-gradient(160deg, rgba(198, 27, 24, .16) 0%, #111 70%); }
.cal-row.is-done { opacity: .78; }
.cal-row.is-done .cal-row__thumb img { filter: grayscale(.6); }
.cal-row__date { display: grid; justify-items: center; font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cal-row__date b { font-weight: 800; font-size: 1.7rem; line-height: 1; letter-spacing: 0; color: var(--white); }
.cal-row__thumb { height: 78px; overflow: hidden; border-radius: 14px; }
.cal-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cal-row__info { display: grid; gap: .15rem; min-width: 0; }
.cal-row__info b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; line-height: 1; text-transform: uppercase; }
.cal-row__info small { display: flex; align-items: center; gap: .3rem; overflow: hidden; font-size: .76rem; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.cal-row__info small svg { width: 13px; height: 13px; }
.cal-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.tag { display: inline-flex; align-items: center; gap: .2rem; padding: .15rem .5rem; font-family: var(--font-display); font-weight: 700; font-style: normal; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .07); border-radius: 999px; }
.tag--type { color: var(--black); background: rgba(255, 255, 255, .88); }
.tag--mine { color: var(--white); background: var(--red); }
.tag svg { width: 11px; height: 11px; stroke-width: 3; }
.cal-empty { margin: 2rem var(--gutter); text-align: center; color: var(--muted); }

/* ==========================================================
   FICHA DE CARRERA
   ========================================================== */
.app__main--detail { padding: 0 0 calc(var(--safe-bottom) + 110px); }

.detail-top {
  position: absolute;
  z-index: 6;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: calc(var(--safe-top) + .8rem) var(--gutter) .7rem;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.detail-top.is-scrolled { background: rgba(10, 10, 10, .78); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.detail-top__title { flex: 1; overflow: hidden; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; text-align: center; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.detail-top.is-scrolled .detail-top__title { opacity: 1; transform: none; }
.icon-btn--glass { flex: none; background: rgba(10, 10, 10, .4); border-color: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.dhero { position: relative; display: flex; align-items: flex-end; min-height: 520px; height: 72vh; height: 72dvh; max-height: 640px; overflow: hidden; isolation: isolate; }
.dhero__img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-in-out infinite alternate; }
.dhero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, .6) 0%, transparent 25%, transparent 45%, rgba(10, 10, 10, .85) 80%, var(--black) 100%),
    linear-gradient(115deg, rgba(198, 27, 24, .3) 0%, transparent 50%);
}
.dhero__body { width: 100%; padding: 0 var(--gutter) .6rem; animation: rv-in .8s var(--ease) both; }
.dhero__crumbs { font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.dhero__crumbs span { margin: 0 .3rem; color: var(--red); }
.dhero__title { margin-top: .4rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.9rem, 13vw, 3.6rem); line-height: .88; text-transform: uppercase; text-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
.dhero__title em { display: block; font-style: italic; color: var(--red); text-shadow: none; }
.dhero__chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1.1rem; }
.dhero__badge { display: flex; align-items: center; gap: .5rem; padding: .35rem .8rem .35rem .45rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.dhero__badge > svg { width: 26px; height: 26px; padding: 4px; color: var(--white); background: var(--red); border-radius: 50%; stroke-width: 2.2; }
.dhero__badge span { display: grid; font-family: var(--font-display); font-weight: 800; font-size: .9rem; line-height: 1; text-transform: uppercase; }
.dhero__badge small { font-weight: 700; font-size: .6rem; letter-spacing: .18em; color: rgba(255, 255, 255, .7); }

.dsec { margin-top: 2rem; padding: 0 var(--gutter); }
.dsec--plans { padding: 0; }
.dsec--plans > :not(.rail) { margin-left: var(--gutter); margin-right: var(--gutter); }
.dsec__head { margin-bottom: 1rem; }
.sec-title { margin-top: .3rem; font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: .95; text-transform: uppercase; }
.sec-title em { font-style: italic; color: var(--red); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 2rem; }
.facts div { padding: .85rem .9rem; background: linear-gradient(160deg, #1a1a1a 0%, #111 100%); border: 1px solid var(--line); border-radius: 18px; }
.facts dt { display: flex; align-items: center; gap: .35rem; font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.facts dt svg { width: 15px; height: 15px; color: var(--red); }
.facts dd { margin-top: .3rem; font-family: var(--font-ui); font-weight: 600; font-size: .95rem; line-height: 1.3; }
.dsec__lema { margin: .4rem 0 .9rem; font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; line-height: 1; text-transform: uppercase; }
.readmore { position: relative; display: grid; gap: .8rem; max-height: 9.6em; overflow: hidden; font-size: .97rem; line-height: 1.6; color: rgba(255, 255, 255, .82); transition: max-height .5s var(--ease); }
.readmore::after { content: ""; position: absolute; inset: auto 0 0; height: 4em; background: linear-gradient(transparent, var(--black)); transition: opacity .3s; }
.readmore.is-open { max-height: 80em; }
.readmore.is-open::after { opacity: 0; }
.readmore__btn { display: inline-flex; align-items: center; gap: .3rem; margin-top: .6rem; padding: .3rem 0; font-family: var(--font-ui); font-weight: 700; font-size: .92rem; color: var(--white); background: none; border: 0; cursor: pointer; }
.readmore__btn svg { width: 18px; height: 18px; color: var(--red); transition: transform .3s; }
.readmore__btn.is-open svg { transform: rotate(180deg); }

/* Ya contratado */
.mine-card { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; padding: 1rem; background: linear-gradient(135deg, rgba(31, 157, 85, .2) 0%, rgba(31, 157, 85, .05) 100%); border: 1px solid rgba(60, 207, 116, .4); border-radius: 18px; }
.mine-card > svg { width: 40px; height: 40px; padding: 9px; flex: none; color: var(--white); background: #1f9d55; border-radius: 50%; stroke-width: 2.6; }
.mine-card div { display: grid; gap: .1rem; }
.mine-card small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #8fe0a6; }
.mine-card b { font-family: var(--font-ui); font-weight: 700; font-size: 1.05rem; }
.mine-card span { font-size: .8rem; color: var(--muted); }

/* Tarjetas de servicio / pack */
.rail--plans { align-items: stretch; padding-top: .9rem; padding-bottom: 1rem; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 272px;
  padding: 1.3rem 1.2rem 1.2rem;
  background: linear-gradient(165deg, #1d1d1d 0%, #101010 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.plan.is-featured { background: linear-gradient(165deg, rgba(198, 27, 24, .22) 0%, #121212 55%); border-color: var(--red); box-shadow: 0 20px 44px rgba(198, 27, 24, .22); }
.plan.is-mine { border-color: rgba(60, 207, 116, .55); }
.plan__badge { position: absolute; top: -.7rem; left: 1.2rem; padding: .25rem .7rem; font-family: var(--font-display); font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; background: var(--red-grad); border-radius: 999px; box-shadow: 0 6px 16px rgba(198, 27, 24, .45); }
.plan__name { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1; text-transform: uppercase; }
.plan__price { display: flex; align-items: flex-start; gap: .15rem; margin-top: .5rem; }
.plan__price b { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 3.4rem; line-height: .9; }
.plan__price b.is-ask { font-size: 2.2rem; color: rgba(255, 255, 255, .85); }
.plan__price small { margin-top: .3rem; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--red); }
.plan__note { margin-top: .6rem; font-size: .88rem; line-height: 1.45; color: var(--muted); }
.plan__list { display: grid; gap: .5rem; margin: 1rem 0 1.1rem; padding-top: 1rem; list-style: none; border-top: 1px solid var(--line); font-size: .88rem; line-height: 1.35; }
.plan__list li { display: flex; gap: .5rem; }
.plan__list svg { width: 17px; height: 17px; margin-top: .05rem; color: var(--red); stroke-width: 2.6; }
.plan__ins { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; margin-bottom: .8rem; padding: .7rem .8rem; font-size: .82rem; background: rgba(255, 255, 255, .05); border-radius: 14px; cursor: pointer; }
.plan__ins b { color: var(--white); }
.plan__ins--done { justify-content: flex-start; color: #8fe0a6; cursor: default; }
.plan__ins--done svg { width: 17px; height: 17px; }
.plan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  height: 50px;
  margin-top: auto;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  background: var(--red-grad);
  border: 1px solid var(--red);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s, background-color .2s;
}
.plan__ins + .plan-btn { margin-top: 0; }
.plan-btn:active { transform: scale(.97); }
.plan-btn svg { width: 19px; height: 19px; stroke-width: 2.4; }
.plan-btn.is-added { background: #1f9d55; border-color: #3ccf74; animation: pop .35s var(--ease); }
.plan-btn.is-done { color: #8fe0a6; background: rgba(31, 157, 85, .14); border-color: rgba(60, 207, 116, .4); cursor: default; }
.plan-btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .4); }
@keyframes pop { 50% { transform: scale(1.05); } }

/* Interruptor (seguro) */
.switch-app { position: relative; flex: none; width: 44px; height: 26px; }
.switch-app input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.switch-app i { position: absolute; inset: 0; background: rgba(255, 255, 255, .18); border-radius: 999px; transition: background-color .25s; pointer-events: none; }
.switch-app i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--white); border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .25s var(--ease); }
.switch-app input:checked + i { background: var(--red); }
.switch-app input:checked + i::after { transform: translateX(18px); }

.dnote { display: flex; gap: .55rem; margin-top: .4rem; font-size: .86rem; line-height: 1.5; color: var(--muted); }
.dnote svg { width: 18px; height: 18px; margin-top: .1rem; color: var(--red); }
.guarantee { display: flex; gap: .9rem; margin-top: 1.2rem; padding: 1.1rem; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 20px; }
.guarantee__ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; background: var(--red-grad); border-radius: 14px; }
.guarantee__ico svg { width: 22px; height: 22px; stroke-width: 2.2; }
.guarantee h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; }
.guarantee p { margin-top: .25rem; font-size: .84rem; line-height: 1.5; color: var(--muted); }

/* Acordeón */
.acc { display: grid; gap: .6rem; margin-top: 1rem; }
.acc__item { background: linear-gradient(160deg, #1a1a1a 0%, #111 100%); border: 1px solid var(--line); border-radius: 18px; }
.acc__item[open] { border-color: rgba(198, 27, 24, .45); }
.acc__item summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1rem 1.1rem; list-style: none; cursor: pointer; }
.acc__item summary::-webkit-details-marker { display: none; }
.acc__item summary span { display: grid; gap: .15rem; }
.acc__item summary b { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; }
.acc__item summary small { font-size: .82rem; color: var(--muted); }
.acc__item summary > svg { width: 20px; height: 20px; color: var(--red); transition: transform .3s; }
.acc__item[open] summary > svg { transform: rotate(180deg); }
.acc__body { display: grid; gap: .7rem; padding: 0 1.1rem 1.1rem; font-size: .9rem; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.acc__lead { font-family: var(--font-ui); font-weight: 600; font-size: 1rem; color: var(--white); }
.acc__item--small { margin-top: .9rem; }
.acc__item--small summary b { font-family: var(--font-ui); font-weight: 600; font-size: .92rem; text-transform: none; }

.next-ed { display: flex; align-items: center; gap: .8rem; margin: 2rem var(--gutter) 0; padding: 1rem; background: linear-gradient(135deg, rgba(198, 27, 24, .25), rgba(198, 27, 24, .05)); border: 1px solid rgba(198, 27, 24, .5); border-radius: 18px; }
.next-ed > svg:first-child { width: 22px; height: 22px; color: #ff8577; }
.next-ed span { flex: 1; display: grid; }
.next-ed small { font-size: .74rem; color: var(--muted); }
.next-ed b { font-family: var(--font-ui); font-size: .95rem; }
.race-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 2rem var(--gutter) 0; }
.race-nav a { display: flex; align-items: center; gap: .4rem; min-width: 0; padding: .9rem .8rem; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 16px; }
.race-nav span { display: grid; min-width: 0; }
.race-nav small { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.race-nav b { overflow: hidden; font-family: var(--font-display); font-weight: 800; font-size: 1rem; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.race-nav svg { width: 18px; height: 18px; color: var(--red); }
.race-nav__next { justify-content: flex-end; text-align: right; }

/* Barra inferior de contratar */
.buybar {
  position: absolute;
  z-index: 6;
  left: .8rem;
  right: .8rem;
  bottom: calc(var(--safe-bottom) + .8rem);
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .6rem .6rem .6rem 1.1rem;
  background: rgba(24, 24, 24, .78);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  animation: rv-in .6s .4s var(--ease) both;
}
.buybar.is-cart { border-color: rgba(198, 27, 24, .6); }
.buybar__info { flex: 1; display: grid; min-width: 0; line-height: 1.15; }
.buybar__info small { font-size: .74rem; color: var(--muted); }
.buybar__info b { overflow: hidden; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; white-space: nowrap; text-overflow: ellipsis; }
.buybar__btn { width: auto; height: 50px; padding: 0 1.3rem; }
.btn--line { background: transparent; border-color: rgba(255, 255, 255, .5); }

/* ==========================================================
   MIS BICIS — listado
   ========================================================== */
.garage { display: grid; gap: .9rem; margin-top: 1.4rem; padding: 0 var(--gutter); }
.garage__bike {
  position: relative;
  display: grid;
  overflow: hidden;
  background: linear-gradient(165deg, #1c1c1c 0%, #101010 100%);
  border: 1px solid var(--line);
  border-radius: 26px;
  transition: transform .15s;
}
.garage__bike:active { transform: scale(.985); }
.garage__photo { display: block; height: 210px; overflow: hidden; }
.garage__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.garage__bike:hover .garage__photo img { transform: scale(1.04); }
.garage__ph, .bhero__ph { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .25); background: radial-gradient(circle at 50% 40%, #222, #111); }
.garage__ph svg, .bhero__ph svg { width: 64px; height: 64px; stroke-width: 1.2; }
.garage__info { display: grid; gap: .1rem; padding: 1rem 4.2rem 1.1rem 1.2rem; }
.garage__info small { font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
.garage__info b { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1; text-transform: uppercase; }
.garage__info span { font-size: .86rem; color: var(--muted); }
.garage__go { position: absolute; right: 1.1rem; bottom: 1.3rem; display: grid; place-items: center; width: 42px; height: 42px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 50%; }
.garage__go svg { width: 20px; height: 20px; }
.garage__add { display: grid; justify-items: center; gap: .35rem; padding: 1.6rem 1.2rem; text-align: center; border: 1.5px dashed rgba(255, 255, 255, .22); border-radius: 26px; }
.garage__add b { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; }
.garage__add small { max-width: 16rem; font-size: .82rem; line-height: 1.4; color: var(--muted); }

/* ==========================================================
   FICHA DE BICI
   ========================================================== */
.bhero__photo { position: relative; height: 330px; overflow: hidden; }
.bhero__photo img { width: 100%; height: 100%; object-fit: cover; animation: rv-in .8s var(--ease) both; }
.bhero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, .55) 0%, transparent 30%, transparent 60%, var(--black) 100%); pointer-events: none; }
.bhero__cam {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 46px;
  padding: 0 1.2rem;
  font-family: var(--font-ui);
  font-weight: 700;
  background: rgba(10, 10, 10, .55);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  white-space: nowrap;
}
.bhero__cam svg { width: 20px; height: 20px; }
.bhero__body { margin-top: -2.6rem; padding: 0 var(--gutter); position: relative; animation: rv-in .8s .1s var(--ease) both; }
.bhero__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 12vw, 3.2rem); line-height: .9; text-transform: uppercase; }
.bhero__meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.bhero__meta span { padding: .3rem .75rem; font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); border-radius: 999px; }
.bhero__meta span:first-child { color: var(--black); background: var(--white); border-color: var(--white); }

/* Ficha para el mecánico: progreso */
.bprog { margin: 1.4rem var(--gutter) 0; padding: 1rem 1.1rem; background: linear-gradient(135deg, rgba(198, 27, 24, .2) 0%, rgba(198, 27, 24, .04) 100%); border: 1px solid rgba(198, 27, 24, .45); border-radius: 20px; }
.bprog.is-ok { background: linear-gradient(135deg, rgba(31, 157, 85, .2) 0%, rgba(31, 157, 85, .04) 100%); border-color: rgba(60, 207, 116, .4); }
.bprog__head { display: flex; align-items: center; gap: .8rem; }
.bprog__ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; background: var(--red-grad); border-radius: 12px; }
.bprog.is-ok .bprog__ico { background: #1f9d55; }
.bprog__ico svg { width: 20px; height: 20px; stroke-width: 2.2; }
.bprog__head div { flex: 1; display: grid; min-width: 0; }
.bprog__head small { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bprog__head b { font-family: var(--font-ui); font-weight: 700; font-size: .98rem; line-height: 1.25; }
.bprog__pct { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 2rem; line-height: 1; }
.bprog__pct small { font-size: 1rem; color: var(--muted); }
.bprog__bar { height: 6px; margin-top: .9rem; overflow: hidden; background: rgba(255, 255, 255, .1); border-radius: 999px; }
.bprog__bar i { display: block; width: var(--v); height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red), #ff5a45); border-radius: inherit; animation: bar-in 1.2s .3s var(--ease) both; }
.bprog.is-ok .bprog__bar i { background: linear-gradient(90deg, #1f9d55, #3ccf74); }
@keyframes bar-in { from { width: 0; } }
.bprog__foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .8rem; font-size: .84rem; color: #ffb3b1; }
.bprog__foot button { display: inline-flex; align-items: center; gap: .3rem; flex: none; height: 38px; padding: 0 .9rem; font-family: var(--font-ui); font-weight: 700; font-size: .88rem; color: var(--white); background: var(--red); border: 0; border-radius: 999px; cursor: pointer; }
.bprog__foot button svg { width: 16px; height: 16px; }
.bprog__note { margin-top: .8rem; padding-top: .7rem; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }

/* Secciones de la ficha */
.bsec { margin: 1rem var(--gutter) 0; padding: 1.1rem 1.1rem 1.2rem; background: linear-gradient(160deg, #1a1a1a 0%, #111 100%); border: 1px solid var(--line); border-radius: 22px; }
.bsec__title { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; }
.bsec__title span { display: grid; place-items: center; width: 34px; height: 34px; color: #ff8577; background: rgba(198, 27, 24, .16); border-radius: 10px; }
.bsec__title svg { width: 19px; height: 19px; }
.bdl { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1rem; }
.bdl .is-full { grid-column: 1 / -1; }
.bdl dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bdl dd { margin-top: .15rem; font-family: var(--font-ui); font-weight: 600; font-size: .96rem; line-height: 1.3; }
.miss { display: inline-flex; align-items: center; gap: .35rem; font-style: normal; color: #ff8577; }
.miss::before { content: ""; width: 7px; height: 7px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 3px rgba(198, 27, 24, .25); }
.muted { font-style: normal; color: var(--muted); }
.bnotes { font-size: .95rem; line-height: 1.55; color: rgba(255, 255, 255, .85); }

/* Editando */
.bgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem .7rem; }
.bfield { display: grid; gap: .4rem; align-content: start; min-width: 0; }
.bfield--full { grid-column: 1 / -1; }
.bfield__label { font-family: var(--font-ui); font-weight: 600; font-size: .85rem; color: rgba(255, 255, 255, .85); }
.bfield__label b { margin-left: .2rem; color: var(--red); }
.bfield__help { font-size: .74rem; line-height: 1.4; color: var(--muted); }
.input-app { position: relative; display: block; }
.input-app input, .select-app select, .bfield textarea {
  width: 100%;
  height: 50px;
  padding: 0 .9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.bfield textarea { height: auto; padding: .8rem .9rem; line-height: 1.5; resize: vertical; }
.input-app.has-unit input { padding-right: 2.8rem; }
.input-app i { position: absolute; top: 50%; right: .9rem; font-style: normal; font-size: .85rem; color: var(--muted); transform: translateY(-50%); }
.input-app input::placeholder, .bfield textarea::placeholder { color: #666; }
.input-app input:focus, .select-app select:focus, .bfield textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(198, 27, 24, .25); }
.select-app { position: relative; display: block; }
.select-app::after { content: ""; position: absolute; top: 50%; right: 1rem; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-app select option { color: var(--black); }
.bfield.is-missing input, .bfield.is-missing select { border-color: rgba(198, 27, 24, .7); }
.bfield--toggle { display: flex; align-items: center; justify-content: space-between; align-self: end; height: 50px; padding: 0 .9rem; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; cursor: pointer; }
.seg-app--3 { grid-template-columns: repeat(3, 1fr); }
.is-editing .app__main--detail { padding-bottom: calc(var(--safe-bottom) + 110px); }
.editbar { padding-left: .6rem; }
.editbar .btn { flex: 1; }

/* ==========================================================
   COMPRAS — listado y ticket en hoja tipo iOS
   ========================================================== */
.list-card--page { margin-bottom: .4rem; }
.list-card--page .list-card__txt small + small { margin-top: .05rem; }
.month-sum { float: right; font-family: var(--font-display); font-weight: 800; font-size: .95rem; letter-spacing: 0; color: var(--white); }
.cal-month .month-sum::after { display: none; }

/* La pantalla de detrás se encoge, como en iOS */
.app__main, .tabbar { transition: transform .45s cubic-bezier(.32, .72, 0, 1), border-radius .45s, filter .45s; }
.app.has-sheet .app__main { transform: scale(.93) translateY(10px); border-radius: 22px; filter: brightness(.6); overflow: hidden; }
.app.has-sheet .tabbar { transform: translateY(140%); }

.sheet { position: absolute; z-index: 20; inset: 0; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .4s; }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet__panel {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - var(--safe-top) - 2.6rem);
  padding-bottom: calc(var(--safe-bottom) + .8rem);
  background: #1c1c1e;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.32, .72, 0, 1);
}
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__panel.is-dragging { transition: none; }
.sheet__grip { flex: none; align-self: center; width: 38px; height: 5px; margin: .55rem 0 .4rem; background: rgba(255, 255, 255, .3); border-radius: 999px; touch-action: none; }
.sheet__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: .5rem var(--gutter) 1rem; scrollbar-width: none; }
.sheet__scroll::-webkit-scrollbar { display: none; }
.sheet__btns { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .6rem var(--gutter) 0; }
.sheet__btns .btn { height: 50px; }

/* Ticket de papel con borde dentado */
.ticket {
  --tooth: 9px;
  position: relative;
  padding: 1.4rem 1.2rem 1.6rem;
  color: #141414;
  background: #fbfbf8;
  border-radius: 6px 6px 0 0;
  font-size: .86rem;
  -webkit-mask: radial-gradient(circle at 50% 100%, transparent calc(var(--tooth) * .7), #000 calc(var(--tooth) * .7 + .5px)) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - var(--tooth) + 1px) no-repeat;
  mask: radial-gradient(circle at 50% 100%, transparent calc(var(--tooth) * .7), #000 calc(var(--tooth) * .7 + .5px)) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - var(--tooth) + 1px) no-repeat;
}
.ticket__head { display: grid; gap: .15rem; padding-bottom: .9rem; text-align: center; border-bottom: 1px dashed #c9c9c4; font-size: .74rem; color: #555; }
.ticket__head strong { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: .04em; color: #141414; }
.ticket__head em { font-style: italic; color: var(--red); }
.ticket__doc { display: grid; gap: .1rem; padding: .9rem 0; text-align: center; border-bottom: 1px dashed #c9c9c4; }
.ticket__doc b { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase; }
.ticket__doc span { font-family: "Roboto Mono", ui-monospace, monospace; font-size: .8rem; color: #555; }
.ticket__who { display: grid; gap: .1rem; padding: .9rem 0; border-bottom: 1px dashed #c9c9c4; }
.ticket__who > span:first-child { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #888; }
.ticket__who span { font-size: .8rem; color: #555; }
.ticket__race { margin-top: .25rem; font-weight: 600; color: var(--red) !important; }
.ticket__lines { width: 100%; margin: .8rem 0; border-collapse: collapse; }
.ticket__lines th { padding-bottom: .4rem; font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-align: right; text-transform: uppercase; color: #888; }
.ticket__lines th:first-child, .ticket__lines td:first-child { text-align: left; }
.ticket__lines td { padding: .45rem 0; vertical-align: top; text-align: right; border-top: 1px solid #ecece7; font-family: "Roboto Mono", ui-monospace, monospace; font-size: .8rem; }
.ticket__lines td:first-child { padding-right: .6rem; font-family: var(--font-body); font-size: .84rem; line-height: 1.35; }
.ticket__lines td:nth-child(2) { width: 2.4rem; }
.ticket__lines td:last-child, .ticket__lines th:last-child { padding-left: .5rem; white-space: nowrap; }
.ticket__lines small { display: block; font-size: .68rem; color: #999; }
.ticket__totals { display: grid; gap: .3rem; padding-top: .7rem; border-top: 1px dashed #c9c9c4; }
.ticket__totals div { display: flex; justify-content: space-between; font-size: .8rem; color: #666; }
.ticket__totals dd { font-family: "Roboto Mono", ui-monospace, monospace; }
.ticket__totals .is-total { margin-top: .3rem; padding-top: .5rem; border-top: 2px solid #141414; font-size: 1rem; font-weight: 700; color: #141414; }
.ticket__totals .is-total dd { font-size: 1.1rem; }
.ticket__pay { display: flex; align-items: center; justify-content: center; gap: .35rem; margin-top: 1rem; padding: .5rem; font-weight: 600; font-size: .82rem; color: #1a7f45; background: rgba(31, 157, 85, .1); border-radius: 8px; }
.ticket__pay svg { width: 16px; height: 16px; stroke-width: 2.6; }
.ticket__notes { margin-top: .8rem; font-size: .8rem; font-style: italic; color: #666; }
.ticket__foot { margin-top: 1.1rem; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: #999; }

/* ==========================================================
   PERFIL
   ========================================================== */
.avatar span img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.me { display: grid; justify-items: center; padding: calc(var(--safe-top) + 2rem) var(--gutter) 0; text-align: center; }
.me__photo { position: relative; }
.me__ring { display: grid; place-items: center; width: 128px; height: 128px; padding: 4px; background: conic-gradient(from 210deg, var(--red), var(--red-deep), #ff6a4d, var(--red)); border-radius: 50%; box-shadow: 0 18px 50px rgba(198, 27, 24, .35); }
.me__ring img, .me__ring b { width: 100%; height: 100%; object-fit: cover; background: var(--ink); border: 3px solid var(--black); border-radius: 50%; }
.me__ring b { display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 2.6rem; }
.me__cam { position: absolute; right: 0; bottom: 4px; display: grid; place-items: center; width: 40px; height: 40px; color: var(--black); background: var(--white); border: 3px solid var(--black); border-radius: 50%; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.me__cam svg { width: 19px; height: 19px; stroke-width: 2; }
.me__name { margin-top: 1rem; font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: .95; text-transform: uppercase; }
.me__mail { margin-top: .35rem; font-size: .9rem; color: var(--muted); }
.me__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .9rem; }
.me__chips span { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .75rem; font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 999px; }
.me__chips .me__club { color: var(--white); background: var(--red-grad); border-color: transparent; box-shadow: 0 6px 18px rgba(198, 27, 24, .35); }
.me__club svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1.6rem var(--gutter) 0; }
.me-stats a { display: grid; justify-items: center; gap: .1rem; padding: .9rem .4rem; background: linear-gradient(160deg, #1a1a1a 0%, #111 100%); border: 1px solid var(--line); border-radius: 18px; }
.me-stats svg { width: 20px; height: 20px; color: var(--red); }
.me-stats b { margin-top: .2rem; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 1.8rem; line-height: 1; }
.me-stats span { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.set { margin: 1.8rem var(--gutter) 0; }
.set__head { display: flex; align-items: center; justify-content: space-between; margin: 0 .2rem .6rem; }
.set__head h2 { font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.set__head button { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-ui); font-weight: 700; font-size: .9rem; color: var(--white); background: none; border: 0; cursor: pointer; }
.set__head button svg { width: 16px; height: 16px; color: var(--red); }
.set__card { overflow: hidden; background: linear-gradient(160deg, #1a1a1a 0%, #111 100%); border: 1px solid var(--line); border-radius: 20px; }
.set__card--out { margin-top: .8rem; }
.set__row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 56px; padding: .7rem 1rem; }
.set__row + .set__row, .set__field + .set__field { border-top: 1px solid var(--line); }
.set__row > span:first-child:not(.set__ico) { font-size: .88rem; color: var(--muted); }
.set__row > b { font-family: var(--font-ui); font-weight: 600; font-size: .95rem; text-align: right; }
.set__row--ico { justify-content: flex-start; cursor: pointer; }
.set__ico { display: grid; place-items: center; flex: none; width: 34px; height: 34px; color: #ff8577; background: rgba(198, 27, 24, .16); border-radius: 10px; }
.set__ico svg { width: 18px; height: 18px; }
.set__txt { flex: 1; display: grid; min-width: 0; }
.set__txt b { font-family: var(--font-ui); font-weight: 600; font-size: .95rem; }
.set__txt small { font-size: .78rem; color: var(--muted); }
.set__row--ico > svg:last-child { width: 18px; height: 18px; color: var(--muted); }
.set__row--danger .set__txt b { color: #ff6b5e; }
.set__field { display: grid; gap: .3rem; padding: .7rem 1rem; }
.set__field span { font-size: .78rem; color: var(--muted); }
.set__field input { width: 100%; height: 44px; padding: 0 .8rem; font: inherit; font-size: 1rem; color: var(--white); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; -webkit-appearance: none; appearance: none; }
.set__field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(198, 27, 24, .25); }
.is-editing .tabbar { display: none; }

/* ==========================================================
   SERVICIO COMO INVITADO — formulario en pasos
   ========================================================== */
.wiz-top {
  position: absolute;
  z-index: 6;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: calc(var(--safe-top) + .8rem) var(--gutter) .9rem;
  background: rgba(10, 10, 10, .82);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.wiz-top__txt { flex: 1; display: grid; line-height: 1.15; }
.wiz-top__txt small { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.wiz-top__txt b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; }
.wiz-top__logo { width: 46px; height: auto; opacity: .9; }
.wiz-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .08); }
.wiz-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red), #ff5a45); transition: width .5s var(--ease); }
.app__main--wiz { padding: calc(var(--safe-top) + 92px) var(--gutter) calc(var(--safe-bottom) + 110px); }
.wiz-foot { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; padding: .9rem var(--gutter) calc(var(--safe-bottom) + .9rem); background: linear-gradient(transparent, var(--black) 35%); }

.wiz-head h1 { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: .92; text-transform: uppercase; }
.wiz-head h1 em { font-style: italic; color: var(--red); }
.wiz-head p { margin-top: .6rem; font-size: .95rem; line-height: 1.5; color: var(--muted); }

/* Paso 1: carreras */
.wrace-list { display: grid; gap: .6rem; margin-top: 1.4rem; }
.wrace { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .55rem .9rem .55rem .55rem; color: var(--white); text-align: left; font: inherit; background: linear-gradient(160deg, #1a1a1a 0%, #111 100%); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.wrace img { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.wrace__txt { flex: 1; display: grid; gap: .15rem; min-width: 0; }
.wrace__txt b { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1; text-transform: uppercase; }
.wrace__txt small { display: flex; align-items: center; gap: .25rem; overflow: hidden; font-size: .76rem; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.wrace__txt small svg { width: 13px; height: 13px; flex: none; }
.wrace__txt .tag { justify-self: start; }
.wrace__radio { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 2px solid rgba(255, 255, 255, .3); border-radius: 50%; }
.wrace__radio svg { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.wrace.is-on { border-color: var(--red); background: linear-gradient(160deg, rgba(198, 27, 24, .2) 0%, #111 75%); }
.wrace.is-on .wrace__radio { background: var(--red); border-color: var(--red); }
.wrace.is-on .wrace__radio svg { opacity: 1; }

/* Banner de la carrera (viniendo del QR) */
.wbanner { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; padding: .55rem .9rem .55rem .55rem; background: linear-gradient(135deg, rgba(198, 27, 24, .25), rgba(198, 27, 24, .05)); border: 1px solid rgba(198, 27, 24, .55); border-radius: 18px; }
.wbanner img { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.wbanner span { flex: 1; display: grid; min-width: 0; line-height: 1.2; }
.wbanner small { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #ff8577; }
.wbanner b { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; }
.wbanner em { font-style: normal; font-size: .76rem; color: var(--muted); }
.wbanner i { font-style: normal; font-family: var(--font-ui); font-weight: 700; font-size: .85rem; }

/* Campos */
.wgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem .7rem; margin-top: 1.4rem; }
.wgrid > * { grid-column: 1 / -1; }
.wgrid > .wfield--half { grid-column: auto; }
.wfield { display: grid; gap: .45rem; align-content: start; min-width: 0; }
.wfield + .wfield, .wgrid + .wfield { margin-top: 1.2rem; }
.wgrid .wfield + .wfield { margin-top: 0; }
.wfield > span { font-family: var(--font-ui); font-weight: 600; font-size: .9rem; }
.wfield > span i { font-style: normal; font-weight: 400; color: var(--muted); }
.wfield input, .wfield textarea {
  width: 100%;
  height: 52px;
  padding: 0 .95rem;
  font: inherit;
  font-size: 1.02rem;
  color: var(--white);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.wfield textarea { height: auto; padding: .85rem .95rem; line-height: 1.5; resize: vertical; }
.wfield input::placeholder, .wfield textarea::placeholder { color: #666; }
.wfield input:focus, .wfield textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(198, 27, 24, .25); }
.wfield input.is-invalid { border-color: var(--red); }
.wfield__err { font-size: .78rem; color: #ff8577; }
.wfield__err:empty { display: none; }
.wfield__err--check { display: block; margin: .3rem 0 0 2.4rem; }
.wfield__help { font-size: .76rem; line-height: 1.4; color: var(--muted); }
.wnote { display: flex; gap: .5rem; margin-top: 1rem; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.wnote svg { width: 18px; height: 18px; flex: none; color: var(--red); }
.wcheck { display: flex; align-items: flex-start; gap: .75rem; margin-top: 1rem; font-size: .9rem; line-height: 1.45; cursor: pointer; }
.wcheck input { position: absolute; opacity: 0; pointer-events: none; }
.wcheck i { display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-top: .05rem; border: 2px solid rgba(255, 255, 255, .35); border-radius: 7px; transition: background-color .2s, border-color .2s; }
.wcheck i svg { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.wcheck input:checked + i { background: var(--red); border-color: var(--red); }
.wcheck input:checked + i svg { opacity: 1; }
.wcheck input:focus-visible + i { box-shadow: 0 0 0 3px rgba(198, 27, 24, .35); }
.wcheck a { text-decoration: underline; text-underline-offset: 2px; }

/* Qué necesita (varias) */
.wchips { display: flex; flex-wrap: wrap; gap: .45rem; }
.wchips button { height: 40px; padding: 0 .95rem; font-family: var(--font-ui); font-weight: 600; font-size: .9rem; color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; cursor: pointer; transition: all .2s; }
.wchips button.is-on { color: var(--white); background: var(--red); border-color: var(--red); box-shadow: 0 6px 16px rgba(198, 27, 24, .35); }

/* Fotos */
.wphotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.wphoto { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px; animation: pop .3s var(--ease); }
.wphoto img { width: 100%; height: 100%; object-fit: cover; }
.wphoto button { position: absolute; top: .35rem; right: .35rem; display: grid; place-items: center; width: 28px; height: 28px; color: var(--white); background: rgba(10, 10, 10, .65); border: 0; border-radius: 50%; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wphoto button svg { width: 15px; height: 15px; stroke-width: 2.6; }
.wphoto--add { display: grid; place-content: center; justify-items: center; gap: .3rem; font-family: var(--font-ui); font-weight: 600; font-size: .82rem; color: rgba(255, 255, 255, .8); border: 1.5px dashed rgba(255, 255, 255, .28); cursor: pointer; animation: none; }
.wphoto--add svg { width: 26px; height: 26px; color: var(--red); }

/* Resumen */
.wsum { margin-top: 1rem; padding: 1rem 1.1rem; background: linear-gradient(160deg, #1a1a1a 0%, #111 100%); border: 1px solid var(--line); border-radius: 18px; }
.wiz-head + .wsum { margin-top: 1.4rem; }
.wsum__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.wsum__head h2 { font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.wsum__head a { display: inline-flex; align-items: center; gap: .25rem; font-family: var(--font-ui); font-weight: 700; font-size: .85rem; }
.wsum__head a svg { width: 15px; height: 15px; color: var(--red); }
.wsum p { font-size: .92rem; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.wsum p b { font-family: var(--font-ui); color: var(--white); }
.wsum__quote { margin-top: .4rem; font-style: italic; color: var(--muted) !important; }
.wsum__fotos { display: flex; gap: .4rem; margin-top: .7rem; overflow-x: auto; }
.wsum__fotos img { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }

/* Enviado */
.wdone { display: grid; justify-items: center; padding-top: 1rem; text-align: center; }
.wdone__ok { display: grid; place-items: center; width: 84px; height: 84px; background: #1f9d55; border-radius: 50%; box-shadow: 0 0 0 10px rgba(31, 157, 85, .15), 0 20px 50px rgba(31, 157, 85, .35); animation: pop .5s var(--ease); }
.wdone__ok svg { width: 42px; height: 42px; stroke-width: 2.6; }
.wdone h1 { margin-top: 1.4rem; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: .92; text-transform: uppercase; }
.wdone h1 em { display: block; font-style: italic; color: var(--red); }
.wdone > p { margin-top: .6rem; color: var(--muted); }
.wdone__num { display: grid; gap: .15rem; margin-top: 1.2rem; padding: .8rem 1.4rem; background: rgba(255, 255, 255, .05); border: 1px dashed rgba(255, 255, 255, .25); border-radius: 14px; }
.wdone__num small { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.wdone__num b { font-family: "Roboto Mono", ui-monospace, monospace; font-weight: 500; font-size: 1.3rem; letter-spacing: .06em; }
.wdone__steps { display: grid; gap: .9rem; width: 100%; margin-top: 1.6rem; padding: 0; list-style: none; text-align: left; counter-reset: paso; }
.wdone__steps li { position: relative; display: grid; gap: .1rem; padding-left: 2.8rem; counter-increment: paso; }
.wdone__steps li::before { content: counter(paso); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; font-family: var(--font-display); font-weight: 800; background: var(--red-grad); border-radius: 50%; }
.wdone__steps b { font-family: var(--font-ui); font-weight: 700; font-size: .98rem; }
.wdone__steps span { font-size: .86rem; line-height: 1.45; color: var(--muted); }
.wdone__app { display: grid; gap: .3rem; width: 100%; margin-top: 1.8rem; padding: 1.1rem; text-align: left; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 18px; }
.wdone__app b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; }
.wdone__app span { font-size: .86rem; line-height: 1.45; color: var(--muted); }
.wdone__app .btn { margin-top: .6rem; height: 48px; }

/* Solicitar servicio (inicio) */
.ask { display: flex; align-items: center; gap: .85rem; margin: 1rem var(--gutter) 0; padding: .9rem 1rem; background: linear-gradient(135deg, rgba(198, 27, 24, .22) 0%, rgba(198, 27, 24, .05) 100%); border: 1px solid rgba(198, 27, 24, .5); border-radius: 20px; transition: transform .15s; }
.ask:active { transform: scale(.985); }
.ask__ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; background: var(--red-grad); border-radius: 14px; box-shadow: 0 8px 20px rgba(198, 27, 24, .4); }
.ask__ico svg { width: 22px; height: 22px; }
.ask__txt { flex: 1; display: grid; min-width: 0; }
.ask__txt b { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; }
.ask__txt small { font-size: .8rem; color: rgba(255, 255, 255, .7); }
.ask > svg:last-child { width: 20px; height: 20px; color: rgba(255, 255, 255, .6); }

/* Solicitud del cliente: elegir bici */
.wbikes { margin-top: 1.2rem; }
.wbikes .wrace img { width: 76px; height: 58px; }
.tag--ok { color: #0d2e1b; background: #3ccf74; }
.wrace__plus { display: grid; place-items: center; flex: none; width: 76px; height: 58px; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--red); border: 1.5px dashed rgba(255, 255, 255, .25); border-radius: 12px; }
.wbikes + .wfield, .wbikes + .wgrid { margin-top: 1.6rem; }
