/* ==========================================================================
   ATACON COSPLAY AWARDS — 10/10 ARCTIC AURORA CRYSTAL GLASS DESIGN SYSTEM
   Inspired directly by official AtaCon artwork & Erzurum Palandöken Snow Mascot:
   - Deep Arctic Midnight Navy Canvas (#0B162A / #0E2038 from official AtaCon logo)
   - Brand Palette: #A897BC (Aurora Lavender) • #DECBE0 (Lilac Frost)
                    #E1ECEE (Ice Crystal Mist) • #82C2C0 (Northern Aurora Teal)
   - Phone-First Proportions (360px–430px), Safe-Area Insets, Bottom-Sheet Modals,
     Tactile Confirmation Checkbox, GPU-Accelerated Aurora & Gentle Snow Sparkles.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Exact Brand Palette + Official AtaCon Arctic Navy */
  --arctic-deep: #091325;
  --arctic-navy: #0E2038;
  --arctic-surface: #132544;

  --palette-lavender: #A897BC;
  --palette-lilac: #DECBE0;
  --palette-ice: #E1ECEE;
  --palette-teal: #82C2C0;

  /* Rich Luminous Companion Accents */
  --aurora-cyan: #9AD9D7;
  --aurora-violet: #8D74AD;
  --gold-crown: #F7CE68;
  --gold-soft: rgba(247, 206, 104, 0.22);
  --amber-warm: #F5B056;
  --coral-urgent: #FF5D8F;

  /* High-Contrast Typography on Deep Arctic Frosted Glass */
  --text-primary: #E1ECEE;
  --text-bright: #F4F9FA;
  --text-secondary: #DECBE0;
  --text-muted: #A897BC;

  /* Frosted Crystal Glass Surfaces */
  --glass-bg: rgba(16, 30, 56, 0.62);
  --glass-bg-strong: rgba(13, 25, 47, 0.84);
  --glass-bg-light: rgba(225, 236, 238, 0.08);
  --glass-border: rgba(225, 236, 238, 0.19);
  --glass-border-glow: rgba(130, 194, 192, 0.55);
  --glass-highlight: inset 0 1px 0 rgba(225, 236, 238, 0.26);
  --shadow-crystal: 0 16px 42px rgba(4, 9, 20, 0.56);
  --shadow-aurora: 0 14px 36px rgba(130, 194, 192, 0.22);

  /* Typography & Radii */
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --target-size: 40px;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--arctic-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.48;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(4.75rem + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--arctic-deep);
  color: var(--text-primary);
  overflow-wrap: break-word;
  position: relative;
  -webkit-tap-highlight-color: rgba(130, 194, 192, 0.24);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

img {
  display: block;
  max-inline-size: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:where(button, select, textarea, input:not([type="checkbox"], [type="radio"]), [role="button"]) {
  min-block-size: var(--target-size);
}

:where(a, code) {
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2.5px solid var(--palette-teal);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* ==========================================================================
   NORTHERN AURORA SKY & GENTLE SNOW CRYSTAL BACKDROP
   ========================================================================== */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(125% 65% at 50% -12%, rgba(130, 194, 192, 0.28), transparent 62%),
    radial-gradient(95% 60% at 88% 18%, rgba(168, 151, 188, 0.26), transparent 58%),
    radial-gradient(90% 55% at 10% 82%, rgba(222, 203, 224, 0.16), transparent 62%),
    linear-gradient(170deg, #091325 0%, #0E2038 48%, #131B36 100%);
}

/* Subtle aurora ribbon across the top sky */
.ambient-backdrop::before {
  content: '';
  position: absolute;
  top: -12%;
  left: -15%;
  width: 130%;
  height: 46%;
  background: linear-gradient(
    115deg,
    transparent 12%,
    rgba(130, 194, 192, 0.24) 32%,
    rgba(168, 151, 188, 0.28) 54%,
    rgba(222, 203, 224, 0.18) 72%,
    transparent 90%
  );
  filter: blur(52px);
  transform: rotate(-6deg);
  animation: auroraWave 18s ease-in-out infinite alternate;
}

/* Gentle starlight & ice crystal shimmer overlay */
.ambient-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 18%, rgba(225, 236, 238, 0.65), transparent),
    radial-gradient(2px 2px at 82% 12%, rgba(130, 194, 192, 0.72), transparent),
    radial-gradient(1.5px 1.5px at 36% 42%, rgba(222, 203, 224, 0.55), transparent),
    radial-gradient(2px 2px at 74% 58%, rgba(225, 236, 238, 0.52), transparent),
    radial-gradient(1.5px 1.5px at 22% 78%, rgba(130, 194, 192, 0.55), transparent),
    radial-gradient(2px 2px at 90% 82%, rgba(222, 203, 224, 0.5), transparent);
  opacity: 0.75;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(82px);
  opacity: 0.42;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.ambient-orb--purple {
  width: min(74vw, 460px);
  height: min(74vw, 460px);
  top: -10%;
  left: -14%;
  background: radial-gradient(circle, rgba(168, 151, 188, 0.85) 0%, rgba(168, 151, 188, 0) 70%);
  animation: orbDriftA 22s ease-in-out infinite alternate;
}

.ambient-orb--cyan {
  width: min(72vw, 440px);
  height: min(72vw, 440px);
  top: 24%;
  right: -18%;
  background: radial-gradient(circle, rgba(130, 194, 192, 0.85) 0%, rgba(130, 194, 192, 0) 70%);
  animation: orbDriftB 26s ease-in-out infinite alternate;
}

.ambient-orb--magenta {
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  bottom: -14%;
  left: 14%;
  background: radial-gradient(circle, rgba(222, 203, 224, 0.65) 0%, rgba(168, 151, 188, 0.25) 48%, rgba(222, 203, 224, 0) 72%);
  animation: orbDriftC 24s ease-in-out infinite alternate;
}

@keyframes auroraWave {
  0% { transform: translate3d(-4%, 0, 0) rotate(-6deg) scaleY(1); }
  100% { transform: translate3d(4%, 3%, 0) rotate(-3deg) scaleY(1.12); }
}

@keyframes orbDriftA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(9vw, 6vh, 0) scale(1.1); }
}

