/* AI Family OS — Theme pair: A Clinical Calm (day) + C Soft Neon Night (night) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* DAY: Variant A — Clinical Calm (medical-trust sage/teal)
   Aliases: light | notion-minimal | clinical-calm */
:root,
[data-theme="light"],
[data-theme="notion-minimal"],
[data-theme="clinical-calm"] {
  --bg-primary: #F4F7F6;
  --bg-secondary: #EAF1EF;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F7FBFA;
  --bg-elev: #FFFFFF;

  --text-main: #1C2B2A;
  --text-muted: #5C6F6D;
  --text-dim: #8A9A98;

  --accent-primary: #0F766E;
  --accent-secondary: #14B8A6;
  --accent-soft: #E6F4F2;
  --accent-gold: #0F766E;
  --accent-gold-soft: rgba(15, 118, 110, 0.12);
  /* SOS: amber-orange medical trust (not pure alarm red) */
  --accent-warm: #C2410C;
  --edu-banner-bg: #FFFBEB;
  --edu-banner-border: #FDE68A;
  --edu-banner-text: #78350F;

  --gradient-brand: linear-gradient(135deg, #1C2B2A 0%, #0F766E 100%);
  --gradient-sos: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
  --body-bg-image: none;
  --glow-accent: transparent;
  --sos-glow: rgba(194, 65, 12, 0.35);

  --border-color: #D8E3E0;
  --border-subtle: #E8F0EE;
  --shadow-soft: 0 1px 2px rgba(28, 43, 42, 0.06), 0 8px 24px rgba(28, 43, 42, 0.04);
  --shadow-card: 0 1px 2px rgba(28, 43, 42, 0.05);

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --panel-backdrop: none;
}

/* NIGHT: Variant C — Soft Neon Night (premium glass, cyan/indigo; red only on SOS)
   Aliases: dark | dark-neon | soft-neon-night */
[data-theme="dark"],
[data-theme="dark-neon"],
[data-theme="soft-neon-night"] {
  --bg-primary: #070B14;
  --bg-secondary: #0D1424;
  --bg-card: rgba(18, 28, 48, 0.72);
  --bg-card-subtle: #121C30;
  --bg-elev: #0D1424;

  --text-main: #E8EEF9;
  --text-muted: #8B9BB8;
  --text-dim: #5A6A88;

  --accent-primary: #38BDF8;
  --accent-secondary: #818CF8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --accent-gold: #38BDF8;
  --accent-gold-soft: rgba(56, 189, 248, 0.22);
  /* SOS: rose only for emergency affordance */
  --accent-warm: #F43F5E;
  --edu-banner-bg: rgba(251, 191, 36, 0.08);
  --edu-banner-border: rgba(251, 191, 36, 0.22);
  --edu-banner-text: #FDE68A;

  --gradient-brand: linear-gradient(135deg, #38BDF8 0%, #818CF8 100%);
  --gradient-sos: radial-gradient(circle at 30% 30%, #FB7185, #E11D48);
  --body-bg-image:
    radial-gradient(900px 500px at 10% -10%, rgba(129, 140, 248, 0.18), transparent 55%),
    radial-gradient(700px 400px at 90% 0%, rgba(56, 189, 248, 0.12), transparent 50%);
  --glow-accent: rgba(56, 189, 248, 0.22);
  --sos-glow: rgba(244, 63, 94, 0.45);

  --border-color: rgba(100, 140, 200, 0.18);
  --border-subtle: rgba(129, 140, 248, 0.14);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.45);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --panel-backdrop: blur(18px);
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family, 'Inter', sans-serif);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  background-image: var(--body-bg-image);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom SVG Icon Unified Styling */
.custom-icon {
  display: inline-block;
  vertical-align: middle;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s ease;
}

.nav-svg {
  width: 17px;
  height: 17px;
  stroke: var(--text-muted);
}

.nav-btn.active .nav-svg {
  stroke: var(--accent-primary);
}

.title-svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-primary);
}

.pill-svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  flex-shrink: 0;
}

.prompt-pill:hover .pill-svg {
  stroke: var(--accent-primary);
}

.kb-svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent-primary);
}

.mobile-nav-svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  transition: all 0.2s ease;
}

