/* ============ Variables (valores iniciales; se sobrescriben con los colores del evento guardados en la base de datos) ============ */
:root {
  --primary: #1A8C94;
  --primary-text: #fff;
  --accent: #E3A857;
  --bg: #1A110B;
  --surface: #2C1E14;
  --text: #F6EEE2;
  --muted: #BCA78D;
  --radius: 16px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --teal-light: #5FC9C6;   /* aciertos, "en directo" */
  --coral: #E8907C;        /* fallos */
  --line: rgba(227, 168, 87, .16);   /* filo de latón de las tarjetas */
  /* azulejo de escamas de la barra del restaurante */
  --sz: 34px;
  --scales:
    linear-gradient(170deg, rgba(255,255,255,.16), transparent 45%, rgba(0,0,0,.3)),
    radial-gradient(circle at 50% 0, #49B3B5 0, #1E7C86 calc(var(--sz)*.30), #17556A calc(var(--sz)*.44), #0C2533 calc(var(--sz)*.47), #0C2533 calc(var(--sz)*.5), transparent calc(var(--sz)*.5 + .5px)) 0 calc(var(--sz)*.5)/var(--sz) var(--sz),
    radial-gradient(circle at 50% 0, #6C86C6 0, #34539A calc(var(--sz)*.30), #243B70 calc(var(--sz)*.44), #0C2533 calc(var(--sz)*.47), #0C2533 calc(var(--sz)*.5), transparent calc(var(--sz)*.5 + .5px)) calc(var(--sz)*.5) 0/var(--sz) var(--sz),
    #0C2533;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(255, 190, 110, .30), transparent 70%),        /* luz cálida de la moldura */
    radial-gradient(ellipse 60% 40% at 100% 105%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%), /* reflejo turquesa */
    repeating-linear-gradient(90deg, rgba(255, 220, 170, .028) 0 1px, transparent 1px 3px, rgba(0, 0, 0, .05) 3px 4px, transparent 4px 56px), /* listones de madera */
    linear-gradient(180deg, #24170F 0%, var(--bg) 55%, #110A06 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0 0 .4em; line-height: 1.15; font-weight: 800; }
p { margin: .4em 0; }
.muted { color: var(--muted); }
.err { color: var(--coral); font-size: .9em; min-height: 1.2em; }
.center { display: grid; place-items: center; text-align: center; min-height: 60vh; padding: 24px; }
.center-text { text-align: center; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--accent); font-size: .85em; margin: 0 0 .3em; }
.pill { display: inline-block; padding: .35em .9em; border-radius: 999px; background: rgba(255,255,255,.1); font-weight: 600; font-size: .9em; }
.card { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }

.btn { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .75em 1.5em; cursor: pointer; color: var(--text); background: rgba(255,255,255,.12); transition: transform .1s, filter .2s; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: var(--primary-text); }
.btn.ghost { background: rgba(255,255,255,.08); padding: .6em .9em; }
.btn.big { font-size: 1.2rem; padding: .9em 1.5em; width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.btn kbd { font: inherit; font-size: .7em; opacity: .7; border: 1px solid currentColor; border-radius: 6px; padding: 0 .4em; margin-left: .5em; }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: .8em; cursor: pointer; text-decoration: underline; padding: 0; }

input { font: inherit; font-size: 1.1rem; width: 100%; padding: .9em 1em; border-radius: 14px; border: 2px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25); color: var(--text); outline: none; }
input:focus { border-color: var(--primary); }

.snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* ======================= PANTALLA PRESENTADOR ======================= */
body.host { overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; height: 100vh; font-size: clamp(14px, 1.15vw, 26px); }
body.host > *:not(.snow, .garland, .shooting-star, .santa-peek, .ballfx) { position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; gap: 1em; padding: 1em 2em; }
.topbar .logo { height: 2.6em; max-width: 12em; object-fit: contain; }
.topbar .event-title { font-weight: 600; color: var(--muted); flex: 1; }
#stage { padding: 0 3em; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.title { font-size: 3.4em; }
.lead { font-size: 1.3em; }

#controls { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .8em 2em 1.2em; opacity: .35; transition: opacity .3s; }
#controls:hover, #controls:focus-within { opacity: 1; }
.ctl-left, .ctl-right { flex: 1; display: flex; gap: .5em; align-items: center; }
.ctl-right { justify-content: flex-end; }
.mode { font-size: .75em; font-weight: 600; color: var(--muted); }
.mode.demo { color: var(--accent); }
.mode.server { color: var(--teal-light); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; bottom: 120%; right: 0; background: var(--surface); border-radius: 14px; padding: 6px; min-width: 20em; box-shadow: 0 10px 40px rgba(0,0,0,.5); display: grid; }
.menu-pop button { font: inherit; font-size: .85em; text-align: left; background: none; border: 0; color: var(--text); padding: .7em 1em; border-radius: 10px; cursor: pointer; }
.menu-pop button:hover { background: rgba(255,255,255,.08); }
.menu-pop .danger { color: var(--coral); }

.login { width: min(420px, 90vw); margin: auto; display: grid; gap: 12px; font-size: 16px; }

/* Sala de espera */
.lobby { display: grid; grid-template-columns: auto 1fr; gap: 4em; align-items: center; }
.qr-wrap { background: #fff; padding: 1.2em; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
#qr img, #qr canvas { display: block; width: min(34vh, 26vw) !important; height: auto !important; }
.url { margin-top: .8em; text-align: center; font-weight: 600; font-size: 1.15em; word-break: break-all; max-width: min(34vh, 26vw); margin-inline: auto; }
.big-count { display: flex; align-items: baseline; gap: .4em; margin: .6em 0; }
.big-count span { font-size: 5em; font-weight: 800; color: var(--accent); line-height: 1; }
.big-count small { font-size: 1.4em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5em; max-height: 30vh; overflow: hidden; }
.chip { background: rgba(255,255,255,.1); padding: .35em .9em; border-radius: 999px; font-weight: 600; animation: pop .4s ease-out; }
.chip.more { background: var(--primary); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* Pregunta */
.question { display: flex; flex-direction: column; gap: 1.2em; position: relative; }
.q-meta { display: flex; justify-content: space-between; }
.q-main { display: flex; align-items: center; gap: 1.2em; }
.q-text { font-size: 2.8em; margin: 0; flex: 1; }
.reveal .q-text { font-size: 2.2em; }
.q-img { max-height: 28vh; max-width: 60%; border-radius: var(--radius); align-self: center; }
.timer { flex: none; width: 4.4em; height: 4.4em; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-text); font-size: 1.6em; font-weight: 800; box-shadow: 0 0 0 .25em rgba(255,255,255,.12); }
.timer.hurry { animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.1); } }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.opts.n2 { grid-template-columns: 1fr 1fr; }
.opt { position: relative; overflow: hidden; display: flex; align-items: center; gap: .8em; background: var(--c); border-radius: var(--radius); padding: 1.1em 1.4em; font-size: 1.6em; font-weight: 600; min-height: 3.4em; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.opt .ico { font-size: 1.2em; }
.opt .otext { flex: 1; position: relative; z-index: 1; }
.opt.dim { opacity: .35; filter: grayscale(.4); }
.opt.correct { outline: .18em solid #fff; transform: scale(1.02); }
.opt.correct::after { content: '✔'; position: relative; z-index: 1; font-size: 1.1em; }
.opt .cnt { font-weight: 800; position: relative; z-index: 1; }
.opt .obar { position: absolute; left: 0; bottom: 0; height: .35em; width: calc(var(--p) * 100%); background: rgba(255,255,255,.7); transition: width .8s; }
.tbar { height: .6em; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.tbar > div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .1s linear; }
.banner { position: absolute; inset: 35% 10% auto; text-align: center; font-size: 3em; font-weight: 800; background: var(--surface); border-radius: var(--radius); padding: .6em; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: pop .3s; }
.note { font-size: 1.3em; background: rgba(255,255,255,.08); border-radius: var(--radius); padding: .7em 1.1em; margin: 0; }

/* Clasificación */
.board { max-width: 60em; width: 100%; margin: 0 auto; }
.rows { list-style: none; padding: 0; margin: 0; display: grid; gap: .45em; }
.rows li { display: grid; grid-template-columns: 2.6em 1fr auto 5em; align-items: center; gap: 1em; background: var(--surface); padding: .55em 1.1em; border-radius: 14px; font-size: 1.3em; animation: slidein .5s both; animation-delay: var(--d); }
.rows .rk { font-weight: 800; color: var(--muted); text-align: center; }
.rows .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .gain { color: var(--teal-light); font-weight: 600; font-size: .8em; }
.rows .sc { font-weight: 800; text-align: right; }
.rows .top1 { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 45%, var(--surface)), var(--surface)); }
.rows .top1 .rk, .rows .top2 .rk, .rows .top3 .rk { color: var(--accent); }
@keyframes slidein { from { opacity: 0; transform: translateX(-40px); } }

/* Pódium */
.podium-wrap { text-align: center; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1.2em; margin-top: 1em; }
.step { width: 15em; display: flex; flex-direction: column; animation: rise .9s both; animation-delay: var(--d); }
.step .block { background: var(--surface); border-radius: 16px 16px 0 0; font-size: 3.5em; font-weight: 800; display: grid; place-items: center; color: var(--muted); }
.step.p1 .block { height: 34vh; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--surface))); color: #3a2a00; }
.step.p2 .block { height: 24vh; }
.step.p3 .block { height: 17vh; }
.who { padding-bottom: .6em; }
.medal { font-size: 3em; }
.pname { font-size: 1.6em; font-weight: 800; }
.pscore { color: var(--muted); font-weight: 600; }
.runners { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em 1.4em; margin-top: 1.4em; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(80px); } }