@keyframes orbDriftB {
  0% { transform: translate3d(0, 0, 0) scale(1.04); }
  100% { transform: translate3d(-8vw, 7vh, 0) scale(0.94); }
}

@keyframes orbDriftC {
  0% { transform: translate3d(0, 0, 0) scale(0.96); }
  100% { transform: translate3d(7vw, -6vh, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orb,
  .ambient-backdrop::before {
    animation: none !important;
  }
}

/* ==========================================================================
   FROSTED CRYSTAL GLASS & PHONE-FIRST SHELL
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight), var(--shadow-crystal);
}

.container {
  width: min(472px, 100%);
  margin-inline: auto;
  padding-inline: max(0.88rem, env(safe-area-inset-left, 0px)) max(0.88rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 720px) {
  .container {
    width: min(760px, 100% - 2rem);
    padding-inline: 0;
  }
}

@media (min-width: 1024px) {
  .container {
    width: min(1060px, 100% - 2.5rem);
  }
}

.page-main {
  padding-block: 0.85rem max(2.8rem, env(safe-area-inset-bottom, 0px));
}

@media (min-width: 720px) {
  .page-main {
    padding-block: 1.4rem 3.5rem;
  }
}

/* ==========================================================================
   STICKY TOP BAR WITH OFFICIAL ATACON LOGO
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(14, 32, 56, 0.84);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(225, 236, 238, 0.16);
  box-shadow: 0 8px 28px rgba(4, 10, 22, 0.48);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding-block: 0.55rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  min-inline-size: 0;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.42rem;
  border-radius: 12px;
  background: #0E2038;
  border: 1px solid rgba(225, 236, 238, 0.18);
  box-shadow: 0 4px 16px rgba(130, 194, 192, 0.16);
  flex-shrink: 0;
}

.brand-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 640px) {
  .brand-logo-img {
    height: 36px;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
  min-inline-size: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 3.3vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-bright);
}

.brand-sub {
  font-size: 0.64rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--palette-teal);
}

.topbar-telemetry {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  flex-shrink: 0;
}

@media (max-width: 479px) {
  .topbar-inner--voter {
    flex-wrap: nowrap;
  }

  .topbar-telemetry--voter {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.24rem;
  }

  .topbar-inner--admin {
    flex-wrap: wrap;
  }

  .topbar-telemetry--admin {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(225, 236, 238, 0.12);
  }
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.22rem 0.62rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(168, 151, 188, 0.42);
  background: rgba(168, 151, 188, 0.18);
  color: var(--palette-lilac);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .status-pill {
    padding: 0.34rem 0.78rem;
    font-size: 0.72rem;
  }
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--palette-lavender);
  flex-shrink: 0;
}

.status-pill[data-status="ACTIVE"] {
  border-color: rgba(130, 194, 192, 0.65);
  background: rgba(130, 194, 192, 0.2);
  color: var(--palette-ice);
  box-shadow: 0 0 16px rgba(130, 194, 192, 0.3);
}

.status-pill[data-status="ACTIVE"] .status-dot {
  background: var(--palette-teal);
  box-shadow: 0 0 10px var(--palette-teal);
  animation: pulseDot 1.3s ease-in-out infinite;
}

.status-pill[data-status="PAUSED"] {
  border-color: rgba(245, 176, 86, 0.55);
  background: rgba(245, 176, 86, 0.16);
  color: #FFE3BA;
}

.status-pill[data-status="PAUSED"] .status-dot {
  background: var(--amber-warm);
}

.status-pill[data-status="ENDED"] {
  border-color: rgba(222, 203, 224, 0.55);
  background: rgba(168, 151, 188, 0.24);
  color: var(--palette-ice);
}

.status-pill[data-status="ENDED"] .status-dot {
  background: var(--palette-lilac);
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

/* Aurora Countdown Timer Pill */
.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.78rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: clamp(0.94rem, 3.7vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  color: #0B162A;
  background: linear-gradient(135deg, var(--palette-ice) 0%, var(--palette-teal) 58%, var(--palette-lilac) 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(130, 194, 192, 0.38);
  transition: background 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.timer-pill.is-idle {
  background: rgba(225, 236, 238, 0.1);
  border-color: rgba(225, 236, 238, 0.22);
  box-shadow: none;
  color: var(--palette-lilac);
}

.timer-pill.is-urgent {
  background: linear-gradient(135deg, #FF9E44 0%, #FF4D7D 100%);
  border-color: rgba(255, 228, 235, 0.85);
  color: #ffffff;
  box-shadow: 0 0 26px rgba(255, 77, 125, 0.65);
  animation: urgentPulse 0.85s ease-in-out infinite alternate;
}

@keyframes urgentPulse {
  from { box-shadow: 0 0 14px rgba(255, 158, 68, 0.45); transform: scale(1); }
  to { box-shadow: 0 0 28px rgba(255, 77, 125, 0.82); transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .timer-pill.is-urgent,
  .status-pill[data-status="ACTIVE"] .status-dot {
    animation: none !important;
  }
}

/* ==========================================================================
   EKRAN 1: LOGIN GATE WITH ADORABLE ATACON SNOW MASCOT HERO
   ========================================================================== */
.voter-auth-shell {
  min-height: calc(100dvh - 104px);
  display: grid;
  place-items: center;
  padding-block: 0.4rem 1.5rem;
}

.voter-auth-shell[hidden] {
  display: none;
}

.voter-auth-card {
  width: min(432px, 100%);
  overflow: hidden;
  padding: 0;
}

.mascot-hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.2;
  overflow: hidden;
  background: #0E2038;
}

.mascot-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.mascot-hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 19, 37, 0.12) 0%,
    rgba(14, 28, 52, 0.35) 58%,
    rgba(16, 30, 56, 0.98) 100%
  );
  pointer-events: none;
}

.mascot-hero-chip {
  position: absolute;
  left: 0.9rem;
  bottom: 0.7rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(11, 22, 42, 0.74);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(130, 194, 192, 0.65);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--palette-ice);
}

.voter-auth-body {
  padding: 1.05rem 1.25rem 1.45rem;
}

.voter-auth-body h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 5.8vw, 1.8rem);
  line-height: 1.15;
  color: var(--text-bright);
}

