/* ============================================= */
/* HABLEMUS · Design System                       */
/* ============================================= */

:root {
  /* === COLORS · VIOLET === */
  --colors-violet-50: #F9F8F9;
  --colors-violet-100: #EFEEF2;
  --colors-violet-200: #DEDAE5;
  --colors-violet-400: #9E94AC;
  --colors-violet-600: #7D718F;
  --colors-violet-700: #5F5571;
  --colors-violet-800: #423953;
  --colors-violet-900: #1F182A;

  /* === COLORS · MAUVE === */
  --colors-mauve-100: #BEB7C9;
  --colors-mauve-50: #DDD8E4;

  /* === COLORS · GREEN MINT === */
  --colors-greenmint-100: #F4FDF5;
  --colors-greenmint-200: #CEF3D4;
  --colors-greenmint-400: #89D191;
  --colors-greenmint-500: #ABE7B2;
  --colors-greenmint-500-alt: #B3EAB8;
  --colors-greenmint-700: #68B871;
  --colors-greenmint-pill: #BCEEBF;

  /* === SURFACES === */
  --background-default: #ECF4E8;
  --surface-white: #FFFFFF;

  /* === FONDO AMBIENTAL (gradiente verde→blanco→azul del Figma) === */
  --bg-tint-green: #E7F6DC;
  --bg-tint-blue: #D2EDF8;
  --bg-tint-base: #FCFCFB;
  --background-ambient:
    radial-gradient(120% 90% at 12% 68%, var(--bg-tint-green) 0%, rgba(231,246,220,0) 55%),
    radial-gradient(120% 90% at 92% 72%, var(--bg-tint-blue) 0%, rgba(210,237,248,0) 55%),
    linear-gradient(180deg, var(--bg-tint-base) 0%, #FFFFFF 42%, #FFFFFF 100%);

  /* === INK === */
  --ink-primary: #1F182A;
  --ink-soft: #5F5571;
  --ink-mute: #7D718F;
  --line: #DAD7CD;

  /* === RADIUS === */
  --radius-8: 8px;
  --radius-card: 16px;
  --radius-button: 25px;
  --radius-tabbar: 42px;

  /* === GRADIENT (cards principales) === */
  --gradient-action-card: linear-gradient(90deg, var(--colors-violet-200) 0%, var(--colors-greenmint-200) 100%);

  /* === ALIASES retrocompatibles === */
  --brand: var(--colors-violet-900);
  --soft: var(--colors-greenmint-500);
  --softer: var(--colors-greenmint-200);
  --page: var(--background-default);
  --mauve: var(--colors-mauve-100);
  --mauve-soft: var(--colors-mauve-50);
  --ink: var(--ink-primary);
  --white: var(--surface-white);

  /* === CHASIS === */
  --phone-bezel: #1A1A1C;
  --phone-side: #2C2C2E;
  --phone-button: #2A2A2C;

  /* === SHADOWS === */
  --shadow-phone: 0 30px 80px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 2px 8px rgba(31, 24, 42, 0.06);

  /* === TYPO === */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ============================================= */
/* RESET                                          */
/* ============================================= */

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

/* ============================================= */
/* DESKTOP BACKGROUND                             */
/* ============================================= */

.desktop-bg {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #2A2535 0%, #1A1620 60%, #0F0C14 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 24px;
}

/* ============================================= */
/* CHASIS IPHONE 14                               */
/* ============================================= */

.phone-frame {
  position: relative;
  width: 390px;
  height: 844px;
  background: var(--phone-bezel);
  border-radius: 55px;
  padding: 12px;
  box-shadow: var(--shadow-phone);
  flex-shrink: 0;
}

.phone-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 55px;
  padding: 2px;
  background: linear-gradient(135deg, #4A4A4D 0%, #2A2A2C 25%, #1A1A1C 50%, #2A2A2C 75%, #4A4A4D 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.phone-side, .phone-btn {
  position: absolute;
  background: var(--phone-button);
  border-radius: 2px;
  pointer-events: none;
}

.phone-btn-silence { left: -2px; top: 130px; width: 4px; height: 32px; }
.phone-btn-vol-up { left: -2px; top: 180px; width: 4px; height: 60px; }
.phone-btn-vol-down { left: -2px; top: 250px; width: 4px; height: 60px; }
.phone-btn-power { right: -2px; top: 200px; width: 4px; height: 90px; }

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--background-ambient);
  background-color: #FFFFFF;
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================= */
/* STATUS BAR                                     */
/* ============================================= */

.status-bar {
  position: relative;
  height: 47px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  flex-shrink: 0;
  color: var(--ink-primary);
}

.status-time {
  font-size: 17px;
  font-weight: 600;
  font-feature-settings: 'tnum';
  letter-spacing: -0.5px;
  width: 50px;
  margin-left: 10px;
}

.status-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 30px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 1;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}

.icon-signal, .icon-wifi { height: 12px; }
.icon-signal { width: 18px; }
.icon-wifi { width: 16px; }

.icon-battery {
  position: relative;
  width: 26px;
  height: 12px;
  display: flex;
  align-items: center;
}

.battery-body {
  width: 22px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 3px;
  opacity: 0.4;
  padding: 1px;
}

.battery-level {
  width: 100%;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
}

.battery-tip {
  width: 2px;
  height: 5px;
  background: currentColor;
  opacity: 0.4;
  border-radius: 0 1px 1px 0;
  margin-left: 1px;
}

/* ============================================= */
/* APP CONTAINER                                  */
/* ============================================= */

.app-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  position: relative;
  scrollbar-width: none;
}

.app-container::-webkit-scrollbar { display: none; }

.screen {
  min-height: 100%;
}

/* ============================================= */
/* HOME / DASHBOARD                               */
/* ============================================= */

.screen-home {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 32px;
  padding: 16px 16px 16px 16px;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.home-greeting .home-title {
  font-weight: 700;
  font-size: 26px;
  line-height: 1.05;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
}

.home-greeting .home-name {
  font-size: 18px;
  color: var(--ink-primary);
  margin-top: 2px;
  font-weight: 400;
}

.home-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--colors-mauve-50);
}

.home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: var(--colors-violet-900);
  color: white;
  font-weight: 700;
  font-size: 18px;
}

