:root {
  color-scheme: dark;
  --ink: #f9f2ff;
  --muted: #c9bbd2;
  --night: #100418;
  --night-2: #1c0828;
  --card: rgba(39, 15, 51, .9);
  --card-2: #321241;
  --line: rgba(255, 255, 255, .13);
  --orange: #ff8a1f;
  --orange-2: #ffb44b;
  --lime: #b8ff52;
  --purple: #a66cff;
  --danger: #ff5277;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--night); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, sans-serif; background:
  radial-gradient(circle at 10% -5%, rgba(166,108,255,.28), transparent 28rem),
  radial-gradient(circle at 95% 15%, rgba(255,138,31,.18), transparent 26rem),
  var(--night); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .22; background-image: radial-gradient(rgba(255,255,255,.7) .7px, transparent .7px); background-size: 24px 24px; mask-image: linear-gradient(to bottom, black, transparent 75%); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 8vw, 4rem); line-height: .98; letter-spacing: -.045em; margin-bottom: .8rem; }
h2 { font-size: clamp(1.35rem, 5vw, 2rem); line-height: 1.05; letter-spacing: -.025em; margin-bottom: .35rem; }
.eyebrow { margin-bottom: .65rem; color: var(--orange-2); font-size: .78rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.muted, .empty-copy { color: var(--muted); }
.card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(55,22,72,.95), rgba(29,9,40,.96)); box-shadow: var(--shadow); }

