/* ==========================================================================
   IvyBears AI V2 — Coach Reg Crimson & Amber Theme Styles
   Targets: Desktop (1280px+) & Mobile (390 x 844px)
   ========================================================================== */

:root {
  /* Coach Reg Athletic Crimson & Surface Tokens */
  --ivy-brand: #E90000;
  --ivy-primary: #D11919;
  --ivy-primary-700: #A60F0F;
  --ivy-link: #B51212;
  --ivy-pink-300: #F39B9B;
  --ivy-pink-200: #F8C9C9;
  --ivy-pink-100: #FDE8E8;
  --ivy-pink-50: #FFF6F6;
  --ivy-lilac-100: #FFF3E0;
  --ivy-text: #1A1A1A;
  --ivy-text-muted: #5E5252;
  --ivy-notice-bg: #FFF8EB;
  --ivy-notice-border: #F0C36A;
  --ivy-white: #FFFFFF;

  /* Typography */
  --ivy-font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* 8px Spacing Grid */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;

  /* Radii */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-composer: 0 8px 28px rgba(209, 25, 25, 0.09), 0 2px 8px rgba(26, 26, 26, 0.04);
  --shadow-card: 0 4px 16px rgba(26, 26, 26, 0.06);
  --shadow-cue: 0 4px 12px rgba(26, 26, 26, 0.12);

  /* Layout */
  --header-h: 64px;
  --composer-max: 800px;
  --thread-max: 720px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--ivy-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ivy-text);
  background: var(--ivy-pink-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button,
a,
[role="button"],
label {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
[role="button"],
.suggestions-box,
.bubble-action-btn,
.v2-medical-chip,
.v2-product-cta {
  user-select: none;
  -webkit-user-select: none;
}

@media (hover: none) and (pointer: coarse) {
  .bubble-action-btn:active,
  .read-aloud-btn:active,
  .chat-read-aloud-btn:active,
  .back-button:active,
  .new-chat-btn:active,
  .mobile-menu-btn:active,
  .suggestions-box:active,
  .v2-medical-chip:active,
  .v2-product-cta:active,
  .modal-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
  }
}

.d-none {
  display: none !important;
}

.op-0 {
  opacity: 0 !important;
  pointer-events: none;
}

.op-1 {
  opacity: 1 !important;
}

/* Focus Accessibility */
:focus-visible {
  outline: 3px solid var(--ivy-primary);
  outline-offset: 2px;
}

/* ---------- Main App Shell ---------- */
.main-container {
  position: relative;
  min-height: 100dvh;
  min-height: var(--vh, 100vh);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8F8 42%, var(--ivy-pink-50) 100%);
  overflow-x: clip;
}

.main-container.is-chat-active {
  height: 100dvh;
  height: var(--vh, 100vh);
  overflow: hidden;
}

/* ---------- Decorative Coach Reg Background Shapes (Crimson & Amber Energy Arcs) ---------- */
.bg-accents {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
}

.bg-arc--ring-left {
  position: absolute;
  width: clamp(280px, 30vw, 420px);
  height: clamp(280px, 30vw, 420px);
  left: -130px;
  top: 28%;
  border-radius: 50%;
  border: 34px solid rgba(243, 155, 155, 0.24);
}

