/* Match Math — Theme & Styles (Warm 3D Teaser Aesthetics) */
:root {
  --bg-warm-center: #fffbf5;
  --bg-warm-mid: #f6ebd9;
  --bg-warm-edge: #ebdbca;
  --surface-color: #ffffff;
  --text-main: #2b1f14;
  --text-muted: #8c7662;
  --accent-amber: #d97706;
  --accent-gold: #f59e0b;
  --accent-red: #e11d48;
  --sulfur-head: #a82020;

  /* Rich Pine / Balsa Wood tones */
  --wood-h-grad: linear-gradient(180deg, #ffe4be 0%, #f6c07d 30%, #e29548 70%, #ab5f1c 100%);
  --wood-v-grad: linear-gradient(90deg, #ffe4be 0%, #f6c07d 30%, #e29548 70%, #ab5f1c 100%);
  --wood-bevel: inset 0 1.5px 0.5px rgba(255, 255, 255, 0.8), inset 0 -1.5px 1px rgba(90, 40, 5, 0.25);
  --wood-bevel-v: inset 1.5px 0 0.5px rgba(255, 255, 255, 0.8), inset -1.5px 0 1px rgba(90, 40, 5, 0.25);
  --wood-shadow: 0 4px 10px rgba(100, 55, 15, 0.28), 0 1px 3px rgba(70, 35, 10, 0.2);

  /* Glossy Ruby Sulfur Head */
  --head-grad: radial-gradient(circle at 35% 28%, #ff8ea3 0%, #e81d3f 38%, #aa0920 75%, #54000d 100%);
  --head-shadow: 0 3px 6px rgba(140, 15, 30, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);

  /* Matchstick responsive dimensions - scaled up for tactile mobile touch */
  --digit-w: clamp(54px, 15.5vw, 82px);
  --digit-h: clamp(100px, 29vw, 150px);
  --op-w: clamp(38px, 11vw, 56px);
  --seg-len: clamp(44px, 12.8vw, 66px);
  --seg-thick: clamp(9px, 2.7vw, 13px);
  --head-size: clamp(13px, 3.8vw, 18px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, var(--bg-warm-center) 0%, var(--bg-warm-mid) 60%, var(--bg-warm-edge) 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

::selection {
  background: transparent;
}

::-moz-selection {
  background: transparent;
}

#game-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: calc(var(--sat) + 12px) 16px calc(var(--sab) + 16px);
  position: relative;
}

/* --- Header HUD --- */
#game-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 4px 4px 8px;
  margin-bottom: 4px;
  position: relative;
  min-height: 64px;
}

/* Left spacer leaves room for native iOS back button */
.hud-nav-spacer {
  width: 52px;
  height: 40px;
  flex-shrink: 0;
}

/* Center column: strictly centered in the viewport */
.hud-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  width: max-content;
  pointer-events: none;
}

.level-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-weight: 800;
  font-size: 1.42rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.level-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-amber);
  letter-spacing: 0.8px;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-color);
  padding: 5px 14px;
  border-radius: 18px;
  border: 1px solid rgba(220, 200, 175, 0.55);
  box-shadow: 0 4px 12px rgba(130, 80, 30, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03);
}

.task-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.task-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.moves-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fbf8f3;
  border: 1px solid rgba(220, 200, 175, 0.4);
  padding: 3px 8px;
  border-radius: 12px;
}

.move-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.move-dot.active {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.move-dot.used {
  background: #d6cfc7;
}

.moves-count-text {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Right column: Stars on top, Refresh button underneath */
.hud-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 6px;
  flex-shrink: 0;
  min-width: 52px;
  z-index: 5;
}

.stars-counter {
  font-size: 0.96rem;
  font-weight: 800;
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 11px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(220, 200, 175, 0.55);
  background: var(--surface-color);
  color: var(--text-main);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(130, 80, 30, 0.08), 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.icon-btn:active:not(:disabled) {
  transform: scale(0.92);
  background: #f2eae0;
}

.icon-btn.pulse-attention {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.8) !important;
  animation: pulse-reset-btn 1.1s infinite ease-in-out;
}


@keyframes pulse-reset-btn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); box-shadow: 0 0 20px rgba(245, 158, 11, 0.9); }
}




