/* ═══════════════════════════════════════════════════════════════════
   GELATOMAPS PREMIUM VOTING EXPERIENCE
   Mobile-first responsive design with premium animations
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ══════════════════════════════════════════════════════════════
     VOTAR.CSS — OVERRIDES DE TEMA CLARO
     votar.html usa tema cream/light, distinto al dark global.
     Los tokens de design-tokens.css se sobreescriben aquí donde
     el contexto semántico difiere (ej. --bg pasa de oscuro a cream).

     Convenio: los valores con EXACT MATCH a design-tokens.css
     usan var(--token, fallback). Únicos locales se documentan.
     ══════════════════════════════════════════════════════════════ */

  /* ── Fondos (light/cream theme) ── */
  --bg:      var(--color-bg-warm, #FFF8F0);    /* cream cálido — override del dark --bg */
  --bg-card: var(--color-white, #FFFFFF);       /* cards blancas */
  --cream:   var(--color-cream-warm, #FFF5E6);  /* cream secundario */

  /* ── Texto sobre fondos claros ── */
  --dark:  #1A1A2E;                              /* texto principal (deep navy) */
  --mid:   var(--color-text-3, #6B7280);         /* texto secundario — EXACTO */
  --light: #D1D5DB;                              /* bordes suaves */

  /* ── Sabores / identidad de marca ── */
  --chocolate:       var(--color-chocolate, #4A2C1A);       /* chocolate oscuro */
  --chocolate-light: var(--color-chocolate-light, #8B5E34); /* chocolate medio */
  /* WCAG AA fix: #C68B4D → #96693a (4.55:1 sobre cream, was 2.77) */
  --caramel:         var(--sabor-dulce_leche, #96693a);
  /* WCAG AA fix: #FF6B6B → #ee6464 (3.00:1 sobre cream, was 2.63 — large text) */
  --coral:           var(--color-coral, #ee6464);

  /* ── Acento principal ── */
  /* WCAG AA fix: #0D9488 → #0b8177 (4.51:1 sobre cream, was 3.55) */
  --teal:       var(--color-accent, #0b8177);
  --teal-light: var(--color-accent-light, #5EEAD4);

  /* ── Semánticos — referencias EXACTAS a design-tokens.css ── */
  /* WCAG AA fix: #F59E0B → #c88109 (3.02:1 sobre cream, was 2.04 — large text OK) */
  --amber: var(--color-gold, #c88109);
  /* WCAG AA fix: #16A34A → #11843c (4.54:1 sobre cream, was 3.13) */
  --green: var(--color-success, #11843c);
  --red:   var(--color-error, #DC2626);    /* error EXACTO */

  /* ── Gold puro — DragCream badges únicamente ──
     NOTA: #FFD700 (oro puro) ≠ #F59E0B (amber). Son distintos.
     El badge DragCream requiere el oro brillante clásico. */
  --gold: var(--color-gold-pure, #FFD700);

  /* ── Sombras — alineadas con design-tokens.css --sh-* ── */
  --shadow-sm: var(--sh-sm, 0 1px 3px rgba(0,0,0,.08));
  --shadow-md: var(--sh-md, 0 4px 12px rgba(0,0,0,.1));
  --shadow-lg: var(--sh-lg, 0 8px 32px rgba(0,0,0,.12));
  --shadow-xl: var(--sh-xl, 0 20px 50px rgba(0,0,0,.15));

  /* ── Border radius ──
     --radius-sm (8px) = design-tokens --radius-sm — NO redefinir.
     --radius-md aquí es 16px ≠ design-tokens --radius-md (12px): override local. */
  --radius-md:   16px;    /* local: voting cards usan 16px */
  --radius-lg:   24px;    /* matches --radius-xl en design-tokens */
  --radius-full: 999px;   /* matches --radius-pill */

  /* ── Tipografía — NO redefinir, ya en design-tokens.css ──
     Disponibles globalmente: var(--font-display), var(--font-body) */

  /* ── Timing de transiciones ── */
  --transition-fast:   150ms cubic-bezier(.4,0,.2,1);
  --transition-normal: 300ms cubic-bezier(.4,0,.2,1);
  --transition-slow:   500ms cubic-bezier(.4,0,.2,1);
}

/* ─── Global Styles ─── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Eliminate 300ms tap delay on all interactive elements */
button, [role="button"], a, input, select, textarea, label {
  touch-action: manipulation;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

/* Selection color */
::selection {
  background-color: var(--chocolate);
  color: white;
}

/* Scrollbar styling (webkit) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--light);
  border-radius: var(--radius-full);
}

/* ─── Container & Layout ─── */
#votar-container {
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--color-bg-warm, #FFFAF5) 100%);
  position: relative;
  overflow: hidden;
}

.votar-state {
  width: 100%;
  max-width: 480px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  /* Safe-area + forced 16px bottom breathing room so buttons never get clipped */
  padding: env(safe-area-inset-top, 0px)
           env(safe-area-inset-right, 0px)
           max(env(safe-area-inset-bottom, 0px), 16px)
           env(safe-area-inset-left, 0px);
  animation: slideUp var(--transition-normal) ease-out;
  transition: opacity var(--transition-normal) ease-out;
  opacity: 1;
  /* Scroll within state if content overflows — container overflow:hidden remains for animations */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.votar-state.hidden {
  display: none;
  opacity: 0;
}

.votar-state.leaving {
  animation: slideDown var(--transition-normal) ease-in;
  opacity: 0;
}

/* ─── Header Section ─── */
.votar-header {
  width: 100%;
  position: relative;
  padding: 16px 20px;
  text-align: center;
}

.votar-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.votar-header p {
  font-size: 13px;
  color: var(--mid);
  font-weight: 500;
}

.step-indicator {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-teal-muted-a12) 0%, var(--color-teal-muted-a06) 100%);
  color: var(--teal);
  padding: 6px 14px;
  border: 1px solid var(--color-teal-muted-a20);
  border-radius: var(--radius-full);
  font-weight: 700;
  margin-top: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

/* DragCream Metallic Badges */
.dragcream-score-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-gold-pure, #FFD700) 0%, var(--color-gold-pure-mid, #FFC700) 50%, var(--color-gold-pure-dark, #FFB700) 100%);
  background-size: 200% 100%;
  color: var(--color-chocolate-text, #6B3F00);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px var(--color-gold-pure-a30), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 2px rgba(0,0,0,0.1);
  animation: badgeShimmer 2s ease-in-out infinite;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

@keyframes badgeShimmer {
  0%, 100% {
    background-position: 0% 0%;
    box-shadow: 0 4px 12px var(--color-gold-pure-a30), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 2px rgba(0,0,0,0.1);
  }
  50% {
    background-position: 100% 0%;
    box-shadow: 0 6px 16px var(--color-gold-pure-a40), inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 2px rgba(0,0,0,0.15);
  }
}

/* Score Level Labels — 1/2/3 Bolas */
.dragcream-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--color-accent-a18) 0%, rgba(94, 234, 212, 0.08) 100%);
  border: 1px solid var(--color-accent-a30);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  color: var(--teal);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  transition: all 280ms ease-out;
  cursor: default;
}

.dragcream-level-badge.active {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  color: white;
  border-color: var(--teal);
  box-shadow: 0 4px 12px var(--color-accent-a30), inset 0 1px 0 rgba(255,255,255,0.3);
  animation: badgePulse 600ms ease-out;
}

@keyframes badgePulse {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Content Area ─── */
.votar-content {
  flex: 1;
  min-height: 0; /* allows flex item to shrink below content size — critical for button positioning */
  width: 100%;
  padding: 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.votar-content::-webkit-scrollbar {
  width: 4px;
}

/* ─── Loading State ─── */
#votar-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loader {
  width: 48px;
  height: 48px;
  border: 3px solid var(--light);
  border-top-color: var(--chocolate);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

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

#votar-loading p {
  color: var(--mid);
  font-size: 14px;
  font-weight: 500;
}

/* ─── Landing Screen (redesigned) ─── */

/* The landing state is a flex column — scroll area grows, CTA stays at bottom */
#votar-landing {
  background: linear-gradient(160deg, var(--color-bg-sheet, #FEFCF9) 0%, var(--color-bg-smoke, #F7F3ED) 100%);
  animation: slideInHorizontal 300ms ease-out;
}

#votar-flavor-select {
  animation: slideInHorizontal 300ms ease-out;
}

#votar-dragcream {
  animation: slideInHorizontal 300ms ease-out;
}

#votar-descriptors {
  animation: slideInHorizontal 300ms ease-out;
}

#votar-celebration {
  animation: slideInHorizontal 300ms ease-out;
}

#votar-success {
  animation: slideInHorizontal 300ms ease-out;
}

.landing-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 44px 24px 20px;
}

/* Hero */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  width: 100%;
}

.landing-avatar-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg-parchment, #F0EBE3);
  border: 2.5px solid rgba(15,123,108,0.18);
  box-shadow: 0 4px 18px rgba(0,0,0,0.11);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  position: relative;
  flex-shrink: 0;
}

.shop-image-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shop-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  position: absolute;
  inset: 0;
  background: var(--color-bg-parchment, #F0EBE3);
}

.landing-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--color-text-deep, #0F172A);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.landing-addr {
  font-size: 13px;
  color: var(--color-text-2, #374151);
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green);
  color: white;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.verified-badge.hidden {
  display: none;
}

/* Steps row */
.landing-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  padding: 18px 12px;
  background: rgba(255,255,255,0.75);
  border-radius: 18px;
  border: 1px solid rgba(15,123,108,0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.landing-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.landing-step-icon {
  font-size: 22px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.landing-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted-blue, #3D4A55);
  text-align: center;
  line-height: 1.35;
}

.landing-arrow {
  font-size: 20px;
  color: var(--teal);
  flex-shrink: 0;
  font-weight: 300;
  opacity: 0.5;
}

/* CTA — always anchored at bottom, never inside scroll area */
.landing-cta {
  flex-shrink: 0;
  padding: 8px 20px max(env(safe-area-inset-bottom, 0px), 20px);
  background: linear-gradient(180deg, rgba(254,252,249,0) 0%, rgba(247,243,237,0.97) 28%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Trust pill — "Tu voto es real · Cuenta para el ranking" */
.landing-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--color-teal-muted-a08);
  border: 1px solid rgba(15,123,108,0.18);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.2px;
}

.votar-btn-landing {
  width: 100%;
  margin: 0;
  height: 56px;
  min-height: 56px;
  font-size: 16px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15,123,108,0.28);
}

/* ─── Flavor Selection Screen — Dark premium (matches DragCream demo) ─── */
#votar-flavor-select {
  background: linear-gradient(170deg, #070E1B 0%, #0C1A2E 40%, #0F2035 100%);
}

#votar-flavor-select .votar-header {
  background: transparent;
  padding-top: 52px;
}

#votar-flavor-select .votar-header h2 {
  color: var(--color-white, #fff);
  font-size: 22px;
  font-weight: 800;
}

#votar-flavor-select .votar-header p {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  font-weight: 500;
}

/* DragCream branding tag inside flavor header */
.fs-dragcream-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--amber);
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 8px;
  display: block;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  animation: slideUp 300ms ease-out;
}

#votar-flavor-select .votar-content {
  background: transparent;
  padding: 4px 16px 16px;
}

