:root {
  --bg-page: #050308;
  --bg-deep: #09040c;
  --glass-main: rgba(22, 8, 18, 0.72);
  --glass-soft: rgba(255, 150, 205, 0.08);
  --glass-panel: rgba(18, 8, 17, 0.68);
  --glass-panel-strong: rgba(32, 10, 27, 0.78);
  --glass-white: rgba(255, 255, 255, 0.10);
  --glass-white-strong: rgba(255, 255, 255, 0.18);
  --neon-pink: #ff4fa3;
  --neon-pink-hot: #ff1f8f;
  --neon-pink-soft: rgba(255, 79, 163, 0.44);
  --neon-magenta: #ff2fbc;
  --neon-cyan: #7cecff;
  --text-main: #ffe5f2;
  --text-soft: rgba(255, 225, 241, 0.78);
  --text-muted: rgba(255, 225, 241, 0.58);
  --text-response: rgba(255, 236, 246, 0.92);
  --text-active: #ff9bd0;
  --shadow-main:
    0 24px 70px rgba(0, 0, 0, 0.66),
    0 0 58px rgba(255, 31, 143, 0.20);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease;
  --transition-mid: 0.28s ease;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-page);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 79, 163, 0.22), transparent 34%),
    radial-gradient(circle at 8% 18%, rgba(255, 47, 188, 0.18), transparent 30%),
    radial-gradient(circle at 92% 14%, rgba(124, 236, 255, 0.12), transparent 34%),
    radial-gradient(circle at 50% 115%, rgba(255, 31, 143, 0.18), transparent 42%),
    linear-gradient(180deg, #09030b 0%, #050308 54%, #08030a 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 18%, black 0%, transparent 72%);
  opacity: 0.38;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: -30%;
  pointer-events: none;
  background:
    conic-gradient(from 140deg at 50% 50%,
      transparent,
      rgba(255, 79, 163, 0.08),
      transparent,
      rgba(124, 236, 255, 0.045),
      transparent);
  animation: ambientRotate 22s linear infinite;
  opacity: 0.7;
  z-index: 0;
}

.chat-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 58px 12px 24px;
}

.console-frame {
  width: 100%;
  max-width: 430px;
  perspective: 1200px;
}

.console-card {
  position: relative;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 16%, transparent 84%, rgba(255, 79, 163, 0.14)),
    radial-gradient(circle at 20% 5%, rgba(255,255,255,0.18), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(255, 79, 163, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(28, 10, 24, 0.76), rgba(8, 3, 8, 0.92));
  border: 1px solid rgba(255, 156, 208, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -28px 55px rgba(255, 31, 143, 0.06),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 34px rgba(255, 47, 188, 0.18),
    0 0 72px rgba(255, 31, 143, 0.14),
    var(--shadow-main);
  backdrop-filter: blur(28px) saturate(1.22);
  -webkit-backdrop-filter: blur(28px) saturate(1.22);
  overflow: hidden;
  animation: consoleBreath 5.6s ease-in-out infinite;
}

.console-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-xl) - 1px);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.24), transparent 22%, transparent 68%, rgba(255, 79, 163, 0.12)),
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 32%, transparent 78%, rgba(255, 79, 163, 0.10));
  pointer-events: none;
  z-index: 1;
}

.console-card::after {
  content: "";
  position: absolute;
  top: -18%;
  left: -52%;
  width: 78%;
  height: 150%;
  background:
    linear-gradient(115deg,
      transparent 0%,
      rgba(255,255,255,0.00) 34%,
      rgba(255,255,255,0.20) 47%,
      rgba(255, 79, 163, 0.16) 53%,
      transparent 68%);
  transform: rotate(7deg);
  pointer-events: none;
  opacity: 0.44;
  z-index: 3;
  animation: glassSweep 7.4s ease-in-out infinite;
}

.console-card > * {
  position: relative;
  z-index: 2;
}