.mobile-nav-item.active .mobile-nav-svg {
  stroke: var(--accent-primary);
  transform: translateY(-1px);
}

.mobile-sos-svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

/* Top Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.8rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-icon-img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--accent-gold-soft);
  border: 1px solid var(--border-color);
  object-fit: cover;
  flex-shrink: 0;
}

.brand-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.brand-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
}

.nav-links {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 25px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

/* Desktop SOS Button */
.sos-header-btn {
  background: var(--gradient-sos);
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px var(--sos-glow);
  user-select: none;
  touch-action: none;
  white-space: nowrap;
}

.sos-header-btn.holding {
  transform: scale(1.05);
  animation: pulse-voice 1s infinite;
}

/* Voice Toast Modal Overlay */
.voice-toast-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.voice-toast-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.voice-toast-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.voice-mic-wave {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-sos);
  color: white;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 0 25px var(--accent-warm);
  animation: mic-ripple 1.5s infinite;
}

@keyframes mic-ripple {
  0% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-warm); }
  70% { transform: scale(1.12); box-shadow: 0 0 0 20px rgba(0, 0, 0, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.voice-status-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.voice-status-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Avatar Selector Modal */
.avatar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 23, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.avatar-modal-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.avatar-modal-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.avatar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.avatar-close-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
}

.upload-photo-btn {
  width: 100%;
  background: var(--gradient-brand);
  color: white;
  border: none;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.avatar-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.avatar-option-item {
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-option-item:hover, .avatar-option-item.active {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.avatar-option-icon {
  font-size: 30px;
  margin-bottom: 2px;
}

.avatar-option-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-main);
}

.edit-avatar-link-btn {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* App Container Layout */
.app-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.25rem;
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: 310px 1fr 320px;
  gap: 1.25rem;
}

.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--panel-backdrop);
  -webkit-backdrop-filter: var(--panel-backdrop);
}

.section-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Family Passport Box — Clinical Calm / Soft Neon */
.passport-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.passport-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0.85;
}

.child-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-soft), var(--bg-card));
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.avatar-bubble:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px var(--accent-gold-soft), 0 4px 14px var(--accent-gold-soft);
}

.child-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.child-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.passport-field {
  margin-bottom: 10px;
}

.passport-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.passport-value {
  font-size: 0.84rem;
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.4;
}

.passport-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.passport-edu-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.passport-edit {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.passport-input {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: inherit;
}

.passport-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Badges: teal = source/edu · amber = triggers · rose = safety only */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-teal,
.badge-edu {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-color: color-mix(in srgb, var(--accent-primary) 28%, transparent);
}

.badge-amber,
.badge-trigger {
  background: var(--edu-banner-bg);
  color: var(--edu-banner-text);
  border-color: var(--edu-banner-border);
}

.badge-rose,
.badge-safety {
  background: color-mix(in srgb, var(--accent-warm) 14%, transparent);
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 30%, transparent);
}

/* Prompt Pills */
.prompt-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.prompt-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateX(3px);
}

/* Chat View */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
}

.chat-header {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.intent-badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 45%, transparent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}

.intent-badge.intent-sos {
  background: color-mix(in srgb, var(--accent-warm) 14%, transparent);
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 40%, transparent);
  box-shadow: 0 0 12px var(--sos-glow);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.message-bubble {
  display: flex;
  gap: 10px;
  max-width: 88%;
}

.message-bubble.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-bubble.bot {
  align-self: flex-start;
}

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.message-bubble.user .msg-avatar {
  background: var(--accent-primary);
  color: white;
  border: none;
}

.msg-content {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-main);
  box-shadow: var(--shadow-card);
}

.message-bubble.user .msg-content {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
}

.message-bubble.sos-mode .msg-content {
  background: color-mix(in srgb, var(--accent-warm) 14%, transparent);
  border: 1.5px solid var(--accent-warm);
}

/* Educational disclaimer banner (chat) — Clinical amber / Soft Neon amber glass */
.edu-disclaimer-banner,
.disclaimer-banner,
.chat-disclaimer {
  background: var(--edu-banner-bg);
  border: 1px solid var(--edu-banner-border);
  color: var(--edu-banner-text);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.45;
}

