:root {
  --ink: #21172f;
  --muted: #6b6077;
  --paper: #fff8ec;
  --paper-strong: #fffdf8;
  --line: rgba(45, 31, 68, 0.16);
  --blue: #79c6ff;
  --blue-deep: #1463a5;
  --blue-night: #102f68;
  --pink: #f7a6c5;
  --pink-deep: #bd3d78;
  --rose-night: #71315f;
  --gold: #f0be55;
  --cream: #fff3d5;
  --lavender: #bda9ef;
  --shadow: 0 24px 70px rgba(35, 21, 53, 0.24);
  --radius: 8px;
  --font-body: "Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Berkshire Swash", Georgia, serif;
  --font-royal: "Cinzel Decorative", Georgia, serif;
  --font-comic: "Bangers", Impact, fantasy;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f7eee9;
  font-family: var(--font-body);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(90deg, rgba(230, 245, 255, 0.22), rgba(255, 248, 236, 0.05) 48%, rgba(255, 233, 243, 0.22)),
    url("/assets/hero-princess-superhero.png") center / cover no-repeat;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, rgba(20, 99, 165, 0.1), transparent 36%, rgba(189, 61, 120, 0.12)),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.6), transparent 34%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
}


.hero {
  position: relative;
  min-height: 96vh;
  padding: 104px 18px 42px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 248, 236, 0.58) 0%, rgba(255, 248, 236, 0.28) 44%, rgba(255, 248, 236, 0.02) 100%),
    url("/assets/hero-princess-superhero.png") center / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(760px, 100%);
  margin: 0 auto;
}

.vote-panel,
.thanks-card,
.lock-panel,
.realm-card,
.winner-card,
.split-card,
.recent-court,
.photo-wall,
.team-section {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 248, 236, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.vote-panel {
  overflow: hidden;
  padding: 28px;
  background: rgba(255, 248, 236, 0.64);
  backdrop-filter: blur(6px);
}

.vote-panel::before {
  display: block;
  height: 150px;
  margin: -28px -28px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  content: "";
  background:
    linear-gradient(90deg, rgba(16, 47, 104, 0.18), rgba(255, 248, 236, 0.04) 48%, rgba(189, 61, 120, 0.18)),
    url("/assets/hero-princess-superhero.png") center / cover no-repeat;
}

/* Enchanted royal frame — prediction page */
.vote-panel--enchanted {
  position: relative;
  isolation: isolate;
  border: 3px solid transparent;
  background:
    linear-gradient(rgba(255, 248, 236, 0.64), rgba(255, 248, 236, 0.64)) padding-box,
    linear-gradient(
      135deg,
      #f5d76e 0%,
      #fff8dc 18%,
      #e8a4c8 42%,
      #7eb8ff 62%,
      #f0be55 82%,
      #c9a227 100%
    )
    border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    0 0 0 6px rgba(240, 190, 85, 0.35),
    0 0 28px rgba(240, 190, 85, 0.22),
    0 0 48px rgba(189, 61, 120, 0.12),
    var(--shadow);
}

.vote-panel--enchanted > :not(.vote-panel-frame) {
  position: relative;
  z-index: 1;
}

.vote-panel-frame {
  pointer-events: none;
  position: absolute;
  inset: 14px;
  z-index: 2;
  border: 2px solid rgba(240, 190, 85, 0.72);
  border-radius: calc(var(--radius) - 2px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 32px rgba(240, 190, 85, 0.14);
}

.vote-panel-frame::before,
.vote-panel-frame::after {
  position: absolute;
  left: 12%;
  right: 12%;
  height: 3px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(
    90deg,
    transparent,
    rgba(240, 190, 85, 0.85) 20%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(240, 190, 85, 0.85) 80%,
    transparent
  );
  opacity: 0.85;
}

.vote-panel-frame::before {
  top: 6px;
}

.vote-panel-frame::after {
  bottom: 6px;
}

.vote-panel-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.vote-panel-corner::before {
  font-family: var(--font-royal);
  font-size: 1.35rem;
  line-height: 1;
  color: #c9a227;
  text-shadow:
    0 0 10px rgba(240, 190, 85, 0.9),
    0 2px 6px rgba(16, 47, 104, 0.35);
  filter: drop-shadow(0 0 4px rgba(255, 248, 236, 0.8));
}

.vote-panel-corner--tl {
  top: -4px;
  left: -4px;
}

.vote-panel-corner--tl::before {
  content: "♛";
}

.vote-panel-corner--tr {
  top: -4px;
  right: -4px;
}

.vote-panel-corner--tr::before {
  content: "✦";
}

.vote-panel-corner--bl {
  bottom: -4px;
  left: -4px;
}

.vote-panel-corner--bl::before {
  content: "✧";
}

.vote-panel-corner--br {
  bottom: -4px;
  right: -4px;
}

.vote-panel-corner--br::before {
  content: "♛";
  transform: scaleX(-1);
  display: inline-block;
}

@keyframes enchanted-shimmer {
  0%,
  100% {
    opacity: 0.72;
  }

  50% {
    opacity: 1;
  }
}

.vote-panel--enchanted .vote-panel-corner::before {
  animation: enchanted-shimmer 3.6s ease-in-out infinite;
}

.vote-panel--enchanted .vote-panel-corner--tr::before,
.vote-panel--enchanted .vote-panel-corner--bl::before {
  animation-delay: 1.2s;
}

.panel-kicker,
.team-label,
.realm-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--pink-deep);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-weight: 400;
  line-height: 0.96;
}

