/* Thidasaket — big-screen live scoreboard. Designed on a fixed 1920×1080 stage that screen.js scales to fit. */
@property --sx-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
	--bg0: #05010c;
	--bg1: #12052a;
	--violet: #a95cff;
	--magenta: #ff3fd8;
	--cyan: #3ff0ff;
	--gold: #ffd36b;
	--gold-2: #f0a93c;
	--white: #f7f1ff;
	--muted: #b9a6d6;
	--line: rgb(169 92 255 / 35%);
	--panel: linear-gradient(160deg, rgb(40 12 78 / 78%), rgb(14 4 32 / 86%));
	--f-th: "Chakra Petch", "Prompt", "Sarabun", system-ui, sans-serif;
	--f-num: "Orbitron", "Chakra Petch", system-ui, sans-serif;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg0); }
body { font-family: var(--f-th); color: var(--white); -webkit-font-smoothing: antialiased; }
body.is-idle, body.is-idle * { cursor: none !important; }

/* ------------------------------------------------------------ backdrop (fills the whole screen) */
.sx-bg { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #2a0b52 0%, var(--bg1) 38%, var(--bg0) 75%); }
.sx-aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .5; mix-blend-mode: screen; animation: sx-drift 26s ease-in-out infinite alternate; }
.sx-aurora i:nth-child(1) { left: -18vmax; top: -22vmax; background: radial-gradient(circle, #9b2cff, transparent 65%); }
.sx-aurora i:nth-child(2) { right: -20vmax; top: -10vmax; background: radial-gradient(circle, #ff2fb9, transparent 65%); animation-duration: 31s; animation-delay: -9s; opacity: .38; }
.sx-aurora i:nth-child(3) { left: 25vw; bottom: -38vmax; background: radial-gradient(circle, #18c8ff, transparent 62%); animation-duration: 37s; animation-delay: -4s; opacity: .26; }
@keyframes sx-drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

.sx-pattern { position: absolute; inset: -48px; opacity: .22;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23c9a227' stroke-opacity='.5' stroke-width='.8'%3E%3Cpath d='M24 4 44 24 24 44 4 24Z'/%3E%3Cpath d='M24 14 34 24 24 34 14 24Z'/%3E%3Ccircle cx='24' cy='24' r='2'/%3E%3C/g%3E%3C/svg%3E");
	-webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 80%); mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 80%);
	animation: sx-pan 60s linear infinite; }
@keyframes sx-pan { to { transform: translate(64px, 64px); } }

.sx-floor { position: absolute; left: -50%; right: -50%; bottom: -8%; height: 62%; perspective: 520px; perspective-origin: 50% 0%;
	-webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%); mask-image: linear-gradient(to bottom, transparent 0%, #000 45%); }
.sx-floor__grid { position: absolute; inset: 0; transform: rotateX(68deg); transform-origin: 50% 0;
	background-image: linear-gradient(rgb(255 63 216 / 55%) 2px, transparent 2px), linear-gradient(90deg, rgb(63 240 255 / 40%) 2px, transparent 2px);
	background-size: 90px 90px; animation: sx-floor 2.6s linear infinite; filter: drop-shadow(0 0 6px rgb(255 63 216 / 60%)); }
@keyframes sx-floor { to { background-position: 0 90px, 0 0; } }

.sx-beam { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 40%, rgb(255 255 255 / 5%) 47%, rgb(255 211 107 / 9%) 50%, rgb(255 255 255 / 5%) 53%, transparent 60%); background-size: 300% 100%; animation: sx-beam 11s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes sx-beam { 0% { background-position: 120% 0; } 55%, 100% { background-position: -40% 0; } }
.sx-scan { position: absolute; inset: 0; pointer-events: none;
	background: repeating-linear-gradient(to bottom, rgb(255 255 255 / 3.5%) 0 1px, transparent 1px 4px); }
.sx-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 22vh; top: -22vh; background: linear-gradient(to bottom, transparent, rgb(63 240 255 / 7%), transparent); animation: sx-scanline 7s linear infinite; }
@keyframes sx-scanline { to { transform: translateY(130vh); } }
.sx-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / 65%) 100%); }

/* ------------------------------------------------------------------ stage */
.sx-stage { position: fixed; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%) scale(var(--scale, 1)); transform-origin: 50% 50%; }
.sx-fx { position: absolute; inset: 0; width: 1920px; height: 1080px; pointer-events: none; z-index: 5; }