.console-card.is-speaking,
.console-card.is-video-playing {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -28px 55px rgba(255, 31, 143, 0.08),
    0 0 0 1px rgba(255, 156, 208, 0.28),
    0 0 38px rgba(255, 47, 188, 0.38),
    0 0 86px rgba(255, 31, 143, 0.26),
    0 28px 78px rgba(0, 0, 0, 0.72);
  animation: consoleLive 2.8s ease-in-out infinite;
}

/* HEADER */

.paula-header {
  margin: 13px 13px 10px;
  padding: 18px 16px 16px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 13% 15%, rgba(255,255,255,0.16), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    rgba(15, 7, 14, 0.52);
  border: 1px solid rgba(255, 170, 218, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -14px 28px rgba(255, 31, 143, 0.05),
    0 10px 28px rgba(0,0,0,0.26),
    0 0 26px rgba(255, 31, 143, 0.10);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.console-title {
  margin: 0;
  text-align: center;
  font-size: 27px;
  line-height: 1.08;
  font-weight: 720;
  letter-spacing: -0.5px;
  color: #ff86c1;
  text-shadow:
    0 0 12px rgba(255, 79, 163, 0.48),
    0 0 30px rgba(255, 31, 143, 0.22);
}

.console-subtitle {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.32;
  color: rgba(255, 236, 246, 0.88);
}

.console-description {
  margin: 10px 0 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.42;
  color: var(--text-soft);
}

/* HERO / PANTALLA */

.console-hero {
  height: auto;
  padding: 8px 13px 13px;
  overflow: visible;
  position: relative;
}

.paula-stage {
  position: relative;
  width: 100%;
  margin: 0 auto;
  z-index: 2;
  transform-origin: center bottom;
  animation: paulaIdle 7.5s ease-in-out infinite;
}

.paula-screen {
  position: relative;
  width: 100%;
  border-radius: 32px;
  padding: 9px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 156, 208, 0.32), transparent 36%),
    linear-gradient(145deg, rgba(255, 129, 190, 0.34), rgba(50, 12, 38, 0.72) 44%, rgba(9, 3, 10, 0.92)),
    rgba(12, 4, 12, 0.86);
  border: 1px solid rgba(255, 162, 214, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -14px 28px rgba(255, 31, 143, 0.10),
    0 16px 42px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 28px rgba(255, 47, 188, 0.26),
    0 0 60px rgba(255, 31, 143, 0.16);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  animation: paulaScreenLive 4.2s ease-in-out infinite;
}

.paula-screen::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 26px;
  border: 1px solid rgba(255, 212, 235, 0.18);
  pointer-events: none;
  z-index: 5;
}

.paula-screen::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 23px;
  background:
    linear-gradient(rgba(255, 79, 163, 0.035) 1px, transparent 1px);
  background-size: 100% 6px;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.38;
  z-index: 6;
}

.paula-screen-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 62% 45%, rgba(255, 47, 188, 0.22), transparent 34%),
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.12), transparent 28%),
    linear-gradient(90deg, transparent, rgba(255, 79, 163, 0.08), transparent);
  pointer-events: none;
  z-index: 1;
}

.paula-screen-reflection {
  position: absolute;
  top: 13px;
  left: 17px;
  width: 42%;
  height: 62%;
  border-radius: 28px;
  background: linear-gradient(120deg, rgba(255,255,255,0.22), transparent 60%);
  transform: skewX(-11deg);
  pointer-events: none;
  z-index: 7;
  opacity: 0.42;
}

.paula-actor {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 79, 163, 0.22), transparent 45%),
    rgba(10, 4, 10, 0.82);
  transform-origin: center bottom;
  transition: transform var(--transition-mid), filter var(--transition-mid);
}

.paula-actor::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 63% 50%, transparent 0 24%, rgba(255, 79, 163, 0.16) 26%, transparent 36%),
    radial-gradient(circle at 63% 50%, transparent 0 35%, rgba(255, 79, 163, 0.09) 37%, transparent 46%);
  pointer-events: none;
  z-index: 4;
  opacity: 0.8;
}