.bg-shape--reg-pink {
  width: clamp(280px, 32vw, 440px);
  height: clamp(280px, 32vw, 440px);
  right: -110px;
  top: 6%;
  background: radial-gradient(circle at 40% 50%, #FDE8E8 0%, #FAD0D0 100%);
  opacity: 0.9;
}

.bg-streak {
  position: absolute;
  height: 10px;
  border-radius: 999px;
  background: rgba(233, 0, 0, 0.16);
  transform: rotate(-22deg);
}

.bg-streak--1 {
  width: 96px;
  right: clamp(190px, 24vw, 310px);
  top: 28%;
}

.bg-streak--2 {
  width: 58px;
  right: clamp(175px, 22vw, 285px);
  top: 31%;
}

.bg-dot {
  position: absolute;
  border-radius: 50%;
}

.bg-dot--pink {
  width: 12px;
  height: 12px;
  right: clamp(140px, 16vw, 210px);
  top: 42%;
  background: rgba(233, 0, 0, 0.36);
}

.bg-dot--orange {
  width: 11px;
  height: 11px;
  left: clamp(120px, 18vw, 250px);
  top: 19%;
  background: rgba(245, 130, 32, 0.68);
}

/* ---------- Shared Header ---------- */
.ivybears-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(248, 201, 201, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  gap: var(--space-2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.name-title-2 {
  display: block;
  height: 28px;
  width: auto;
  object-fit: contain;
}

.persona-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--ivy-pink-100);
  color: var(--ivy-link);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

/* Chat-mode Header Controls (Hidden on Landing, shown when .with-chat) */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  color: var(--ivy-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.back-button:hover {
  background: var(--ivy-pink-100);
}

.header-chat-persona {
  display: none;
  align-items: center;
  gap: 10px;
}

.header-chat-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFF9F9 0%, #FDE5E5 78%, #FAD2D2 100%);
  border: 1.5px solid var(--ivy-pink-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.header-chat-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.header-chat-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-chat-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ivy-text);
}

.header-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ivy-text-muted);
}

.status-text-short {
  display: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
}

/* Header Read Aloud Switch (shown in Chat mode) */
.chat-read-aloud-btn {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  color: var(--ivy-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chat-read-aloud-btn:hover {
  background: var(--ivy-pink-100);
}

.chat-read-aloud-btn[aria-checked="true"] .switch-track {
  background: var(--ivy-primary);
}

.chat-read-aloud-btn[aria-checked="true"] .switch-thumb {
  transform: translateX(18px);
}

.ivybears-header.is-chat-active .chat-read-aloud-btn {
  display: inline-flex;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switch-wrap {
  position: relative;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ivy-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lang-switch-btn:hover {
  background: var(--ivy-pink-100);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  padding: 6px;
  background: var(--ivy-white);
  border: 1.5px solid var(--ivy-pink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 80;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ivy-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.lang-option.is-active {
  background: var(--ivy-pink-100);
  color: var(--ivy-link);
}

/* Visit Shop Button */
.visit-shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ivy-pink-200);
  background: var(--ivy-white);
  color: var(--ivy-link);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.visit-shop-btn:hover {
  background: var(--ivy-pink-50);
  border-color: var(--ivy-pink-300);
}

/* New Chat Button (shown in chat mode) */
.new-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ivy-pink-200);
  background: var(--ivy-white);
  color: var(--ivy-link);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.new-chat-btn:hover {
  background: var(--ivy-pink-100);
}

/* Mobile Header Menu Button */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--ivy-pink-100);
  color: var(--ivy-link);
  cursor: pointer;
}

.mobile-menu-popover {
  position: fixed;
  top: calc(var(--header-h) + 6px);
  right: 16px;
  width: 210px;
  padding: 8px;
  background: var(--ivy-white);
  border: 1.5px solid var(--ivy-pink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--ivy-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: 0;
}

.mobile-menu-item:hover {
  background: var(--ivy-pink-50);
  color: var(--ivy-link);
}

/* ---------- Landing & Chat Wrapper ---------- */
.ai-chat {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-3) var(--space-2);
}

/* ---------- Hero Section (Mascot + Badge + H1 + Subline) ---------- */
.animation-sequence-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-bottom: var(--space-3);
}

.mascot-stage {
  position: relative;
  width: 216px;
  height: 216px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* Crimson circular disc sitting BEHIND Coach Reg WebP frames */
.mascot-disc {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFF5F5 0%, #FBD6D6 58%, #F3A1A1 100%);
  box-shadow: 0 12px 32px rgba(233, 0, 0, 0.14), inset 0 0 0 1px rgba(243, 155, 155, 0.78);
  z-index: 0;
  pointer-events: none;
}

.png-sequence-ai-1 {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.png-frame-ai {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.png-frame-ai img {
  width: 100%;
  height: 100%;
  max-height: 216px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 8px 16px rgba(26, 26, 26, 0.08));
}

/* Legacy internal floating sound toggle hidden visually in V2 hero, synced with Read aloud switch */
.png-sequence-ai-1 .sound-toggle-container {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.assistant-intro-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 680px;
}

.identity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--ivy-white);
  border: 1px solid var(--ivy-pink-200);
  color: var(--ivy-link);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(209, 25, 25, 0.06);
}

.assistant-headline {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ivy-text);
}

