/* ================================================================
   VALIDADOR DE PLATO — style.css v3
   Design: Clean clinical minimalism. Fresh green health palette.
   Fonts: Lora (display) + IBM Plex Sans (body)
   Pattern: Material 3 — strong hierarchy, generous space,
            one primary action per screen, large tap targets.
================================================================ */

/* ──────────────────────────────────────────────────────────────
   DESIGN TOKENS
   ────────────────────────────────────────────────────────────── */
:root {
  /* Primary — forest green (health / food context) */
  --p-600:   #1A6B3E;
  --p-700:   #135430;
  --p-100:   #E2F4EB;
  --p-50:    #F0FAF4;
  --on-p:    #FFFFFF;

  /* Neutral surfaces */
  --bg:      #F0F2F0;           /* page background */
  --s-0:     #FFFFFF;           /* card surface */
  --s-1:     #F5F7F5;           /* input / option background */
  --s-2:     #EAEDEa;           /* dividers / borders */

  /* Text scale */
  --t-1:     #111714;           /* high emphasis */
  --t-2:     #374840;           /* medium */
  --t-3:     #637068;           /* low */
  --t-4:     #99AAA2;           /* disabled / placeholder */

  /* Semantic */
  --err:     #B71C1C;
  --err-bg:  #FFEBEE;
  --done:    #1A6B3E;
  --done-bg: #E2F4EB;

  /* Typography */
  --f-head: 'Lora', Georgia, serif;
  --f-body: 'IBM Plex Sans', system-ui, sans-serif;

  /* Layout */
  --stepper-h:   64px;
  --card-max:    520px;

  /* Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-pill: 9999px;

  /* Elevation */
  --elev-1: 0 1px 2px rgba(17,23,20,.04), 0 2px 8px rgba(17,23,20,.05);
  --elev-2: 0 2px 6px rgba(17,23,20,.05), 0 6px 24px rgba(17,23,20,.07);

  /* Motion */
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1.0);
  --t-fast:  0.15s var(--ease-out);
  --t-std:   0.22s var(--ease-out);
}

/* ──────────────────────────────────────────────────────────────
   RESET & BASE
   ────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.55;
  background: var(--bg);
  color: var(--t-1);
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ──────────────────────────────────────────────────────────────
   STEPPER
   Fixed at top. JS manages classes:
     .stepper--hidden     → hides the whole bar
     .step--active        → current step (terracotta highlight)
     .step--done          → completed step (green, shows ✓)
     .line--done          → connector line filled green
   ────────────────────────────────────────────────────────────── */
.stepper {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--stepper-h);
  background: var(--s-0);
  border-bottom: 1px solid var(--s-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  box-shadow: var(--elev-1);
}

.stepper--hidden { display: none !important; }

/* Inner track: fills card-max width to align with cards below */
.stepper-track {
  display: flex;
  align-items: flex-start;     /* steps + lines start from top */
  width: 100%;
  max-width: var(--card-max);
}

/* ── Step node ── */
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.step-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--s-2);
  background: var(--s-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--t-4);
  transition:
    background  var(--t-std),
    border-color var(--t-std),
    color       var(--t-std),
    box-shadow  var(--t-std);
}

.step-check { display: none; }
.step-num   { display: block; }

.step-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--t-4);
  white-space: nowrap;
  transition: color var(--t-std);
}

/* Active step — primary green fill + glow ring */
.step--active .step-bubble {
  background: var(--p-600);
  border-color: var(--p-600);
  color: var(--on-p);
  box-shadow: 0 0 0 4px var(--p-100);
}
.step--active .step-label {
  color: var(--p-600);
  font-weight: 700;
}

/* Completed step — green check */
.step--done .step-bubble {
  background: var(--done-bg);
  border-color: var(--done);
  color: var(--done);
}
.step--done .step-check { display: block; font-size: 0.85rem; }
.step--done .step-num   { display: none; }
.step--done .step-label { color: var(--done); }