/* 3-column dark card grid matching DragCream demo */
#votar-flavor-select .flavor-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

#votar-flavor-select .flavor-card {
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 14px 6px 12px;
  min-height: 100px;
  gap: 8px;
  transition: all 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

#votar-flavor-select .flavor-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 280ms ease-out;
  pointer-events: none;
}

#votar-flavor-select .flavor-card:hover {
  border-color: var(--color-gold-b30);
  background: var(--color-gold-b08);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

#votar-flavor-select .flavor-card:hover::before {
  opacity: 1;
}

#votar-flavor-select .flavor-card:active {
  border-color: rgba(245,158,11,0.5);
  background: var(--color-gold-b12);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

#votar-flavor-select .flavor-dot {
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35), inset 0 -4px 8px rgba(0,0,0,0.15), inset 0 4px 8px rgba(255,255,255,0.12);
}

#votar-flavor-select .flavor-name {
  color: var(--color-white, #fff);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Vote count under name */
#votar-flavor-select .flavor-votes {
  font-size: 11px;
  color: rgba(255,255,255,0.22);
  font-weight: 500;
}

/* Back button on dark screen */
#votar-flavor-select > .votar-btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-weight: 600;
  margin: 0 20px 24px;
  width: calc(100% - 40px);
}

/* Legacy selectors kept for safety but no longer used in landing */
.shop-image {
  display: none;
}