/* === Aviso "Tienes 1 nueva respuesta" === */
.home-notice {
  display: flex;
  width: 100%;
  height: 40px;
  padding: 8px 16px;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-8);
  border: 1px solid var(--colors-greenmint-700);
  background: var(--colors-violet-900);
  box-shadow: 0 4px 0 0 var(--colors-greenmint-400);
  font-size: 14px;
  color: var(--surface-white);
  /* Halo verde pulsante + leve bounce para que se note bien */
  animation: noticePulse 2s ease-in-out infinite;
  transform-origin: center;
  position: relative;
}

@keyframes noticePulse {
  0%, 100% {
    box-shadow: 0 4px 0 0 var(--colors-greenmint-400),
                0 0 0 0 rgba(104, 184, 113, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 0 0 var(--colors-greenmint-400),
                0 0 0 10px rgba(104, 184, 113, 0);
    transform: scale(1.02);
  }
}

.home-notice strong { font-weight: 600; }
.home-notice .lucide, .home-notice svg {
  width: 20px;
  height: 20px;
  color: var(--surface-white);
  flex-shrink: 0;
  stroke-width: 2;
  /* Vibración del icono: más marcada y frecuente */
  animation: noticeShake 2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes noticeShake {
  0%, 60%, 100% { transform: rotate(0deg) scale(1); }
  65% { transform: rotate(-14deg) scale(1.1); }
  70% { transform: rotate(14deg) scale(1.1); }
  75% { transform: rotate(-12deg) scale(1.08); }
  80% { transform: rotate(10deg) scale(1.06); }
  85% { transform: rotate(-6deg) scale(1.03); }
  90% { transform: rotate(0deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .home-notice,
  .home-notice .lucide,
  .home-notice svg { animation: none; }
}

/* === Sección "Elige lo que" === */
.home-section-title {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
}

.home-section-bar {
  width: 4px;
  background: var(--colors-greenmint-400);
  border-radius: 2px;
  flex-shrink: 0;
}

.home-section-text h2 {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  color: var(--ink-primary);
}

.home-section-text p {
  font-size: 18px;
  color: var(--ink-primary);
  margin-top: 2px;
  font-weight: 400;
}

/* === Lista de cards de acción === */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.action-card {
  display: flex;
  width: 100%;
  height: 73px;
  padding: 12px 14px 11px 14px;
  align-items: center;
  gap: 14px;
  border-radius: var(--radius-card);
  background: var(--surface-white);
  border: 1px solid var(--colors-greenmint-500);
  text-align: left;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.action-card:active { transform: scale(0.98); }
.action-card:hover { box-shadow: 0 4px 12px rgba(31, 24, 42, 0.1); }

.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--colors-violet-900);
  color: var(--surface-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-icon .lucide, .action-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.action-content { flex: 1; min-width: 0; }

.action-content h3 {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}

.action-content p {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.3;
}

/* Flecha como círculo blanco */
.action-arrow-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--colors-greenmint-400);
  color: var(--colors-violet-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 9px rgba(31, 24, 42, 0.20);
}

.action-arrow-circle .lucide,
.action-arrow-circle svg {
  width: 18px;
  height: 18px;
  color: var(--ink-primary);
  stroke-width: 2;
}

/* ============================================= */
/* TAB BAR (PÍLDORA OSCURA FLOTANTE)              */
/* ============================================= */

.tab-bar {
  display: flex;
  padding: 6px;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-tabbar);
  background: var(--colors-violet-900);
  margin: 0 auto 12px auto;
  flex-shrink: 0;
  z-index: 50;
  width: fit-content;
  max-width: calc(100% - 32px);
}

.tab-bar.tab-bar-hidden { display: none; }

/* Cada item es una píldora rellena con verde casi blanco */
.tab-item {
  display: flex;
  padding: 4px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 24px;
  background: var(--surface-white);
  border: none;
  color: var(--colors-violet-900);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab-item:hover {
  background: var(--colors-greenmint-pill);
}

.tab-item .tab-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--colors-greenmint-200);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tab-item .tab-icon-circle .lucide,
.tab-item .tab-icon-circle svg {
  width: 16px;
  height: 18px;
  stroke-width: 2;
  color: var(--colors-violet-900);
}

/* Item ACTIVO: pastilla verde clara (#BCEEBF) + círculo verde saturado (#68B871) */
.tab-item.active {
  background: var(--colors-greenmint-pill);
}

.tab-item.active .tab-icon-circle {
  background: var(--colors-greenmint-700);
}

.tab-item.active .tab-icon-circle .lucide,
.tab-item.active .tab-icon-circle svg {
  color: var(--colors-violet-900);
}

.tab-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--colors-violet-900);
  padding-right: 10px;
}

/* ============================================= */
/* HOME INDICATOR                                 */
/* ============================================= */

.home-indicator {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-default);
  flex-shrink: 0;
}

.home-indicator::before {
  content: '';
  width: 134px;
  height: 5px;
  background: var(--colors-violet-900);
  border-radius: 3px;
  opacity: 0.85;
}

/* ============================================= */
/* FLUJOS — Estructura base                       */
/* ============================================= */

.screen-flow {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  background: transparent;
  position: relative;
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 18px;
  flex-shrink: 0;
}

.flow-header-minimal {
  padding: 20px 20px 16px;
  justify-content: flex-end;
}

.flow-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--colors-violet-900);
  color: var(--colors-violet-100);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 9px rgba(31, 24, 42, 0.20);
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.flow-back:active { opacity: 0.7; }
.flow-back .lucide, .flow-back svg { width: 20px; height: 20px; stroke-width: 2; }

.flow-header-spacer { width: 44px; flex-shrink: 0; }

.flow-title {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-primary);
  text-align: center;
}

.flow-header-spacer-old-removed { display: none; }

.flow-cancel {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-primary);
  padding: 12px 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.flow-subtitle {
  font-size: 16px;
  color: var(--ink-primary);
  font-weight: 600;
  text-align: left;
  width: 100%;
}

.flow-body {
  flex: 1;
  padding: 8px 16px 20px;
  display: flex;
  flex-direction: column;
}

.flow-body-center {
  align-items: center;
  justify-content: center;
}