/* Multi-Perspective Tabs — educational lenses */
.perspectives-box {
  margin-top: 0.85rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.perspectives-header {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.perspectives-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border-subtle);
}

.perspective-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.perspective-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.25;
  text-align: center;
  min-width: 72px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.perspective-tab-btn .tab-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 2px;
  text-transform: none;
  letter-spacing: 0;
}

.perspective-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.perspective-content {
  font-size: 0.85rem;
  color: var(--text-main);
  background: var(--bg-card);
  padding: 12px 12px 14px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  border: 1px solid var(--border-subtle);
  line-height: 1.5;
  max-height: 280px;
  overflow-y: auto;
}

.perspective-content strong {
  color: var(--accent-primary);
}

/* Knowledge Base Grid */
.kb-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kb-search-bar {
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.kb-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.9rem;
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.kb-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kb-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.kb-card-icon-svg {
  margin-bottom: 8px;
}

.kb-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.kb-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Input Area */
.chat-input-area {
  display: flex;
  gap: 8px;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: 30px;
  padding: 5px 6px 5px 16px;
}

.chat-input-area:focus-within {
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.92rem;
}

.send-btn {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 9px 20px;
  border-radius: 25px;
  font-weight: 800;
  cursor: pointer;
}

/* Metrics & Alerts */
.metric-row {
  margin-bottom: 12px;
}

.metric-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.progress-bar-bg {
  height: 7px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.alert-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 0.75rem;
  box-shadow: var(--shadow-card);
}

.alert-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 4px;
  line-height: 1.35;
}

.alert-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Bottom Navigation Bar for Mobile */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   📱 ADAPTIVE MOBILE BREAKPOINTS: CURVED FLOATING CAPSULE BAR & INTEGRATED SOS
   ========================================================================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0.65rem 1rem;
  }
  
  .brand-title {
    font-size: 1rem;
  }
  
  .brand-tag {
    display: none;
  }
  
  .nav-links {
    display: none;
  }

  .sos-header-btn.desktop-only-sos {
    display: none !important;
  }

  .app-container {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    padding-bottom: 85px;
    gap: 0.75rem;
  }

  /* Only ONE tab panel visible at a time (chat must not force display:flex) */
  .mobile-tab-view {
    display: none !important;
  }

  .mobile-tab-view.active-tab {
    display: flex !important;
    flex-direction: column;
    height: calc(100vh - 145px);
    max-height: calc(100vh - 145px);
    min-height: 0;
    overflow: hidden;
  }

  .chat-container.active-tab {
    /* layout only when this tab is active — never override .mobile-tab-view { display:none } */
    flex-direction: column;
  }

  .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
  }

  .chat-input-area {
    flex: 0 0 auto;
    margin-bottom: 4px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }

  /* Keep disclaimer full-width under header (not in header flex row) */
  .chat-container > .chat-disclaimer-banner {
    flex: 0 0 auto;
    width: 100%;
  }

  .message-bubble {
    max-width: 95%;
  }

  .msg-content {
    font-size: 0.88rem;
    padding: 0.85rem 1rem;
  }

  /* Floating capsule bottom bar — A/C tokens */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: calc(100vw - 20px);
    height: 68px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 36px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    backdrop-filter: var(--panel-backdrop);
    -webkit-backdrop-filter: var(--panel-backdrop);
    z-index: 9999 !important;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    gap: 2px;
    flex: 1;
    height: 100%;
    border-radius: 18px;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .mobile-nav-item.active {
    color: var(--accent-primary);
    background: var(--accent-soft);
  }

  /* Center SOS — educational first-aid affordance (not emergency service) */
  .mobile-center-sos-wrapper {
    position: relative;
    top: -18px;
    flex: 0 0 66px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .mobile-sos-circle-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-sos);
    border: 3px solid rgba(255, 255, 255, 0.35);
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--accent-warm) 12%, transparent),
      0 8px 24px var(--sos-glow);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  }

  .mobile-sos-circle-btn:active {
    transform: scale(0.96);
  }

  .mobile-sos-circle-btn.holding {
    transform: scale(1.12);
    animation: mic-pulse-ring 1s infinite;
  }

  .mobile-sos-circle-btn .sos-text {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    margin-top: 1px;
    text-transform: uppercase;
  }

  .mobile-sos-hint {
    position: absolute;
    bottom: -14px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-dim);
    white-space: nowrap;
    letter-spacing: 0.02em;
    pointer-events: none;
    opacity: 0.85;
  }
}