/* ── Connector line ──
   Precise vertical alignment: bubble is 32px tall.
   Using align-self: flex-start + margin-top: 15px places
   the 2px line at the exact vertical center of the bubble.
   ((32px bubble - 2px line) / 2 = 15px margin-top)
   ────────────────────────────────────────── */
.step-line {
  flex: 1;
  min-width: 12px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--s-2);
  align-self: flex-start;
  margin-top: 15px;       /* aligns center of 2px line with center of 32px bubble */
  transition: background var(--t-std);
}
.step-line.line--done { background: var(--done); }

/* ──────────────────────────────────────────────────────────────
   SCREEN SYSTEM
   Each section is fixed full-viewport. Only .active shows.
   ────────────────────────────────────────────────────────────── */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  /* No stepper bar — minimal top padding */
  padding: 20px 16px 56px;
}

.screen.active {
  display: flex;
  animation: screenIn 0.28s var(--ease-out) both;
}

/* Intro & Thanks: vertically centered, no stepper offset */
.screen--centered {
  justify-content: center;
  padding: 32px 16px;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────
   SURFACE (the white card)
   ────────────────────────────────────────────────────────────── */
.surface {
  position: relative;
  background: var(--s-0);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  width: 100%;
  max-width: var(--card-max);
  box-shadow: var(--elev-2);
  display: flex;
  flex-direction: column;
  gap: 22px;
  /* Bottom margin so content doesn't touch viewport edge on scroll */
  margin-bottom: 16px;
}

/* Hero variant: centered, for intro + thanks */
.surface--hero {
  text-align: center;
  align-items: center;
  gap: 24px;
  padding: 52px 40px;
}

/* ──────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ────────────────────────────────────────────────────────────── */
h1 {
  font-family: var(--f-head);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--t-1);
}

h2 {
  font-family: var(--f-head);
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--t-1);
}

h1 em, h2 em {
  font-style: italic;
  color: var(--p-600);
  font-weight: 600;
}

.q-heading {
  font-family: var(--f-head);
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--t-1);
}
.q-heading em {
  font-style: italic;
  color: var(--p-600);
}

/* Floating hero glyph */
.hero-glyph {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(26,107,62,.20));
  animation: floatUp 3.5s ease-in-out infinite;
}

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

.hero-text { display: flex; flex-direction: column; gap: 12px; }

.lead {
  font-size: 1rem;
  color: var(--t-3);
  line-height: 1.65;
  max-width: 340px;
}

/* Screen header block */
.screen-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Step counter eyebrow */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--p-600);
}

/* One-line helper text */
.sub {
  font-size: 0.9rem;
  color: var(--t-3);
  line-height: 1.55;
}

/* Secondary notice (no-detect-hint) */
.notice {
  font-size: 0.875rem;
  color: var(--t-3);
  font-style: italic;
  line-height: 1.5;
  padding: 10px 14px;
  background: var(--s-1);
  border-radius: var(--r-sm);
}

/* Optional tag in labels */
.opt-tag {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--t-4);
  background: var(--s-1);
  border: 1px solid var(--s-2);
  padding: 1px 8px;
  border-radius: var(--r-pill);
  margin-left: 8px;
  vertical-align: middle;
}

/* ──────────────────────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-body);
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 15px 28px;
  border-radius: var(--r-lg);
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

/* Filled primary CTA */
.btn--filled {
  background: var(--p-600);
  color: var(--on-p);
  box-shadow: 0 2px 10px rgba(26,107,62,.28);
}
.btn--filled:hover {
  background: var(--p-700);
  box-shadow: 0 4px 18px rgba(26,107,62,.38);
  transform: translateY(-1px);
}
.btn--filled:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(26,107,62,.18);
}

/* Ghost / outlined (restart button) */
.btn--ghost {
  background: transparent;
  color: var(--p-600);
  border: 2px solid var(--p-600);
  box-shadow: none;
}
.btn--ghost:hover {
  background: var(--p-50);
}

