/* Sorteo Live – estilos */
.slv-seo { max-width: 860px; margin: 8px auto 28px; line-height: 1.6; }
.slv-seo h2 { font-size: 1.25em; margin: 18px 0 8px; }
.slv-seo ol { margin: 0 0 12px 1.2em; padding: 0; }
.slv-seo details { border: 1px solid rgba(127,127,160,.25); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.slv-seo summary { cursor: pointer; font-weight: 700; }
.slv-seo dt { font-weight: 700; margin-top: 10px; }
.slv-seo dd { margin: 4px 0 0; }
.slv-seo .slv-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.slv-seo .slv-links a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(127,127,160,.35); text-decoration: none; font-weight: 600; }
.slv-seo-note { font-size: .85em; opacity: .75; }
.slv-langbar { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 99999; display: flex; gap: 10px; align-items: center;
  background: #111428; color: #fff; padding: 10px 14px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); font: 600 14px/1.3 system-ui, sans-serif; max-width: calc(100% - 20px); }
.slv-langbar a { color: #fde68a; font-weight: 800; }
.slv-langbar button { background: none; border: 0; color: #9aa0c3; font-size: 18px; cursor: pointer; }
.sorteo-live { margin: 0 0 24px; }
.slv-ad { margin: 36px auto; text-align: center; min-height: 50px; clear: both; }
.slv-ad[data-label]::before { content: attr(data-label); display: block; font: 600 11px/1.6 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; opacity: .55; margin-bottom: 4px; }
@media (max-width: 700px), (pointer: coarse) {
  .slv [class*="slv-"] { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

.slv, .slv * { box-sizing: border-box; }
.slv {
  --bg: #0b0d17;
  --bg2: #121528;
  --panel: rgba(255,255,255,.04);
  --line: rgba(255,255,255,.09);
  --txt: #eef0ff;
  --muted: #9aa0c3;
  --accent: #8b5cf6;
  --accent2: #22d3ee;
  --gold: #fbbf24;
  --danger: #f43f5e;
  --radius: 18px;
  --stage-bg: radial-gradient(120% 90% at 50% 0%, #1b1f3d 0%, #0b0d17 60%);
  position: relative;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--txt);
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}
.slv[data-theme="light"] {
  --bg: #f4f5fb;
  --bg2: #ffffff;
  --panel: rgba(20,24,60,.035);
  --line: rgba(20,24,60,.1);
  --txt: #161a33;
  --muted: #5d6287;
  --stage-bg: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #e9ebf7 70%);
}
.slv[data-bg="chroma"] { --stage-bg: #00b140; }
.slv[data-bg="chroma"] .slv-stage { background: #00b140 !important; }

:where(.slv) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.slv button:focus-visible, .slv textarea:focus-visible, .slv input:focus-visible, .slv select:focus-visible {
  outline: 2px solid var(--accent2); outline-offset: 2px;
}

/* --- Barra superior --- */
.slv-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg2);
}
.slv-title {
  margin: 0 !important; padding: 0 !important; font-size: clamp(18px, 2.4vw, 24px) !important;
  font-weight: 800 !important; letter-spacing: -.02em; color: var(--txt) !important;
  flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 0 !important;
}
.slv-modes { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.slv-mode {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted) !important;
  transition: background .2s, color .2s; white-space: nowrap;
}
.slv-mode[aria-selected="true"] { background: linear-gradient(135deg, var(--accent), #6d28d9); color: #fff !important; box-shadow: 0 4px 16px rgba(139,92,246,.35); }
.slv-tools { display: flex; gap: 6px; }
.slv-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line) !important; font-size: 18px; line-height: 1;
}
.slv-icon:hover { border-color: var(--accent) !important; }
.slv-icon[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* --- Cuerpo --- */
.slv-body { display: flex; min-height: 420px; }
.slv-stage {
  position: relative; flex: 1 1 auto; min-width: 0; background: var(--stage-bg);
  height: clamp(380px, 68vh, 720px); overflow: hidden;
}
.slv-view { position: absolute; inset: 0; display: none; }
.slv-view.is-on { display: block; }

.slv-panel {
  flex: 0 0 300px; border-left: 1px solid var(--line); background: var(--bg2);
  display: flex; flex-direction: column; min-height: 0; height: clamp(380px, 68vh, 720px);
}
.slv-tabs { display: flex; border-bottom: 1px solid var(--line); }
.slv-tab { flex: 1; padding: 12px 8px; font-weight: 700; font-size: 14px; color: var(--muted) !important; border-bottom: 2px solid transparent !important; }
.slv-tab[aria-selected="true"] { color: var(--txt) !important; border-bottom-color: var(--accent) !important; }
.slv-pane { display: none; flex: 1; min-height: 0; flex-direction: column; padding: 12px; gap: 10px; }
.slv-pane.is-on { display: flex; }
.slv-textarea {
  flex: 1; min-height: 140px; width: 100%; resize: none; border-radius: 12px; padding: 12px;
  background: var(--panel); color: var(--txt); border: 1px solid var(--line);
  font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.5;
}
.slv-count { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.slv-btnrow { display: flex; flex-wrap: wrap; gap: 6px; }
.slv-chip {
  padding: 7px 10px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line) !important;
}
.slv-chip:hover { border-color: var(--accent) !important; }
.slv-chip.is-confirm { background: var(--danger); color: #fff; }
.slv-history { list-style: none; margin: 0 !important; padding: 0 !important; overflow: auto; flex: 1; }
.slv-history li {
  display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; margin: 0 0 6px !important;
  background: var(--panel); border: 1px solid var(--line); font-weight: 600;
}
.slv-history li span.slv-hn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slv-history li small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.slv-history .slv-badge { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1a1300; font-size: 12px; font-weight: 800; flex: none; }
.slv-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 20px 0; }

/* --- Botones de sorteo dentro de cada modelo --- */
.slv-act[disabled] { cursor: not-allowed; }
.slv-hint { color: var(--muted); font-size: 12px; margin-top: auto; }
.slv-import {
  width: 100%; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: var(--panel); border: 1px dashed var(--accent) !important; color: var(--txt) !important;
}
.slv-import:hover { background: rgba(139,92,246,.12); }

/* --- Ruleta --- */
.slv-wheelwrap { position: absolute; inset: 0; display: grid; place-items: center; }
.slv-wheel { display: block; }
.slv-hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; font-weight: 900; color: #fff !important; letter-spacing: .04em;
  background: radial-gradient(circle at 35% 30%, #ffffff33, transparent 45%), linear-gradient(145deg, #1e1b4b, #0f0c2b) !important;
  box-shadow: 0 0 0 5px rgba(255,255,255,.9), 0 10px 30px rgba(0,0,0,.5);
  transition: transform .15s;
}
.slv-hub:hover { transform: translate(-50%, -50%) scale(1.05); }
.slv-hub[disabled] { opacity: 1; filter: saturate(.7); }
.slv-hub:not([disabled]) { animation: slv-hubglow 1.8s ease-in-out 6; }
@keyframes slv-hubglow { 50% { box-shadow: 0 0 0 5px rgba(255,255,255,.9), 0 0 0 12px rgba(139,92,246,.35), 0 10px 30px rgba(0,0,0,.5); } }

/* --- Eliminación --- */
.slv-elim { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 16px; gap: 12px; }
.slv-elim-head { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; position: relative; z-index: 2; }
.slv-detonator { display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px 4px 4px; border-radius: 999px;
  background: linear-gradient(180deg, #2a2f55, #15183a) !important; border: 1px solid rgba(255,255,255,.15) !important; color: #fff !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.4); transition: transform .12s, opacity .2s; }
.slv[data-theme="light"] .slv-detonator { background: linear-gradient(180deg, #ffffff, #e6e8f5) !important; color: var(--txt) !important; border-color: var(--line) !important; }
.slv-det-base { width: 46px; height: 46px; border-radius: 50%; background: #1f2937; display: grid; place-items: center; box-shadow: inset 0 -4px 0 #0b0f19; }
.slv-det-cap { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fecaca, #ef4444 45%, #991b1b);
  box-shadow: 0 5px 0 #7f1d1d, 0 0 18px rgba(239,68,68,.6); transform: translateY(-4px); transition: transform .1s, box-shadow .1s; }
.slv-det-txt { font-weight: 900; letter-spacing: .06em; font-size: 15px; }
.slv-detonator:not([disabled]):hover { transform: translateY(-1px); }
.slv-detonator:active .slv-det-cap, .slv-detonator[disabled] .slv-det-cap { transform: translateY(0); box-shadow: 0 1px 0 #7f1d1d, 0 0 8px rgba(239,68,68,.4); }
.slv-detonator[disabled] { opacity: .55; }
.slv-detonator:not([disabled]) .slv-det-cap { animation: slv-detglow 1.4s ease-in-out 7; }
@keyframes slv-detglow { 50% { box-shadow: 0 5px 0 #7f1d1d, 0 0 30px rgba(239,68,68,.95); } }
.slv-remaining {
  font-weight: 900; font-size: clamp(16px, 2.2vw, 22px); padding: 8px 18px; border-radius: 999px;
  background: rgba(0,0,0,.35); color: #fff; border: 1px solid rgba(255,255,255,.15); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.slv[data-theme="light"] .slv-remaining { background: rgba(255,255,255,.8); color: var(--txt); border-color: var(--line); }
.slv-grid {
  --card-min: 140px; --card-font: 18px; position: relative; z-index: 1;
  flex: 1; min-height: 0; overflow: auto; display: grid; gap: 10px; align-content: center;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
  scrollbar-width: thin;
}
.slv-card {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: calc(var(--card-font) * 2.8); padding: 8px 10px; border-radius: 14px;
  font-size: var(--card-font); font-weight: 800; color: #fff; overflow-wrap: break-word; hyphens: auto;
  background: linear-gradient(145deg, var(--c1, #8b5cf6), var(--c2, #6d28d9));
  box-shadow: 0 6px 18px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.25);
  transition: opacity .35s, filter .35s, transform .35s;
}
.slv-card span { position: relative; z-index: 1; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.slv-card.is-hit { animation: slv-hit .28s ease-out; filter: brightness(1.6) saturate(.2); }
.slv-card.is-out { opacity: .16; background: #4b5163; transform: scale(.92); }
.slv-card.is-gone { opacity: .1; }
.slv-card.is-lit { filter: brightness(1.35); transform: scale(1.05); box-shadow: 0 0 0 3px #fde68a, 0 0 32px rgba(253,230,138,.65); z-index: 2; transition: transform .12s, box-shadow .12s, filter .12s; }
.slv-card.is-target { z-index: 2; box-shadow: 0 0 0 4px #f43f5e, 0 0 40px rgba(244,63,94,.8); animation: slv-target .35s ease-in-out infinite alternate; }
@keyframes slv-target { to { transform: scale(1.06); } }
.slv-card.is-falling { z-index: 4; transition: none; will-change: transform; }
.slv-card.is-dusting { transition: opacity .7s ease-in, filter .7s ease-in, transform .7s ease-in; opacity: 0; filter: blur(3px) grayscale(1); transform: translateX(14px) scale(.96); }
.slv-card.is-sinking { transition: transform .7s cubic-bezier(.6,0,.9,.4), filter .7s, opacity .7s; transform: translateY(12%) scale(.12) rotate(8deg); filter: brightness(.2); opacity: .2; }
.slv-num { position: absolute; top: -10px; left: -10px; z-index: 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #ffffff; color: #111827; font-weight: 900; font-size: 17px; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.slv-hole { position: absolute; z-index: 0; border-radius: 50%; background: radial-gradient(ellipse at 50% 45%, #000 40%, #0b0d17 70%, rgba(0,0,0,0) 72%);
  box-shadow: inset 0 10px 30px rgba(0,0,0,.9); transform: scale(0); transition: transform .3s cubic-bezier(.3,1.4,.5,1); pointer-events: none; }
.slv-hole.is-open { transform: scale(1); }
.slv-card.is-out::after {
  content: ""; position: absolute; left: 10%; right: 10%; top: 50%; height: 3px; border-radius: 3px;
  background: var(--danger); transform: rotate(-8deg);
}
.slv-grid.is-final { align-content: center; justify-content: center; }
.slv-grid.is-duel { grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; }
.slv-grid.is-final.is-duel .slv-card:not(.is-duelist) { display: none; }
.slv-grid.is-final.is-duel .slv-card.is-duelist.is-out { display: flex; }
.slv-grid.is-dense .slv-card span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slv-grid.is-dense .slv-card { min-height: calc(var(--card-font) * 2.3); padding: 4px 6px; border-radius: 10px; }
.slv-grid.is-final .slv-card span { white-space: normal; }
.slv-grid.is-final .slv-card.is-out { display: none; }
.slv-grid.is-dense .slv-card.is-hidden { display: none; }
.slv-card.is-finalist { animation: slv-pulse .7s ease-in-out infinite alternate; }
.slv-card.is-win {
  transform: scale(1.12); z-index: 2;
  box-shadow: 0 0 0 4px var(--gold), 0 0 60px rgba(251,191,36,.7);
  animation: none;
}
@keyframes slv-hit {
  0% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-6px) rotate(-2deg) scale(1.05); }
  50% { transform: translateX(6px) rotate(2deg); }
  100% { transform: translateX(0) scale(.95); }
}
@keyframes slv-pulse {
  from { transform: scale(1); box-shadow: 0 0 0 0 rgba(251,191,36,.0); }
  to { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(251,191,36,.8), 0 0 40px rgba(251,191,36,.5); }
}

/* --- Tómbola --- */
.slv-tombola { display: block; width: 100%; height: 100%; }
.slv-tstatus { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  font-weight: 900; font-size: clamp(14px, 2vw, 19px); padding: 7px 16px; border-radius: 999px;
  background: rgba(0,0,0,.35); color: #fff; border: 1px solid rgba(255,255,255,.15); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; }
.slv-tstatus:empty { display: none; }
.slv[data-theme="light"] .slv-tstatus { background: rgba(255,255,255,.8); color: var(--txt); border-color: var(--line); }
.slv-lever { position: absolute; z-index: 3; display: block; padding: 0; background: none !important; }
.slv-crank { position: absolute; left: 50%; top: 0; width: 88%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3b4277, #1b1f45 70%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.12), 0 8px 20px rgba(0,0,0,.4); }
.slv-crank-arm { position: absolute; left: 50%; top: 50%; width: 12px; height: 40%; margin-left: -6px; border-radius: 6px; transform-origin: 50% 0;
  background: linear-gradient(90deg, #9ca3af, #f3f4f6, #9ca3af); transform: rotate(200deg); }
.slv-crank-knob { position: absolute; left: 50%; bottom: -16px; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ddd6fe, #8b5cf6 50%, #4c1d95); box-shadow: 0 4px 12px rgba(0,0,0,.45); }
.slv-crank-hub { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #e5e7eb; box-shadow: 0 0 0 3px #6b7280; }
.slv-lever.is-pulled .slv-crank-arm { animation: slv-crank .9s cubic-bezier(.4,0,.2,1); }
@keyframes slv-crank { from { transform: rotate(200deg); } to { transform: rotate(920deg); } }
.slv-lever:not([disabled]):hover .slv-crank { box-shadow: inset 0 0 0 3px rgba(139,92,246,.6), 0 8px 22px rgba(139,92,246,.35); }
.slv-lever-txt { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font-weight: 900; font-size: 13px; letter-spacing: .08em; color: var(--txt); white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; box-shadow: 0 6px 16px rgba(139,92,246,.4); }
.slv-lever[disabled] { opacity: .6; }
.slv-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* --- Confeti y ganador --- */
.slv-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 7; }
.slv-winner {
  position: absolute; inset: 0; z-index: 6; display: none; place-items: center;
  background: rgba(5,6,15,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); padding: 20px;
}
.slv-winner.is-on { display: grid; animation: slv-fade .25s ease-out; }
.slv-wcard {
  text-align: center; padding: 28px 34px 24px; border-radius: 24px; max-width: min(92%, 640px);
  background: linear-gradient(160deg, #1f1a4d, #120f2e); color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 0 0 4px rgba(251,191,36,.9), 0 30px 80px rgba(0,0,0,.6), 0 0 120px rgba(139,92,246,.45);
  animation: slv-pop .55s cubic-bezier(.2,1.4,.4,1);
}
.slv-wlabel { font-size: 15px; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; color: var(--gold); }
.slv-wname {
  font-size: clamp(30px, 6vw, 68px); font-weight: 900; line-height: 1.05; margin: 10px 0 20px; word-break: break-word;
  background: linear-gradient(90deg, #fff, #fde68a, #fff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.slv-wbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.slv-wbtns button { padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; background: rgba(255,255,255,.1); color: #fff !important; }
.slv-wbtns button.slv-primary { background: linear-gradient(135deg, #f43f5e, #8b5cf6) !important; }
@keyframes slv-pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slv-fade { from { opacity: 0; } to { opacity: 1; } }

.slv-toast {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 9;
  background: var(--danger); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.slv-toast.is-on { opacity: 1; }
.slv-toast.is-ok { background: #16a34a; }

/* --- Ajustes --- */
.slv-settings {
  position: absolute; inset: 0; z-index: 8; display: none; justify-content: flex-end; background: rgba(0,0,0,.45);
}
.slv-settings.is-on { display: flex; }
.slv-sbox {
  width: min(430px, 100%); height: 100%; overflow: auto; background: var(--bg2); border-left: 1px solid var(--line);
  padding: 18px; display: flex; flex-direction: column; gap: 14px; animation: slv-slide .25s ease-out;
}
@keyframes slv-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.slv-sbox h3 { margin: 0 !important; font-size: 20px !important; font-weight: 800 !important; color: var(--txt) !important; }
.slv-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.slv-field input[type="text"], .slv-field select {
  padding: 10px 12px; border-radius: 10px; background: var(--panel); color: var(--txt); border: 1px solid var(--line); font: inherit;
}
.slv-field select option { color: #111; }
.slv-field input[type="range"] { width: 100%; accent-color: var(--accent); }
.slv-field .slv-val { color: var(--muted); font-weight: 500; }
.slv-check { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.slv-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.slv-sbtns { display: flex; gap: 8px; margin-top: auto; }
.slv-sbtns button { flex: 1; padding: 12px; border-radius: 12px; font-weight: 700; background: var(--panel); border: 1px solid var(--line) !important; }
.slv-sbtns button.slv-primary { background: var(--accent) !important; color: #fff !important; border-color: transparent !important; }

/* --- Modo transmisión y pantalla completa --- */
.slv.is-stream .slv-panel { display: none; }
.slv.is-stream .slv-stage { height: clamp(420px, 82vh, 1000px); }
.slv:fullscreen { border-radius: 0; border: 0; display: flex; flex-direction: column; width: 100vw; height: 100vh; }
.slv:fullscreen .slv-body { flex: 1; min-height: 0; }
.slv:fullscreen .slv-stage, .slv:fullscreen .slv-panel { height: auto; }
.slv:-webkit-full-screen { width: 100vw; height: 100vh; }

/* --- Responsive --- */
@media (max-width: 860px) {
  .slv-body { flex-direction: column; }
  .slv-panel { flex: none; border-left: 0; border-top: 1px solid var(--line); height: 360px; }
  .slv-stage { height: min(96vw, 560px); }
  .slv-hint { display: none; }
}
@media (max-width: 520px) {
  .slv-top { padding: 10px; gap: 8px; }
  .slv-modes { order: 3; width: 100%; justify-content: space-between; }
  .slv-mode { flex: 1; padding: 8px 6px; font-size: 13px; text-align: center; }
  .slv-icon { width: 36px; height: 36px; font-size: 16px; }
  .slv-stage { height: min(118vw, 520px); }
  .slv-det-base { width: 38px; height: 38px; } .slv-det-cap { width: 28px; height: 28px; }
  .slv-det-txt { font-size: 13px; }
  .slv-elim { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .slv-card, .slv-winner, .slv-wcard, .slv-hub, .slv-det-cap, .slv-crank-knob { animation: none !important; transition: none !important; }
}

/* Transparencia: contador + huella de la lista (visible también en modo transmisión) */
.slv-meta { position: absolute; left: 10px; bottom: 10px; z-index: 4; display: flex; gap: 6px; pointer-events: none; }
.slv-meta span { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; border: 1px solid rgba(255,255,255,.12); }
.slv-meta span:empty { display: none; }
.slv[data-theme="light"] .slv-meta span { background: rgba(255,255,255,.85); color: var(--txt); border-color: var(--line); }
.slv-notice { position: absolute; right: 10px; bottom: 10px; z-index: 4; font-size: 13px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: #16a34a; color: #fff; pointer-events: none; }
.slv-notice:empty { display: none; }
.slv-fair { font-size: 11.5px; color: var(--muted); text-align: center; padding: 7px 12px; border-top: 1px solid var(--line); }
.slv.is-stream .slv-fair { display: none; }

/* Pantalla completa simulada (iPhone y navegadores sin Fullscreen API) */
.sorteo-live.is-pseudofull, .slv.is-pseudofull { position: fixed !important; inset: 0 !important; z-index: 2147483000 !important; width: auto !important; max-width: none !important; height: 100% !important; margin: 0 !important; border-radius: 0 !important; }
html.slv-lock, html.slv-lock body { overflow: hidden !important; }

/* ===== Diseño a pantalla completa (la app ocupa todo el alto visible) ===== */
.slv-listbtn, .slv-panel-x { display: none !important; }
.sorteo-live.slv-full { margin-top: 0; margin-bottom: 24px; max-width: none; }
.slv.is-full { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; display: flex; flex-direction: column; height: calc(100vh - 60px); min-height: 440px; }
.slv.is-full .slv-body { flex: 1 1 auto; min-height: 0; }
.slv.is-full .slv-stage, .slv.is-full .slv-panel { height: auto; }
.slv.is-full .slv-panel { flex-basis: 320px; }
.slv.is-full .slv-top { padding: 8px 12px; }
.slv.is-full.is-stream .slv-stage { height: auto; }
@media (min-width: 861px) {
  .slv.is-full .slv-listbtn { display: grid !important; }
  .slv.is-full.is-nopanel .slv-panel { display: none; }
}
@media (max-width: 860px) {
  .slv.is-full .slv-body { flex-direction: row; position: relative; }
  .slv.is-full .slv-stage { height: auto; flex: 1 1 auto; }
  .slv.is-full .slv-listbtn { display: grid !important; }
  .slv.is-full .slv-panel { position: absolute; left: 0; right: 0; bottom: 0; height: 72%; z-index: 30; border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0; box-shadow: 0 -18px 40px rgba(0,0,0,.45); transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); visibility: hidden; }
  .slv.is-full.is-drawer .slv-panel { transform: none; visibility: visible; }
  .slv.is-full .slv-panel-x { display: block !important; flex: 0 0 44px; font-size: 24px; color: var(--muted) !important; }
  .slv.is-full .slv-listbtn[aria-expanded="true"] { background: var(--accent); color: #fff; }
}
@media (max-width: 520px) {
  .slv.is-full .slv-top { padding: 6px 8px; gap: 6px; }
  .slv.is-full .slv-modes { order: 3; }
}

/* ===== Anuncios junto al sorteo (pantalla completa) ===== */
.sorteo-live.slv-full { display: flex; flex-direction: column; gap: 8px; }
.sorteo-live.slv-full > .slv { flex: 1 1 auto; min-width: 0; }
.slv-ad-app { flex: none; text-align: center; overflow: hidden; }
.slv-ad-app[data-label]::before { content: attr(data-label); display: block; font: 600 10px/1.6 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; opacity: .5; margin-bottom: 2px; }
.slv-ad-app-d { display: none; }
.slv-ad-app-m { padding: 4px 8px 0; max-height: 130px; }
@media (min-width: 1100px) {
  .sorteo-live.slv-full.has-app-ads { flex-direction: row; gap: 0; }
  .slv-ad-app-d { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 336px; padding: 18px 18px 0;
    background: var(--slv-adbg, #0b0d17); border-right: 1px solid rgba(255,255,255,.07); }
  .slv-ad-app-m { display: none; }
}

/* ===== Marca discreta de la web dentro del escenario ===== */
.slv-brand { position: absolute; right: 12px; top: 10px; z-index: 4; pointer-events: none; user-select: none;
  font: 800 12px/1 "Inter", system-ui, sans-serif; letter-spacing: .04em; color: #fff; opacity: .38;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.slv[data-theme="light"] .slv-brand { color: #161a33; text-shadow: none; opacity: .32; }
.slv:fullscreen .slv-brand, .slv.is-stream .slv-brand { font-size: 14px; opacity: .45; }

/* ===== Iconos en modos y botones de lista ===== */
.slv-mode .slv-mi { margin-right: 6px; }
@media (max-width: 380px) { .slv-mode .slv-mi { margin-right: 3px; } }

/* ===== Ajustes visuales: tarjetas, muestras de color e interruptores ===== */
.slv-flab { display: flex; align-items: center; gap: 8px; }
.slv-fico { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-size: 14px; flex: none; }
.slv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slv-tile, .slv-toggle { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 10px 6px; border-radius: 12px; cursor: pointer; background: var(--panel); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--txt);
  transition: border-color .15s, background .15s, transform .1s; min-height: 70px; }
.slv-tile:hover, .slv-toggle:hover { border-color: var(--accent); }
.slv-tile input, .slv-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.slv-tile-ico { font-size: 22px; line-height: 1; }
.slv-tile-ico b { font-size: 15px; letter-spacing: .04em; }
.slv-tile-txt { line-height: 1.2; }
.slv-tile:has(input:checked), .slv-toggle:has(input:checked) { border-color: var(--accent); background: rgba(139,92,246,.16); box-shadow: 0 0 0 2px rgba(139,92,246,.35) inset; }
.slv-tile:has(input:focus-visible), .slv-toggle:has(input:focus-visible) { outline: 2px solid var(--accent2); outline-offset: 2px; }
.slv-toggle:not(:has(input:checked)) .slv-tile-ico { filter: grayscale(1); opacity: .45; }
.slv-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.slv-sw { display: flex; gap: 2px; }
.slv-sw i { width: 12px; height: 22px; border-radius: 4px; display: block; }