.assistant-subline {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--ivy-text-muted);
}

/* ---------- 6 Suggestion Chips (Single Horizontal Row + Scroll Cue) ---------- */
.suggestions-all {
  position: relative;
  width: 100%;
  max-width: var(--composer-max);
  margin: 0 auto var(--space-2);
}

.suggestions-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 48px 4px 2px;
}

.suggestions-slider::-webkit-scrollbar {
  display: none;
}

.suggestions-box {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--ivy-white);
  border: 1.5px solid var(--ivy-pink-200);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(26, 26, 26, 0.03);
}

.suggestions-box:hover {
  background: var(--ivy-pink-50);
  border-color: var(--ivy-primary);
  transform: translateY(-1px);
}

.suggestions-box:active {
  transform: translateY(0);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ivy-brand);
  flex-shrink: 0;
}

.suggestions-text p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--ivy-text);
  white-space: nowrap;
}

/* Left & Right Fade + Arrow Scroll Cues */
.chips-fade-left,
.chips-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 68px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.chips-fade-left {
  left: 0;
  background: linear-gradient(270deg, rgba(255, 246, 246, 0) 0%, var(--ivy-pink-50) 72%);
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}

.chips-fade-right {
  right: 0;
  background: linear-gradient(90deg, rgba(255, 246, 246, 0) 0%, var(--ivy-pink-50) 72%);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.chips-scroll-cue {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ivy-pink-200);
  background: var(--ivy-white);
  color: var(--ivy-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-cue);
  z-index: 3;
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.2s ease;
}

.chips-scroll-cue--left {
  left: 4px;
}

.chips-scroll-cue--right {
  right: 4px;
}

.chips-scroll-cue:hover {
  background: var(--ivy-pink-50);
  color: var(--ivy-primary);
}

.chips-scroll-cue.is-hidden,
.chips-fade-left.is-hidden,
.chips-fade-right.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Composer & Input Bar (800px Landing) ---------- */
.chatbot-content {
  width: 100%;
  max-width: var(--composer-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

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

.chatbot__input_box {
  width: 100%;
}

.chatbot__input_inner {
  width: 100%;
}

.inputbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px;
  background: var(--ivy-white);
  border: 1.5px solid var(--ivy-pink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-composer);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inputbar:focus-within {
  border-color: var(--ivy-primary);
  box-shadow: 0 8px 28px rgba(209, 25, 25, 0.15);
}

/* Compact 42x42 Mic Button Inside Right Input Action Slot */
.mic-container {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.mic-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 0;
  background: var(--ivy-pink-100);
  color: var(--ivy-link);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.mic-pill-btn svg {
  pointer-events: none;
}

.mic-pill-btn .mic-icon-stop {
  display: none;
}

.mic-pill-btn:hover {
  background: #FAD2D2;
}

.mic-container.recording .mic-pill-btn,
.mic-pill-btn.is-recording,
.mic-pill-btn.stopRecord {
  background: var(--ivy-primary);
  color: var(--ivy-white);
  box-shadow: 0 0 0 4px rgba(209, 25, 25, 0.22);
}

.mic-container.recording .mic-pill-btn .mic-icon-idle,
.mic-pill-btn.is-recording .mic-icon-idle {
  display: none;
}

.mic-container.recording .mic-pill-btn .mic-icon-stop,
.mic-pill-btn.is-recording .mic-icon-stop {
  display: block;
}

.mic-pill-btn.is-loading {
  opacity: 0.78;
}

.mic-pill-btn:disabled,
.mic-pill-btn.is-disabled {
  background: #F3EFEF;
  color: var(--ivy-text-muted);
  cursor: not-allowed;
  opacity: 0.75;
}

/* Textarea Container */
.chatbot_inner_1 {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.text-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.chatbot__textarea {
  width: 100%;
  min-height: 24px;
  max-height: 120px;
  padding: 8px 4px 8px 8px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--ivy-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.chatbot__textarea::placeholder {
  color: #8C7F7F;
  opacity: 1;
}

/* Active Voice Timer / Waveform Overlay inside Input */
.voice-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  color: var(--ivy-primary);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.voice-timer p {
  margin: 0;
}

.voice-timer .timer-seconds {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--ivy-primary);
}

.mic-pill-btn.stopRecord.loading {
  opacity: 0.78;
}

.voice-waveform {
  order: -1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}

.voice-waveform span {
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--ivy-primary);
  animation: waveBar 0.9s ease-in-out infinite;
}

.voice-waveform span:nth-child(2) { animation-delay: 0.15s; height: 16px; }
.voice-waveform span:nth-child(3) { animation-delay: 0.3s; height: 8px; }
.voice-waveform span:nth-child(4) { animation-delay: 0.45s; height: 14px; }
.voice-waveform span:nth-child(5) { animation-delay: 0.6s; height: 10px; }

@keyframes waveBar {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1.25); }
}

.inputbar.is-recording .chatbot__textarea,
.inputbar:has(.mic-container.recording) .chatbot__textarea {
  display: none;
}

/* Right Action Slot (Mic by default, morphs to Send Arrow when typing) */
.chatbot_inner_2 {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--ivy-primary);
  color: var(--ivy-white);
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

#send-btn:hover:not(.d-none) {
  background: var(--ivy-primary-700);
}