.flow-question {
  font-size: 16px;
  color: var(--ink-primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.flow-footer {
  padding: 12px 16px 32px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flow-footer-stack { gap: 10px; }

/* ============================================= */
/* BOTONES                                        */
/* ============================================= */

.btn-primary {
  display: flex;
  width: 100%;
  padding: 14px 16px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-button);
  background: var(--colors-violet-900);
  color: white;
  font-size: 16px;
  font-weight: 600;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-soft {
  display: flex;
  width: 100%;
  padding: 14px 16px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-button);
  background: var(--colors-greenmint-500-alt);
  color: var(--ink-primary);
  font-size: 16px;
  font-weight: 600;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-soft:active { transform: scale(0.98); opacity: 0.85; }

.btn-link {
  width: 100%;
  background: transparent;
  color: var(--ink-primary);
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:active { opacity: 0.6; }

/* ============================================= */
/* ESTADO DE ÁNIMO                                */
/* ============================================= */

.mood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.mood-card {
  display: flex;
  width: 100%;
  aspect-ratio: 1;
  padding: 16px 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  background: var(--surface-white);
  border: 1.5px solid var(--colors-greenmint-500);
  box-shadow: 0 1px 3px rgba(31, 24, 42, 0.04);
  transition: all 0.15s ease;
  color: var(--ink-primary);
}

.mood-card:hover { border-color: var(--colors-greenmint-400); }

.mood-card.selected {
  background: var(--colors-violet-900);
  border-color: var(--colors-violet-900);
  color: var(--surface-white);
}

.mood-icon {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.mood-card .mood-icon { color: var(--ink-primary); }
.mood-card.selected .mood-icon { color: var(--surface-white); }

.mood-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

/* ============================================= */
/* SUGERENCIAS                                    */
/* ============================================= */

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.suggestion-card {
  background: var(--colors-greenmint-500);
  border-radius: 12px;
  padding: 18px 18px;
  font-size: 16px;
  font-style: italic;
  color: var(--ink-primary);
  text-align: left;
  font-weight: 500;
  border: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.suggestion-card:active { transform: scale(0.99); opacity: 0.9; }

/* ============================================= */
/* GRABANDO                                       */
/* ============================================= */

.recording-mood-chip {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: 1.5px solid var(--colors-mauve-100);
  color: var(--colors-violet-700);
  padding: 7px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10;
  white-space: nowrap;
}

.screen-flow .flow-body-center {
  padding-top: 80px;
}

.recording-label {
  font-size: 16px;
  color: var(--ink-primary);
  font-weight: 500;
  margin-bottom: 12px;
}

.recording-circle-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.recording-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--colors-mauve-100);
  opacity: 0.5;
}

.recording-ring-outer {
  width: 180px;
  height: 180px;
  animation: ringPulse 2s ease-in-out infinite;
}

.recording-ring-mid {
  width: 150px;
  height: 150px;
  animation: ringPulse 2s ease-in-out infinite 0.5s;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(1.05); }
}

.recording-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--colors-violet-800);
  position: relative;
  z-index: 2;
  animation: circlePulse 1.6s ease-in-out infinite;
}

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

.recording-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 32px;
  margin-bottom: 14px;
  width: 200px;
}

.recording-waveform .wave-bar {
  width: 3px;
  background: var(--colors-mauve-100);
  border-radius: 2px;
  animation: waveBar 0.8s ease-in-out infinite;
}

.recording-waveform .wave-bar-strong {
  background: var(--colors-violet-900);
}

@keyframes waveBar {
  0%, 100% { height: 4px; opacity: 0.5; }
  50% { height: var(--wave-h, 20px); opacity: 1; }
}

/* Modo "en vivo": el JS controla la altura (--wave-h) en tiempo real según
   el volumen del micrófono. Quitamos la animación CSS y dejamos una
   transición corta para que el movimiento sea fluido pero reactivo. */
.recording-waveform.waveform-live .wave-bar {
  animation: none;
  height: var(--wave-h, 6px);
  opacity: 1;
  transition: height 0.08s linear;
}

