:root {
  --bg: #faf8f3; --s1: #ffffff; --s2: #f7f3ea; --s3: #efe7d6; --line: #e8e0cd; --line2: #d8cba9;
  --fg: #1c1a16; --muted: #6b6457;
  --cta: #c9a227; --on-cta: #1c1606; --cta-soft: rgba(201, 162, 39, .13); --oro: #8a6a10;
  --ok: #1d7a45; --ok-soft: rgba(29, 122, 69, .1); --warn: #9a5b06; --warn-soft: rgba(196, 128, 18, .12);
  --bad: #b8322a; --bad-soft: rgba(184, 50, 42, .08);
  --lv1: #5f6672; --lv2: #6247c4; --lv3: #7f5f0c;
  --f-d: "Inter", system-ui, sans-serif; --f-b: "Inter", system-ui, -apple-system, sans-serif; --f-s: "Playfair Display", Georgia, serif;
  --r: 14px; --gut: max(16px, env(safe-area-inset-left));
  --sombra: 0 1px 2px rgba(60, 45, 10, .05), 0 8px 24px rgba(60, 45, 10, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--f-b); }
h1, h2, h3 { font-family: var(--f-s); margin: 0; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 6vw, 30px); } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--oro); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cta); color: var(--on-cta); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.cargando { padding: 40px var(--gut); color: var(--muted); text-align: center; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* estructura */
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 var(--gut) calc(32px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.wrap.ancho { max-width: 1080px; }
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1080px; margin: 0 auto; padding: 10px var(--gut); display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; }
.marca { display: flex; align-items: center; gap: 10px; font: 700 17px var(--f-d); color: var(--fg); text-decoration: none; }
.marca .dot { width: 28px; height: 28px; border-radius: 8px; background: var(--cta); display: grid; place-items: center; flex: none; }
.quien { display: flex; align-items: center; gap: 8px; min-width: 0; }
.quien span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pie { text-align: center; font-size: 12px; color: var(--muted); padding-top: 8px; }
.pie a { color: var(--oro); text-decoration: none; }

/* botones */
.btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--s1); color: var(--fg);
  font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  text-decoration: none; touch-action: manipulation; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.cta { background: var(--cta); color: var(--on-cta); border-color: #b48f1c; }
.btn.cta:hover { background: #d4ad33; border-color: #a98618; }
.btn.peligro { color: var(--bad); border-color: rgba(248, 113, 113, .5); background: var(--bad-soft); }
.btn.link { border: 0; background: none; color: var(--oro); padding: 0 8px; min-height: 40px; }
.btn.chico { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.full { width: 100%; min-height: 52px; font-size: 16px; border-radius: 14px; }

/* formularios */
form { display: grid; gap: 14px; }
label, .campo { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 48px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line2); padding: 10px 12px; font-size: 16px; font-weight: 500; }
textarea { min-height: 80px; resize: vertical; }
input::placeholder { color: #9a9284; }
.dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ayuda { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.err { color: var(--bad); font-size: 13.5px; font-weight: 600; min-height: 1em; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--s1); border: 1px solid var(--line2); border-radius: 12px; padding: 4px; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; inset: 0; min-height: 0; }
.seg span { display: grid; place-items: center; min-height: 40px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: center; padding: 0 4px; }
.seg input:checked + span { background: var(--s2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line2); }
.seg input:focus-visible + span { outline: 2px solid var(--oro); }
.seg .n3 input:checked + span { color: var(--lv3); box-shadow: inset 0 0 0 1px rgba(154, 116, 20, .5); }
.seg .n2 input:checked + span { color: var(--lv2); box-shadow: inset 0 0 0 1px rgba(98, 71, 196, .4); }

/* piezas */
.panel { background: var(--s1); border: 1px solid var(--line); box-shadow: var(--sombra); border-radius: 18px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.h { font: 600 12px var(--f-b); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lv { display: inline-flex; gap: 6px; align-items: center; font: 700 11.5px var(--f-d); letter-spacing: .08em; padding: 5px 9px; border-radius: 7px; text-transform: uppercase; white-space: nowrap; }
.lv::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: currentColor; border-radius: 1px; }
.lv1 { color: var(--lv1); background: rgba(95, 102, 114, .1); }
.lv2 { color: var(--lv2); background: rgba(98, 71, 196, .1); }
.lv3 { color: var(--lv3); background: rgba(201, 162, 39, .14); box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .45); }
.pill { font: 600 12.5px var(--f-b); padding: 5px 10px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ok { color: var(--ok); background: var(--ok-soft); } .warn { color: var(--warn); background: var(--warn-soft); }
.bad { color: var(--bad); background: var(--bad-soft); } .neutro { color: var(--muted); background: var(--s2); }
.fila { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aviso { border-radius: 16px; padding: 16px; display: grid; gap: 6px; border: 1px solid; }
.aviso strong { font: 700 18px var(--f-d); }
.aviso.bad { border-color: rgba(184, 50, 42, .35); background: var(--bad-soft); } .aviso.warn { border-color: rgba(196, 128, 18, .35); background: var(--warn-soft); } .aviso.ok { border-color: rgba(201, 162, 39, .5); background: var(--cta-soft); }
.aviso.neutro { border-color: var(--line); background: var(--s1); }
.aviso p { color: var(--fg); }

/* ficha del socio */
.foto { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 52dvh; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, #f5eedd, #e9dfc7); display: grid; place-items: center; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto .sin { display: grid; gap: 6px; justify-items: center; text-align: center; color: var(--muted); font-size: 14px; padding: 20px; }
.nombre { font: 600 clamp(28px, 7.5vw, 34px)/1.1 var(--f-s); letter-spacing: -.02em; overflow-wrap: anywhere; }
.ben { display: flex; gap: 12px; align-items: center; background: var(--s1); box-shadow: var(--sombra); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.ben .t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ben strong { font-size: 15px; } .ben .t span { font-size: 13px; color: var(--muted); }
.ben .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--cta-soft); border: 1px solid rgba(201, 162, 39, .3); display: grid; place-items: center; flex: none; color: var(--oro); }
.ben.usado { opacity: .55; } .ben.usado .ico { color: var(--muted); }
.ben.personal { border-color: rgba(201, 162, 39, .6); } .ben.personal .ico { color: var(--lv3); }
.lista { display: grid; gap: 8px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); font-size: 14.5px; min-width: 0; }
.item > div { min-width: 0; }
.item .der { color: var(--muted); font-size: 13px; text-align: right; flex: none; }
button.item { width: 100%; text-align: left; cursor: pointer; color: var(--fg); }
button.item:hover { border-color: var(--line2); }
.mini { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--s3); flex: none; display: grid; place-items: center; color: var(--muted); font: 700 15px var(--f-d); overflow: hidden; }
.mini img { width: 100%; height: 100%; object-fit: cover; }

/* tarjeta del socio (vista pública) */
.tarjeta { border-radius: 22px; padding: 22px; min-height: 200px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #ffffff 30%, color-mix(in srgb, var(--tono, #c9a227) 16%, #fff)); border: 1.5px solid color-mix(in srgb, var(--tono, #c9a227) 55%, transparent); box-shadow: var(--sombra); }
.tarjeta .nfc { position: absolute; right: 20px; top: 20px; color: var(--tono); }
.tarjeta .club { font: 700 18px var(--f-d); }
.tarjeta .nivel { font: 700 44px/1 var(--f-d); color: var(--tono); letter-spacing: -.02em; }

/* toque (personal) */
.toque { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 34px 18px; border-radius: 22px; border: 1.5px dashed var(--line2); background: radial-gradient(circle at 50% 0%, rgba(201, 162, 39, .14), transparent 65%), var(--s1); }
.ondas { width: 96px; height: 96px; border-radius: 50%; background: var(--cta-soft); display: grid; place-items: center; color: var(--oro); }
@media (prefers-reduced-motion: no-preference) { .ondas svg { animation: latido 2.4s ease-in-out infinite; } }
@keyframes latido { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .75; } }

/* panel del dueño */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 0 auto; text-align: center; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 10px 14px; border-radius: 10px; white-space: nowrap; min-height: 40px; }
.tabs a[aria-current="page"] { background: var(--s3); color: var(--fg); }
.rejilla { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .rejilla.dos-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.cifra { background: var(--s2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 2px; }
.cifra b { font: 700 24px var(--f-d); } .cifra span { font-size: 12.5px; color: var(--muted); }
.clave-nueva { background: var(--cta-soft); border: 1px solid rgba(201, 162, 39, .45); border-radius: 14px; padding: 14px; display: grid; gap: 4px; }
.clave-nueva code { font: 600 17px ui-monospace, Menlo, monospace; color: var(--fg); overflow-wrap: anywhere; }

dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line2); border-radius: 20px; background: var(--s1); color: var(--fg); padding: 0; }
dialog::backdrop { background: rgba(28, 26, 22, .45); }
dialog .cuerpo { padding: 18px; display: grid; gap: 14px; }
dialog .cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.foto-campo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.foto-campo .prev { width: 96px; height: 120px; border-radius: 14px; background: var(--s3); overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.foto-campo .prev img { width: 100%; height: 100%; object-fit: cover; }
.foto-campo input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.demo { border: 1px dashed rgba(196, 128, 18, .5); background: var(--warn-soft); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.demo .lista { max-height: 300px; overflow: auto; }

#toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; background: #1c1a16; color: #fff;
  font-weight: 600; font-size: 15px; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(28, 26, 22, .3); max-width: calc(100vw - 32px); }

.seg.tipos { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.seg.tipos span { gap: 2px; min-height: 58px; font-size: 13px; }
.seg.tipos span span { min-height: 0; display: block; }
.mini svg { width: 20px; height: 20px; }
span.mini { color: var(--oro); background: var(--cta-soft); }


/* ===== Rediseño 03-12 (imagen elegida por el usuario): logo, barra lateral, barra inferior, Inicio, ficha ===== */
.logo { display: inline-grid; justify-items: center; line-height: 1; gap: 3px; text-decoration: none; color: var(--fg); }
.logo .corona { color: var(--cta); }
.logo .logo-img { height: 30px; width: auto; display: block; margin: 0 auto 3px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.lado .logo .logo-img { height: 40px; }
.logo-t { height: 18px; width: auto; }
.logo .nom { font: 600 21px var(--f-s); letter-spacing: .05em; white-space: nowrap; }
.logo .nom b { color: var(--oro); font-weight: 600; }
.logo .sub { font: 600 8px var(--f-b); letter-spacing: .42em; color: var(--muted); text-transform: uppercase; padding-left: .42em; }
.top .in { display: grid; grid-template-columns: 96px 1fr 96px; justify-items: center; }
.lado-izq { justify-self: start; } .lado-der { justify-self: end; }
.btn-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid transparent; background: none; color: var(--fg); cursor: pointer; text-decoration: none; }
.btn-ic:hover { background: var(--s2); border-color: var(--line); }
.oro { color: var(--oro); }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }

.shell { min-height: 100dvh; }
.lado { background: linear-gradient(180deg, #1f1a14 0%, #17130f 42%, rgba(17, 14, 10, .55) 70%, rgba(17, 14, 10, .2) 100%), url(/img/copa.jpg) center bottom / cover no-repeat, #110e0a; color: #e9dfca; }
.lado .logo { color: #f4ead5; margin: 6px auto 10px; } .lado .logo .nom b { color: #e5c674; } .lado .logo .sub { color: #a8987c; }
.lado nav { display: grid; gap: 4px; }
.lado nav a { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 12px; color: #d8cdb6; text-decoration: none; font-weight: 500; font-size: 15px; }
.lado nav a:hover:not([aria-current]) { background: rgba(255, 255, 255, .06); color: #fff; }
.lado nav a[aria-current="page"] { background: linear-gradient(90deg, #ecd48f, #c9a227); color: #1c1606; font-weight: 600; box-shadow: 0 6px 16px rgba(201, 162, 39, .25); }
.lado-pie { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); font-size: 13px; }
.lado-pie span:not(.avatar) { color: #a8987c; } .lado-pie .btn-ic { color: #e9dfca; margin-left: auto; } .lado-pie .btn-ic:hover { background: rgba(255, 255, 255, .08); border-color: transparent; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(180deg, #f0d891, #c9a227); color: #1c1606; font: 700 16px var(--f-s); text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(16px, 3vw, 36px) 0; }
.fecha { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--s1); font-size: 13.5px; font-weight: 500; }
.contenido { padding: 16px clamp(16px, 3vw, 36px) 40px; display: grid; gap: 18px; max-width: 1240px; min-width: 0; }
.abajo { display: none; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
  .lado { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 22px; padding: 24px 16px; }
  .solo-celu { display: none; }
}
@media (max-width: 899px) {
  .lado, .solo-compu { display: none !important; }
  .topbar { justify-content: center; padding-top: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; background: rgba(250, 248, 243, .94); position: sticky; top: 0; z-index: 10; }
  .contenido { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .abajo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(60, 45, 10, .06); }
  .abajo a, .abajo button { display: grid; justify-items: center; gap: 3px; font: 500 11px var(--f-b); color: var(--muted); text-decoration: none; background: none; border: 0; min-height: 52px; padding: 4px 0; cursor: pointer; }
  .abajo [aria-current="page"] { color: var(--oro); font-weight: 600; }
  .abajo .centro .ic { width: 52px; height: 52px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ecd48f, #c9a227); color: #1c1606; box-shadow: 0 8px 20px rgba(201, 162, 39, .4); border: 3px solid #fff; }
  .abajo .centro { color: var(--oro); font-weight: 600; }
}

/* Inicio */
.saludo h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; }
.saludo p { margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.stat { display: flex; gap: 14px; align-items: center; background: var(--s1); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--sombra); min-width: 0; }
.stat > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.stat .muted { font: 600 14px var(--f-s); color: var(--fg); }
.stat b { font: 600 34px/1.1 var(--f-s); }
.stat .ic, .titulo-ic .ic, .act .ic { color: var(--oro); }
.stat .ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--cta-soft); flex: none; }
.dos-inicio { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1150px) { .dos-inicio { grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); } }
.titulo-ic { display: flex; gap: 10px; align-items: center; }
.titulo-ic h2 { font-size: 20px; font-weight: 600; }
.banner-noche { border-radius: 16px; min-height: 130px; padding: 18px; color: #f6ecd6; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  background: linear-gradient(90deg, rgba(14, 11, 8, .88) 0%, rgba(14, 11, 8, .55) 55%, rgba(14, 11, 8, .15) 100%), url(/img/noche.jpg) center 30% / cover no-repeat, #1a140e; min-height: 150px; }
.banner-noche small { font: 600 11px var(--f-s); letter-spacing: .2em; color: #e5c674; margin-bottom: auto; }
.banner-noche strong { font: 600 24px var(--f-s); }
.act { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.act:last-child { border-bottom: 0; } .act b { font: 600 18px var(--f-s); }
.tabla-socios { display: grid; gap: 4px; }
.fila-s { display: grid; grid-template-columns: minmax(0, 1.7fr) auto 96px 120px; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 12px; border: 0; background: none; text-align: left; color: var(--fg); font: inherit; cursor: pointer; width: 100%; }
button.fila-s:hover { background: var(--s2); }
.fila-s.cab { font-size: 12px; color: var(--muted); font-weight: 600; cursor: default; padding-top: 4px; padding-bottom: 4px; }
.fila-s .pill { justify-self: start; }
@media (max-width: 700px) { .fila-s { grid-template-columns: minmax(0, 1fr) auto; } .fila-s .col-e, .fila-s .col-u { display: none; } }
span.mini { border-radius: 50%; }

/* Ficha del socio */
.foto.curva { border-radius: 26px 26px 50% 50% / 26px 26px 13% 13%; aspect-ratio: 1 / 1.05; max-height: 48dvh; box-shadow: var(--sombra); }
.ficha-cab { display: grid; justify-items: center; text-align: center; gap: 8px; }
.ficha-cab .mono { font-size: 14px; }
.insignia-wrap { display: flex; align-items: center; gap: 4px; margin: 4px 0; }
.laurel { color: var(--cta); display: grid; } .laurel.der { transform: scaleX(-1); }
.insignia { display: inline-flex; align-items: center; gap: 10px; padding: 11px 26px; border-radius: 999px; font: 700 18px var(--f-s); letter-spacing: .06em; white-space: nowrap;
  background: linear-gradient(180deg, #f5df9c, #c9a227); color: #2a1f05; box-shadow: 0 8px 20px rgba(201, 162, 39, .35), inset 0 1px 0 rgba(255, 255, 255, .7); }
.insignia.n2 { background: linear-gradient(180deg, #e3dafb, #8f78e0); color: #1d1247; box-shadow: 0 8px 20px rgba(98, 71, 196, .25), inset 0 1px 0 rgba(255, 255, 255, .7); }
.insignia.n1 { background: linear-gradient(180deg, #f1f2f4, #b9bec7); color: #23272e; box-shadow: 0 8px 20px rgba(60, 60, 60, .15), inset 0 1px 0 rgba(255, 255, 255, .8); }
.insignia.n2 ~ .laurel, .insignia-wrap:has(.n2) .laurel { color: #8f78e0; } .insignia-wrap:has(.n1) .laurel { color: #a3a9b3; }
.ben strong { font: 600 16px var(--f-s); }
.tarjeta .club { display: flex; gap: 8px; align-items: center; font: 600 17px var(--f-s); }
.tarjeta .nivel { font: 700 48px/1 var(--f-s); }
.corona-t { color: var(--tono); display: grid; }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { flex-direction: column; align-items: flex-start; padding: 12px; gap: 8px; border-radius: 16px; }
  .stat .ic { width: 36px; height: 36px; } .stat .ic svg { width: 18px; height: 18px; }
  .stat .muted { font-size: 12px; line-height: 1.25; } .stat b { font-size: 26px; }
  .stat .btn, .stat .pill { display: none; }
}

/* Portada de la pantalla de entrada */
.portada { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--sombra); background: #1a140e; }
.portada img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; display: block; }
.portada > div { position: absolute; inset: auto 0 0 0; padding: 18px 20px; display: grid; gap: 2px; color: #f6ecd6;
  background: linear-gradient(0deg, rgba(14, 11, 8, .85), transparent); }
.portada span { font: 600 11px var(--f-b); letter-spacing: .3em; text-transform: uppercase; color: #e5c674; }
.portada strong { font: 600 28px var(--f-s); }

/* Opciones con explicación (formulario de beneficios) */
.opciones { display: grid; gap: 8px; }
.opcion { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 14px; background: var(--s1); cursor: pointer; color: var(--fg); }
.opcion input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--oro); }
.opcion span { display: grid; gap: 2px; } .opcion strong { font-size: 15px; } .opcion small { font-size: 13px; font-weight: 500; color: var(--muted); }
.opcion:has(input:checked) { border-color: var(--cta); background: var(--cta-soft); }

/* Tutorial: bienvenida y recorrido */
.bienvenida { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(28, 26, 22, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bv-tarjeta { position: relative; width: min(420px, 100%); background: var(--s1); border-radius: 26px; padding: 30px 24px 24px; display: grid; justify-items: center; text-align: center; gap: 14px; box-shadow: 0 24px 60px rgba(28, 26, 22, .3); }
.bv-tarjeta h2 { font-size: 24px; } .bv-tarjeta p { color: var(--muted); font-size: 16px; min-height: 4.5em; }
.bv-ic { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--cta-soft); color: var(--oro); }
.bv-saltar { position: absolute; top: 12px; right: 12px; border: 0; background: none; color: var(--muted); font: 600 14px var(--f-b); padding: 10px; cursor: pointer; min-height: 44px; }
.bv-puntos { display: flex; gap: 6px; } .bv-puntos span { width: 8px; height: 8px; border-radius: 99px; background: var(--line2); transition: width .2s; }
.bv-puntos span.on { width: 22px; background: var(--cta); }
.tour-capa { position: fixed; inset: 0; z-index: 200; }
.tour-velo { position: fixed; inset: 0; background: rgba(28, 26, 22, .72); }
.tour-foco { position: fixed; border-radius: 14px; box-shadow: 0 0 0 3px var(--cta), 0 0 24px rgba(201, 162, 39, .5); pointer-events: none; transition: all .25s ease; }
.tour-globo { position: fixed; width: min(320px, calc(100vw - 16px)); background: var(--s1); border-radius: 18px; padding: 16px; display: grid; gap: 6px; box-shadow: 0 16px 40px rgba(28, 26, 22, .35); }
.tour-globo strong { font: 600 19px var(--f-s); } .tour-globo p { color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .tour-foco, .bv-puntos span { transition: none; } }
/* Ayuda */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; color: var(--oro); font-size: 20px; line-height: 1; } .faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { padding: 0 0 14px; color: var(--muted); }

/* ===== Modo oscuro (para el personal en el local) ===== */
:root[data-theme="dark"] {
  --bg: #0f0d0a; --s1: #18150f; --s2: #201c15; --s3: #2b261d; --line: #332c20; --line2: #4a4232;
  --fg: #f4eddd; --muted: #b9ae95;
  --cta: #d6b03e; --on-cta: #1c1606; --cta-soft: rgba(214, 176, 62, .15); --oro: #e6c573;
  --ok: #5fd193; --ok-soft: rgba(95, 209, 147, .12); --warn: #eab454; --warn-soft: rgba(234, 180, 84, .12);
  --bad: #f2968c; --bad-soft: rgba(242, 150, 140, .12);
  --lv1: #c8cdd6; --lv2: #b9a8f7; --lv3: #ebc865;
  --sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="dark"] .abajo { background: rgba(24, 21, 15, .97); }
@media (max-width: 899px) { :root[data-theme="dark"] .topbar { background: rgba(15, 13, 10, .94); } }
:root[data-theme="dark"] .foto { background: linear-gradient(160deg, #2a2418, #18150f); }
:root[data-theme="dark"] .tarjeta { background: linear-gradient(135deg, #1d1912 30%, color-mix(in srgb, var(--tono, #c9a227) 22%, #18150f)); }
:root[data-theme="dark"] .tarjeta .nivel, :root[data-theme="dark"] .corona-t { filter: brightness(1.5); }
:root[data-theme="dark"] .abajo .centro .ic { border-color: #18150f; }
:root[data-theme="dark"] .bienvenida { background: rgba(0, 0, 0, .65); }
.tema-celu { position: absolute; right: 8px; top: 12px; }
.topbar { position: relative; }

/* ===== Entregar: botones grandes, confirmación y aviso a pantalla completa ===== */
.botones-entrega { display: grid; gap: 10px; flex: none; }
.btn.entregar { min-height: 50px; padding: 0 18px; font-size: 16px; border-radius: 14px; }
.btn.entregar.confirmar { background: var(--ok); border-color: var(--ok); color: #06210f; animation: pulso 1s ease-in-out infinite; }
@keyframes pulso { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .btn.entregar.confirmar { animation: none; } }
.ben .t .invitado { margin-top: 6px; min-height: 40px; font-size: 14px; padding: 8px 10px; }
.resultado { position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; color: #fff; cursor: pointer; }
.resultado.si { background: #138a4a; } .resultado.no { background: #b3261e; }
.resultado strong { font: 700 40px var(--f-s); } .resultado span { font-size: 19px; max-width: 420px; }
.res-ic { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.item.anulada { opacity: .6; } .item.anulada strong { text-decoration: line-through; }
select.puesto { margin-top: 6px; min-height: 36px; padding: 4px 8px; font-size: 13px; width: auto; max-width: 100%; }
.olvide summary, .zona-peligro summary { cursor: pointer; color: var(--oro); font-weight: 600; font-size: 14px; padding: 8px 0; }
.olvide[open] { display: grid; gap: 10px; } .olvide form { margin-top: 6px; }
.zona-peligro { border-top: 1px solid var(--line); padding-top: 8px; } .zona-peligro summary { color: var(--bad); }
.zona-peligro[open] { display: grid; gap: 10px; }
.estado-txt, .ben .t span { font-size: 14px; }

.dias { display: flex; flex-wrap: wrap; gap: 6px; }
.dia { position: relative; } .dia input { position: absolute; opacity: 0; inset: 0; min-height: 0; }
.dia span { display: grid; place-items: center; min-width: 52px; min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line2); background: var(--s1); color: var(--muted); font-weight: 600; cursor: pointer; }
.dia input:checked + span { background: var(--cta-soft); border-color: var(--cta); color: var(--fg); }
.dia input:focus-visible + span { outline: 2px solid var(--oro); }