.voter-auth-desc {
  margin: 0 0 1.15rem;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   HERO, IDENTITY STRIP WITH WINKING MASCOT & BANNERS
   ========================================================================== */
.hero {
  text-align: center;
  max-width: 600px;
  margin: 0.15rem auto 1rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.78rem;
  margin-bottom: 0.42rem;
  border-radius: var(--radius-pill);
  background: rgba(130, 194, 192, 0.16);
  border: 1px solid rgba(130, 194, 192, 0.48);
  font-family: var(--font-display);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--palette-teal);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.38rem, 6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}

.hero-gradient {
  background: linear-gradient(95deg, #E1ECEE 0%, #82C2C0 48%, #DECBE0 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0.4rem auto 0;
  color: var(--text-secondary);
  font-size: clamp(0.85rem, 3.3vw, 0.96rem);
}

.voter-identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-md);
}

.voter-identity-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-inline-size: 0;
}

.mascot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--palette-teal);
  box-shadow: 0 0 16px rgba(130, 194, 192, 0.42);
  background: var(--palette-ice);
  flex-shrink: 0;
}

.voter-identity-text {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
  min-inline-size: 0;
}

.voter-identity-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.voter-identity-text strong {
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--text-bright);
}

.voter-identity-text span {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.52rem;
  border-radius: var(--radius-pill);
  background: rgba(130, 194, 192, 0.22);
  border: 1px solid rgba(130, 194, 192, 0.62);
  color: var(--palette-ice);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.live-badge--ended {
  background: rgba(168, 151, 188, 0.26);
  border-color: rgba(222, 203, 224, 0.55);
  color: var(--palette-lilac);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--palette-teal);
  box-shadow: 0 0 8px var(--palette-teal);
  animation: pulseDot 1.2s ease-in-out infinite;
}

.live-badge--ended .live-dot {
  background: var(--palette-lilac);
  box-shadow: none;
  animation: none;
}

.voted-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(130, 194, 192, 0.22), rgba(168, 151, 188, 0.24));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(130, 194, 192, 0.58);
  box-shadow: var(--glass-highlight), 0 8px 24px rgba(130, 194, 192, 0.18);
}

.admins-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(225, 236, 238, 0.07);
  border: 1px solid rgba(225, 236, 238, 0.18);
}

.admin-chip--super {
  border-color: rgba(130, 194, 192, 0.65);
  background: rgba(130, 194, 192, 0.16);
}

.admin-chip-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.admin-chip-info strong {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--text-bright);
}

.admin-chip-info span {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.voted-banner[hidden] {
  display: none;
}

.voted-banner-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.voted-check-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--palette-teal), var(--palette-lavender));
  color: #091325;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(130, 194, 192, 0.45);
}

.voted-banner-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-bright);
}

.voted-banner-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* ==========================================================================
   PHONE-PROPORTIONED CONTESTANT CARDS (LIVE RANKED HIGH -> LOW)
   ========================================================================== */
.contestant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.05rem;
}

@media (min-width: 720px) {
  .contestant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .contestant-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
  }
}

.contestant-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--shadow-crystal);
  transition: transform 0.28s var(--ease-smooth), border-color 0.28s var(--ease-smooth), box-shadow 0.28s var(--ease-smooth);
}

@media (hover: hover) {
  .contestant-card:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border-glow);
    box-shadow:
      var(--glass-highlight),
      0 20px 48px rgba(4, 10, 22, 0.65),
      0 0 28px rgba(130, 194, 192, 0.26);
  }
}

.contestant-media {
  position: relative;
  aspect-ratio: 4 / 3.8;
  max-height: 350px;
  overflow: hidden;
  background: #0D1B31;
}

@media (min-width: 720px) {
  .contestant-media {
    aspect-ratio: 4 / 4.4;
    max-height: none;
  }
}

.contestant-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.45s var(--ease-smooth);
}