/* ---------- Read Aloud & AI Hint Row ---------- */
.composer-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 0 4px;
}

.read-aloud-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.read-aloud-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 6px 4px 2px;
  border: 0;
  background: transparent;
  color: var(--ivy-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #D9D2D2;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ivy-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.read-aloud-btn[aria-checked="true"] .switch-track {
  background: var(--ivy-primary);
}

.read-aloud-btn[aria-checked="true"] .switch-thumb {
  transform: translateX(18px);
}

.read-aloud-state {
  font-size: 13px;
  font-weight: 600;
  color: var(--ivy-text-muted);
}

.ai-generated-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ivy-text-muted);
  text-align: right;
}

.mobile-lang-pill {
  display: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--ivy-text-muted);
}

/* ---------- Footer ---------- */
.ivy-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(248, 201, 201, 0.68);
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
}

.ivy-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ivy-text-muted);
}

.footer-ai-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ivy-text);
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
}

.footer-links a,
.footer-links button {
  background: none;
  border: 0;
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ivy-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--ivy-link);
}

/* ---------- Phase 2: Chat Thread & Message Bubbles (Desktop + Mobile) ---------- */
.ivybears-header.is-chat-active {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(0);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ivybears-header.is-chat-active.is-hidden-on-scroll {
  transform: translateY(-100%);
}

.ai-chat.with-chat {
  flex: 1 1 0;
  min-height: 0;
  justify-content: flex-start;
  padding: 0 24px;
  max-width: 100%;
}

.ai-chat.with-chat .animation-sequence-container,
.animation-sequence-container.with-chat {
  display: none;
}

.ivybears-header.is-chat-active .brand-lockup,
.ivybears-header.is-chat-active .visit-shop-btn,
.ivybears-header.is-chat-active .mobile-menu-btn {
  display: none;
}

.ivybears-header.is-chat-active .header-chat-persona {
  display: inline-flex;
}

.chatbot-content.with-chat {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: var(--thread-max);
  justify-content: space-between;
  position: relative;
}

.chatbot-content.with-chat .composer-meta-row {
  display: none;
}

.chatbot__box.with-chat {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: var(--thread-max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 14px) 4px 24px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ivy-brand) rgba(248, 201, 201, 0.35);
}

.chatbot__box.with-chat::-webkit-scrollbar {
  width: 7px;
}

.chatbot__box.with-chat::-webkit-scrollbar-track {
  background: rgba(248, 201, 201, 0.25);
  border-radius: 999px;
}

.chatbot__box.with-chat::-webkit-scrollbar-thumb {
  background: var(--ivy-pink-300);
  border-radius: 999px;
  border: 1.5px solid transparent;
  background-clip: content-box;
}