/* Main wordmark: Unbounded must win over `h1 { font-family: Berkshire }` (ID + !important + cache-bust on CSS link). */
#voteTitle {
  font-family: "Unbounded", system-ui, -apple-system, sans-serif !important;
  font-weight: 800 !important;
  font-style: normal !important;
  letter-spacing: -0.05em;
  line-height: 1.05;
  text-wrap: balance;
  color: var(--ink);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  #voteTitle {
    background: linear-gradient(
      115deg,
      var(--blue-night) 0%,
      #4b3282 38%,
      var(--pink-deep) 72%,
      #d4528a 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.lede {
  max-width: 620px;
  margin-bottom: 22px;
  color: #51455e;
  font-size: 1.05rem;
  line-height: 1.48;
}

.vote-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

label,
legend {
  font-weight: 1000;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.9);
  outline: none;
  font-size: 1.02rem;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(121, 198, 255, 0.28);
}

textarea {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.9);
  outline: none;
  font: inherit;
  font-size: 1.01rem;
  line-height: 1.45;
  resize: vertical;
}

textarea:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(121, 198, 255, 0.28);
}


.section-sparkles {
  margin: 2px 0 -2px;
  color: #b38a2f;
  font-size: 0.95rem;
  letter-spacing: 0.42em;
  text-align: center;
  opacity: 0.82;
  user-select: none;
}

.guestbook-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(189, 61, 120, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 248, 236, 0.95), rgba(255, 230, 244, 0.45)),
    rgba(255, 253, 248, 0.55);
  box-shadow: 0 10px 24px rgba(35, 21, 53, 0.08);
}

.guestbook-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-family: var(--font-display);
  color: var(--ink);
}

.guestbook-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.guess-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.guess-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.guess-card {
  position: relative;
  display: grid;
  min-height: 156px;
  align-content: start;
  gap: 8px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.guess-card::before {
  position: absolute;
  inset: auto -28px -32px auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  content: "";
  opacity: 0.28;
}

.guess-card.boy::before {
  background: var(--blue);
}

.guess-card.girl::before {
  background: var(--pink);
}

.guess-card::after {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 92px;
  height: 70px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.38;
}

.guess-card.boy::after {
  content: "";
  background-image: url("/assets/pow-badge.svg");
}

.guess-card.girl::after {
  content: "";
  background-image: url("/assets/crown-badge.svg");
}

.guess-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.guess-card:has(input:checked) {
  border-color: rgba(240, 190, 85, 0.7);
  box-shadow: 0 0 0 4px rgba(240, 190, 85, 0.22), 0 16px 34px rgba(39, 30, 52, 0.16);
}

.guess-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(35, 21, 53, 0.14);
}