@media (hover: hover) {
  .contestant-card:hover .contestant-media img {
    transform: scale(1.03);
  }
}

.contestant-media::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 22, 42, 0.92) 100%);
  pointer-events: none;
}

.contestant-rank-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.72rem;
  border-radius: var(--radius-pill);
  background: rgba(11, 22, 42, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(225, 236, 238, 0.34);
  color: var(--palette-ice);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.contestant-rank-badge--1 {
  background: rgba(247, 206, 104, 0.22);
  border-color: rgba(247, 206, 104, 0.82);
  color: #FFF0BE;
  box-shadow: 0 0 18px rgba(247, 206, 104, 0.32);
}

.contestant-rank-badge--2 {
  background: rgba(130, 194, 192, 0.26);
  border-color: rgba(130, 194, 192, 0.85);
  color: #E1ECEE;
}

.contestant-rank-badge--3 {
  background: rgba(168, 151, 188, 0.28);
  border-color: rgba(222, 203, 224, 0.78);
  color: #DECBE0;
}

.contestant-votes-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.72rem;
  border-radius: var(--radius-pill);
  background: rgba(11, 22, 42, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(130, 194, 192, 0.55);
  color: var(--palette-ice);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.contestant-series-chip {
  position: absolute;
  left: 0.75rem;
  bottom: 0.68rem;
  z-index: 2;
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.24rem 0.68rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--palette-ice);
  background: rgba(14, 32, 56, 0.82);
  border: 1px solid rgba(130, 194, 192, 0.45);
  backdrop-filter: blur(10px);
}

.contestant-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.95rem 1rem 1.08rem;
  gap: 0.18rem;
}

.contestant-character {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-bright);
}

.contestant-cosplayer {
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.card-live-meter {
  margin-bottom: 0.8rem;
}

.card-live-meter-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.3rem;
}

.card-live-votes {
  color: var(--palette-ice);
}

.card-live-pct {
  color: var(--palette-teal);
}

.contestant-actions {
  margin-top: auto;
}

/* ==========================================================================
   JEWELED AURORA BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.68rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth), background 0.22s var(--ease-smooth), opacity 0.2s ease, filter 0.2s ease;
}

@media (pointer: coarse) {
  .btn {
    min-height: 50px;
  }
}

.btn:active:not(:disabled) {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  filter: saturate(0.5);
}

.btn--full {
  width: 100%;
}

.btn--primary {
  color: #091427;
  background: linear-gradient(135deg, var(--palette-teal) 0%, #B3D9DA 38%, var(--palette-lilac) 100%);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 8px 24px rgba(130, 194, 192, 0.3);
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 30px rgba(130, 194, 192, 0.46);
}

.btn--ghost {
  color: var(--palette-ice);
  background: rgba(225, 236, 238, 0.08);
  border-color: rgba(225, 236, 238, 0.22);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(225, 236, 238, 0.16);
  border-color: rgba(130, 194, 192, 0.55);
}

.btn--amber {
  color: #FFF0D4;
  background: rgba(245, 176, 86, 0.22);
  border-color: rgba(245, 176, 86, 0.58);
}

.btn--danger {
  color: #FFE4EC;
  background: rgba(255, 93, 143, 0.24);
  border-color: rgba(255, 93, 143, 0.62);
}

.btn--danger:hover:not(:disabled) {
  background: rgba(255, 93, 143, 0.34);
}

.btn--sm {
  min-height: 40px;
  padding: 0.42rem 0.78rem;
  font-size: 0.82rem;
}

@media (pointer: coarse) {
  .btn--sm {
    min-height: 44px;
  }
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(9, 20, 39, 0.28);
  border-top-color: #091427;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   NATIVE <dialog> MODALS — BOTTOM-SHEET ON PHONES + CONFIRM CHECKBOX
   ========================================================================== */
dialog {
  width: min(444px, calc(100vw - 1.5rem));
  max-height: min(90dvh, 740px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--text-primary);
  background: rgba(13, 25, 48, 0.92);
  backdrop-filter: blur(28px) saturate(185%);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  border: 1px solid rgba(225, 236, 238, 0.26);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(225, 236, 238, 0.32),
    0 24px 70px rgba(3, 8, 18, 0.78),
    0 0 38px rgba(130, 194, 192, 0.22);

  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.26s;
  transition-timing-function: var(--ease-smooth);
  transition-behavior: allow-discrete;
}

@media (max-width: 639px) {
  dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0 0;
    border-radius: 26px 26px 0 0;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  dialog::before {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 99px;
    margin: 0.65rem auto 0;
    background: rgba(225, 236, 238, 0.34);
  }
}