/* ── Back button: subtle text link ── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: var(--f-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--t-3);
  cursor: pointer;
  padding: 0;
  align-self: flex-start;
  transition: color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn-back:hover { color: var(--p-600); }

/* ──────────────────────────────────────────────────────────────
   FORM — textarea & field label
   ────────────────────────────────────────────────────────────── */
.field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--t-2);
  display: flex;
  align-items: center;
}

textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--t-1);
  background: var(--s-1);
  border: 1.5px solid var(--s-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  resize: vertical;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
}
textarea:focus {
  background: var(--s-0);
  border-color: var(--p-600);
  box-shadow: 0 0 0 3px var(--p-100);
}
textarea::placeholder { color: var(--t-4); }

/* ──────────────────────────────────────────────────────────────
   ERROR MESSAGES
   IDs: input-error, detected-error, question-error
   JS adds/removes .hidden class — CSS handles the animation
   ────────────────────────────────────────────────────────────── */
.examples-intro {
  margin-bottom: 1px;
}

.input-examples {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.input-examples li {
  font-size: 0.82rem;
  color: var(--t-4);
  line-height: 1.45;
}

.warning-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: #7a5c00;
  background: #fffbea;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border-left: 3px solid #f0c000;
  line-height: 1.4;
  animation: errIn 0.22s var(--ease-out) both;
}

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

.error-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--err);
  background: var(--err-bg);
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--err);
  line-height: 1.4;
  animation: errIn 0.22s var(--ease-out) both;
}

.err-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--err);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.5px;
}

@keyframes errIn {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────
   DETECTED CHIPS
   JS dynamically creates <button class="det-chip [det-chip--active]">
   ────────────────────────────────────────────────────────────── */
.chips-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Base chip (inactive) */
.det-chip {
  flex: 1;
  min-width: 130px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  font-family: var(--f-body);
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--t-3);
  background: var(--s-1);
  border: 2px solid var(--s-2);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition:
    background     var(--t-fast),
    border-color   var(--t-fast),
    color          var(--t-fast),
    box-shadow     var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.det-chip:hover:not(.det-chip--active) {
  background: var(--s-0);
  border-color: var(--p-600);
  color: var(--t-1);
}

/* Active / selected chip */
.det-chip--active {
  background: var(--p-100);
  border-color: var(--p-600);
  color: var(--p-600);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--p-600) inset;
}

/* Check badge in top-right corner of active chip */
.det-chip--active::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 9px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--p-600);
}

/* ──────────────────────────────────────────────────────────────
   QUESTION SCREEN HEADER
   JS sets textContent on #q-item-title and #q-item-counter
   ────────────────────────────────────────────────────────────── */
.q-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.q-item-title {
  font-family: var(--f-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--t-1);
}

.q-counter {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--t-4);
  background: var(--s-1);
  border: 1px solid var(--s-2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* ──────────────────────────────────────────────────────────────
   QUESTION BLOCKS
   .qblock — used by JS with .hidden to show/hide per item
   ────────────────────────────────────────────────────────────── */
.qblock {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.question-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-block--prompt {
  background: var(--surface-2, #f5f5f4);
  border-left: 3px solid var(--accent, #6b7280);
  border-radius: 8px;
  padding: 12px 14px;
}

.question-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--t-2);
  line-height: 1.4;
}

/* ──────────────────────────────────────────────────────────────
   RADIO OPTION CARDS
   Full-width stacked cards with emoji icon + text.
   Visual radio indicator (::after) positioned at right edge.
   :has(input:checked) drives selected state.

   Structure:
     <label class="radio-card">
       <input type="radio" name="..." value="..." />   ← hidden, DOM-only
       <span class="rc-icon">🐄</span>
       <span class="rc-text">Carne</span>
     </label>
   ────────────────────────────────────────────────────────────── */
.radio-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

/* Row variant for compact Yes/No — already row, no change needed */
.radio-group--row {
  flex-direction: row;
}

/* Option card base — pill style, auto width */
.radio-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 10px 16px;
  background: var(--s-1);
  border: 1.5px solid var(--s-2);
  border-radius: 99px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background    var(--t-fast),
    border-color  var(--t-fast),
    box-shadow    var(--t-fast);
}

/* No visual indicator circle needed — selection shown via border+bg */
.radio-card::after {
  display: none;
}

/* Native radio — hidden visually, kept in DOM for JS & a11y */
.radio-card input[type="radio"],
.radio-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Emoji icon */
.rc-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

/* Option text */
.rc-text {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--t-2);
  line-height: 1.3;
  flex: 1;
}