/* --- Main Board Container --- */
#board-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 230px;
}

.board-feedback {
  position: absolute;
  top: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #44403c;
  background: rgba(255, 255, 255, 0.96);
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 20;
}

.board-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.board-feedback.success {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.board-feedback.error {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

/* --- Matchstick Board & Grid (Tactile Wooden/Clay Tray) --- */
.match-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 16px);
  padding: clamp(20px, 5vw, 32px) clamp(12px, 3.5vw, 24px);
  background: radial-gradient(circle at 50% 25%, #ffffff 0%, #fdf8f0 55%, #f6ecd8 100%);
  border-radius: clamp(24px, 6vw, 36px);
  border: 2px solid rgba(225, 200, 170, 0.7);
  box-shadow: 0 20px 48px rgba(150, 100, 50, 0.16), 0 6px 16px rgba(150, 100, 50, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.95);
  touch-action: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.match-board.shake-error {
  animation: board-shake-anim 0.45s ease-in-out;
  border-color: rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 0 26px rgba(239, 68, 68, 0.35) !important;
}

@keyframes board-shake-anim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.equation-item {
  position: relative;
  flex-shrink: 0;
}

.item-digit {
  width: var(--digit-w);
  height: var(--digit-h);
}

.item-op, .item-equals {
  width: var(--op-w);
  height: var(--digit-h);
}

/* Slot segment geometry inside 7-segment digit */
.match-slot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Horizontal segments (with generous touch padding) */
.match-slot.horizontal {
  width: var(--seg-len);
  height: calc(var(--seg-thick) + 20px);
}

/* Vertical segments (with generous touch padding) */
.match-slot.vertical {
  width: calc(var(--seg-thick) + 20px);
  height: var(--seg-len);
}

/* Specific segment positions in digit */
.seg-a {
  top: -5px;
  left: calc((var(--digit-w) - var(--seg-len)) / 2);
}

.seg-b {
  top: 4px;
  right: -5px;
}

.seg-c {
  bottom: 4px;
  right: -5px;
}

.seg-d {
  bottom: -5px;
  left: calc((var(--digit-w) - var(--seg-len)) / 2);
}

.seg-e {
  bottom: 4px;
  left: -5px;
}

.seg-f {
  top: 4px;
  left: -5px;
}

.seg-g {
  top: calc(50% - (var(--seg-thick) + 20px) / 2);
  left: calc((var(--digit-w) - var(--seg-len)) / 2);
}

/* Operator (+, -) slots */
.item-op .seg-h {
  top: calc(50% - (var(--seg-thick) + 20px) / 2);
  left: calc((var(--op-w) - var(--seg-len)) / 2);
}

.item-op .seg-v {
  top: calc((var(--digit-h) - var(--seg-len)) / 2);
  left: calc(50% - (var(--seg-thick) + 20px) / 2);
}

/* Equals (=) slots */
.item-equals .seg-top {
  top: calc(50% - var(--seg-thick) - 14px);
  left: calc((var(--op-w) - var(--seg-len)) / 2);
}

.item-equals .seg-bottom {
  top: calc(50% + 5px);
  left: calc((var(--op-w) - var(--seg-len)) / 2);
}

/* --- Matchstick Appearance (Rich 3D Timber & Glossy Red Sulfur) --- */
.matchstick {
  position: relative;
  display: flex;
  border-radius: 4px;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, filter 0.18s ease;
}

.matchstick.horiz {
  width: var(--seg-len);
  height: var(--seg-thick);
  flex-direction: row;
}

.matchstick.vert {
  width: var(--seg-thick);
  height: var(--seg-len);
  flex-direction: column;
}

/* Match body with 3D bevel and rich pine wood gradient */
.matchstick .match-body {
  flex: 1;
  border-radius: 3.5px;
}

.matchstick.horiz .match-body {
  height: 100%;
  background: var(--wood-h-grad);
  box-shadow: var(--wood-bevel), var(--wood-shadow);
}

.matchstick.vert .match-body {
  width: 100%;
  background: var(--wood-v-grad);
  box-shadow: var(--wood-bevel-v), var(--wood-shadow);
}


/* Glossy ruby sulfur head */
.matchstick .match-head {
  flex-shrink: 0;
  position: relative;
  border-radius: 7px;
  background: var(--head-grad);
  box-shadow: var(--head-shadow);
  overflow: hidden;
}

/* 3D Specular glossy reflection on top-left of the sulfur head */
.matchstick .match-head::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.3) 55%, transparent 100%);
  pointer-events: none;
}