.recording-timer {
  font-size: 15px;
  color: var(--ink-primary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ============================================= */
/* AUDIO CARD (Revisar grabado)                   */
/* ============================================= */

.audio-card {
  background: var(--colors-violet-900);
  border-radius: 16px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.audio-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-white);
  color: var(--colors-violet-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-card-avatar .lucide,
.audio-card-avatar svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

/* Avatar con foto real: la imagen llena el círculo y el icono queda de
   reserva (solo visible si la foto no carga). */
.audio-card-avatar-photo {
  overflow: hidden;
  padding: 0;
}
.audio-card-avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.audio-card-avatar .avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
/* En el chat de Marta el fallback usa el mismo patrón */
.chat-avatar .avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.audio-card-meta { flex: 1; }

.audio-card-mood {
  font-size: 17px;
  font-weight: 700;
  color: var(--surface-white);
}

.audio-card-author {
  font-size: 13px;
  color: var(--colors-mauve-100);
  margin-top: 2px;
}

.audio-player {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Barra de progreso PRIMERO */
.audio-player-track {
  width: 100%;
  height: 4px;
  background: var(--colors-violet-700);
  border-radius: 2px;
  overflow: hidden;
}

.audio-player-progress {
  height: 100%;
  background: var(--colors-mauve-100);
  width: 0%;
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* Tiempos DESPUÉS de la barra */
.audio-player-times {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 13px;
  color: var(--colors-mauve-100);
  font-variant-numeric: tabular-nums;
}

/* Play button centrado debajo */
.audio-play-btn {
  align-self: center;
  background: transparent;
  color: var(--surface-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  margin-top: 4px;
}

.audio-play-btn .lucide,
.audio-play-btn svg {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.audio-play-btn span[data-play-icon],
.audio-play-btn span[data-pause-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.audio-play-label {
  align-self: center;
  font-size: 14px;
  color: var(--surface-white);
}

/* ============================================= */
/* PUBLICAR (Identidad)                           */
/* ============================================= */

.identity-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.identity-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--colors-greenmint-500);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.identity-option:hover { opacity: 0.95; }

.identity-option.selected {
  background: var(--colors-violet-900);
}

.identity-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 2px solid var(--colors-violet-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--colors-violet-900);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.identity-option.selected .identity-checkbox {
  background: var(--surface-white);
  border-color: var(--surface-white);
}

.identity-checkbox .lucide,
.identity-checkbox svg {
  width: 18px;
  height: 18px;
  stroke-width: 3;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.identity-option.selected .identity-checkbox .lucide,
.identity-option.selected .identity-checkbox svg {
  opacity: 1;
}

.identity-label {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-right: 28px; /* Compensa el ancho del checkbox para centrar */
}

.identity-option.selected .identity-label {
  color: var(--surface-white);
}

/* ============================================= */
/* ENVIADO                                        */
/* ============================================= */

.success-icon {
  margin-bottom: 16px;
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon .lucide,
.success-icon svg {
  width: 56px;
  height: 56px;
  stroke-width: 2;
  color: var(--colors-greenmint-400);
}

.success-message {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
  text-align: center;
  max-width: 280px;
  line-height: 1.4;
}

/* ============================================= */
/* MODAL                                          */
/* ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 24, 42, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: fadeIn 0.2s ease-out;
  overflow-y: auto;     /* permite scroll del overlay si la pantalla es muy baja */
}

/* En la app web (preview) el "frame" del móvil está centrado: anclamos
   el modal a la phone-screen si existe, para que no cubra todo el viewport */
.phone-screen .modal-overlay {
  position: absolute;
}

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

.modal-card {
  background: var(--colors-greenmint-100);
  border-radius: 24px;
  padding: 36px 26px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 330px;
  max-height: calc(100% - 32px);  /* nunca más alto que el contenedor */
  overflow-y: auto;                /* si el contenido excede, scroll dentro del card */
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-icon .lucide, .modal-icon svg {
  width: 48px;
  height: 48px;
  stroke-width: 2;
  color: #FF5454;
}

.modal-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-primary);
  text-align: center;
  line-height: 1.3;
  padding: 0 8px;
}

.modal-desc {
  font-size: 14px;
  color: var(--ink-primary);
  text-align: center;
  line-height: 1.45;
  margin-bottom: 8px;
}

.modal-confirm { margin-top: 8px; }

/* ============================================= */
/* AJUSTES                                        */
/* ============================================= */

.screen-ajustes { padding: 16px 20px 24px; }

.screen-header {
  padding: 8px 0 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.screen-header h1 {
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-primary);
}

.settings-list { list-style: none; }

.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
}

.settings-item:hover { background: rgba(31, 24, 42, 0.03); }

.settings-label-legacy {
  flex: 1;
  font-size: 16px;
  color: var(--ink-primary);
  font-weight: 500;
}

.settings-chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-mute);
  stroke-width: 2;
}

/* ============================================= */
/* PLACEHOLDER                                    */
/* ============================================= */

.screen-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  min-height: 60vh;
}

.screen-placeholder h2 {
  font-weight: 700;
  font-size: 28px;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.screen-placeholder p {
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 24px;
}

.placeholder-back {
  background: var(--colors-violet-900);
  color: white;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

/* ============================================= */
/* INFO PROTOTIPO (Desktop)                       */
/* ============================================= */

.prototype-info {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.prototype-info-brand {
  font-weight: 900;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}

/* ============================================= */
/* SPLASH (logo animado de carga)                 */
/* ============================================= */

.splash {
  position: absolute;
  inset: 0;
  z-index: 2000;
  background: var(--background-ambient);
  background-color: #FFFFFF;  /* fallback si no soporta multi-background */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 44px;
  /* Permanece visible y luego desaparece */
  animation: splashOut 0.55s ease forwards;
  animation-delay: 2.2s;
}

/* Cuando el JS marca que el splash terminó, lo quitamos del flujo */
.splash.splash-done {
  display: none;
}

@keyframes splashOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); visibility: hidden; }
}

.splash-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-6px);
}

.splash-logo-svg {
  width: 220px;
  height: auto;
  overflow: visible;
}

/* El wordmark "Hablemus" aparece con un fade + leve subida */
.splash-wordmark-path {
  opacity: 0;
  transform: translateY(8px);
  transform-box: fill-box;
  transform-origin: center;
  animation: wordIn 0.7s ease forwards;
  animation-delay: 0.7s;
}

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

/* Los bocadillos entran con un pop escalonado */
.splash-bubble {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: bubblePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.splash-bubble-back  { animation-delay: 0.15s; }
.splash-bubble-mid   { animation-delay: 0.30s; }

@keyframes bubblePop {
  0%   { opacity: 0; transform: scale(0.4) translateY(6px); }
  60%  { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

/* Los dos trazos del bocadillo frontal se "dibujan" */
.splash-bubble-front {
  opacity: 0;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: fadeInStroke 0.2s ease forwards,
             drawStroke 0.8s ease forwards;
  animation-delay: 0.42s, 0.45s;
}

@keyframes fadeInStroke { to { opacity: 1; } }
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

/* Respeto a accesibilidad: sin movimiento si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .splash { animation-delay: 1.4s; }
  .splash-bubble, .splash-bubble-front, .splash-wordmark-path {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
    transform: none;
  }
}

/* ============================================= */
/* FLUJO RESPONDER / ESCUCHAR                     */
/* ============================================= */

.responder-list-title { margin-bottom: 4px; }

.message-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message-empty {
  text-align: center;
  color: var(--colors-violet-700);
  font-size: 14px;
  margin-top: 24px;
}

/* Tarjeta de mensaje (colapsada / expandida) */
.message-card {
  background: var(--colors-violet-900);
  border-radius: 16px;
  overflow: hidden;
}

.message-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.message-card-meta { flex: 1; min-width: 0; }

.message-card-chevron {
  color: var(--surface-white);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.message-card.expanded .message-card-chevron {
  transform: rotate(180deg);
}
.message-card-chevron .lucide,
.message-card-chevron svg { width: 22px; height: 22px; stroke-width: 2.2; }

.message-card .audio-card-avatar {
  width: 44px; height: 44px;
}

/* Contenedor que se despliega al expandir. Usamos max-height + opacity en
   lugar de grid, porque grid (0fr→1fr) deforma el contenido interior (la barra
   de tiempo se ve estirada mientras anima). Con max-height el contenido
   mantiene su tamaño real y solo se revela. */
.message-card-collapse {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.28s ease;
}
.message-card.expanded .message-card-collapse {
  max-height: 240px;   /* holgado: mayor que el alto real del cuerpo */
  opacity: 1;
  transition: max-height 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.32s ease 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  .message-card-collapse,
  .message-card-chevron { transition: none; }
}

.message-card-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 2px;
}

.message-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  background: transparent;
  border: none;
  color: var(--surface-white);
  font-size: 14px;
  cursor: pointer;
}

.message-action .lucide,
.message-action svg { width: 26px; height: 26px; stroke-width: 2; }

.message-action span[data-play-i],
.message-action span[data-pause-i] { display: inline-flex; }

/* ---- FILTROS ---- */
.filter-list {
  display: flex;
  flex-direction: column;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  border-bottom: 1px solid var(--colors-mauve-100);
  cursor: pointer;
}

.filter-mood {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-mood .lucide,
.filter-mood svg {
  width: 26px; height: 26px;
  stroke-width: 2;
  color: var(--colors-violet-900);
}

.filter-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
}

.filter-label-bold { font-weight: 800; }

.filter-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 2px solid var(--colors-violet-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--colors-violet-900);
  background: transparent;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.filter-checkbox .lucide,
.filter-checkbox svg {
  width: 18px; height: 18px;
  stroke-width: 3;
  opacity: 0;
  transition: opacity 0.12s ease;
}

/* Marcada: fondo oscuro de la app + palomita blanca */
.filter-row.checked .filter-checkbox {
  background: var(--colors-violet-900);
  border-color: var(--colors-violet-900);
  color: var(--surface-white);
}
.filter-row.checked .filter-checkbox .lucide,
.filter-row.checked .filter-checkbox svg { opacity: 1; }

/* Modal reportar: icono neutro (no rojo) */
.modal-icon-neutral .lucide,
.modal-icon-neutral svg { color: var(--colors-violet-900); }

.report-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 6px;
}

/* ============================================= */
/* MI ESPACIO                                     */
/* ============================================= */

.space-tabs {
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  margin-top: 4px;
  border-bottom: 1px solid var(--colors-mauve-100);
  gap: 8px;
}

.space-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 4px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--colors-violet-700);
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  min-height: 48px;
}