.guess-card.boy:has(input:checked) {
  background: linear-gradient(145deg, rgba(121, 198, 255, 0.92), rgba(255, 253, 248, 0.92));
}

.guess-card.girl:has(input:checked) {
  background: linear-gradient(145deg, rgba(247, 166, 197, 0.92), rgba(255, 253, 248, 0.92));
}

.guess-eyebrow {
  font-size: 0.74rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.guess-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.54rem;
  font-weight: 400;
  line-height: 1;
}

.guess-card.boy .guess-title {
  font-family: var(--font-comic);
  color: var(--blue-night);
  letter-spacing: 0;
}

.guess-note {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.35;
}

.look-field .look-options,
.personality-field .personality-options {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.look-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.look-card {
  position: relative;
  display: grid;
  min-height: 132px;
  align-content: start;
  gap: 6px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(254, 241, 247, 0.72)),
    rgba(255, 253, 248, 0.82);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.look-card.mom::before,
.look-card.dad::before {
  position: absolute;
  inset: auto -20px -24px auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  content: "";
  opacity: 0.28;
}

.look-card.mom::before {
  background: radial-gradient(circle, #f8b5db 20%, #c86fb4 76%);
}

.look-card.dad::before {
  background: radial-gradient(circle, #a8d6ff 20%, #3d7ea6 76%);
}

.look-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.look-card:has(input:checked) {
  border-color: rgba(240, 190, 85, 0.7);
  box-shadow: 0 0 0 4px rgba(240, 190, 85, 0.22), 0 16px 34px rgba(39, 30, 52, 0.16);
}

.look-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(35, 21, 53, 0.14);
}

.look-eyebrow {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  color: var(--muted);
}

.look-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-royal);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink);
}

.look-note {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.personality-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.personality-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.88);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.personality-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.personality-card:has(input:checked) {
  border-color: rgba(240, 190, 85, 0.7);
  box-shadow: 0 0 0 3px rgba(240, 190, 85, 0.2);
  background: rgba(255, 252, 240, 0.95);
}

.personality-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(35, 21, 53, 0.12);
}

.personality-card.comic {
  background: linear-gradient(145deg, rgba(198, 232, 255, 0.5), rgba(255, 253, 248, 0.94));
}

.personality-card.royal {
  background: linear-gradient(145deg, rgba(255, 224, 242, 0.5), rgba(255, 253, 248, 0.94));
}

.personality-card.snack {
  background: linear-gradient(145deg, rgba(255, 243, 213, 0.52), rgba(255, 253, 248, 0.94));
}

.personality-card.zoomie {
  background: linear-gradient(145deg, rgba(223, 234, 255, 0.48), rgba(255, 253, 248, 0.94));
}

.personality-title {
  font-size: 1.05rem;
  font-weight: 1000;
  color: var(--ink);
}

.personality-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

.reveal-countdown {
  margin: 20px 0 8px;
  padding: 16px 18px;
  border: 1px solid rgba(45, 31, 68, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
  text-align: center;
}

.reveal-countdown-eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pink-deep);
}

.reveal-countdown-heading {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}

.reveal-countdown-timer {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--blue-night);
}

.certificate-zone {
  margin: 18px 0 12px;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius);
  background:
    linear-gradient(165deg, rgba(255, 252, 240, 0.98), rgba(255, 236, 248, 0.55)),
    rgba(255, 253, 248, 0.88);
  text-align: center;
}

.certificate-zone[hidden] {
  display: none !important;
}

.certificate-zone-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6919;
}

.certificate-zone-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
}

.certificate-zone-lede {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.certificate-frame {
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(121, 198, 255, 0.2));
  box-shadow: 0 12px 28px rgba(34, 25, 48, 0.12);
}

.certificate-canvas {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.certificate-download {
  margin: 0 auto;
}

.camera-box {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(45, 31, 68, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.64);
}

.camera-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.camera-head p,
.form-note,
.lock-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.form-foot .form-note {
  flex: 1 1 220px;
  margin: 0;
}

.music-toggle {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid rgba(45, 31, 68, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.95);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.music-toggle:hover {
  border-color: rgba(45, 31, 68, 0.34);
  background: #fffdf8;
}

.status-pill,
.live-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #193f3a;
  background: rgba(155, 220, 199, 0.36);
  font-size: 0.78rem;
  font-weight: 1000;
}

.photo-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 248px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(45, 31, 68, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(121, 198, 255, 0.12), rgba(247, 166, 197, 0.14)),
    rgba(255, 248, 236, 0.74);
}