.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem 1.05rem; border: 1px solid transparent; border-radius: 14px; font-weight: 850; text-decoration: none; cursor: pointer; transition: transform .16s ease, filter .16s ease, border-color .16s ease; }
.button:hover { filter: brightness(1.08); }
.button:active { transform: translateY(1px) scale(.99); }
.button:focus-visible, input:focus-visible, .segmented button:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.button.primary { color: #211027; background: linear-gradient(135deg, var(--orange-2), var(--orange)); box-shadow: 0 10px 30px rgba(255,138,31,.2); }
.button.secondary { color: #1b1024; background: var(--lime); }
.button.ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.055); }
.button.danger { color: #fff; border-color: rgba(255,82,119,.5); background: rgba(255,82,119,.16); }
.button.small { min-height: 38px; padding: .45rem .75rem; font-size: .86rem; border-radius: 11px; }
.button.wide { width: 100%; }
.button:disabled { opacity: .46; cursor: not-allowed; filter: grayscale(.3); }

.app-header, .vote-header { position: sticky; z-index: 30; top: 0; display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: max(.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .75rem max(1rem, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: rgba(16,4,24,.82); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.brand > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #24102d; background: var(--orange); font-size: 1.35rem; transform: rotate(-9deg); }
.app-shell, .vote-shell { position: relative; width: min(760px, 100%); margin-inline: auto; padding: 1rem 1rem calc(5rem + env(safe-area-inset-bottom)); }
.app-shell > section#dashboard { display: grid; gap: 1rem; }

.auth-card { max-width: 460px; margin: clamp(2rem, 10vh, 6rem) auto; padding: clamp(1.3rem, 5vw, 2rem); }
label, legend { display: block; margin: 1rem 0 .45rem; color: #eadff0; font-size: .86rem; font-weight: 800; }
input:not([type="file"]) { width: 100%; height: 52px; padding: 0 .9rem; border: 1px solid rgba(255,255,255,.17); border-radius: 13px; color: var(--ink); background: rgba(7,2,11,.55); }
input::placeholder { color: #8f8098; }
.auth-card .button { margin-top: 1.15rem; }
.pin-progress { min-height: 1.35rem; margin: .75rem 0 0; color: var(--orange-2); font-size: .9rem; font-weight: 850; }
.pin-progress.ready { color: var(--lime); }
.form-message { min-height: 1.25rem; margin: .8rem 0 0; color: var(--lime); font-size: .88rem; font-weight: 750; }
.form-message.error { color: #ff96ab; }

.host-hero { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.4rem .3rem .6rem; }
.host-hero h1 { max-width: 520px; margin: 0; font-size: clamp(2.35rem, 9vw, 4.4rem); }
.control-card, .entry-card, .contestants-card, .totals-card, .danger-zone { padding: 1.15rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .85rem; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.count-pill, .privacy-pill { flex: none; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); font-size: .78rem; font-weight: 850; }
.privacy-pill { color: var(--lime); border-color: rgba(184,255,82,.25); }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.status-panel { display: grid; gap: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(4,0,8,.25); }
.status-label { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.status-panel strong { font-size: 1.45rem; }
.status-panel strong.status-on { color: var(--lime); }
.status-panel strong.status-revealed { color: var(--orange-2); }
.reveal-panel { align-content: start; }
.reveal-ready-hint { margin: .1rem 0 0; color: #ffe8b0; font-size: .9rem; line-height: 1.35; }
.reveal-launch { width: 100%; min-height: 54px; margin-top: .15rem; border: 2px solid #ffd15c; box-shadow: 0 0 0 0 rgba(255,138,31,.45); animation: reveal-ready-pulse 1.7s ease-out infinite; font-weight: 950; }
.interval-control { margin: 1.1rem 0 0; padding: 0; border: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; padding: .3rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(4,0,8,.34); }
.segmented button { min-height: 42px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 850; cursor: pointer; }
.segmented button.active { color: #201027; background: var(--lime); }
.round-reset { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid rgba(184,255,82,.28); border-radius: 16px; background: rgba(184,255,82,.07); }
.round-reset strong, .round-reset span { display: block; }
.round-reset span { margin-top: .25rem; color: var(--muted); font-size: .8rem; line-height: 1.35; }

.photo-picker { position: relative; min-height: 210px; overflow: hidden; border: 2px dashed rgba(255,255,255,.2); border-radius: 20px; background: rgba(5,1,8,.38); }
.photo-picker input[type="file"] { position: absolute; z-index: 4; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.photo-placeholder { min-height: 210px; display: grid; place-content: center; justify-items: center; gap: .4rem; padding: 1rem; color: var(--muted); text-align: center; }
.photo-placeholder > span { font-size: 2.8rem; }
.photo-placeholder strong { color: var(--ink); }
.photo-placeholder small { font-size: .75rem; }
#photoPreview { width: 100%; height: 270px; object-fit: cover; }
.entry-card .button.wide { margin-top: 1rem; }

.contestant-list, .totals-list { display: grid; gap: .65rem; }
.contestant-row { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: .8rem; padding: .65rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(4,0,8,.27); }
.contestant-row img { width: 72px; height: 76px; border-radius: 12px; object-fit: cover; background: #09020d; }
.contestant-info { min-width: 0; }
.contestant-info strong, .contestant-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contestant-info strong { font-size: 1rem; }
.contestant-info span { margin-top: .2rem; color: var(--muted); font-size: .82rem; }
.row-actions { display: grid; grid-template-columns: repeat(2, 38px); gap: .35rem; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.06); cursor: pointer; }
.icon-button:disabled { opacity: .3; }
.icon-button.delete { color: #ff9aad; }
.empty-copy { margin: 1rem 0 .2rem; text-align: center; }

.total-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: .75rem; padding: .8rem; border-bottom: 1px solid var(--line); }
.total-row:last-child { border-bottom: 0; }
.rank-badge { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #24102d; background: var(--orange-2); font-weight: 950; }
.total-name { min-width: 0; }
.total-name strong, .total-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.total-name span { color: var(--muted); font-size: .78rem; }
.total-numbers { text-align: right; }
.total-numbers strong, .total-numbers span { display: block; }
.total-numbers strong { color: var(--lime); font-size: 1.15rem; }
.total-numbers span { color: var(--muted); font-size: .72rem; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-color: rgba(255,82,119,.25); }
.danger-zone h2 { font-size: 1.1rem; }
.danger-zone p { margin: 0; color: var(--muted); font-size: .82rem; }

/* Guest ballot */
.vote-header { justify-content: center; }
.vote-shell { width: min(680px, 100%); }
.waiting-card, .thanks-card { margin-top: clamp(2rem, 10vh, 6rem); padding: 2rem 1.3rem; text-align: center; }
.floating-ghost { display: inline-block; margin-bottom: 1rem; font-size: 4rem; animation: float 2.8s ease-in-out infinite; }
.waiting-card p:not(.eyebrow), .thanks-card p:not(.eyebrow) { max-width: 32rem; margin-inline: auto; color: var(--muted); }
.waiting-pulse { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1rem; border-radius: 999px; color: var(--lime); background: rgba(184,255,82,.08); font-weight: 850; }
.waiting-pulse::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(184,255,82,.5); animation: pulse 1.6s infinite; }
.vote-intro { padding: 1.5rem .25rem .8rem; }
.vote-intro p:last-child { color: var(--muted); }
.ballot-list { display: grid; gap: 1rem; }
.ballot-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(55,22,72,.97), rgba(29,9,40,.97)); box-shadow: var(--shadow); }
.ballot-card img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; background: #09020d; }
.ballot-card-content { padding: 1rem; }
.ballot-card h2 { margin-bottom: .2rem; }
.ballot-guest { margin-bottom: .9rem; color: var(--muted); }
.star-fieldset { margin: 0; padding: 0; border: 0; }
.star-fieldset legend { width: 100%; margin: 0 0 .45rem; color: var(--muted); font-size: .75rem; }
.star-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.star-option { position: relative; }
.star-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.star-option label { height: 50px; display: grid; place-items: center; margin: 0; border: 1px solid var(--line); border-radius: 12px; color: #725c7d; background: rgba(3,0,5,.28); font-size: 1.55rem; cursor: pointer; }
.star-option input:focus-visible + label { outline: 3px solid var(--lime); outline-offset: 2px; }
.star-option label.active { color: #2b1430; border-color: var(--orange); background: var(--orange-2); }
.submit-dock { position: sticky; z-index: 20; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 1rem -.35rem 0; padding: .85rem .75rem calc(.85rem + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 18px 18px 0 0; background: rgba(20,5,29,.94); backdrop-filter: blur(18px); }
.submit-dock > div { min-width: 0; }
.submit-dock strong, .submit-dock span { display: block; }
.submit-dock span { margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.submit-dock .button { flex: none; }
.celebration-mark { width: 86px; height: 86px; display: grid; place-items: center; margin: 0 auto 1.2rem; border-radius: 50%; color: #24102d; background: var(--lime); box-shadow: 0 0 70px rgba(184,255,82,.25); font-size: 2.8rem; transform: rotate(8deg); }

/* TV slideshow */
.tv-page { overflow: hidden; background: #07020a; }
.tv-page::before { z-index: 3; opacity: .12; }
.tv, .tv-slide, .tv-results, .tv-empty { width: 100vw; height: 100vh; height: 100dvh; }
.tv { position: relative; overflow: hidden; }
.tv-empty { display: grid; place-content: center; justify-items: center; padding: 5vw; text-align: center; background: radial-gradient(circle at center, #37124b, #09020d 66%); }
.tv-empty h1 { font-size: clamp(4rem, 11vw, 10rem); text-shadow: 0 10px 50px #000; }
.tv-empty p:last-child { color: var(--muted); font-size: clamp(1.2rem, 2vw, 2rem); }
.moon-mark { width: clamp(90px, 12vw, 170px); height: clamp(90px, 12vw, 170px); display: grid; place-items: center; margin-bottom: 2rem; border-radius: 32%; color: #27102e; background: var(--orange); box-shadow: 0 0 100px rgba(255,138,31,.35); font-size: clamp(4rem, 8vw, 8rem); transform: rotate(-10deg); }
.tv-slide { position: absolute; inset: 0; animation: fade-in .7s ease; }
.tv-photo { width: 100%; height: 100%; display: block; object-fit: contain; background: #050107; }
.tv-vignette { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,1,7,.92) 0%, rgba(5,1,7,.3) 52%, transparent 72%), linear-gradient(0deg, rgba(5,1,7,.92), transparent 48%); }
.tv-caption { position: absolute; z-index: 2; left: 5vw; bottom: 7vh; width: min(62vw, 1100px); }
.tv-caption h1 { max-width: 100%; margin-bottom: .4rem; font-size: clamp(4rem, 8.5vw, 10rem); text-wrap: balance; text-shadow: 0 8px 35px #000; }
.tv-guest { margin: 0; color: #eee0f7; font-size: clamp(1.8rem, 3vw, 4rem); font-weight: 700; }

.vote-qr { position: fixed; z-index: 20; right: max(2.5vw, 24px); bottom: max(2.5vw, 24px); width: clamp(170px, 16vw, 280px); padding: clamp(.7rem, 1vw, 1.1rem); border: 3px solid var(--orange); border-radius: 22px; color: #25102d; background: #fff; box-shadow: 0 15px 60px #000; text-align: center; }
.vote-qr img { width: 100%; display: block; image-rendering: pixelated; }
.vote-qr strong { display: block; margin-top: .45rem; font-size: clamp(1rem, 1.45vw, 1.6rem); }
.vote-qr span { display: block; margin-top: .15rem; color: #5f4a67; font-size: clamp(.7rem, .9vw, 1rem); }
.tv-results { position: absolute; z-index: 2; inset: 0; display: grid; grid-template-rows: auto 1fr; padding: 3vh 4vw 4vh; background: radial-gradient(circle at 50% 27%, #67207d 0, #2b0a39 38%, #100318 75%); animation: reveal .8s ease; }
.tv-results::before, .tv-results::after { content: "✦  ★  ✦  ★  ✦"; position: absolute; color: var(--orange); font-size: 3vw; letter-spacing: 3vw; animation: drift 8s linear infinite; opacity: .6; }
.tv-results::before { top: 8%; left: -8%; }
.tv-results::after { right: -8%; bottom: 8%; animation-direction: reverse; }
.tv-results header { position: relative; z-index: 4; text-align: center; }
.tv-results h1 { margin-bottom: .35rem; color: #fffaf2; font-size: clamp(4.5rem, 8.5vw, 9.5rem); text-shadow: 0 8px 42px #000, 0 0 35px rgba(255,138,31,.2); }
.tv-results header > p:last-child { color: #f0e4f8; font-size: clamp(1.45rem, 2.25vw, 2.4rem); font-weight: 750; text-shadow: 0 4px 18px #000; }
.podium { position: relative; z-index: 4; align-self: center; display: flex; align-items: flex-end; justify-content: center; gap: clamp(18px, 3vw, 54px); max-height: 64vh; }
.podium-card { position: relative; width: min(27vw, 430px); height: min(47vh, 430px); display: grid; grid-template-rows: minmax(0,1fr) auto; overflow: hidden; border: 2px solid rgba(255,255,255,.24); border-radius: clamp(18px, 2vw, 34px); background: rgba(17,4,25,.94); box-shadow: var(--shadow); }
.podium-card.winner { order: -1; width: min(42vw, 720px); height: min(60vh, 560px); border: 5px solid var(--orange); transform: none; box-shadow: 0 0 120px rgba(255,138,31,.34); }
.podium-card.winner:only-child { width: min(48vw, 760px); height: min(62vh, 580px); max-height: none; }
.podium-card img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.podium-copy { padding: 1.35vw 1.2vw 1.45vw; text-align: center; }
.place-ribbon { position: absolute; z-index: 5; top: 25px; right: -53px; width: 210px; padding: .58rem .2rem; transform: rotate(45deg); color: #23102a; background: linear-gradient(135deg, #ffe08a, #ff9d24); box-shadow: 0 5px 22px rgba(0,0,0,.42); font-size: clamp(.82rem, 1.25vw, 1.3rem); font-weight: 1000; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.place-ribbon.runner-up { color: #21162a; background: linear-gradient(135deg, #f4eff9, #b9a8c8); }
.podium-card h2 { margin-bottom: .2rem; color: #fffaf2; font-size: clamp(2rem, 3.25vw, 4.3rem); text-shadow: 0 4px 18px #000; }
.podium-card p { margin-bottom: .4rem; color: #f1e5f8; font-size: clamp(1.25rem, 1.65vw, 2rem); font-weight: 750; }


/* Giant-TV winner reveal: theatrical, stylized, and intentionally digital. */
.suspense-overlay { position: fixed; z-index: 60; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1.5vh; overflow: hidden; background: radial-gradient(circle at 50% 48%, #43164e 0, #110518 38%, #020103 78%); text-align: center; }
.spotlight { position: absolute; top: -32vh; left: 50%; width: 50vw; height: 120vh; transform: translateX(-50%); background: linear-gradient(to bottom, rgba(255,233,178,.18), rgba(255,166,61,.42) 62%, transparent); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); filter: blur(20px); animation: spotlight-sway 2.4s ease-in-out infinite alternate; }
.countdown-number { position: relative; z-index: 2; color: #fff7e8; font-size: clamp(10rem, 28vw, 28rem); font-weight: 950; line-height: .82; text-shadow: 0 0 38px rgba(255,138,31,.75), 0 18px 70px #000; }
.countdown-number.tick { animation: countdown-tick .7s cubic-bezier(.2,.8,.2,1); }
.burst-pumpkin { position: relative; z-index: 4; font-size: clamp(9rem, 23vw, 24rem); line-height: 1; filter: drop-shadow(0 0 42px rgba(255,138,31,.75)); }
.burst-pumpkin.explode { animation: pumpkin-burst .75s cubic-bezier(.12,.8,.2,1) forwards; }
.suspense-text { position: relative; z-index: 3; margin: .7rem 0 0; color: var(--orange-2); font-size: clamp(2.2rem, 4.4vw, 5rem); font-weight: 950; letter-spacing: -.035em; text-shadow: 0 8px 34px #000; }
.celebration-canvas { position: fixed; z-index: 3; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.tv-results.results-waiting { visibility: hidden; }
.tv-results.results-burst-in { animation: winner-burst-in 1.15s cubic-bezier(.12,.88,.18,1.15); }

@keyframes countdown-tick { 0% { opacity: 0; transform: scale(1.45); } 35% { opacity: 1; transform: scale(1); } 100% { opacity: .88; transform: scale(.86); } }
@keyframes pumpkin-burst { 0% { opacity: 0; transform: scale(.15) rotate(-18deg); } 45% { opacity: 1; transform: scale(1.18) rotate(7deg); } 72% { opacity: 1; transform: scale(.88) rotate(-3deg); } 100% { opacity: 0; transform: scale(2.4) rotate(12deg); filter: blur(10px) drop-shadow(0 0 100px #ff8a1f); } }
@keyframes spotlight-sway { to { transform: translateX(-50%) rotate(3deg); opacity: .72; } }
@keyframes winner-burst-in { 0% { opacity: 0; transform: scale(.58); filter: brightness(3) blur(10px); } 52% { opacity: 1; transform: scale(1.045); filter: brightness(1.4) blur(0); } 100% { transform: scale(1); filter: brightness(1); } }

@keyframes float { 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(184,255,82,0); } }
@keyframes fade-in { from { opacity: 0; transform: scale(1.015); } }
@keyframes reveal { from { opacity: 0; transform: scale(.96); } }
@keyframes drift { to { transform: translateX(22vw) rotate(12deg); } }
@keyframes reveal-ready-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,138,31,.45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255,138,31,0); } }

@media (max-width: 620px) {
  .host-hero { align-items: start; }
  .host-hero .button { min-height: 42px; padding-inline: .7rem; font-size: .8rem; }
  .status-grid { grid-template-columns: 1fr; }
  .round-reset { align-items: stretch; flex-direction: column; }
  .round-reset .button { width: 100%; }
  .contestant-row { grid-template-columns: 64px minmax(0,1fr); }
  .contestant-row img { width: 64px; height: 68px; }
  .row-actions { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .row-actions .icon-button { width: 100%; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .submit-dock { align-items: stretch; flex-direction: column; }
  .submit-dock .button { width: 100%; }
  .tv-page { overflow: auto; }
  .tv, .tv-results { min-height: 100dvh; height: auto; }
  .tv-results { position: relative; display: block; overflow-y: auto; padding: 2rem 1rem 3rem; }
  .tv-results h1 { font-size: clamp(3.4rem, 17vw, 5rem); }
  .tv-results header > p:last-child { font-size: 1.15rem; }
  .podium { max-height: none; margin-top: 2.2rem; flex-direction: column; align-items: center; gap: 1.4rem; }
  .podium-card, .podium-card.winner, .podium-card.winner:only-child { order: initial; width: min(92vw, 520px); max-height: none; transform: none; }
  .podium-card img { height: auto; aspect-ratio: 4 / 3; }
  .podium-copy { padding: 1.1rem 1rem 1.25rem; }
  .podium-card h2 { font-size: clamp(2rem, 10vw, 3.2rem); overflow-wrap: anywhere; }
  .podium-card p { font-size: 1.35rem; }
  .place-ribbon { top: 24px; right: -51px; width: 200px; font-size: .9rem; }
}

@media (orientation: landscape) and (max-height: 650px) {
  .tv-results { padding: 1.5vh 2vw 2vh; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .tv-results h1 { margin: 0; font-size: clamp(2rem, 9vh, 3.5rem); line-height: .92; }
  .podium { align-self: stretch; height: 100%; max-height: none; min-height: 0; gap: clamp(12px, 2.5vw, 32px); }
  .podium-card { width: min(25vw, 300px); height: min(52dvh, 280px); border-radius: 16px; }
  .podium-card.winner, .podium-card.winner:only-child { width: min(48vw, 520px); height: min(72dvh, 370px); border-width: 4px; }
  .podium-copy { padding: .45rem .7rem .55rem; }
  .podium-card h2 { margin-bottom: .05rem; font-size: clamp(1.2rem, 5.2vh, 2rem); line-height: .95; }
  .podium-card p { margin: 0; font-size: clamp(.85rem, 3.3vh, 1.2rem); }
  .place-ribbon { top: 13px; right: -45px; width: 170px; padding: .35rem .15rem; font-size: clamp(.62rem, 2.2vh, .82rem); }
}

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