.paula-actor.look-left {
  transform: translateX(-3px) rotate(-0.25deg) scale(1.006);
}

.paula-actor.look-center {
  transform: translateX(0) rotate(0deg) scale(1.008);
}

.paula-actor.look-right {
  transform: translateX(3px) rotate(0.25deg) scale(1.006);
}

.paula-actor.reacting {
  filter: brightness(1.06) saturate(1.08);
}

.paula-actor.reacting.look-center {
  transform: translateX(0) translateY(-4px) rotate(0.08deg) scale(1.022);
}

.paula-image,
.paula-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
}

.paula-image {
  display: block;
  filter:
    saturate(1.08)
    contrast(1.03)
    drop-shadow(0 10px 16px rgba(0,0,0,0.24));
}

.paula-video {
  display: none;
  background: #070307;
}

.paula-actor.has-video .paula-image {
  display: none;
}

.paula-actor.has-video .paula-video {
  display: block;
}

/* PLAY INTRO */

.paula-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 60px;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 31, 143, 0.10), transparent 34%),
    rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.play-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,0.90), rgba(255, 156, 208, 0.42) 24%, transparent 30%),
    linear-gradient(145deg, #ff7abb, #ff1f8f 46%, #9d0d61);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-4px);
  border: 1px solid rgba(255,255,255,0.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.44),
    inset 0 -8px 14px rgba(89, 0, 50, 0.26),
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 0 18px rgba(255, 31, 143, 0.58),
    0 0 44px rgba(255, 31, 143, 0.30);
  animation: playPulse 1.7s ease-in-out infinite;
}

.play-button::before {
  content: "";
  display: block;
  margin-left: 4px;
  width: 0;
  height: 0;
  border-left: 14px solid white;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.52));
}

/* PANEL */

.console-panel {
  margin: 0 13px 13px;
  padding: 13px 12px 15px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.035)),
    rgba(12, 5, 12, 0.70);
  border: 1px solid rgba(255, 158, 212, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    inset 0 -16px 28px rgba(255, 31, 143, 0.045),
    0 16px 38px rgba(0,0,0,0.32),
    0 0 28px rgba(255, 31, 143, 0.10);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  transition: background var(--transition-mid), box-shadow var(--transition-mid);
}

.console-panel.mode-active {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045)),
    rgba(15, 6, 14, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -16px 28px rgba(255, 31, 143, 0.055),
    0 17px 40px rgba(0,0,0,0.36),
    0 0 34px rgba(255, 31, 143, 0.14);
}

/* TOPBAR */

.paula-topbar {
  width: 100%;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 9px;
  gap: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
    rgba(10, 4, 10, 0.72);
  border: 1px solid rgba(255, 158, 212, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    inset 0 -8px 16px rgba(255, 31, 143, 0.05),
    0 10px 26px rgba(0,0,0,0.28),
    0 0 18px rgba(255, 31, 143, 0.12);
  backdrop-filter: blur(18px) saturate(1.20);
  -webkit-backdrop-filter: blur(18px) saturate(1.20);
}

.top-btn {
  width: 37px;
  min-width: 37px;
  height: 37px;
  border-radius: 50%;
  border: 1px solid rgba(255, 164, 216, 0.44);
  background:
    radial-gradient(circle at 32% 20%, rgba(255,255,255,0.34), transparent 29%),
    linear-gradient(145deg, rgba(255, 129, 190, 0.20), rgba(255, 31, 143, 0.08)),
    rgba(12, 4, 12, 0.82);
  color: #ffacd7;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -7px 12px rgba(255, 31, 143, 0.08),
    0 6px 15px rgba(0,0,0,0.28),
    0 0 12px rgba(255, 31, 143, 0.16);
  font-size: 0;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast),
    opacity var(--transition-fast);
}

