:root {
  --bg: #080a11;
  --panel: #111521;
  --panel-2: #181d2c;
  --text: #f6f4ef;
  --muted: #9ca3b7;
  --line: rgba(255,255,255,.11);
  --orange: #ff7a1a;
  --orange-2: #ffae42;
  --purple: #7c5cff;
  --green: #47d18c;
  --red: #ff5f69;
  --shadow: 0 28px 80px rgba(0,0,0,.32);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; background: radial-gradient(circle at 80% -10%, rgba(124,92,255,.2), transparent 34rem), radial-gradient(circle at -15% 20%, rgba(255,122,26,.13), transparent 32rem), var(--bg); color: var(--text); min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, .button { min-height: 44px; }
button, .button, a { touch-action: manipulation; }
img { max-width: 100%; }
main { position: relative; min-height: calc(100vh - 150px); }

.site-header { max-width: 1500px; margin: 0 auto; min-height: 76px; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; font-weight: 800; letter-spacing: -.035em; }
.brand em { color: var(--orange); font-style: normal; }
.brand-mark { width: 33px; height: 33px; position: relative; display: inline-block; }
.brand-mark i, .brand-mark b { position: absolute; width: 15px; height: 15px; border-radius: 50%; }
.brand-mark i { background: var(--orange); left: 2px; top: 2px; box-shadow: 0 0 18px rgba(255,122,26,.6); }
.brand-mark b { background: var(--purple); right: 2px; bottom: 2px; box-shadow: 0 0 18px rgba(124,92,255,.6); }
.brand-mark::after { content: ""; position: absolute; width: 16px; height: 3px; background: white; transform: rotate(45deg); top: 15px; left: 9px; border-radius: 4px; }
.top-nav { display: flex; align-items: center; justify-content: flex-end; gap: 17px; color: var(--muted); font-size: .9rem; }
.top-nav a, .link-button { text-decoration: none; color: var(--muted); background: none; border: 0; padding: 7px 0; min-height: 0; cursor: pointer; }
.top-nav a:hover, .link-button:hover { color: white; }
.top-nav .nav-cta { color: white; padding: 10px 15px; border: 1px solid var(--line); background: rgba(255,255,255,.055); border-radius: 100px; }
.inline-form { display: inline; margin: 0; }
.user-chip { color: white; }

.flash-stack { position: fixed; z-index: 50; top: 88px; right: 22px; width: min(400px, calc(100vw - 44px)); display: grid; gap: 9px; }
.flash { padding: 14px 16px; border-radius: 12px; background: #202638; border: 1px solid var(--line); box-shadow: var(--shadow); }
.flash-success { border-color: rgba(71,209,140,.5); }
.flash-error { border-color: rgba(255,95,105,.55); }
.flash-info { border-color: rgba(124,92,255,.5); }

.site-footer { max-width: 1500px; margin: 34px auto 0; padding: 24px 28px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #697086; font-size: .8rem; }
.eyebrow { margin: 0 0 10px; color: var(--orange); font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: white; }
.muted { color: var(--muted) !important; font-style: italic; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.home-shell { max-width: 1320px; margin: 0 auto; padding: 96px 28px 70px; display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.home-shell > *, .contest-hero > *, .admin-row > *, .manage-entry > * { min-width: 0; }
.home-intro { position: sticky; top: 40px; }
.home-intro h1 { font-size: clamp(3.2rem, 6vw, 6.8rem); line-height: .88; letter-spacing: -.072em; margin: 0; max-width: 800px; }
.home-intro > p:last-child { max-width: 500px; color: var(--muted); font-size: 1.05rem; line-height: 1.7; margin-top: 30px; }
.contest-list { display: grid; gap: 14px; }
.access-card { position: relative; padding: clamp(28px,5vw,58px); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(124,92,255,.055)); box-shadow: var(--shadow); overflow: hidden; }
.access-card h2 { margin: 0; font-size: clamp(2rem,4vw,4rem); letter-spacing: -.055em; line-height: 1; }
.access-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; margin: 18px 0 25px; max-width: 520px; }
.access-lock { width: 82px; height: 82px; display: grid; place-items: center; margin-bottom: 35px; border: 1px solid rgba(255,122,26,.3); border-radius: 22px; color: var(--orange); background: radial-gradient(circle at 50% 35%, rgba(255,174,66,.14), rgba(255,122,26,.055) 65%); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 16px 40px rgba(255,122,26,.07); }
.access-lock svg { width: 43px; height: 43px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 9px rgba(255,122,26,.3)); }
.access-lock circle { fill: currentColor; stroke: none; }
.private-home main { display: grid; min-height: calc(100svh - 150px); }
.private-home .home-shell { width: min(100%, 760px); min-width: 0; margin: auto; padding: clamp(38px, 8vh, 86px) 22px; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 5vh, 42px); align-items: center; }
.private-home .home-intro { position: static; min-width: 0; text-align: center; }
.private-home .home-intro h1 { max-width: none; margin: 0; font-size: clamp(2.65rem, 8vw, 5.3rem); line-height: .93; letter-spacing: -.065em; text-wrap: balance; }
.private-home .home-intro > p:last-child { max-width: 610px; margin: 20px auto 0; font-size: 1rem; line-height: 1.6; text-wrap: pretty; }
.private-home .access-card { width: 100%; min-width: 0; margin: 0 auto; padding: clamp(24px, 6vw, 42px); text-align: center; }
.private-home .access-card h2 { font-size: clamp(1.8rem, 5vw, 3.25rem); text-wrap: balance; }
.private-home .access-card > p:not(.eyebrow) { max-width: 540px; margin: 14px auto 22px; }
.private-home .access-card .button { justify-self: center; }
.private-home .access-lock { width: 68px; height: 68px; margin: 0 auto 24px; border-radius: 18px; }
.private-home .access-lock svg { width: 37px; height: 37px; }
.contest-row { text-decoration: none; padding: 28px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018)); border-radius: 20px; display: flex; justify-content: space-between; align-items: center; gap: 30px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.contest-row:hover { transform: translateY(-3px); border-color: rgba(255,122,26,.48); background: linear-gradient(135deg, rgba(255,122,26,.10), rgba(124,92,255,.05)); }
.contest-row h2 { font-size: 1.6rem; margin: 12px 0 7px; letter-spacing: -.035em; }
.contest-row p { margin: 0; color: var(--muted); line-height: 1.55; }
.contest-row-side { text-align: center; min-width: 70px; color: var(--muted); }
.contest-row-side strong { display: block; color: white; font-size: 1.8rem; }
.contest-row-side span { font-size: .75rem; }
.contest-row-side b { display: block; margin-top: 10px; color: var(--orange); font-size: 1.5rem; }
.phase-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; }
.phase-voting { color: var(--green); border-color: rgba(71,209,140,.3); background: rgba(71,209,140,.07); }
.phase-upcoming { color: var(--orange-2); border-color: rgba(255,174,66,.3); }
.phase-winner { color: #d6ccff; border-color: rgba(124,92,255,.45); background: rgba(124,92,255,.12); }
.phase-results_pending { color: var(--orange-2); border-color: rgba(255,174,66,.38); background: rgba(255,174,66,.08); }

.contest-hero { max-width: 1440px; margin: 0 auto; padding: 70px 28px 52px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); gap: 60px; align-items: end; }
.contest-copy h1 { font-size: clamp(3.1rem, 7.4vw, 8.5rem); line-height: .87; letter-spacing: -.073em; margin: 0; max-width: 1100px; }
.contest-description { color: var(--muted); max-width: 760px; line-height: 1.75; font-size: 1.05rem; white-space: pre-line; }
.phase-card { padding: 25px; border: 1px solid var(--line); background: rgba(17,21,33,.84); backdrop-filter: blur(16px); border-radius: 20px; box-shadow: var(--shadow); }
.phase-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.phase-card-top strong { color: white; }
.countdown { margin: 17px 0 21px; font-variant-numeric: tabular-nums; font-size: clamp(1.75rem, 3vw, 2.8rem); line-height: 1; font-weight: 850; letter-spacing: -.04em; }
.progress-track { height: 9px; background: rgba(255,255,255,.08); border-radius: 100px; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--purple)); box-shadow: 0 0 18px rgba(255,122,26,.4); transition: width .5s ease; }
.contest-share { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.contest-share img { width: 86px; height: 86px; padding: 5px; border-radius: 10px; background: white; }
.contest-share div { display: grid; gap: 4px; }
.contest-share b { font-size: .9rem; }
.contest-share span { color: var(--muted); font-size: .75rem; }
.copy-link { width: max-content; min-height: 34px; margin-top: 5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: white; background: rgba(255,255,255,.055); cursor: pointer; }

#confetti-canvas { position: fixed; z-index: 80; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.reveal-curtain { max-width: 1384px; margin: 0 auto 20px; padding: 60px 28px; border: 1px solid rgba(255,174,66,.32); border-radius: 24px; background: radial-gradient(circle at 50% 0, rgba(255,122,26,.14), transparent 55%), rgba(17,21,33,.88); text-align: center; overflow: hidden; }
.reveal-curtain h2 { margin: 0; font-size: clamp(2rem, 5vw, 5rem); letter-spacing: -.06em; }
.reveal-curtain > p:last-child { max-width: 680px; margin: 16px auto 0; color: var(--muted); line-height: 1.65; }
.reveal-orbit { width: 90px; height: 90px; position: relative; margin: 0 auto 25px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; animation: orbit-spin 2.6s linear infinite; }
.reveal-orbit::after { content: ""; position: absolute; left: 44px; top: 44px; width: 64px; height: 2px; background: linear-gradient(90deg, white, transparent); transform: rotate(42deg); transform-origin: left center; }
.reveal-orbit i, .reveal-orbit b { position: absolute; width: 25px; height: 25px; border-radius: 50%; box-shadow: 0 0 25px currentColor; }
.reveal-orbit i { left: -8px; top: -4px; color: var(--orange); background: currentColor; }
.reveal-orbit b { right: -8px; bottom: -4px; color: var(--purple); background: currentColor; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.podium-celebration { position: relative; max-width: 1384px; margin: 0 auto 24px; padding: 52px clamp(20px,5vw,70px) 64px; border: 1px solid rgba(255,174,66,.45); border-radius: 26px; background: radial-gradient(circle at 50% 5%, rgba(255,174,66,.22), transparent 38%), radial-gradient(circle at 12% 80%, rgba(124,92,255,.16), transparent 34%), #10141f; text-align: center; overflow: hidden; box-shadow: 0 35px 100px rgba(255,122,26,.13); }
.podium-celebration::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: radial-gradient(circle, white 1px, transparent 1.5px); background-size: 27px 27px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
.podium-celebration > * { position: relative; }
.podium-celebration > h2 { margin: 0 0 42px; font-size: clamp(2.8rem, 7vw, 7.5rem); line-height: .9; letter-spacing: -.075em; }
.party-light { position: absolute; width: 300px; height: 600px; top: -260px; filter: blur(18px); opacity: .13; transform-origin: top; }
.party-light-one { left: 18%; background: var(--orange-2); transform: rotate(24deg); }
.party-light-two { right: 18%; background: var(--purple); transform: rotate(-24deg); }
.podium { display: flex; justify-content: center; align-items: end; gap: clamp(16px,4vw,55px); }
.podium-place { position: relative; flex: 0 1 460px; padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: rgba(8,10,17,.78); box-shadow: var(--shadow); text-align: left; }
.podium-place img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; border-radius: 15px; background: #05060a; }
.podium-place > div { padding: 18px 7px 5px; }
.podium-place span { color: var(--muted); font-weight: 800; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.podium-place h3 { margin: 5px 0; font-size: clamp(1.6rem,3vw,3rem); letter-spacing: -.05em; }
.podium-place p { margin: 0; color: var(--orange-2); font-weight: 850; }
.podium-place.first-place { flex-basis: 520px; transform: translateY(-25px); border-color: rgba(255,174,66,.58); background: linear-gradient(180deg, rgba(255,174,66,.09), rgba(8,10,17,.85)); }
.place-medal { position: absolute; z-index: 2; top: 30px; left: 30px; display: grid; place-items: center; width: 44px; height: 44px; color: #140a00 !important; background: linear-gradient(135deg, #fff1a6, var(--orange-2)); border-radius: 50%; font-size: 1.2rem !important; box-shadow: 0 10px 25px rgba(0,0,0,.3); }
.second-place .place-medal { color: #10131a !important; background: linear-gradient(135deg, white, #9ba6ba); }
.winner-crown { position: absolute; z-index: 3; top: -29px; right: 30px; display: grid; place-items: center; width: 64px; height: 64px; color: #2a1200 !important; background: var(--orange-2); clip-path: polygon(50% 0, 64% 31%, 100% 16%, 88% 68%, 100% 100%, 0 100%, 12% 68%, 0 16%, 36% 31%); font-size: 1.5rem !important; filter: drop-shadow(0 10px 15px rgba(0,0,0,.35)); }

.entries-shell { max-width: 1440px; margin: 0 auto; padding: 48px 28px 80px; }
.entries-heading { margin-bottom: 25px; display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.entries-heading h2 { font-size: clamp(2rem, 4vw, 4rem); margin: 0; letter-spacing: -.055em; }
.voted-notice { color: var(--green); font-weight: 800; }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.entry-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, rgba(25,30,45,.97), rgba(13,16,25,.97)); box-shadow: 0 20px 50px rgba(0,0,0,.18); transition: transform .2s ease, border-color .2s ease; }
.entry-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.21); }
.entry-card.is-winner { border-color: rgba(255,174,66,.6); box-shadow: 0 0 0 1px rgba(255,174,66,.12), 0 28px 80px rgba(255,122,26,.12); }
.entry-image-wrap { position: relative; aspect-ratio: 4/3; background: #05060a; overflow: hidden; }
.entry-image { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .35s ease; }
.entry-card:hover .entry-image { transform: scale(1.018); }
.vote-badge, .winner-ribbon { position: absolute; top: 14px; border-radius: 100px; backdrop-filter: blur(12px); }
.vote-badge { right: 14px; padding: 7px 11px; background: rgba(7,9,15,.78); border: 1px solid rgba(255,255,255,.17); font-size: .78rem; }
.vote-badge b { color: var(--orange-2); }
.winner-ribbon { left: 14px; padding: 7px 12px; background: linear-gradient(90deg, var(--orange), var(--orange-2)); color: #211100; font-weight: 900; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.entry-content { padding: 22px; }
.entry-content h3 { font-size: 1.55rem; margin: 0; letter-spacing: -.035em; }
.entry-content > p { margin: 9px 0 0; min-height: 48px; color: var(--muted); line-height: 1.5; }
.radar-wrap { margin: 10px -8px 5px; aspect-ratio: 6/5; }
.stat-radar { width: 100%; height: 100%; display: block; }
.vote-button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; border: 0; border-radius: 11px; padding: 11px 17px; background: linear-gradient(100deg, var(--orange), #ff9946); color: #1d0d00; text-decoration: none; font-weight: 900; cursor: pointer; box-shadow: 0 10px 26px rgba(255,122,26,.19); transition: transform .15s ease, filter .15s ease; }
.vote-button { width: 100%; font-size: 1rem; }
.vote-button:hover:not(:disabled), .button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.vote-button:disabled { color: #71788d; background: #262b39; box-shadow: none; cursor: not-allowed; }
.vote-button.selected { background: rgba(71,209,140,.15); border: 1px solid rgba(71,209,140,.32); color: var(--green); }
.button.secondary { background: #242a3b; color: white; box-shadow: none; border: 1px solid var(--line); }
.button.danger { background: rgba(255,95,105,.11); color: #ff9ca3; box-shadow: none; border: 1px solid rgba(255,95,105,.3); }
.button.small { min-height: 38px; padding: 8px 11px; font-size: .8rem; }

.auth-shell { width: min(560px, calc(100% - 40px)); margin: 80px auto; }
.panel { border: 1px solid var(--line); background: rgba(17,21,33,.91); border-radius: 20px; box-shadow: var(--shadow); }
.form-panel { padding: clamp(24px, 5vw, 42px); display: grid; gap: 20px; }
.form-panel h1 { margin: 0 0 6px; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.055em; }
.form-panel label, .bulk-form label { display: grid; gap: 8px; color: #d9dce6; font-weight: 700; font-size: .9rem; }
input, textarea, select { width: 100%; color: white; background: #0b0e17; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,122,26,.11); }
textarea { resize: vertical; }
small { color: var(--muted); font-size: .75rem; font-weight: 500; line-height: 1.45; }
fieldset { padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
legend { padding: 0 8px; color: var(--orange-2); font-weight: 800; font-size: .82rem; }
.two-column { grid-template-columns: 1fr 1fr; }
.three-column { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-2 { grid-column: span 2; }
.check-row { display: flex !important; grid-template-columns: auto 1fr; align-items: start; gap: 12px !important; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange); }
.check-row span { display: grid; gap: 3px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-input-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 13px; }
.reveal-delay { margin-top: 16px; }
.edit-preview { width: 100%; max-height: 420px; object-fit: contain; border-radius: 14px; background: #06070b; }

.admin-shell { max-width: 1320px; margin: 0 auto; padding: 58px 28px 80px; }
.admin-shell.narrow { max-width: 900px; }
.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 30px; }
.admin-heading h1 { font-size: clamp(2.6rem, 6vw, 5.7rem); letter-spacing: -.067em; line-height: .95; margin: 0; }
.admin-heading p:not(.eyebrow) { color: var(--muted); }
.admin-list { display: grid; gap: 13px; }
.admin-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 26px; padding: 22px; background: rgba(17,21,33,.82); border: 1px solid var(--line); border-radius: 17px; }
.admin-row h2 { margin: 9px 0 4px; }
.admin-row p { margin: 0; color: var(--muted); }
.admin-metrics { display: flex; gap: 25px; color: var(--muted); }
.admin-metrics span { text-align: center; }
.admin-metrics b { display: block; color: white; font-size: 1.35rem; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.quick-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 13px; margin: 30px 0; }
.quick-action { min-height: 120px; display: flex; flex-direction: column; justify-content: end; gap: 6px; padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); text-decoration: none; }
.quick-action.featured { background: linear-gradient(135deg, rgba(255,122,26,.15), rgba(124,92,255,.08)); border-color: rgba(255,122,26,.3); }
.quick-action strong { font-size: 1.1rem; }
.quick-action span { color: var(--muted); line-height: 1.4; font-size: .84rem; }
.private-link-panel { display: grid; grid-template-columns: 210px 1fr minmax(250px,.5fr); gap: 25px; align-items: center; padding: 24px; margin: 25px 0; border-color: rgba(124,92,255,.32); background: linear-gradient(135deg, rgba(124,92,255,.08), rgba(17,21,33,.92)); }
.private-link-panel > img { width: 210px; height: 210px; padding: 10px; border-radius: 16px; background: white; }
.private-link-main h2 { margin: 0; font-size: clamp(1.7rem,3vw,3rem); letter-spacing: -.045em; }
.private-link-main > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.private-link-value { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 15px 0 12px; }
.private-link-value input { color: #cfd4e4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; }
.rotate-link-form { display: grid; gap: 10px; padding: 18px; border: 1px solid rgba(255,95,105,.22); border-radius: 14px; background: rgba(255,95,105,.045); }
.rotate-link-form label { display: grid; gap: 7px; color: #ffd0d3; font-size: .82rem; font-weight: 750; }
.rotate-link-form code { color: #ffb2b7; }
.winner-controls { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px; padding: 23px; margin: 20px 0; }
.winner-controls h2 { margin: 0; }
.winner-controls p:last-child { color: var(--muted); margin-bottom: 0; }
.winner-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.manual-podium { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.manual-podium label, .force-vote-form label, .run-vote-panel label { display: grid; gap: 7px; color: #d9dce6; font-size: .82rem; font-weight: 750; }
.run-vote-panel { display: grid; grid-template-columns: 1fr minmax(300px,.55fr); gap: 35px; align-items: end; margin: 20px 0 28px; padding: 24px; border-color: rgba(255,95,105,.28); }
.run-vote-panel h2 { margin: 0; }
.run-vote-panel p:last-child { color: var(--muted); line-height: 1.55; }
.run-vote-panel form { display: grid; gap: 11px; }
.run-vote-panel code { color: #ffb2b7; }
.manage-entry-list { display: grid; gap: 10px; }
.manage-entry { display: grid; grid-template-columns: 92px 1fr minmax(210px, .45fr) auto; gap: 13px; align-items: center; padding: 11px; border: 1px solid var(--line); background: rgba(17,21,33,.75); border-radius: 14px; }
.manage-entry.selected-winner { border-color: rgba(255,174,66,.45); background: rgba(255,122,26,.07); }
.manage-entry img { width: 92px; height: 72px; object-fit: cover; border-radius: 9px; background: #05060a; }
.manage-entry h3 { margin: 0 0 5px; }
.manage-entry h3 i { display: inline-flex; margin-left: 8px; padding: 3px 7px; border-radius: 100px; color: #211000; background: var(--orange-2); font-size: .66rem; font-style: normal; vertical-align: middle; }
.manage-entry p { margin: 0; color: var(--muted); }
.manage-entry span { display: inline-block; color: #737b90; margin-top: 7px; font-size: .78rem; }
.force-vote-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.force-vote-form label { grid-column: 1 / -1; }
.force-vote-form input { padding: 8px 10px; }
.manage-entry-actions { display: flex; gap: 8px; align-items: center; }

.bulk-form { padding: 24px; }
.bulk-drop { min-height: 180px; place-items: center; align-content: center; text-align: center; padding: 30px; border: 2px dashed rgba(255,122,26,.4); border-radius: 17px; background: rgba(255,122,26,.045); cursor: pointer; }
.bulk-drop:hover, .bulk-drop.dragging { border-color: var(--orange); background: rgba(255,122,26,.09); }
.bulk-drop strong { font-size: 1.35rem; }
.bulk-drop span { color: var(--muted); font-weight: 500; }
.bulk-drop input { width: auto; max-width: 100%; background: transparent; border: 0; padding: 7px; }
.bulk-empty { color: var(--muted); text-align: center; padding: 38px; }
.bulk-list { display: grid; gap: 13px; margin-top: 18px; }
.bulk-item { display: grid; grid-template-columns: 130px minmax(190px,.8fr) minmax(220px,1.2fr); gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.bulk-item img { width: 130px; height: 130px; object-fit: cover; border-radius: 10px; background: #05060a; }
.bulk-fields { display: grid; gap: 10px; align-content: start; }
.bulk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 9px; align-content: start; }
.bulk-stats label { font-size: .78rem; }
.bulk-stats input { padding: 9px; }
.bulk-submit { position: sticky; bottom: 12px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; padding: 15px 16px; border: 1px solid var(--line); background: rgba(18,22,34,.94); backdrop-filter: blur(16px); border-radius: 14px; box-shadow: var(--shadow); }

.empty-state { padding: 50px 30px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.empty-state h2 { color: white; }
.empty-state.wide { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
table { width: 100%; border-collapse: collapse; background: rgba(17,21,33,.8); }
th, td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .83rem; }
th { color: var(--muted); }
td code { white-space: pre-wrap; color: #c9cde0; }


.home-content { display: grid; gap: 28px; }
.home-shell-centered { width: min(100%, 900px); grid-template-columns: 1fr; text-align: center; }
.home-shell-centered .home-intro { position: static; }
.home-shell-centered .home-intro > p:last-child { margin-left: auto; margin-right: auto; }
.home-shell-centered .access-card { max-width: 760px; width: 100%; margin: 0 auto; }
.home-shell-centered .access-lock { margin-left: auto; margin-right: auto; }
.public-contests { display: grid; gap: 16px; }
.section-heading h2 { margin: 0 0 4px; font-size: clamp(2rem,4vw,3.5rem); letter-spacing: -.05em; }
.privacy-note { display: grid; gap: 3px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(71,209,140,.2); background: rgba(71,209,140,.055); }
.privacy-note b { font-size: .82rem; color: #d8f8e8; }
.privacy-note span { color: var(--muted); font-size: .75rem; line-height: 1.45; }
.ballot-status { margin: 0; color: var(--muted); font-weight: 700; }
.ballot-status b { color: var(--orange-2); }
.my-vote-ribbon { position: absolute; top: 14px; right: 14px; padding: 7px 11px; border-radius: 100px; background: rgba(71,209,140,.88); color: #04150d; font-size: .75rem; font-weight: 900; box-shadow: 0 8px 24px rgba(0,0,0,.24); }
.entry-card.is-my-vote { border-color: rgba(71,209,140,.34); }
.visibility-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 100px; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.visibility-public { color: var(--green); border-color: rgba(71,209,140,.3); background: rgba(71,209,140,.06); }
.visibility-unlisted { color: #d6ccff; border-color: rgba(124,92,255,.35); background: rgba(124,92,255,.08); }
.visibility-options { display: grid; gap: 10px; }
.visibility-options .check-row { margin: 0; }
.admin-create-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: end; padding: 24px; margin-bottom: 22px; }
.admin-create-panel h2 { margin: 0; }
.admin-create-panel p:last-child { color: var(--muted); line-height: 1.5; }
.admin-create-panel form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.admin-account-list { display: grid; gap: 12px; }
.admin-account-row { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(300px,1.2fr) auto; gap: 18px; align-items: end; padding: 20px; }
.admin-account-row.is-disabled { opacity: .68; }
.admin-account-name h2 { margin: 8px 0 4px; }
.admin-account-name p { margin: 0; color: var(--muted); font-size: .82rem; }
.admin-password-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.admin-password-form label { display: grid; gap: 7px; color: #d9dce6; font-size: .82rem; font-weight: 750; }

@media (max-width: 1050px) {
  .home-shell { grid-template-columns: 1fr; padding-top: 68px; }
  .home-intro { position: static; }
  .contest-hero { grid-template-columns: 1fr; gap: 30px; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-action:first-child { grid-column: span 2; }
  .manage-entry { grid-template-columns: 80px 1fr auto; }
  .manage-entry img { width: 80px; height: 68px; }
  .manage-entry form, .manage-entry > .button { grid-column: auto; }
  .private-link-panel { grid-template-columns: 150px 1fr; }
  .private-link-panel > img { width: 150px; height: 150px; }
  .rotate-link-form { grid-column: 1 / -1; }
  .bulk-item { grid-template-columns: 110px 1fr; }
  .bulk-item img { width: 110px; height: 110px; }
  .bulk-stats { grid-column: 1 / -1; }
  .admin-create-panel { grid-template-columns: 1fr; }
  .admin-account-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { padding: 14px 18px; align-items: flex-start; }
  .brand > span:last-child { display: none; }
  .top-nav { gap: 10px; flex-wrap: wrap; }
  .top-nav .nav-cta { min-height: 42px; display: inline-flex; align-items: center; padding: 9px 13px; }
  .user-chip { display: none; }
  .home-shell, .contest-hero, .entries-shell, .admin-shell { padding-left: 18px; padding-right: 18px; }
  .home-intro h1, .contest-copy h1 { font-size: clamp(3.1rem, 15vw, 5.7rem); }
  .private-home .home-shell { padding: 34px 16px; gap: 24px; }
  .private-home .home-intro h1 { font-size: clamp(2.35rem, 12vw, 3.7rem); }
  .private-home .home-intro > p:last-child { margin-top: 14px; font-size: .96rem; }
  .private-home .access-card { padding: 24px 18px; border-radius: 19px; }
  .private-home .access-card .eyebrow { font-size: .66rem; letter-spacing: .12em; }
  .contest-row { padding: 20px; }
  .contest-hero { padding-top: 42px; padding-bottom: 30px; }
  .contest-description { font-size: 1rem; line-height: 1.6; }
  .phase-card { padding: 20px; }
  .contest-share { grid-template-columns: 74px 1fr; }
  .contest-share img { width: 74px; height: 74px; }
  .entry-grid { grid-template-columns: 1fr; }
  .entry-content { padding: 19px; }
  .vote-button { min-height: 50px; }
  .entries-heading, .admin-heading, .winner-controls { align-items: flex-start; flex-direction: column; }
  .winner-banner { margin-left: 18px; margin-right: 18px; }
  .reveal-curtain, .podium-celebration { margin-left: 18px; margin-right: 18px; }
  .podium { flex-direction: column-reverse; align-items: stretch; }
  .podium-place, .podium-place.first-place { flex-basis: auto; transform: none; }
  .two-column, .three-column { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .admin-row { grid-template-columns: 1fr; }
  .admin-metrics { justify-content: flex-start; }
  .quick-actions { grid-template-columns: 1fr; }
  .quick-action:first-child { grid-column: span 1; }
  .private-link-panel { grid-template-columns: 1fr; }
  .private-link-panel > img { width: min(240px,100%); height: auto; justify-self: center; }
  .private-link-value { grid-template-columns: 1fr; }
  .private-link-value input { overflow-wrap: anywhere; }
  .winner-controls, .manual-podium, .run-vote-panel { grid-template-columns: 1fr; }
  .manual-podium { grid-column: auto; }
  .manage-entry { grid-template-columns: 72px 1fr; }
  .force-vote-form, .manage-entry-actions { grid-column: 1 / -1; }
  .bulk-item { grid-template-columns: 1fr; }
  .bulk-item img { width: 100%; height: 180px; }
  .bulk-stats { grid-column: auto; grid-template-columns: repeat(2, 1fr); }
  .bulk-submit { bottom: 6px; }
  .admin-create-panel form, .admin-password-form { grid-template-columns: 1fr; }
  .phase-card-top { align-items: flex-start; gap: 10px; }
  .phase-card-top strong { text-align: right; }
}

@media (max-height: 650px) {
  .private-home .home-shell { padding-top: 24px; padding-bottom: 24px; gap: 20px; }
  .private-home .home-intro h1 { font-size: clamp(2.2rem, 8vh, 3.8rem); }
  .private-home .home-intro > p:last-child { margin-top: 10px; line-height: 1.45; }
  .private-home .access-card { padding-top: 20px; padding-bottom: 20px; }
  .private-home .access-lock { width: 56px; height: 56px; margin-bottom: 16px; }
  .private-home .access-lock svg { width: 31px; height: 31px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .reveal-orbit { animation: none; }
}


/* v1.8 runtime diagnostics */
.table-wrap { overflow-x: auto; }
.diag-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 62px; padding: 5px 8px; border-radius: 999px; font-size: .68rem; font-weight: 900; letter-spacing: .07em; }
.diag-ok { color: #bdf3d7; background: rgba(71,209,140,.13); border: 1px solid rgba(71,209,140,.28); }
.diag-warn { color: #ffe2a9; background: rgba(255,174,66,.12); border: 1px solid rgba(255,174,66,.3); }
.diag-error { color: #ffc4c8; background: rgba(255,95,105,.12); border: 1px solid rgba(255,95,105,.3); }
.diagnostics-note code { display: block; overflow-wrap: anywhere; white-space: normal; margin: 10px 0; }
.admin-account-row.is-disabled { opacity: .72; }

@media (max-width: 480px) {
  main { overflow-x: hidden; }
  .site-header { padding: 13px 14px; gap: 10px; }
  .brand { font-size: .86rem; min-width: 0; }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-nav { gap: 8px; font-size: .76rem; }
  .top-nav .user-chip { display: none; }
  .home-shell, .contest-hero-inner, .entries-shell, .admin-shell { padding-left: 12px; padding-right: 12px; }
  .home-intro h1, .contest-copy h1 { font-size: clamp(2.65rem, 16vw, 4.2rem); }
  .phase-card, .panel, .entry-card, .contest-row, .quick-action { border-radius: 16px; }
  .contest-share { grid-template-columns: 1fr; }
  .contest-share img { width: 92px; height: 92px; justify-self: center; }
  .contest-share-copy { min-width: 0; }
  .contest-share-copy code, .private-link-panel code { overflow-wrap: anywhere; white-space: normal; }
  .entry-image { aspect-ratio: 4 / 3; }
  .stat-radar { min-height: 245px; }
  .row-actions { width: 100%; align-items: stretch; }
  .row-actions form, .row-actions .button, .row-actions button { width: 100%; }
  .admin-metrics { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .admin-metrics span { min-width: 0; }
  .admin-password-form label { min-width: 0; }
  input, textarea, select, button { font-size: 16px; }
  table { min-width: 620px; }
}