.landing-description p {
  font-size: 14px;
  color: var(--teal);
  font-weight: 500;
}

.step-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast) ease-out;
}

.step-item:hover {
  border-color: var(--chocolate-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.step-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--chocolate) 0%, var(--chocolate-light) 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
}

.step-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--dark);
  text-align: center;
}

/* ─── Flavor Selection Screen (NEW) ─── */
.flavor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.flavor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 2px solid var(--light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast) ease-out;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  min-height: 120px;
}

.flavor-card:active {
  transform: scale(0.95);
}

.flavor-card:hover {
  border-color: var(--chocolate-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.flavor-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 -2px 4px rgba(0,0,0,0.1);
  background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, transparent 60%);
  background-blend-mode: overlay;
}

.flavor-name {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

/* ─── Dragcream™ Screen (NEW) ─── */
.dragcream-state {
  flex-direction: column;
  padding: 0;
}

.dragcream-state:not(.hidden) {
  display: flex;
}

.dragcream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(15, 123, 108, 0.05) 0%, rgba(15, 123, 108, 0.02) 100%);
  border-bottom: 1px solid var(--color-teal-muted-a10);
  gap: 16px;
}

.dragcream-header h2 {
  flex: 1;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  text-align: center;
  letter-spacing: -0.5px;
}

