/* ==========================================================================
   Sorteos V1.0.1 — diseño tipo app (iOS).
   1. Tokens   2. Base   3. Estructura (barra superior, menú lateral, pestañas, hoja "Más")
   4. Componentes propios (sx-*)   5. Piel del HTML viejo (widget, btn, table, form, alert…)
   6. Portada (sorteo, boletos, historial)   7. Responsive
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------------ */
:root {
  --sx-bg: #f2f2f7;
  --sx-card: #ffffff;
  --sx-card-2: #f7f7fa;
  --sx-text: #111114;
  --sx-text-2: #3c3c43;
  --sx-muted: #8a8a93;
  --sx-line: rgba(60, 60, 67, .12);
  --sx-line-2: rgba(60, 60, 67, .2);
  --sx-primary: #e5484d;
  --sx-primary-2: #ff6b6f;
  --sx-primary-soft: rgba(229, 72, 77, .1);
  --sx-gold: #f5a524;
  --sx-gold-soft: rgba(245, 165, 36, .14);
  --sx-green: #1f9d55;
  --sx-green-soft: rgba(31, 157, 85, .12);
  --sx-blue: #2f6fed;
  --sx-blue-soft: rgba(47, 111, 237, .12);
  --sx-dark: #1c1c22;
  --sx-r-sm: 10px;
  --sx-r: 14px;
  --sx-r-lg: 20px;
  --sx-shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 4px 16px rgba(16, 16, 24, .05);
  --sx-shadow-lg: 0 10px 40px rgba(16, 16, 24, .16);
  --sx-top: 60px;
  --sx-side: 256px;
  --sx-tab: 64px;
  --sx-safe-b: env(safe-area-inset-bottom, 0px);
  --sx-safe-t: env(safe-area-inset-top, 0px);
  --sx-font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sx-ease: cubic-bezier(.2, .8, .2, 1);
}

/* 2. Base -------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body.sx {
  margin: 0;
  padding: 0;
  background: var(--sx-bg);
  color: var(--sx-text);
  font-family: var(--sx-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.sx a { color: var(--sx-primary); }
body.sx a:hover { text-decoration: none; }
body.sx h1, body.sx h2, body.sx h3, body.sx h4, body.sx h5 { font-family: var(--sx-font); color: var(--sx-text); letter-spacing: -.01em; }
body.sx img { max-width: 100%; }
body.sx ::selection { background: var(--sx-primary-soft); }
.sx-muted { color: var(--sx-muted); }
.sx-hide { display: none !important; }
.sx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.sx-i, .sx-i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* 3. Estructura -------------------------------------------------------------- */
.sx-topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1030;
  height: calc(var(--sx-top) + var(--sx-safe-t)); padding: var(--sx-safe-t) 16px 0;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sx-line);
}
.sx-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--sx-text) !important; }
.sx-logo {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 11px; overflow: hidden;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--sx-primary-2), var(--sx-primary));
  box-shadow: 0 2px 8px rgba(229, 72, 77, .35);
}
.sx-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.sx-brand__name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-brand__sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--sx-muted); letter-spacing: 0; margin-top: -2px; }
.sx-topbar__end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.sx-saldo {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px;
  background: var(--sx-gold-soft); color: #8a5a00 !important; font-weight: 700; font-size: 13.5px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sx-saldo__coin { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sx-gold); color: #fff; font-size: 13px; font-weight: 800; }
.sx-iconbtn {
  position: relative; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  color: var(--sx-text-2) !important; background: transparent; border: 0; transition: background .2s;
}
.sx-iconbtn:hover { background: rgba(0, 0, 0, .05); }
.sx-badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--sx-primary); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.sx-badge:empty, .sx-badge[data-n="0"] { display: none; }

.sx-sidebar {
  position: fixed; z-index: 1020; top: calc(var(--sx-top) + var(--sx-safe-t)); bottom: 0; left: 0; width: var(--sx-side);
  padding: 16px 12px 24px; overflow-y: auto; background: var(--sx-card); border-right: 1px solid var(--sx-line);
  display: none;
}
.sx-nav { list-style: none; margin: 0; padding: 0; }
.sx-nav__title { margin: 18px 12px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-muted); }
.sx-nav__title:first-child { margin-top: 0; }
.sx-nav a {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px;
  color: var(--sx-text-2) !important; font-weight: 600; font-size: 14.5px; transition: background .18s, color .18s;
}
.sx-nav a:hover { background: var(--sx-card-2); }
.sx-nav a.is-active { background: var(--sx-primary-soft); color: var(--sx-primary) !important; }
.sx-nav a .sx-i { flex: none; }
.sx-nav__badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; background: var(--sx-primary); color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
.sx-nav__badge:empty, .sx-nav__badge[data-n="0"] { display: none; }
.sx-nav__sello { display: flex; gap: 8px; margin: 22px 12px 0; }
.sx-nav__sello img { height: 34px; width: auto; object-fit: contain; opacity: .9; }

.sx-main { padding-top: calc(var(--sx-top) + var(--sx-safe-t)); min-height: 100vh; }
.sx-page { max-width: 1180px; margin: 0 auto; padding: 18px 16px calc(var(--sx-tab) + var(--sx-safe-b) + 28px); }
.sx-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 2px 16px; }
.sx-pagehead h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.sx-pagehead p { margin: 4px 0 0; color: var(--sx-muted); font-size: 14px; }

.sx-tabbar {
  position: fixed; z-index: 1030; left: 0; right: 0; bottom: 0;
  height: calc(var(--sx-tab) + var(--sx-safe-b)); padding: 6px 6px var(--sx-safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--sx-line);
}
.sx-tabbar a, .sx-tabbar button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; padding: 0; color: var(--sx-muted) !important; font: 600 10.5px/1 var(--sx-font); letter-spacing: .01em;
}
.sx-tabbar .sx-i { width: 25px; height: 25px; transition: transform .25s var(--sx-ease); }
.sx-tabbar .is-active { color: var(--sx-primary) !important; }
.sx-tabbar .is-active .sx-i { transform: translateY(-1px) scale(1.06); }
.sx-tabbar .sx-badge { top: 2px; right: calc(50% - 22px); }

.sx-scrim { position: fixed; inset: 0; z-index: 1040; background: rgba(0, 0, 0, .32); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.sx-scrim.is-open { opacity: 1; visibility: visible; }
.sx-sheet {
  position: fixed; z-index: 1050; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto;
  padding: 8px 14px calc(18px + var(--sx-safe-b)); border-radius: 22px 22px 0 0; background: var(--sx-bg);
  transform: translateY(105%); transition: transform .38s var(--sx-ease); box-shadow: var(--sx-shadow-lg);
}
.sx-sheet.is-open { transform: none; }
.sx-sheet__grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(60, 60, 67, .3); margin: 4px auto 12px; }
.sx-sheet .sx-nav { background: var(--sx-card); border-radius: var(--sx-r); padding: 6px; margin-bottom: 12px; }
.sx-sheet .sx-nav__title { margin: 14px 8px 8px; }