.top-btn:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.045);
  border-color: rgba(255, 185, 226, 0.72);
  background:
    radial-gradient(circle at 32% 20%, rgba(255,255,255,0.42), transparent 29%),
    linear-gradient(145deg, rgba(255, 129, 190, 0.28), rgba(255, 31, 143, 0.14)),
    rgba(18, 6, 17, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.26),
    inset 0 -7px 12px rgba(255, 31, 143, 0.10),
    0 8px 18px rgba(0,0,0,0.32),
    0 0 18px rgba(255, 31, 143, 0.30),
    0 0 34px rgba(255, 47, 188, 0.18);
}

.top-btn:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

#backBtn {
  display: none;
}

.top-icon {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 0 4px rgba(255, 79, 163, 0.50))
    drop-shadow(0 1px 1px rgba(0,0,0,0.32));
}

#backBtn .top-icon {
  width: 27px;
  height: 27px;
  stroke-width: 3.25;
  color: #ffc0df;
}

#homeBtn .top-icon {
  width: 23px;
  height: 23px;
  stroke-width: 2.65;
}

#listenButton.is-muted {
  opacity: 0.56;
  background:
    radial-gradient(circle at 32% 20%, rgba(255,255,255,0.18), transparent 29%),
    rgba(22, 12, 20, 0.76);
}

#listenButton.is-muted .top-icon {
  color: rgba(255, 225, 241, 0.60);
  filter: none;
}

#micButton.is-recording {
  animation: micPulse 1s ease-in-out infinite;
  border-color: rgba(255, 210, 234, 0.90);
  background:
    radial-gradient(circle at 32% 20%, rgba(255,255,255,0.42), transparent 28%),
    linear-gradient(145deg, rgba(255, 120, 190, 0.40), rgba(255, 31, 143, 0.26)),
    rgba(28, 6, 24, 0.92);
}

.top-input {
  flex: 1 1 auto;
  min-width: 145px;
  height: 37px;
  padding: 0 13px;
  border: 1px solid rgba(255, 158, 212, 0.24);
  outline: none;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025)),
    rgba(5, 2, 6, 0.48);
  color: rgba(255, 240, 248, 0.94);
  font-size: 13.5px;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -5px 12px rgba(255, 31, 143, 0.035),
    0 0 14px rgba(255, 31, 143, 0.08);
}

.top-input::placeholder {
  color: rgba(255, 225, 241, 0.56);
  font-size: 13.5px;
  opacity: 1;
}

.top-input:focus {
  border-color: rgba(255, 164, 216, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -5px 12px rgba(255, 31, 143, 0.05),
    0 0 18px rgba(255, 31, 143, 0.22);
}

/* RESPUESTA */

.console-response {
  margin: 0 0 10px;
  font-size: 14.2px;
  line-height: 1.58;
  text-align: center;
  color: var(--text-response);
  min-height: 0;
  max-height: 245px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 79, 163, 0.45) transparent;
}

.console-response.active {
  opacity: 1;
  padding: 13px 13px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.025)),
    rgba(9, 3, 9, 0.58);
  border: 1px solid rgba(255, 158, 212, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 8px 20px rgba(0,0,0,0.22),
    0 0 16px rgba(255, 31, 143, 0.08);
}

.console-response.typing::after {
  content: "▍";
  margin-left: 2px;
  animation: cursorBlink 0.8s infinite;
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 79, 163, 0.55);
}

.console-response a {
  color: #ff9bd0;
  font-weight: 760;
  text-decoration: underline;
  word-break: break-word;
  text-shadow: 0 0 10px rgba(255, 79, 163, 0.28);
}

.response-highlight {
  background: rgba(255, 79, 163, 0.08);
  color: var(--text-active);
  border-radius: 18px;
  padding: 13px 14px;
  font-weight: 560;
}

/* INDICADORES */

.speaking-indicator {
  display: flex;
  justify-content: center;
  gap: 6px;
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.25s ease;
  margin: 0;
}