.space-tab.active {
  color: var(--ink-primary);
}

.space-tab.active::after {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: var(--colors-violet-900);
}

.space-body {
  padding-top: 14px;
}

.space-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 14px;
}

.space-day-label {
  font-size: 14px;
  color: var(--colors-violet-700);
  margin-bottom: 8px;
  margin-top: 6px;
}

.space-context-line {
  font-size: 13px;
  color: var(--colors-violet-700);
  margin: 14px 0 8px;
}

/* Tarjeta de respuesta: verde oscuro (recibida) o verde más cálido (enviada) */
.reply-card {
  background: #246F2E;       /* verde del SVG (Recibidos y Enviados) */
  color: var(--surface-white);
  margin-top: 10px;          /* separación de la card original (arriba) */
}

.reply-card-sent {
  background: #246F2E;       /* mismo verde que Recibidos */
}

.reply-card .reply-head {
  padding: 14px 14px 4px;
  gap: 12px;
  align-items: center;
}

.reply-card .audio-card-avatar {
  width: 40px;
  height: 40px;
}

.reply-card .message-card-meta {
  flex: 1;
  min-width: 0;
}

.reply-card .audio-card-mood {
  font-size: 15px;
  font-weight: 700;
  color: var(--surface-white);
  line-height: 1.2;
}

.reply-card .audio-card-author {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}

.reply-card .message-card-body {
  padding: 6px 16px 16px;
  gap: 10px;
}

.reply-card .audio-player-times {
  color: rgba(255,255,255,0.85);
}

.reply-track {
  background: rgba(255,255,255,0.25);
}

.reply-card .audio-player-progress {
  background: var(--surface-white);
}

/* Distribuciones de acciones según cantidad */
/* Mensajes propios desplegados (Mi Espacio):
   Borrar a la izquierda, Reproducir centrado en la card.
   Truco: 3 columnas equiespaciadas (1fr cada una): col1=Borrar, col2=Play, col3=vacío.
   Así el Play queda visualmente centrado. */
.message-actions-2 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 0;
}
.message-actions-2 .message-action {
  justify-self: center;
}
.message-actions-2 [data-delete] {
  justify-self: start;
}
.message-actions-3 { justify-content: space-between; }
.message-actions-4 { justify-content: space-between; }

/* En 3/4 acciones cada botón ocupa su contenido natural */
.message-actions-3 .message-action,
.message-actions-4 .message-action {
  flex: 0 0 auto;
}

/* Acción "info" (no clicable, p. ej. "Le gusto") */
.message-action-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--surface-white);
  font-size: 14px;
}

.message-action-info.dim { opacity: 0.5; }

.message-action-info .lucide,
.message-action-info svg { width: 26px; height: 26px; }

/* Corazón en estados de like. El SVG base de Lucide trae fill="none"
   como presentation attribute en el root; aplicamos también al path interno
   para garantizar el relleno rojo aunque haya conflictos de specificity. */
.liked-icon,
.liked-icon path,
.like-btn.liked .lucide,
.like-btn.liked svg,
.like-btn.liked svg path {
  color: #E64C4C;
  fill: #E64C4C !important;
  stroke: #E64C4C;
}

/* ============================================= */
/* AJUSTES                                        */
/* ============================================= */

.settings-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--colors-mauve-100);
  cursor: pointer;
  transition: background 0.12s ease;
}

.settings-item:active {
  background: rgba(31,24,42,0.04);
}

.settings-icon.lucide,
.settings-icon {
  width: 26px;
  height: 26px;
  color: var(--ink-primary);
  stroke-width: 2;
  flex-shrink: 0;
}

.settings-label {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
}

.settings-chevron.lucide,
.settings-chevron {
  width: 20px;
  height: 20px;
  color: var(--colors-violet-700);
  flex-shrink: 0;
}

.placeholder-text {
  text-align: center;
  color: var(--colors-violet-700);
  font-size: 16px;
  max-width: 280px;
}

/* Centrar acciones en Escuchar (1 sola: Reproducir) */
.message-actions-center { justify-content: center; }

/* ============================================= */
/* PANTALLA VALIDANDO (carga antes de enviar)     */
/* ============================================= */

.validating-spinner {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
}

.validating-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--colors-violet-900);
  border-right-color: var(--colors-violet-900);
  animation: spinnerRotate 0.9s linear infinite;
}

.validating-ring-2 {
  inset: 10px;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: var(--colors-greenmint-700);
  border-left-color: var(--colors-greenmint-700);
  animation: spinnerRotate 1.4s linear infinite reverse;
}

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

.validating-message {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

/* Lista de checks de validación */
.validating-checks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.validating-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--colors-violet-700);
  opacity: 0.4;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.check-state {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--colors-violet-700);
  flex-shrink: 0;
  position: relative;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* Paso pendiente (gris, opaco) */
.validating-check.pending {
  opacity: 0.4;
}

/* Paso en curso: spinner + texto en oscuro */
.validating-check.loading {
  opacity: 1;
  color: var(--ink-primary);
}
.validating-check.loading .check-state {
  border-color: var(--colors-violet-900);
  border-top-color: transparent;
  animation: spinnerRotate 0.7s linear infinite;
}