.chatbot__box.with-chat::-webkit-scrollbar-thumb:hover {
  background: var(--ivy-brand);
  border: 1.5px solid transparent;
  background-clip: content-box;
}

.chat-timestamp-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 6px;
}

.chat-timestamp-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--ivy-white);
  border: 1px solid var(--ivy-pink-200);
  color: var(--ivy-text-muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.chatbot__chat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: bubbleFadeIn 0.2s ease-out;
}

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

.chatbot__chat.outgoing {
  justify-content: flex-end;
}

.bubble {
  font-size: 16px;
  line-height: 24px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  overflow-wrap: anywhere;
}

.bubble p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.bubble--user {
  align-self: flex-end;
  max-width: min(600px, 85%);
  background: var(--ivy-primary);
  color: var(--ivy-white);
  border-bottom-right-radius: 4px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(209, 25, 25, 0.18);
}

.chatbot__chat.incoming {
  justify-content: flex-start;
  align-items: flex-start;
}

.bot-avatar-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFF9F9 0%, #FDE5E5 78%, #FAD2D2 100%);
  border: 1.5px solid var(--ivy-pink-200);
  overflow: hidden;
  flex-shrink: 0;
  margin-top: 2px;
}

.chatbot__chat.incoming .ivybots-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.bot-message-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(600px, calc(100% - 48px));
  min-width: 0;
}

.bubble--bot {
  width: 100%;
  background: var(--ivy-pink-100);
  color: var(--ivy-text);
  border-top-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.03);
}

.bubble--bot a {
  color: var(--ivy-link);
  text-decoration: underline;
  font-weight: 700;
}

.bubble--bot p.thinking {
  color: var(--ivy-text-muted);
  font-weight: 600;
  animation: thinkingPulse 1.2s ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--ivy-primary);
  animation: cursorBlink 0.9s steps(2, start) infinite;
}

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

/* Under-Bubble Action Row (Read aloud + Copy) */
.bubble-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  padding-left: 2px;
}

.chatbot__chat.incoming.is-thinking .bubble-actions {
  display: none;
}

.bubble-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ivy-text-muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.bubble-action-btn:hover {
  color: var(--ivy-link);
  background: rgba(253, 232, 232, 0.68);
}

.bubble-action-btn.is-playing {
  color: var(--ivy-primary);
  background: var(--ivy-pink-100);
}

.bubble-action-btn.is-loading-audio {
  color: var(--ivy-link);
  background: var(--ivy-pink-100);
  opacity: 0.85;
}

.chatbot-content.with-chat .chatbot__input_box {
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  padding: 8px 0 12px;
  background: linear-gradient(transparent, var(--ivy-pink-50) 24%);
}

/* Jump to Latest Floating Pill */
.jump-to-latest-btn {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ivy-pink-200);
  background: var(--ivy-white);
  color: var(--ivy-link);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(26, 26, 26, 0.12);
  cursor: pointer;
  z-index: 15;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.jump-to-latest-btn:hover {
  background: var(--ivy-pink-50);
  border-color: var(--ivy-primary);
  transform: translateX(-50%) translateY(-1px);
}

/* ---------- Toast & Modals ---------- */
.ivybears-toast-notification {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 120;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--ivy-white);
  border: 1.5px solid var(--ivy-pink-200);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  color: var(--ivy-text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ivybears-toast-notification.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ivybears-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(26, 26, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ivybears-modal-dialog {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  background: var(--ivy-white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--ivy-pink-200);
  box-shadow: 0 20px 44px rgba(26, 26, 26, 0.16);
}

.modal-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ivy-text);
}

.modal-desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ivy-text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.modal-btn-cancel {
  border: 1.5px solid var(--ivy-pink-200);
  background: var(--ivy-white);
  color: var(--ivy-text);
}

.modal-btn-confirm {
  border: 0;
  background: var(--ivy-primary);
  color: var(--ivy-white);
}

.modal-btn-confirm:hover {
  background: var(--ivy-primary-700);
}

/* Theme-matched Sound Permission Modal */
.sound-permission-backdrop {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(26, 26, 26, 0.36);
}

