/* ==========================================================================
   silspm — ผลการแข่งขัน: podium, ตารางผล, ตารางเหรียญ, โหมดเวที
   แอนิเมชันใช้เฉพาะ transform/opacity · หยุดเมื่อออกนอกจอ · ปิดในโหมดประหยัดพลังงาน
   ========================================================================== */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 400; }

/* ---------- result event header ---------- */
.res-head { display: flex; gap: 14px; align-items: center; padding: 16px 18px; flex-wrap: wrap; }
.res-head .gi { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.9rem; background: var(--gc, var(--primary)); color: #fff; flex: none; box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .18); }
.res-head h2 { margin: 0; font-size: 1.3rem; } .res-head .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-3); font-size: .9rem; margin-top: 2px; }
.res-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ev-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ev-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--gc, var(--accent)); }
.ev-card .t { font-weight: 700; line-height: 1.35; } .ev-card .w { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--ink-2); }

.res-level { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; flex-wrap: wrap; }
.res-level label { font-weight: 700; color: var(--ink-2); }
.res-level .select { width: min(240px, 100%); }
.sch-picks .select.ev { width: min(420px, 100%); }
.reg-stats.reg-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin-left: auto; margin-right: auto; }
.res-flag { width: 210px; }
.res-flag img { height: 40px; width: auto; vertical-align: middle; }
.res-done { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 7px 16px; border-radius: 999px; background: #d0121a; color: #fff; font-weight: 800; font-size: 1.08rem; line-height: 1.1; letter-spacing: .01em; text-decoration: none; white-space: nowrap; box-shadow: 0 2px 0 #8e0c12; }
.res-done .ic { width: 22px; height: 22px; flex: none; stroke-width: 3; }
.res-done:hover { background: #b01016; color: #fff; }
.res-latest { position: absolute; top: -11px; right: -4px; z-index: 2; padding: 1px 8px 2px; border-radius: 999px; background: #ffe14a; color: #8a1020; font-size: .72rem; font-weight: 800; line-height: 1.35; letter-spacing: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .28); pointer-events: none; animation: res-latest-blink .9s steps(2, end) infinite; }
.res-board td.res-flag:has(.res-latest) { padding-top: 16px; }
@keyframes res-latest-blink { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0; } }
html[data-eco="1"] .res-latest { animation: none; }
@media (prefers-reduced-motion: reduce) { .res-latest { animation: none; } }
.res-board tbody tr.is-wait td.no { box-shadow: inset 4px 0 0 #c4922a; }
.res-board tbody tr.is-done td.no { box-shadow: inset 4px 0 0 #d0121a; }
.res-board .school { color: inherit; text-decoration: none; }
.res-board a.school { color: var(--primary); }
.res-board a.school:hover { text-decoration: underline; }
@media (max-width: 720px) { .reg-stats.reg-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .res-flag { width: auto; }
  .res-flag img { height: 36px; }
  .res-done { min-height: 42px; font-size: 1.02rem; }
  .res-board tbody tr.is-wait { border-left-color: #c4922a; }
  .res-board tbody tr.is-done { border-left-color: #d0121a; }
}
.ev-card .w .ic { color: var(--accent); }

/* ---------- podium ---------- */
.podium { position: relative; overflow: hidden; border-radius: 20px; padding: 30px 12px 0; color: #fff; isolation: isolate;
  background: radial-gradient(520px 260px at 50% 0%, rgba(243, 215, 122, .28), transparent 70%), linear-gradient(180deg, #1a2a52 0%, #0e1830 100%); }
.podium-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.podium-bg .sp { position: absolute; top: -10px; width: 46%; height: 115%; opacity: .5; background: linear-gradient(180deg, rgba(255, 244, 190, .5), rgba(255, 244, 190, 0) 78%); }
.podium-bg .sp-l { left: -6%; clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); transform-origin: top; transform: rotate(-12deg); }
.podium-bg .sp-r { right: -6%; clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); transform-origin: top; transform: rotate(12deg); }
.podium-bg .st { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: .5; animation: twinkle 3.2s ease-in-out infinite; animation-delay: var(--t, 0s); left: var(--x); top: var(--y); }
@keyframes twinkle { 50% { opacity: .08; transform: scale(.5); } }
.podium-title { text-align: center; font-family: var(--serif); font-size: .95rem; color: var(--accent-2); letter-spacing: .08em; margin-bottom: 4px; }
.podium-row { display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: 8px; max-width: 800px; margin: 0 auto; }
.pod { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.pod-teams { display: flex; flex-direction: column; gap: 8px; padding: 0 2px 8px; }
.pod-team { position: relative; overflow: hidden; text-align: center; padding: 10px 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(232, 199, 102, .45); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.pod-medal { font-size: 2.1rem; line-height: 1; display: block; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.pod-1 .pod-medal { font-size: 2.8rem; }
.pod-award { display: block; font-size: .78rem; color: #f3d77a; font-weight: 700; margin-top: 2px; }
.pod-school { display: block; font-family: var(--serif); font-size: .98rem; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.pod-1 .pod-school { font-size: 1.1rem; }
.pod-names { display: block; font-size: .78rem; color: #cfd6e6; margin-top: 2px; line-height: 1.35; }
.pod-score { display: inline-block; margin-top: 4px; font-family: var(--serif); font-weight: 800; font-size: 1.35rem; color: #f3d77a; font-variant-numeric: tabular-nums; }
.pod-score small { font-size: .7rem; font-weight: 500; color: #cfd6e6; }
.pod-block { height: var(--h, 110px); border-radius: 12px 12px 0 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: 2.4rem; color: rgba(0, 0, 0, .35); position: relative; overflow: hidden; }
.pod-1 .pod-block { background: linear-gradient(180deg, #fbe28a, #c9a227); box-shadow: 0 0 40px rgba(243, 215, 122, .35); }
.pod-2 .pod-block { background: linear-gradient(180deg, #e3e8f0, #9aa3b2); }
.pod-3 .pod-block { background: linear-gradient(180deg, #e9b98a, #b87333); }
.pod-block::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); }
.podium-floor { height: 14px; margin: 0 -12px; background: linear-gradient(180deg, #0a1020, #060a14); border-top: 2px solid rgba(232, 199, 102, .5); }
.pod-1 .pod-team { border-color: #f3d77a; background: linear-gradient(180deg, rgba(243, 215, 122, .2), rgba(255, 255, 255, .08)); }
.pod-empty { opacity: .0; }
@media (max-width: 520px) { .pod-block { font-size: 1.8rem; } .pod-school { font-size: .86rem; } .pod-1 .pod-school { font-size: .95rem; } .pod-medal { font-size: 1.7rem; } .pod-1 .pod-medal { font-size: 2.2rem; } .pod-names { display: none; } .podium { padding-top: 22px; } }

/* armed → play (ไม่มี JS / โหมดประหยัด = แสดงผลสุดท้ายทันที) */
.js .podium.is-armed .pod-block { transform: scaleY(0); transform-origin: bottom; }
.js .podium.is-armed .pod-team { opacity: 0; transform: translateY(34px); }
.js .podium.is-armed .pod-medal { opacity: 0; }
.js .podium.is-armed .sp { opacity: 0; }
.podium.is-play .pod-block { animation: pod-grow .9s cubic-bezier(.2, .85, .25, 1) var(--d, 0s) both; }
.podium.is-play .pod-team { animation: pod-team .7s cubic-bezier(.2, .9, .3, 1.1) calc(var(--d, 0s) + .55s) both; }
.podium.is-play .pod-medal { animation: medal-drop 1s cubic-bezier(.3, 1.6, .5, 1) calc(var(--d, 0s) + 1s) both; }
.podium.is-play .sp { animation: spot-in 1.6s ease-out .2s both; }
.podium.is-play .pod-1 .pod-block::after { animation: shine 1.4s ease-in-out calc(var(--d, 0s) + 1.4s) 2; }
.podium.is-play .pod-1 .pod-team { animation: pod-team .7s cubic-bezier(.2, .9, .3, 1.1) calc(var(--d, 0s) + .55s) both, glow 2.4s ease-out calc(var(--d, 0s) + 1.3s) 2; }
@keyframes pod-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pod-team { from { opacity: 0; transform: translateY(34px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes medal-drop { 0% { opacity: 0; transform: translateY(-150px) scale(.5) rotate(-40deg); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes spot-in { from { opacity: 0; } to { opacity: .5; } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(243, 215, 122, .7); } 100% { box-shadow: 0 0 0 26px rgba(243, 215, 122, 0); } }
.podium-tools { display: flex; justify-content: center; gap: 8px; padding: 12px 0 16px; position: relative; }
.podium .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .4); } .podium .btn-outline:hover { background: rgba(255, 255, 255, .12); }
.podium.is-paused .st { animation-play-state: paused; }

/* ---------- result table ---------- */
.res-table td.rk { font-family: var(--serif); font-weight: 800; font-size: 1.1rem; width: 52px; text-align: center; }
.res-table .names { font-size: .85rem; color: var(--ink-3); line-height: 1.4; }
.res-table .school { font-weight: 600; }
.scorebar { display: block; height: 6px; border-radius: 99px; background: var(--bg-2); margin-top: 4px; overflow: hidden; min-width: 70px; }
.scorebar i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transform-origin: left; }
.res-row.rank-1 td { background: linear-gradient(90deg, rgba(243, 215, 122, .28), transparent 70%); }
.res-row.rank-2 td { background: linear-gradient(90deg, rgba(154, 163, 178, .22), transparent 70%); }
.res-row.rank-3 td { background: linear-gradient(90deg, rgba(184, 115, 51, .2), transparent 70%); }
.js .res-table.is-armed .res-row { opacity: 0; transform: translateX(-16px); }
.res-table.is-play .res-row { animation: row-in .5s ease-out both; animation-delay: calc(var(--i, 0) * 55ms + var(--base, 0s)); }
.res-table.is-play .scorebar i { animation: bar-in .9s ease-out both; animation-delay: calc(var(--i, 0) * 55ms + var(--base, 0s) + .15s); }
@keyframes row-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes bar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 640px) { .res-table.table-stack td.rk { width: auto; text-align: right; } }

/* ---------- ผลล่าสุด: การ์ดเรียงครบ ไม่มีแถบเลื่อน ---------- */
.ticker { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tick-card { min-width: 0; height: 100%; padding: 14px 16px; border-top: 4px solid var(--gc, var(--accent)); display: flex; flex-direction: column; align-items: flex-start; }
.tick-card .when { font-size: .78rem; color: var(--ink-3); }
.tick-card b { display: block; margin-top: 6px; line-height: 1.45; font-size: 1.02rem; }
.tick-level { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: .78rem; font-weight: 700; line-height: 1.5; vertical-align: 1px; white-space: nowrap; }
.tick-group { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--gc, var(--primary)); background: color-mix(in srgb, var(--gc, var(--accent)) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gc, var(--accent)) 35%, var(--line)); }
.tick-more { justify-content: center; gap: 4px; border-top-color: var(--accent); background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.tick-more b { font-family: var(--serif); font-size: 1.05rem; }
.tick-more span { color: var(--accent-ink); font-weight: 700; }
.tick-blink { display: inline-block; padding: 1px 10px; border-radius: 999px; animation: tick-blink .8s steps(2, end) infinite; }
@keyframes tick-blink {
  from { background: #f0d48a; color: #3a2800; }
  to { background: transparent; color: var(--accent-ink); }
}
html[data-eco="1"] .tick-blink { animation: none; background: transparent; color: var(--accent-ink); }
@media (min-width: 720px) { .ticker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ticker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- medal table (สถิติ) ---------- */
.mt-top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.mt-top { text-align: center; padding: 16px 10px; border-radius: 16px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--primary), var(--primary-2)); border: 1px solid rgba(244, 162, 97, .45); }
.mt-top .no { font-family: var(--serif); font-size: 2.2rem; font-weight: 800; color: var(--accent-2); line-height: 1; }
.mt-top b { display: block; font-family: var(--serif); margin: 4px 0; line-height: 1.3; } .mt-top small { color: #d6def0; }
.mt-top:nth-child(1) { order: 2; transform: translateY(-8px); box-shadow: 0 10px 30px rgba(22, 50, 79, .28); } .mt-top:nth-child(2) { order: 1; } .mt-top:nth-child(3) { order: 3; }
@media (max-width: 560px) { .mt-top3 { grid-template-columns: 1fr; } .mt-top:nth-child(n) { order: 0; transform: none; } }
.mt-sort { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mt-list { display: flex; flex-direction: column; gap: 8px; position: relative; }
.mt-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.mt-row .rk { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-family: var(--serif); background: var(--bg-2); color: var(--ink-2); }
.mt-row:nth-child(1) .rk { background: linear-gradient(135deg, #fbe28a, #c9a227); color: #3a2c00; } .mt-row:nth-child(2) .rk { background: linear-gradient(135deg, #eef1f6, #9aa3b2); color: #222; } .mt-row:nth-child(3) .rk { background: linear-gradient(135deg, #f0c9a2, #b87333); color: #2c1600; }
.mt-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; } .mt-name small { display: block; color: var(--ink-3); font-weight: 400; }
.mt-bar { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: var(--bg-2); margin-top: 6px; }
.mt-bar i { display: block; height: 100%; width: var(--w, 0%); transform-origin: left; } .mt-bar .g { background: #d4a017; } .mt-bar .s { background: #9aa3b2; } .mt-bar .b { background: #b87333; }
.mt-nums { display: flex; gap: 6px; align-items: center; }
.mt-n { min-width: 34px; text-align: center; padding: 3px 6px; border-radius: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mt-n.g { background: #fbf0c4; color: #6b5200; } .mt-n.s { background: #eceff4; color: #4a5468; } .mt-n.b { background: #f6e3d2; color: #7a4310; }
:root[data-theme="dark"] .mt-n.g { background: #4a3d0d; color: #f3d77a; } :root[data-theme="dark"] .mt-n.s { background: #2b3347; color: #cdd5e5; } :root[data-theme="dark"] .mt-n.b { background: #4a2e18; color: #f0c294; }
.mt-tot { text-align: right; min-width: 64px; } .mt-tot b { font-family: var(--serif); font-size: 1.2rem; display: block; line-height: 1.1; } .mt-tot small { color: var(--ink-3); }
@media (max-width: 560px) { .mt-row { grid-template-columns: 36px minmax(0, 1fr); } .mt-nums { grid-column: 2; } .mt-tot { grid-column: 2; text-align: left; display: flex; gap: 8px; align-items: baseline; } }
/* สรุปผลโรงเรียน: อันดับรางวัล และเหรียญ */
.stand-card { margin-bottom: 8px; }
.stand-note { margin: -6px 0 12px; }
.stand-next { margin-top: 36px; }
.stand-board { font-size: 1.08rem; }
.stand-board th { font-size: .98rem; }
.stand-board .school { font-size: 1.14rem; line-height: 1.35; }
.stand-board th.num, .stand-board td.num { text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.12rem; }
.stand-board td.is-zero { color: var(--ink-3); font-weight: 600; }
.stand-board td.is-total { background: color-mix(in srgb, #f3d77a 28%, var(--surface)); color: var(--primary); font-family: var(--serif); font-size: 1.2rem; }
.stand-board tr:hover td.is-total { background: color-mix(in srgb, #f3d77a 42%, var(--surface)); }
.stand-board th.c-gold { box-shadow: inset 0 -3px 0 #e0b43a; }
.stand-board th.c-silver { box-shadow: inset 0 -3px 0 #b7c0cc; }
.stand-board th.c-bronze { box-shadow: inset 0 -3px 0 #c4844a; }
.stand-board th.is-total { background: #24365f; }
.stand-gold:not(.is-zero) { color: #8a6408; }
.stand-silver:not(.is-zero) { color: #4e5966; }
.stand-bronze:not(.is-zero) { color: #8a4e22; }
:root[data-theme="dark"] .stand-gold:not(.is-zero) { color: #f3d77a; }
:root[data-theme="dark"] .stand-silver:not(.is-zero) { color: #d5dbe6; }
:root[data-theme="dark"] .stand-bronze:not(.is-zero) { color: #e7b48a; }
:root[data-theme="dark"] .stand-board td.is-total { color: #f3d77a; }
.stand-rk { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-family: var(--serif); font-weight: 800; font-size: 1.05rem; }
.stand-rk.is-1 { background: linear-gradient(135deg, #fbe28a, #c9a227); color: #3a2c00; }
.stand-rk.is-2 { background: linear-gradient(135deg, #f4f7fb, #9aa3b2); color: #222; }
.stand-rk.is-3 { background: linear-gradient(135deg, #f3d2b0, #b87333); color: #2c1600; }
.stand-sub { display: block; margin-top: 2px; color: var(--ink-3); font-size: .8rem; font-weight: 600; }
.stand-board tbody tr.is-1 td { background: color-mix(in srgb, #f3d77a 14%, var(--surface)); }
.stand-board tbody tr.is-1 td.is-total { background: color-mix(in srgb, #f3d77a 40%, var(--surface)); }
.stand-board td.rich { min-width: 14rem; }
.js .mt-list.is-armed .mt-row { opacity: 0; transform: translateY(14px); }
.mt-list.is-play .mt-row { animation: row-up .5s ease-out backwards; animation-delay: calc(var(--i, 0) * 40ms); }
.mt-list.is-play .mt-bar i { animation: bar-in .9s ease-out both; animation-delay: calc(var(--i, 0) * 40ms + .2s); }
@keyframes row-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   โหมดเวที (stage) — จอใหญ่/โปรเจกเตอร์
   ========================================================================== */
body.stage-body { background: #04060d; color: #fff; overflow: hidden; display: block; padding: 0; }
.stage { position: fixed; inset: 0; display: flex; flex-direction: column; background: radial-gradient(900px 500px at 50% -10%, rgba(243, 215, 122, .22), transparent 65%), linear-gradient(180deg, #0f1a38, #04060d 80%); }
.stage-top { display: flex; align-items: center; gap: 14px; padding: 12px 20px; z-index: 5; }
.stage-top .brand-t b { font-size: 1.1rem; } .stage-top .sp-grow { flex: 1; }
.stage-top .ev-count { color: var(--accent-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.stage-main { flex: 1; position: relative; overflow: hidden; display: grid; place-items: center; padding: 0 3vw 64px; }
.stage-ctrl { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); opacity: .9; flex-wrap: wrap; }
.stage-ctrl .btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); } .stage-ctrl .btn:hover { background: rgba(255, 255, 255, .22); }
.stage-ctrl .btn[aria-pressed="true"] { background: var(--accent); color: #2a2100; }
.stage-ctrl select { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; min-height: 44px; padding: 0 12px; font: inherit; max-width: 46vw; }
.stage-ctrl select option { color: #000; }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 4vw 60px; }
.slide[hidden] { display: none; }
.sl-intro .gi { font-size: clamp(3rem, 10vw, 6rem); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .5)); animation: pop-in .9s cubic-bezier(.3, 1.5, .5, 1) both; }
.sl-intro h2 { color: #fff; font-size: clamp(1.8rem, 5.5vw, 3.6rem); margin: .2em 0; animation: rise-in .9s ease-out .2s both; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.sl-intro .lv { display: inline-block; padding: 4px 18px; border-radius: 99px; background: rgba(226, 91, 42, .2); border: 1px solid var(--accent-2); color: var(--accent-2); font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.5rem); animation: rise-in .9s ease-out .45s both; }
.sl-intro .hint { margin-top: 24px; color: #8f9bb6; animation: blink-soft 2s ease-in-out infinite; }
@keyframes blink-soft { 50% { opacity: .35; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.3) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.stage .podium { background: transparent; width: min(1100px, 94vw); padding-top: 0; overflow: visible; }
.stage .podium-bg { display: none; }
.stage .pod-team { padding: 14px 10px; background: rgba(255, 255, 255, .08); }
.stage .pod-school { font-size: clamp(1rem, 2.4vw, 1.6rem); } .stage .pod-1 .pod-school { font-size: clamp(1.15rem, 3vw, 2.1rem); }
.stage .pod-names { font-size: clamp(.8rem, 1.5vw, 1.05rem); } .stage .pod-score { font-size: clamp(1.4rem, 3.4vw, 2.6rem); }
.stage .pod-medal { font-size: clamp(2.2rem, 5vw, 3.8rem); } .stage .pod-1 .pod-medal { font-size: clamp(3rem, 7vw, 5.4rem); }
.stage .pod-award { font-size: clamp(.8rem, 1.6vw, 1.15rem); }
.stage .pod-block { height: calc(var(--hv, 14) * 1vh); min-height: 46px; }
.stage .pod-1 { --hv: 21; } .stage .pod-2 { --hv: 15; } .stage .pod-3 { --hv: 11; }
.stage .pod { visibility: hidden; } .stage .pod.is-shown { visibility: visible; }
.stage .pod.is-shown .pod-block { animation: pod-grow .8s cubic-bezier(.2, .85, .25, 1) both; }
.stage .pod.is-shown .pod-team { animation: pod-team .7s cubic-bezier(.2, .9, .3, 1.1) .45s both; }
.stage .pod.is-shown .pod-medal { animation: medal-drop 1s cubic-bezier(.3, 1.6, .5, 1) .9s both; }
.stage .pod-1.is-shown .pod-block::after { animation: shine 1.4s ease-in-out 1.2s 2; }
.stage .pod-1.is-shown .pod-team { animation: pod-team .7s cubic-bezier(.2, .9, .3, 1.1) .45s both, glow 2.4s ease-out 1.2s 3; }
.stage .podium-floor { display: none; }
.sl-list { justify-content: flex-start; padding-top: 4vh; }
.sl-list h3 { color: var(--accent-2); font-size: clamp(1.2rem, 3vw, 2rem); margin-bottom: .6em; }
.sl-list .list { width: min(1000px, 94vw); display: flex; flex-direction: column; gap: 8px; text-align: left; max-height: calc(100vh - 230px); overflow: auto; }
.sl-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding: 10px 16px; background: rgba(255, 255, 255, .07); border-radius: 14px; border-left: 5px solid #555; animation: row-in .5s ease-out both; animation-delay: calc(var(--i, 0) * 70ms); font-size: clamp(.95rem, 1.8vw, 1.3rem); }
.sl-row.m-gold { border-left-color: #d4a017; } .sl-row.m-silver { border-left-color: #9aa3b2; } .sl-row.m-bronze { border-left-color: #b87333; }
.sl-row .n { font-family: var(--serif); font-weight: 800; color: var(--accent-2); text-align: center; } .sl-row small { display: block; color: #aab4cc; }
.sl-row .sc { font-family: var(--serif); font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; text-align: right; }
.sl-empty { color: #8f9bb6; font-size: 1.4rem; }
/* ม่านเปิด */
.curtain { position: absolute; top: 0; bottom: 0; width: 51%; z-index: 20; background: repeating-linear-gradient(90deg, #6e0f1e 0 26px, #8c1c2b 26px 52px, #5a0a18 52px 60px); box-shadow: inset 0 -40px 60px rgba(0, 0, 0, .5); transition: transform 1.8s cubic-bezier(.7, 0, .2, 1); }
.curtain-l { left: 0; transform-origin: left; border-right: 3px solid var(--accent); } .curtain-r { right: 0; border-left: 3px solid var(--accent); }
.stage.is-open .curtain-l { transform: translateX(-102%); } .stage.is-open .curtain-r { transform: translateX(102%); }
.stage.is-open .curtain { pointer-events: none; }
.curtain-hint { position: absolute; z-index: 21; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; pointer-events: none; transition: opacity .6s; }
.stage.is-open .curtain-hint { opacity: 0; }
.curtain-hint .btn { pointer-events: auto; }
.stage.cursor-hide { cursor: none; }
.stage-toast { position: absolute; z-index: 30; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .7); padding: 6px 16px; border-radius: 99px; font-size: .9rem; opacity: 0; transition: opacity .3s; pointer-events: none; }
.stage-toast.show { opacity: 1; }
html[data-eco="1"] .curtain { transition-duration: .001s; }

@media (max-width: 1100px) { .stage-ctrl .btn .lbl { display: none; } .stage-ctrl select { max-width: 34vw; } }
@media (max-height: 620px) { .stage .pod-team { padding: 8px 6px; } .stage .pod-medal { font-size: 2rem; } .stage .pod-1 .pod-medal { font-size: 2.6rem; } .stage .pod-score { font-size: 1.3rem; } .stage .pod-names { display: none; } }