.dragcream-back-btn,
.dragcream-mute-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast) ease-out;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.dragcream-back-btn:active,
.dragcream-mute-btn:active {
  transform: scale(0.9);
}

.dragcream-back-btn:hover,
.dragcream-mute-btn:hover {
  box-shadow: var(--shadow-md);
  background: white;
}

.dragcream-canvas-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 400px;
  background: linear-gradient(180deg, rgba(15, 123, 108, 0.03) 0%, rgba(15, 123, 108, 0.01) 100%);
  overflow: hidden;
}

.dragcream-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.dragcream-canvas:active {
  cursor: grabbing;
}

.dragcream-score-display {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 245, 240, 0.95) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-teal-muted-a20);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
  font-family: 'Tabular Nums', var(--font-body);
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  pointer-events: none;
  transition: all 300ms ease-out;
  letter-spacing: -1px;
  border: 1px solid var(--color-teal-muted-a10);
  transition: all 0.3s ease-out;
}

/* Drag hint overlay */
.dragcream-hint {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.5s ease-out;
  z-index: 5;
}

.dragcream-hint.fade-out {
  opacity: 0;
}

.dragcream-hint-arrow {
  font-size: 32px;
  color: var(--teal);
  animation: hintBounce 1.5s ease-in-out infinite;
}

.dragcream-hint-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  text-align: center;
  white-space: nowrap;
}

@keyframes hintBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Ice fracture lock effect */
.dragcream-score-display.frost-locked {
  background: var(--color-sky-bg);
  border-color: var(--color-sky-a50);
  box-shadow: 0 0 20px var(--color-sky-a30), var(--shadow-lg);
  text-shadow: 0 0 8px var(--color-sky-a60);
  transform: scale(1.15);
  animation: frostPulse 0.7s ease-out;
}

.dragcream-score-display.frost-locked #dragcream-score-value {
  color: var(--teal);
}

@keyframes frostPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(100,200,255,0); }
  30% { transform: scale(1.2); box-shadow: 0 0 30px var(--color-sky-a50); }
  100% { transform: scale(1.15); box-shadow: 0 0 20px var(--color-sky-a30); }
}

.dragcream-confirm-btn {
  margin: 0 20px 20px 20px;
  min-height: 52px;
}

.dragcream-confirm-btn.hidden {
  display: none;
}

/* ─── Gauge Interaction Screen (OLD) ─── */
.gauge-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.trail-canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.gauge-svg {
  width: 100%;
  height: auto;
  max-width: 320px;
  filter: drop-shadow(var(--shadow-sm));
  touch-action: none;
  cursor: grab;
}

.gauge-svg:active {
  cursor: grabbing;
}

.gauge-score {
  font-family: 'Tabular Nums', var(--font-body);
  font-size: 56px;
  font-weight: 700;
  fill: var(--dark);
  text-anchor: middle;
  user-select: none;
}

.gauge-label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  fill: var(--teal);
  text-anchor: middle;
  user-select: none;
}