/* ── Hover state ── */
.radio-card:hover {
  background: var(--s-0);
  border-color: var(--p-600);
}
.radio-card:hover::after { display: none; }

/* ── Focus-within (keyboard nav) ── */
.radio-card:focus-within {
  outline: 2px solid var(--p-600);
  outline-offset: 2px;
}

/* ── Selected state via :has() ──
   Works on all modern browsers (Chrome 105+, Firefox 121+, Safari 15.4+)
   Fallback: users on very old browsers see unhighlighted options — acceptable for prototype.
   ────────────────────────────────────────────────────── */
.radio-card:has(input:checked) {
  background: var(--p-100);
  border-color: var(--p-600);
  box-shadow: 0 0 0 1px var(--p-600) inset;
}

/* ::after is hidden — selection shown via border+bg only */
.radio-card:has(input:checked)::after {
  display: none;
}

.radio-card:has(input:checked) .rc-text {
  color: var(--p-700);
  font-weight: 600;
}

/* Checkbox pills: show a ✓ before the label when checked */
.radio-card:has(input[type="checkbox"]:checked) .rc-text::before {
  content: '✓ ';
  font-weight: 700;
}

/* ── Compact row variant (Yes/No) ──
   Centered layout, no right-side indicator
   ─────────────────────────────────── */
.radio-card--compact {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 18px 12px;
  text-align: center;
  flex: 1;
  gap: 6px;
}

.radio-card--compact::after {
  display: none; /* no radio circle in compact mode */
}

.radio-card--compact .rc-icon {
  font-size: 1.5rem;
  width: auto;
}

.radio-card--compact .rc-text {
  font-size: 0.9rem;
}

/* ──────────────────────────────────────────────────────────────
   RESULTS / SUGGESTIONS LIST
   JS injects: <li><span class="suggestion-icon">…</span><span>…</span></li>
   ────────────────────────────────────────────────────────────── */
.suggestions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestions-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--s-1);
  border-left: 3px solid var(--p-600);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--t-2);
  /* Staggered entrance animation */
  animation: suggIn 0.3s var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  .suggestions-list li { animation: none; opacity: 1; }
}

.suggestions-list li:nth-child(1) { animation-delay: 0.06s; }
.suggestions-list li:nth-child(2) { animation-delay: 0.16s; }
.suggestions-list li:nth-child(3) { animation-delay: 0.26s; }

@keyframes suggIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Emoji icon inside each suggestion (injected by JS as .suggestion-icon) */
.suggestion-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

/* ──────────────────────────────────────────────────────────────
   AI LOADING STATE
   ────────────────────────────────────────────────────────────── */
.ai-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 2rem 0;
}

.ai-loader__dots {
  display: flex;
  gap: 8px;
}

.ai-loader__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--p-600);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.ai-loader__dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loader__dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0);    opacity: 0.3; }
  40%           { transform: translateY(-8px); opacity: 1;   }
}

.ai-loader__label {
  font-size: 0.85rem;
  color: var(--t-3, #aaa);
  animation: labelPulse 2s ease-in-out infinite;
}

@keyframes labelPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1;   }
}

