:root {
  --bg: #f8fafc;
  --dot-color: #cfe3ef;
  --surface: #ffffff;
  --ink: #214352;
  --ink-fill: #2f637a;
  --ink-muted: #5a7a89;
  --ink-faint: rgba(47, 99, 122, 0.14);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot-color) 1.75px, transparent 1.75px);
  background-size: 26px 26px;
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  position: relative;
  overflow-x: clip;
}

/* Faint Light-Blue Outline SVG Margin Decorations */
.margin-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.margin-doodle {
  position: absolute;
  color: var(--ink-faint);
}

.doodle-left-1 { top: 10%; left: 3%; transform: rotate(-12deg); }
.doodle-left-2 { top: 30%; left: 5%; transform: rotate(10deg); }
.doodle-left-3 { top: 52%; left: 2.5%; transform: rotate(-8deg); }
.doodle-left-4 { top: 72%; left: 4.5%; transform: rotate(14deg); }
.doodle-left-5 { top: 88%; left: 2%; transform: rotate(-6deg); }

.doodle-right-1 { top: 12%; right: 3.5%; transform: rotate(11deg); }
.doodle-right-2 { top: 32%; right: 4.5%; transform: rotate(-14deg); }
.doodle-right-3 { top: 50%; right: 2.5%; transform: rotate(8deg); }
.doodle-right-4 { top: 70%; right: 4%; transform: rotate(-10deg); }
.doodle-right-5 { top: 87%; right: 3%; transform: rotate(12deg); }

@media (max-width: 1024px) {
  .margin-decorations {
    display: none;
  }
}

/* Top Navigation Bar */
.top-nav {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 16px 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sound-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(33, 67, 82, 0.18);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sound-pill:hover {
  background: #ffffff;
  border-color: rgba(33, 67, 82, 0.4);
  transform: translateY(-1px);
}

.sound-pill.is-muted {
  opacity: 0.65;
}

/* Centered Hero Header */
.hero-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 12px 20px 20px;
  max-width: 640px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Pacifico', 'Caveat', cursive;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.06rem);
  color: var(--ink);
  opacity: 0.85;
  font-weight: 500;
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto;
}

/* Stage Progress Header */
.stage-progress-header {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto 14px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.progress-pill,
.settled-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--surface);
  border: 1.5px solid rgba(33, 67, 82, 0.22);
  color: var(--ink);
}

.settled-pill {
  color: var(--ink-muted);
}

.settled-pill.is-complete {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(33, 67, 82, 0.1);
  border: 1px solid rgba(33, 67, 82, 0.15);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--ink-fill);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* One-Question-Per-Page Stage */
.stage-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.debate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  will-change: transform, opacity;
}