/* 4. Componentes propios ----------------------------------------------------- */
.sx-card { box-sizing: border-box; background: var(--sx-card); border-radius: var(--sx-r-lg); box-shadow: var(--sx-shadow); padding: 18px; margin-bottom: 16px; }
.sx-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sx-card__title { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.sx-aviso { border-radius: var(--sx-r); padding: 14px 16px; background: var(--sx-card); box-shadow: var(--sx-shadow); margin-bottom: 16px; color: var(--sx-text-2); font-size: 14px; }
.sx-aviso:empty { display: none; }

.sx-btn {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px;
  border: 0; background: var(--sx-primary); color: #fff !important; font: 650 15px/1 var(--sx-font); cursor: pointer;
  box-shadow: 0 2px 10px rgba(229, 72, 77, .28); transition: transform .12s, filter .2s, box-shadow .2s; text-decoration: none !important;
}
.sx-btn:hover { filter: brightness(1.05); }
.sx-btn:active { transform: scale(.97); }
.sx-btn--block { width: 100%; }
.sx-btn--sm { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; box-shadow: none; }
.sx-btn--ghost { background: var(--sx-primary-soft); color: var(--sx-primary) !important; box-shadow: none; }
.sx-btn--dark { background: var(--sx-dark); box-shadow: none; }
.sx-btn--soft { background: var(--sx-card-2); color: var(--sx-text) !important; box-shadow: none; }
.sx-btn--formula { background: var(--sx-gold); color: #3d2700 !important; box-shadow: none; }
.sx-inline { display: inline; margin: 0; }

.sx-tag, button.sx-tag {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 26px; padding: 0 9px; border-radius: 8px;
  border: 0; background: var(--sx-card-2); color: var(--sx-text-2) !important; font: 700 12.5px/1 var(--sx-font); font-variant-numeric: tabular-nums;
}
.sx-tag--rosa { background: #fde2dd; color: #9b2c1d !important; }
.sx-tag--marino { background: #2f3d64; color: #fff !important; }
.sx-tono--verde { background: #1f9d55 !important; color: #fff !important; }
.sx-tono--azul { background: #2f6fed !important; color: #fff !important; }
.sx-tono--naranja { background: #ff8a00 !important; color: #2a1600 !important; }
.sx-tono--vino { background: #b40431 !important; color: #fff !important; }
.sx-tono--fucsia { background: #b1169a !important; color: #fff !important; }
.sx-tono--petroleo { background: #438492 !important; color: #fff !important; }

.sx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c7c7cc; }
.sx-dot--on { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); animation: sx-pulso 2s infinite; }
@keyframes sx-pulso { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }

.sx-ball, button.sx-ball {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0;
  font: 800 16px/1 var(--sx-font); font-variant-numeric: tabular-nums; color: #fff;
  background: radial-gradient(circle at 32% 28%, #4ade80, #16a34a 62%, #0f7a36);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .18), 0 3px 8px rgba(22, 163, 74, .3);
}
.sx-ball.sx-ball--pendiente { background: radial-gradient(circle at 32% 28%, #ff8b8e, #e5484d 62%, #b8242a); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .18), 0 3px 8px rgba(229, 72, 77, .3); }
.sx-ball.sx-ball--nulo { background: #d1d1d6; color: #636366; box-shadow: none; }

/* Toasts */
.sx-toasts { position: fixed; z-index: 2000; left: 50%; top: calc(var(--sx-top) + var(--sx-safe-t) + 10px); transform: translateX(-50%); width: min(440px, calc(100% - 24px)); display: grid; gap: 8px; pointer-events: none; }
.sx-toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; pointer-events: auto;
  background: rgba(28, 28, 34, .94); color: #fff; font-size: 14px; font-weight: 550; box-shadow: var(--sx-shadow-lg);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: sx-toast-in .35s var(--sx-ease);
}
.sx-toast.is-out { animation: sx-toast-out .3s var(--sx-ease) forwards; }
.sx-toast__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sx-blue); }
.sx-toast--ok .sx-toast__dot { background: #22c55e; }
.sx-toast--error .sx-toast__dot { background: var(--sx-primary-2); }
@keyframes sx-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes sx-toast-out { to { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* Diálogo (confirmar / editar) */
.sx-dialog { position: fixed; z-index: 2100; inset: 0; display: grid; place-items: end center; padding: 12px; background: rgba(0, 0, 0, .32); animation: sx-fade .2s; }
.sx-dialog__box { width: min(420px, 100%); background: var(--sx-card); border-radius: 22px; padding: 22px 20px 16px; box-shadow: var(--sx-shadow-lg); animation: sx-up .36s var(--sx-ease); margin-bottom: var(--sx-safe-b); }
.sx-dialog__title { margin: 0 0 6px; font-size: 18px; font-weight: 750; }
.sx-dialog__msg { margin: 0 0 16px; color: var(--sx-text-2); font-size: 14.5px; }
.sx-dialog__acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sx-dialog input { width: 100%; box-sizing: border-box; margin-bottom: 14px; }
@keyframes sx-fade { from { opacity: 0; } }
@keyframes sx-up { from { opacity: 0; transform: translateY(30px); } }

/* Carga por bloques */
.sx-more { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0 4px; color: var(--sx-muted); font-size: 13px; }
.sx-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--sx-line-2); border-top-color: var(--sx-primary); animation: sx-gira .8s linear infinite; }
@keyframes sx-gira { to { transform: rotate(360deg); } }
.sx-search { position: relative; margin-bottom: 12px; }
.sx-search input { width: 100% !important; box-sizing: border-box; padding-left: 40px !important; margin: 0 !important; }
.sx-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--sx-muted); fill: none; stroke: currentColor; stroke-width: 2; }

/* 5. Piel del HTML viejo ---------------------------------------------------- */
body.sx .well { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
body.sx .row-fluid { width: 100%; }
body.sx .separator { height: 10px; padding: 0; }
body.sx hr, body.sx hr.separator { border: 0; border-top: 1px solid var(--sx-line); margin: 14px 0; height: 0; }

/* Tarjetas (widget) */
body.sx .widget {
  background: var(--sx-card); border: 0; border-radius: var(--sx-r-lg); box-shadow: var(--sx-shadow); margin: 0 0 16px; overflow: hidden;
}
body.sx .widget .widget-head, body.sx .widget-head {
  height: auto; min-height: 0; background: none; border: 0; padding: 16px 18px 4px; display: flex; align-items: center; gap: 10px; box-shadow: none;
}
body.sx .widget.primary .widget-head, body.sx .widget-gray .widget-head { background: none; }
body.sx .widget-head .heading, body.sx h4.heading, body.sx .heading {
  margin: 0; padding: 0 !important; height: auto; line-height: 1.3; font-size: 17px; font-weight: 750; letter-spacing: -.015em; color: var(--sx-text) !important;
  text-transform: none; background: none; border: 0; text-shadow: none;
}
body.sx .heading.glyphicons i, body.sx .heading.glyphicons:before { display: none !important; }
body.sx .widget .widget-body { padding: 12px 18px 18px; border: 0; background: none; }
body.sx .widget-body.list ul, body.sx .widget-body.list-2 ul { list-style: none; margin: 0; padding: 0; }
body.sx .widget-body.list ul li {
  display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--sx-line); line-height: 1.3; height: auto; font-size: 14.5px; color: var(--sx-text-2);
}
body.sx .widget-body.list ul li:last-child { border-bottom: 0; }
body.sx .widget-body.list .count { float: none; font-weight: 700; color: var(--sx-text); font-variant-numeric: tabular-nums; }
body.sx .widget-body.list-2 ul li a { display: flex; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--sx-line); color: var(--sx-text-2); font-weight: 600; }
body.sx .widget-body.list-2 ul li a i { display: none; }
body.sx .widget-body.list-2 ul li.active a { color: var(--sx-primary); }
body.sx .relativeWrap { position: relative; }
body.sx .tab-content { overflow: visible; }

/* Botones */
body.sx .btn {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; margin: 2px 0;
  border: 0; border-radius: 12px; background: var(--sx-card-2); color: var(--sx-text) !important; text-shadow: none;
  box-shadow: none; font: 650 14.5px/1 var(--sx-font); text-transform: none; background-image: none; filter: none;
  transition: transform .12s, filter .2s; vertical-align: middle; white-space: nowrap;
}
body.sx .btn:hover { filter: brightness(.97); }
body.sx .btn:active { transform: scale(.97); }
body.sx .btn.btn-icon { padding: 0 16px !important; }
body.sx .btn.btn-icon i, body.sx .btn.glyphicons i { display: none !important; }
body.sx .btn.glyphicons:before { display: none; }
body.sx .btn-primary, body.sx .btn-danger, body.sx .btn-important { background: var(--sx-primary); color: #fff !important; box-shadow: 0 2px 10px rgba(229, 72, 77, .25); }
body.sx .btn-success { background: var(--sx-green); color: #fff !important; }
body.sx .btn-warning { background: var(--sx-gold); color: #3d2700 !important; }
body.sx .btn-info, body.sx .btn-secundary, body.sx .btn-secondary { background: var(--sx-blue); color: #fff !important; }
body.sx .btn-inverse { background: var(--sx-dark); color: #fff !important; }
body.sx .btn-default { background: var(--sx-card-2); }
body.sx .btn-mini, body.sx .btn-small { height: 32px; padding: 0 10px !important; font-size: 13px; border-radius: 9px; }
body.sx .form-actions { background: none; border: 0; padding: 14px 0 0 !important; margin: 0 !important; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
body.sx .form-actions .pull-right, body.sx .form-actions .pull-left { float: none; }
body.sx .pull-right.btn, body.sx .pull-left.btn { float: none; }
body.sx .btn-action {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0 !important; border-radius: 10px; margin: 0;
  background-color: var(--sx-card-2); background-image: none !important; box-shadow: none; border: 0;
}
body.sx .btn-action i { position: static; transform: scale(.8); }
body.sx .btn-action.btn-success { background-color: var(--sx-green-soft); }
body.sx .btn-action.btn-danger { background-color: var(--sx-primary-soft); }

/* Etiquetas */
body.sx .label, body.sx .badge {
  display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 0 9px; border-radius: 8px;
  font: 700 12.5px/1 var(--sx-font); text-shadow: none; box-shadow: none; text-transform: none; letter-spacing: 0; vertical-align: middle;
}
body.sx .label a, body.sx a.label { text-decoration: none; }

/* Formularios */
body.sx label { font-size: 13px; font-weight: 650; color: var(--sx-text-2); margin: 10px 0 6px; display: block; }
body.sx input:not([type]), body.sx input[type=text], body.sx input[type=email], body.sx input[type=password], body.sx input[type=tel], body.sx input[type=number],
body.sx input[type=date], body.sx input[type=search], body.sx input[type=url], body.sx select, body.sx textarea {
  box-sizing: border-box; height: 46px; max-width: 100%; padding: 0 14px; margin: 0 0 6px;
  border: 1.5px solid var(--sx-line-2); border-radius: 12px; background: var(--sx-card); box-shadow: none;
  color: var(--sx-text); font: 500 16px/1.2 var(--sx-font); transition: border-color .2s, box-shadow .2s;
}
body.sx textarea { height: auto; min-height: 96px; padding: 12px 14px; }
body.sx select { padding-right: 34px; -webkit-appearance: none; appearance: none;
  background: var(--sx-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238a8a93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
body.sx input:focus, body.sx select:focus, body.sx textarea:focus { outline: 0; border-color: var(--sx-primary); box-shadow: 0 0 0 4px var(--sx-primary-soft); }
body.sx input::placeholder, body.sx textarea::placeholder { color: #aeaeb5; text-transform: none; }
body.sx .input-large, body.sx .input-xlarge, body.sx .span12 > input, body.sx .controls input, body.sx .controls select, body.sx .controls textarea { width: 100%; }
body.sx .controls { margin: 0; }
body.sx input[type=checkbox], body.sx input[type=radio] { width: 20px; height: 20px; accent-color: var(--sx-primary); vertical-align: middle; }
body.sx .form-horizontal .control-group { margin-bottom: 8px; }
body.sx .form-horizontal .control-label { float: none; width: auto; text-align: left; padding: 0; }
body.sx .form-horizontal .controls { margin-left: 0; }
body.sx .help-block, body.sx .help-inline { color: var(--sx-muted); font-size: 12.5px; }

/* Avisos */
body.sx .alert {
  position: relative; border: 0; border-radius: var(--sx-r); padding: 14px 44px 14px 16px; margin: 0 0 14px; text-shadow: none;
  background: var(--sx-blue-soft); color: #173a85; font-size: 14px; box-shadow: none;
}
body.sx .alert-success { background: var(--sx-green-soft); color: #0f5a32; }
body.sx .alert-error, body.sx .alert-danger { background: var(--sx-primary-soft); color: #9b1f24; }
body.sx .alert-info { background: var(--sx-blue-soft); color: #173a85; }
body.sx .alert .close { position: absolute; top: 10px; right: 12px; float: none; opacity: .5; font-size: 22px; line-height: 1; color: inherit; text-shadow: none; }

/* Tablas */
.sx-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--sx-r); }
body.sx table.table {
  width: 100%; margin: 0; border: 0; border-collapse: separate; border-spacing: 0; background: var(--sx-card);
  font-size: 14px; font-variant-numeric: tabular-nums;
}
body.sx table.table th, body.sx table.table td {
  padding: 11px 10px; border: 0; border-bottom: 1px solid var(--sx-line); vertical-align: middle; line-height: 1.35; background: none;
}
body.sx table.table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--sx-card-2); color: var(--sx-muted);
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--sx-line);
}
body.sx table.table thead th:first-child { border-top-left-radius: 12px; }
body.sx table.table thead th:last-child { border-top-right-radius: 12px; }
body.sx table.table tbody tr:last-child td, body.sx table.table tbody tr:last-child th { border-bottom: 0; }
body.sx table.table tbody tr:hover td { background: rgba(0, 0, 0, .015); }
body.sx .table-striped tbody tr:nth-child(odd) td, body.sx .table-striped tbody tr:nth-child(odd) th { background: none; }
body.sx .table-bordered { border: 0; border-radius: 0; }
body.sx .table-bordered th, body.sx .table-bordered td { border-left: 0; }
body.sx .center { text-align: center; }
body.sx .dataTables_wrapper .row-fluid:first-child, body.sx .dataTables_length, body.sx .dataTables_paginate, body.sx .dataTables_info { display: none; }
body.sx tr.sx-oculta { display: none; }
body.sx .sx-table-wrap table.table th, body.sx .sx-table-wrap table.table td { white-space: nowrap; }
body.sx table.table input[type=text], body.sx table.table input[type=tel], body.sx table.table input[type=number],
body.sx table.table input[type=email], body.sx table.table select {
  height: 36px; min-width: 84px; padding: 0 10px; margin: 0; border-radius: 10px; font-size: 14px;
}
body.sx table.table form { margin: 0; }
body.sx table.table .btn { height: 34px; padding: 0 12px !important; font-size: 13px; border-radius: 10px; }

/* Bootstrap 2 modal → hoja/diálogo moderno */
body.sx .modal {
  position: fixed; top: auto; bottom: 0; left: 50%; width: min(460px, calc(100% - 16px)); margin: 0 0 calc(8px + var(--sx-safe-b)); transform: translateX(-50%);
  border: 0; border-radius: 22px; background: var(--sx-card); box-shadow: var(--sx-shadow-lg); overflow: hidden; z-index: 2050;
}
body.sx .modal.in, body.sx .modal[style*="block"] { animation: sx-modal-abajo .38s var(--sx-ease); }
@keyframes sx-modal-abajo { from { opacity: 0; transform: translate(-50%, 40px); } }
body.sx .modal.fade { top: auto; bottom: 0; transition: none; }
body.sx .modal-backdrop { background: #000; z-index: 2040; }
body.sx .modal-backdrop, body.sx .modal-backdrop.fade.in { opacity: .32; transition: none; }
body.sx .modal-body { padding: 22px 20px 8px; font-size: 15.5px; max-height: none; color: var(--sx-text-2); }
body.sx .modal-body::after { content: ""; display: block; clear: both; }
body.sx .modal-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 20px 18px; border: 0; background: none; box-shadow: none; }
body.sx .modal-footer .btn { width: 100%; margin: 0; }
body.sx .modal-footer::before, body.sx .modal-footer::after { display: none; }
body.sx .modal-header { border: 0; padding: 18px 20px 0; }

/* Compra de boleto */
.sx-compra { display: flex; align-items: center; gap: 16px; margin: 10px 0 6px; }
.sx-ball--grande { width: 64px !important; height: 64px !important; font-size: 24px !important; }
.sx-compra__l { color: var(--sx-muted); font-size: 13px; font-weight: 600; }
.sx-compra__v { font-size: 24px; font-weight: 800; color: var(--sx-text); font-variant-numeric: tabular-nums; }

/* Interruptores iOS (antes plugin toggle-buttons) */
body.sx .toggle-button { display: inline-block; vertical-align: middle; }
body.sx .toggle-button input[type=checkbox] {
  -webkit-appearance: none; appearance: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 16px;
  background: #e9e9ea; cursor: pointer; transition: background .25s; border: 0; box-shadow: none;
}
body.sx .toggle-button input[type=checkbox]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .25s var(--sx-ease);
}
body.sx .toggle-button input[type=checkbox]:checked { background: #34c759; }
body.sx .toggle-button input[type=checkbox]:checked::after { transform: translateX(20px); }
body.sx .toggle-button input[type=checkbox]:focus { box-shadow: 0 0 0 4px rgba(52, 199, 89, .2); }

/* Viejos que ya no se usan en el diseño nuevo */
body.sx #footer, body.sx .navbar.main, body.sx .menu-large { display: none !important; }
body.sx iframe#oculto { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }
body.sx #main_container { position: relative; z-index: 1060; }

/* 6. Portada ------------------------------------------------------------------ */
.sx-hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 20px; margin-bottom: 16px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #ff8a8d 0%, var(--sx-primary) 45%, #b8242a 100%);
  box-shadow: 0 12px 30px rgba(229, 72, 77, .28);
}
.sx-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.sx-hero__top { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.sx-hero__logo { flex: none; width: 58px; height: 58px; border-radius: 16px; background: rgba(255, 255, 255, .95); display: grid; place-items: center; overflow: hidden; color: var(--sx-primary); font-weight: 800; font-size: 20px; }
.sx-hero__logo { position: relative; }
.sx-hero__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sx-hero__kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.sx-hero__title { margin: 2px 0 0; color: #fff !important; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sx-hero__meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sx-hero__pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 13px; font-weight: 650; }
.sx-count { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.sx-count__box { border-radius: 14px; padding: 10px 4px 8px; background: rgba(255, 255, 255, .16); text-align: center; }
.sx-count__n { display: block; font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sx-count__l { display: block; margin-top: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.sx-hero__cta { position: relative; z-index: 1; margin-top: 16px; }
.sx-hero__cta .sx-btn { background: #fff; color: var(--sx-primary) !important; box-shadow: none; }
.sx-hero.is-cerrado .sx-count { opacity: .55; }

.sx-precios { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sx-precio {
  border: 1.5px solid var(--sx-line); border-radius: 16px; background: var(--sx-card); padding: 12px 14px; text-align: left; cursor: pointer;
  font-family: var(--sx-font); transition: border-color .2s, box-shadow .2s, transform .12s;
}
.sx-precio:active { transform: scale(.98); }
.sx-precio.is-active { border-color: var(--sx-primary); box-shadow: 0 0 0 4px var(--sx-primary-soft); }
.sx-precio__l { display: block; font-size: 11.5px; font-weight: 700; color: var(--sx-muted); text-transform: uppercase; letter-spacing: .05em; }
.sx-precio__v { display: block; font-size: 18px; font-weight: 800; color: var(--sx-text); font-variant-numeric: tabular-nums; }
.sx-precio__p { display: block; margin-top: 2px; font-size: 13px; color: var(--sx-text-2); }
.sx-boletos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sx-boleto {
  aspect-ratio: 1; width: 100%; border: 0; border-radius: 50%; cursor: pointer; font: 900 clamp(22px, 2.4vw, 30px)/1 var(--sx-font); font-variant-numeric: tabular-nums; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 0 1px rgba(0, 0, 0, .3); letter-spacing: .02em;
  background: radial-gradient(circle at 32% 28%, #4ade80, #16a34a 62%, #0f7a36);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .18), 0 4px 10px rgba(22, 163, 74, .25); transition: transform .14s var(--sx-ease);
}
.sx-boleto:hover { transform: translateY(-2px); }
.sx-boleto:active { transform: scale(.92); }
.sx-boleto.is-vendido { background: #e5e5ea; color: #a1a1a8; box-shadow: none; cursor: default; }

.sx-instruccion { margin: 0 4px 16px; color: var(--sx-text-2); font-size: 14px; }
.sx-recordar { display: flex !important; align-items: center; gap: 8px; margin: 4px 0 16px !important; font-weight: 600 !important; color: var(--sx-text-2) !important; cursor: pointer; }
.sx-compra-card .sx-card__head { flex-wrap: wrap; }

/* Textos largos del administrador (Información, Publicidad, avisos) */
.sx-prosa { display: flow-root; font-size: 15px; line-height: 1.65; color: var(--sx-text-2); overflow-wrap: anywhere; }
.sx-prosa p { margin: 0 0 12px; }
.sx-prosa h1, .sx-prosa h2, .sx-prosa h3, .sx-prosa h4 { margin: 18px 0 8px; line-height: 1.25; }
.sx-prosa ol, .sx-prosa ul { padding-left: 22px; margin: 0 0 12px; }
.sx-prosa li { margin-bottom: 6px; }
.sx-prosa img { max-width: 100%; height: auto; border-radius: 12px; }
.sx-prosa iframe, .sx-prosa video { max-width: 100%; border: 0; border-radius: 14px; }
.sx-prosa table { max-width: 100%; }
.sx-banner { display: block; width: 100%; border-radius: var(--sx-r-lg); margin-bottom: 16px; }
.sx-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 2px 14px; }

/* Barras de botones (pronóstico/estadísticas) */
.sx-toolbar { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 14px !important; float: none !important; }
.sx-toolbar > div { float: none !important; margin: 0 !important; }
.sx-toolbar form { margin: 0; }
.sx-toolbar--par { display: grid !important; grid-template-columns: 1fr 1fr; }
.sx-toolbar--par .btn, .sx-toolbar--par form { width: 100%; }
.sx-toolbar--uno .btn { width: 100%; }
/* Campos de texto con ancho fijo muy chico en el código viejo (Sorteo base, Mover, Posiciones…) */
body.sx .sx-page input[type=text][style*="width"], body.sx .sx-page input:not([type])[style*="width"] { min-width: 110px; }
.sx-toolbar--graficas .btn { min-width: 46px; }
.sx-toolbar--graficas .sx-muted { font-size: 13px; font-weight: 600; margin-right: 4px; }
body.sx #formulas { min-height: 120px; padding: 12px 14px; border-radius: var(--sx-r); background: var(--sx-card-2);
  font: 500 13.5px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--sx-text-2); }
/* Botones sin clase del código viejo (Guardar/Limpiar del lienzo, etc.) */
body.sx .sx-page button:not([class]), body.sx .sx-page input[type=button], body.sx .sx-page input[type=submit]:not([class]) {
  height: 38px; padding: 0 14px; margin: 4px 4px 4px 0; border: 0; border-radius: 10px; background: var(--sx-card-2);
  color: var(--sx-text); font: 650 14px/1 var(--sx-font); cursor: pointer;
}
body.sx .sx-page canvas { max-width: 100%; border-radius: 12px; border: 1.5px solid var(--sx-line-2) !important; background: #fff; touch-action: none; }

/* Buscar jugada (Pronóstico) */
.sx-bj-card { margin-top: 6px; }
.sx-bj-card .sx-card__head { flex-wrap: wrap; }
.sx-bj-card .sx-card__title { white-space: nowrap; }
.sx-bj-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sx-bj-ctrl select { height: 42px !important; margin: 0 !important; width: auto; }
.sx-bj { display: grid; gap: 12px; font-size: 14px; color: var(--sx-text-2); }
.sx-bj b { color: var(--sx-text); }
.sx-bj__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 12px; border-radius: 12px; background: var(--sx-card-2); }
.sx-bj__ref { display: grid; gap: 6px; }
.sx-bj__k { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-muted); }
.sx-bj__figs { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-bj code { padding: 3px 8px; border-radius: 8px; border: 0; background: var(--sx-blue-soft); color: #173a85; font: 600 12.5px ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.sx-bj__aviso { padding: 8px 10px; border-radius: 10px; background: var(--sx-gold-soft); color: #7a4d00; font-size: 13px; }
.sx-bj__nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sx-bj__num { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "b v" "e e"; align-items: center; gap: 4px 10px; padding: 10px; border: 1.5px solid var(--sx-line); border-radius: 14px; background: var(--sx-card); }
.sx-bj__num .sx-ball { grid-area: b; }
.sx-bj__v { grid-area: v; font-weight: 800; color: var(--sx-text); }
.sx-bj__ej { grid-area: e; font: 500 11.5px/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--sx-muted); }
.sx-bj__num.is-ok { border-color: var(--sx-green); box-shadow: 0 0 0 4px var(--sx-green-soft); }
.sx-bj__real { padding: 10px 12px; border-radius: 12px; background: var(--sx-green-soft); color: #0f5a32; }
.sx-ball.sx-ball--chica { width: 34px; height: 34px; font-size: 14px; }
.sx-ball.sx-ball--par { width: auto; min-width: 64px; padding: 0 10px; border-radius: 17px; }
.sx-bj__movers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sx-bj__mv { padding: 10px 12px; border-radius: 12px; background: var(--sx-card-2); font-size: 13px; line-height: 1.5; }
.sx-bj__mv.is-ciclo { box-shadow: inset 0 0 0 2px var(--sx-primary-soft); }
.sx-bj__mv .sx-tag { height: 20px; min-width: 0; font-size: 11px; background: var(--sx-primary-soft); color: var(--sx-primary) !important; }
.sx-bj__combos { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.sx-bj-num { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; font-size: 13px; }
.sx-bj-num input { width: 64px !important; min-width: 0 !important; height: 42px !important; margin: 0 !important; text-align: center; }

/* Historial */
.sx-hist__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 2px 10px; }
.sx-hist__head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.sx-hist__total { color: var(--sx-muted); font-size: 13px; font-weight: 600; }
.sx-hist { background: var(--sx-card); border-radius: var(--sx-r-lg); box-shadow: var(--sx-shadow); overflow: hidden; }
.sx-res {
  display: grid; grid-template-columns: 18px 1fr auto; grid-template-areas: "estado info ganador" "estado accion accion";
  align-items: center; column-gap: 12px; row-gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--sx-line);
  animation: sx-fade .35s;
}
.sx-res:last-child { border-bottom: 0; }
.sx-res.is-open { background: linear-gradient(90deg, rgba(34, 197, 94, .07), transparent 60%); }
.sx-res__estado { grid-area: estado; align-self: start; padding-top: 6px; }
.sx-res__info { grid-area: info; min-width: 0; }
.sx-res__num { display: flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sx-res__num .sx-muted { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.sx-res__fecha { color: var(--sx-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.sx-sep { margin: 0 5px; }
.sx-res__ganador { grid-area: ganador; }
.sx-res__accion { grid-area: accion; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sx-res__accion:empty { display: none; }
.sx-res__admin { grid-column: 2 / -1; display: flex; gap: 8px; align-items: center; }
.sx-edit { cursor: pointer; border: 0; background: none; padding: 0; font: inherit; color: inherit; }
.sx-res__num .sx-edit, .sx-res__fecha .sx-edit { border-bottom: 1.5px dashed var(--sx-line-2); }
.sx-iconlink { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--sx-green-soft); color: var(--sx-green) !important; }
.sx-iconlink svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.sx-vacio { padding: 28px 16px; text-align: center; color: var(--sx-muted); font-size: 14px; }

/* Inicio de sesión */
.sx-auth { max-width: 440px; margin: 8px auto 0; }
.sx-auth__logo { width: 72px; height: 72px; margin: 6px auto 14px; border-radius: 22px; font-size: 26px; }
.sx-auth h1 { margin: 0; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.sx-auth__sub { margin: 4px 0 20px; text-align: center; color: var(--sx-muted); }
.sx-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: rgba(118, 118, 128, .12); margin-bottom: 16px; }
.sx-seg button { height: 34px; border: 0; border-radius: 10px; background: none; font: 650 13.5px/1 var(--sx-font); color: var(--sx-text-2); cursor: pointer; }
.sx-seg button.is-active { background: var(--sx-card); color: var(--sx-text); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.sx-field { position: relative; margin-bottom: 12px; }
.sx-field label { margin: 0 0 6px !important; }
.sx-field__pre { position: absolute; left: 14px; bottom: 20px; color: var(--sx-muted); font-weight: 600; }
.sx-field input { width: 100%; margin: 0 !important; }
.sx-tel input { padding-left: 14px !important; letter-spacing: .06em; font-variant-numeric: tabular-nums; }

/* 7. Responsive ----------------------------------------------------------------- */
@media (min-width: 768px) {
  .sx-page { padding: 24px 24px 48px; }
  .sx-pagehead h1 { font-size: 32px; }
  .sx-boletos { grid-template-columns: repeat(10, 1fr); }
  .sx-res { grid-template-columns: 18px 230px 56px 1fr 190px; grid-template-areas: "estado info ganador accion admin"; padding: 12px 20px; }
  .sx-res__admin { grid-column: auto; grid-area: admin; justify-content: flex-end; }
  .sx-res__accion { justify-content: flex-start; }
  .sx-hero { padding: 26px; }
  .sx-count__n { font-size: 34px; }
  body.sx .modal { bottom: auto; top: 50% !important; margin: 0; transform: translate(-50%, -50%); }
  body.sx .modal.in, body.sx .modal[style*="block"] { animation-name: sx-modal-centro; }
  @keyframes sx-modal-centro { from { opacity: 0; transform: translate(-50%, -46%); } }
  .sx-dialog { place-items: center; }
}
@media (min-width: 992px) {
  .sx-sidebar { display: block; }
  .sx-main { padding-left: var(--sx-side); }
  .sx-tabbar, .sx-sheet, .sx-scrim, .sx-only-mobile { display: none !important; }
  .sx-page { padding: 28px 32px 56px; }
  .sx-topbar { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 991px) {
  .sx-only-desktop { display: none !important; }
}
@media (max-width: 767px) {
  body.sx .row-fluid [class*="span"] { width: 100% !important; margin-left: 0 !important; float: none; }
  body.sx .widget .widget-body { padding: 10px 14px 16px; }
  .sx-brand__sub { display: none; }
  .sx-precios { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px 16px; padding: 4px 18px 6px; scrollbar-width: none; }
  .sx-precios::-webkit-scrollbar { display: none; }
  .sx-precio { flex: 0 0 132px; scroll-snap-align: start; }
  body.sx table.table { font-size: 13.5px; }
}
@media (max-width: 380px) {
  .sx-saldo { padding-right: 9px; font-size: 12.5px; }
  .sx-brand__name { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Pizarra de 50 líneas (Pronóstico, admin) ───────────────────────────── */
.sx-piz { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: var(--sx-r); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); padding: 12px; }
.sx-piz__head { font-size: 12px; font-weight: 700; color: var(--sx-muted); margin: 0 2px 10px; }
.sx-piz__wrap { position: relative; }
.sx-piz__svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; color: var(--sx-text); z-index: 2; }
.sx-piz__grid { display: grid; grid-template-columns: 92px 38px 38px; justify-content: center; column-gap: 6px; row-gap: 2px; align-items: center; }
.sx-piz__h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--sx-muted); padding-bottom: 4px; text-align: center; }
.sx-piz__n { font-size: 11px; font-weight: 700; color: var(--sx-muted); font-variant-numeric: tabular-nums; }
.sx-piz__s { font-size: 12px; color: var(--sx-text-2); font-variant-numeric: tabular-nums; text-align: center; }
.sx-piz__c { height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--sx-card-2); border: 1px solid var(--sx-line); }
.sx-piz__c span { font-size: 15px; font-weight: 800; color: var(--sx-text); font-variant-numeric: tabular-nums; position: relative; z-index: 3; }
.sx-piz__sep { margin: 12px 0 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--sx-primary); }
.sx-piz__juego { display: grid; gap: 4px; font-size: 13px; }
.sx-piz__juego b { font-size: 16px; color: var(--sx-text); }
.sx-piz__leyenda { display: grid; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--sx-text-2); }
.sx-piz__leyenda:empty { display: none; }
.sx-piz__n { display: inline-block; padding: 0 5px; border-radius: 6px; color: #1f9d55; font-weight: 700; cursor: pointer; transition: background .15s; }
.sx-piz__n:hover { background: var(--sx-green-soft); }
.sx-piz__n.is-sel { background: #1f9d55; color: #fff; }
.sx-piz__sel { font-weight: 600; color: var(--sx-text); }
.sx-piz__sel:empty { display: none; }
.sx-piz__muestra { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.sx-bj__num[data-sx-fig] { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sx-bj__num[data-sx-fig]:hover { transform: translateY(-1px); }
.sx-bj__num.is-sel { border-color: var(--sx-text); box-shadow: 0 0 0 4px var(--sx-line-2); }
.sx-piz__muestra--guia { background: repeating-linear-gradient(90deg, var(--sx-text) 0 5px, transparent 5px 9px); }
.sx-bj__guia { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--sx-line-2); display: grid; gap: 8px; }
.sx-bj__num--guia { border-style: dashed; }
.sx-bj__fuente { background: rgba(245, 179, 1, .22); padding: 0 4px; border-radius: 6px; }
.sx-piz__c.is-burbuja span { visibility: hidden; }
.sx-piz__grid > .sx-piz__n, .sx-piz__grid > .sx-piz__h:first-child { text-align: left; }

/* ── Avisos estilo iOS: banner translúcido, icono redondo, título + detalle ─────────────── */
.sx-toast { gap: 12px; padding: 10px 16px 10px 10px; border-radius: 20px; background: rgba(250, 250, 252, .97); color: var(--sx-text);
  border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 10px 30px rgba(0, 0, 0, .14), 0 1px 3px rgba(0, 0, 0, .08); cursor: pointer;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.sx-toast__ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sx-blue); color: #fff; font-size: 16px; }
.sx-toast__ico svg { width: 18px; height: 18px; }
.sx-toast--ok .sx-toast__ico { background: #34c759; }
.sx-toast--error .sx-toast__ico { background: #ff3b30; }
.sx-toast--carga .sx-toast__ico { background: var(--sx-card-2); }
.sx-toast__spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(60, 60, 67, .2); border-top-color: var(--sx-blue); animation: sx-giro .8s linear infinite; }
@keyframes sx-giro { to { transform: rotate(360deg); } }
.sx-toast__txt { display: grid; gap: 1px; min-width: 0; }
.sx-toast__txt b { font-size: 14px; font-weight: 700; }
.sx-toast__txt small { font-size: 12.5px; color: var(--sx-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-toast__txt small:empty { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sx-toast { background: rgba(44, 44, 50, .97); border-color: rgba(255, 255, 255, .08); color: #fff; }
  :root:not([data-theme="light"]) .sx-toast__txt small { color: rgba(235, 235, 245, .6); }
}

/* ── Pistas del 1.er número (juego sin fórmula guardada) ─────────────────────────────────── */
.sx-bj__pistas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.sx-bj__pista { display: grid; gap: 3px; text-align: left; font: inherit; font-size: 13px; color: var(--sx-text); background: var(--sx-card); border: 1.5px solid var(--sx-line); border-radius: 14px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sx-bj__pista:hover { border-color: var(--sx-primary); transform: translateY(-1px); }
.sx-bj__pista:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--sx-primary-soft); border-color: var(--sx-primary); }
.sx-bj__pista code { font-size: 12.5px; }
.sx-bj__pn { justify-self: start; font-weight: 800; font-size: 12px; color: #fff; background: var(--sx-primary); border-radius: 999px; padding: 1px 8px; }
.sx-bj__otra { font-size: 12.5px; font-weight: 700; color: var(--sx-blue); margin-left: 6px; }
.sx-bj__pista.is-sel { border-color: var(--sx-primary); box-shadow: 0 0 0 3px var(--sx-primary-soft); }

/* ── Sugerencia de dos pizarras: allá rojo/amarillo, hoy azul/verde ──────────────────────── */
.sx-bj__sug { display: grid; gap: 6px; margin: 10px 0 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; background: var(--sx-card-2); border: 1px solid var(--sx-line); border-radius: 14px; }
.sx-bj__c { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 8px; border: 1.5px solid currentColor; }
.sx-bj__c--rojo { color: #e5484d; }
.sx-bj__c--amarillo { color: #c98a00; }
.sx-bj__c--azul { color: #2f6fed; }
.sx-bj__c--verde { color: #1f9d55; }
.sx-piz + .sx-piz { margin-top: 14px; }

/* ── Guardar la fórmula del 2.º número en el sorteo siguiente (barra abajo) ──────────────── */
.sx-g2 { position: fixed; z-index: 1900; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(520px, calc(100% - 24px));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 18px; background: rgba(250, 250, 252, .97); color: var(--sx-text);
  border: 1px solid var(--sx-line); box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.06); animation: sx-toast-in .3s var(--sx-ease); }
.sx-g2__txt { flex: 1; display: grid; min-width: 0; }
.sx-g2__txt small { font-size: 12px; color: var(--sx-muted); }
.sx-g2__txt b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sx-g2__ok { flex: none; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: #1f9d55; border: 0; border-radius: 12px; padding: 10px 16px; cursor: pointer; transition: filter .15s, background .15s; }
.sx-g2__ok:hover { filter: brightness(1.06); }
.sx-g2__ok:disabled { cursor: default; opacity: .8; }
.sx-g2__ok.is-ok { background: #34c759; opacity: 1; }
.sx-g2__x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--sx-card-2); color: var(--sx-muted); font-size: 20px; line-height: 1; cursor: pointer; }
@media (prefers-color-scheme: dark) { .sx-g2 { background: rgba(44, 44, 46, .97); } }

/* Botones MOVER que no le tocan al juego: grises y deshabilitados */
body.sx .btn.sx-mover-off, body.sx .btn.sx-mover-off:hover { background: #e5e5ea !important; border-color: #e5e5ea !important; color: #8e8e93 !important; cursor: not-allowed; box-shadow: none !important; transform: none !important; filter: none !important; }

/* Pista que sigue el rumbo de los juegos (subiendo/bajando) */
.sx-bj__rumbo { color: #1f9d55; }

/* ── App instalable: sugerencia de instalar (abajo) ───────────────────────────────────────── */
.sx-inst { position: fixed; z-index: 1950; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(460px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px; border-radius: 20px; background: rgba(250, 250, 252, .97); color: var(--sx-text);
  border: 1px solid var(--sx-line); box-shadow: 0 12px 34px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.06);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); animation: sx-toast-in .35s var(--sx-ease); }
.sx-inst.is-out { animation: sx-toast-out .3s var(--sx-ease) forwards; }
.sx-inst__ico { flex: none; width: 46px; height: 46px; border-radius: 11px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.sx-inst__txt { flex: 1; display: grid; gap: 2px; min-width: 0; }
.sx-inst__txt b { font-size: 14.5px; }
.sx-inst__txt small { font-size: 12.5px; color: var(--sx-text-2); line-height: 1.4; }
.sx-inst__share { width: 15px; height: 15px; vertical-align: -2px; color: var(--sx-blue); }
.sx-inst__ok { flex: none; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: var(--sx-blue); border: 0; border-radius: 12px; padding: 9px 16px; cursor: pointer; }
.sx-inst__x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--sx-card-2); color: var(--sx-muted); font-size: 20px; line-height: 1; cursor: pointer; }
@media (prefers-color-scheme: dark) { .sx-inst { background: rgba(44, 44, 46, .97); } }

/* ── Mi cuenta (administrador): generador del ícono de la app (diseño del ERP) ────────────── */
.sx-gi { display: grid; gap: 14px; margin: 18px 0; }
.sx-gi__hero { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 20px; color: #fff;
  background: linear-gradient(110deg, #0a84ff 0%, #3b82f6 55%, #8b5cf6 100%); box-shadow: 0 10px 28px rgba(59,130,246,.28); overflow: hidden; position: relative; }
.sx-gi__hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); }
.sx-gi__hico { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.sx-gi__hico svg { width: 26px; height: 26px; }
.sx-gi__hero b { display: block; font-size: 18px; font-weight: 800; }
.sx-gi__hero small { display: block; margin-top: 3px; font-size: 13px; opacity: .92; }
.sx-gi__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sx-gi__st { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: 16px; }
.sx-gi__si { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; font-weight: 800; }
.sx-gi__si--ok { background: #e7f6ec; color: #1f9d55; }
.sx-gi__si--sis { background: #e8f0fe; color: #2f6fed; }
.sx-gi__st small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-muted); }
.sx-gi__st b { font-size: 14px; }
.sx-gi__num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.sx-gi__dir { padding: 12px 16px; background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: 14px; display: grid; gap: 4px; }
.sx-gi__dir small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-muted); }
.sx-gi__dir { min-width: 0; overflow: hidden; }
/* Bootstrap pone white-space:nowrap a <code>: la ruta larga empujaba la página de lado en el celular */
body.sx .sx-gi__dir code { display: block; font-size: 12px; color: var(--sx-blue); background: none; border: 0; padding: 0; white-space: normal; word-break: break-all; overflow-wrap: anywhere; }
.sx-gi__card { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); padding: 18px; display: grid; gap: 16px; }
.sx-gi__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--sx-line); }
.sx-gi__head b { font-size: 15px; }
.sx-gi__head small { font-size: 12px; color: var(--sx-text-2); font-weight: 600; }
.sx-gi__drop { margin: 0; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 42px 16px; border: 2px dashed #c7c7cc; border-radius: 16px; background: var(--sx-card-2); cursor: pointer; transition: border-color .15s, background .15s; }
.sx-gi__drop:hover, .sx-gi__drop.is-sobre { border-color: var(--sx-blue); background: #eef4ff; }
.sx-gi__drop svg { width: 44px; height: 44px; color: #6b7280; }
.sx-gi__drop b { font-size: 15px; }
.sx-gi__drop small { font-size: 12.5px; color: var(--sx-text-2); }
.sx-gi__info { display: grid; gap: 4px; padding: 12px 16px; border-radius: 12px; background: #eef4ff; border: 1px solid #d6e4ff; font-size: 13px; }
.sx-gi__prevh { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sx-gi__prevh b { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-text-2); }
.sx-gi__prevh span { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sx-gi__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; }
.sx-gi__dot--pers { background: #1f9d55; }
.sx-gi__dot--sis { background: #2f6fed; }
.sx-gi__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sx-gi__it { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--sx-line); border-radius: 14px; background: var(--sx-card); }
.sx-gi__it img { flex: none; width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.sx-gi__falta { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--sx-card-2); color: var(--sx-muted); }
.sx-gi__fn { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-gi__tam { flex: none; font-size: 11px; color: var(--sx-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.sx-gi__it::after { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; border: 2px solid var(--sx-card); }
.sx-gi__it--pers { border-color: #bfe8cc; }
.sx-gi__it--pers::after { content: "✓"; background: #1f9d55; }
.sx-gi__it--sis { border-color: #cfdcfb; }
.sx-gi__it--sis::after { content: ""; background: #2f6fed; width: 12px; height: 12px; top: -4px; right: -4px; }
/* Responsive: nada se sale de la pantalla en el celular */
.sx-gi, .sx-gi * { box-sizing: border-box; }
.sx-gi { width: 100%; max-width: 100%; min-width: 0; }
.sx-gi > *, .sx-gi__card > *, .sx-gi__st > div, .sx-gi__hero > div { min-width: 0; }
.sx-gi__st b, .sx-gi__hero small, .sx-gi__drop small { overflow-wrap: anywhere; }
.sx-gi__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
@media (max-width: 760px) {
  .sx-gi__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sx-gi__hero { padding: 16px; gap: 12px; }
  .sx-gi__hico { width: 44px; height: 44px; border-radius: 13px; }
  .sx-gi__hero b { font-size: 16px; }
  .sx-gi__card { padding: 14px; border-radius: 16px; }
  .sx-gi__drop { padding: 28px 12px; }
  .sx-gi__st { padding: 10px; gap: 10px; }
  .sx-gi__si { width: 34px; height: 34px; font-size: 15px; }
}
@media (max-width: 420px) {
  .sx-gi__hero { flex-direction: column; align-items: flex-start; }
  .sx-gi__stats { grid-template-columns: 1fr; }
  .sx-gi__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-gi__it { padding: 8px; gap: 8px; }
  .sx-gi__tam { display: none; }
  .sx-gi__head small { font-size: 11.5px; }
}

/* ── Mi cuenta (V1.0.1): tarjetas por sección, contraseña con ojo y fuerza, barra de guardar ─── */
.sx-mc { display: grid; gap: 14px; margin: 0 0 18px; }
.sx-mc__perfil { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, #e5484d 0%, #f2555a 45%, #ff7a59 100%); box-shadow: 0 12px 30px rgba(229,72,77,.28); position: relative; overflow: hidden; }
.sx-mc__perfil::after { content: ""; position: absolute; right: -50px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); }
.sx-mc__avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.55); }
.sx-mc__quien { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sx-mc__quien b { font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-mc__quien > span { font-size: 13px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-mc__cod { position: relative; z-index: 1; flex: none; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; text-align: left; font: inherit; color: #fff;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 14px; padding: 8px 12px; cursor: pointer; transition: background .15s; }
.sx-mc__cod:hover { background: rgba(255,255,255,.28); }
.sx-mc__cod small { grid-column: 1; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.sx-mc__cod b { grid-column: 1; font-size: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.sx-mc__cod svg { grid-column: 2; grid-row: 1 / 3; width: 18px; height: 18px; }
.sx-mc__sec { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: 20px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04); }
.sx-mc__sec h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.sx-mc__sec h3 small { flex-basis: 100%; margin-left: 46px; margin-top: -10px; font-size: 12.5px; font-weight: 500; color: var(--sx-muted); }
.sx-mc__ico { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.sx-mc__ico svg { width: 19px; height: 19px; }
.sx-mc__ico--azul { background: #e8f0fe; color: #2f6fed; }
.sx-mc__ico--violeta { background: #f0e9ff; color: #7c3aed; }
.sx-mc__ico--verde { background: #e7f6ec; color: #1f9d55; }
.sx-mc__ico--naranja { background: #fff1e0; color: #e07000; }
.sx-mc__ico--rosa { background: #fde8ef; color: #d6336c; }
.sx-mc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.sx-mc__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sx-mc__f { display: grid; gap: 6px; min-width: 0; }
.sx-mc__f--full { grid-column: 1 / -1; }
body.sx .sx-mc__f label { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--sx-text-2); }
.sx-mc__f label small { font-weight: 500; color: var(--sx-muted); }
body.sx .sx-mc input[type=text], body.sx .sx-mc input[type=tel], body.sx .sx-mc input[type=email], body.sx .sx-mc input[type=password] {
  width: 100%; height: 46px; margin: 0; padding: 0 14px; font-size: 15px; border-radius: 12px; border: 1.5px solid var(--sx-line); background: var(--sx-card-2);
  box-shadow: none; transition: border-color .15s, background .15s, box-shadow .15s; box-sizing: border-box; }
body.sx .sx-mc input:focus { border-color: var(--sx-blue); background: var(--sx-card); box-shadow: 0 0 0 4px rgba(47,111,237,.12); outline: none; }
body.sx .sx-mc input.is-cambio { border-color: #f5b301; background: #fffaeb; }
.sx-mc__pass { position: relative; }
body.sx .sx-mc__pass input { padding-right: 46px; }
.sx-mc__ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--sx-muted); cursor: pointer; display: grid; place-items: center; }
.sx-mc__ojo svg { width: 19px; height: 19px; }
.sx-mc__ojo.is-on { color: var(--sx-blue); }
.sx-mc__fuerza { display: flex; align-items: center; gap: 8px; min-height: 16px; font-size: 12px; font-weight: 700; }
.sx-mc__fuerza i { flex: 1; height: 5px; border-radius: 3px; background: var(--sx-line); position: relative; overflow: hidden; }
.sx-mc__fuerza i::after { content: ""; position: absolute; inset: 0; width: var(--f, 0%); background: var(--c, #e5484d); border-radius: 3px; transition: width .25s, background .25s; }
.sx-mc__fuerza:not(.is-on) { visibility: hidden; }
.sx-mc__igual { min-height: 16px; font-size: 12px; font-weight: 700; }
.sx-mc__igual.is-ok { color: #1f9d55; }
.sx-mc__igual.is-no { color: #e5484d; }
.sx-mc__actual { animation: sx-toast-in .25s var(--sx-ease); }
.sx-mc__sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--sx-card-2); border: 1px solid var(--sx-line); }
.sx-mc__sw b { display: block; font-size: 14.5px; }
.sx-mc__sw small { font-size: 12.5px; color: var(--sx-muted); }
.sx-mc__switch { flex: none; width: 52px; height: 32px; border-radius: 16px; border: 0; padding: 0; background: #d1d1d6; position: relative; cursor: pointer; transition: background .2s; }
.sx-mc__switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s var(--sx-ease); }
.sx-mc__switch.is-on { background: #34c759; }
.sx-mc__switch.is-on i { transform: translateX(20px); }
.sx-mc__tabs { margin-bottom: 12px; }
.sx-mc__oculto { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sx-mc__barra { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 18px;
  background: rgba(250,250,252,.96); border: 1px solid var(--sx-line); box-shadow: 0 10px 30px rgba(0,0,0,.12); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.sx-mc__estado { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--sx-muted); display: flex; align-items: center; gap: 8px; }
.sx-mc__estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34c759; }
.sx-mc__barra.is-sucio .sx-mc__estado { color: #b07800; }
.sx-mc__barra.is-sucio .sx-mc__estado::before { background: #f5b301; animation: sx-latido 1.2s infinite; }
@keyframes sx-latido { 50% { transform: scale(1.5); opacity: .5; } }
.sx-mc__desh { font: inherit; font-size: 14px; font-weight: 700; color: var(--sx-text-2); background: var(--sx-card-2); border: 1px solid var(--sx-line); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.sx-mc__barra:not(.is-sucio) .sx-mc__desh { display: none; }
.sx-mc__guardar { font: inherit; font-size: 14.5px; font-weight: 800; color: #fff; background: #e5484d; border: 0; border-radius: 12px; padding: 11px 20px; cursor: pointer; box-shadow: 0 6px 16px rgba(229,72,77,.3); transition: filter .15s, transform .15s; }
.sx-mc__guardar:hover { filter: brightness(1.05); transform: translateY(-1px); }
.sx-mc__guardar:disabled { opacity: .7; cursor: default; transform: none; }
@media (max-width: 760px) {
  .sx-mc__grid, .sx-mc__grid--3 { grid-template-columns: 1fr; }
  .sx-mc__perfil { flex-wrap: wrap; padding: 16px; }
  .sx-mc__cod { width: 100%; }
  .sx-mc__barra { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-color-scheme: dark) { .sx-mc__barra { background: rgba(44,44,46,.96); } body.sx .sx-mc input.is-cambio { background: #3a3220; } }

/* Historial (administrador): franja de los sorteos que ya tienen fórmula guardada */
.sx-res.is-formula { background: linear-gradient(90deg, rgba(47, 111, 237, .10), rgba(47, 111, 237, .03) 70%); box-shadow: inset 4px 0 0 #2f6fed; }
.sx-res.is-formula.is-open { background: linear-gradient(90deg, rgba(47, 111, 237, .10), rgba(34, 197, 94, .06) 70%); }
.sx-res__filas { display: inline-flex; align-items: center; margin-left: 6px; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 800; color: #2f6fed; background: #e8f0fe; border: 1px solid #cfdcfb; white-space: nowrap; }
.sx-res__dir { margin-left: 4px; font-size: 11px; }
.sx-res__dir--sube { color: #1f9d55; }
.sx-res__dir--baja { color: #e5484d; }
.sx-res__dir--igual { color: #8e8e93; }
/* «Ya salió» en naranja cuando NO estaba entre los propuestos (verde solo si sí estaba) */
.sx-bj__real.is-no { background: #fff1e0; color: #8a4b00; border: 1px solid #ffd8a8; }
@media (prefers-color-scheme: dark) { .sx-bj__real.is-no { background: #3a2a14; color: #ffc078; border-color: #5c3d14; } }
/* Pronóstico: filas del juego anterior (en lugar del botón ORIGEN) */
.sx-ant { float: left; margin: 10px 0 10px 10px; display: inline-grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; padding: 6px 12px; border-radius: 12px; background: #e8f0fe; border: 1px solid #cfdcfb; color: #1d4ed8; }
.sx-ant small { grid-column: 1 / -1; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #5b7bd5; }
.sx-ant b { font-size: 13.5px; }
.sx-ant span { font-size: 12.5px; color: #5b7bd5; }
/* Aviso: no se encontró el primer juego (búsqueda de respaldo por el 2.º número) */
.sx-bj__aviso1 { margin: 6px 0 4px; padding: 8px 10px; border-radius: 10px; background: #fff1e0; color: #8a4b00; border: 1px solid #ffd8a8; font-size: 12.5px; line-height: 1.45; }
.sx-bj__aviso1 b { color: #b45309; }
.sx-res__pista { display: inline-flex; align-items: center; margin-left: 4px; padding: 3px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 800; color: #fff; background: #e5484d; white-space: nowrap; }

/* ── Cobertura de filas de las fórmulas guardadas (Pronóstico) ─────────────────────────────── */
.sx-cob { float: left; clear: left; margin: 6px 0 10px 10px; width: min(320px, calc(100% - 20px)); display: grid; gap: 5px; padding: 10px 12px; border-radius: 14px; background: var(--sx-card); border: 1px solid var(--sx-line); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.sx-cob small { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sx-muted); }
.sx-cob__fila { display: grid; grid-template-columns: 52px 1fr 38px; align-items: center; gap: 8px; font-size: 12.5px; }
.sx-cob__fila i, .sx-est__card i, .sx-est__row i { position: relative; height: 8px; border-radius: 4px; background: var(--sx-card-2); overflow: hidden; }
.sx-cob__fila i::after, .sx-est__card i::after, .sx-est__row i::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); border-radius: 4px; background: #2f6fed; }
.sx-cob__fila span { text-align: right; font-weight: 800; }
.sx-cob__otra { color: var(--sx-muted); }
.sx-cob__otra i::after { background: #c7c7cc !important; }
.sx-cob em { font-style: normal; font-size: 11.5px; color: var(--sx-text-2); }
/* ── Mi cuenta: estadística de fórmulas y top de pistas ─────────────────────────────────────── */
.sx-est { display: grid; gap: 12px; margin: 18px 0; padding: 18px; border-radius: 20px; background: var(--sx-card); border: 1px solid var(--sx-line); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04); }
.sx-est__head { display: grid; gap: 2px; }
.sx-est__head b { font-size: 16px; }
.sx-est__head small { font-size: 12.5px; color: var(--sx-muted); }
.sx-est__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sx-est__card { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--sx-card-2); border: 1px solid var(--sx-line); }
.sx-est__card small { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sx-muted); }
.sx-est__card b { font-size: 24px; font-weight: 800; }
.sx-est__card--f4 b { color: #1f9d55; } .sx-est__card--f3 b { color: #2f6fed; } .sx-est__card--f2 b { color: #e07000; } .sx-est__card--f0 b { color: var(--sx-muted); }
.sx-est__top { display: grid; gap: 6px; }
.sx-est__top > b { font-size: 14px; margin-bottom: 2px; }
.sx-est__row { display: grid; grid-template-columns: 34px 44px 1fr 92px; align-items: center; gap: 10px; font-size: 13px; }
.sx-est__pos { color: var(--sx-muted); font-weight: 700; }
.sx-est__pn { display: inline-flex; justify-content: center; padding: 2px 8px; border-radius: 8px; font-weight: 800; color: #fff; background: #e5484d; font-size: 12px; }
.sx-est__n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .sx-est__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sx-est__row { grid-template-columns: 30px 40px 1fr 80px; } }
/* Mi cuenta: aciertos reales de las pistas (a ciegas) */
.sx-pron__tabla { display: grid; gap: 4px; }
.sx-pron__fila { display: grid; grid-template-columns: 52px 1fr 1fr 1fr 1fr; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sx-pron__fila:nth-child(even) { background: var(--sx-card-2); }
.sx-pron__fila--h { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sx-muted); }
.sx-pron .is-mas { color: #1f9d55; } .sx-pron .is-menos { color: #e5484d; }
.sx-pron__ult { display: grid; grid-template-columns: 64px 34px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.sx-pron__ult small { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--sx-muted); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .sx-pron__fila { grid-template-columns: 44px repeat(4, minmax(0, 1fr)); font-size: 12px; } .sx-pron__ult { grid-template-columns: 56px 30px 1fr; } .sx-pron__ult b { grid-column: 2 / -1; } }
.sx-pron__mv { display: grid; grid-template-columns: 34px 84px minmax(60px, 1fr) minmax(0, 2.4fr); align-items: center; gap: 10px; font-size: 13px; }
.sx-pron__mv i { position: relative; height: 8px; border-radius: 4px; background: var(--sx-card-2); overflow: hidden; }
.sx-pron__mv i::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); border-radius: 4px; background: #2f6fed; }
.sx-pron__mv small { color: var(--sx-muted); }
.sx-pron__mv .sx-tag { justify-content: center; }
@media (max-width: 640px) { .sx-pron__mv { grid-template-columns: 30px 78px 1fr; } .sx-pron__mv > span:last-child { grid-column: 1 / -1; } }
/* V1.0.1: ranking de puestos (1-50) en que salió el 2.º número dentro de la lista de sugeridos */
.sx-pron__pzs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; }
.sx-pron__pz { display: grid; grid-template-columns: 30px 74px minmax(40px, 1fr) auto; align-items: center; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sx-pron__pz i { position: relative; height: 8px; border-radius: 4px; background: var(--sx-card-2); overflow: hidden; }
.sx-pron__pz i::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); border-radius: 4px; background: #1f9d55; }
.sx-pron__pz small { color: var(--sx-muted); }
.sx-pron__pz .sx-tag { justify-content: center; }