/* Paso completado: círculo verde con check */
.validating-check.done {
  opacity: 1;
  color: var(--ink-primary);
}
.validating-check.done .check-state {
  background: var(--colors-greenmint-700);
  border-color: var(--colors-greenmint-700);
  animation: none;
}
.validating-check.done .check-state::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .validating-ring,
  .validating-check.loading .check-state { animation: none; }
}

/* Audio card verde — usada cuando se revisa una RESPUESTA (Pedro) */
.audio-card.audio-card-reply {
  background: #246F2E;
  color: var(--surface-white);
}
.audio-card.audio-card-reply .audio-card-avatar {
  background: var(--surface-white);
  color: #246F2E;
}
.audio-card.audio-card-reply .audio-player-track {
  background: rgba(255,255,255,0.25);
}
.audio-card.audio-card-reply .audio-player-progress {
  background: var(--surface-white);
}
/* Todo el texto/números/icono en blanco sobre el verde */
.audio-card.audio-card-reply .audio-card-mood,
.audio-card.audio-card-reply .audio-card-author,
.audio-card.audio-card-reply .audio-player-times,
.audio-card.audio-card-reply .audio-play-label,
.audio-card.audio-card-reply .audio-play-btn {
  color: var(--surface-white);
}
.audio-card.audio-card-reply .audio-card-author,
.audio-card.audio-card-reply .audio-player-times {
  /* Algo más translúcidos para jerarquía pero perfectamente legibles */
  color: rgba(255,255,255,0.9);
}
.audio-card.audio-card-reply .audio-play-btn .lucide,
.audio-card.audio-card-reply .audio-play-btn svg {
  color: var(--surface-white);
}

/* ============================================= */
/* CHATBOT DE AYUDA                                */
/* ============================================= */

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 85%;
  animation: chatMsgIn 0.25s ease-out;
}

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

.chat-msg-bot { align-self: flex-start; }
.chat-msg-user { align-self: flex-end; flex-direction: row-reverse; }

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--colors-greenmint-200);
  color: var(--colors-violet-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.chat-avatar .lucide, .chat-avatar svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.chat-bubble {
  background: var(--surface-white);
  color: var(--ink-primary);
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid var(--colors-mauve-100);
  box-shadow: 0 1px 2px rgba(31, 24, 42, 0.04);
}

.chat-msg-bot .chat-bubble {
  border-bottom-left-radius: 4px;
}

.chat-msg-user .chat-bubble {
  background: var(--colors-violet-900);
  color: var(--surface-white);
  border-color: transparent;
  border-bottom-right-radius: 4px;
}

/* Indicador "escribiendo…" (3 puntos animados) */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--colors-violet-700);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  align-self: stretch;
  padding-left: 40px;  /* alineado con el avatar */
  animation: chatMsgIn 0.3s ease-out;
}

.chat-option {
  background: transparent;
  border: 1.5px solid var(--colors-violet-900);
  color: var(--colors-violet-900);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-option:hover {
  background: var(--colors-violet-900);
  color: var(--surface-white);
}

@media (prefers-reduced-motion: reduce) {
  .chat-msg, .chat-options { animation: none; }
  .chat-typing span { animation: none; }
}

/* ============================================= */
/* COACHMARK · tour guiado sobre el home          */
/* ============================================= */

.coachmark {
  position: absolute;
  inset: 0;
  z-index: 1500;
  pointer-events: none;  /* los hijos pintados arriba lo activan */
  animation: coachFadeIn 0.25s ease-out;
}

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

/* 4 rectángulos oscuros que rodean el "hueco" del spotlight */
.coachmark-mask {
  position: absolute;
  background: rgba(31, 24, 42, 0.78);
  pointer-events: auto;  /* bloquea clicks en el resto de la app */
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Spotlight: marco verde alrededor del elemento resaltado.
   NOTA: con el nuevo enfoque "highlight" (se resalta el elemento real,
   no un div flotante), el spotlight queda oculto. Se conserva por
   compatibilidad pero no se usa. */
.coachmark-spotlight {
  display: none;
}

/* NUEVO ENFOQUE — el elemento real resaltado se eleva sobre el overlay
   oscuro y recibe su propio brillo verde. Usa SU PROPIO border-radius,
   así que el marco SIEMPRE queda perfectamente redondeado, sin cálculos
   de JS ni divs flotantes que se puedan desalinear. */
.coach-highlight {
  position: relative;
  z-index: 1600;  /* por encima de las máscaras (que están a 1500) */
  pointer-events: none;  /* durante el tour la card no navega al tocarla */
  box-shadow: 0 0 0 3px var(--colors-greenmint-700),
              0 0 0 7px rgba(104, 184, 113, 0.35),
              0 0 24px rgba(104, 184, 113, 0.5);
  animation: coachPulse 1.8s ease-in-out infinite;
}

@keyframes coachPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px var(--colors-greenmint-700),
                0 0 0 7px rgba(104, 184, 113, 0.35),
                0 0 24px rgba(104, 184, 113, 0.4);
  }
  50% {
    box-shadow: 0 0 0 3px var(--colors-greenmint-700),
                0 0 0 11px rgba(104, 184, 113, 0.25),
                0 0 36px rgba(104, 184, 113, 0.65);
  }
}