/* Stack preview layers in a single grid cell. */
.photo-stage > * {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  justify-self: stretch;
}


.camera-video-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 248px;
  overflow: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.camera-video-frame.is-mirrored,
.photo-stage img#photoPreview.is-mirrored {
  transform: translateZ(0) scaleX(-1);
  -webkit-transform: translateZ(0) scaleX(-1);
}

.camera-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 248px;
  object-fit: cover;
  object-position: center;
}

.photo-stage img {
  width: 100%;
  height: 100%;
  min-height: 248px;
  object-fit: cover;
  object-position: center;
}

.photo-placeholder {
  position: relative;
  z-index: 0;
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

/* Author `display: grid` above can override the UA `hidden` rule in some WebKit builds — keep empty state off the preview stack. */
.photo-placeholder[hidden] {
  display: none !important;
}

.photo-stage .camera-video-frame:not([hidden]),
.photo-stage img#photoPreview:not([hidden]) {
  z-index: 1;
}

.photo-area {
  position: relative;
}

.photo-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.photo-control {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(35, 21, 53, 0.22);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.photo-control svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.photo-control:hover {
  border-color: rgba(255, 255, 255, 0.85);
  background: #fffdf8;
  transform: translateY(-1px);
}

.photo-control:active {
  transform: scale(0.94);
}

.photo-control.is-active {
  color: #fffdf8;
  border-color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(135deg, var(--pink-deep), var(--blue-deep));
  box-shadow: 0 8px 20px rgba(60, 42, 88, 0.32);
}

.photo-control.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

.photo-placeholder span {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: linear-gradient(135deg, var(--blue-deep), var(--pink-deep));
  font-size: 0.78rem;
  font-weight: 1000;
}

.camera-actions,
.thanks-actions,
.results-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.camera-actions {
  width: 100%;
}

.camera-actions .secondary-button {
  width: 100%;
}


.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 1000;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button {
  color: #fffdf8;
  background: linear-gradient(135deg, var(--pink-deep), var(--blue-deep));
  box-shadow: 0 14px 28px rgba(60, 42, 88, 0.28);
}

.secondary-button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
}