/* Ice cream scoop */
.ice-cream-scoop {
  position: absolute;
  width: 50px;
  height: 50px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, var(--chocolate) 0%, var(--chocolate-light) 100%);
  box-shadow: 0 4px 12px rgba(74, 44, 26, 0.25);
  opacity: 0;
  transition: opacity var(--transition-fast) ease-out;
  pointer-events: none;
  animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); }
  50% { transform: translate(-50%, -50%) rotate(2deg); }
}

.gauge-feedback {
  text-align: center;
  padding: 16px;
  background: var(--color-teal-muted-a08);
  border-radius: var(--radius-md);
}

.feedback-text {
  font-size: 14px;
  color: var(--teal);
  font-weight: 500;
  margin: 0;
}

/* ─── Decision Screen ─── */
.decision-text {
  font-size: 15px;
  color: var(--mid);
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

.decision-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 0;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1px solid rgba(197, 139, 77, 0.1);
  transition: all var(--transition-fast) ease-out;
}

.benefit-item:hover {
  border-color: var(--caramel);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.benefit-icon {
  font-size: 28px;
}

.benefit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
}

/* ─── Star Rating ─── */
.rating-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rating-category {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast) ease-out;
}

.rating-category:hover {
  border-color: var(--chocolate-light);
  box-shadow: var(--shadow-sm);
}

.rating-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-category-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.rating-category-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal);
  min-width: 24px;
  text-align: right;
}

.rating-stars-wrapper {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.star-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast) ease-out;
  color: var(--light);
}

.star-btn:active {
  transform: scale(0.85);
}

.star-btn svg,
.star-svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 0 transparent);
  transition: all var(--transition-fast) ease-out;
}

.star-btn.active {
  color: var(--gold);
}

.star-btn.active svg {
  filter: drop-shadow(0 2px 4px var(--color-gold-pure-a40));
  animation: starPop var(--transition-fast) ease-out;
}

@keyframes starPop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ─── Form Inputs ─── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.votar-textarea,
.votar-input {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--dark);
  transition: all var(--transition-fast) ease-out;
  width: 100%;
  resize: none;
}

.votar-textarea {
  min-height: 100px;
  line-height: 1.5;
}

.votar-input {
  height: 44px;
}

.votar-textarea:focus,
.votar-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--color-teal-muted-a10);
}

.votar-textarea::placeholder,
.votar-input::placeholder {
  color: var(--light);
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--mid);
  font-weight: 500;
}

/* ─── Streak Banner — Premium Gradient & Animation ─── */
.streak-banner {
  background: linear-gradient(90deg, var(--color-streak-from, #FF6B35) 0%, var(--color-streak-mid, #FF8C42) 50%, var(--color-streak-to, #FFB84D) 100%);
  background-size: 200% 100%;
  animation: streakShimmer 3s ease-in-out infinite;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}

.streak-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.05) 2px,
    rgba(255,255,255,0.05) 4px
  );
  pointer-events: none;
}

@keyframes streakShimmer {
  0%, 100% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
}

.streak-flame {
  font-size: 24px;
  line-height: 1;
  animation: flameFlicker 1.5s ease-in-out infinite;
  flex-shrink: 0;
  text-shadow: 0 2px 8px rgba(255, 107, 53, 0.5);
}

.streak-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.streak-title {
  font-weight: 800;
  font-size: 15px;
  margin: 0 0 4px 0;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.streak-count {
  font-family: 'Tabular Nums', var(--font-body);
  font-weight: 700;
  font-size: 13px;
  opacity: 0.95;
}

.streak-count-number {
  display: inline-block;
  animation: countPulse 1.5s ease-in-out infinite;
}

/* ─── Buttons ─── */
.votar-btn {
  width: calc(100% - 40px); /* 100% minus left+right margins (20px each) */
  height: 52px;
  min-height: 52px; /* guarantee tap target on mobile */
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  touch-action: manipulation; /* no double-tap delay on mobile */
  cursor: pointer;
  transition: all var(--transition-fast) ease-out;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  margin: 0 20px;
}

.votar-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.votar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.votar-btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  background-size: 200% 100%;
  color: white;
  box-shadow: 0 6px 20px var(--color-teal-muted-a30), inset 0 1px 0 rgba(255,255,255,0.2);
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.votar-btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 28px rgba(15, 123, 108, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(-2px);
  background-position: 100% 0%;
}

.votar-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.votar-btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
  font-weight: 700;
  transition: all 280ms ease-out;
}