.sound-permission-dialog {
  max-width: 380px;
  padding: 28px 24px 24px;
  text-align: center;
  border-radius: 24px;
  border: 1.5px solid var(--ivy-pink-200);
  background: linear-gradient(180deg, #ffffff 0%, var(--ivy-pink-50) 100%);
  box-shadow: 0 22px 48px rgba(209, 25, 25, 0.14), 0 8px 20px rgba(26, 26, 26, 0.12);
}

.sound-modal-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ivy-pink-100);
  color: var(--ivy-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ivy-pink-200);
}

.sound-permission-dialog .modal-title {
  font-size: 20px;
  line-height: 26px;
  font-weight: 800;
  color: var(--ivy-text);
  margin-bottom: 8px;
}

.sound-permission-dialog .modal-desc {
  font-size: 14px;
  line-height: 20px;
  color: var(--ivy-text-muted);
  margin-bottom: 22px;
}

.sound-modal-actions {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sound-modal-actions .modal-btn {
  flex: 1 1 140px;
  min-height: 44px;
}

.sound-permission-dialog .modal-btn-cancel:hover {
  background: var(--ivy-pink-100);
  border-color: var(--ivy-pink-300);
}

/* ---------- Phase 3: Catalogue Product Cards & Medical Referral Card ---------- */
.v2-product-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.v2-product-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--ivy-white);
  border: 1.5px solid var(--ivy-pink-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(26, 26, 26, 0.05);
}

.v2-product-media {
  position: relative;
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--ivy-pink-50);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2-product-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #FDE8E8 25%, #FFF6F6 50%, #FDE8E8 75%);
  background-size: 200% 100%;
  animation: productShimmer 1.3s ease-in-out infinite;
  display: none;
}

.v2-product-media.is-loading .v2-product-skeleton {
  display: block;
}

@keyframes productShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.v2-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.v2-product-img.is-loaded {
  opacity: 1;
}

.v2-product-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--ivy-pink-50);
}

.v2-product-media.is-fallback .v2-product-fallback {
  display: flex;
}

.v2-product-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.v2-product-title {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
  color: var(--ivy-text);
}

.v2-product-facts {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ivy-text-muted);
}

.v2-product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2px 0 6px;
}

.v2-product-price {
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
  color: var(--ivy-text);
}

.v2-product-vat {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--ivy-text-muted);
}

.v2-product-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--ivy-primary);
  color: var(--ivy-white) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background-color 0.15s ease;
}

.v2-product-cta:hover {
  background: var(--ivy-primary-700);
}

/* Medical Referral Card */
.bubble--medical {
  width: 100%;
  background: var(--ivy-notice-bg);
  border: 1.5px solid var(--ivy-notice-border);
  border-radius: 4px 16px 16px 16px;
  padding: 16px;
  color: var(--ivy-text);
  box-shadow: 0 2px 10px rgba(240, 195, 106, 0.16);
}

.v2-medical-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.v2-medical-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFF0CC;
  border: 1px solid var(--ivy-notice-border);
  color: #946200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.v2-medical-heading {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
  color: var(--ivy-text);
}

.v2-medical-body p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 24px;
  color: var(--ivy-text);
}

.v2-medical-body .medical-emergency-line {
  margin-bottom: 0;
}

.v2-medical-followup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.v2-medical-chip {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--ivy-white);
  border: 1.5px solid var(--ivy-pink-200);
  color: var(--ivy-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.v2-medical-chip:hover {
  border-color: var(--ivy-primary);
  background: var(--ivy-pink-50);
  color: var(--ivy-link);
}

.v2-safeguard-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: var(--ivy-text-muted);
}