.speaking-indicator.active {
  height: 18px;
  opacity: 1;
  margin-bottom: 8px;
}

.speaking-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff7abb;
  box-shadow:
    0 0 8px rgba(255, 79, 163, 0.62),
    0 0 18px rgba(255, 31, 143, 0.34);
  animation: speakDots 0.9s infinite ease-in-out;
}

.speaking-indicator span:nth-child(2) {
  animation-delay: 0.12s;
}

.speaking-indicator span:nth-child(3) {
  animation-delay: 0.24s;
}

.console-mode {
  display: flex;
  justify-content: center;
  margin: 0 0 11px;
}

.console-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035)),
    rgba(255, 79, 163, 0.08);
  border: 1px solid rgba(255, 158, 212, 0.26);
  color: #ff9bd0;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.25px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 18px rgba(255, 31, 143, 0.12);
  animation: softPulse 1.9s ease-in-out infinite;
}

/* OPCIONES */

.console-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.console-option {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 13px 16px;
  border-radius: var(--radius-pill);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.14), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.115), rgba(255,255,255,0.035)),
    rgba(10, 4, 10, 0.72);
  backdrop-filter: blur(20px) saturate(1.20);
  -webkit-backdrop-filter: blur(20px) saturate(1.20);
  border: 1px solid rgba(255, 158, 212, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -9px 18px rgba(255, 31, 143, 0.05),
    0 8px 20px rgba(0,0,0,0.24),
    0 0 14px rgba(255, 31, 143, 0.10);
  font-size: 14px;
  color: rgba(255, 232, 244, 0.92);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    opacity var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.console-option::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 8px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(255, 79, 163, 0.72), rgba(255, 79, 163, 0.26) 46%, transparent 76%);
  filter: blur(6px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
  transition: opacity var(--transition-fast), filter var(--transition-fast);
}

.console-option::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.045) 38%, transparent 74%),
    linear-gradient(115deg, transparent 0%, transparent 38%, rgba(255,255,255,0.10) 48%, transparent 58%);
  transform: translateX(-110%);
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.console-option > * {
  position: relative;
  z-index: 1;
}

.console-option:hover {
  transform: translateY(-2px);
  color: #ffe5f2;
  border-color: rgba(255, 185, 226, 0.72);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.20), transparent 27%),
    linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.045)),
    rgba(18, 6, 17, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -9px 18px rgba(255, 31, 143, 0.075),
    0 11px 24px rgba(0,0,0,0.30),
    0 0 20px rgba(255, 31, 143, 0.26),
    0 0 42px rgba(255, 47, 188, 0.12);
}

.console-option:hover::before {
  opacity: 0.92;
  filter: blur(7px);
}

.console-option:hover::after {
  opacity: 1;
  animation: glassButtonShine 1.1s ease forwards;
}

#secondaryOptions .console-option {
  min-height: 51px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.12), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025)),
    rgba(8, 3, 8, 0.72);
}

.console-option.used {
  display: none;
}

.text {
  flex: 1;
  text-align: left;
  font-size: 14px;
  line-height: 1.32;
}

.arrow {
  color: #ff9bd0;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(255, 79, 163, 0.58),
    0 0 18px rgba(255, 31, 143, 0.30);
}

/* WHATSAPP */

.whatsapp-fixed {
  position: sticky;
  bottom: 10px;
  margin: 14px auto 10px;
  padding: 13px 15px;
  border-radius: 999px;
  width: fit-content;
  min-width: 164px;
  max-width: calc(100% - 28px);
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,0.48), transparent 24%),
    linear-gradient(145deg, rgba(37, 211, 102, 0.98), rgba(18, 140, 126, 0.98));
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-weight: 820;
  font-size: 16px;
  letter-spacing: 0.1px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -8px 16px rgba(0, 75, 57, 0.24),
    0 10px 22px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(37, 211, 102, 0.32);
  z-index: 5;
  overflow: hidden;
  transform: translateY(0);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