.votar-btn-secondary:hover:not(:disabled) {
  background: var(--color-teal-muted-a08);
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(15, 123, 108, 0.15);
  transform: translateY(-2px);
}

.votar-btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
}

.votar-buttons-row {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 0 20px 20px 20px;
}

.votar-buttons-row .votar-btn {
  flex: 1;
  margin: 0;
}

/* ─── Success / Celebration Screen ─── */
#votar-celebration {
  background: linear-gradient(180deg, var(--bg) 0%, #FFFAF5 100%);
}

.success-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 20px;
  text-align: center;
  animation: slideUp 300ms ease-out;
}

.success-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Vote Emblem Container — Celebración */
.vote-emblem {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(253,252,248,0.98) 0%, rgba(253,252,248,0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: emblemBounce 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-delay: 100ms;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), inset 0 -4px 12px rgba(0,0,0,0.06);
  position: relative;
  margin: 0 auto;
}

.vote-emblem.glow {
  animation: emblemGlow 2s ease-in-out infinite;
}

.vote-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

/* Fallback emblem (emoji o icono) */
.vote-emblem-icon {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

.success-checkmark {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, #12a049 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: successPop var(--transition-slow) cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 12px 40px rgba(22, 163, 74, 0.35), inset 0 1px 0 rgba(255,255,255,0.4);
}

.success-checkmark::after {
  content: '✓';
  font-size: 52px;
  color: white;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--dark);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
  animation: slideUp 300ms ease-out 150ms both;
}

.success-subtitle {
  font-size: 15px;
  color: var(--mid);
  line-height: 1.6;
  margin: 0;
  max-width: 300px;
  animation: slideUp 300ms ease-out 200ms both;
}

/* Score Display — Celebration */
.celebration-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: rgba(15, 123, 108, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 123, 108, 0.15);
  animation: slideUp 300ms ease-out 250ms both;
}

.celebration-score-value {
  font-family: 'Tabular Nums', var(--font-body);
  font-size: 48px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -2px;
}

.celebration-score-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Loyalty Section ─── */
.loyalty-section {
  animation: slideUp var(--transition-normal) ease-out;
}

.loyalty-section.hidden {
  display: none;
}

.loyalty-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--cream) 0%, #FFFAF5 100%);
  border: 2px solid var(--caramel);
  border-radius: var(--radius-lg);
  margin: 20px 0;
}

.loyalty-stamp-visual {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--amber) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
  animation: pulse var(--transition-slow) ease-in-out infinite;
}

.loyalty-stamp-visual::before {
  content: '★';
  color: white;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.loyalty-content {
  flex: 1;
}

.loyalty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--chocolate);
  margin-bottom: 8px;
}

.loyalty-bar-wrapper {
  width: 100%;
  height: 6px;
  background: rgba(197, 139, 77, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.loyalty-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--caramel) 0%, var(--gold) 100%);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow) cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ─── Loyalty Ticket Grid — 10 Circles (2 rows × 5) ─── */
.loyalty-ticket-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(245,240,235,0.4) 100%);
  border: 1px solid rgba(15, 123, 108, 0.15);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.4);
  margin: 16px 0;
}

.loyalty-stamp {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  cursor: default;
  margin: 0 auto;
}

/* Empty stamp — border teal, fondo transparente */
.loyalty-stamp.empty {
  border: 2px solid var(--teal);
  background: transparent;
  color: var(--teal);
  opacity: 0.4;
}

/* Filled stamp — fondo teal, icono blanco */
.loyalty-stamp.filled {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 123, 108, 0.25), inset 0 -2px 4px rgba(0,0,0,0.1);
  animation: loyaltyStampFill 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 18px;
}

.loyalty-stamp.filled::after {
  content: '✓';
  position: absolute;
}

/* Animated border pour el círculo que se llena */
.loyalty-stamp.filling {
  animation: loyaltyStampFill 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  color: white;
  border: 2px solid var(--teal);
}