@keyframes mic-pulse-ring {
  0% {
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--accent-warm) 18%, transparent),
      0 0 18px var(--sos-glow);
  }
  70% {
    box-shadow:
      0 0 0 12px transparent,
      0 0 28px var(--sos-glow);
  }
  100% {
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--accent-warm) 12%, transparent),
      0 8px 24px var(--sos-glow);
  }
}

/* 🛡️ PERSISTENT CHAT DISCLAIMER BANNER — educational amber (A/C tokens) */
.chat-disclaimer-banner {
  background: var(--edu-banner-bg);
  border: 1px solid var(--edu-banner-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 10px 0 2px 0;
  font-size: 0.76rem;
  color: var(--edu-banner-text);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.chat-disclaimer-banner.clickable {
  cursor: pointer;
}

.chat-disclaimer-banner.clickable:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px var(--accent-gold-soft);
  transform: translateY(-1px);
}


/* ==========================================================================
   📱 TABLET BREAKPOINT (769px – 1024px): 2-COLUMN LAYOUT
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .app-container {
    grid-template-columns: 1fr 300px;
    gap: 1rem;
    padding: 1rem;
  }

  /* Hide left sidebar on tablet — show via tab system */
  .sidebar-left {
    display: none;
  }

  .sidebar-left.active-tab {
    display: flex;
    grid-column: 1 / -1;
  }

  /* KB container spans full width on tablet */
  .kb-container {
    grid-column: 1 / -1;
  }

  .kb-container.active-tab {
    display: flex;
  }

  /* Navbar compaction for tablet */
  .nav-controls {
    gap: 6px;
  }

  .nav-btn span {
    font-size: 0.75rem;
  }

  .theme-toggle-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .brand-tag {
    display: none;
  }

  /* Chat container height fix for tablet */
  .chat-container {
    height: calc(100vh - 110px);
  }

  /* KB grid — 2 columns on tablet */
  .kb-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   📱 ENHANCED MOBILE BREAKPOINT ADDITIONS (≤768px)
   ========================================================================== */
@media (max-width: 768px) {

  /* --- NAVBAR COMPACT: Icons-only on mobile --- */
  .nav-controls {
    gap: 4px;
  }

  .theme-toggle-btn {
    padding: 6px 10px;
    font-size: 0;       /* Hide text */
    gap: 0;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
  }

  .theme-toggle-btn span:first-child {
    font-size: 1.1rem;  /* Show emoji icon */
  }

  .theme-toggle-btn #themeLabel,
  .theme-toggle-btn #apiKeyBtnLabel {
    display: none;       /* Hide text labels */
  }

  /* Brand icon smaller on mobile */
  .brand-icon-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .brand {
    gap: 8px;
  }

  /* --- MODALS: FULLSCREEN ON MOBILE --- */
  .avatar-modal-overlay {
    align-items: flex-end;   /* Slide from bottom on mobile */
  }

  .avatar-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 1.25rem 1rem !important;
    overflow-y: auto;
  }

  /* Legal Modal — full screen sheet */
  #legalModal .avatar-modal-card {
    max-height: 95vh !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  }

  /* Legal tab buttons — wrap on narrow screens */
  #legalModal .avatar-modal-card > div:nth-child(2) {
    flex-wrap: wrap;
    gap: 4px;
  }

  #legalModal .perspective-tab-btn {
    font-size: 0.68rem;
    padding: 5px 8px;
  }

  /* Voice toast card compact */
  .voice-toast-card {
    padding: 1.5rem 1.2rem;
    width: 95%;
  }

  .voice-mic-wave {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

  .voice-status-title {
    font-size: 1rem;
  }

  /* --- KB GRID: Single column on mobile --- */
  .kb-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  .kb-card {
    padding: 0.9rem;
  }

  .kb-card-title {
    font-size: 0.88rem;
  }

  .kb-card-desc {
    font-size: 0.76rem;
  }

  .kb-search-bar {
    padding: 6px 12px;
  }

  .kb-search-input {
    font-size: 0.82rem;
  }

  /* KB container header compact */
  .kb-container .chat-header h1 {
    font-size: 0.95rem !important;
  }

  /* --- CHAT HEADER: Compact on mobile --- */
  .chat-header {
    padding-bottom: 0.6rem;
    flex-wrap: wrap;
    gap: 6px;
  }

  .chat-header h1 {
    font-size: 0.95rem !important;
  }

  .intent-badge {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  #apiKeyStatusBadge {
    font-size: 0.65rem;
  }

  /* --- DISCLAIMER BANNER: Compact on mobile --- */
  .chat-disclaimer-banner {
    padding: 6px 10px;
    font-size: 0.68rem;
    margin: 6px 0 2px 0;
    gap: 6px;
  }

  .chat-disclaimer-banner .custom-icon {
    width: 13px !important;
    height: 13px !important;
  }

  /* Hide "Legal Info ➔" label on narrow mobile, keep area clickable */
  .chat-disclaimer-banner > span:last-child {
    font-size: 0.62rem;
    white-space: nowrap;
  }

  /* --- PERSPECTIVES BOX: Wrap tabs --- */
  .perspectives-box {
    padding: 8px;
  }

  .perspectives-header {
    font-size: 0.72rem;
  }

  .perspective-tab-btn {
    font-size: 0.68rem;
    padding: 4px 8px;
    margin-right: 3px;
    margin-bottom: 3px;
  }

  .perspective-content {
    font-size: 0.8rem;
    padding: 8px;
  }

  /* --- PASSPORT / KB / INDEX: scrollable full-screen tabs --- */
  .sidebar-left.active-tab,
  .sidebar-right.active-tab,
  .kb-container.active-tab {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
  }

  .passport-card {
    padding: 0.95rem;
    margin-bottom: 0.85rem;
  }

  .avatar-bubble {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }

  .child-name {
    font-size: 1.08rem;
  }

  .passport-label {
    font-size: 0.64rem;
  }

  .passport-value {
    font-size: 0.8rem;
  }

  .passport-badges .badge {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .passport-edu-note {
    font-size: 0.64rem;
  }

  .prompt-pill {
    padding: 9px 10px;
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .badge {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .metric-row {
    margin-bottom: 14px;
  }

  .metric-label-row {
    font-size: 0.8rem;
  }

  .progress-bar-bg {
    height: 8px;
    border-radius: 4px;
  }

  .alert-box {
    padding: 10px;
    margin-top: 0.75rem;
  }

  .alert-title {
    font-size: 0.82rem;
  }

  .alert-desc {
    font-size: 0.74rem;
  }

  /* --- CHAT INPUT: Sticky above bottom nav --- */
  .chat-input-area {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 4px 5px 4px 14px;
  }

  .chat-input {
    font-size: 0.88rem;
  }

  .send-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 20px;
  }

  /* --- MSG AVATAR: Smaller on mobile --- */
  .msg-avatar {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .msg-avatar .custom-icon {
    width: 16px;
    height: 16px;
  }

  /* --- SAFE AREA: iPhone Home Indicator --- */
  .mobile-bottom-nav {
    bottom: max(10px, env(safe-area-inset-bottom, 10px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* --- VIRTUAL KEYBOARD: Hide bottom nav when keyboard is open --- */
  .keyboard-open .mobile-bottom-nav {
    display: none !important;
  }

  .keyboard-open .app-container {
    padding-bottom: 10px;
  }

  .keyboard-open .chat-container {
    height: calc(100vh - 70px);
  }

  /* --- SECTION TITLE: Compact on mobile --- */
  .section-title {
    font-size: 0.85rem;
    margin-bottom: 0.65rem;
    gap: 6px;
  }

  .title-svg {
    width: 17px;
    height: 17px;
  }

  /* --- GLASS PANEL: Reduced padding on mobile --- */
  .glass-panel {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
}

/* ==========================================================================
   A/C THEME POLISH — Soft Neon Night glass + Clinical Calm bot bubbles
   ========================================================================== */

/* Soft Neon: elevated navbar glass */
[data-theme="dark"] .navbar,
[data-theme="dark-neon"] .navbar,
[data-theme="soft-neon-night"] .navbar {
  background: rgba(7, 11, 20, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border-color);
  box-shadow: none;
}

/* Soft Neon: active nav glow */
[data-theme="dark"] .nav-btn.active,
[data-theme="dark-neon"] .nav-btn.active,
[data-theme="soft-neon-night"] .nav-btn.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 16px var(--glow-accent);
  color: var(--text-main);
}

/* Soft Neon: bot bubble soft indigo glass */
[data-theme="dark"] .message-bubble.bot .msg-content,
[data-theme="dark-neon"] .message-bubble.bot .msg-content,
[data-theme="soft-neon-night"] .message-bubble.bot .msg-content {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.28);
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.08);
}

/* Soft Neon: user bubble cyan soft */
[data-theme="dark"] .message-bubble.user .msg-content,
[data-theme="dark-neon"] .message-bubble.user .msg-content,
[data-theme="soft-neon-night"] .message-bubble.user .msg-content {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.85), rgba(129, 140, 248, 0.85));
  color: #F0F9FF;
}

/* Soft Neon: SOS FAB glow (mobile + desktop) */
[data-theme="dark"] .mobile-sos-circle-btn,
[data-theme="dark-neon"] .mobile-sos-circle-btn,
[data-theme="soft-neon-night"] .mobile-sos-circle-btn,
[data-theme="dark"] .sos-header-btn,
[data-theme="dark-neon"] .sos-header-btn,
[data-theme="soft-neon-night"] .sos-header-btn {
  box-shadow:
    0 0 0 4px rgba(244, 63, 94, 0.14),
    0 0 28px var(--sos-glow);
}

/* Soft Neon: floating capsule glass */
[data-theme="dark"] .mobile-bottom-nav,
[data-theme="dark-neon"] .mobile-bottom-nav,
[data-theme="soft-neon-night"] .mobile-bottom-nav {
  background: rgba(13, 20, 36, 0.82);
  border-color: rgba(100, 140, 200, 0.22);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(56, 189, 248, 0.08);
}

/* Soft Neon: passport glass + cyan ring */
[data-theme="dark"] .passport-card,
[data-theme="dark-neon"] .passport-card,
[data-theme="soft-neon-night"] .passport-card {
  background: rgba(18, 28, 48, 0.55);
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .avatar-bubble,
[data-theme="dark-neon"] .avatar-bubble,
[data-theme="soft-neon-night"] .avatar-bubble {
  background: linear-gradient(145deg, #1E3A5F, #312E81);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 18px var(--glow-accent);
}

/* Clinical Calm: passport soft medical card */
[data-theme="light"] .passport-card,
[data-theme="notion-minimal"] .passport-card,
[data-theme="clinical-calm"] .passport-card {
  background: #FFFFFF;
  border-color: #D8E3E0;
}

[data-theme="light"] .avatar-bubble,
[data-theme="notion-minimal"] .avatar-bubble,
[data-theme="clinical-calm"] .avatar-bubble {
  background: linear-gradient(145deg, #CCFBF1, #99F6E4);
  border-color: #14B8A6;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

/* Soft Neon: active perspective tabs glow */
[data-theme="dark"] .perspective-tab-btn.active,
[data-theme="dark-neon"] .perspective-tab-btn.active,
[data-theme="soft-neon-night"] .perspective-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #E0F2FE;
  box-shadow: 0 0 12px var(--glow-accent);
}

/* Clinical Calm: bot bubble sage soft (day only — do not use bare :root) */
[data-theme="light"] .message-bubble.bot .msg-content,
[data-theme="notion-minimal"] .message-bubble.bot .msg-content,
[data-theme="clinical-calm"] .message-bubble.bot .msg-content {
  background: var(--accent-soft);
  border-color: #B2DFDB;
}

/* Clinical Calm: avatar ring (day only) */
[data-theme="light"] .msg-avatar,
[data-theme="notion-minimal"] .msg-avatar,
[data-theme="clinical-calm"] .msg-avatar {
  border-color: #99F6E4;
}

/* ==========================================================================
   📱 SMALL SCREEN BREAKPOINT (≤380px): Extra compact for iPhone SE etc.
   ========================================================================== */
@media (max-width: 380px) {
  .brand-title {
    font-size: 0.88rem;
  }

  .brand-icon-img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .brand {
    gap: 6px;
  }

  .theme-toggle-btn {
    min-width: 32px;
    min-height: 32px;
    padding: 5px 8px;
  }

  .navbar {
    padding: 0.5rem 0.75rem;
  }

  /* Bottom nav compact */
  .mobile-bottom-nav {
    height: 60px;
    bottom: max(6px, env(safe-area-inset-bottom, 6px));
    left: 6px;
    right: 6px;
    width: calc(100vw - 12px);
    padding: 0 4px;
  }

  .mobile-nav-item {
    font-size: 0.58rem;
  }

  .mobile-nav-svg {
    width: 19px;
    height: 19px;
  }

  /* SOS circle smaller */
  .mobile-center-sos-wrapper {
    flex: 0 0 58px;
    top: -14px;
  }

  .mobile-sos-circle-btn {
    width: 56px;
    height: 56px;
    border-width: 3px;
  }

  .mobile-sos-circle-btn .sos-text {
    font-size: 0.5rem;
  }

  .mobile-sos-svg {
    width: 18px;
    height: 18px;
  }

  /* App container tighter */
  .app-container {
    padding: 0.5rem;
    padding-bottom: 75px;
    gap: 0.5rem;
  }

  /* Chat messages tighter */
  .msg-content {
    font-size: 0.82rem;
    padding: 0.7rem 0.85rem;
  }

  .message-bubble {
    gap: 6px;
  }

  .msg-avatar {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  /* Chat input compact */
  .chat-input-area {
    padding: 3px 4px 3px 12px;
    border-radius: 22px;
  }

  .chat-input {
    font-size: 0.82rem;
  }

  .send-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  /* Section titles */
  .section-title {
    font-size: 0.8rem;
  }

  .chat-header h1 {
    font-size: 0.88rem !important;
  }

  /* Disclaimer extra compact */
  .chat-disclaimer-banner {
    padding: 5px 8px;
    font-size: 0.64rem;
  }

  /* KB cards compact */
  .kb-card {
    padding: 0.75rem;
  }

  .kb-card-title {
    font-size: 0.82rem;
  }

  /* Prompt pills compact */
  .prompt-pill {
    padding: 8px 9px;
    font-size: 0.76rem;
  }

  /* Perspectives compact */
  .perspective-tab-btn {
    font-size: 0.64rem;
    padding: 3px 6px;
  }

  .perspective-content {
    font-size: 0.76rem;
  }

  /* Modals compact */
  .avatar-modal-card {
    padding: 1rem 0.85rem !important;
  }

  .avatar-modal-header h2 {
    font-size: 1rem !important;
  }

  .avatar-options-grid {
    gap: 6px;
  }

  .avatar-option-icon {
    font-size: 24px;
  }

  .avatar-option-label {
    font-size: 0.62rem;
  }

  .upload-photo-btn {
    padding: 9px 12px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   📱 LANDSCAPE MOBILE FIX (short viewport height)
   ========================================================================== */
@media (max-width: 768px) and (max-height: 500px) {
  .chat-container {
    height: calc(100vh - 100px);
  }

  .sidebar-left.active-tab,
  .sidebar-right.active-tab {
    height: calc(100vh - 100px);
  }

  .mobile-bottom-nav {
    height: 52px;
    bottom: 4px;
  }

  .mobile-center-sos-wrapper {
    top: -10px;
    flex: 0 0 50px;
  }

  .mobile-sos-circle-btn {
    width: 48px;
    height: 48px;
  }

  .mobile-nav-item span {
    display: none;      /* Hide tab labels in landscape */
  }

  .mobile-nav-svg {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================================================
   🎨 SMOOTH TRANSITIONS FOR TAB SWITCHING
   ========================================================================== */
@media (max-width: 1024px) {
  .mobile-tab-view {
    transition: opacity 0.15s ease;
  }

  .mobile-tab-view.active-tab {
    animation: fadeInTab 0.2s ease-out;
  }

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