/* Tooltip flotante con flecha — usa el gradient del splash para consistencia */
.coachmark-tooltip {
  position: absolute;
  background: var(--background-ambient);
  background-color: var(--surface-white);  /* fallback */
  border-radius: 14px;
  padding: 16px 18px 14px;
  box-shadow: 0 8px 24px rgba(31, 24, 42, 0.25);
  width: calc(100% - 40px);
  max-width: 320px;
  left: 20px;
  pointer-events: auto;
  transition: top 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Flecha del tooltip: por defecto apunta hacia arriba (tooltip debajo del target).
   Usa EXACTAMENTE el mismo fondo que el tooltip para que se funda con él y no
   se vea como una pieza independiente de otro color. */
.coachmark-arrow {
  position: absolute;
  top: -7px;
  width: 16px;
  height: 16px;
  background: var(--background-ambient);
  background-color: var(--surface-white);  /* fallback, igual que el tooltip */
  transform: rotate(45deg);
  border-radius: 2px;
  left: 32px;
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Si el tooltip está encima del target, la flecha apunta hacia abajo */
.coachmark-tooltip.arrow-down .coachmark-arrow {
  top: auto;
  bottom: -7px;
}

.coachmark-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 4px;
  line-height: 1.25;
}

.coachmark-text {
  font-size: 14px;
  color: var(--colors-violet-700);
  line-height: 1.45;
  margin-bottom: 14px;
}

.coachmark-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coachmark-step {
  font-size: 13px;
  color: var(--colors-violet-700);
  font-weight: 600;
}

.coachmark-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.coachmark-skip {
  background: transparent;
  border: none;
  color: var(--colors-violet-700);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  padding: 8px 10px;
  cursor: pointer;
}

.coachmark-next {
  background: var(--colors-violet-900);
  color: var(--surface-white);
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.coachmark-next:hover { opacity: 0.9; }

@media (prefers-reduced-motion: reduce) {
  .coachmark-spotlight { animation: none; }
  .coach-highlight { animation: none; }
  .coachmark-mask, .coachmark-spotlight, .coachmark-tooltip,
  .coachmark-arrow { transition: none; }
}

/* ============================================= */
/* CHAT FLOTANTE DE SOPORTE                       */
/* ============================================= */

/* Botón flotante (FAB): por defecto se ancla justo encima de la tab bar.
   En pantallas con varios botones de acción al pie (p. ej. "Volver a grabar"
   + "Compartir mensaje" + "Eliminar"), se eleva con la clase .fab-raised
   para no solaparse. */
.support-fab {
  position: absolute;
  right: 16px;
  bottom: 110px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--colors-violet-900);
  color: var(--surface-white);
  box-shadow: 0 6px 18px rgba(31, 24, 42, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  transition: transform 0.2s ease, opacity 0.2s ease;
  animation: fabPulse 2.6s ease-in-out infinite;
}
.support-fab:hover {
  transform: scale(1.06);
}
.support-fab.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
}
/* Sube el FAB cuando la pantalla tiene 1-3 botones de acción al pie */
.support-fab.fab-raised {
  bottom: 240px;
}
/* En las pantallas de filtros, el FAB se baja a la zona libre entre la lista
   y el botón "Aplicar filtros", para no taparse con las opciones.
   Gana a .fab-raised por ir después y con misma especificidad + !important. */
.support-fab.fab-lowered {
  bottom: 175px !important;
}
.support-fab .lucide,
.support-fab svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* Cuando el FAB de Marta está resaltado en el tour: necesita su propio
   z-index alto (vence al z-index:60 del FAB) y combinar su sombra base
   con el brillo verde del resaltado. */
.support-fab.coach-highlight {
  z-index: 1600 !important;
  animation: fabCoachPulse 1.8s ease-in-out infinite;
}

@keyframes fabCoachPulse {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(31, 24, 42, 0.32),
                0 0 0 3px var(--colors-greenmint-700),
                0 0 0 7px rgba(104, 184, 113, 0.35),
                0 0 24px rgba(104, 184, 113, 0.4);
  }
  50% {
    box-shadow: 0 6px 18px rgba(31, 24, 42, 0.32),
                0 0 0 3px var(--colors-greenmint-700),
                0 0 0 11px rgba(104, 184, 113, 0.25),
                0 0 36px rgba(104, 184, 113, 0.65);
  }
}

/* Pequeño halo verde pulsante para llamar la atención (sutil) */
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(31, 24, 42, 0.32), 0 0 0 0 rgba(104, 184, 113, 0.5); }
  50% { box-shadow: 0 6px 18px rgba(31, 24, 42, 0.32), 0 0 0 8px rgba(104, 184, 113, 0); }
}

/* Backdrop oscuro detrás del panel del chat (mismo estilo que modales) */
.support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 24, 42, 0.75);
  z-index: 65;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.support-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Panel de chat: nunca llega al área de notificación arriba ni
   a la tab bar abajo. Se desliza desde abajo-derecha. */
.support-panel {
  position: absolute;
  right: 12px;
  left: 12px;
  bottom: 100px;
  top: 80px;              /* deja libre la parte de arriba (status bar + notice) */
  max-height: none;
  background: var(--surface-white);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(31, 24, 42, 0.28);
  display: flex;
  flex-direction: column;
  z-index: 70;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.support-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.support-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: var(--colors-violet-900);
  color: var(--surface-white);
  flex-shrink: 0;
}
.support-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--colors-greenmint-700);
  color: var(--surface-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.support-header-avatar .lucide,
.support-header-avatar svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
.support-header-text { flex: 1; min-width: 0; }
.support-header-title {
  font-size: 15px;
  font-weight: 700;
}
.support-header-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 6px;
}
.support-header-sub::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--colors-greenmint-400);
  display: inline-block;
}
.support-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: var(--surface-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.support-close .lucide,
.support-close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.support-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #FAFAFB 0%, #F4F4F7 100%);
}

.support-msg {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 85%;
  animation: supportMsgIn 0.22s ease-out;
}
@keyframes supportMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.support-msg-bot { align-self: flex-start; }
.support-msg-user { align-self: flex-end; flex-direction: row-reverse; }

.support-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--colors-greenmint-200);
  color: var(--colors-violet-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.support-avatar .lucide,
.support-avatar svg { width: 14px; height: 14px; stroke-width: 2; }

.support-bubble {
  background: var(--surface-white);
  color: var(--ink-primary);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  border: 1px solid var(--colors-mauve-100);
  box-shadow: 0 1px 2px rgba(31, 24, 42, 0.04);
  word-wrap: break-word;
}
.support-msg-bot .support-bubble { border-bottom-left-radius: 4px; }
.support-msg-user .support-bubble {
  background: var(--colors-violet-900);
  color: var(--surface-white);
  border-color: transparent;
  border-bottom-right-radius: 4px;
}

.support-typing {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
}
.support-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--colors-violet-700);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.support-typing span:nth-child(2) { animation-delay: 0.15s; }
.support-typing span:nth-child(3) { animation-delay: 0.3s; }