.loyalty-text {
  font-size: 12px;
  color: var(--chocolate-light);
  font-weight: 600;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.success-actions > p {
  font-size: 14px;
  color: var(--mid);
  margin: 0;
  font-weight: 500;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast) ease-out;
  height: 48px;
}

.action-btn:active {
  transform: scale(0.97);
}

.action-btn-explore {
  background: linear-gradient(135deg, var(--chocolate) 0%, var(--chocolate-light) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.action-btn-explore:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.action-btn-repeat {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}

.action-btn-repeat:hover {
  background: rgba(15, 123, 108, 0.05);
}

/* ─── Share / Memory Card — Instagram Story Style ─── */
.share-card {
  background: linear-gradient(135deg, var(--cream) 0%, #FFFAF5 100%);
  border: 1px solid var(--color-teal-muted-a10);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  margin: 20px 0;
  animation: slideUp 300ms ease-out 300ms both;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.share-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 100%);
  pointer-events: none;
}

.share-card-content {
  position: relative;
  z-index: 1;
}

.share-card-logo {
  width: 24px;
  height: 24px;
  margin: 0 auto 16px;
  opacity: 0.6;
  font-weight: 800;
  font-size: 12px;
  color: var(--teal);
}

.share-card-flavor {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.share-card-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
}

.share-card-score-value {
  font-family: 'Tabular Nums', var(--font-body);
  font-size: 18px;
}

.share-card-heladeria {
  font-size: 13px;
  color: var(--mid);
  margin: 0 0 12px 0;
  font-weight: 600;
}

.share-card-date {
  font-size: 11px;
  color: var(--mid);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.share-card-button {
  margin-top: 16px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 280ms ease-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px var(--color-teal-muted-a20);
}

.share-card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--color-teal-muted-a30);
}

.share-card-button:active {
  transform: scale(0.96);
}

/* ─── Cooldown Screen ─── */
.cooldown-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 40px 20px;
}

.cooldown-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cooldown-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.cooldown-icon::before {
  content: '⏳';
}

.cooldown-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.cooldown-message {
  font-size: 14px;
  color: var(--mid);
  margin: 0;
}

.cooldown-timer {
  font-family: 'Tabular Nums', var(--font-body);
  font-size: 48px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: -1px;
  margin: 20px 0;
}

.cooldown-subtext {
  font-size: 13px;
  color: var(--light);
  line-height: 1.5;
  max-width: 280px;
  margin: 0;
}

/* ─── Error Screen ─── */
.error-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 40px 20px;
}

.error-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  animation: shake 0.5s ease-in-out;
}

.error-icon::before {
  content: '⚠';
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.error-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.error-text {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.6;
  margin: 0;
  max-width: 300px;
}

/* ─── Animations ─── */
@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
  }
}

@keyframes slideInHorizontal {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutHorizontal {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes emblemBounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes emblemGlow {
  0% {
    box-shadow: 0 0 0 rgba(45, 212, 191, 0);
  }
  50% {
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.4);
  }
  100% {
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.2);
  }
}

@keyframes loyaltyStampFill {
  0% {
    transform: scale(0);
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes flameFlicker {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes confettiPop {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Confetti container para 3 bolas */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.confetti {
  position: fixed;
  width: 12px;
  height: 12px;
  pointer-events: none;
  animation: confettiFall var(--conf-duration, 2s) ease-out forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0) rotateZ(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) translateX(var(--conf-x, 0)) rotateZ(360deg) scale(0);
  }
}

/* Ranking Pill mejorado */
.ranking-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(94, 234, 212, 0.05) 100%);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  color: var(--teal);
  animation: slideUp 300ms ease-out 400ms both;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1);
}

.ranking-pill.first {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-color: var(--color-gold-pure-a30);
  color: var(--color-gold-text, #B45309);
  animation: slideUp 300ms ease-out 400ms both, badgeShimmer 2s ease-in-out 600ms infinite;
}

.ranking-medal {
  font-size: 16px;
  line-height: 1;
}

/* Descriptors Step mejorado */
.descriptor-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--color-teal-muted-a08);
  border: 1px solid rgba(15, 123, 108, 0.15);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  transition: all 280ms ease-out;
}

.descriptor-tag:hover {
  background: var(--color-teal-muted-a12);
  border-color: rgba(15, 123, 108, 0.25);
  transform: translateY(-2px);
}