/* Slide/Fade Stage Transitions */
.debate-card.animate-in,
.summary-card.animate-in {
  animation: stageSlideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.debate-card.animate-out,
.summary-card.animate-out {
  animation: stageSlideOut 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.debate-card.animate-in-back,
.summary-card.animate-in-back {
  animation: stageSlideInBack 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.debate-card.animate-out-back,
.summary-card.animate-out-back {
  animation: stageSlideOutBack 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes stageSlideIn {
  from { opacity: 0; transform: translateX(26px) scale(0.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes stageSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(-26px) scale(0.985); }
}

@keyframes stageSlideInBack {
  from { opacity: 0; transform: translateX(-26px) scale(0.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes stageSlideOutBack {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(26px) scale(0.985); }
}

/* Original dress photograph */
.debate-hero-art {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 128px;
}

.hero-art-img {
  display: block;
  max-width: min(260px, 78vw);
  max-height: 150px;
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  border: 2px solid #214352;
  box-shadow: 0 8px 20px rgba(33, 67, 82, 0.16);
}

.debate-hero-svg svg {
  display: block;
  width: min(240px, 72vw);
  height: auto;
  max-height: 140px;
  filter: drop-shadow(0 6px 14px rgba(33, 67, 82, 0.14));
}

.debate-question {
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 22px;
  max-width: 560px;
}

/* Side-by-Side Unvoted Option Buttons */
.debate-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.option-btn {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 18px 20px;
  min-height: 86px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(33, 67, 82, 0.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.option-btn:not(:disabled):hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
  background: #ffffff;
}

.option-btn:not(:disabled):active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.option-label {
  display: grid;
  align-content: center;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.has-photo-options .option-btn {
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.option-photo {
  display: block;
  width: 100%;
  aspect-ratio: 2.2;
  max-height: clamp(64px, 15dvh, 142px);
  object-fit: cover;
  background: #edf3f7;
}

.debate-card:is([data-question-id="cats_or_dogs"], [data-question-id="early_or_night"]) .option-photo {
  object-position: center top;
}

.debate-card:is([data-question-id="taco_sandwich"], [data-question-id="sweet_or_savory"], [data-question-id="coffee_or_tea"]) .option-photo {
  object-position: center 27%;
}

.debate-card[data-question-id="shower_time"] .option-photo {
  object-position: center 35%;
}

.debate-card[data-question-id="books_or_movies"] .option-photo {
  object-position: center 42%;
}

.debate-card[data-question-id="star_wars_trek"] .option-photo {
  aspect-ratio: 2.58;
}

.debate-card[data-question-id="dog_pants"] .option-photo {
  aspect-ratio: 2;
}

.has-photo-options .option-label {
  flex: 1;
  min-height: 44px;
  padding: 6px 10px;
}

.has-photo-options.is-voted .debate-options {
  margin-bottom: 14px;
}

.option-btn:disabled {
  cursor: default;
  box-shadow: none;
}

.option-btn.is-user-choice .option-label {
  width: 100%;
  background: var(--ink);
  color: white;
}

.debate-card:not(.has-photo-options) .option-btn.is-user-choice {
  background: var(--ink);
}

.option-tally {
  margin-top: 3px;
  font-size: 0.78em;
  font-weight: 600;
  opacity: 0.85;
}

.dress-swatch {
  flex: 0 0 30px;
  height: 30px;
  border: 1px solid var(--ink);
  border-radius: 6px;
}

.dress-swatch--blue-black {
  background: linear-gradient(135deg, #2550be 50%, #1a1920 50%);
}

.dress-swatch--white-gold {
  background: linear-gradient(135deg, #fff 50%, #bd8b2b 50%);
}

/* Post-Vote Unified Decided Card */
.decided-card {
  display: none;
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 24px 26px;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: decidedPop 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.debate-card.is-voted .decided-card {
  display: flex;
}

@keyframes decidedPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.decided-heading {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
}

.decided-subtitle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}

.decided-subtitle[hidden] {
  display: none;
}

/* Single Horizontal Progress Bar with Halftone Stippled Fill */
.decided-bar {
  width: 100%;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #edf3f7;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  margin-top: 2px;
}

.decided-bar-seg {
  height: 100%;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  background-color: #edf3f7;
}

.decided-bar-seg.is-winner {
  background-color: var(--ink-fill);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.32) 1.35px, transparent 1.35px),
    radial-gradient(rgba(255, 255, 255, 0.32) 1.35px, transparent 1.35px);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

.decided-bar-seg-a.has-split {
  border-right: 2px solid var(--ink);
}

.decided-stats {
  text-align: center;
}

.decided-stat-a,
.decided-stat-b {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.decided-stat-total {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Bottom Stage Navigation */
.stage-nav {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto 12px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.stage-nav[hidden] {
  display: none;
}

.nav-btn {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(33, 67, 82, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.nav-btn.is-primary {
  background: var(--ink);
  color: var(--surface);
}

.nav-btn.is-primary:hover {
  background: var(--ink-fill);
}

.nav-btn:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 390px;
}

.progress-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1.8px solid rgba(33, 67, 82, 0.45);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, width 0.2s ease;
}

.progress-dot:hover {
  transform: scale(1.25);
  border-color: var(--ink);
}

.progress-dot.is-voted {
  background: var(--ink-fill);
  border-color: var(--ink-fill);
}

.progress-dot.is-current {
  width: 24px;
  background: var(--ink);
  border-color: var(--ink);
}

@media (max-width: 580px) {
  .stage-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .progress-dots {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }
}

/* Final Summary Screen */
.summary-card {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(14px, 3dvh, 26px) clamp(12px, 4vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2dvh, 18px);
  text-align: center;
}

.summary-title {
  font-family: 'Pacifico', 'Caveat', cursive;
  font-size: clamp(1.45rem, 4.5vw, 2.5rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}

.summary-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.summary-stat-box {
  background: #f8fafc;
  border: 1.5px solid rgba(33, 67, 82, 0.2);
  border-radius: 12px;
  padding: 9px 5px;
  overflow-wrap: anywhere;
}

.summary-stat-num {
  display: block;
  font-size: clamp(1.16rem, 3.6vw, 1.45rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.summary-stat-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-top: 2px;
  line-height: 1.2;
}

.summary-review {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label label" "picker action" "pick pick";
  align-items: start;
  gap: 6px 8px;
  padding: 12px;
  border: 1px solid var(--ink-faint);
  border-radius: 12px;
  background: #f4f8fb;
  text-align: start;
}

.summary-review label {
  grid-area: label;
  font-size: 0.84rem;
  font-weight: 800;
}

.summary-review select {
  grid-area: picker;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--ink-muted);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding-inline: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.summary-review .summary-btn-primary {
  grid-area: action;
}

.summary-item-meta {
  grid-area: pick;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.summary-item-meta.is-agreed {
  color: #15803d;
}

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

.summary-btn-primary,
.summary-btn-secondary {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.summary-btn-primary {
  background: var(--ink);
  color: var(--surface);
}

.summary-btn-primary:hover {
  background: var(--ink-fill);
}

.summary-btn-secondary {
  background: var(--surface);
  color: var(--ink);
}

.summary-btn-secondary:hover {
  background: #f1f5f9;
}

.debate-settings { position: relative; flex: none; }
.debate-settings summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  list-style: none;
  border: 1px solid #c4cfde;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.debate-settings summary::-webkit-details-marker { display: none; }
.debate-settings-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 5px);
  inset-inline-end: 0;
  min-width: max-content;
  padding: 4px;
  border: 1px solid #c4cfde;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 7px 20px #0b162333;
}
.debate-settings-menu :is(button, a) {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.debate-settings-menu :is(button, a):is(:hover, :focus-visible) { background: #e9eff5; }

/* Reset confirmation dialog */
.reset-modal {
  width: min(400px, calc(100% - 40px));
  margin: auto;
  border: 0;
  overflow: visible;
  background: transparent;
  color: inherit;
}

.reset-modal::backdrop {
  background: rgba(15, 31, 40, 0.45);
  backdrop-filter: blur(4px);
}

.reset-modal-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  padding: 24px 22px 20px;
  box-shadow: 6px 6px 0 var(--ink);
  text-align: center;
  animation: modalPopIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reset-modal-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: #e0f2fe;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.reset-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
}

.reset-modal-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0 0 20px;
}

.reset-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.reset-modal-btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.reset-modal-cancel {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(33, 67, 82, 0.14);
}

.reset-modal-cancel:hover {
  background: #f8fafc;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.reset-modal-confirm {
  background: #dc2626;
  border-color: #991b1b;
  color: #ffffff;
  box-shadow: 2px 2px 0 #7f1d1d;
}

.reset-modal-confirm:hover {
  background: #b91c1c;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #7f1d1d;
}

@media (max-width: 480px) {
  .reset-modal-actions {
    flex-direction: column;
  }
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 600px) {
  .top-nav {
    padding: 8px 12px 2px;
  }

  .hero-header {
    padding: 2px 16px 6px;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 4px;
  }

  .hero-subtitle {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .stage-progress-header {
    margin-bottom: 6px;
    padding: 0 14px;
    gap: 5px;
  }

  .progress-pill,
  .settled-pill {
    padding: 3px 9px;
    font-size: 0.72rem;
  }

  .progress-track {
    height: 6px;
  }

  .stage-container {
    padding: 4px 14px 6px;
    min-height: 0;
    justify-content: center;
  }

  .debate-hero-art {
    min-height: 76px;
    margin-bottom: 8px;
  }

  .hero-art-img {
    max-height: 92px;
    width: auto;
    border-radius: 10px;
  }

  .debate-hero-svg svg {
    max-height: 92px;
    width: min(190px, 64vw);
  }

  .debate-question {
    font-size: 1.12rem;
    line-height: 1.28;
    margin-bottom: 10px;
  }

  .debate-options {
    gap: 8px;
  }

  .option-btn {
    padding: 10px 14px;
    min-height: 50px;
    border-radius: 12px;
  }

  .option-label {
    font-size: 0.94rem;
  }

  .decided-card {
    padding: 12px 14px;
    gap: 8px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .decided-heading {
    font-size: 0.78rem;
  }

  .decided-subtitle {
    font-size: 0.96rem;
  }

  .decided-bar {
    height: 22px;
  }

  .decided-stats {
    font-size: 0.78rem;
  }

  .stage-nav {
    margin: 2px auto 4px;
    padding: 4px 14px;
    gap: 12px;
  }

  .nav-btn {
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .debate-card:not(.has-photo-options) .option-btn {
    padding-inline: 8px;
    gap: 6px;
  }

  .summary-review {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "label" "picker" "pick" "action";
  }

  .summary-review .summary-btn-primary {
    justify-self: start;
  }
}

body:has(.summary-card) .hero-subtitle {
  display: none;
}

body:has(.summary-card) .stage-container {
  padding-bottom: 14px;
}

.top-nav .game-language ul {
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-height: 850px) {
  .top-nav {
    padding-block: 7px 2px;
  }

  .hero-header {
    padding-block: 3px 6px;
  }

  .hero-title {
    font-size: clamp(1.55rem, 5vw, 2.3rem);
    margin-bottom: 4px;
  }

  .hero-subtitle {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .stage-progress-header {
    margin-bottom: 5px;
    gap: 5px;
  }

  .stage-container {
    padding-block: 4px 7px;
  }

  .debate-hero-art {
    min-height: 0;
    margin-bottom: 6px;
  }

  .hero-art-img,
  .debate-hero-svg svg {
    max-height: clamp(48px, 12dvh, 92px);
  }

  .debate-question {
    margin-bottom: 8px;
  }

  .has-photo-options.is-voted .debate-options {
    margin-bottom: 8px;
  }

  .decided-card {
    padding-block: 9px;
    gap: 5px;
  }

  .decided-bar {
    height: 19px;
  }

  .stage-nav {
    margin-block: 0 4px;
    padding-block: 4px;
  }
}

@media (min-width: 601px) {
  .hero-header {
    max-width: 760px;
  }

  .hero-subtitle {
    max-width: none;
  }

  .debate-card:has(.debate-hero-art) {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(0, 2.6fr);
    gap: 9px 14px;
  }

  .debate-question,
  .decided-card {
    grid-column: 1 / -1;
  }

  .debate-card:has(.debate-hero-art) .debate-question {
    grid-row: 1;
    max-width: none;
    margin: 0;
  }

  .debate-card:has(.debate-hero-art) .debate-hero-art,
  .debate-card:has(.debate-hero-art) .debate-options {
    margin: 0;
  }

  .hero-art-img,
  .debate-hero-svg svg {
    max-width: 100%;
  }
}

@media (min-width: 601px) and (max-height: 680px) {
  .is-voted .option-photo {
    max-height: 62px;
  }

  .decided-subtitle {
    display: none;
  }
}

@media (max-height: 560px) {
  body:has(.debate-card.is-voted) .hero-subtitle,
  body:has(.summary-card) .stage-progress-header {
    display: none;
  }

  .summary-card {
    padding-block: 10px;
    gap: 8px;
  }

  .summary-stat-box,
  .summary-review {
    padding-block: 6px;
  }
}

@media (max-width: 600px) and (max-height: 560px) {
  .has-photo-options.is-voted .debate-hero-art,
  .decided-subtitle {
    display: none;
  }

  .is-voted .option-photo {
    max-height: 48px;
  }

  .debate-question {
    font-size: 1.04rem;
    line-height: 1.22;
  }

  .option-label {
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .summary-review {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label label" "picker picker" "pick action";
    align-items: center;
  }
}

@media (max-width: 600px) and (max-height: 520px) {
  .is-voted .option-photo {
    max-height: 38px;
  }
}

@media (min-width: 601px) and (max-height: 500px) {
  .hero-header {
    display: none;
  }

  .top-nav {
    margin-bottom: 4px;
  }

  .debate-card.has-photo-options.is-voted {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(150px, 1fr);
    gap: 6px 10px;
  }

  .has-photo-options.is-voted .debate-hero-art {
    display: none;
  }

  .debate-card.has-photo-options.is-voted .debate-question {
    grid-row: 1;
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .has-photo-options.is-voted .debate-options {
    margin: 0;
  }

  .has-photo-options.is-voted .decided-card {
    grid-column: 2;
  }

  .debate-card:not(.has-photo-options).is-voted {
    grid-template-columns: minmax(85px, 0.85fr) minmax(0, 3fr) minmax(115px, 1.25fr);
  }

  .debate-card:not(.has-photo-options).is-voted .decided-card {
    grid-column: 3;
  }

  .debate-card:not(.has-photo-options) .option-btn {
    min-height: 54px;
    padding: 6px;
    gap: 6px;
  }

  .debate-question {
    font-size: 1.12rem;
  }

  .hero-art-img,
  .debate-hero-svg svg {
    max-height: 80px;
  }

  .option-photo,
  .is-voted .option-photo {
    max-height: 48px;
  }

  .has-photo-options .option-label {
    min-height: 30px;
    font-size: 0.82rem;
  }

  .summary-title {
    font-size: 1.45rem;
  }
}

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