@media (prefers-reduced-motion: no-preference) {
  dialog {
    transform: translateY(22px) scale(0.98);
  }
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(4, 9, 20, 0);
  backdrop-filter: blur(0px);
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: 0.26s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

dialog[open]:where(:not([data-closing])) {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  dialog[open]:where(:not([data-closing])) {
    transform: translateY(0) scale(1);
  }
}

dialog[open]:where(:not([data-closing]))::backdrop {
  background-color: rgba(4, 9, 20, 0.72);
  backdrop-filter: blur(8px);
}

@starting-style {
  dialog[open]:where(:not([data-closing])) {
    opacity: 0;
  }

  dialog[open]:where(:not([data-closing]))::backdrop {
    background-color: rgba(4, 9, 20, 0);
    backdrop-filter: blur(0px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @starting-style {
    dialog[open]:where(:not([data-closing])) {
      transform: translateY(22px) scale(0.98);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog,
  dialog::backdrop {
    transition-duration: 0.1s;
  }
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.2rem 0.8rem;
  border-bottom: 1px solid rgba(225, 236, 238, 0.14);
}

.dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
}

.dialog-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(225, 236, 238, 0.09);
  border: 1px solid rgba(225, 236, 238, 0.2);
  color: var(--palette-lilac);
  cursor: pointer;
  flex-shrink: 0;
}

.dialog-close:hover {
  background: rgba(225, 236, 238, 0.18);
  color: #ffffff;
}

.dialog-body {
  padding: 1.05rem 1.2rem 1.35rem;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 0.65rem;
  margin-top: 1.05rem;
}

@media (min-width: 640px) {
  .dialog-actions {
    display: flex;
    justify-content: flex-end;
  }
}

.modal-contestant-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.72rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(130, 194, 192, 0.16), rgba(168, 151, 188, 0.18));
  border: 1px solid rgba(225, 236, 238, 0.24);
}

.modal-contestant-preview img {
  width: 56px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.modal-preview-character {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--text-bright);
}

.modal-preview-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.mascot-modal-tip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(168, 151, 188, 0.14);
  border: 1px solid rgba(222, 203, 224, 0.24);
  font-size: 0.8rem;
  color: var(--palette-lilac);
}

.mascot-modal-tip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--palette-teal);
  flex-shrink: 0;
}

/* Tactile Accidental-Vote-Prevention Checkbox Card */
.confirm-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-block-size: 54px;
  padding: 0.82rem 0.9rem;
  margin-bottom: 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(225, 236, 238, 0.06);
  border: 1.5px solid rgba(225, 236, 238, 0.26);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.confirm-checkbox-card:has(input:checked) {
  border-color: var(--palette-teal);
  background: rgba(130, 194, 192, 0.16);
  box-shadow: 0 0 20px rgba(130, 194, 192, 0.22);
}

.confirm-checkbox-card input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-block-size: 22px;
  margin: 0.1rem 0 0;
  accent-color: var(--palette-teal);
  cursor: pointer;
  flex-shrink: 0;
}

.confirm-checkbox-text {
  font-size: 0.85rem;
  line-height: 1.38;
  color: var(--palette-ice);
}

.confirm-checkbox-text strong {
  color: var(--palette-teal);
}

/* ==========================================================================
   FORMS & INPUTS (No iOS Zoom, Crisp Arctic Glass)
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-block-end: 0.95rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--palette-ice);
}

.field-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 0.68rem 0.9rem;
  font-size: max(1rem, 1em);
  color: var(--text-bright);
  background: rgba(8, 17, 34, 0.72);
  border: 1.5px solid rgba(225, 236, 238, 0.22);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

@media (pointer: coarse) {
  .input,
  .select {
    min-height: 50px;
  }
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(168, 151, 188, 0.72);
}

.input:focus,
.textarea:focus,
.select:focus {
  background: rgba(10, 21, 42, 0.92);
  border-color: var(--palette-teal);
  box-shadow: 0 0 0 3px rgba(130, 194, 192, 0.24);
  outline: none;
}

.input:user-invalid,
.input[aria-invalid="true"] {
  border-color: var(--coral-urgent);
  box-shadow: 0 0 0 3px rgba(255, 93, 143, 0.22);
}

.input--pin {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.textarea {
  min-height: 112px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.form-alert {
  padding: 0.72rem 0.9rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid rgba(255, 93, 143, 0.58);
  background: rgba(255, 93, 143, 0.16);
  color: #FFD6E3;
}

.form-alert[hidden] {
  display: none;
}

.form-alert--success {
  border-color: rgba(130, 194, 192, 0.62);
  background: rgba(130, 194, 192, 0.18);
  color: var(--palette-ice);
}

/* ==========================================================================
   EKRAN 3: LIVE LEADERBOARD & FINAL PODIUM WITH AURORA MASCOT BANNER
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

.results-section[hidden],
.voting-section[hidden] {
  display: none;
}

.live-aurora-card {
  overflow: hidden;
  margin-bottom: 1.15rem;
  padding: 0;
}

.live-aurora-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7.6;
  max-height: 230px;
  overflow: hidden;
  background: #0D1C34;
}

.live-aurora-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
}

.live-aurora-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 19, 37, 0.08) 0%, rgba(16, 30, 56, 0.96) 100%);
}

.results-header {
  text-align: center;
  padding: 0.2rem 1rem 1.1rem;
  margin: 0;
}

.results-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 6vw, 2.2rem);
}

.results-header p {
  margin: 0.35rem auto 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.results-total-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.7rem;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  background: rgba(130, 194, 192, 0.16);
  border: 1px solid rgba(130, 194, 192, 0.55);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--palette-ice);
}

/* Mobile Podium: 1st Place full width on top, 2nd & 3rd side-by-side beneath */
.podium-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.78rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.podium-card--rank-1 {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .podium-grid {
    grid-template-columns: 1fr 1.16fr 1fr;
    gap: 1.2rem;
    align-items: end;
  }

  .podium-card--rank-1 {
    grid-column: auto;
    order: 2;
    transform: translateY(-12px);
  }

  .podium-card--rank-2 {
    order: 1;
  }

  .podium-card--rank-3 {
    order: 3;
  }
}