.whatsapp-fixed::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 18px;
  right: 18px;
  height: 45%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.06));
  pointer-events: none;
  opacity: 0.72;
}

.whatsapp-fixed::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.20) 28%, transparent 48%);
  transform: translateX(-120%);
  animation: whatsappShine 4.8s ease-in-out infinite;
  pointer-events: none;
}

.whatsapp-fixed:hover {
  transform: translateY(-2px);
  filter: saturate(1.07) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -8px 16px rgba(0, 75, 57, 0.24),
    0 14px 28px rgba(0, 0, 0, 0.36),
    0 0 32px rgba(37, 211, 102, 0.40);
}

.whatsapp-fixed:active {
  transform: translateY(1px) scale(0.985);
}

.wa-icon {
  width: 31px;
  height: 31px;
  display: block;
  position: relative;
  z-index: 2;
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22))
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.20));
}

.whatsapp-fixed span {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 70, 50, 0.36);
}

/* FOOTER */

.console-footer {
  margin: 8px 14px 16px;
  padding: 12px 12px 13px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(9, 3, 9, 0.52);
  border: 1px solid rgba(255, 158, 212, 0.18);
  color: rgba(255, 225, 241, 0.52);
  text-align: center;
  font-size: 10.5px;
  line-height: 1.38;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 16px rgba(255, 31, 143, 0.06);
}

.console-footer p {
  margin: 0;
}

.console-footer p + p {
  margin-top: 4px;
}

/* LAZO ROSA */

.fixed-health-ribbon {
  display: block;
  width: 12px !important;
  max-width: 12px !important;
  height: auto;
  margin: 5px auto 1px;
  opacity: 0.94;
  object-fit: contain;
  filter:
    drop-shadow(0 1px 2px rgba(0,0,0,0.22))
    drop-shadow(0 0 7px rgba(255, 79, 163, 0.35));
}

/* ANIMACIONES */

@keyframes ambientRotate {
  0% {
    transform: rotate(0deg) scale(1);
  }
  100% {
    transform: rotate(360deg) scale(1.02);
  }
}

@keyframes consoleBreath {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.30),
      inset 0 -28px 55px rgba(255, 31, 143, 0.06),
      0 0 0 1px rgba(255,255,255,0.08),
      0 0 32px rgba(255, 47, 188, 0.16),
      0 0 66px rgba(255, 31, 143, 0.12),
      var(--shadow-main);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.34),
      inset 0 -28px 55px rgba(255, 31, 143, 0.08),
      0 0 0 1px rgba(255, 156, 208, 0.22),
      0 0 42px rgba(255, 47, 188, 0.28),
      0 0 84px rgba(255, 31, 143, 0.18),
      var(--shadow-main);
  }
}

@keyframes consoleLive {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.055);
  }
}

@keyframes glassSweep {
  0%, 56% {
    transform: translateX(0) rotate(7deg);
    opacity: 0.18;
  }
  72% {
    transform: translateX(172%) rotate(7deg);
    opacity: 0.48;
  }
  100% {
    transform: translateX(172%) rotate(7deg);
    opacity: 0;
  }
}

@keyframes paulaIdle {
  0% {
    transform: translateY(0) scale(1) rotate(-0.10deg);
  }
  50% {
    transform: translateY(2px) scale(1.004) rotate(0.10deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(-0.10deg);
  }
}

@keyframes paulaScreenLive {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.30),
      inset 0 -14px 28px rgba(255, 31, 143, 0.10),
      0 16px 42px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(255,255,255,0.06),
      0 0 28px rgba(255, 47, 188, 0.26),
      0 0 60px rgba(255, 31, 143, 0.16);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.34),
      inset 0 -14px 28px rgba(255, 31, 143, 0.12),
      0 16px 45px rgba(0, 0, 0, 0.48),
      0 0 0 1px rgba(255, 156, 208, 0.22),
      0 0 38px rgba(255, 47, 188, 0.36),
      0 0 72px rgba(255, 31, 143, 0.22);
  }
}