/* ──────────────────────────────────────────────────────────────
   INTRO SCREEN — Figma redesign
   ────────────────────────────────────────────────────────────── */
.intro-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--card-max);
}

/* Speech bubble — uses dialog-box.svg as background (organic wavy shape with built-in tail) */
.intro-bubble {
  background: url('assets/dialog-box.svg') no-repeat center top / 100% 100%;
  padding: 15px 17px 18px 17px;
  width: 400px;
  height: 81px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  margin-bottom: -30px;
  transform: translateY(19px);
  filter: drop-shadow(0 2px 6px rgba(26,107,62,.06));
  box-sizing: border-box;
}

.intro-bubble__text {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--t-1);
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0;
}

/* Desktop grande (≥1280px): bubble + texto al 110% */
@media (min-width: 1280px) {
  .intro-bubble {
    width: 440px;
    height: 90px;
    padding: 16px 19px 21px 19px;
    margin-bottom: -34px;
    transform: translateY(22px);
  }
  .intro-bubble__text {
    font-size: 15.4px;
  }
}

/* Mobile (<744px): bubble + texto al 95% del mobile actual */
@media (max-width: 743px) {
  .intro-bubble {
    width: 316px;
    height: 64px;
    padding: 11px 13px 14px 13px;
    margin-bottom: -25px;
    transform: translateY(-7px);
  }
  .intro-bubble__text {
    font-size: 11.54px;
  }
}

/* Yellow highlighter behind the phrase — uses highlighter SVG */
.intro-bubble__highlight {
  position: relative;
  display: inline-block;
  z-index: 0;
  padding: 0 4px;
}
.intro-bubble__highlight::before {
  content: '';
  position: absolute;
  inset: -3px -2px;
  background: url('assets/squiggle.svg') no-repeat center / 100% 100%;
  z-index: -1;
  pointer-events: none;
}

.intro-bubble__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Overlapping avatars at top of card */
.hero-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.hero-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--s-0);
  flex-shrink: 0;
}

.hero-avatar--emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(26,107,62,.20));
  position: relative;
  z-index: 1;
  animation: floatUp 3.5s ease-in-out infinite;
}

.hero-avatar--photo {
  object-fit: cover;
  margin-left: -14px;
  border: 2px solid rgba(197, 237, 221, 0.6);
  box-shadow: 0 4px 12px rgba(26,107,62,.20);
  position: relative;
  z-index: 2;
  animation: floatUp 3.5s ease-in-out infinite;
  animation-delay: -1.75s;
}

/* Branding stamp */
.intro-logo {
  width: 96px;
  margin-top: 18px;
  opacity: 0.85;
}

/* ──────────────────────────────────────────────────────────────
   UTILITY
   .hidden used by JS — must be display:none !important
   ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ──────────────────────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
   ────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .surface {
    padding: 28px 20px;
    border-radius: var(--r-lg);
    gap: 18px;
  }
  .surface--hero {
    padding: 40px 24px;
    gap: 20px;
  }
}

@media (max-width: 420px) {
  :root { --stepper-h: 58px; }

  /* Compress stepper on small screens */
  .step-line { min-width: 6px; }
  .step-label { font-size: 0.58rem; }
  .step-bubble { width: 28px; height: 28px; font-size: 0.72rem; }
  .step-line { margin-top: 13px; } /* (28px - 2px) / 2 */

  .surface { padding: 24px 16px; gap: 16px; }
  .chips-grid { flex-direction: column; }
  .radio-group--row { gap: 8px; }
}

@media (max-width: 360px) {
  /* On very narrow screens, hide step labels — bubbles alone are enough */
  .step-label { display: none; }
}

/* Touch device: disable hover transforms to avoid sticky hover on mobile */
@media (hover: none) {
  .btn--filled:hover { transform: none; box-shadow: 0 2px 10px rgba(26,107,62,.28); }
}