.danger-button {
  color: #8b1f3e;
  border: 1px solid rgba(189, 61, 120, 0.26);
  background: rgba(247, 166, 197, 0.2);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.recent-card,
.gallery-card,
.vote-card,
.realm-card,
.winner-card,
.split-card,
.team-section,
.guestbook-box,
.camera-box,
.certificate-zone {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.recent-card:hover,
.gallery-card:hover,
.vote-card:hover,
.team-section:hover,
.guestbook-box:hover,
.camera-box:hover,
.certificate-zone:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(35, 21, 53, 0.12);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.thanks-view,
.results-view {
  min-height: 100vh;
  padding: 112px 18px 42px;
}

.thanks-card,
.lock-panel,
.results-dashboard,
.results-hero {
  width: min(1360px, 100%);
  margin: 0 auto;
}

.thanks-card {
  max-width: 760px;
  padding: 34px;
}

.results-view {
  background:
    linear-gradient(90deg, rgba(10, 36, 83, 0.62), rgba(38, 24, 57, 0.24) 45%, rgba(107, 33, 78, 0.58)),
    url("/assets/hero-princess-superhero.png") center / cover no-repeat fixed;
}

.results-hero {
  margin-bottom: 18px;
  color: #fffdf8;
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.32);
}

.results-hero .panel-kicker {
  color: var(--cream);
}

.results-hero h1 {
  max-width: 980px;
  margin: 0 auto 8px;
  font-family: "Unbounded", system-ui, -apple-system, sans-serif !important;
  font-weight: 800 !important;
  font-style: normal !important;
  letter-spacing: -0.05em;
  line-height: 1.05;
  text-wrap: balance;
  text-shadow: none;
  color: #fffdf8;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .results-hero h1 {
    background: linear-gradient(
      105deg,
      #fffdf8 0%,
      var(--gold) 35%,
      var(--pink) 68%,
      #ffe4ef 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 3px 20px rgba(0, 0, 0, 0.45));
  }
}

.results-hero p {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.45;
}

.lock-panel {
  max-width: 620px;
  padding: 26px;
}

.unlock-form {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.unlock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.results-dashboard {
  display: grid;
  gap: 16px;
}

.showdown-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 0.95fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.realm-card,
.winner-card {
  position: relative;
  min-height: 300px;
  overflow: hidden;
}

.realm-card {
  display: grid;
  align-content: center;
  padding: 28px;
  color: #fffdf8;
}

.realm-card::after {
  position: absolute;
  right: -22px;
  bottom: -24px;
  width: 190px;
  height: 140px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  opacity: 0.2;
}

.realm-boy {
  background:
    linear-gradient(135deg, rgba(16, 47, 104, 0.98), rgba(20, 99, 165, 0.84)),
    rgba(16, 47, 104, 0.96);
}

.realm-boy::after {
  background-image: url("/assets/pow-badge.svg");
}

.realm-girl {
  background:
    linear-gradient(135deg, rgba(113, 49, 95, 0.96), rgba(189, 61, 120, 0.8)),
    rgba(113, 49, 95, 0.94);
  text-align: right;
}

.realm-girl::after {
  background-image: url("/assets/crown-badge.svg");
}

.realm-kicker {
  color: var(--cream);
}

.realm-card h2 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 3vw, 3.3rem);
}

.realm-boy h2 {
  font-family: var(--font-comic);
  letter-spacing: 0;
}

.realm-girl h2 {
  font-family: var(--font-display);
  font-weight: 400;
}

.realm-card strong {
  display: block;
  font-family: var(--font-comic);
  font-size: clamp(5rem, 8vw, 8.5rem);
  line-height: 0.86;
}

.realm-girl strong {
  font-family: var(--font-display);
  font-weight: 400;
}

.realm-card p {
  margin: 12px 0 0;
  color: rgba(255, 253, 248, 0.88);
  font-weight: 1000;
}

.winner-card {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 26px;
  color: #fffdf8;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(33, 23, 47, 0.96), rgba(75, 50, 105, 0.92)),
    rgba(33, 23, 47, 0.95);
}

.winner-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 20% 15%, rgba(121, 198, 255, 0.32), transparent 26%),
    radial-gradient(circle at 84% 18%, rgba(247, 166, 197, 0.28), transparent 28%),
    linear-gradient(90deg, var(--blue), var(--gold), var(--pink));
  opacity: 0.24;
}

.winner-card > * {
  position: relative;
  z-index: 1;
}

.live-pill {
  margin-bottom: 14px;
  color: #21172f;
  background: var(--cream);
}

.winner-symbol {
  display: grid;
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
  place-items: center;
  border: 2px solid rgba(255, 243, 213, 0.9);
  border-radius: 50%;
  color: #21172f;
  background: linear-gradient(145deg, #fff3d5, var(--gold));
  font-family: var(--font-comic);
  font-size: 3rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.winner-card h2 {
  max-width: 420px;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
}

.winner-card p {
  max-width: 440px;
  margin-bottom: 18px;
  color: rgba(255, 253, 248, 0.86);
  line-height: 1.42;
}

.total-chip {
  display: inline-grid;
  min-width: 160px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 243, 213, 0.36);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.12);
}

.total-chip span {
  color: rgba(255, 253, 248, 0.72);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.total-chip strong {
  font-family: var(--font-comic);
  font-size: 3.2rem;
  line-height: 0.95;
}

.split-card {
  padding: 16px;
  background: rgba(255, 248, 236, 0.9);
}

.split-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.meter {
  display: flex;
  height: 30px;
  overflow: hidden;
  border: 2px solid rgba(255, 253, 248, 0.96);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 28px rgba(35, 21, 53, 0.12);
}

.meter-fill {
  min-width: 0;
  transition: width 420ms ease;
}

.boy-fill {
  background: linear-gradient(90deg, var(--blue-night), var(--blue));
}

.girl-fill {
  background: linear-gradient(90deg, var(--pink), var(--pink-deep));
}

.recent-court,
.photo-wall {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  background: rgba(255, 248, 236, 0.9);
}

.recent-court h2,
.photo-wall h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.recent-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.recent-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.84);
}