@keyframes playPulse {
  0%, 100% {
    transform: translateX(-4px) scale(1);
  }
  50% {
    transform: translateX(-4px) scale(1.075);
  }
}

@keyframes speakDots {
  0%, 80%, 100% {
    transform: scale(0.7);
    opacity: 0.45;
  }
  40% {
    transform: scale(1.16);
    opacity: 1;
  }
}

@keyframes softPulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 0 rgba(255, 31, 143, 0);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 0 0 6px rgba(255, 31, 143, 0.06);
  }
}

@keyframes micPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.24),
      0 0 0 0 rgba(255, 79, 163, 0.34),
      0 0 16px rgba(255, 31, 143, 0.30);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.28),
      0 0 0 8px rgba(255, 79, 163, 0.10),
      0 0 26px rgba(255, 31, 143, 0.42);
  }
}

@keyframes cursorBlink {
  0%, 45% {
    opacity: 1;
  }
  46%, 100% {
    opacity: 0;
  }
}

@keyframes whatsappShine {
  0%, 58% {
    transform: translateX(-120%);
  }
  72%, 100% {
    transform: translateX(120%);
  }
}

@keyframes glassButtonShine {
  0% {
    transform: translateX(-125%);
  }
  100% {
    transform: translateX(125%);
  }
}

/* RESPONSIVE */

@media (max-width: 480px) {
  .chat-shell {
    padding: 38px 8px 12px;
  }

  .console-frame {
    max-width: 100%;
  }

  .console-card {
    border-radius: 30px;
  }

  .paula-header {
    margin: 10px 10px 8px;
    padding: 15px 13px 14px;
    border-radius: 24px;
  }

  .console-title {
    font-size: 24px;
  }

  .console-subtitle,
  .console-description {
    font-size: 13px;
  }

  .console-hero {
    padding: 7px 10px 11px;
  }

  .paula-screen {
    border-radius: 28px;
    padding: 8px;
  }

  .paula-screen::before {
    border-radius: 23px;
  }

  .paula-actor,
  .paula-image,
  .paula-video {
    border-radius: 20px;
  }

  .console-panel {
    margin: 0 8px 10px;
    padding: 12px 10px 13px;
    border-radius: 22px;
  }

  .paula-topbar {
    margin: 0 0 10px;
    padding: 8px 8px;
    gap: 5px;
  }

  .top-btn {
    width: 35px;
    min-width: 35px;
    height: 35px;
  }

  .top-icon {
    width: 20px;
    height: 20px;
  }

  #backBtn .top-icon {
    width: 26px;
    height: 26px;
  }

  #homeBtn .top-icon {
    width: 22px;
    height: 22px;
  }

  .top-input {
    min-width: 126px;
    height: 35px;
    padding: 0 10px;
    font-size: 12.8px;
  }

  .top-input::placeholder {
    font-size: 12.8px;
  }

  .console-response {
    font-size: 13.8px;
    max-height: 230px;
  }

  .console-option {
    min-height: 50px;
    padding: 12px 14px;
  }

  .text {
    font-size: 13.5px;
  }

  .arrow {
    font-size: 25px;
  }

  .whatsapp-fixed {
    margin: 12px auto 8px;
    padding: 13px 17px;
    font-size: 15.5px;
    max-width: calc(100% - 20px);
  }

  .wa-icon {
    width: 29px;
    height: 29px;
  }

  .fixed-health-ribbon {
    width: 10px !important;
    max-width: 10px !important;
    margin: 4px auto 1px;
  }

  .console-footer {
    margin: 8px 10px 13px;
    font-size: 10px;
  }
}

