/* ============ FUENTES PROPIAS ============ */
@font-face{
  font-family:'JetBrains Mono'; src:url('../fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'JetBrains Mono'; src:url('../fonts/JetBrainsMono-Medium.ttf') format('truetype');
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'JetBrains Mono'; src:url('../fonts/JetBrainsMono-Bold.ttf') format('truetype');
  font-weight:700; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'JetBrains Mono'; src:url('../fonts/JetBrainsMono-Italic.ttf') format('truetype');
  font-weight:400; font-style:italic; font-display:swap;
}
@font-face{
  font-family:'JetBrains Mono'; src:url('../fonts/JetBrainsMono-SemiBoldItalic.ttf') format('truetype');
  font-weight:600; font-style:italic; font-display:swap;
}
@font-face{
  font-family:'JetBrains Mono'; src:url('../fonts/JetBrainsMono-BoldItalic.ttf') format('truetype');
  font-weight:700; font-style:italic; font-display:swap;
}

/* ============ TOKENS ============ */
:root{
  --asphalt:#FFFFFF;
  --asphalt-2:#F3F4F6;
  --asphalt-3:#E8E9EC;
  --paper:#14171C;
  --paper-dim:#4B5563;
  --red:#E8380D;
  --red-light:#FF5B52;
  --red-dim:#8f1811;
  --yellow:#FFC942;
  --amber:#A45B08;
  --green:#1E9E5A;
  --miss:#E23B40;
  --fog:#6B7280;
  --line:#D7DADF;
  --disp:'JetBrains Mono',monospace;
  --body:'JetBrains Mono',monospace;
  --mono:'JetBrains Mono',monospace;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0;padding:0;background:#FFFFFF;font-family:var(--body);}
@media (prefers-reduced-motion: reduce){ *{animation-duration:0.001ms !important; transition-duration:0.001ms !important;} }

.device{
  max-width:430px;
  margin:0 auto;
  height:100vh;
  height:100dvh;
  background:var(--asphalt);
  color:var(--paper);
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 0 0 1px var(--line);
}

.screen{ display:none; flex:1; flex-direction:column; padding-bottom:84px; position:relative; min-height:0; }
/* login/registro no tienen tabbar inferior: no reservar el espacio de 84px pensado para ella */
#login.screen, #register.screen, #onb-days.screen, #onb-stages.screen, #challenge-intro.screen, #q-mcq.screen, #q-vf.screen, #q-wildcard.screen, #fb-ok.screen, #fb-no.screen{ padding-bottom:0; }
/* el bloque de botones va dentro de .scroll, como último elemento del formulario:
   así nunca puede quedar tapando otro contenido, y si no entra todo, se hace scroll normal */
.screen.light-theme{
  background:#fff;
  color:#14171C;
  --paper:#14171C;
  --paper-dim:#4b5563;
  --fog:#6b7280;
  --asphalt-2:#f3f4f6;
  --asphalt-3:#e9eaec;
  --line:#d1d5db;
}
.screen.light-theme .field input{ color:#14171C; }
.screen.light-theme .field input::placeholder{ color:#9ca3af; }
.screen.active{ display:flex; }
.scroll{ overflow-y:auto; flex:1; min-height:0; -webkit-overflow-scrolling:touch; }
#home .scroll{ display:flex; flex-direction:column; }
.home-partner-logo{ flex:1; display:flex; align-items:center; justify-content:center; padding:16px 24px; }
.home-partner-logo img{ max-width:220px; width:65%; height:auto; }

/* roadbook margin tab — signature element */
.rb-tab{
  position:absolute; left:0; top:14px; bottom:14px; width:26px;
  background:var(--asphalt-3);
  border-right:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
}
.rb-tab span{
  writing-mode:vertical-rl; text-orientation:mixed;
  font-family:var(--mono); font-size:10px; letter-spacing:2px; color:var(--yellow);
}

/* ============ TYPE ============ */
h1,h2,h3{ font-family:var(--disp); text-transform:uppercase; letter-spacing:0.5px; margin:0; }
.eyebrow{ font-family:var(--mono); font-size:11px; letter-spacing:2px; color:var(--amber); text-transform:uppercase; }
.code{ font-family:var(--mono); }

/* ============ TOPBAR ============ */
.topbar{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px 8px; }
.brand{ display:flex; align-items:center; gap:8px; }
.brand-mark{ width:26px; height:26px; border-radius:6px; background:var(--red); display:flex; align-items:center; justify-content:center; font-family:var(--disp); font-weight:700; font-size:14px; color:#fff; transform:rotate(-6deg); }
.brand-word{ font-family:var(--disp); font-weight:700; font-size:19px; letter-spacing:1px; }
.brand-word b{ color:var(--red); }

/* ============ SPLASH ============ */
#splash{ align-items:center; justify-content:space-between; text-align:center; position:relative; padding:40px 32px 44px; background:var(--red); }
.splash-top, .splash-mid, .splash-bottom{ width:100%; display:flex; flex-direction:column; align-items:center; opacity:0; animation:fadeSlideUp 0.7s ease-out forwards; }
.splash-top{ animation-delay:0.05s; }
.splash-mid{ animation-delay:0.3s; }
.splash-bottom{ animation-delay:0.55s; }
@keyframes fadeSlideUp{
  from{ opacity:0; transform:translateY(18px); }
  to{ opacity:1; transform:translateY(0); }
}
.splash-bg{
  position:absolute; inset:0;
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
}
.splash-content{ position:relative; z-index:2; padding:0 32px; }
.splash-title{ font-size:52px; line-height:0.95; font-weight:700; }
.splash-title em{ font-style:normal; color:#fff; }
.splash-sub{ font-family:var(--body); font-weight:400; color:#fff; margin-top:14px; font-size:15px; }
.splash-host{ margin-top:38px; font-family:var(--mono); font-size:11px; letter-spacing:2px; color:var(--paper-dim); }
.btn{
  border:none; font-family:var(--disp); font-weight:700; letter-spacing:0;
  padding:16px 20px; border-radius:0; font-size:14px; cursor:pointer; width:100%;
  display:flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap;
}
.btn-ic{ width:16px; height:16px; vertical-align:-3px; }
.btn:disabled{ opacity:0.55; cursor:default; }
.btn-primary{ background:var(--red); color:#fff; box-shadow:0 8px 20px -6px rgba(225,38,28,0.6); }
.btn-primary:active{ transform:scale(0.98); }
.btn-ghost{ background:transparent; color:var(--paper); border:1px solid var(--line); }
.btn-yellow{ background:var(--yellow); color:#14171C; }
.btn-confirm{ background:#62C63E; color:#fff; box-shadow:0 8px 20px -6px rgba(98,198,62,0.6); }
.btn-confirm:active{ transform:scale(0.98); }
.splash-cta{ position:relative; z-index:2; padding:0 32px; margin-top:44px; }

/* ============ LOGIN / REGISTRO / ONBOARDING ============ */
#login .scroll, #register .scroll{ padding:8px 24px 24px; }
.field{ margin-bottom:16px; }
.field label{ display:block; font-family:var(--mono); font-size:10.5px; letter-spacing:1px; color:var(--fog); text-transform:uppercase; margin-bottom:6px; }

.field input, .field select{
  width:100%; background:var(--asphalt-2); border:1px solid var(--line); color:var(--paper);
  padding:13px 14px; border-radius:10px; font-family:var(--body); font-size:15px; outline:none;
}
.field input:focus, .field select:focus{ border-color:var(--yellow); }
.field-error{ color:var(--red); font-size:12.5px; margin-top:6px; display:none; }
.field-error.show{ display:block; }
.auth-switch{ text-align:center; font-size:13px; color:var(--fog); margin-top:18px; }
.auth-switch a{ color:var(--red); font-weight:600; text-decoration:none; cursor:pointer; }
.auth-title{ font-size:21px; color:var(--red); border-left:4px solid var(--red); padding-left:12px; line-height:1.1; }
#login .field label, #register .field label{
  font-family:var(--body); text-transform:none; letter-spacing:0; font-size:13px; font-weight:700; color:var(--red); margin-bottom:6px;
}
#register .field label{ font-style:italic; }
#register .rut-hint{ font-style:italic; }
#register .btn{ font-style:italic; }
#login .field label{ font-style:italic; }
#login .btn{ font-style:italic; }
.lbl-main{ color:var(--red); }
.lbl-hint{ color:var(--paper); font-weight:400; }
#login .field input, #register .field input{ background:#fff; border-color:var(--line); }
.rut-hint{ font-size:11px; color:var(--fog); margin-top:6px; line-height:1.4; }
.terms-check{ display:flex; align-items:flex-start; gap:10px; font-size:12.5px; color:var(--fog); cursor:pointer; margin-top:4px; }
.terms-check input{ margin-top:2px; width:16px; height:16px; flex-shrink:0; accent-color:var(--red); }
.btn-arrow{ justify-content:space-between; padding-left:22px; padding-right:20px; }
.btn-arrow .chevron{ font-size:22px; line-height:1; font-weight:700; }

/* botón "diagonal" estilo rally: el bloque se inclina, el contenido se contra-inclina para quedar recto */
.btn-skew{ transform:skewX(-10deg); padding-left:22px; padding-right:20px; }
.btn-skew .btn-face{ display:flex; align-items:center; justify-content:space-between; width:100%; transform:skewX(10deg); }
.btn-skew .chevron{ font-size:22px; line-height:1; font-weight:700; }
.btn-back{ background:transparent; border:1.5px solid var(--red); color:var(--red); justify-content:flex-start; gap:10px; padding-left:22px; }
.btn-back .chevron{ font-size:20px; line-height:1; font-weight:700; }

/* ============ HERO (banner con foto + logos + título) ============
   Se usa en login/registro y está pensado para reutilizarse igual en el resto
   de las pantallas interiores — mantener este mismo alto mínimo en todas. */
.auth-hero{
  position:relative; background-size:cover; background-position:center; background-repeat:no-repeat;
  padding:22px 24px 24px; color:#fff; overflow:hidden; min-height:270px;
  display:flex; flex-direction:column; justify-content:space-between;
  box-sizing:border-box;
}
.auth-hero::before{ content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,8,6,0.35), rgba(10,8,6,1)); }
.auth-hero-top{ position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.auth-hero-logo{ height:22px; width:auto; }
.auth-hero-text{ position:relative; z-index:1; margin-top:26px; }
.auth-title-light{ color:#fff; font-style:italic; }
.auth-hero-sub{ font-size:12.5px; font-style:italic; line-height:1.5; margin-top:8px; color:#fff; }
.auth-hero-note{ font-size:11px; font-style:italic; margin-top:6px; color:#fff; }
.auth-hero-note .note-mark{ color:var(--red-light); }
.stage-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:6px; }
.stage-opt{
  border:1px solid var(--line); background:var(--asphalt-2); border-radius:10px; padding:10px;
  cursor:pointer;
}
.stage-opt.sel{ border-color:var(--yellow); background:rgba(255,201,66,0.08); }
#mirallyDayGrid .stage-opt{ background:#fff; border-radius:10px; }
#mirallyDayGrid .stage-opt .day{ color:var(--fog); }
#mirallyDayGrid .stage-opt .nm{ font-style:italic; }
#mirallyDayGrid .stage-opt.sel{ border-color:var(--red); background:var(--red); color:#fff; box-shadow:0 8px 20px -6px rgba(225,38,28,0.6); }
#mirallyDayGrid .stage-opt.sel .day, #mirallyDayGrid .stage-opt.sel .loc{ color:#fff; }
#editStageGrid.stage-grid{ display:flex; flex-direction:column; gap:10px; margin-top:6px; }
#editStageGrid .rt-card{ cursor:pointer; }
.stage-opt .day{ font-family:var(--mono); font-size:10px; color:var(--amber); letter-spacing:1px; }
.stage-opt .nm{ font-family:var(--disp); font-weight:600; font-size:14px; margin-top:2px; }
.stage-opt .loc{ font-size:11px; color:var(--fog); margin-top:1px; }

/* #dayGrid (pantalla "¿Qué días quieres vivir la experiencia WRC?"): filas completas, sin
   la etiqueta "DÍA", todas del mismo alto, y la selección en oscuro — según diseño. */
#dayGrid.stage-grid{ grid-template-columns:1fr; gap:10px; margin-top:0; }
#dayGrid .stage-opt{
  padding:0px 16px; border-radius:2px; min-height:55px; box-sizing:border-box;
  display:flex; flex-direction:column; justify-content:center;
  background:transparent; border:1px solid rgba(0,0,0,0.20);
}
#dayGrid .stage-opt .day{ display:none; }
#dayGrid .stage-opt .nm{
  color:#000; font-family:var(--mono); font-size:14px; font-style:italic;
  font-weight:700; line-height:21px; margin-top:0;
}
#dayGrid .stage-opt .loc{
  color:#000; font-family:var(--mono); font-size:12px; font-style:normal;
  font-weight:400; line-height:18px; margin-top:0;
}
#dayGrid .stage-opt.sel{ border-color:var(--paper); background:var(--paper); color:#fff; }
#dayGrid .stage-opt.sel .nm, #dayGrid .stage-opt.sel .loc{ color:#fff; }

/* #stageGrid (pantalla "¿Qué tramo te interesa?"): mismos cuadros que #dayGrid — sin
   fondo, border-radius 2px y borde rgba(0,0,0,0.20). */
#stageGrid .stage-opt{ background:transparent; border-radius:2px; border:1px solid rgba(0,0,0,0.20); }
#stageGrid .stage-opt.sel{ border-color:var(--paper); background:var(--paper); color:#fff; }
#stageGrid .stage-opt.sel .day{ color:var(--yellow); }
#stageGrid .stage-opt.sel .nm, #stageGrid .stage-opt.sel .loc{ color:#fff; }

/* #challenge-intro: tarjeta "Tramo Extra" (aviso de pregunta comodín del día) */
.wildcard-card{
  position:relative; background-size:cover; background-position:center; background-repeat:no-repeat;
  border-radius:12px; overflow:hidden; padding:18px; box-sizing:border-box;
  display:flex; align-items:center; gap:16px; min-height:90px;justify-content: space-evenly;
}
.wildcard-card::before{ content:''; position:absolute; inset:0; background:linear-gradient(90deg, rgba(10,8,6,0.78), rgba(10,8,6,0.45)); }
.wildcard-card-label{ position:relative; z-index:1; border-left:3px solid var(--red); padding-left:10px; line-height:1.15; flex-shrink:0; }
.wildcard-card-tramo{ display:block; color:#fff; font-style:italic; font-weight:700; font-size:16px; }
.wildcard-card-extra{ display:block; color:var(--red-light); font-style:italic; font-weight:700; font-size:16px; }
.wildcard-card-text{ position:relative; z-index:1; color:#fff; font-size:13px; line-height:1.4; }

/* ============ HOME ============ */

.stat-icon{ font-size:18px; }
.stat-val{ font-family:var(--disp); font-weight:700; font-size:18px; margin-top:2px; }

.route-strip{ margin:16px 20px 4px; }
.route-line{ position:relative; height:6px; background:var(--asphalt-3); border-radius:4px; overflow:hidden; }

.challenge-card{
  margin:18px 20px 6px; background:var(--asphalt-2);
  border:1px solid var(--line); border-radius:16px; padding:18px; position:relative; overflow:hidden;
}
.challenge-tag{ font-family:var(--mono); font-size:10px; letter-spacing:2px; color:var(--amber); }
.challenge-q{ font-family:var(--disp); font-weight:600; font-size:19px; margin-top:8px; line-height:1.15; }
.challenge-meta{ font-size:12px; color:var(--fog); margin-top:8px; }

.chip-row{ display:flex; gap:8px; padding:0 20px 6px; overflow-x:auto; }
.chip.done{ color:var(--green); border-color:var(--green); }
.chip.now{ color:var(--amber); border-color:var(--yellow); }
.chip.locked{ color:#565c66; }

.tomorrow-banner .txt b{ display:block; font-family:var(--disp); font-size:15px; letter-spacing:0.5px; }
.tomorrow-banner .txt span{ font-size:11.5px; color:rgba(255,255,255,0.85); }

/* ============ BOTTOM NAV ============ */
.tabbar{
  position:absolute; left:16px; right:16px; bottom:16px; height:64px; z-index:5;
  display:flex; border-radius:2px;
}
.tabbar::before{
  content:''; position:absolute; inset:0; background:var(--red); border-radius:2px;
  transform:skewX(-10deg); z-index:0;
  box-shadow:0 10px 24px -8px rgba(225,38,28,0.55), 0 4px 10px rgba(0,0,0,0.2);
}
.tab{
  position:relative; z-index:1; flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  cursor:pointer;
}
.tab-ic{ width:auto; }

/* ============ QUESTIONS ============ */
.q-hero{ min-height:230px; }
.q-timer{
  background:var(--red); color:#14171C; border:2px solid #fff; border-radius:999px; padding:6px 14px;
  font-family:var(--mono); font-size:13px; font-weight:700; display:inline-flex; align-items:center; gap:4px;
  position:relative; z-index:1; flex-shrink:0;
}
.q-timer-ic{ color:#fff; }
.q-hero-catrow{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.q-hero-cat{
  color:#fff; font-style:italic; font-weight:700; font-size:18px;
  border-left:4px solid var(--red); padding-left:12px; line-height:1.1;
}
.q-hero-text-q{ font-family:var(--body); font-weight:400; font-size:14px; line-height:1.4; color:#fff; margin-top:12px; }
.q-route{ margin-top:24px; }
.q-route-top{ position:relative; display:flex; align-items:center; justify-content:space-between; }
.q-route-flag{ height:14px; width:auto; flex-shrink:0; display:block; }
.q-route-car-icon{
  position:absolute; top:50%; left:0; height:10px; width:auto;
  transform:translate(-100%, -50%); transition:left 0.3s ease; z-index:2;
}
.q-route-num{
  width:15px; height:15px; border-radius:50%; background:rgba(0,0,0,0.5); border:1px solid rgba(255,255,255,0.7);
  color:#fff; font-family:var(--mono); font-size:8px; display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.q-route-num.done{ background:var(--yellow); color:#14171C; border-color:var(--yellow); }
.q-route-num.current{ background:#fff; color:var(--red); border-color:#fff; }
.q-route-bar{ height:3px; background:rgba(255,255,255,0.35); border-radius:2px; margin-top:8px; overflow:hidden; }
.q-route-bar-fill{ height:100%; background:#fff; border-radius:2px; transition:width 0.3s ease; }

.opt-list{ display:flex; flex-direction:column; gap:12px; }
.opt{
  border:1px solid rgba(0,0,0,0.20); background:transparent; border-radius:8px; padding:14px 16px;
  font-size:14px; font-weight:400; font-family:var(--mono); display:flex; align-items:center; gap:14px; cursor:pointer;
  color:#000;
}
.opt-badge{
  width:28px; height:28px; border-radius:6px; background:rgba(232,56,13,0.12); color:var(--red);
  font-family:var(--mono); font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.opt:active{ transform:scale(0.99); }
.opt.sel{ background:#E3E3E3; }

.wc-hero-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wc-hero-label{ border-left:4px solid var(--red); padding-left:12px; line-height:1.1; }
.wc-hero-tramo{ display:block; color:#fff; font-style:italic; font-weight:700; font-size:26px; }
.wc-hero-extra{ display:block; color:var(--red-light); font-style:italic; font-weight:700; font-size:26px; }
.wc-hero-sub{ color:#fff; font-style:italic; font-size:13px; line-height:1.5; margin-top:10px; }
.q-wc-text{ font-family:var(--body); font-weight:400; font-size:14px; line-height:1.5; color:var(--paper); }

/* ============ FEEDBACK ============ */
.dc-title{ color:var(--paper); font-style:italic; font-weight:700; font-size:20px; line-height:1.25; }
.dc-daily{ color:var(--red); font-style:italic; font-weight:700; font-size:13px; margin-top:10px; }
.dc-line{ color:var(--paper-dim); font-size:13px; margin-top:4px; }
.auth-hero-text .dc-title{ color:#fff; }
.auth-hero-text .dc-daily{ color:var(--red-light); }
.auth-hero-text .dc-line{ color:#fff; }
.dc-countdown-card{ border:1px solid var(--line); border-radius:14px; padding:18px; text-align:center; }
.dc-countdown-card .lbl{ font-family:var(--mono); font-size:11px; letter-spacing:2px; color:var(--red); font-style:italic; font-weight:700; }
.dc-countdown-num{ font-family:var(--mono); font-size:28px; font-weight:700; color:var(--red); margin:8px 0 0; }
.dc-countdown-sub{ font-size:12px; color:var(--fog); margin-top:6px; }
.dc-rank-title{ font-family:var(--disp); font-style:italic; font-weight:700; font-size:16px; color:var(--red); margin-top:24px; }
.dc-rank-list{ margin-top:10px; border-radius:2px; overflow:hidden; }
.fb-wrap{ padding:26px 24px; display:flex; flex-direction:column; align-items:center; text-align:center; height:100%; }
.fb-badge{ width:74px; height:74px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:32px; }
.fb-badge.ok{ background:rgba(60,203,127,0.15); border:2px solid var(--green); }
.fb-badge.no{ background:rgba(255,90,95,0.15); border:2px solid var(--miss); }
.fb-title{ font-family:var(--disp); font-weight:700; font-size:24px; margin-top:16px; }
.fb-title.ok{ color:var(--green); }
.fb-title.no{ color:var(--miss); }
.fb-spacer{ flex:1; }
.fb-hero{ min-height:0; }
.fb-result-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.fb-result-title{ font-family:var(--disp); font-style:italic; font-weight:700; font-size:20px; color:#fff; display:inline-flex; align-items:center; gap:8px; }
.fb-result-icon{ width:18px; height:18px; flex-shrink:0; }
.fb-km{ font-family:var(--mono); font-size:13px; color:#fff; }
.fb-explain{ font-size:13px; color:rgba(255,255,255,0.85); margin-top:12px; line-height:1.5; }
.fb-image{ width:100%; max-width:320px; border-radius:14px; border:1px solid var(--line); display:block; margin:0 auto; }
.tip-card{ margin-top:18px; width:100%; text-align:left; background:transparent; border:1px solid var(--line); border-radius:2px; padding:14px 16px; }
.tip-card .lbl{ font-family:var(--mono); font-size:10px; letter-spacing:2px; color:var(--red); font-style:italic; font-weight:700; }
.tip-card p{ font-size:13.5px; margin:8px 0 0; color:var(--paper); line-height:1.45; }

/* ============ MAP / RUTA ============ */
.day-head{ padding:16px 20px 8px; }
.day-head b{ font-family:var(--disp); font-style:italic; font-size:14px; color:var(--red); }
.day-head span{ font-family:var(--body); font-size:12px; color:var(--paper-dim); margin-left:8px; }
.rt-list{ display:flex; flex-direction:column; gap:10px; padding:0 20px; }
.rt-card{
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  border:1px solid rgba(0,0,0,0.20); border-radius:2px; background:transparent;
}
.rt-card.mine{ background:rgba(226,59,64,0.10); }
.rt-badge{
  width:34px; height:34px; border-radius:6px; background:var(--asphalt-2); color:var(--red);
  display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-weight:700; font-size:11px;
  flex-shrink:0;
}
.rt-info b{ display:block; font-family:var(--disp); font-style:italic; font-size:14px; font-weight:600; color:var(--paper); }
.rt-info span{ font-family:var(--body); font-size:12px; color:var(--fog); }

/* ============ PROGRESS ============ */
.prog-cat{ display:flex; align-items:center; gap:12px; padding:14px 20px; border-bottom:1px solid var(--line); }
.prog-check{ width:26px; height:26px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:13px; }
.prog-check.done{ background:var(--green); color:#04140A; }
.prog-check.mid{ background:var(--yellow); color:#14171C; }
.prog-check.lock{ background:var(--asphalt-3); color:var(--fog); border:1px solid var(--line); }
.prog-name{ font-family:var(--disp); font-weight:600; font-size:14.5px; }
.prog-sub{ font-size:11px; color:var(--fog); }
.pending-tag{ font-family:var(--mono); font-size:9px; color:var(--amber); border:1px solid var(--yellow); border-radius:6px; padding:2px 6px; margin-left:auto; }

/* ============ RANKING ============ */
.prize-cols{ display:flex; gap:8px; padding:22px 20px 10px; }
.prize-col{ flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; min-width:0; }
.prize-col-img{ height:80px; width:100%; display:flex; align-items:center; justify-content:center; }
.prize-col img{ max-width:100%; max-height:100%; object-fit:contain; }
.prize-col b{ font-family:var(--disp); font-style:italic; font-weight:700; font-size:14px; color:var(--red); margin-top:12px; }
.prize-col span{ font-size:11px; color:var(--paper-dim); margin-top:3px; line-height:1.35; }
#rankList, .dc-rank-list{ border:1px solid var(--line); border-radius:14px; overflow:hidden; }
#rankList{ margin:16px 20px 0; }
.rank-row{ display:flex; align-items:center; gap:12px; padding:16px; border-bottom:1px solid var(--line); }
.rank-row:last-child{ border-bottom:none; }
.rank-row.me{ background:rgba(226,59,64,0.06); }
.rank-pos{ font-family:var(--disp); font-weight:700; font-size:11px; width:22px; color:var(--red); }
.rank-avatar{ width:38px; height:38px; border-radius:50%; background:#14171C; color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--disp); font-size:11px; flex-shrink:0; }
.rank-name{ font-family:var(--disp); font-style:italic; font-weight:600; font-size:11px; flex:1; }
.rank-km{ font-family:var(--disp); font-size:11px; color:var(--paper); white-space:nowrap; }
.rank-km b{ color:var(--red); font-weight:700; font-size:11px; }
.trophy{ font-size:14px; }

/* ============ PROFILE ============ */
.info-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 20px; border-bottom:1px solid var(--line); font-size:13px; }
.info-row span:first-child{ color:var(--paper); font-family:var(--disp); font-style:italic; font-weight:700; letter-spacing:0.5px; text-transform:uppercase; flex-shrink:0; }
.info-row span:last-child{ color:var(--paper); text-align:right; line-height:1.5; }
.section-title{ font-family:var(--disp); font-weight:600; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--paper); padding:20px 20px 8px; }
#profile .field label{ color:var(--red); font-weight:700; }

/* ============ PRIZE ============ */
#prize .scroll{ align-items:center; text-align:center; padding:30px 26px; }
.prize-icon{ font-size:52px; }
.prize-name{ font-family:var(--disp); font-weight:700; font-size:22px; margin-top:12px; }
.prize-desc{ font-size:14px; color:var(--paper-dim); margin-top:10px; line-height:1.5; }
.lock-list{ margin-top:24px; width:100%; text-align:left; }
.lock-item{ display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--asphalt-2); border-radius:12px; margin-bottom:10px; border:1px solid var(--line); }
.lock-item.open{ border-color:var(--green); }
.lock-item b{ font-family:var(--disp); font-size:13.5px; display:block; }
.lock-item span{ font-size:11px; color:var(--fog); }

/* ============ DAILY INFO ============ */
.info-card{ margin:16px 20px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px; box-shadow:0 2px 10px rgba(20,23,28,0.05); }
.link-card{
  margin:16px 0px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px;
  box-shadow:0 2px 10px rgba(20,23,28,0.05); display:flex; align-items:center; justify-content:space-between; gap:14px;
}
.link-card-text{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.link-card-text b{ font-family:var(--disp); font-style:italic; font-weight:700; font-size:16px; color:var(--paper); }
.link-card-text span{ font-family:var(--body); font-size:13px; color:var(--paper-dim); }
.link-card img{ max-width:130px; object-fit:contain; flex-shrink:0; }
.info-card h4{ font-family:var(--disp); font-style:italic; font-weight:700; font-size:15px; letter-spacing:0; text-transform:none; color:var(--red); margin:0 0 10px; }
.info-card p{ font-size:13.5px; color:var(--paper-dim); margin:0; line-height:1.5; }

/* utility */
.pad{ padding-left:20px; padding-right:20px; }
.mt0{ margin-top:0; }
.placeholder-badge{ display:inline-block; font-family:var(--mono); font-size:9px; letter-spacing:1px; font-style:normal; font-weight:700; color:#fff; background:var(--red); padding:3px 8px; border-radius:5px; margin-left:6px; vertical-align:middle; }

/* ============ PLANIFICA TU RALLY: tramos, accesos, checklist, faq ============ */
.tramo-hdr{ font-family:var(--mono); font-size:10px; letter-spacing:1px; color:var(--fog); text-transform:uppercase; margin-bottom:6px; }
.tramo-day{ font-family:var(--disp); font-style:italic; font-weight:700; font-size:12.5px; color:var(--red); margin:10px 0 2px; text-transform:uppercase; }
.tramo-row{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); }
.tramo-row:last-child{ border-bottom:none; }
.tramo-name{ font-family:var(--disp); font-weight:600; font-size:13.5px; }
.tramo-meta{ font-size:11.5px; color:var(--fog); margin-top:1px; }
.tramo-time{ font-family:var(--mono); font-size:12px; color:var(--red); white-space:nowrap; flex-shrink:0; }

.access-block{ margin-top:14px; padding-top:14px; border-top:1px dashed var(--line); }
.access-block:first-child{ margin-top:0; padding-top:0; border-top:none; }
.access-day{ font-family:var(--disp); font-style:italic; font-weight:700; font-size:13px; color:var(--red); margin-bottom:4px; text-transform:uppercase; }
.access-deadline{ font-size:12.5px; color:var(--red); font-weight:700; margin-bottom:6px; line-height:1.4; }
.access-note{ font-size:11.5px; color:var(--fog); margin-bottom:10px; line-height:1.45; }
.access-links{ display:flex; gap:8px; flex-wrap:wrap; }
.map-link{ display:inline-flex; align-items:center; gap:5px; font-family:var(--body); font-weight:600; font-size:11.5px; padding:8px 14px; border-radius:999px; text-decoration:none; }
.map-link:active{ transform:scale(0.97); }
.map-link.gmaps{ border:1px solid var(--line); color:var(--paper); background:#fff; }
.map-link.waze{ border:none; color:#fff; background:#33CCFF; }

.check-item{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; margin-bottom:2px; cursor:pointer; transition:background .15s; }
.check-item:last-child{ margin-bottom:0; }
.check-item .box{ width:18px; height:18px; border-radius:5px; border:1.5px solid var(--line); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:11px; color:#fff; font-weight:700; }
.check-item.checked{ background:rgba(30,158,90,0.10); }
.check-item.checked .box{ background:var(--green); border-color:var(--green); }
.check-item .lbl{ font-size:13.5px; color:var(--paper-dim); }
.check-item.checked .lbl{ color:var(--green); text-decoration:line-through; text-decoration-color:var(--green); }
.checklist-hint{ font-size:12px; color:var(--fog); margin:0 0 12px; line-height:1.5; }

.faq-item{ border-bottom:1px solid var(--line); padding:11px 0; }
.faq-item:last-child{ border-bottom:none; padding-bottom:0; }
.faq-item summary{ font-family:var(--disp); font-weight:600; font-size:13.5px; cursor:pointer; list-style:none; }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{ content:'+'; float:right; color:var(--red); font-weight:700; font-size:16px; }
.faq-item[open] summary::after{ content:'–'; }
.faq-item p{ font-size:13px; color:var(--paper-dim); margin:8px 0 0; line-height:1.5; }
.back-btn{ display:flex; align-items:center; gap:6px; padding:14px 20px 4px; font-family:var(--mono); font-size:12px; color:var(--fog); cursor:pointer; }

/* ============ ESTADOS GENERALES (loading / vacío / error) ============ */
.state-box{ padding:40px 24px; text-align:center; color:var(--fog); font-size:13.5px; }
.spinner{ width:26px; height:26px; border-radius:50%; border:3px solid var(--asphalt-3); border-top-color:var(--red); margin:0 auto 12px; animation:spin 0.8s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.toast{ position:absolute; left:16px; right:16px; bottom:96px; background:#14171C; color:#fff; padding:12px 16px; border-radius:10px; font-size:13px; text-align:center; z-index:20; box-shadow:0 8px 24px rgba(0,0,0,0.25); }