.recent-card img,
.recent-card > span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.recent-card > span {
  display: grid;
  place-items: center;
  color: #fffdf8;
  background: linear-gradient(135deg, var(--blue-deep), var(--pink-deep));
  font-weight: 1000;
}

.recent-card strong,
.recent-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-card strong {
  font-weight: 1000;
}

.recent-card div span,
.vote-card span,
.gallery-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.gallery-card {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.gallery-card img {
  width: 100%;
  height: 172px;
  object-fit: cover;
}

.gallery-card div {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 8px;
  border-radius: var(--radius);
  color: #fffdf8;
  background: rgba(33, 23, 47, 0.78);
  backdrop-filter: blur(8px);
}

.gallery-card strong,
.gallery-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card span {
  color: rgba(255, 253, 248, 0.76);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.team-section {
  min-height: 380px;
  padding: 18px;
}

.team-boy {
  background: linear-gradient(180deg, rgba(121, 198, 255, 0.76), rgba(255, 248, 236, 0.93));
}

.team-girl {
  background: linear-gradient(180deg, rgba(247, 166, 197, 0.76), rgba(255, 248, 236, 0.93));
}

.team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.team-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.45rem;
  font-weight: 400;
}

.team-boy .team-head h2 {
  font-family: var(--font-comic);
}

.team-head strong {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: linear-gradient(145deg, #21172f, #5c3e82);
  font-family: var(--font-comic);
  font-size: 1.5rem;
}

.vote-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.vote-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.84);
  box-shadow: 0 10px 24px rgba(43, 30, 62, 0.1);
}

.vote-card img,
.vote-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  background: linear-gradient(135deg, var(--blue), var(--gold), var(--pink));
}

.vote-avatar {
  display: grid;
  place-items: center;
  color: #fffdf8;
  font-size: 2.4rem;
  font-weight: 1000;
}

.vote-card-meta strong,
.vote-card-meta span {
  display: block;
  overflow-wrap: anywhere;
}

.vote-card-meta strong {
  font-weight: 1000;
}

.guestbook-quote-list {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.guestbook-quote {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px 10px 10px;
  border: 1px solid rgba(45, 31, 68, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(255, 248, 236, 0.78));
  box-shadow: 0 4px 12px rgba(35, 21, 53, 0.06);
}

.vote-card.boy-vote .guestbook-quote {
  border-left-color: var(--blue-deep);
}

.vote-card.girl-vote .guestbook-quote {
  border-left-color: var(--pink-deep);
}

.guestbook-quote-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: linear-gradient(135deg, var(--gold), #d6a233);
  font-size: 0.78rem;
  font-weight: 1000;
  line-height: 1;
}

.vote-card.boy-vote .guestbook-quote-icon {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}

.vote-card.girl-vote .guestbook-quote-icon {
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
}

.guestbook-quote-body {
  min-width: 0;
}

.guestbook-quote-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vote-card.boy-vote .guestbook-quote-label {
  color: var(--blue-deep);
}

.vote-card.girl-vote .guestbook-quote-label {
  color: var(--pink-deep);
}

.guestbook-quote-text {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(45, 31, 68, 0.22);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 253, 248, 0.58);
  line-height: 1.5;
}

body[data-leading="boy"] .winner-card {
  background: linear-gradient(180deg, rgba(16, 47, 104, 0.98), rgba(33, 23, 47, 0.94));
}

body[data-leading="girl"] .winner-card {
  background: linear-gradient(180deg, rgba(113, 49, 95, 0.98), rgba(33, 23, 47, 0.94));
}