.sx-hud i { position: absolute; width: 70px; height: 70px; border: 3px solid var(--cyan); filter: drop-shadow(0 0 8px var(--cyan)); opacity: .75; z-index: 2; }
.sx-hud i:nth-child(1) { left: 14px; top: 14px; border-right: 0; border-bottom: 0; }
.sx-hud i:nth-child(2) { right: 14px; top: 14px; border-left: 0; border-bottom: 0; }
.sx-hud i:nth-child(3) { left: 14px; bottom: 14px; border-right: 0; border-top: 0; }
.sx-hud i:nth-child(4) { right: 14px; bottom: 14px; border-left: 0; border-top: 0; }

/* ----------------------------------------------------------------- header */
.sx-head { position: absolute; left: 40px; right: 40px; top: 28px; height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 32px; z-index: 3; }
.sx-brand { display: flex; align-items: center; gap: 22px; min-width: 0; }
.sx-emblem { position: relative; width: 150px; height: 150px; flex: none; display: grid; place-items: center; }
.sx-emblem img { position: relative; height: 140px; width: auto; filter: drop-shadow(0 0 14px rgb(255 63 216 / 70%)) drop-shadow(0 0 30px rgb(169 92 255 / 50%)); animation: sx-float 5s ease-in-out infinite; }
@keyframes sx-float { 50% { transform: translateY(-6px); } }
.sx-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sx-rings circle { fill: none; transform-origin: 100px 100px; }
.sx-rings .r1 { stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 4 10 60 12; animation: sx-spin 14s linear infinite; filter: drop-shadow(0 0 4px var(--cyan)); }
.sx-rings .r2 { stroke: var(--magenta); stroke-width: 3; stroke-dasharray: 120 40 20 40; animation: sx-spin 9s linear infinite reverse; filter: drop-shadow(0 0 5px var(--magenta)); }
.sx-rings .r3 { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 2 6; opacity: .8; animation: sx-spin 22s linear infinite; }
@keyframes sx-spin { to { transform: rotate(360deg); } }