.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.95rem;
  border-radius: 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--shadow-crystal);
  text-align: center;
}

.podium-card--rank-1 {
  border-color: rgba(247, 206, 104, 0.75);
  background: linear-gradient(180deg, rgba(247, 206, 104, 0.18) 0%, rgba(16, 30, 56, 0.76) 52%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 202, 0.42),
    0 18px 46px rgba(4, 10, 22, 0.65),
    0 0 36px rgba(247, 206, 104, 0.2);
}

.podium-card--rank-2 {
  border-color: rgba(130, 194, 192, 0.68);
  background: linear-gradient(180deg, rgba(130, 194, 192, 0.2) 0%, rgba(16, 30, 56, 0.72) 55%);
}

.podium-card--rank-3 {
  border-color: rgba(168, 151, 188, 0.68);
  background: linear-gradient(180deg, rgba(168, 151, 188, 0.22) 0%, rgba(16, 30, 56, 0.72) 55%);
}

.podium-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  align-self: center;
  padding: 0.26rem 0.68rem;
  margin-bottom: 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.podium-card--rank-1 .podium-badge {
  background: rgba(247, 206, 104, 0.22);
  border: 1px solid rgba(247, 206, 104, 0.75);
  color: #FFF0BE;
}

.podium-card--rank-2 .podium-badge {
  background: rgba(130, 194, 192, 0.24);
  border: 1px solid rgba(130, 194, 192, 0.72);
  color: var(--palette-ice);
}

.podium-card--rank-3 .podium-badge {
  background: rgba(168, 151, 188, 0.24);
  border: 1px solid rgba(222, 203, 224, 0.68);
  color: var(--palette-lilac);
}

.podium-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 4;
  max-height: 205px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0.7rem;
  border: 1px solid rgba(225, 236, 238, 0.25);
}

.podium-card--rank-1 .podium-photo-wrap {
  aspect-ratio: 4 / 3.4;
  max-height: 245px;
}

.podium-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.podium-character {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-bright);
}

.podium-card--rank-1 .podium-character {
  font-size: 1.24rem;
}

.podium-cosplayer {
  margin: 0.16rem 0 0.1rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.podium-series {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.62rem;
}

.podium-score {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: auto;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.36rem;
}

.podium-votes {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-bright);
}

.podium-pct {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--palette-teal);
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(225, 236, 238, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--palette-teal), var(--palette-lavender), var(--palette-lilac));
  transition: width 0.65s var(--ease-smooth);
}

.podium-card--rank-1 .progress-fill {
  background: linear-gradient(90deg, #E8AE36, #FFF0B3);
}

/* Full Ranked List */
.rankings-panel {
  padding: 1.05rem;
}

.rankings-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.rankings-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.04rem;
  color: var(--text-bright);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-row {
  display: grid;
  grid-template-columns: 34px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.78rem;
  border-radius: var(--radius-md);
  background: rgba(225, 236, 238, 0.05);
  border: 1px solid rgba(225, 236, 238, 0.12);
}

.ranking-row.is-user-pick {
  border-color: var(--palette-teal);
  background: linear-gradient(135deg, rgba(130, 194, 192, 0.2), rgba(168, 151, 188, 0.16));
  box-shadow: 0 0 18px rgba(130, 194, 192, 0.18);
}

.user-pick-pill {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.4rem;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--palette-teal);
  color: #091325;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.ranking-num {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--palette-teal);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ranking-thumb {
  width: 46px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-info {
  min-inline-size: 0;
}

.ranking-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-bright);
}

.ranking-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.ranking-stat {
  text-align: right;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ranking-stat strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-bright);
}

.ranking-stat span {
  font-size: 0.75rem;
  color: var(--palette-teal);
  font-weight: 600;
}

/* ==========================================================================
   TOAST NOTIFICATIONS (Native popover="manual")
   ========================================================================== */