@media (max-width: 1160px) {
  .showdown-grid,
  .team-grid,
  .recent-court,
  .photo-wall {
    grid-template-columns: 1fr;
  }

  .recent-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body::before {
    background:
      linear-gradient(180deg, rgba(255, 248, 236, 0.4), rgba(255, 248, 236, 0.22)),
      url("/assets/hero-princess-superhero.png") center top / cover no-repeat;
  }

  .hero {
    min-height: auto;
    padding: 14px 10px 28px;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(255, 248, 236, 0.5), rgba(255, 248, 236, 0.28)),
      url("/assets/hero-princess-superhero.png") center top / cover no-repeat;
  }

  .vote-panel,
  .thanks-card,
  .lock-panel {
    padding: 16px;
    box-shadow: 0 14px 34px rgba(34, 25, 48, 0.15);
  }

  .vote-panel {
    background: rgba(255, 248, 236, 0.54);
    backdrop-filter: blur(4px);
  }

  .vote-panel::before {
    height: 104px;
    margin: -16px -16px 16px;
  }

  .vote-panel-frame {
    inset: 10px;
  }

  .vote-panel-corner {
    width: 32px;
    height: 32px;
  }

  .vote-panel-corner::before {
    font-size: 1.1rem;
  }

  .panel-kicker,
  .team-label,
  .realm-kicker {
    font-size: 0.72rem;
  }

  h1 {
    font-size: 2.18rem;
    line-height: 1;
  }

  h2 {
    font-size: 1.05rem;
  }

  .lede {
    margin-bottom: 16px;
    font-size: 0.98rem;
    line-height: 1.42;
  }

  .vote-form {
    gap: 14px;
  }

  input[type="text"],
  input[type="password"] {
    min-height: 52px;
    font-size: 1.05rem;
  }

  textarea {
    font-size: 1.03rem;
  }

  .unlock-row {
    grid-template-columns: 1fr;
  }

  .guess-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .guess-card {
    min-height: 112px;
    padding: 12px;
  }

  .guess-title {
    font-size: 1.26rem;
  }

  .guess-card.boy .guess-title {
    font-size: 1.34rem;
  }

  .look-options {
    gap: 10px;
  }

  .look-card {
    min-height: 118px;
    padding: 12px;
  }

  .personality-options {
    gap: 8px;
  }

  .personality-card {
    min-height: 86px;
    padding: 11px;
  }

  .section-sparkles {
    letter-spacing: 0.28em;
    font-size: 0.88rem;
  }

  .reveal-countdown-heading {
    font-size: 1.22rem;
  }

  .reveal-countdown-timer {
    font-size: 0.92rem;
  }

  .camera-head,
  .team-head {
    flex-direction: column;
    align-items: stretch;
  }

  .form-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .music-toggle {
    width: 100%;
    text-align: center;
  }

  .status-pill {
    width: max-content;
  }

  .photo-stage,
  .camera-video-frame,
  .camera-video-frame video,
  .photo-stage img {
    min-height: 190px;
  }

  .primary-button,
  .danger-button {
    width: 100%;
  }

  .thanks-view,
  .results-view {
    padding: 18px 10px 28px;
  }

  .results-view {
    background:
      linear-gradient(180deg, rgba(16, 47, 104, 0.58), rgba(255, 248, 236, 0.48), rgba(113, 49, 95, 0.52)),
      url("/assets/hero-princess-superhero.png") center top / cover no-repeat;
  }

  .results-hero h1 {
    font-size: 2.2rem;
  }

  .results-hero p {
    font-size: 0.96rem;
  }

  .showdown-grid {
    grid-template-columns: 1fr;
  }

  .realm-card,
  .winner-card {
    min-height: auto;
    padding: 18px;
  }

  .realm-girl {
    text-align: left;
  }

  .realm-card strong {
    font-size: 4rem;
  }

  .winner-symbol {
    width: 76px;
    height: 76px;
    font-size: 2.4rem;
  }

  .winner-card h2,
  .recent-court h2,
  .photo-wall h2 {
    font-size: 1.65rem;
  }

  .split-labels {
    flex-direction: column;
    gap: 4px;
  }

  .recent-ribbon,
  .gallery-grid,
  .vote-list {
    grid-template-columns: 1fr;
  }

  .gallery-card img {
    height: 220px;
  }
}

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