@media (max-width: 390px) {
  .paula-topbar {
    gap: 4px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .top-btn {
    width: 33px;
    min-width: 33px;
    height: 33px;
  }

  .top-icon {
    width: 19px;
    height: 19px;
  }

  #backBtn .top-icon {
    width: 25px;
    height: 25px;
  }

  .top-input {
    min-width: 116px;
    font-size: 12.2px;
    padding: 0 8px;
  }

  .top-input::placeholder {
    font-size: 12.2px;
  }

  .console-option {
    padding: 11px 13px;
  }
}


/* =========================================================
   FIX REAL DE SCROLL MOVIL
   Objetivo:
   - Scroll natural tipo smartphone.
   - Sin saltos automaticos al cambiar de respuesta.
   - Menos carga grafica en pantallas tactiles.
   - Se conserva la estetica futurista.
========================================================= */

html {
  width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.chat-shell,
.console-frame,
.console-card,
.console-panel,
.console-options,
.console-option,
.paula-header,
.console-hero,
.paula-stage,
.paula-screen,
.paula-actor {
  touch-action: pan-y;
}

.console-response {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* El overlay de play solo captura el toque cuando esta visible */
.paula-play-overlay[style*="display: none"] {
  pointer-events: none;
}

/* Ajustes especificos para navegadores tactiles */
@media (hover: none) and (pointer: coarse) {
  html,
  body {
    position: static;
    overflow-y: auto;
  }

  body::before,
  body::after {
    display: none;
  }

  .chat-shell {
    min-height: auto;
    padding-top: 22px;
    padding-bottom: 34px;
    align-items: flex-start;
  }

  .console-card {
    overflow: hidden;
    animation: none;
    transform: none;
    will-change: auto;
  }

  .console-card::after {
    animation: none;
    opacity: 0.16;
  }

  .console-card.is-speaking,
  .console-card.is-video-playing {
    animation: none;
  }

  .paula-stage {
    animation: none;
    transform: none;
    will-change: auto;
  }

  .paula-screen {
    animation: none;
    will-change: auto;
  }

  .console-option,
  .top-btn,
  .whatsapp-fixed,
  .play-button {
    will-change: auto;
  }

  .console-option:hover,
  .top-btn:hover:not(:disabled),
  .whatsapp-fixed:hover {
    transform: none;
  }

  .console-option:hover::after,
  .whatsapp-fixed::after {
    animation: none;
  }

  .console-response.active {
    max-height: none;
    overflow: visible;
  }

  .whatsapp-fixed {
    position: relative;
    bottom: auto;
  }
}

/* Movil: reducimos blur pesado para que el dedo arrastre fluido */
@media (max-width: 768px) {
  .console-card,
  .paula-header,
  .paula-screen,
  .console-panel,
  .paula-topbar,
  .console-option {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .console-card {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.24),
      0 18px 48px rgba(0, 0, 0, 0.58),
      0 0 34px rgba(255, 31, 143, 0.18);
  }

  .console-card.is-speaking,
  .console-card.is-video-playing {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.28),
      0 18px 52px rgba(0, 0, 0, 0.62),
      0 0 42px rgba(255, 31, 143, 0.28);
  }

  .paula-screen {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.26),
      0 14px 34px rgba(0, 0, 0, 0.42),
      0 0 30px rgba(255, 47, 188, 0.24);
  }

  .console-option {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.16),
      inset 0 -7px 14px rgba(255, 31, 143, 0.05),
      0 7px 15px rgba(0,0,0,0.22),
      0 0 12px rgba(255, 31, 143, 0.10);
  }
}

@media (max-width: 480px) {
  .chat-shell {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .console-card {
    border-radius: 28px;
  }

  .console-panel {
    margin-bottom: 10px;
  }

  .console-options {
    gap: 9px;
  }

  .console-option {
    min-height: 48px;
  }

  .whatsapp-fixed {
    margin-top: 12px;
    margin-bottom: 8px;
  }
}

@media (max-width: 390px) {
  .chat-shell {
    padding-top: 14px;
    padding-bottom: 24px;
  }
}