.descriptor-tag.active {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  color: white;
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.descriptor-icon {
  font-size: 14px;
  line-height: 1;
}

/* ─── Responsive Design ─── */
@media (max-width: 360px) {
  .votar-header h2 {
    font-size: 24px;
  }

  .landing-header h1 {
    font-size: 28px;
  }

  .gauge-score {
    font-size: 48px;
  }

  .step-preview {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .decision-benefits {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .benefit-item {
    padding: 12px 8px;
  }

  .benefit-icon {
    font-size: 24px;
  }

  .votar-btn {
    height: 48px;
    font-size: 14px;
  }

  .success-checkmark {
    width: 72px;
    height: 72px;
  }

  .success-checkmark::after {
    font-size: 40px;
  }

  .dragcream-header h2 {
    font-size: 20px;
  }

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

@media (max-width: 400px) {
  .votar-state {
    /* Keep bottom breathing room even on small screens */
    padding: env(safe-area-inset-top, 0px) 12px
             max(env(safe-area-inset-bottom, 0px), 16px) 12px;
  }

  .votar-content {
    padding: 12px 12px;
    gap: 16px;
  }

  .votar-header {
    padding: 12px 12px;
  }

  .votar-btn {
    width: 100%; /* full width on tiny screens — no side margins */
    margin: 0;
  }
  .votar-buttons-row .votar-btn {
    margin: 0;
  }

  .dragcream-canvas-wrapper {
    min-height: 350px;
  }
}

/* Landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
  .votar-state {
    height: auto;
    min-height: 100dvh;
  }

  .votar-content {
    padding: 12px 20px;
    gap: 12px;
  }

  .gauge-container {
    max-height: 240px;
  }

  .success-container {
    padding: 20px;
  }

  .cooldown-wrapper {
    gap: 12px;
    padding: 20px;
  }

  .dragcream-canvas-wrapper {
    min-height: 300px;
  }
}

/* Large screens */
@media (min-width: 768px) {
  #votar-container {
    padding: 20px;
  }

  .votar-state {
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
    max-height: 90vh;
    /* overflow:hidden would clip the button hit-area when content is tall.
       overflow-y:auto ensures content scrolls within state, button stays visible. */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    border: 1px solid var(--color-teal-muted-a10);
  }

  .landing-avatar-wrap {
    width: 112px;
    height: 112px;
  }

  .landing-name {
    font-size: 30px;
  }

  .votar-header h2 {
    font-size: 32px;
  }

  .flavor-grid {
    max-width: 400px;
    margin: 0 auto;
  }

  .dragcream-canvas-wrapper {
    min-height: 500px;
  }

  .vote-emblem {
    width: 140px;
    height: 140px;
  }

  .loyalty-ticket-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 24px;
  }

  .loyalty-stamp {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
}

/* Print styles */
@media print {
  #votar-container {
    display: none;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F1E;
    --bg-card: #1A1A2E;
    --dark: #FFFFFF;
    --mid: #B0B8C4;
    --light: #3D4563;
  }

  body {
    background: linear-gradient(135deg, var(--bg) 0%, #1A1A2E 100%);
  }

  .votar-textarea,
  .votar-input {
    background: #252F4B;
    color: white;
  }

  .rating-category,
  .step-item {
    background: #1A1A2E;
    border-color: #3D4563;
  }

  .loyalty-badge {
    background: rgba(74, 44, 26, 0.1);
    border-color: var(--chocolate-light);
  }

  .flavor-card {
    background: #1A1A2E;
    border-color: #3D4563;
  }

  .dragcream-back-btn,
  .dragcream-mute-btn {
    background: rgba(26, 26, 46, 0.8);
    color: white;
  }

  .dragcream-score-display {
    background: rgba(26, 26, 46, 0.95);
    color: white;
    border-color: var(--color-teal-muted-a20);
  }
}

/* ─── Test mode banner ─── */
.test-mode-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(90deg, #F59E0B, var(--color-bronze, #D97706));
  color: #1A1A2E;
  text-align: center;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.test-mode-banner span {
  display: inline-block;
  background: #1A1A2E;
  color: var(--amber);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-right: 6px;
  vertical-align: middle;
}

.test-mode-banner:not(.hidden) ~ #votar-container {
  padding-top: 44px;
}

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