/* ---------- Mobile Breakpoint (390 x 844 px & <= 767px) ---------- */
@media (max-width: 767px) {
  .ivybears-header {
    padding: 8px 16px;
    min-height: 58px;
  }

  .name-title-2 {
    height: 22px;
  }

  .persona-badge {
    font-size: 12px;
    padding: 2px 10px;
  }

  .header-right .lang-switch-wrap,
  .header-right .visit-shop-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  /* Mobile Chat Header (Image 3 layout) */
  .ivybears-header.is-chat-active .back-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .ivybears-header.is-chat-active .back-button span {
    display: none;
  }

  .ivybears-header.is-chat-active .header-left {
    gap: 6px;
  }

  .ivybears-header.is-chat-active .header-chat-avatar-wrap {
    width: 34px;
    height: 34px;
  }

  .ivybears-header.is-chat-active .status-dot,
  .ivybears-header.is-chat-active .status-text-full {
    display: none;
  }

  .ivybears-header.is-chat-active .status-text-short {
    display: inline;
  }

  .ivybears-header.is-chat-active .header-right {
    gap: 8px;
  }

  .ivybears-header.is-chat-active .chat-read-aloud-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    background: #F3EFEF;
    color: var(--ivy-text-muted);
  }

  .ivybears-header.is-chat-active .chat-read-aloud-btn[aria-checked="true"] {
    background: var(--ivy-pink-100);
    color: var(--ivy-link);
  }

  .ivybears-header.is-chat-active .chat-read-aloud-label,
  .ivybears-header.is-chat-active .chat-read-aloud-btn .switch-track {
    display: none;
  }

  .ivybears-header.is-chat-active .new-chat-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    border: 0;
    background: var(--ivy-pink-100);
    color: var(--ivy-link);
  }

  .ivybears-header.is-chat-active .new-chat-btn .new-chat-text {
    display: none;
  }

  .ai-chat.with-chat {
    padding: 0 16px;
  }

  .chatbot-content.with-chat {
    min-height: 0;
  }

  .chatbot__box.with-chat {
    padding: calc(58px + 12px) 0 18px;
  }

  .bot-avatar-wrap {
    width: 32px;
    height: 32px;
  }

  .bot-message-col {
    max-width: calc(100% - 44px);
  }

  .bg-arc--ring-left {
    width: 190px;
    height: 190px;
    left: -75px;
    top: 26%;
    border-width: 24px;
  }

  .bg-shape--reg-pink {
    width: 180px;
    height: 180px;
    right: -60px;
    top: 8%;
  }

  .bg-streak,
  .bg-dot {
    display: none;
  }

  .ai-chat {
    justify-content: space-between;
    padding: 16px 16px 10px;
  }

  .animation-sequence-container {
    margin-top: auto;
    margin-bottom: auto;
    padding: 8px 0 16px;
  }

  .mascot-stage {
    width: min(210px, 31svh);
    height: min(210px, 31svh);
    max-height: 35svh;
    margin-bottom: 12px;
  }

  .png-frame-ai img {
    max-height: 35svh;
  }

  .identity-badge {
    display: none;
  }

  .assistant-headline {
    font-size: 28px;
    line-height: 36px;
    padding: 0 6px;
  }

  .assistant-subline {
    font-size: 15px;
    line-height: 22px;
    max-width: 310px;
  }

  .suggestions-all {
    margin-bottom: 10px;
  }

  .suggestions-slider {
    margin: 0;
    padding: 4px 44px 4px 2px;
  }

  .chips-fade-left,
  .chips-fade-right {
    width: 48px;
  }

  .chips-fade-left {
    left: 0;
  }

  .chips-fade-right {
    right: 0;
  }

  .chips-scroll-cue--left {
    left: -6px;
  }

  .chips-scroll-cue--right {
    right: -6px;
  }

  .chatbot__input_box {
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .v2-product-card {
    gap: 12px;
    padding: 12px;
  }

  .v2-product-media {
    width: 88px;
    height: 88px;
  }

  .v2-product-title {
    font-size: 16px;
    line-height: 22px;
  }

  .v2-product-cta {
    width: 100%;
    padding: 0 14px;
  }

  .ai-generated-hint {
    display: none;
  }

  .mobile-lang-pill {
    display: inline-block;
  }

  .composer-meta-row {
    margin-top: 8px;
  }

  .ivy-footer {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }

  .ivy-footer-inner {
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
  }

  .footer-links {
    gap: 4px 10px;
  }

  .footer-links a,
  .footer-links button {
    font-size: 12px;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
