/* ==========================================================================
   Star of Christmas — classic pages (registration, photo voting, coins, winners)
   One stylesheet, same language as the video feed: pine night, gold light, soft glass.
   ========================================================================== */

:root {
  --pine: #0b1a14;
  --pine-2: #12261c;
  --pine-3: #1a3527;
  --red: #e63946;
  --red-2: #b3202e;
  --gold: #ffd166;
  --gold-2: #f4a261;
  --gold-ink: #2a1a02;
  --green: #34b36f;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --soft: rgba(255, 255, 255, 0.52);
  --faint: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.1);
  --gold-grad: linear-gradient(135deg, #fff0b8 0%, #ffd166 42%, #f4a261 100%);
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --bar-h: 60px;
  --tabs-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* legacy variable names still used by a few older blocks */
  --primary-color: #ffd166;
  --secondary-color: #12261c;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
body.sx {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #07120d;
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:where(body.sx) :is(h1, h2, h3, h4, h5, p, figure, ol, ul) { margin: 0; }
:where(body.sx) a { color: var(--gold); text-decoration: none; }
:where(body.sx) a:hover { color: #ffe29a; }
:where(body.sx) img { max-width: 100%; }
:where(body.sx) button { font: inherit; color: inherit; cursor: pointer; }
:where(body.sx) :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sx-i { flex: 0 0 auto; vertical-align: -0.18em; }

/* ---------- night sky: glow + drifting snow ---------- */
.sx-sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1100px 620px at 50% -12%, #1f4f39 0%, rgba(11, 26, 20, 0) 62%),
    radial-gradient(700px 500px at 105% 30%, rgba(230, 57, 70, 0.13), transparent 65%),
    radial-gradient(700px 520px at -8% 62%, rgba(255, 209, 102, 0.09), transparent 62%),
    linear-gradient(180deg, #0b1a14 0%, #07120d 100%);
}
.sx-sky i {
  position: absolute; inset: -220px 0 0 0; opacity: 0.5;
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 90px 110px, #fff, transparent),
    radial-gradient(2.4px 2.4px at 160px 60px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.6px 1.6px at 230px 170px, #fff, transparent),
    radial-gradient(2.4px 2.4px at 300px 20px, rgba(255, 255, 255, 0.85), transparent);
  background-size: 320px 220px;
  animation: sx-snow 16s linear infinite;
}
.sx-sky i + i { background-size: 460px 300px; opacity: 0.28; animation-duration: 26s; animation-direction: normal; filter: blur(0.6px); }
@keyframes sx-snow { to { transform: translate3d(40px, 220px, 0); } }

.sx-bar, .sx-main, .sx-foot, .sx-tabs { position: relative; z-index: 1; }
.sx-main { flex: 1 0 auto; width: 100%; }
.sx-wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sx-section { padding: 8px 0 56px; }

/* ---------- buttons ---------- */
.sx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px;
  font-weight: 800; font-size: 15px; letter-spacing: 0.01em; line-height: 1; white-space: nowrap;
  text-decoration: none !important; cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s, filter 0.18s;
}
.sx-btn:active { transform: scale(0.97); }
.sx-btn-gold { background: var(--gold-grad); color: var(--gold-ink) !important; box-shadow: 0 12px 30px -10px rgba(255, 209, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.sx-btn-gold:hover { filter: brightness(1.05); transform: translateY(-1px); }
.sx-btn-red { background: linear-gradient(135deg, #ff5a66, var(--red) 50%, var(--red-2)); color: #fff !important; box-shadow: 0 12px 30px -10px rgba(230, 57, 70, 0.6); }
.sx-btn-ghost { background: var(--glass-2); color: #fff !important; box-shadow: inset 0 0 0 1px var(--line); }
.sx-btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.sx-btn-wa { background: linear-gradient(135deg, #3fe07f, #25d366 50%, #128c4b); color: #04220f !important; box-shadow: 0 12px 30px -12px rgba(37, 211, 102, 0.6); }
.sx-btn-wa:hover { filter: brightness(1.05); }
.sx-btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.sx-btn-block { width: 100%; min-width: 0; }
.sx-btn.is-disabled, .sx-btn:disabled { opacity: 0.55; pointer-events: none; }
.sx-btn.is-busy { pointer-events: none; }
.sx-btn.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: sx-spin 0.7s linear infinite; }
@keyframes sx-spin { to { transform: rotate(360deg); } }

/* ---------- top bar ---------- */
.sx-bar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(8, 20, 15, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.sx-bar-in { width: min(1180px, 100% - 28px); height: var(--bar-h); margin-inline: auto; display: flex; align-items: center; gap: 14px; }
.sx-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #fff !important; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.sx-brand img { width: 26px; height: 30px; flex: 0 0 auto; filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.4)); }
.sx-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-nav { display: none; align-items: center; gap: 4px; margin-left: 18px; }
.sx-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 14.5px; transition: background 0.2s, color 0.2s; }
.sx-nav a:hover { color: #fff; background: var(--glass); }
.sx-nav a.is-on { color: var(--gold-ink); background: var(--gold-grad); }
.sx-bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sx-wallet { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 9px; border-radius: 999px; background: rgba(255, 209, 102, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.35); color: var(--gold) !important; font-size: 14.5px; }
.sx-wallet strong { font-variant-numeric: tabular-nums; }
.sx-account { position: relative; }
.sx-account summary { list-style: none; cursor: pointer; }
.sx-account summary::-webkit-details-marker { display: none; }
.sx-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #2f6045, #173727); box-shadow: inset 0 0 0 1px var(--line); font-weight: 800; color: #fff; }
.sx-account-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 8px; border-radius: 16px; background: #14291f; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); animation: sx-pop 0.18s var(--ease); }
.sx-account-menu a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: #fff !important; font-weight: 600; font-size: 14.5px; }
.sx-account-menu a:hover { background: var(--glass-2); }
.sx-account-name { padding: 8px 12px 10px; margin-bottom: 4px !important; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes sx-pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

/* ---------- bottom tabs (phones) ---------- */
.sx-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; height: calc(var(--tabs-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  background: rgba(8, 20, 15, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sx-tabs a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--soft); font-size: 11px; font-weight: 700; position: relative; }
.sx-tabs a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-tabs a.is-on { color: var(--gold); }
.sx-tabs a.is-on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold-grad); box-shadow: 0 0 14px rgba(255, 209, 102, 0.8); }
body.sx-has-tabs .sx-foot { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 26px); }
@media (min-width: 860px) {
  .sx-tabs { display: none; }
  .sx-nav { display: flex; }
  body.sx-has-tabs .sx-foot { padding-bottom: 34px; }
}

/* ---------- page header ---------- */
.sx-hero { padding: clamp(28px, 6vw, 64px) 0 clamp(18px, 3vw, 28px); }
.sx-hero.is-compact { padding-top: clamp(22px, 4vw, 40px); }
.sx-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px !important; padding: 6px 13px; border-radius: 999px; background: rgba(255, 209, 102, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.28); color: var(--gold); font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sx-title {
  max-width: 17ch; font-size: clamp(34px, 7.2vw, 64px); font-weight: 800; line-height: 1.03; letter-spacing: -0.03em;
  background: linear-gradient(100deg, #ffffff 30%, #ffe9b0 70%, #ffd166 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance; padding-bottom: 0.12em;
}
.sx-lead { max-width: 56ch; margin-top: 14px; color: var(--muted); font-size: clamp(15px, 2.2vw, 18px); }
.sx-lead p + p { margin-top: 8px; }
.sx-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- countdown ---------- */
.sx-countdown { width: min(1180px, 100% - 32px); margin: 0 auto 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.public-countdown-label { color: var(--muted); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.countdown-timer { display: flex; gap: 8px; }
.countdown-section { min-width: 66px; padding: 9px 10px 8px; border-radius: 14px; text-align: center; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.countdown-number { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--gold); }
.countdown-label { margin-top: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }
.countdown-over { padding: 10px 16px; border-radius: 14px; background: var(--glass); color: var(--muted); font-weight: 700; }

/* ---------- notes & empty states ---------- */
.sx-note { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(91, 164, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(91, 164, 255, 0.28); color: #d7e8ff; font-size: 14.5px; }
.sx-note .sx-i { margin-top: 2px; }
.sx-note.is-warn { background: rgba(255, 209, 102, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.32); color: #ffe9b0; }
.sx-note.is-ok { background: rgba(52, 179, 111, 0.13); box-shadow: inset 0 0 0 1px rgba(52, 179, 111, 0.4); color: #c9f5dc; }
.sx-empty { display: none; margin: 10px auto 0; max-width: 460px; padding: 44px 24px; text-align: center; border-radius: var(--r-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.sx-empty.is-on, .sx-empty.public-empty-state { display: block; }
.sx-empty h3 { font-size: 21px; font-weight: 800; }
.sx-empty p { margin-top: 8px; color: var(--muted); }
.sx-empty-art { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; color: var(--gold); background: radial-gradient(circle, rgba(255, 209, 102, 0.22), rgba(255, 209, 102, 0.03) 70%); animation: sx-float 4s ease-in-out infinite; }
@keyframes sx-float { 50% { transform: translateY(-6px); } }

/* ==========================================================================
   Ballot
   ========================================================================== */
.sx-ballot { padding: 0 0 64px; }
.sx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 14px; border-radius: var(--r-md); overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.sx-stat { padding: 13px 8px 12px; text-align: center; background: #0f2119; }
.sx-stat b { display: block; font-size: clamp(19px, 4.6vw, 28px); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sx-stat span { display: block; margin-top: 3px; color: var(--soft); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.sx-stat.is-live b { display: inline-flex; align-items: center; gap: 8px; -webkit-background-clip: border-box; background: none; color: #fff; }
.sx-stat.is-live i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); animation: sx-pulse 1.6s infinite; }
.is-closed .sx-stat.is-live i { background: var(--gold); animation: none; }
@keyframes sx-pulse { 70% { box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); } 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); } }

.sx-toolbar {
  position: relative; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding: 8px;
  border-radius: 18px; background: rgba(13, 29, 22, 0.86);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px var(--line), 0 16px 40px -22px rgba(0, 0, 0, 0.8);
}
.sx-search { flex: 1 1 220px; display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: var(--soft); }
.sx-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: 16px; }
.sx-search input::placeholder { color: var(--soft); }
.sx-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold); }
.sx-select { flex: 1 1 150px; position: relative; display: flex; align-items: center; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: var(--soft); }
.sx-select .sx-i { position: absolute; left: 12px; pointer-events: none; }
.sx-select select { width: 100%; height: 100%; padding: 0 34px 0 34px; border: 0; outline: 0; border-radius: inherit; background: none; color: #fff; font: inherit; font-size: 15px; font-weight: 600; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23ffd166' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.500 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.sx-select select option { color: #111; background: #fff; }
.sx-select:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold); }
.sx-seg { flex: 0 0 auto; display: flex; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); }
.sx-seg button { height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.sx-seg button.is-active { background: var(--gold-grad); color: var(--gold-ink); box-shadow: 0 6px 16px -8px rgba(255, 209, 102, 0.8); }
.sx-hint { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 2px 16px !important; color: var(--soft); font-size: 13px; }
.sx-hint span:first-child { color: var(--gold); font-weight: 700; }
.candidates-skeleton { display: none; }

/* grid: the leader gets the big frame */
.sx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.candidate-card { min-width: 0; will-change: transform; }
.candidate-card.is-hidden { display: none; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .sx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .sx-grid:not(.is-flat) .candidate-card[data-rank="1"] { grid-column: span 2; grid-row: span 2; }
}
@media (min-width: 980px) { .sx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1240px) { .sx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.vote-card {
  position: relative; height: 100%; display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden; background: #10231a;
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -26px rgba(0, 0, 0, 0.9);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
@media (hover: hover) { .vote-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 26px 50px -24px rgba(0, 0, 0, 0.95); } }
.vote-card .thumb { position: relative; flex: 1 1 auto; aspect-ratio: 3 / 4; overflow: hidden; background: linear-gradient(160deg, #1d4a35, #0d1f17); isolation: isolate; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.vote-card .thumb[role="button"] { cursor: pointer; }
.sx-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: filter 0.6s var(--ease), transform 0.5s var(--ease); -webkit-user-drag: none; }
.sx-photo-none { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: rgba(255, 255, 255, 0.2); }
.vote-card .thumb.bw-photo .sx-photo-img { filter: grayscale(1) contrast(1.06) brightness(0.86); }
.vote-card .thumb::after { content: ""; position: absolute; inset: 38% 0 0 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(5, 12, 9, 0) 0%, rgba(5, 12, 9, 0.58) 55%, rgba(5, 12, 9, 0.94) 100%); }
.vote-card .thumb.is-pop .sx-photo-img { animation: sx-photo-pop 0.34s var(--ease); }
@keyframes sx-photo-pop { 35% { transform: scale(1.045); } }

.rank-badge { position: absolute; z-index: 3; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(5, 12, 9, 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); color: #fff; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-badge b::before { content: "#"; opacity: 0.7; }
.rank-badge .sx-i { display: none; }
.rank-badge.rank-1, .rank-badge.rank-2, .rank-badge.rank-3 { color: var(--gold-ink); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-backdrop-filter: none; backdrop-filter: none; }
.rank-badge.rank-1 { background: var(--gold-grad); }
.rank-badge.rank-1 .sx-i { display: block; }
.rank-badge.rank-2 { background: linear-gradient(135deg, #ffffff, #cfd8e0 55%, #94a3b1); }
.rank-badge.rank-3 { background: linear-gradient(135deg, #ffd9b5, #e09a5e 55%, #b0672f); }
.candidate-card.is-climb .rank-badge { animation: sx-climb 1.4s var(--ease); }
@keyframes sx-climb { 0% { transform: translateY(10px) scale(0.8); } 30% { transform: translateY(-4px) scale(1.18); box-shadow: 0 0 0 6px rgba(52, 179, 111, 0.45); } 100% { transform: none; } }

.sx-share { position: absolute; z-index: 3; top: 8px; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(5, 12, 9, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); color: #fff; transition: background 0.2s, transform 0.2s var(--ease); }
.sx-share:hover { background: rgba(5, 12, 9, 0.8); transform: scale(1.08); }
.badge-icon { position: absolute; z-index: 3; top: 46px; left: 10px; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.sx-card-meta { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 11px; pointer-events: none; }
.candidate-name { font-size: 15.5px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sx-district { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; color: rgba(255, 255, 255, 0.82); font-size: 12px; font-weight: 600; }
.sx-district .sx-i { color: var(--gold); }
.sx-meter { height: 3px; background: rgba(255, 255, 255, 0.07); }
.sx-meter i { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--gold-grad); transition: width 0.8s var(--ease); }

.vote-actions { display: grid; gap: 7px; padding: 9px; }
.vote-btn { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; height: 44px; padding: 0 11px 0 8px; border: 0; border-radius: 13px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; overflow: visible; transition: transform 0.16s var(--ease), background 0.2s, filter 0.2s; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button.vote-btn:active { transform: scale(0.96); }
button.vote-btn-silver:hover { background: rgba(255, 255, 255, 0.14); }
.vote-btn .icon { width: 22px; height: 22px; flex: 0 0 auto; }
.vote-btn .vote-count { min-width: 0; font-weight: 800; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-block; }
.vote-btn em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; opacity: 0.86; }
.vote-btn-gold { background: var(--gold-grad); color: var(--gold-ink); box-shadow: 0 10px 22px -12px rgba(255, 209, 102, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.vote-btn-gold:hover { filter: brightness(1.06); }
.vote-btn.is-static { cursor: default; }
.vote-btn.is-static.is-gold { background: rgba(255, 209, 102, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.34); color: var(--gold); }
.vote-count.is-bump { animation: sx-bump 0.36s var(--ease); }
@keyframes sx-bump { 40% { transform: scale(1.28); color: var(--gold); } }

/* the leader */
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-card { box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.75), 0 30px 70px -30px rgba(255, 209, 102, 0.5); }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .thumb { aspect-ratio: 1 / 1.08; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .candidate-name { font-size: clamp(22px, 5.4vw, 34px); letter-spacing: -0.02em; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .sx-district { font-size: 13.5px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .sx-card-meta { left: 16px; right: 16px; bottom: 15px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .rank-badge { height: 32px; padding: 0 13px; font-size: 14.5px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .rank-badge b::after { content: " · Leading"; font-weight: 700; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-actions { grid-template-columns: 1fr 1fr; padding: 11px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-btn { height: 50px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-btn .vote-count { font-size: 16px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-card::before { content: ""; position: absolute; z-index: 4; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%); background-size: 260% 100%; animation: sx-sheen 5.5s ease-in-out infinite; }
@keyframes sx-sheen { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
@media (min-width: 640px) {
  .sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .thumb { aspect-ratio: auto; min-height: 320px; }
}
.sx-grid:not(.is-flat) .candidate-card[data-rank="2"] .vote-card { box-shadow: inset 0 0 0 1.5px rgba(207, 216, 224, 0.5), 0 18px 40px -26px rgba(0, 0, 0, 0.9); }
.sx-grid:not(.is-flat) .candidate-card[data-rank="3"] .vote-card { box-shadow: inset 0 0 0 1.5px rgba(224, 154, 94, 0.5), 0 18px 40px -26px rgba(0, 0, 0, 0.9); }
.candidate-card.is-spotlight .vote-card { animation: sx-spot 1.5s ease-in-out 4; }
@keyframes sx-spot { 50% { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 6px rgba(255, 209, 102, 0.28), 0 0 60px rgba(255, 209, 102, 0.45); } }

/* tap effects */
.vote-burst-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: visible; }
.float-coin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0; animation: sx-coin 1.1s var(--ease) forwards; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.float-coin.is-thumb-tap { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.float-coin.is-gold { width: 34px; height: 34px; }
@keyframes sx-coin {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3) rotate(0deg); }
  18% { opacity: 1; transform: translate(calc(var(--dx) * 0.2), calc(var(--dy) * 0.25)) scale(1.15) rotate(calc(var(--rot) * 0.3)); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.85) rotate(var(--rot)); }
}
.vote-ripple { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); animation: sx-ripple 0.6s ease-out forwards; }
.vote-ripple.is-gold { border-color: var(--gold); }
@keyframes sx-ripple { to { transform: scale(9); opacity: 0; } }
.plus-one { position: absolute; margin: -34px 0 0 14px; font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); animation: sx-plus 0.85s var(--ease) forwards; }
.plus-one.is-gold { color: var(--gold); }
@keyframes sx-plus { 0% { opacity: 0; transform: translateY(8px) scale(0.7); } 25% { opacity: 1; transform: translateY(-6px) scale(1.15); } 100% { opacity: 0; transform: translateY(-46px) scale(1); } }

/* SweetAlert, re-dressed */
.swal-overlay { background: rgba(3, 9, 6, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.swal-modal { width: min(420px, calc(100% - 32px)); padding: 6px 4px 4px; border-radius: 26px; background: linear-gradient(180deg, #17301f, #10231a); box-shadow: 0 40px 90px -30px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.12); font-family: inherit; }
.swal-modal.sx-swal-gold::before { content: ""; display: block; width: 76px; height: 76px; margin: 26px auto 0; background: url("../img/coin-gold.svg") center / contain no-repeat; filter: drop-shadow(0 10px 24px rgba(255, 209, 102, 0.55)); animation: sx-float 3s ease-in-out infinite; }
.swal-title { padding: 18px 20px 4px; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.swal-text { padding: 0 22px; color: var(--muted); font-size: 15.5px; line-height: 1.5; text-align: center; }
.swal-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; padding: 0 16px 16px; }
.swal-button-container { margin: 0; flex: 1 1 130px; }
.swal-button { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; background: var(--gold-grad); color: var(--gold-ink); font-family: inherit; font-size: 15px; font-weight: 800; box-shadow: none !important; }
.swal-button:not([disabled]):hover { background: var(--gold-grad); filter: brightness(1.06); }
.swal-button--cancel { background: rgba(255, 255, 255, 0.09); color: #fff; }
.swal-button--cancel:not([disabled]):hover { background: rgba(255, 255, 255, 0.15); }
.swal-button--danger { background: var(--red); color: #fff; }
.swal-icon { transform: scale(0.82); margin: 12px auto 0; }
.swal-icon--info { border-color: var(--gold); }
.swal-icon--info::before, .swal-icon--info::after { background-color: var(--gold); }
.swal-icon--warning { border-color: var(--gold-2); }
.swal-icon--warning__body, .swal-icon--warning__dot { background-color: var(--gold-2); }
.swal-icon--success::before, .swal-icon--success::after, .swal-icon--success__hide-corners { background: transparent !important; }

/* ==========================================================================
   Coin / attempt packs
   ========================================================================== */
.sx-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .sx-packs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1040px) { .sx-packs { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sx-pack { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 12px 12px; text-align: center; border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
@media (hover: hover) { .sx-pack:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.5), 0 26px 50px -28px rgba(255, 209, 102, 0.5); } }
.sx-pack.is-best { background: linear-gradient(180deg, rgba(255, 209, 102, 0.16), rgba(255, 209, 102, 0.04)); box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.7), 0 26px 60px -30px rgba(255, 209, 102, 0.6); }
.sx-pack-ribbon { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: var(--gold-grad); color: var(--gold-ink); font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(255, 209, 102, 0.9); }
.sx-pack-art { display: flex; justify-content: center; height: 48px; margin-bottom: 10px; }
.sx-pack-art img { width: 44px; height: 44px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45)); }
.sx-pack-art img + img { margin-left: -26px; }
.sx-pack-ticket { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--gold-ink); background: var(--gold-grad); }
.sx-pack-ticket + .sx-pack-ticket { margin-left: -22px; }
.sx-pack-amount { font-size: clamp(30px, 7vw, 40px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sx-pack-title { margin-top: 5px !important; color: var(--muted); font-size: 13px; font-weight: 600; }
.sx-pack-price { margin: 12px 0 14px; font-size: 19px; font-weight: 800; }
.sx-pack-save { display: inline-block; margin-left: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(52, 179, 111, 0.18); color: #7fe3ad; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }
.sx-pack-actions { width: 100%; min-width: 0; margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sx-pack-actions form { margin: 0; }
.sx-pack .sx-btn { min-height: 44px; padding: 0 10px; font-size: 13.5px; }

/* ==========================================================================
   Registration
   ========================================================================== */
.sx-reg { padding: clamp(20px, 5vw, 56px) 0 64px; }
.sx-reg-grid { display: grid; gap: 22px; }
.sx-reg-logo { display: none; width: 62px; height: 73px; margin-bottom: 18px; filter: drop-shadow(0 0 22px rgba(255, 209, 102, 0.45)); }
.sx-reg-intro .sx-title { font-size: clamp(32px, 7vw, 54px); }
.sx-steps { display: none; margin: 26px 0 0; padding: 0; list-style: none; gap: 14px; }
.sx-steps li { display: flex; align-items: center; gap: 13px; color: var(--muted); font-weight: 600; }
.sx-steps b { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: rgba(255, 209, 102, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.4); color: var(--gold); font-size: 14px; }
.sx-reg-card { padding: clamp(18px, 4vw, 30px); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
@media (min-width: 920px) {
  .sx-reg-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: start; }
  .sx-reg-intro { position: sticky; top: calc(var(--bar-h) + 40px); padding-top: 12px; }
  .sx-steps { display: grid; }
  .sx-reg-logo { display: block; }
}
.sx-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sx-field { grid-column: 1 / -1; display: grid; gap: 8px; min-width: 0; }
@media (min-width: 560px) { .sx-field.is-half { grid-column: span 1; } }
.sx-label { color: #fff; font-size: 14px; font-weight: 700; }
.sx-label small { color: var(--soft); font-weight: 600; font-size: 12.5px; }
.sx-input, body.sx .sx-form .form-control {
  width: 100%; min-height: 54px; padding: 14px 16px; border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  color: #fff; font: inherit; font-size: 16px; outline: 0; transition: box-shadow 0.2s, background 0.2s;
}
.sx-input::placeholder { color: var(--soft); }
.sx-input:focus { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 0 4px rgba(255, 209, 102, 0.14); }
select.sx-input { -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%23ffd166' stroke-width='2.200' stroke-linecap='round'%3E%3Cpath d='m1.500 1.500 5.500 5.500 5.500-5.500'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
select.sx-input:invalid { color: var(--soft); }
select.sx-input option { color: #111; background: #fff; }
textarea.sx-input { min-height: 110px; resize: vertical; }
.sx-static { min-height: 54px; display: flex; align-items: center; padding: 0 16px; border-radius: 14px; background: rgba(255, 209, 102, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.25); color: var(--gold); font-weight: 700; }

.sx-photo { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px; cursor: pointer; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.35); transition: background 0.2s, box-shadow 0.2s; }
.sx-photo:hover, .sx-photo.is-over { background: rgba(255, 209, 102, 0.09); box-shadow: inset 0 0 0 1.5px var(--gold); }
.sx-photo:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 0 4px rgba(255, 209, 102, 0.14); }
.sx-photo input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.sx-photo-frame { position: relative; flex: 0 0 auto; width: 96px; aspect-ratio: 3 / 4; display: grid; place-items: center; border-radius: 14px; overflow: hidden; color: var(--gold); background: repeating-linear-gradient(135deg, rgba(255, 209, 102, 0.12) 0 8px, rgba(255, 209, 102, 0.05) 8px 16px); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.35); }
.sx-photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.sx-photo-text { min-width: 0; display: grid; gap: 3px; pointer-events: none; }
.sx-photo-text strong { font-size: 16px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-photo-text span { color: var(--soft); font-size: 13px; }
.sx-photo-text em { margin-top: 6px; justify-self: start; padding: 7px 13px; border-radius: 10px; background: var(--gold-grad); color: var(--gold-ink); font-style: normal; font-size: 13px; font-weight: 800; }
.sx-photo.has-photo .sx-photo-frame { box-shadow: inset 0 0 0 2px var(--gold), 0 12px 26px -12px rgba(255, 209, 102, 0.6); background: #10231a; }
.sx-form-error { grid-column: 1 / -1; display: none; padding: 12px 14px; border-radius: 12px; background: rgba(230, 57, 70, 0.14); box-shadow: inset 0 0 0 1px rgba(230, 57, 70, 0.45); color: #ffc9cd; font-size: 14.5px; font-weight: 600; }
.sx-form-error.is-on { display: block; animation: sx-shake 0.4s var(--ease); }
@keyframes sx-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.sx-form-foot { grid-column: 1 / -1; display: grid; gap: 12px; margin-top: 4px; }
.sx-form-foot .sx-btn { min-height: 56px; font-size: 16.5px; border-radius: 16px; }
.sx-form-foot p { color: var(--soft); font-size: 12.5px; text-align: center; }

/* result pages (thank you, error, checkout) */
.sx-result { padding: clamp(36px, 10vw, 96px) 0 72px; }
.sx-result-card { max-width: 500px; margin-inline: auto; padding: clamp(28px, 6vw, 44px) clamp(20px, 5vw, 38px); text-align: center; border-radius: 28px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); animation: sx-rise 0.7s var(--ease) both; }
@keyframes sx-rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.sx-result-icon { position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 50%; color: var(--gold-ink); background: var(--gold-grad); box-shadow: 0 0 0 10px rgba(255, 209, 102, 0.12), 0 0 0 22px rgba(255, 209, 102, 0.05), 0 20px 50px -14px rgba(255, 209, 102, 0.7); animation: sx-icon-in 0.8s var(--ease) 0.15s both; }
.sx-result-icon svg { width: 44px; height: 44px; stroke-width: 2.600; }
.sx-result-icon.is-bad { color: #fff; background: linear-gradient(135deg, #ff6b76, var(--red)); box-shadow: 0 0 0 10px rgba(230, 57, 70, 0.14), 0 0 0 22px rgba(230, 57, 70, 0.06); }
.sx-result-icon.is-info { color: #fff; background: linear-gradient(135deg, #2f6045, #173727); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.06); }
@keyframes sx-icon-in { from { opacity: 0; transform: scale(0.4) rotate(-20deg); } }
.sx-result h1 { font-size: clamp(26px, 6vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.sx-result p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.sx-result-actions { display: grid; gap: 10px; margin-top: 26px; }
.sx-result small { display: block; margin-top: 16px; color: var(--soft); font-size: 13px; }

/* ==========================================================================
   Tiles (competitions hub, divisions, judges)
   ========================================================================== */
.sx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.sx-tile { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #10231a; color: #fff !important; box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease); }
@media (hover: hover) { a.sx-tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.55), 0 30px 60px -30px rgba(0, 0, 0, 0.95); } a.sx-tile:hover .sx-tile-media img { transform: scale(1.05); } }
.sx-tile-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, #1d4a35, #0d1f17); }
.sx-tile-media.is-wide { aspect-ratio: 16 / 10; }
.sx-tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 0.6s var(--ease); }
.sx-tile-media::after { content: ""; position: absolute; inset: 45% 0 0 0; background: linear-gradient(180deg, transparent, rgba(5, 12, 9, 0.9)); }
.sx-tile-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 16px 16px 18px; }
.sx-tile-body h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.sx-tile-body .sx-tile-text { color: var(--muted); font-size: 14.5px; }
.sx-tile-body .sx-tile-role { color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.sx-tile-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 8px; color: var(--gold); font-weight: 800; font-size: 14.5px; }

/* ---------- WhatsApp bubble, toast, footer ---------- */
.sx-wa-float { position: fixed; z-index: 55; right: 16px; bottom: calc(18px + var(--safe-b)); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #3fe07f, #25d366 55%, #128c4b); box-shadow: 0 16px 34px -10px rgba(37, 211, 102, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5); transition: transform 0.25s var(--ease); }
.sx-wa-float:hover { transform: scale(1.08); }
body.sx-has-tabs .sx-wa-float { bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); }
@media (min-width: 860px) { body.sx-has-tabs .sx-wa-float { bottom: 22px; } }
.sx-toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 18px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #f4f7f5; color: #0b1a14; font-weight: 700; font-size: 14.5px; text-align: center; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, 0.8); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity 0.25s, transform 0.3s var(--ease); }
.sx-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.sx-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px 34px; color: var(--soft); font-size: 13px; text-align: center; }
.sx-foot img { opacity: 0.85; }
body.sx-locked .sx-bar-in { justify-content: center; }

/* ---------- bootstrap-style helpers still used by a few older blocks ---------- */
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.row { display: flex; flex-wrap: wrap; margin: -10px; }
.row > [class*="col-"] { width: 100%; padding: 10px; }
@media (min-width: 768px) { .row > .col-md-6 { width: 50%; } }
@media (min-width: 992px) { .row > .col-lg-4 { width: 33.3333%; } .row > .col-lg-6 { width: 50%; } .row > .col-lg-8 { width: 66.6667%; } }
.d-flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .align-items-center { align-items: center; } .justify-content-center { justify-content: center; }
.text-center { text-align: center; } .img-fluid { max-width: 100%; height: auto; } .text-muted { color: var(--soft); } .font-weight-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; } .ml-2 { margin-left: 8px; }
.alert { padding: 14px 16px; border-radius: var(--r-md); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); color: #fff; }
.alert-success { background: rgba(52, 179, 111, 0.13); box-shadow: inset 0 0 0 1px rgba(52, 179, 111, 0.4); }
.alert-info { background: rgba(91, 164, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(91, 164, 255, 0.28); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--glass-2); color: #fff !important; font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.btn-primary { background: var(--gold-grad); color: var(--gold-ink) !important; box-shadow: none; }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .sx-sky i { animation: none; }
}

/* older self-styled blocks blend into the night sky */
.winners-gallery { background: transparent !important; }
.registration-closed-title { font-family: inherit !important; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- ballot polish (v2) ---------- */
.sx-eyebrow.is-live { color: #fff; background: rgba(230, 57, 70, 0.12); box-shadow: inset 0 0 0 1px rgba(230, 57, 70, 0.4); }
.sx-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); animation: sx-pulse 1.6s infinite; }
@media (max-width: 639px) {
  .sx-hero { padding: 22px 0 16px; }
  .sx-eyebrow { margin-bottom: 10px !important; }
  .sx-lead { margin-top: 10px; font-size: 14.5px; }
}

/* one short tip + "How it works" instead of a wall of text */
.sx-hint { align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px !important; }
.sx-hint-main { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; }
.sx-how { flex: 0 0 auto; }
.sx-how summary { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); -webkit-user-select: none; user-select: none; }
.sx-how summary::-webkit-details-marker { display: none; }
.sx-how summary:hover { color: #fff; }
.sx-how[open] { flex-basis: 100%; }
.sx-how[open] summary { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.4); }
.sx-how ul { margin: 10px 0 2px; padding: 12px 14px 12px 30px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.sx-how li + li { margin-top: 4px; }
.sx-how li b { color: #fff; }

/* vote buttons side by side: the card shows more photo, less button */
.vote-actions { grid-template-columns: 1.35fr 1fr; gap: 6px; padding: 8px; }
.vote-actions > :only-child { grid-column: 1 / -1; }
.vote-btn { height: 40px; gap: 5px; padding: 0 8px 0 6px; border-radius: 12px; justify-content: center; }
.vote-btn .icon { width: 20px; height: 20px; }
.vote-btn .vote-count { font-size: 14px; }
.vote-btn em { display: none; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-btn { justify-content: flex-start; padding: 0 12px 0 9px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-btn .icon { width: 22px; height: 22px; }
.sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .vote-btn em { display: inline; }
@media (min-width: 980px) {
  .vote-btn { height: 42px; }
  .vote-btn .vote-count { font-size: 14.5px; }
}

/* black & white is softer, and colour comes back under the pointer */
.vote-card .thumb.bw-photo .sx-photo-img { filter: grayscale(1) contrast(1.04) brightness(0.94); }
@media (hover: hover) { .vote-card:hover .thumb.bw-photo .sx-photo-img { filter: grayscale(0.15) brightness(1); } }

/* back to top on a long ballot */
.sx-top { position: fixed; z-index: 55; right: 16px; bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; color: var(--gold-ink); background: var(--gold-grad); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6); opacity: 0; transform: translateY(12px) scale(0.9); pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease); }
.sx-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 860px) { .sx-top { bottom: 26px; right: 26px; } }
body:has(.sx-wa-float) .sx-top { bottom: calc(var(--tabs-h) + var(--safe-b) + 78px); }
@media (min-width: 860px) { body:has(.sx-wa-float) .sx-top { bottom: 90px; } }

/* ---------- browse by governorate -> district ---------- */
.sx-ar { font-family: "Segoe UI", "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, system-ui, sans-serif; letter-spacing: 0; }
.sx-regions { margin: 2px 0 16px; }
.sx-regions-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 0 2px 10px; }
.sx-regions-head h2 { display: flex; align-items: baseline; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.sx-regions-head h2 .sx-ar { color: var(--gold); font-size: 15px; font-weight: 700; }
.sx-regions-head p { margin: 0; color: var(--soft); font-size: 13px; }

.sx-region-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 10px;
  margin: 0 -16px; padding: 2px 16px 8px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sx-region-rail::-webkit-scrollbar { display: none; }
.sx-region {
  position: relative; display: block; height: 108px; padding: 0; border: 0; border-radius: 18px; overflow: hidden; isolation: isolate;
  text-align: left; color: #fff; cursor: pointer; scroll-snap-align: start; background: #10231a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 14px 30px -20px rgba(0, 0, 0, 0.9);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, opacity 0.25s, filter 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.sx-region:active { transform: scale(0.97); }
.sx-region-media { position: absolute; inset: 0; z-index: -1; }
.sx-region-media img:not(.sx-region-symbol) { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), filter 0.4s; }
.sx-region::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 12, 9, 0.05) 20%, rgba(5, 12, 9, 0.5) 55%, rgba(5, 12, 9, 0.92) 100%); }
.sx-region-body { position: absolute; left: 12px; right: 10px; bottom: 9px; display: flex; flex-direction: column; gap: 1px; }
.sx-region-body b { font-size: 14.5px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-region-body .sx-ar { color: #ffe3a3; font-size: 12.5px; font-weight: 700; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); text-align: left; }
.sx-region-count { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(5, 12, 9, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.sx-region-tick { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-ink); background: var(--gold-grad); opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.3s var(--ease); }
.sx-region.is-on { box-shadow: inset 0 0 0 2px var(--gold), 0 16px 34px -14px rgba(255, 209, 102, 0.55); }
.sx-region.is-on .sx-region-tick { opacity: 1; transform: none; }
.sx-region.is-on .sx-region-media img:not(.sx-region-symbol) { transform: scale(1.07); }
.sx-region.is-on .sx-region-count { color: var(--gold-ink); background: var(--gold-grad); box-shadow: none; }
.sx-regions.has-pick .sx-region:not(.is-on) { opacity: 0.62; filter: saturate(0.75); }
.sx-region.is-empty .sx-region-media img { filter: grayscale(0.7) brightness(0.7); }
.sx-region.is-empty .sx-region-count { color: var(--soft); font-weight: 700; }
@media (hover: hover) {
  .sx-region:hover { transform: translateY(-3px); opacity: 1 !important; filter: none !important; }
  .sx-region:hover .sx-region-media img:not(.sx-region-symbol) { transform: scale(1.07); }
}
.sx-region.is-all { background: radial-gradient(120% 90% at 85% 10%, rgba(255, 209, 102, 0.4), transparent 60%), linear-gradient(150deg, #1f4f39 0%, #0d1f17 100%); }
.sx-region.is-all::after { background: linear-gradient(180deg, transparent 40%, rgba(5, 12, 9, 0.55) 100%); }
.sx-region-symbol { position: absolute; top: 14px; left: 50%; width: 38px; height: auto; transform: translateX(-50%); filter: drop-shadow(0 0 16px rgba(255, 209, 102, 0.55)); }

.sx-region-panel { margin-top: 6px; }
.sx-region-panel.is-in { animation: sx-panel-in 0.45s var(--ease) both; }
@keyframes sx-panel-in { from { opacity: 0; transform: translateY(-8px); } }
.sx-region-banner { position: relative; isolation: isolate; min-height: 158px; padding: 18px 64px 18px 18px; border-radius: 22px; overflow: hidden; display: flex; align-items: flex-end; box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.3), 0 24px 50px -30px rgba(0, 0, 0, 0.95); }
.sx-region-banner > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.sx-region-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 12, 9, 0.88) 0%, rgba(5, 12, 9, 0.55) 50%, rgba(5, 12, 9, 0.1) 100%), linear-gradient(0deg, rgba(5, 12, 9, 0.7), transparent 60%); }
.sx-region-kicker { display: inline-flex; gap: 6px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.sx-region-kicker span { letter-spacing: 0; }
.sx-region-banner h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 4px; font-size: clamp(24px, 6vw, 34px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6); }
.sx-region-banner h3 .sx-ar { color: #ffe3a3; font-size: 0.72em; font-weight: 700; }
.sx-region-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 !important; }
.sx-region-facts span { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--muted); background: rgba(5, 12, 9, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.sx-region-facts b { color: #fff; }
.sx-region-leader { display: flex; align-items: center; gap: 6px; margin: 8px 0 0 !important; color: var(--gold); font-size: 13.5px; font-weight: 700; }
.sx-region-leader b { color: #fff; }
.sx-region-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; cursor: pointer; background: rgba(5, 12, 9, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); transition: background 0.2s; }
.sx-region-close .sx-i { transform: rotate(180deg); }
.sx-region-close:hover { background: rgba(5, 12, 9, 0.8); }

.sx-district-chips { display: flex; gap: 8px; margin: 10px -16px 0; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.sx-district-chips::-webkit-scrollbar { display: none; }
.sx-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 8px 0 14px; border: 0; border-radius: 999px; cursor: pointer; scroll-snap-align: start; white-space: nowrap; color: #fff; font-size: 13.5px; font-weight: 700; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13); transition: background 0.2s, transform 0.15s var(--ease); -webkit-tap-highlight-color: transparent; }
.sx-chip:active { transform: scale(0.96); }
.sx-chip .sx-ar { color: var(--soft); font-size: 12.5px; font-weight: 600; }
.sx-chip i { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, 0.1); }
.sx-chip:hover { background: rgba(255, 255, 255, 0.11); }
.sx-chip.is-on { color: var(--gold-ink); background: var(--gold-grad); box-shadow: 0 10px 22px -12px rgba(255, 209, 102, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.sx-chip.is-on .sx-ar { color: rgba(42, 26, 2, 0.72); }
.sx-chip.is-on i { background: rgba(42, 26, 2, 0.14); }
.sx-chip.is-empty:not(.is-on) { opacity: 0.5; }

.sx-toolbar.has-regions { flex-wrap: nowrap; }
.sx-toolbar.has-regions .sx-search { flex: 1 1 auto; min-width: 0; }

@media (min-width: 720px) {
  .sx-region-rail { grid-auto-columns: 170px; }
  .sx-region { height: 118px; }
  .sx-region-banner { min-height: 190px; padding: 24px 70px 22px 24px; }
}
@media (min-width: 980px) {
  .sx-region-rail { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-columns: auto; margin: 0; padding: 2px 0 4px; overflow: visible; gap: 12px; }
  .sx-region { height: 124px; }
  .sx-district-chips { flex-wrap: wrap; margin: 12px 0 0; padding: 0; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-region-panel.is-in { animation: none; }
  .sx-region, .sx-region-media img { transition: none; }
}

/* ---------- governorates page + governorate pages ---------- */
.sx-gov-search { margin-bottom: 22px; }
.sx-gov-search .sx-search { flex: 1 1 auto; min-width: 0; }
.sx-gov-search-btn { flex: 0 0 auto; height: 44px; padding: 0 18px; border: 0; border-radius: 13px; cursor: pointer; color: var(--gold-ink); font-weight: 800; font-size: 14px; background: var(--gold-grad); box-shadow: 0 10px 22px -12px rgba(255, 209, 102, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.sx-gov-search { flex-wrap: nowrap !important; }

.sx-govs { margin-bottom: 10px; }
.sx-gov-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.sx-gov-tile {
  position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 168px; padding: 16px 64px 16px 18px;
  border-radius: 22px; overflow: hidden; color: #fff; text-decoration: none; background: #10231a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 22px 44px -28px rgba(0, 0, 0, 0.95);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  animation: sx-gov-in 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
  -webkit-tap-highlight-color: transparent;
}
@keyframes sx-gov-in { from { opacity: 0; transform: translateY(14px); } }
.sx-gov-tile > img:not(.sx-gov-symbol) { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), filter 0.4s; }
.sx-gov-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 12, 9, 0.78) 0%, rgba(5, 12, 9, 0.35) 55%, rgba(5, 12, 9, 0.05) 100%), linear-gradient(0deg, rgba(5, 12, 9, 0.75), transparent 65%); }
.sx-gov-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sx-gov-text b { font-size: clamp(22px, 6vw, 28px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); }
.sx-gov-text .sx-ar { color: #ffe3a3; font-size: 17px; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); text-align: left; }
.sx-gov-text small { margin-top: 4px; color: rgba(255, 255, 255, 0.72); font-size: 12.5px; font-weight: 600; }
.sx-gov-count { position: absolute; top: 12px; right: 12px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(5, 12, 9, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.sx-gov-go { position: absolute; right: 14px; bottom: 16px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-ink); background: var(--gold-grad); box-shadow: 0 10px 24px -10px rgba(255, 209, 102, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); transition: transform 0.3s var(--ease); }
.sx-gov-tile:active { transform: scale(0.98); }
.sx-gov-tile.is-empty > img { filter: grayscale(0.7) brightness(0.75); }
.sx-gov-tile.is-empty .sx-gov-count { color: var(--soft); }
.sx-gov-tile.is-empty .sx-gov-go { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; }
.sx-gov-tile.is-all { background: radial-gradient(90% 120% at 90% 0%, rgba(255, 209, 102, 0.35), transparent 60%), linear-gradient(150deg, #1f4f39 0%, #0d1f17 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.45), 0 22px 44px -28px rgba(0, 0, 0, 0.95); }
.sx-gov-tile.is-all::before { background: none; }
.sx-gov-symbol { position: absolute; right: 70px; top: 50%; width: 54px; height: auto; transform: translateY(-50%); opacity: 0.95; filter: drop-shadow(0 0 22px rgba(255, 209, 102, 0.55)); }
@media (hover: hover) {
  .sx-gov-tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.6), 0 30px 60px -30px rgba(255, 209, 102, 0.45); }
  .sx-gov-tile:hover > img:not(.sx-gov-symbol) { transform: scale(1.06); }
  .sx-gov-tile:hover .sx-gov-go { transform: translateX(3px); }
}
@media (min-width: 640px) {
  .sx-gov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .sx-gov-tile { min-height: 200px; }
}
@media (min-width: 1040px) {
  .sx-gov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .sx-gov-tile { min-height: 220px; }
}

/* a governorate's own page */
.sx-gov-page { margin-top: clamp(14px, 3vw, 26px); }
.sx-region-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 14px 8px 11px; border-radius: 999px; color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.2s; }
.sx-region-back .sx-i { transform: rotate(180deg); color: var(--gold); }
.sx-region-back:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.sx-all-page { margin-top: 4px; }
.sx-region-banner.is-hero { min-height: clamp(210px, 46vw, 340px); padding: clamp(18px, 4vw, 34px); }
.sx-region-banner.is-hero h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 6px; font-size: clamp(34px, 9vw, 62px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6); }
.sx-region-banner.is-hero h1 .sx-ar { color: #ffe3a3; font-size: 0.6em; font-weight: 700; }
.sx-region-banner.is-hero > img { animation: sx-ken 18s ease-out both; }
@keyframes sx-ken { from { transform: scale(1.12); } to { transform: scale(1); } }
.sx-district-head { margin-top: 18px; margin-bottom: 0; }
.sx-gov-page + .sx-toolbar, .sx-gov-page ~ .sx-toolbar { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) {
  .sx-gov-tile, .sx-region-banner.is-hero > img { animation: none; }
}

/* ---------- each governorate's leader / winner ---------- */
.sx-gov-leader { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; max-width: 100%; margin-top: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(5, 12, 9, 0.58); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.4); }
.sx-gov-leader img, .sx-gov-leader i { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: center 22%; box-shadow: 0 0 0 2px var(--gold); }
.sx-gov-leader i { display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--gold-ink); background: var(--gold-grad); }
.sx-gov-leader > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.sx-gov-leader em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.sx-gov-leader b { font-size: 13.5px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-gov-leader.is-winner { background: var(--gold-grad); box-shadow: 0 10px 24px -12px rgba(255, 209, 102, 0.8); }
.sx-gov-leader.is-winner em, .sx-gov-leader.is-winner b { color: var(--gold-ink); }
.sx-gov-leader.is-winner img, .sx-gov-leader.is-winner i { box-shadow: 0 0 0 2px #fff; }
.sx-gov-tile { min-height: 190px; }
@media (min-width: 640px) { .sx-gov-tile { min-height: 216px; } }
@media (min-width: 1040px) { .sx-gov-tile { min-height: 236px; } }
/* once voting has closed, the #1 of each list is the winner */
.is-closed .sx-grid:not(.is-flat) .candidate-card[data-rank="1"] .rank-badge b::after { content: " · Winner"; }

/* five governorates: two big tiles, then three */
@media (min-width: 640px) and (max-width: 1039px) {
  .sx-gov-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1040px) {
  .sx-gov-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sx-gov-tile { grid-column: span 2; }
  .sx-gov-tile:nth-child(-n+2) { grid-column: span 3; min-height: 290px; }
}

/* ---------- districts list (each district is its own competition) ---------- */
.sx-dlist-intro { display: flex; align-items: center; gap: 8px; margin: 0 2px 14px !important; color: var(--gold); font-size: 14px; font-weight: 700; }
.sx-dlist { display: grid; gap: 18px; }
.sx-dgroup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.sx-dgroup-head .sx-ar { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--gold); font-weight: 700; }
.sx-drows { list-style: none; margin: 0; padding: 0; border-radius: 18px; overflow: hidden; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.sx-drows li + li { border-top: 1px solid var(--line); }
.sx-drow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 16px; color: #fff; text-decoration: none; transition: background 0.15s; -webkit-tap-highlight-color: transparent; }
a.sx-drow:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
a.sx-drow:active { background: rgba(255, 209, 102, 0.08); }
.sx-drow-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sx-drow-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sx-drow-name b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.sx-drow-name .sx-ar { color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; }
.sx-drow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--soft); font-size: 12.5px; font-weight: 600; }
.sx-drow-lead { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-drow-go { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-ink); background: var(--gold-grad); }
.sx-drow.is-empty { opacity: 0.5; }
@media (min-width: 860px) {
  .sx-dlist { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px 18px; }
}

/* a district's page */
.sx-dpage { margin-top: clamp(14px, 3vw, 24px); }
.sx-dpage-head { margin-bottom: 16px; padding: 18px 18px 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.sx-dpage-kicker { margin: 0 !important; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sx-dpage-kicker .sx-ar { letter-spacing: 0; text-transform: none; }
.sx-dpage-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 4px; font-size: clamp(30px, 8vw, 46px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; color: #fff; }
.sx-dpage-head h1 .sx-ar { color: var(--muted); font-size: 0.62em; font-weight: 700; }
.sx-dpage-facts { margin: 8px 0 0 !important; color: var(--soft); font-size: 13.5px; }
.sx-dpage .sx-region-leader { margin-top: 6px !important; }
@media (min-width: 860px) {
  .sx-dlist { display: block; columns: 2; column-gap: 18px; }
  .sx-dgroup { break-inside: avoid; margin-bottom: 22px; }
}

/* ---------- governorates open to show their districts ---------- */
.sx-dlist { display: grid; gap: 10px; max-width: 760px; }
.sx-dgroup { border-radius: 18px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow 0.2s, background 0.2s; }
.sx-dgroup[open] { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.45); }
.sx-gov-row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 16px 12px 18px; cursor: pointer; list-style: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.sx-gov-row::-webkit-details-marker { display: none; }
.sx-gov-row:hover { background: rgba(255, 255, 255, 0.04); }
.sx-gov-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sx-gov-row-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sx-gov-row-name b { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.sx-gov-row-name .sx-ar { color: var(--gold); font-size: 17px; font-weight: 700; white-space: nowrap; }
.sx-gov-row-meta { color: var(--soft); font-size: 12.5px; font-weight: 600; }
.sx-gov-row-chev { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(255, 209, 102, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.35); transition: transform 0.25s var(--ease), background 0.2s, color 0.2s; }
.sx-gov-row-chev .sx-i { transform: rotate(90deg); }
.sx-dgroup[open] .sx-gov-row-chev { transform: rotate(180deg); color: var(--gold-ink); background: var(--gold-grad); box-shadow: none; }
.sx-dgroup .sx-drows { margin: 0 10px 10px; border-radius: 14px; background: rgba(5, 12, 9, 0.35); }
.sx-dgroup[open] .sx-drows { animation: sx-panel-in 0.3s var(--ease) both; }
.sx-dgroup .sx-drow { min-height: 58px; }
@media (min-width: 860px) {
  .sx-dlist { display: grid; columns: auto; margin: 0 auto; }
  .sx-dgroup { margin-bottom: 0; }
}
@media (min-width: 860px) { .sx-dlist { grid-template-columns: minmax(0, 1fr); margin: 0; } }

/* ---------- likes & gifts (photo voting, like the video feed) ---------- */
.vote-actions.is-gifts { grid-template-columns: 1fr 1.25fr; }
.vote-btn-like { color: #fff; }
.vote-btn-like .sx-heart { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 0.2s var(--ease), fill 0.2s; }
.vote-btn-like.is-liked { color: #ff4d6d; background: rgba(255, 77, 109, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.45); }
.vote-btn-like.is-liked .sx-heart { fill: currentColor; animation: sx-like-pop 0.4s var(--ease); }
.vote-btn-like.is-liked .vote-count { color: #fff; }
@keyframes sx-like-pop { 40% { transform: scale(1.35); } }
.vote-btn-gift { background: var(--gold-grad); color: var(--gold-ink); box-shadow: 0 10px 22px -12px rgba(255, 209, 102, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.vote-btn-gift:hover { filter: brightness(1.06); }
.vote-btn .sx-gift-ico { font-size: 18px; line-height: 1; }
.vote-actions.is-gifts .vote-btn-gift em { display: inline; margin-left: auto; font-size: 11px; }
.vote-actions.is-gifts .vote-btn.is-static.is-gold em { display: inline; margin-left: auto; }
.vote-card .thumb { position: relative; }
.sx-heart-pop { position: absolute; z-index: 6; pointer-events: none; color: #ff4d6d; font-size: 64px; line-height: 1; transform: translate(-50%, -50%) scale(0.4); text-shadow: 0 6px 24px rgba(255, 77, 109, 0.6); animation: sx-heart-pop 0.85s var(--ease) forwards; }
.vote-btn .sx-heart-pop { font-size: 28px; }
@keyframes sx-heart-pop { 30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -140%) scale(0.9); opacity: 0; } }
.sx-gift-fly { position: absolute; z-index: 6; bottom: 12%; pointer-events: none; font-size: 34px; animation: sx-gift-fly 1.6s var(--ease) forwards; }
@keyframes sx-gift-fly { 0% { transform: translateY(0) scale(0.5); opacity: 0; } 15% { opacity: 1; transform: translateY(-10px) scale(1.1); } 100% { transform: translateY(-220px) scale(0.9); opacity: 0; } }

/* bottom sheet (gift picker / sign in) */
.sx-sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.sx-sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.22s; }
.sx-sheet-panel { position: relative; width: min(100%, 520px); max-height: 88vh; overflow: auto; padding: 10px 18px calc(18px + var(--safe-b, 0px)); border-radius: 24px 24px 0 0; color: #fff; background: linear-gradient(180deg, #142b20, #0c1a13); box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08); transform: translateY(100%); transition: transform 0.28s var(--ease); }
.sx-sheet.is-open .sx-sheet-backdrop { opacity: 1; }
.sx-sheet.is-open .sx-sheet-panel { transform: none; }
@media (min-width: 640px) { .sx-sheet { align-items: center; } .sx-sheet-panel { border-radius: 24px; } }
html.sx-sheet-lock, html.sx-sheet-lock body { overflow: hidden; }
.sx-sheet-grab { width: 42px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); }
.sx-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sx-sheet-title { margin: 0; font-size: 19px; font-weight: 800; color: #fff; }
.sx-sheet-sub { margin: 2px 0 0 !important; color: var(--muted); font-size: 13.5px; }
.sx-sheet-balance { margin-left: auto; padding: 5px 11px; border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--gold); background: rgba(255, 209, 102, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.3); white-space: nowrap; }
.sx-sheet-x { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.08); cursor: pointer; font-size: 15px; }
.sx-gift-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 14px; }
.sx-gift { display: grid; justify-items: center; gap: 2px; padding: 10px 2px 8px; border: 2px solid transparent; border-radius: 14px; color: #fff; background: rgba(255, 255, 255, 0.06); cursor: pointer; transition: transform 0.12s, border-color 0.12s, background 0.12s; }
.sx-gift.is-selected { border-color: var(--gold); background: rgba(255, 209, 102, 0.14); transform: translateY(-2px); }
.sx-gift-icon { font-size: 32px; line-height: 1.15; }
.sx-gift-name { min-height: 26px; display: grid; align-items: center; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.15; color: var(--muted); }
.sx-gift-cost { font-size: 12px; font-weight: 800; color: var(--gold); }
.sx-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sx-qty { display: inline-flex; gap: 6px; }
.sx-qty button { min-width: 42px; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, 0.08); cursor: pointer; }
.sx-qty button.is-on { color: var(--gold-ink); background: var(--gold); }
.sx-gift-sum { text-align: right; font-size: 13px; line-height: 1.35; color: var(--muted); }
.sx-gift-sum b { color: #fff; }
.sx-sheet-cta { display: flex; width: 100%; justify-content: center; min-height: 52px; font-size: 16px; }
.sx-sheet-cta[disabled] { opacity: 0.6; }
.sx-sheet-note { margin: 10px 0 0 !important; text-align: center; color: var(--soft); font-size: 13px; }
.sx-sheet-empty { display: grid; justify-items: center; gap: 6px; padding: 6px 0 18px; text-align: center; color: var(--muted); }
.sx-sheet-big { font-size: 46px; }

/* coin packs inside the gift window */
.sx-pkg-list { display: grid; gap: 8px; margin-bottom: 4px; }
.sx-pkg { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sx-pkg-coins { display: flex; flex-direction: column; line-height: 1.2; }
.sx-pkg-coins b { font-size: 17px; font-weight: 800; color: #fff; }
.sx-pkg-coins small { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.sx-pkg-actions { display: flex; gap: 6px; }
.sx-pkg-actions form { margin: 0; }
.sx-pkg-btn { min-height: 38px; padding: 0 14px; font-size: 13.5px; white-space: nowrap; }
.sx-sheet-back { display: block; width: 100%; margin-top: 10px; padding: 10px; border: 0; border-radius: 12px; color: var(--gold); font-weight: 700; background: transparent; cursor: pointer; }

/* ---------- "register for Person of the Year" banner (top of the voting page) ---------- */
.sx-reg-hero { padding-bottom: clamp(14px, 3vw, 22px); }
.sx-reg-banner { position: relative; isolation: isolate; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px 16px; padding: 20px 20px 18px; border-radius: 24px; overflow: hidden; color: #fff; text-decoration: none; background: radial-gradient(120% 140% at 100% 0%, rgba(255, 209, 102, 0.28), transparent 55%), linear-gradient(150deg, #1f4f39 0%, #10271c 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.5), 0 26px 60px -30px rgba(255, 209, 102, 0.45); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.sx-reg-banner:hover { color: #fff; transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px rgba(255, 209, 102, 0.75), 0 30px 70px -30px rgba(255, 209, 102, 0.6); }
.sx-reg-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%); background-size: 260% 100%; animation: sx-sheen 6s ease-in-out infinite; }
.sx-reg-banner-symbol { width: 50px; height: auto; filter: drop-shadow(0 0 18px rgba(255, 209, 102, 0.6)); }
.sx-reg-banner-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sx-reg-banner-text b { font-size: clamp(20px, 5.2vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; background: linear-gradient(100deg, #ffffff 30%, #ffe9b0 70%, #ffd166 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-wrap: balance; }
.sx-reg-banner-text .sx-ar { color: #ffe3a3; font-size: clamp(16px, 4.2vw, 21px); font-weight: 700; line-height: 1.5; text-align: right; }
.sx-reg-banner-btn { grid-column: 1 / -1; justify-self: stretch; justify-content: center; min-height: 54px; font-size: 17px; }
.sx-reg-banner-btn .sx-ar { font-size: 16px; }
@media (min-width: 760px) {
  .sx-reg-banner { grid-template-columns: auto 1fr auto; padding: 24px 26px; }
  .sx-reg-banner-btn { grid-column: auto; justify-self: end; padding: 0 26px; }
}
@media (prefers-reduced-motion: reduce) { .sx-reg-banner::after { animation: none; } }
.sx-help { display: block; margin-top: 6px; color: var(--soft); font-size: 12.5px; }

/* ---------- district page: slim header + small register box ---------- */
.sx-dpage { margin-top: clamp(12px, 3vw, 20px); }
.sx-dbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sx-dbar-back { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line); }
.sx-dbar-back .sx-i { transform: rotate(180deg); }
.sx-dbar-back:hover { color: var(--gold); background: rgba(255, 255, 255, 0.12); }
.sx-dbar-main { min-width: 0; }
.sx-dbar h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin: 0; font-size: clamp(22px, 6vw, 30px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: #fff; }
.sx-dbar h1 .sx-ar { color: var(--gold); font-size: 0.72em; font-weight: 700; }
.sx-dbar p { margin: 2px 0 0 !important; color: var(--soft); font-size: 12.5px; font-weight: 600; }
.sx-dpage .sx-region-leader { margin: 0 0 10px !important; }

.sx-reg-mini { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 10px 10px 12px; border-radius: 16px; color: #fff; text-decoration: none; background: linear-gradient(120deg, rgba(255, 209, 102, 0.16), rgba(255, 209, 102, 0.05)); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.4); transition: background 0.2s, transform 0.2s var(--ease); }
.sx-reg-mini:hover { color: #fff; background: linear-gradient(120deg, rgba(255, 209, 102, 0.24), rgba(255, 209, 102, 0.08)); transform: translateY(-1px); }
.sx-reg-mini img { flex: 0 0 auto; width: 28px; height: auto; filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.5)); }
.sx-reg-mini-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.sx-reg-mini-text b { font-size: 14px; font-weight: 800; color: #ffe9b0; }
.sx-reg-mini-text .sx-ar { font-size: 13px; font-weight: 600; color: var(--muted); text-align: left; }
.sx-reg-mini-go { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-ink); background: var(--gold-grad); }
/* the hint is one line of text (not separate flex pieces), Arabic in the small register box reads right-to-left */
.sx-hint-main { display: block; flex: 1 1 auto; min-width: 0; }
.sx-hint-main .sx-i { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.sx-reg-mini-text .sx-ar { text-align: right; unicode-bidi: plaintext; }