.sx-titles { min-width: 0; }
.sx-kicker { margin: 0 0 4px; font: 700 18px/1 var(--f-num); letter-spacing: .38em; white-space: nowrap; color: var(--cyan); text-shadow: 0 0 10px rgb(63 240 255 / 80%); }
.sx-typer::after { content: "▌"; margin-left: 4px; animation: sx-blink 1s steps(1) infinite; }
@keyframes sx-blink { 50% { opacity: 0; } }
.sx-title { position: relative; margin: 0; font: 700 66px/1.1 var(--f-th); letter-spacing: .01em; white-space: nowrap;
	background: linear-gradient(90deg, #fff 0%, #ffe9a8 30%, var(--gold) 50%, #fff 70%, #ffd0f4 100%); background-size: 200% 100%;
	-webkit-background-clip: text; background-clip: text; color: transparent; animation: sx-shine 6s linear infinite;
	filter: drop-shadow(0 0 12px rgb(255 211 107 / 55%)) drop-shadow(0 0 30px rgb(255 63 216 / 45%)); }
@keyframes sx-shine { to { background-position: -200% 0; } }
.sx-title::before, .sx-title::after { content: attr(data-glitch); position: absolute; inset: 0; opacity: 0; -webkit-background-clip: initial; background: none; }
.sx-title::before { color: var(--cyan); }
.sx-title::after { color: var(--magenta); }
.sx-title.is-glitch::before { opacity: .85; animation: sx-glitch-a .45s steps(2) 1; }
.sx-title.is-glitch::after { opacity: .85; animation: sx-glitch-b .45s steps(2) 1; }
@keyframes sx-glitch-a { 0% { clip-path: inset(10% 0 60% 0); transform: translate(-6px, -2px); } 50% { clip-path: inset(55% 0 20% 0); transform: translate(5px, 1px); } 100% { clip-path: inset(30% 0 45% 0); transform: translate(-3px, 0); } }
@keyframes sx-glitch-b { 0% { clip-path: inset(65% 0 10% 0); transform: translate(6px, 2px); } 50% { clip-path: inset(5% 0 75% 0); transform: translate(-5px, -1px); } 100% { clip-path: inset(40% 0 35% 0); transform: translate(3px, 0); } }
.sx-sub { margin: 4px 0 0; font: 500 24px/1.2 var(--f-th); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sx-stats { display: flex; gap: 12px; flex: none; }
.sx-stat { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 6px; height: 118px; min-width: 180px; padding: 14px 20px;
	background: var(--panel); border: 1px solid var(--line); clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
	box-shadow: inset 0 0 30px rgb(169 92 255 / 18%); }
.sx-stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--magenta), var(--cyan)); box-shadow: 0 0 12px var(--magenta); }
.sx-stat__label { font: 600 20px/1 var(--f-th); color: var(--muted); white-space: nowrap; }
.sx-stat__value { font: 800 46px/1 var(--f-num); color: var(--white); text-shadow: 0 0 14px rgb(63 240 255 / 55%); white-space: nowrap; }
.sx-digits { font-variant-numeric: tabular-nums; }
.sx-cd { color: var(--gold); text-shadow: 0 0 14px rgb(255 211 107 / 60%); font-size: 38px; }
.sx-cd small { font: 600 22px/1 var(--f-th); margin: 0 6px 0 2px; color: var(--muted); text-shadow: none; }
.sx-stat--clock .sx-stat__value { font-size: 44px; }
.sx-stat--status { min-width: 0; }
.sx-pill { display: inline-flex; align-items: center; gap: 12px; font: 700 28px/1 var(--f-th); white-space: nowrap; }
.sx-pill i { width: 18px; height: 18px; border-radius: 50%; background: var(--muted); flex: none; }
.sx-pill[data-s="open"] { color: #7dffb0; text-shadow: 0 0 14px rgb(64 255 150 / 70%); }
.sx-pill[data-s="open"] i { background: #ff2d55; box-shadow: 0 0 0 0 rgb(255 45 85 / 70%); animation: sx-live 1.4s ease-out infinite; }
.sx-pill[data-s="paused"] { color: var(--gold); }
.sx-pill[data-s="paused"] i { background: var(--gold); animation: sx-blink 1.2s steps(1) infinite; }
.sx-pill[data-s="closed"] { color: #ff8fb1; }
.sx-pill[data-s="closed"] i { background: #ff8fb1; }
.sx-pill[data-s="upcoming"] { color: var(--cyan); }
.sx-pill[data-s="upcoming"] i { background: var(--cyan); animation: sx-blink 1.6s steps(1) infinite; }
@keyframes sx-live { 70% { box-shadow: 0 0 0 16px rgb(255 45 85 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(255 45 85 / 0%); } }

/* ------------------------------------------------------------------- grid */
.sx-grid { position: absolute; left: 40px; right: 40px; top: 200px; bottom: 112px; display: grid; gap: 18px; z-index: 3;
	grid-template-columns: repeat(var(--cols, 5), 1fr); grid-template-rows: repeat(var(--rows, 4), 1fr); }

.sx-tile { --hot: 0; position: relative; container-type: size; min-width: 0; min-height: 0; border-radius: 10px; isolation: isolate;
	background: var(--panel); box-shadow: 0 0 0 1px rgb(169 92 255 / 30%), 0 18px 40px rgb(0 0 0 / 45%), inset 0 0 40px rgb(169 92 255 / 14%);
	opacity: 0; transform: perspective(900px) translateZ(-220px) rotateX(18deg); filter: blur(10px); }
body.is-ready .sx-tile { animation: sx-tile-in .9s cubic-bezier(.2, .9, .25, 1.15) forwards; animation-delay: calc(var(--i) * 55ms); }
@keyframes sx-tile-in { 60% { filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
body.is-ready .sx-tile.is-in { opacity: 1; transform: none; filter: none; animation: none; }

/* rotating holo border */
.sx-tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; z-index: 3; pointer-events: none;
	background: conic-gradient(from var(--sx-ang), transparent 0 62%, var(--magenta) 72%, var(--gold) 80%, var(--cyan) 88%, transparent 96%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	animation: sx-ang 7s linear infinite; animation-delay: calc(var(--i) * -.37s); opacity: .9; }
@keyframes sx-ang { to { --sx-ang: 360deg; } }
/* sheen sweep */
.sx-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 2; pointer-events: none;
	background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 14%) 48%, transparent 60%); background-size: 260% 100%; background-position: 160% 0;
	animation: sx-sheen 9s ease-in-out infinite; animation-delay: calc(var(--i) * .12s); }
@keyframes sx-sheen { 0%, 70% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

.sx-tile__photo { position: absolute; left: 0; top: 0; bottom: 0; width: 70cqh; overflow: hidden; border-radius: 10px 0 0 10px;
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14cqh), calc(100% - 14cqh) 100%, 0 100%); background: #1c0a36; }
.sx-tile__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; transition: transform 1.2s ease; }
.sx-tile__photo::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgb(255 255 255 / 6%) 0 1px, transparent 1px 3px), linear-gradient(to right, transparent 60%, rgb(14 4 32 / 85%)), linear-gradient(to top, rgb(255 63 216 / 28%), transparent 40%); }
.sx-tile__photo .sx-noimg { display: grid; place-items: center; height: 100%; font: 900 30cqh/1 var(--f-num); color: rgb(255 255 255 / 15%); }
.sx-tile__laser { position: absolute; left: 0; width: 70cqh; height: 2px; top: 0; z-index: 1; background: var(--cyan); box-shadow: 0 0 10px var(--cyan), 0 0 22px var(--cyan); opacity: 0; }
body.is-ready .sx-tile__laser { animation: sx-laser 6s ease-in-out infinite; animation-delay: calc(var(--i) * .31s + 1s); }
@keyframes sx-laser { 0% { top: 0; opacity: 0; } 5% { opacity: .9; } 25% { top: 100%; opacity: .9; } 28%, 100% { top: 100%; opacity: 0; } }

.sx-tile__info { position: absolute; left: calc(70cqh + 6cqh); right: 6cqh; top: 6cqh; bottom: 9cqh; display: flex; flex-direction: column; min-width: 0; z-index: 1; }
.sx-tile__top { display: flex; align-items: baseline; justify-content: space-between; gap: 4cqh; }
.sx-tile__no { font: 900 17cqh/1 var(--f-num); letter-spacing: .02em; background: linear-gradient(180deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 6px rgb(63 240 255 / 70%)); }
.sx-tile__no small { font-size: .45em; letter-spacing: .15em; margin-right: .3em; vertical-align: .55em; }
.sx-tile__pct { font: 700 9cqh/1 var(--f-num); color: var(--muted); white-space: nowrap; }
.sx-tile__prefix { margin: 4cqh 0 0; font: 500 8cqh/1.1 var(--f-th); color: var(--muted); white-space: nowrap; }
.sx-tile__name { margin: 1cqh 0 0; font: 700 var(--name-size, 13cqh)/1.18 var(--f-th); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--white); text-shadow: 0 0 10px rgb(169 92 255 / 60%); }
.sx-tile__score { margin-top: auto; display: flex; align-items: baseline; gap: 3cqh; min-width: 0; }
.sx-tile__votes { display: inline-block; transform-origin: 0 80%; font: 900 var(--votes-size, 30cqh)/.92 var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap;
	background: linear-gradient(180deg, #fff6d6 0%, var(--gold) 45%, var(--gold-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 0 8px rgb(255 211 107 / 55%)); }
.sx-tile__unit { font: 600 8.5cqh/1 var(--f-th); color: var(--muted); }
.sx-tile__bar { position: absolute; left: calc(70cqh + 6cqh); right: 6cqh; bottom: 5cqh; height: 3.2cqh; min-height: 4px; border-radius: 99px; background: rgb(255 255 255 / 8%); overflow: hidden; z-index: 1; }
.sx-tile__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); border-radius: inherit; transition: width 1.4s cubic-bezier(.2, .9, .2, 1);
	background: linear-gradient(90deg, var(--violet), var(--magenta) 55%, var(--gold)), repeating-linear-gradient(-45deg, rgb(255 255 255 / 25%) 0 6px, transparent 6px 12px);
	background-blend-mode: overlay; background-size: 100% 100%, 34px 100%; box-shadow: 0 0 12px var(--magenta); animation: sx-stripes 1s linear infinite; }