.support-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-white);
  border-top: 1px solid var(--colors-mauve-100);
  flex-shrink: 0;
}
.support-input {
  flex: 1;
  border: 1px solid var(--colors-mauve-100);
  background: #F7F7F9;
  border-radius: 22px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ink-primary);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 44px;
}
.support-input:focus {
  border-color: var(--colors-violet-900);
  background: var(--surface-white);
}
.support-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--colors-violet-900);
  color: var(--surface-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, background 0.15s ease;
}
.support-send:hover { background: #2D2438; }
.support-send:active { transform: scale(0.94); }
.support-send .lucide,
.support-send svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  /* el icono send tiene cierta inclinación, lo centramos visualmente */
  transform: translateX(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .support-fab { animation: none; }
  .support-msg { animation: none; }
  .support-typing span { animation: none; }
}

/* ============================================= */
/* FOCUS VISIBLE (accesibilidad por teclado)      */
/* ============================================= */
/* Anillo verde claro y consistente alrededor del elemento enfocado.
   Solo aparece con teclado (no clicks de ratón) gracias a :focus-visible. */

*:focus { outline: none; }

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible,
.message-action:focus-visible,
.action-card:focus-visible,
.tab-item:focus-visible,
.space-tab:focus-visible,
.settings-item:focus-visible,
.chat-option:focus-visible,
.coachmark-tooltip button:focus-visible,
.support-fab:focus-visible,
.support-close:focus-visible,
.support-send:focus-visible {
  outline: 3px solid var(--colors-greenmint-700);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Inputs: anillo + cambio sutil de borde */
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--colors-greenmint-700);
  outline-offset: 1px;
}

/* Elementos redondos: outline circular */
.flow-back:focus-visible,
.support-fab:focus-visible,
.support-close:focus-visible,
.support-send:focus-visible {
  border-radius: 50%;
}

/* Botones de pregunta rápida del chatbot (mismo estilo que árbol Ayuda) */
.support-quick-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0 32px;   /* alineado con el inicio de las burbujas del bot */
  animation: supportMsgIn 0.3s ease-out;
}
.support-quick-option {
  background: transparent;
  border: 1.5px solid var(--colors-violet-900);
  color: var(--colors-violet-900);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.support-quick-option:hover {
  background: var(--colors-violet-900);
  color: var(--surface-white);
}

/* Avatar de Marta — soporta imagen PNG con fallback a icono Lucide */
.support-header-img,
.support-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  /* Interpolación suave para imágenes pequeñas escaladas hacia arriba */
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}
.support-header-fallback,
.support-avatar-fallback {
  /* Oculto por defecto; se muestra (display:flex) si la imagen falla al cargar */
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.support-header-avatar,
.support-avatar {
  overflow: hidden;
}

/* ============================================= */
/* AJUSTES · subpantallas (cuenta, identidad,    */
/* notificaciones, accesibilidad, privacidad)    */
/* ============================================= */

.set-body { padding: 4px 0 24px; }

.set-intro {
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.5;
  margin: 0 0 18px;
  padding: 0 2px;
}

.set-group {
  background: var(--surface-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--colors-greenmint-500);
  overflow: hidden;
  margin-bottom: 18px;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
}
.set-row + .set-row { border-top: 1px solid var(--line); }

.set-row-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-row-label { font-size: 16px; font-weight: 700; color: var(--ink-primary); }
.set-row-desc { font-size: 13px; color: var(--ink-mute); line-height: 1.35; }
.set-row-value { font-size: 16px; color: var(--ink-mute); flex-shrink: 0; }

/* Toggle accesible (role=switch) */
.set-toggle {
  flex: 0 0 auto;
  width: 52px; height: 30px;
  border-radius: 999px;
  border: none;
  background: var(--colors-mauve-100);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
}
.set-toggle.on { background: var(--colors-greenmint-700); }
.set-toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s cubic-bezier(0.22,0.61,0.36,1);
}
.set-toggle.on .set-toggle-knob { transform: translateX(22px); }

.set-section-title {
  font-size: 13px; font-weight: 700; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 0 0 8px 2px;
}

.set-danger-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-button);
  border: 1.5px solid #C0392B;
  background: transparent;
  color: #C0392B;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.set-danger-btn:active { background: rgba(192,57,43,0.06); }

/* Vista previa accesibilidad */
.set-preview-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-white);
  border: 1px solid var(--colors-greenmint-500);
  border-radius: var(--radius-card);
  padding: 14px 16px;
}
.set-preview-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--colors-violet-900); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.set-preview-avatar svg { width: 22px; height: 22px; }
.set-preview-title { font-size: 16px; font-weight: 700; color: var(--ink-primary); }
.set-preview-sub { font-size: 14px; color: var(--ink-mute); }

/* Modos globales de accesibilidad (clase en <html>) */
/* Texto más grande: agranda de forma garantizada los textos clave.
   Usamos !important y tamaños absolutos por tipo para evitar que el cálculo
   relativo (em) los encoja en contenedores con font-size pequeño. */
.a11y-text-large .home-title { font-size: 34px !important; }
.a11y-text-large .home-name { font-size: 22px !important; }
.a11y-text-large .flow-title { font-size: 24px !important; }
.a11y-text-large .flow-question { font-size: 24px !important; }
.a11y-text-large .flow-subtitle { font-size: 18px !important; }
.a11y-text-large .action-content h3 { font-size: 20px !important; }
.a11y-text-large .action-content p { font-size: 16px !important; }
.a11y-text-large .btn-primary,
.a11y-text-large .btn-soft { font-size: 19px !important; }
.a11y-text-large .settings-label { font-size: 19px !important; }
.a11y-text-large .audio-card-mood { font-size: 20px !important; }
.a11y-text-large .audio-card-author { font-size: 16px !important; }
.a11y-text-large .set-row-label { font-size: 19px !important; }
.a11y-text-large .set-row-desc { font-size: 15px !important; }
.a11y-text-large .space-tab { font-size: 18px !important; }
.a11y-text-large .filter-label { font-size: 19px !important; }
.a11y-text-large .message-action span { font-size: 15px !important; }

.a11y-high-contrast {
  --ink-soft: #2A2336;
  --ink-mute: #3A3248;
  --line: #9A93A6;
}
.a11y-high-contrast .action-card,
.a11y-high-contrast .set-group,
.a11y-high-contrast .set-preview-card,
.a11y-high-contrast .audio-card,
.a11y-high-contrast .message-card {
  border-color: var(--ink-primary);
  border-width: 2px;
}

/* Subtítulo informativo colocado debajo de la card (pantalla de revisar) */
.flow-subtitle-below {
  text-align: center;
  margin-top: 18px;
  color: var(--ink-mute);
}

/* Filas de elección (radio) en Ajustes — p.ej. Identidad por defecto */
.set-row-choice {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.set-choice-check {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--colors-mauve-100);
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.set-choice-check svg { width: 16px; height: 16px; stroke-width: 3; }
.set-row-choice.chosen .set-choice-check {
  background: var(--colors-violet-900);
  border-color: var(--colors-violet-900);
  color: #fff;
}