.toast-region {
  position: fixed;
  inset: auto max(0.75rem, env(safe-area-inset-right, 0px)) max(0.85rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  pointer-events: none;
}

@media (min-width: 640px) {
  .toast-region {
    inset: auto 1.25rem 1.25rem auto;
    align-items: flex-end;
  }
}

.toast[popover] {
  position: relative;
  inset: auto;
  margin: 0;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.78rem 0.95rem;
  width: min(360px, 100%);
  color: var(--palette-ice);
  background: rgba(13, 26, 48, 0.94);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(130, 194, 192, 0.55);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 36px rgba(4, 10, 22, 0.65);
  font-size: 0.87rem;
  font-weight: 600;
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: var(--ease-smooth);
  transition-behavior: allow-discrete;
}

.toast--error[popover] {
  border-color: rgba(255, 93, 143, 0.7);
  color: #FFD6E3;
}

.toast--success[popover] {
  border-color: rgba(130, 194, 192, 0.8);
  color: var(--palette-ice);
}

.toast[popover]:is(:popover-open, .\:popover-open):where(:not([data-closing])) {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .toast[popover] {
    transform: translateY(10px);
  }
  .toast[popover]:is(:popover-open, .\:popover-open):where(:not([data-closing])) {
    transform: translateY(0);
  }
  @starting-style {
    .toast[popover]:is(:popover-open, .\:popover-open):where(:not([data-closing])) {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

@supports not selector(:popover-open) {
  .toast[popover]:not(.\:popover-open) {
    display: none;
  }
}

.toast-close {
  background: rgba(225, 236, 238, 0.1);
  border: 1px solid rgba(225, 236, 238, 0.22);
  border-radius: 8px;
  color: var(--palette-lilac);
  min-width: 34px;
  min-height: 34px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   ADMIN PANEL — ARCTIC AURORA CONTROL CENTER
   ========================================================================== */
.admin-auth-shell {
  min-height: calc(100dvh - 84px);
  display: grid;
  place-items: center;
  padding: 0.75rem 0;
}

.admin-auth-card {
  width: min(424px, 100%);
  padding: 1.6rem 1.3rem;
}

.admin-auth-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-bright);
}

.admin-auth-card p {
  margin: 0 0 1.2rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.admin-dashboard[hidden],
.admin-auth-shell[hidden] {
  display: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 860px) {
  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

.kpi-card {
  padding: 0.9rem 0.95rem;
  border-radius: var(--radius-md);
}

.kpi-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5vw, 1.85rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--text-bright);
}

.kpi-sub {
  margin-top: 0.28rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.control-panel {
  padding: 1.05rem;
  margin-bottom: 1.1rem;
}

.control-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.control-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-bright);
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

@media (min-width: 640px) {
  .preset-row {
    display: flex;
    flex-wrap: wrap;
  }
}

.preset-btn {
  min-height: 44px;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(225, 236, 238, 0.2);
  background: rgba(225, 236, 238, 0.07);
  color: var(--palette-lilac);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover,
.preset-btn.is-active {
  border-color: var(--palette-teal);
  background: rgba(130, 194, 192, 0.22);
  color: var(--text-bright);
  box-shadow: 0 0 16px rgba(130, 194, 192, 0.22);
}

.control-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 820px) {
  .control-grid {
    flex-direction: row;
    align-items: flex-end;
  }
}

.duration-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 820px) {
  .duration-inputs {
    display: flex;
  }
  .duration-inputs .field {
    width: 94px;
  }
}

.duration-inputs .field {
  margin-block-end: 0;
}

.control-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  flex: 1;
}

@media (min-width: 640px) {
  .control-buttons {
    display: flex;
    flex-wrap: wrap;
  }
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  background: rgba(16, 30, 56, 0.62);
  border: 1px solid rgba(225, 236, 238, 0.16);
}

@media (min-width: 640px) {
  .admin-tabs {
    display: inline-flex;
  }
}

.tab-btn {
  min-height: 44px;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--palette-lilac);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (min-width: 640px) {
  .tab-btn {
    padding: 0.52rem 1.1rem;
    font-size: 0.9rem;
  }
}

.tab-btn[aria-selected="true"] {
  color: #091427;
  background: linear-gradient(135deg, var(--palette-teal) 0%, var(--palette-lilac) 100%);
  box-shadow: 0 4px 16px rgba(130, 194, 192, 0.28);
}

.tab-panel {
  padding: 1.05rem;
}

.tab-panel[hidden] {
  display: none;
}

.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.section-toolbar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-bright);
}

/* Contestant Count Setter Bar in Admin */
.count-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: rgba(130, 194, 192, 0.1);
  border: 1px solid rgba(130, 194, 192, 0.34);
}

.count-control-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.count-control-form .field {
  margin-block-end: 0;
  width: 155px;
}

/* Admin Contestant Management List */
.admin-contestant-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.78rem;
}

@media (min-width: 860px) {
  .admin-contestant-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-contestant-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.82rem;
  border-radius: var(--radius-md);
  background: rgba(225, 236, 238, 0.05);
  border: 1px solid rgba(225, 236, 238, 0.14);
}

.admin-contestant-item img {
  width: 68px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(225, 236, 238, 0.2);
}

.admin-contestant-meta {
  min-inline-size: 0;
}

.admin-contestant-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-bright);
}

.admin-contestant-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.admin-contestant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Voter Management & Bulk CSV */
.voter-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
  margin-bottom: 1.1rem;
}

@media (min-width: 860px) {
  .voter-split {
    grid-template-columns: 1.25fr 0.75fr;
  }
}

.sub-card {
  padding: 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(225, 236, 238, 0.05);
  border: 1px solid rgba(225, 236, 238, 0.14);
}

.sub-card h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 0.96rem;
  color: var(--text-bright);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.search-bar .input {
  flex: 1 1 180px;
}

/* Responsive Container-Queried Data Table */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(520px, 68vh);
  container-type: inline-size;
  border-radius: var(--radius-md);
  border: 1px solid rgba(225, 236, 238, 0.16);
  background: rgba(9, 19, 37, 0.62);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.88rem;
  --label-1: "Öğrenci No";
  --label-2: "Ad Soyad";
  --label-3: "Tel Son 4";
  --label-4: "Durum";
  --label-5: "Verdiği Oy";
  --label-6: "İşlemler";
}

.data-table caption {
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: rgba(14, 32, 56, 0.98);
}

.data-table th,
.data-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(225, 236, 238, 0.1);
  white-space: nowrap;
}