@keyframes sx-stripes { to { background-position: 0 0, 34px 0; } }

/* vote received */
body.is-ready .sx-tile.is-in.is-hit { animation: sx-hit 1.6s ease-out; }
@keyframes sx-hit { 0% { box-shadow: 0 0 0 3px #fff, 0 0 60px 20px rgb(255 211 107 / 90%), inset 0 0 80px rgb(255 211 107 / 60%); transform: scale(1.06); }
	40% { box-shadow: 0 0 0 2px var(--gold), 0 0 40px 10px rgb(255 63 216 / 60%), inset 0 0 50px rgb(255 63 216 / 30%); transform: scale(1.02); }
	100% { transform: none; } }
.sx-tile.is-hit .sx-tile__photo img { transform: scale(1.08); }
.sx-tile.is-hit .sx-tile__votes { animation: sx-pop .8s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes sx-pop { 0% { transform: scale(1.22); filter: drop-shadow(0 0 22px #fff); } 100% { transform: none; } }
.sx-plus { position: absolute; right: 6cqh; top: 26cqh; z-index: 4; font: 900 22cqh/1 var(--f-num); color: #fff; text-shadow: 0 0 10px var(--gold), 0 0 24px var(--magenta); pointer-events: none; animation: sx-plus 1.8s ease-out forwards; }
@keyframes sx-plus { 0% { opacity: 0; transform: translateY(20cqh) scale(.6); } 15% { opacity: 1; transform: translateY(0) scale(1.15); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30cqh) scale(1); } }
.sx-ring { position: absolute; left: 50%; top: 50%; width: 40cqh; height: 40cqh; margin: -20cqh 0 0 -20cqh; border-radius: 50%; border: 3px solid var(--gold); z-index: 4; pointer-events: none; animation: sx-ring 1s ease-out forwards; }
@keyframes sx-ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(5); opacity: 0; } }

/* results hidden */
body.is-hidden .sx-tile__votes { background: none; color: rgb(255 255 255 / 25%); filter: none; letter-spacing: .1em; }
body.is-hidden .sx-tile__pct, body.is-hidden .sx-tile__bar { visibility: hidden; }

/* QR tile */
.sx-qr { background: linear-gradient(150deg, rgb(255 63 216 / 28%), rgb(63 240 255 / 14%)), var(--panel); }
.sx-qr__in { position: absolute; inset: 0; display: flex; align-items: center; gap: 6cqh; padding: 7cqh; z-index: 1; }
.sx-qr__code { position: relative; height: 100%; aspect-ratio: 1; flex: none; padding: 3.5cqh; background: #fff; border-radius: 6px; box-shadow: 0 0 0 2px var(--cyan), 0 0 24px rgb(63 240 255 / 70%); }
.sx-qr__code svg { display: block; width: 100%; height: 100%; }
.sx-qr__code::before, .sx-qr__code::after { content: ""; position: absolute; width: 22%; height: 22%; border: 3px solid var(--gold); filter: drop-shadow(0 0 6px var(--gold)); animation: sx-corner 2s ease-in-out infinite; }
.sx-qr__code::before { left: -9px; top: -9px; border-right: 0; border-bottom: 0; }
.sx-qr__code::after { right: -9px; bottom: -9px; border-left: 0; border-top: 0; }
@keyframes sx-corner { 50% { transform: scale(1.12); opacity: .6; } }
.sx-qr__text { min-width: 0; }
.sx-qr__title { margin: 0; font: 700 12.5cqh/1.15 var(--f-th); white-space: nowrap; color: #fff; text-shadow: 0 0 12px var(--magenta); }
.sx-qr__hint { margin: 3cqh 0 0; font: 500 8cqh/1.3 var(--f-th); white-space: nowrap; color: var(--muted); }
.sx-qr__url { margin: 4cqh 0 0; font: 600 7.5cqh/1.3 var(--f-th); color: var(--cyan); }

/* ------------------------------------------------------- results-hidden veil */
.sx-veil { position: absolute; left: 40px; right: 40px; top: 200px; bottom: 112px; display: grid; place-items: center; z-index: 6; pointer-events: none; }
.sx-veil[hidden] { display: none; }
.sx-veil__box { padding: 26px 70px; text-align: center; background: rgb(10 2 24 / 82%); border: 1px solid var(--gold); box-shadow: 0 0 40px rgb(255 211 107 / 35%), inset 0 0 40px rgb(255 63 216 / 25%);
	clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px); backdrop-filter: blur(4px); }
.sx-veil__eyebrow { margin: 0; font: 800 22px/1 var(--f-num); letter-spacing: .6em; color: var(--gold); animation: sx-blink 1.6s steps(1) infinite; }
.sx-veil__text { margin: 14px 0 0; font: 700 52px/1.2 var(--f-th); }

/* ----------------------------------------------------------------- footer */
.sx-foot { position: absolute; left: 40px; right: 40px; bottom: 28px; height: 64px; display: flex; align-items: center; gap: 18px; z-index: 3;
	background: var(--panel); border: 1px solid var(--line); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); padding: 0 22px 0 0; }
.sx-foot__tag { display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 26px; font: 800 20px/1 var(--f-num); letter-spacing: .25em; color: #120326; background: linear-gradient(90deg, var(--gold), #ffb347); flex: none; }
.sx-foot__tag i { width: 12px; height: 12px; border-radius: 50%; background: #ff2d55; animation: sx-blink 1s steps(1) infinite; }
.sx-marquee { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.sx-marquee__track { display: inline-flex; white-space: nowrap; animation: sx-marquee var(--dur, 40s) linear infinite; }
.sx-marquee__track span { font: 600 26px/1 var(--f-th); color: var(--white); padding-right: 70px; }
.sx-marquee__track span::before { content: "◆"; color: var(--magenta); margin-right: 22px; text-shadow: 0 0 10px var(--magenta); }
.sx-marquee__track b { color: var(--gold); font-weight: 700; }
@keyframes sx-marquee { to { transform: translateX(-50%); } }
.sx-sync { display: flex; align-items: center; gap: 10px; flex: none; font: 600 20px/1 var(--f-num); color: var(--muted); }
.sx-sync b { letter-spacing: .2em; }
.sx-sync i { width: 12px; height: 12px; border-radius: 50%; background: #3dff8f; box-shadow: 0 0 10px #3dff8f; }
.sx-sync.is-pulse i { animation: sx-sync .7s ease-out; }
.sx-sync.is-down i { background: #ff3b5c; box-shadow: 0 0 10px #ff3b5c; animation: sx-blink .8s steps(1) infinite; }
.sx-sync.is-down b::after { content: " OFFLINE"; color: #ff3b5c; }
@keyframes sx-sync { 0% { transform: scale(2.2); } 100% { transform: none; } }

/* -------------------------------------------------------------- boot intro */
.sx-boot { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(circle, #1a0636, #030008 70%); transition: opacity .7s ease, visibility .7s; }
body:not(.is-booting) .sx-boot { opacity: 0; visibility: hidden; }
.sx-boot__core { width: min(640px, 80vw); text-align: center; }
.sx-boot__title { margin: 0; font: 900 clamp(28px, 4.2vw, 64px)/1 var(--f-num); letter-spacing: .12em; color: #fff; text-shadow: 0 0 18px var(--magenta), 0 0 40px var(--violet); }
.sx-boot__title span { color: var(--cyan); margin: 0 .2em; }
.sx-boot__bar { position: relative; height: 6px; margin: 30px 0 16px; background: rgb(255 255 255 / 10%); overflow: hidden; }
.sx-boot__bar i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--magenta), var(--gold), var(--cyan)); box-shadow: 0 0 14px var(--magenta); animation: sx-load 1.5s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes sx-load { to { transform: scaleX(1); } }
.sx-boot__log { margin: 0; font: 600 clamp(12px, 1.1vw, 18px)/1.4 var(--f-num); letter-spacing: .2em; color: var(--cyan); }

/* --------------------------------------------------------- fullscreen hint */
.sx-fs { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--cyan); border-radius: 8px;
	background: rgb(8 2 20 / 85%); color: var(--cyan); font: 600 16px/1 var(--f-th); cursor: pointer; transition: opacity .4s; }
.sx-fs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
body.is-idle .sx-fs, body.is-full .sx-fs { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
	.sx-aurora i, .sx-pattern, .sx-floor__grid, .sx-beam, .sx-scan::after, .sx-tile::after, .sx-tile__laser, .sx-rings circle, .sx-emblem img, .sx-tile__bar i, .sx-title { animation: none !important; }
	.sx-tile::before { animation-duration: 30s; }
}
