:root {
  --fondo: #07070a;
  --fondo-alt: #0f0f14;
  --tarjeta: #16161d;
  --tarjeta-2: #1d1d26;
  --borde: #26262f;
  --texto: #fafafa;
  --suave: #a1a1aa;
  --tenue: #6b6b75;
  --acento: #c2410c;
  --acento-vivo: #ea580c;
  --acento-tinta: #f08a5d;
  --acento-suave: #29110a;
  --oro: #f5b301;
  --plata: #c9ced6;
  --bronce: #d08a4b;
  --ok: #34d399;
  --peligro: #f87171;
  --radio: 16px;
  --titulo: "Bricolage Grotesque", system-ui, sans-serif;
  --texto-f: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  background-image: radial-gradient(900px 420px at 50% -120px, #c2410c26, transparent 70%);
  background-repeat: no-repeat;
  color: var(--texto);
  font-family: var(--texto-f);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.envoltura { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 20; background: #07070acc; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid #ffffff10; }
.cabecera .envoltura { display: flex; align-items: center; gap: 12px; height: 60px; }
.marca-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--titulo); font-weight: 800; letter-spacing: -0.01em; font-size: 18px; white-space: nowrap; }
.marca-logo img { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--suave); font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.nav a:hover, .nav a.activo { color: var(--texto); background: #ffffff0d; }
.nav .solo-ancho { display: none; }
.nav .boton { white-space: nowrap; }
@media (max-width: 430px) {
  .marca-logo span { display: none; }
  .nav a { padding: 8px 8px; }
}
@media (min-width: 720px) { .nav .solo-ancho { display: inline-block; } }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: 700 16px/1 var(--texto-f); padding: 15px 22px; border-radius: 14px; background: var(--acento); color: #fff; transition: transform .08s ease, background .15s ease; }
.boton:hover { background: var(--acento-vivo); }
.boton:active { transform: scale(.98); }
.boton.secundario { background: #ffffff10; color: var(--texto); border: 1px solid var(--borde); }
.boton.secundario:hover { background: #ffffff18; }
.boton.peq { font-size: 14px; padding: 10px 14px; border-radius: 11px; }
.boton.ancho { width: 100%; }
.boton[disabled] { opacity: .6; cursor: default; }
.nav .boton { margin-left: 4px; color: #fff; padding: 10px 14px; font-size: 14px; }

/* Héroe */
.heroe { padding: 36px 0 18px; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--acento-tinta); background: var(--acento-suave); border: 1px solid #c2410c55; padding: 7px 12px; border-radius: 999px; }
.chip .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--acento-vivo); box-shadow: 0 0 0 4px #ea580c33; }
h1, h2, h3 { font-family: var(--titulo); letter-spacing: -0.02em; margin: 0; }
.heroe h1 { font-size: clamp(38px, 10vw, 68px); line-height: .98; font-weight: 800; margin: 18px auto 14px; max-width: 12ch; }
.heroe h1 em { font-style: normal; color: var(--acento-vivo); }
.heroe p.sub { color: var(--suave); font-size: 17px; max-width: 34ch; margin: 0 auto 22px; }
.heroe .acciones { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.premio { margin: 26px auto 0; max-width: 520px; display: flex; gap: 14px; align-items: center; text-align: left; background: linear-gradient(135deg, #2a1208, #16161d 70%); border: 1px solid #c2410c55; border-radius: var(--radio); padding: 14px 16px; }
.premio .icono { font-size: 30px; line-height: 1; }
.premio b { display: block; font-size: 15px; }
.premio span { color: var(--suave); font-size: 14px; }

/* Secciones */
.seccion { margin: 34px 0; }
.seccion-cab { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.seccion-cab h2 { font-size: 26px; font-weight: 800; }
.seccion-cab a { color: var(--acento-tinta); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pestanas { display: inline-flex; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.pestanas a { text-decoration: none; font-size: 14px; font-weight: 700; color: var(--suave); padding: 8px 14px; border-radius: 9px; }
.pestanas a.activo { background: var(--acento); color: #fff; }

/* Podio */
.podio { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 12px; }
@media (min-width: 720px) { .podio { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 719px) {
  .podio { grid-template-columns: 1fr 1fr; gap: 10px; }
  .podio .tarjeta-coche:first-child { grid-column: 1 / -1; }
  .podio .tarjeta-coche:not(:first-child) .info { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
  .podio .tarjeta-coche:not(:first-child) .votar { width: 100%; }
}
.tarjeta-coche { position: relative; display: block; text-decoration: none; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.tarjeta-coche .foto { aspect-ratio: 4/3; background: #111 center/cover no-repeat; }
.tarjeta-coche .info { padding: 12px 14px 14px; display: flex; align-items: center; gap: 10px; }
.tarjeta-coche .info .txt { min-width: 0; flex: 1; }
.tarjeta-coche .info b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarjeta-coche .info span { display: block; color: var(--suave); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medalla { position: absolute; top: 10px; left: 10px; font: 800 15px/1 var(--titulo); padding: 8px 11px; border-radius: 11px; background: #000000b0; color: #fff; backdrop-filter: blur(6px); }
.medalla.p1 { background: var(--oro); color: #1a1200; }
.medalla.p2 { background: var(--plata); color: #15171a; }
.medalla.p3 { background: var(--bronce); color: #1d1006; }

/* Lista */
.lista { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.fila { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--borde); }
.fila:first-child { border-top: 0; }
.fila .pos { width: 34px; flex: none; text-align: center; font: 800 17px/1 var(--titulo); color: var(--suave); }
.fila .mini { width: 58px; height: 58px; flex: none; border-radius: 12px; background: #111 center/cover no-repeat; }
.fila .txt { min-width: 0; flex: 1; text-decoration: none; }
.fila .txt b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila .txt span { display: block; color: var(--suave); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila .extra { color: var(--tenue); font-size: 12px; }

/* Botón de voto */
.votar { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--borde); background: #ffffff08; color: var(--texto); font: 700 15px/1 var(--texto-f); padding: 10px 12px; border-radius: 12px; cursor: pointer; min-width: 74px; justify-content: center; transition: background .15s, border-color .15s, transform .08s; }
.votar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.votar:hover { border-color: #c2410c99; }
.votar:active { transform: scale(.95); }
.votar.hecho { background: var(--acento-suave); border-color: var(--acento); color: var(--acento-tinta); }
.votar.hecho svg { fill: var(--acento-vivo); stroke: var(--acento-vivo); }
.votar.grande { font-size: 18px; padding: 16px 22px; border-radius: 14px; min-width: 0; width: 100%; background: var(--acento); border-color: var(--acento); color: #fff; }
.votar.grande svg { width: 22px; height: 22px; }
.votar.grande.hecho { background: var(--acento-suave); color: var(--acento-tinta); }
.votar.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.12); } }

/* Marcas */
.rejilla-marcas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .rejilla-marcas { grid-template-columns: repeat(4, 1fr); } }
.marca-card { display: flex; flex-direction: column; text-decoration: none; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; overflow: hidden; }
.marca-card .foto { aspect-ratio: 16/10; background: #111 center/cover no-repeat; position: relative; }
.marca-card .foto .n { position: absolute; top: 8px; left: 8px; font: 800 13px/1 var(--titulo); background: #000000b0; padding: 6px 8px; border-radius: 8px; }
.marca-card .info { padding: 10px 12px 12px; }
.marca-card b { display: block; font-size: 15px; }
.marca-card span { color: var(--suave); font-size: 13px; }
.buscador { width: 100%; margin-bottom: 14px; }

/* Movimientos */
.movimiento { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--borde); text-decoration: none; }
.movimiento:first-child { border-top: 0; }
.movimiento .mini { display: block; width: 46px; height: 46px; border-radius: 10px; flex: none; background: #111 center/cover no-repeat; }
.movimiento .txt { display: block; flex: 1; min-width: 0; }
.movimiento .txt > b { display: block; font-size: 15px; line-height: 1.3; }
.movimiento .txt > span { display: block; color: var(--suave); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movimiento time { color: var(--tenue); font-size: 12px; white-space: nowrap; }
.etq { display: inline-block; vertical-align: 1px; font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 7px; background: var(--acento-suave); color: var(--acento-tinta); margin-right: 4px; }
.etq.oro { background: #3a2a00; color: var(--oro); }

/* Ficha del coche */
.ficha { padding: 20px 0 10px; max-width: 680px; margin: 0 auto; }
.galeria { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radio); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.galeria::-webkit-scrollbar { display: none; }
.galeria img { scroll-snap-align: center; flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radio); background: #111; }
.puntos-galeria { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.puntos-galeria i { width: 7px; height: 7px; border-radius: 50%; background: #ffffff30; }
.puntos-galeria i.on { background: var(--acento-vivo); }
.ficha-cab { margin: 18px 0 10px; }
.ficha-cab h1 { font-size: clamp(30px, 8vw, 44px); font-weight: 800; line-height: 1.05; }
.ficha-cab .ig { display: inline-flex; align-items: center; gap: 6px; color: var(--acento-tinta); font-weight: 700; text-decoration: none; margin-top: 6px; font-size: 17px; }
.datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.dato { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 12px; text-align: center; }
.dato b { display: block; font: 800 24px/1.1 var(--titulo); }
.dato span { color: var(--suave); font-size: 12px; }
.compartir { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.aviso { background: var(--tarjeta); border: 1px solid var(--borde); border-left: 4px solid var(--acento); border-radius: 12px; padding: 12px 14px; margin: 14px 0; color: var(--suave); font-size: 15px; }
.aviso b { color: var(--texto); }
.aviso.ok { border-left-color: var(--ok); }
.aviso.mal { border-left-color: var(--peligro); }

/* Formularios */
.form { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; }
.campo { margin-bottom: 16px; }
.campo label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.campo small { display: block; color: var(--tenue); font-size: 13px; margin-top: 6px; }
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; font: 500 16px/1.3 var(--texto-f); color: var(--texto); background: var(--fondo-alt); border: 1px solid var(--borde); border-radius: 12px; padding: 13px 14px; outline: none; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--suave) 50%), linear-gradient(135deg, var(--suave) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--acento); box-shadow: 0 0 0 3px #c2410c33; }
.con-arroba { position: relative; }
.con-arroba span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--suave); font-weight: 600; }
.con-arroba input { padding-left: 32px; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.codigo-input { font: 800 28px/1 var(--titulo) !important; letter-spacing: .35em; text-align: center; }
.fotos-subidas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.fotos-subidas .f { position: relative; aspect-ratio: 1; border-radius: 12px; background: #111 center/cover; }
.fotos-subidas .f button { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #000000c0; color: #fff; font-size: 16px; cursor: pointer; }
.fotos-subidas .f .portada { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; background: var(--acento); padding: 3px 6px; border-radius: 6px; }
.campo .elegir-fotos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--borde); border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; color: var(--suave); }
.elegir-fotos:hover { border-color: var(--acento); }
.elegir-fotos b { color: var(--texto); }
.error { color: var(--peligro); font-size: 14px; font-weight: 600; margin: 8px 0 0; min-height: 1em; }

/* Modal */
.modal-fondo { position: fixed; inset: 0; z-index: 50; background: #000000b8; display: none; align-items: flex-end; justify-content: center; padding: 0; }
.modal-fondo.abierto { display: flex; }
@media (min-width: 600px) { .modal-fondo { align-items: center; padding: 16px; } }
.modal { width: 100%; max-width: 440px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 22px 22px 0 0; padding: 22px 18px 26px; position: relative; animation: sube .2s ease; }
@media (min-width: 600px) { .modal { border-radius: 22px; } }
@keyframes sube { from { transform: translateY(30px); opacity: 0; } }
.modal h3 { font-size: 22px; margin-bottom: 6px; }
.modal p { color: var(--suave); margin: 0 0 16px; font-size: 15px; }
.modal .cerrar { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #ffffff12; color: var(--texto); font-size: 18px; cursor: pointer; }
.modal .nota { font-size: 13px; color: var(--tenue); margin-top: 12px; }
.modal .enlace-btn { background: none; border: 0; color: var(--acento-tinta); font: 600 14px var(--texto-f); cursor: pointer; padding: 0; margin-top: 12px; }

/* Aviso flotante */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 60; background: #1f1f28; border: 1px solid var(--borde); color: var(--texto); padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px #00000080; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); width: max-content; }
.toast.ver { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast a { color: var(--acento-tinta); }

/* Bloques varios */
.vacio { text-align: center; padding: 34px 18px; color: var(--suave); }
.vacio b { display: block; color: var(--texto); font-size: 18px; margin-bottom: 6px; }
.siguenos { display: flex; gap: 14px; align-items: center; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; }
.siguenos img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.siguenos .txt { flex: 1; min-width: 0; }
.siguenos b { display: block; }
.siguenos span { color: var(--suave); font-size: 14px; }
.ganadores { display: grid; gap: 10px; }
.texto-largo h2 { font-size: 22px; margin: 26px 0 8px; }
.texto-largo p, .texto-largo li { color: #d4d4d8; }
.texto-largo ul { padding-left: 20px; }
.pie { border-top: 1px solid #ffffff10; margin-top: 50px; padding: 26px 0 40px; color: var(--tenue); font-size: 14px; }
.pie .envoltura { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.pie a { color: var(--suave); text-decoration: none; }
.pie a:hover { color: var(--texto); }
.oculto { display: none !important; }

/* Panel */
.panel-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.panel-tabla td, .panel-tabla th { padding: 8px; border-top: 1px solid var(--borde); text-align: left; vertical-align: middle; }
.revisar { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; margin-bottom: 12px; }
.revisar .fotos { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; }
.revisar .fotos img { height: 150px; width: auto; max-width: none; flex: none; border-radius: 10px; }
.revisar .acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.boton.verde { background: #15803d; }
.boton.verde:hover { background: #16a34a; }
.boton.rojo { background: #991b1b; }
.boton.rojo:hover { background: #b91c1c; }
.cifras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 720px) { .cifras { grid-template-columns: repeat(4, 1fr); } }