/* Head orientation rules */
.matchstick.head-right .match-head {
  order: 2;
  width: var(--head-size);
  height: calc(var(--seg-thick) + 2px);
  margin-top: -1px;
  margin-left: -2px;
}

.matchstick.head-left .match-head {
  order: 0;
  width: var(--head-size);
  height: calc(var(--seg-thick) + 2px);
  margin-top: -1px;
  margin-right: -2px;
}

.matchstick.head-top .match-head {
  order: 0;
  height: var(--head-size);
  width: calc(var(--seg-thick) + 2px);
  margin-left: -1px;
  margin-bottom: -2px;
}

.matchstick.head-bottom .match-head {
  order: 2;
  height: var(--head-size);
  width: calc(var(--seg-thick) + 2px);
  margin-left: -1px;
  margin-top: -2px;
}

/* Fixed non-movable equals match */
.fixed-match .matchstick .match-head {
  background: radial-gradient(circle at 35% 28%, #ff8299 0%, #d81837 40%, #94071b 75%, #46000a 100%);
}

/* --- Empty Placeholder Slot (Debossed Table Grooves) --- */
.matchstick.empty {
  opacity: 0.85;
  background: rgba(185, 145, 105, 0.14);
  box-shadow: inset 0 2px 4px rgba(110, 70, 30, 0.16), inset 0 -1px 1px rgba(255, 255, 255, 0.55);
  border: 1.5px dashed rgba(180, 130, 80, 0.4);
  border-radius: 4.5px;
}

.matchstick.empty .match-head,
.matchstick.empty .match-body {
  display: none;
}

.target-badge {
  display: none;
  position: absolute;
  width: 18px;
  height: 18px;
  background: #f59e0b;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 8px #f59e0b;
  pointer-events: none;
  z-index: 5;
}

.target-badge::before {
  content: '+';
}

/* ========================================================
   HIGHLIGHTING: SELECTED MATCH & CANDIDATE EMPTY SLOTS
   ======================================================== */

/* Selected Matchstick: Levitates and glows with magical flame trail */
.match-slot.is-selected {
  z-index: 20;
}

.matchstick.is-selected-match {
  transform: scale(1.18) translateY(-8px) rotate(-3.5deg);
  filter: drop-shadow(0 12px 20px rgba(130, 70, 15, 0.38)) drop-shadow(0 0 16px rgba(245, 158, 11, 0.85)) drop-shadow(0 -4px 12px rgba(239, 68, 68, 0.75));
  animation: pulse-selected-match 1.25s infinite ease-in-out;
}

.matchstick.is-selected-match .match-body {
  background: linear-gradient(135deg, #fff3d6 0%, #fbbf24 45%, #d97706 100%) !important;
}

@keyframes pulse-selected-match {
  0%, 100% {
    transform: scale(1.16) translateY(-8px) rotate(-3.5deg);
    filter: drop-shadow(0 12px 20px rgba(130, 70, 15, 0.38)) drop-shadow(0 0 16px rgba(245, 158, 11, 0.85)) drop-shadow(0 -4px 12px rgba(239, 68, 68, 0.75));
  }
  50% {
    transform: scale(1.22) translateY(-11px) rotate(-2deg);
    filter: drop-shadow(0 16px 26px rgba(130, 70, 15, 0.45)) drop-shadow(0 0 24px rgba(251, 191, 36, 0.95)) drop-shadow(0 -6px 16px rgba(239, 68, 68, 0.9));
  }
}

/* Candidate Empty Slots (Where match CAN be moved):
   Vibrant glowing golden-amber outline with animated badge! */
.match-slot.drop-candidate .matchstick.empty {
  opacity: 0.98;
  background: rgba(245, 158, 11, 0.22);
  border: 2px dashed #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.75), inset 0 0 8px rgba(245, 158, 11, 0.45);
  animation: pulse-candidate-slot 1.3s infinite ease-in-out;
}

.match-slot.drop-candidate .target-badge {
  display: block;
  animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pulse-candidate-slot {
  0%, 100% {
    transform: scale(1);
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  }
  50% {
    transform: scale(1.08);
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.9), 0 0 6px #ef4444;
  }
}

@keyframes badge-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* Hover / Magnetic Snap on target slot */
.match-slot.magnetic-target .matchstick.empty {
  transform: scale(1.22);
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.28) !important;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.95) !important;
}