.data-table thead th {
  font-family: var(--font-display);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.data-table tbody th {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--text-bright);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.62rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.badge--voted {
  background: rgba(130, 194, 192, 0.22);
  border: 1px solid rgba(130, 194, 192, 0.65);
  color: var(--palette-ice);
}

.badge--pending {
  background: rgba(168, 151, 188, 0.18);
  border: 1px solid rgba(168, 151, 188, 0.42);
  color: var(--palette-lilac);
}

@container (width < 640px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin: 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(225, 236, 238, 0.16);
    background: rgba(16, 30, 56, 0.72);
    overflow: hidden;
  }

  .data-table tbody th {
    background: rgba(130, 194, 192, 0.14);
    border-bottom: 1px solid rgba(225, 236, 238, 0.12);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    white-space: normal;
  }

  .data-table td:nth-child(2)::before { content: var(--label-2) ": "; color: var(--text-muted); font-size: 0.78rem; }
  .data-table td:nth-child(3)::before { content: var(--label-3) ": "; color: var(--text-muted); font-size: 0.78rem; }
  .data-table td:nth-child(4)::before { content: var(--label-4) ": "; color: var(--text-muted); font-size: 0.78rem; }
  .data-table td:nth-child(5)::before { content: var(--label-5) ": "; color: var(--text-muted); font-size: 0.78rem; }
  .data-table td:nth-child(6)::before { content: var(--label-6) ": "; color: var(--text-muted); font-size: 0.78rem; }
}

.photo-preview-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  border: 1.5px dashed rgba(130, 194, 192, 0.5);
  background: rgba(130, 194, 192, 0.08);
  margin-bottom: 0.75rem;
}

.photo-preview-box img {
  width: 58px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
}

.skeleton-card {
  height: 360px;
  border-radius: 22px;
  background: linear-gradient(110deg, rgba(16, 30, 56, 0.55) 30%, rgba(130, 194, 192, 0.16) 50%, rgba(16, 30, 56, 0.55) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   CREATOR SIGNATURE FOOTER ("made by hsynarik") & AMON KOUTAROU EASTER EGG
   ========================================================================== */
.site-signature {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 2;
}

.signature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.38rem 0.88rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(225, 236, 238, 0.14);
  background: rgba(11, 22, 42, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.2s var(--ease-smooth), border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.signature-pill:hover,
.signature-pill:focus-visible {
  color: var(--palette-ice);
  border-color: rgba(255, 56, 96, 0.48);
  box-shadow: 0 0 18px rgba(255, 56, 96, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.signature-pill:active {
  transform: scale(0.97);
}

.signature-prefix {
  opacity: 0.8;
}

.signature-handle {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--palette-ice);
  letter-spacing: 0.04em;
}

.signature-eye-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8fa3, #e6193c 65%, #7a081e 100%);
  box-shadow: 0 0 8px rgba(255, 42, 85, 0.78);
  flex-shrink: 0;
  animation: kakugan-pulse 2.8s ease-in-out infinite;
}

@keyframes kakugan-pulse {
  0%, 100% {
    opacity: 0.72;
    box-shadow: 0 0 6px rgba(255, 42, 85, 0.55);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 13px rgba(255, 42, 85, 0.95);
  }
}

.easter-dialog {
  width: min(390px, calc(100vw - 1.5rem));
  background: rgba(9, 14, 28, 0.95);
  border-color: rgba(255, 56, 96, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 26px 75px rgba(2, 4, 12, 0.88),
    0 0 42px rgba(230, 25, 60, 0.24);
}

@media (max-width: 639px) {
  .easter-dialog {
    width: 100vw;
    max-width: 100vw;
  }
}

.easter-card {
  position: relative;
  overflow: hidden;
}

.easter-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 4;
  background: rgba(9, 14, 28, 0.72);
  border: 1px solid rgba(225, 236, 238, 0.24);
}

.easter-portrait-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 13.5;
  overflow: hidden;
  background: #070a14;
  cursor: pointer;
}

.easter-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transition: transform 0.5s var(--ease-smooth), filter 0.35s ease;
}

.easter-portrait-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 38% 36%, rgba(255, 32, 68, 0.22), transparent 44%),
    linear-gradient(180deg, rgba(9, 14, 28, 0.08) 0%, rgba(9, 14, 28, 0.94) 100%);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.easter-portrait-wrap.is-kakugan img {
  transform: scale(1.045);
  filter: contrast(1.12) saturate(1.22);
}

.easter-portrait-wrap.is-kakugan::after {
  background:
    radial-gradient(circle at 38% 36%, rgba(255, 24, 64, 0.44), transparent 48%),
    linear-gradient(180deg, rgba(9, 14, 28, 0.04) 0%, rgba(9, 14, 28, 0.94) 100%);
}

.easter-dossier-chip {
  position: absolute;
  left: 0.85rem;
  bottom: 0.75rem;
  z-index: 3;
  padding: 0.24rem 0.68rem;
  border-radius: var(--radius-pill);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffdbe3;
  background: rgba(14, 16, 30, 0.78);
  border: 1px solid rgba(255, 56, 96, 0.5);
  backdrop-filter: blur(10px);
}

.easter-body {
  padding: 1rem 1.25rem 1.35rem;
  text-align: center;
}

.easter-kicker {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--palette-teal);
  margin-bottom: 0.2rem;
}

.easter-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, #f3f7f8 0%, #decbe0 52%, #ff7b98 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.easter-creator-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.78rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 56, 96, 0.13);
  border: 1px solid rgba(255, 56, 96, 0.36);
  color: var(--palette-ice);
  font-size: 0.78rem;
  margin-bottom: 0.85rem;
}

.easter-quote {
  margin: 0 0 0.6rem;
  padding: 0.68rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid rgba(255, 56, 96, 0.75);
  background: rgba(225, 236, 238, 0.05);
  color: var(--text-bright);
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.45;
  text-align: left;
}

.easter-sub {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