/* Sorteo */
.raffle { text-align: center; }
.drum { margin: 1em auto 1.6em; min-height: 3.4em; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface); border-radius: 24px; padding: .8em 2em; max-width: 40em; font-size: 2em; box-shadow: inset 0 0 0 3px rgba(255,255,255,.08); }
.drum .spin { font-weight: 800; font-size: 1.3em; opacity: .85; }
.drum .winner { font-weight: 800; font-size: 1.6em; color: var(--accent); animation: pop .5s; }
.drum .for { font-size: .6em; color: var(--muted); }
.prizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); gap: 1em; }
.prize { background: var(--surface); border-radius: var(--radius); padding: 1em; border: 3px solid transparent; }
.prize.active { border-color: var(--accent); animation: pulse .6s infinite alternate; }
.prize.won { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.prize .pn { color: var(--muted); font-size: .8em; text-transform: uppercase; letter-spacing: .1em; }
.prize .pt { font-weight: 800; font-size: 1.2em; margin: .2em 0 .4em; }
.prize .pw { font-weight: 600; color: var(--accent); min-height: 1.4em; }

/* ========================== MÓVIL JUGADOR ========================== */
body.player { min-height: 100dvh; display: flex; flex-direction: column; }
.ptop { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.ptop .logo { height: 30px; max-width: 140px; object-fit: contain; }
.pname-top { font-weight: 600; color: var(--muted); font-size: .9em; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app { flex: 1; display: flex; padding: 0 16px 24px; }
.pscreen { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; max-width: 520px; margin: 0 auto; width: 100%; animation: fadein .35s; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } }
.pscreen h1 { font-size: 1.7rem; }
.emoji { font-size: 4rem; line-height: 1; }
.emoji.huge { font-size: 6rem; }
.emoji.shake { animation: shake .3s infinite; }
@keyframes shake { 50% { transform: rotate(-10deg) scale(1.05); } }
.hint { background: rgba(255,255,255,.08); padding: 10px 14px; border-radius: 12px; font-size: .9em; }
.logo-big { max-height: 96px; max-width: 70%; object-fit: contain; margin-bottom: 8px; }
.joinf { width: 100%; display: grid; gap: 12px; margin-top: 12px; }
.joinf .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pscreen.pq { justify-content: flex-start; gap: 14px; }
.pq-top { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.ptimer { font-weight: 800; font-size: 1.3rem; color: var(--accent); }
.pq-text { font-size: 1.35rem; text-align: left; width: 100%; }
.pbtns { display: grid; gap: 12px; width: 100%; flex: 1; grid-auto-rows: 1fr; }
.pbtn { font: inherit; font-weight: 600; font-size: 1.15rem; color: #fff; background: var(--c); border: 0; border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-align: left; min-height: 72px; box-shadow: 0 5px 0 rgba(0,0,0,.25); cursor: pointer; transition: transform .08s, opacity .2s; }
.pbtn .ico { font-size: 1.6rem; }
.pbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.pbtn:disabled { opacity: .35; }
.pbtn.picked { opacity: 1; outline: 3px solid #fff; }
.tbar.small { width: 100%; height: 8px; }

.chosen { background: var(--c, rgba(255,255,255,.1)); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 1.1rem; }
.pscreen.ok h1 { color: var(--teal-light); }
.pscreen.ko h1 { color: var(--coral); }
.gainbig { font-size: 3rem; font-weight: 800; color: var(--accent); }
.pos { display: flex; gap: 12px; width: 100%; margin-top: 8px; }
.pos > div { flex: 1; background: var(--surface); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; }
.pos .big { font-size: 2rem; font-weight: 800; }
.pos small { color: var(--muted); }
.prizebig { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.win h1 { font-size: 2.2rem; }
.wlist { list-style: none; padding: 0; margin: 16px 0 0; width: 100%; display: grid; gap: 8px; }
.wlist li { background: var(--surface); border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; text-align: left; font-size: .9em; }
.wlist b { color: var(--accent); }

@media (max-width: 900px) {
  body.host { overflow: auto; height: auto; min-height: 100vh; font-size: 14px; }
  .lobby { grid-template-columns: 1fr; gap: 1.5em; }
  #qr img, #qr canvas { width: 70vw !important; }
  .url { max-width: 70vw; }
  .opts { grid-template-columns: 1fr; }
  #stage { padding: 0 16px; }
}

/* Logo grande en la sala de espera y sin duplicar en el alta del móvil */
.lobby-logo { display: block; height: 5.5em; width: auto; margin-bottom: 1.2em; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
body.player:has(.join) .ptop .logo { visibility: hidden; }
body.host .topbar .logo { visibility: hidden; }
body.host:not(:has(.lobby)) .topbar .logo { visibility: visible; }

/* Acceso con Google */
.btn.gbtn { background: #fff; color: #1f1f1f; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.btn.gbtn:disabled { opacity: .7; }
.account { background: var(--surface); border-radius: 14px; padding: 12px 18px; display: grid; gap: 2px; width: 100%; }
.account span { color: var(--muted); font-size: .9em; word-break: break-all; }
.demo-tag { font-size: .75em; font-weight: 600; color: var(--accent); letter-spacing: .08em; margin: 0; }
.small { font-size: .85em; }

/* Sorteo */
.drum .wmail { font-size: .55em; color: var(--muted); }
.raffle-note { margin-top: 1.2em; font-size: .85em; }

/* ===== Quiz a tu ritmo: ranking en directo (pantalla grande) ===== */
.live { display: grid; grid-template-columns: auto 1fr; gap: 3em; align-items: start; }
.live-side { display: flex; flex-direction: column; align-items: center; gap: .6em; }
.qr-wrap.small { padding: .8em; border-radius: 18px; }
.qr-wrap.small #qr img, .qr-wrap.small #qr canvas { width: min(22vh, 16vw) !important; }
.live-side .url { max-width: min(22vh, 16vw); font-size: .9em; }
.stats { display: grid; gap: .6em; width: 100%; margin-top: .6em; }
.stats div { background: var(--surface); border-radius: 14px; padding: .6em 1em; display: flex; align-items: baseline; gap: .5em; }
.stats b { font-size: 1.8em; color: var(--accent); }
.stats span { color: var(--muted); }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--teal-light); margin-right: .3em; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.waiting { font-size: 1.4em; margin-top: 2em; }
.rows li { grid-template-columns: 2.6em 1fr auto 4.6em; }
.rows .tm { color: var(--muted); font-size: .8em; font-variant-numeric: tabular-nums; }
.rows .sc small { font-size: .6em; color: var(--muted); font-weight: 600; }
.rows .playing { font-style: normal; font-size: .65em; color: var(--accent); font-weight: 600; margin-left: .4em; }
.rows li.me { outline: 2px solid var(--accent); }

/* ===== Móvil ===== */
.okline { color: var(--teal-light); font-weight: 600; }
.rules { text-align: left; background: var(--surface); border-radius: 16px; padding: 14px 18px 14px 34px; margin: 6px 0 10px; display: grid; gap: 6px; width: 100%; }
.ptimer.hurry { color: var(--coral); animation: pulse .5s infinite alternate; }
.pq-img { max-width: 100%; max-height: 28vh; border-radius: 14px; }
.pos > div { padding: 12px 8px; }
.pos .big { font-size: 1.6rem; }
.pos .big small { font-size: .6em; color: var(--muted); }
.pscreen.list { justify-content: flex-start; padding-top: 8px; }
.pscreen.list .rows { width: 100%; }
.pscreen.list .rows li { font-size: .95rem; grid-template-columns: 1.6em 1fr auto 4.9em; gap: .5em; padding: .55em .8em; }
.rows .sc { white-space: nowrap; }
.pscreen .note { width: 100%; text-align: left; }
.tapnext { cursor: pointer; }
h2.sub { font-size: 1.1rem; margin: 14px 0 0; color: var(--muted); }
.wlist li.me { outline: 2px solid var(--accent); }

@media (max-width: 900px) {
  .live { grid-template-columns: 1fr; }
}
/* El ranking en directo se redibuja a menudo: sin animación de entrada para que no parpadee */
.live .rows li, .pscreen.list .rows li { animation: none; }
.pscreen .rows { text-align: left; }

/* ========================= PANEL DE ADMINISTRACIÓN ========================= */
body.admin { font-size: 15px; min-height: 100vh; }
.admin-top { flex-wrap: wrap; gap: .6em 1.4em; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-top .logo { height: 34px; }
.admin-nav { display: flex; gap: 1em; flex-wrap: wrap; }
.admin-nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .9em; background: rgba(255,255,255,.08); padding: .45em .9em; border-radius: 999px; }
.admin-nav a:hover { background: rgba(255,255,255,.16); }
.who { display: flex; align-items: center; gap: .6em; font-size: .9em; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; display: grid; gap: 20px; }
.admin-main .login { margin-top: 8vh; }
.readonly { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-radius: 12px; padding: 10px 16px; margin: 0; }
.panel { padding: 22px; }
.panel h2 { font-size: 1.25rem; margin-bottom: .3em; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; }
.stat b { font-size: 1.5rem; color: var(--accent); }
.stat span { color: var(--muted); font-size: .85em; }
.domain-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.dchip { background: rgba(255,255,255,.1); border-radius: 999px; padding: 6px 8px 6px 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.dchip button { background: rgba(255,255,255,.15); border: 0; color: var(--text); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.dchip button:hover { background: var(--primary); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.inline-form input { flex: 1 1 220px; width: auto; font-size: 1rem; padding: .6em .9em; }
.inline-form .btn { padding: .6em 1.2em; }
select { font: inherit; background: rgba(0,0,0,.25); color: var(--text); border: 2px solid rgba(255,255,255,.15); border-radius: 10px; padding: .45em .6em; }
select option { background: var(--surface); }
.role-help { list-style: none; padding: 0; margin: 10px 0 6px; display: grid; gap: 6px; font-size: .9em; color: var(--muted); }
.role-badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .25em .7em; border-radius: 999px; margin-right: .4em; color: #fff; white-space: nowrap; }
.role-badge.admin { background: var(--primary); }
.role-badge.reviewer { background: #3E63DD; }
.role-badge.participant { background: rgba(255,255,255,.15); }
.table-tools { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }
.table-tools input { flex: 1 1 260px; width: auto; font-size: 1rem; padding: .6em .9em; }
.table-wrap { overflow-x: auto; border-radius: 12px; }
table.users { width: 100%; border-collapse: collapse; font-size: .9em; min-width: 760px; }
.users th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
.users td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: middle; }
.users tr.excluded td { opacity: .6; }
.warn { color: var(--accent); font-size: .8em; font-weight: 600; }
.link.danger { color: var(--coral); }
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.switch input { width: auto; accent-color: var(--primary); transform: scale(1.2); }
.host .viewonly { font-size: .75em; color: var(--accent); font-weight: 600; }
.ctl-left a { color: var(--muted); font-size: .75em; margin-left: 1em; }

/* ============================ NAVIDAD ANIMADA ============================ */
/* Guirnalda de luces */
.garland { position: fixed; top: 0; left: 0; right: 0; height: 0; z-index: 5; pointer-events: none; }
.garland svg { position: absolute; top: 0; left: 0; overflow: visible; }
.bulb { position: absolute; width: 9px; height: 14px; margin-left: -4.5px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: radial-gradient(circle at 40% 35%, #fff 0 12%, var(--c) 45%); box-shadow: 0 0 10px 2px var(--c);
  animation: twinkle 2s ease-in-out infinite alternate; transform-origin: 50% -3px; }
.bulb::before { content: ''; position: absolute; top: -4px; left: 2px; width: 5px; height: 5px; border-radius: 1px; background: #8A6A3E; }
body.host .bulb { width: 12px; height: 18px; margin-left: -6px; }
body.host .bulb::before { left: 3px; width: 6px; }
@keyframes twinkle {
  0%, 40% { opacity: 1; filter: brightness(1.15); }
  100% { opacity: .35; box-shadow: 0 0 3px 0 var(--c); filter: brightness(.8); }
}
body.host.has-garland .topbar { padding-top: 2.6em; }
body.player.has-garland .ptop { padding-top: max(30px, env(safe-area-inset-top)); }
body.admin.has-garland .admin-top { padding-top: 34px; }

/* Estrella fugaz y Papá Noel que se asoma (pantalla grande) */
.shooting-star { position: fixed; left: 0; z-index: 2; pointer-events: none; animation: shoot 2.8s cubic-bezier(.3,.1,.6,1) forwards; }
.shooting-star span { display: block; font-size: 2.2em; filter: drop-shadow(0 0 10px #ffe27a); }
.shooting-star::before { content: ''; position: absolute; top: 50%; right: 70%; width: 14em; height: 3px; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,226,122,.9)); border-radius: 3px; }
.shooting-star[style*="--dir: -1"]::before, .shooting-star[style*="--dir:-1"]::before { right: auto; left: 70%; background: linear-gradient(-90deg, transparent, rgba(255,226,122,.9)); }
@keyframes shoot {
  from { transform: translate(calc(var(--dir) * -10vw + (1 - var(--dir)) * 55vw), 0); opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  to { transform: translate(calc(var(--dir) * 110vw + (1 - var(--dir)) * 0vw), 16vh); opacity: 0; }
}
.santa-peek { position: fixed; bottom: -14px; line-height: 1; z-index: 2; pointer-events: none; font-size: clamp(60px, 7vw, 130px); animation: peek 5s ease-in-out forwards; }
.santa-peek.left { left: 2.5vw; }
.santa-peek.right { right: 2.5vw; }
.santa-peek .santa { display: block; animation: wave 1s ease-in-out .9s 3; transform-origin: 50% 90%; }
.santa-peek .hoho { position: absolute; bottom: 95%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .22em; font-weight: 800;
  background: #fff; color: #A4161A; padding: .3em .8em; border-radius: 999px; opacity: 0; animation: hoho 5s ease forwards; }
@keyframes peek { 0% { transform: translateY(110%); } 18%, 78% { transform: translateY(0); } 100% { transform: translateY(110%); } }
@keyframes wave { 50% { transform: rotate(-12deg); } }
@keyframes hoho { 0%, 22% { opacity: 0; transform: translate(-50%, 10px); } 30%, 70% { opacity: 1; transform: translate(-50%, 0); } 80%, 100% { opacity: 0; } }

/* Botón principal con destello */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-120%); animation: sheen 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Sala de espera: QR con marco de azulejo de escamas, título dorado, contador que salta */
.lobby .qr-wrap, .live .qr-wrap { position: relative; }
.lobby .qr-wrap::before, .live .qr-wrap::before { content: ''; position: absolute; inset: -.55em; border-radius: 30px; z-index: -1;
  background: var(--scales); box-shadow: 0 0 0 3px #C9964A, 0 18px 50px rgba(0,0,0,.5); }
.live .qr-wrap::before { inset: -.4em; border-radius: 22px; }
.lobby .title, .gold, .shimmer {
  background: linear-gradient(100deg, #fff 0%, #fff 40%, #ffe9a8 48%, var(--accent) 52%, #fff 60%, #fff 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: goldsweep 5s ease-in-out infinite; }
@keyframes goldsweep { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
.bump { display: inline-block; animation: bump .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes bump { 40% { transform: scale(1.35); color: #fff; } }
.chip { animation: none; }
.chip.new { animation: chipin .7s cubic-bezier(.3,1.6,.5,1); }
.chip.new::before { content: '🎁 '; }
@keyframes chipin { from { transform: translateY(-40px) scale(.5) rotate(-10deg); opacity: 0; } }
.lobby-logo { animation: floaty 4s ease-in-out infinite; }

/* Pódium: medallas que se balancean y foco sobre el primero */
.podium .medal { display: inline-block; animation: swing 2.4s ease-in-out infinite; transform-origin: 50% 0; }
.step.p1 { position: relative; }
.step.p1::before { content: ''; position: absolute; left: 50%; bottom: 20%; width: 30em; height: 30em; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 20deg, rgba(255,226,122,.16) 20deg 30deg, transparent 30deg 70deg, rgba(255,226,122,.12) 70deg 80deg, transparent 80deg 120deg,
    rgba(255,226,122,.16) 120deg 130deg, transparent 130deg 180deg, rgba(255,226,122,.12) 180deg 190deg, transparent 190deg 240deg, rgba(255,226,122,.16) 240deg 250deg, transparent 250deg 300deg, rgba(255,226,122,.12) 300deg 310deg, transparent 310deg);
  border-radius: 50%; animation: rays 18s linear infinite; -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%); }
@keyframes rays { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes swing { 50% { transform: rotate(-10deg); } 0%, 100% { transform: rotate(10deg); } }

/* Sorteo: regalos que tiemblan mientras gira el bombo y ganador dorado */
.drum-wrap { display: flex; align-items: center; justify-content: center; gap: 1.2em; }
.drum-wrap .drum { flex: 1; margin-inline: 0; }
.drum-wrap .gift { font-size: 3.2em; animation: floaty 3s ease-in-out infinite; }
.drum-wrap .g2 { animation-delay: -1.5s; }
.drum-wrap.drawing .gift { animation: jiggle .25s ease-in-out infinite; }
.drum-wrap.drawing .drum { box-shadow: 0 0 0 3px var(--accent), 0 0 40px color-mix(in srgb, var(--accent) 50%, transparent); animation: glow .6s ease-in-out infinite alternate; }
.drum .spin { animation: flick .1s linear infinite alternate; }
.drum .winner { display: inline-block; animation: winner .9s cubic-bezier(.3,1.6,.5,1); text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 70%, transparent); }
@keyframes jiggle { 25% { transform: rotate(-12deg) translateY(-4px); } 75% { transform: rotate(12deg) translateY(-4px); } }
@keyframes glow { to { box-shadow: 0 0 0 3px var(--accent), 0 0 70px color-mix(in srgb, var(--accent) 80%, transparent); } }
@keyframes flick { to { opacity: .55; } }
@keyframes winner { from { transform: scale(.2) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.15) rotate(2deg); } }
.prize.won .pw { animation: pop .5s; }

/* Móvil: botones que caen como adornos y emojis con vida */
.pbtn { animation: drop .45s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.pbtn .ico { display: inline-block; animation: wiggle 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.6s); }
@keyframes drop { from { transform: translateY(-30px) scale(.9); opacity: 0; } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }
.emoji { display: inline-block; }
.emoji.float { animation: floaty 3s ease-in-out infinite; }
.emoji.tree { animation: swing 3s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 0 14px rgba(255,226,122,.45)); }
.emoji.boing { animation: boing .8s cubic-bezier(.3,1.8,.5,1); }
.emoji.nope { animation: nope .5s ease-in-out; }
.emoji.swing { animation: swing 2.4s ease-in-out infinite; transform-origin: 50% 0; }
.emoji.gift-open { animation: giftopen 1.2s cubic-bezier(.3,1.6,.5,1), floaty 3s ease-in-out 1.2s infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes boing { from { transform: scale(.2); } 60% { transform: scale(1.25); } }
@keyframes nope { 20%, 60% { transform: translateX(-10px) rotate(-6deg); } 40%, 80% { transform: translateX(10px) rotate(6deg); } }
@keyframes giftopen { 0% { transform: scale(.3) rotate(-20deg); } 30% { transform: scale(1.3) rotate(10deg); } 45% { transform: scale(1.1) rotate(-8deg); } }

/* Quien prefiere menos movimiento (ajuste del sistema): todo quieto */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* .who también se usa en la cabecera de administración: en el pódium va en bloque */
.podium .who { display: block; font-size: inherit; }

/* ======================= QUIZ EN DIRECTO (presentador) ======================= */
.live-q { gap: 1.1em; }
.answered-pill { background: rgba(255,255,255,.1); border-radius: 999px; padding: .35em 1em; font-weight: 600; }
.answered-pill b { color: var(--accent); display: inline-block; }
.opts .opt { animation: drop .5s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--i, 0) * 120ms); }
.mini-qr { position: fixed; right: 1.4em; bottom: 4.2em; display: flex; flex-direction: column; align-items: center; gap: .3em; background: rgba(0,0,0,.25); padding: .5em; border-radius: 14px; font-size: .7em; color: var(--muted); }
.mini-qr #qr { background: #fff; padding: 6px; border-radius: 8px; }
.mini-qr #qr img, .mini-qr #qr canvas { width: 6.5em !important; height: auto !important; display: block; }

/* Barras de porcentaje dentro de cada respuesta */
.opt.barred { overflow: hidden; background: color-mix(in srgb, var(--c) 30%, var(--surface)); }
.opt.barred .obar-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); background: var(--c); transform-origin: left; animation: grow 1.2s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 150ms); }
.opt.barred .ico, .opt.barred .otext, .opt.barred .cnt { position: relative; z-index: 1; }
.opt.barred .cnt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.opt.barred .cnt b { font-size: 1.25em; }
.opt.barred .cnt small { font-size: .55em; opacity: .8; font-weight: 600; }
.opt.barred.correct { outline: .2em solid #fff; transform: scale(1.03); box-shadow: 0 0 40px color-mix(in srgb, var(--c) 70%, transparent); transition: transform .4s; }
.opt.barred.correct::after { content: '✔'; position: relative; z-index: 1; font-size: 1.2em; }
.opt.barred.dim { opacity: .35; filter: grayscale(.5); transition: opacity .6s, filter .6s; }
@keyframes grow { from { transform: scaleX(0); } }
.suspense { text-align: center; font-size: 1.6em; font-weight: 600; color: var(--muted); animation: floaty 2.5s ease-in-out infinite; margin-top: .4em; }
.hits { display: flex; align-items: baseline; justify-content: center; gap: .6em; font-size: 1.5em; font-weight: 600; margin-top: .3em; animation: winner .8s cubic-bezier(.3,1.6,.5,1) both; animation-delay: .4s; }
.hits-big { font-size: 2em; font-weight: 800; color: var(--teal-light); }
.hits-pct { font-size: 1.6em; font-weight: 800; color: var(--accent); background: rgba(255,255,255,.08); border-radius: 14px; padding: 0 .4em; }
.reveal .note { text-align: center; }

/* Clasificación con puntos */
.rows li, .live .rows li { grid-template-columns: 2.6em 1fr auto 6.5em; }
.rows .sc small { font-size: .55em; color: var(--muted); font-weight: 600; }
.rows.still li { animation: none; }
ol.runners { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16em, 1fr)); gap: .5em 1.4em; max-width: 60em; margin: 1.6em auto 0; text-align: left; }
ol.runners li { background: var(--surface); border-radius: 12px; padding: .5em 1em; display: flex; gap: .6em; align-items: baseline; animation: slidein .5s both; animation-delay: var(--d); color: var(--text); }
ol.runners li b { color: var(--accent); }
ol.runners li span { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .9em; }

/* ======================= QUIZ EN DIRECTO (móvil) ======================= */
.pbars { display: grid; gap: 8px; width: 100%; }
.pbar { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; text-align: left; border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--c) 28%, var(--surface)); font-weight: 600; }
.pbar .pfill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); background: var(--c); animation: grow 1s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.pbar > :not(.pfill) { position: relative; z-index: 1; }
.pbar .ptxt { flex: 1; }
.pbar .you { font-style: normal; font-size: .7em; background: #fff; color: #111; border-radius: 999px; padding: 1px 8px; }
.pbar.mine { outline: 2px solid rgba(255,255,255,.8); }
.pbar.good { outline: 3px solid #fff; }
.pbar.good .ptxt::after { content: ' ✔'; }
.pbar.bad { opacity: .45; }
.chosen { display: flex; align-items: center; gap: 10px; color: #fff; }
.pscreen .pos { justify-content: center; }

/* Administración: importar empleados */
.importer { margin: 12px 0; }
.importer summary { list-style: none; display: inline-block; }
.importer summary::-webkit-details-marker { display: none; }
.importer textarea { display: block; width: 100%; margin: 8px 0; font: inherit; font-size: .95rem; padding: .7em .9em; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25); color: var(--text); resize: vertical; }
.importer .inline-form { align-items: center; }
.importer input[type=file] { flex: 1 1 220px; font-size: .85rem; padding: .4em; border: 0; background: none; }

/* ===== Rótulo elegante de la sala de espera (serif clásica, blanco y dorado) ===== */
.lobby-info { min-width: 0; }
.headline { font-variant-numeric: lining-nums; margin: .15em 0 .6em; display: flex; flex-direction: column; align-items: flex-start; gap: .12em; line-height: 1.05; font-weight: 400; }
.headline .l1 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; font-weight: 700;
  font-size: min(5.2em, 5.8vw); letter-spacing: .005em; color: #FFFDF7;
  text-shadow: 0 .04em .12em rgba(0, 0, 0, .35);
  animation: headin .9s cubic-bezier(.2,.7,.2,1) both;
}
.headline .orn { display: flex; align-items: center; gap: .6em; width: min(100%, 15em); margin: .25em 0 .1em;
  color: #F4C542; font-size: min(1.1em, 1.3vw); animation: headin .9s cubic-bezier(.2,.7,.2,1) .15s both; }
.headline .orn::before, .headline .orn::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(244,197,66,0), #F4C542 40%, #F4C542 60%, rgba(244,197,66,0)); }
.headline .l2 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 400;
  font-size: min(3em, 3.4vw); letter-spacing: .01em; color: #F4C542;
  text-shadow: 0 .04em .1em rgba(0, 0, 0, .3);
  animation: headin .9s cubic-bezier(.2,.7,.2,1) .3s both;
}
@keyframes headin { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .headline .l1 { font-size: 9vw; } .headline .l2 { font-size: 5.4vw; } .headline .orn { font-size: 2vw; } }

/* ===================== SORTEO: BOMBO CON BOLAS ===================== */
.raffle2 { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.raffle-head { text-align: center; }
.raffle-head .title { margin-bottom: .1em; }
.raffle-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.35fr 1fr; gap: 2.5em; align-items: center; }
.drum-stage { display: flex; flex-direction: column; align-items: center; min-height: 0; }
#drumcv { width: min(100%, 62vh); aspect-ratio: 1 / .93; display: block; filter: drop-shadow(0 1.2em 1.5em rgba(0,0,0,.45)); }
.drum-stage .pool { margin: .2em 0 0; color: var(--muted); font-size: 1.2em; }
.drum-stage .pool b { color: var(--accent); font-size: 1.3em; }
.prizes.v { grid-template-columns: 1fr; gap: .7em; }
.prizes.v .prize { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1em; align-items: center; text-align: left; padding: .8em 1.2em; }
.prizes.v .prize .pn { grid-row: span 2; font-size: 1.6em; font-weight: 800; color: var(--accent); letter-spacing: 0; text-transform: none; }
.prizes.v .prize .pn::first-letter { text-transform: uppercase; }
.prizes.v .prize .pt { margin: 0; font-size: 1.15em; }
.prizes.v .prize .pw { min-height: 0; }

/* Bola que sale del bombo y se abre */
.ballfx { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.ballfx::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(40,26,16,.6), rgba(14,9,5,.88)); opacity: 0; transition: opacity .6s; }
.ballfx.opened::before { opacity: 1; }
.xball { position: absolute; width: var(--D); height: var(--D); border-radius: 50%; filter: drop-shadow(0 1.5em 2em rgba(0,0,0,.5)); }
.xball .half { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 6%, var(--ball) 28%, color-mix(in srgb, var(--ball) 55%, #000) 100%);
  transition: transform .8s cubic-bezier(.3,1.4,.5,1), opacity .6s .5s; }
.xball .half.top { clip-path: inset(0 0 50% 0); }
.xball .half.bot { clip-path: inset(50% 0 0 0); }
.xball .half::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% - .35em); height: .7em; background: rgba(0,0,0,.18); }
.ballfx.opened .xball .half.top { transform: translateY(-65%) rotate(-28deg); opacity: 0; }
.ballfx.opened .xball .half.bot { transform: translateY(65%) rotate(22deg); opacity: 0; }

.wcard { position: relative; z-index: 1; font-size: 1.35em; background: #FBF5EC; color: #2C1E14; border-radius: 1.4em; padding: 1.2em 2.4em 1.4em; text-align: center; min-width: 22em; max-width: 80vw;
  box-shadow: 0 0 0 .3em #C9964A, 0 0 0 .65em #FBF5EC, 0 2em 4em rgba(0,0,0,.55), 0 0 6em rgba(227,168,87,.5);
  transform: scale(.2); opacity: 0; transition: transform .7s cubic-bezier(.3,1.6,.5,1) .15s, opacity .3s .15s; }
.ballfx.opened .wcard { transform: scale(1); opacity: 1; }
.ballfx.still .wcard, .ballfx.still::before { transition: none; }
.wcard .wprize { display: inline-block; background: var(--primary); color: #fff; font-weight: 800; border-radius: 999px; padding: .3em 1em; font-size: 1.1em; margin-bottom: .5em; }
.wcard .wname { font-family: var(--serif); font-size: 3.2em; font-weight: 700; line-height: 1.05; }
.wcard .wemail { font-size: 1.5em; font-weight: 600; color: #157780; margin-top: .25em; word-break: break-all; }
.wcard .wdept { color: #8C7457; font-weight: 600; margin-top: .2em; }
@media (max-width: 900px) { .raffle-main { grid-template-columns: 1fr; } }

/* ===================== AMBIENTE RESTAURANTE + NAVIDAD ===================== */
/* Madera cálida, filos de latón, turquesa de las sillas y azulejo de escamas */
h1, h2, .title, .pname, .q-text, .banner { font-family: var(--serif); font-weight: 700; letter-spacing: .005em; }
.q-text, .pq-text { font-weight: 600; }
.kicker { font-weight: 700; color: var(--accent); }
.big-count span, .gainbig, .timer, .stats b, .stat b, .hits-pct, .hits-big, .pos .big { font-family: var(--serif); font-variant-numeric: lining-nums; }
.gold, .shimmer, .lobby .title {
  background: linear-gradient(100deg, #F6EEE2 0%, #F6EEE2 40%, #FFE3B0 48%, var(--accent) 52%, #F6EEE2 60%, #F6EEE2 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }

/* superficies de madera con filo de latón */
.card, .rows li, .stat, .stats div, .prize, .pos > div, .wlist li, .rules, .account, ol.runners li, .menu-pop, .banner, .note {
  background: linear-gradient(180deg, #33231A, #281B12); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 220, 170, .06) inset, 0 10px 30px rgba(0, 0, 0, .28); }
.rows .top1 { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 38%, #2C1E14), #281B12); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.pill, .chip, .answered-pill, .hint, .btn, .btn.ghost, .admin-nav a, .dchip { border: 1px solid var(--line); }
.pill, .chip, .answered-pill, .hint { background: rgba(255, 220, 170, .07); }
.chip.more { background: var(--primary); }
.btn { background: rgba(255, 220, 170, .08); }
.btn.primary { background: linear-gradient(180deg, #22A2AA, #157780); border-color: rgba(255,255,255,.12); box-shadow: 0 6px 18px rgba(23, 130, 137, .35); }
input, select, .importer textarea { background: rgba(0, 0, 0, .28); border-color: rgba(227, 168, 87, .22); }
input:focus { border-color: var(--teal-light); }

/* reloj: turquesa con aro de latón */
.timer { background: radial-gradient(circle at 35% 30%, #2BB0B8, #146E76); box-shadow: 0 0 0 .18em #C9964A, 0 0 30px rgba(43, 176, 184, .35); }
.tbar { background: rgba(255, 220, 170, .08); }
.tbar > div { background: linear-gradient(90deg, var(--accent), var(--teal-light)); }

/* respuestas: brillo esmaltado como el azulejo */
.opt, .pbtn { background-image: linear-gradient(170deg, rgba(255,255,255,.14), transparent 45%, rgba(0,0,0,.18)); box-shadow: 0 6px 0 rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.08); }
.opt.correct, .opt.barred.correct, .pbtn.picked, .pbar.good { outline-color: #FFE3B0; }

/* pódium: el primero en latón, el segundo y el tercero en azulejo de escamas */
.step .block { border: 1px solid var(--line); }
.step.p1 .block { background: linear-gradient(180deg, #F2C47A, #B9822F 70%, #8A5E1E); color: #3A2508; font-family: var(--serif); }
.step.p2 .block, .step.p3 .block { background: var(--scales); color: #F6EEE2; font-family: var(--serif); text-shadow: 0 2px 8px rgba(0,0,0,.6); }

/* sorteo */
.prize.active { border-color: var(--accent); }

/* administración */
.admin-top { border-bottom-color: var(--line); }
.users th { border-bottom-color: var(--line); }
.role-badge.reviewer { background: #2F4F86; }

/* luces y Papá Noel con la paleta cálida */
.santa-peek .hoho { color: #8E2A1C; }
.shooting-star span { filter: drop-shadow(0 0 10px #FFD08A); }

/* ======================= SORTEO EN EL MÓVIL ======================= */
.pscreen.raffle-p { justify-content: flex-start; padding-top: 4px; gap: 6px; }
#pdrum { width: min(100%, 340px); aspect-ratio: 1 / .93; display: block; margin: 4px auto 0; filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); }
.rstatus { font-size: 1.05rem; margin: 0; }
.rstatus b { color: var(--accent); }
.rstatus.drawing { animation: floaty 1.6s ease-in-out infinite; }
.wl-wrap { width: 100%; }
body.player .ballfx { pointer-events: auto; cursor: pointer; }
body.player .wcard { font-size: .62rem; min-width: 0; width: 86vw; padding: 1.4em 1.6em 1.6em; }
body.player .wcard .wname { font-size: 3.4em; }
.wcard .wmine { font-family: var(--serif); font-weight: 700; font-size: 2em; color: #B9822F; margin-bottom: .3em; animation: bump .8s cubic-bezier(.3,1.8,.5,1) .9s both; }
.wcard.mine { box-shadow: 0 0 0 .3em #C9964A, 0 0 0 .65em #FBF5EC, 0 0 0 .95em var(--primary), 0 2em 4em rgba(0,0,0,.55), 0 0 8em rgba(227,168,87,.7); }
.wcard .whint { margin-top: 1em; font-size: 1.1em; color: #8C7457; }

/* ======================= ADMINISTRACIÓN: PREGUNTAS, PREMIOS Y EVENTO ======================= */
.admin-sections { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-sections a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .85em; background: var(--surface); border: 1px solid var(--line); padding: .45em .9em; border-radius: 999px; }
.admin-sections a:hover { border-color: var(--accent); }
.admin-main section[id] { scroll-margin-top: 16px; }
.admin-main label { display: flex; flex-direction: column; gap: 4px; font-size: .85em; color: var(--muted); font-weight: 600; }
.admin-main .qform input, .admin-main .qform textarea, .admin-main .eventform input:not([type=color]), .prize-list input {
  font: inherit; font-size: .95rem; padding: .55em .8em; border-radius: 10px; color: var(--text); width: 100%;
  border: 2px solid rgba(227, 168, 87, .22); background: rgba(0, 0, 0, .28); outline: none; }
.admin-main .qform textarea { resize: vertical; }
.admin-main .qform input:focus, .admin-main .qform textarea:focus, .admin-main .eventform input:focus, .prize-list input:focus { border-color: var(--teal-light); }
.link[disabled] { opacity: .3; cursor: default; }

.qlist, .prize-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.qitem { background: rgba(0,0,0,.18); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.qhead { display: flex; align-items: flex-start; gap: 10px; }
.qnum { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; font-weight: 700; font-size: .85em; }
.qtext { flex: 1; margin: 2px 0 0; font-weight: 600; }
.qactions { display: flex; gap: 10px; flex: none; }
.qopts-view { list-style: none; padding: 0; margin: 8px 0 4px 38px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 14px; font-size: .9em; color: var(--muted); }
.qopts-view li.ok { color: var(--teal-light); font-weight: 700; }
.qopts-view .ico { margin-right: .35em; }
.qitem > .muted.small { margin-left: 38px; }

.qform { display: grid; gap: 10px; background: rgba(0,0,0,.18); border: 1px solid var(--accent); border-radius: 14px; padding: 14px; margin-top: 10px; }
.qopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.qopt { flex-direction: row !important; align-items: center; gap: 8px !important; border-left: 4px solid var(--c); padding-left: 8px; }
.qopt input[type=radio] { width: auto; flex: none; accent-color: var(--teal-light); transform: scale(1.3); }
.qopt .ico { flex: none; }
.grid2, .grid3 { display: grid; gap: 10px; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.qform-btns { display: flex; gap: 8px; }

.prize-list li { display: flex; align-items: center; gap: 10px; }
.prize-list input { flex: 1; }

.eventform fieldset { border: 0; padding: 0; margin: 10px 0 0; display: grid; gap: 14px; }
.eventform .btn { justify-self: start; }
.colors { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.color { flex-direction: row !important; align-items: center; gap: 8px !important; }
.color input { width: 42px; height: 32px; padding: 0; border: 2px solid rgba(255,255,255,.2); border-radius: 8px; background: none; cursor: pointer; }