/* ================================================================
   Brand footer (04-05 Phase 4): identidad daniela.dok visible en
   results y thanks. Scope mínimo: texto-only con link a IG.
================================================================ */
.brand-footer {
  text-align: center;
  margin-top: var(--p-500, 32px);
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: var(--t-3, #637068);
  font-style: italic;
}
.brand-footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.2);
  text-underline-offset: 3px;
}
.brand-footer a:hover {
  color: var(--t-1, #1a1a1a);
}

/* ──────────────────────────────────────────────────────────────
   RESET CONFIRMATION MODAL (Phase 5 — D-11/D-12/D-13)
   Reemplaza window.confirm() nativo en admin.html.
   Visible, ESC closes, Cancelar autofocus, Sí en rojo.
   ────────────────────────────────────────────────────────────── */
.reset-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: resetModalFadeIn 0.22s var(--ease-out) both;
}

.reset-modal {
  background: var(--s-0);
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: resetModalPanelIn 0.22s var(--ease-out) both;
}

.reset-modal__warning {
  font-size: 1rem;
  font-family: var(--f-body);
  color: var(--t-1);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.reset-modal__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.reset-modal__cancel,
.reset-modal__confirm {
  min-height: 44px;
  font-family: var(--f-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: background 0.15s var(--ease-out);
}

.reset-modal__cancel {
  background: transparent;
  border: 1.5px solid var(--s-2);
  color: var(--t-2);
}
.reset-modal__cancel:hover {
  background: var(--s-1);
}
.reset-modal__cancel:focus-visible {
  outline: 2px solid var(--p-600);
  outline-offset: 2px;
}

.reset-modal__confirm {
  background: var(--err);
  color: #FFFFFF;
  border: none;
}
.reset-modal__confirm:hover {
  background: #9B1010;
}
.reset-modal__confirm:focus-visible {
  outline: 2px solid var(--err);
  outline-offset: 2px;
}

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

@keyframes resetModalPanelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reset-modal-overlay,
  .reset-modal {
    animation: none;
  }
}

/* ──────────────────────────────────────────────────────────────
   STEP 3 LAYOUT (Phase 5 — D-07)
   Input panel + suggestions van ANTES del chip-flow Q&A.
   Esta regla separa visualmente el bloque del input del Q&A.
   ────────────────────────────────────────────────────────────── */
#screen-questions #questions-container:not(:empty) {
  margin-top: 16px;
}

/* ──────────────────────────────────────────────────────────────
   APP TOAST (Phase 5 — D-16)
   Bottom-center, success border-left, auto-dismiss 2s.
   z-index 9000 — debajo del modal Reset (z:10000).
   ────────────────────────────────────────────────────────────── */
.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--s-0);
  border-left: 3px solid var(--done);
  border-radius: var(--r-sm);
  box-shadow: var(--elev-2);
  padding: 12px 20px;
  font-family: var(--f-body);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--t-1);
  z-index: 9000;
  min-width: 200px;
  max-width: 320px;
  opacity: 0;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast.is-leaving {
  opacity: 0;
  transition: opacity 0.18s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .app-toast,
  .app-toast.is-leaving {
    transition: opacity 0.18s linear;
    transform: translateX(-50%) translateY(0);
  }
}

/* ──────────────────────────────────────────────────────────────
   APP TOOLTIP (Phase 5 — D-16)
   CSS-only via [data-tooltip] attribute on hover.
   Padre debe tener position:relative (li suggestions-list ya lo tiene).
   ────────────────────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: var(--t-1);
  color: var(--on-p);
  font-family: var(--f-body);
  font-size: 0.875rem;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  white-space: nowrap;
  pointer-events: none;
  z-index: 8000;
  opacity: 0;
  transition: opacity 0.15s var(--ease-out);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
}

@media (hover: none) {
  /* Touch devices: hide tooltip pseudo-element (button.title still serves a11y) */
  [data-tooltip]::after {
    display: none;
  }
}