.match-slot.magnetic-target .target-badge {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

/* Dragging match */
.dragging-match {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  transform: scale(1.22) rotate(4deg);
  box-shadow: 0 18px 36px rgba(120, 60, 10, 0.4), 0 0 18px #f59e0b;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
}


/* Hint pulse */
.hint-pulse .matchstick {
  animation: hint-glow 0.8s 3 ease-in-out;
}

@keyframes hint-glow {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 4px rgba(80, 50, 20, 0.22); }
  50% { transform: scale(1.24); box-shadow: 0 0 22px #f59e0b, 0 0 8px #ef4444; }
}

/* Sparkle particles on solve */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.fx-layer[hidden] {
  display: none !important;
}

.sparkle-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #fbbf24 60%, #ef4444 100%);
  box-shadow: 0 0 8px #f59e0b;
  animation: spark-fly 0.9s forwards ease-out;
}

@keyframes spark-fly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.2);
  }
}

/* --- Footer Guide (Fixed Height to Prevent Layout Shift) --- */
#guide-footer {
  text-align: center;
  padding: 8px 16px calc(var(--sab) + 8px);
  margin-top: auto;
  min-height: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

#hint-copy {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.25;
  transition: color 0.2s ease;
}

#hint-copy.guide-active {
  color: #92400e;
  font-weight: 700;
}





/* --- Campaign Overlays --- */
#level-complete,
#level-failed,
.campaign-overlay {
  display: none !important;
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 5, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.28s ease;
}

#level-complete.show-overlay,
#level-failed.show-overlay,
.campaign-overlay.show-overlay {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


.campaign-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: scale(0.9);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}


.campaign-overlay.victory-ready .campaign-card {
  transform: scale(1);
}

.victory-icon-wrap {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  background: #fef3c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.victory-flame {
  font-size: 32px;
}

.campaign-eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-amber);
  text-transform: uppercase;
  margin-bottom: 6px;
}


.failed-card {
  padding: 30px 24px 24px;
}

.failed-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1c1917;
  margin: 0 0 12px 0;
  letter-spacing: -0.2px;
}

.failed-eq {
  font-size: 1.25rem;
  font-weight: 800;
  color: #c2410c;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 12px;
  padding: 8px 18px;
  display: inline-block;
  margin: 0 0 10px 0;
  letter-spacing: 1px;
}

.failed-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: #78716c;
  margin: 0 0 22px 0;
}



.campaign-stars {
  font-size: 2.2rem;
  color: #f59e0b;
  letter-spacing: 6px;
  margin-bottom: 8px;
  text-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.campaign-total {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.campaign-total span {
  color: var(--accent-amber);
}

.campaign-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 24px;
  border-radius: 18px;
  border: none;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #ffffff;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  margin-bottom: 8px;
}

.campaign-button:active {
  transform: scale(0.97);
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}


.campaign-button.campaign-button-secondary,
#leaders-btn {
  background: #ffffff none !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #292524 !important;
  border: 1.5px solid #e7e5e4 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  font-size: 1.02rem !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
}

.campaign-button.campaign-button-secondary:active,
#leaders-btn:active {
  background: #f5f5f4 none !important;
  background-color: #f5f5f4 !important;
  background-image: none !important;
  transform: scale(0.97) !important;
  box-shadow: none !important;
}




/* Confetti */
.victory-confetti[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.victory-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1999;
  overflow: hidden;
}


.confetti-piece {
  position: absolute;
  top: -10px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: confetti-fall 1.4s forwards ease-in;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(105vh) translateX(var(--drift)) rotate(540deg);
  }
}
