/* ============================================================
   MODERN UI v4.0 — Premium Indigo Theme Overlay (Nova Session 30)
   Overrides styles.css: indigo palette, mesh gradients,
   glassmorphism, spring animations, micro-interactions
   Applied AFTER styles.css — all overrides are intentional
   ============================================================ */

/* ---- INDIGO DESIGN TOKENS (override base blue) ---- */
:root {
  --primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #eef2ff;
  --blue: #6366f1; --blue-dark: #4f46e5; --blue-light: #eef2ff;
  --green: #34d399; --yellow: #fbbf24; --red: #f87171; --cyan: #22d3ee;
  --accent-violet: #8b5cf6; --accent-rose: #f43f5e; --accent-emerald: #10b981; --accent-amber: #f59e0b;
  --bg: #080c18; --bg-card: rgba(255,255,255,0.04); --bg-elevated: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08); --border-light: rgba(255,255,255,0.12);
  --glass-border: rgba(148,163,184,0.08); --glass-highlight: rgba(255,255,255,0.03);
  --radius: 16px; --radius-sm: 10px; --radius-lg: 24px;
  --shadow-glow: 0 8px 32px rgba(99,102,241,0.15);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1); --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --glass-blur: 16px;
}
body.pediatric-mode {
  --primary: #7C3AED; --primary-dark: #6D28D9; --primary-light: #EDE9FE;
  --blue: #7C3AED; --blue-dark: #6D28D9; --blue-light: #EDE9FE;
  --bg: #0c0818; --bg-card: rgba(124,58,237,0.06); --bg-elevated: rgba(124,58,237,0.12);
  --border: rgba(124,58,237,0.15); --border-light: rgba(124,58,237,0.25);
  --accent-violet: #c084fc;
}

/* ---- AMBIENT MESH GRADIENT BACKGROUND ---- */
body {
  background: #080c18;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(34,211,238,0.05) 0%, transparent 50%);
  background-attachment: fixed;
}
body.pediatric-mode {
  background: #0c0818;
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(124,58,237,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(236,72,153,0.07) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Noise texture for premium matte feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}
body > * { position: relative; z-index: 1; }

/* ---- ONBOARDING GRADIENT ---- */
.onboarding-overlay {
  background: linear-gradient(145deg, #080c18 0%, #1a1e3a 30%, #312e81 60%, #6366f1 100%) !important;
}
body.pediatric-mode .onboarding-overlay {
  background: linear-gradient(145deg, #0c0818 0%, #2d1b4e 30%, #7C3AED 100%) !important;
}

/* ---- GRADIENT BUTTONS ---- */
.btn { transition: all 0.25s var(--ease-spring); }
.btn:active:not(:disabled) { transform: scale(0.97); transition-duration: 0.1s; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--accent-violet));
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}

/* ---- FROSTED GLASS NAV ---- */
.nav {
  background: rgba(8,12,24,0.7);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: var(--glass-border);
}
.nav-link.active { text-shadow: 0 0 20px rgba(99,102,241,0.3); }

/* ---- FROSTED MOBILE MENU ---- */
.mobile-menu {
  background: rgba(8,12,24,0.95);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom-color: var(--glass-border);
  z-index: 101;
}
.mobile-menu a {
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  transition: background 0.2s;
}
.mobile-menu a:hover { background: rgba(99,102,241,0.1); }

/* ---- FLOATING PILL BOTTOM NAV ---- */
.bottom-nav {
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(8,12,24,0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav-item {
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
  padding: 8px 4px;
}
.bottom-nav-item.active { background: rgba(99,102,241,0.12); }
.bottom-nav-item span:first-child {
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.bottom-nav-item.active span:first-child { transform: scale(1.15); }

/* ---- SMOOTH PAGE TRANSITIONS ---- */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.screen.active { animation: fadeSlideIn 0.4s var(--ease-spring); }

/* ---- GRADIENT HERO TEXT ---- */
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #f0f0f5 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.screen-header h2 { letter-spacing: -0.02em; }

/* ---- HERO V3 — Modern Bold (Session 33 Redesign) ---- */
/* Legacy hero-v3 — replaced by hero-v4 */
.hero-v3 {
  text-align: center; padding: 56px 20px 32px; position: relative;
  max-width: 800px; margin: 0 auto;
}

/* ---- HERO V4 — Full-bleed background image hero ---- */
.hero-v4 {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  margin: 0 auto 8px; max-width: 960px;
  min-height: 420px; display: flex; align-items: center; justify-content: center;
}
.hero-v4-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-v4-bg-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.6) saturate(1.2);
}
.hero-v4-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(8,12,24,0.3) 0%,
    rgba(8,12,24,0.6) 50%,
    rgba(8,12,24,0.85) 100%);
}
.hero-v4-content {
  position: relative; z-index: 1; text-align: center;
  padding: 56px 24px 40px; max-width: 720px;
}
.hero-title-v4 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800;
  letter-spacing: -0.045em; line-height: 1.08; margin: 0 0 20px;
  color: var(--text);
}
.hero-gradient-v4 {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 40%, #f472b6 70%, #fb923c 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: heroShimmer 6s ease-in-out infinite;
}
.hero-sub-v4 {
  font-size: clamp(0.95rem, 2vw, 1.1rem); color: rgba(220,225,235,0.9);
  max-width: 560px; margin: 0 auto 28px; line-height: 1.65;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
@media (max-width: 600px) {
  .hero-v4 { min-height: 340px; border-radius: var(--radius); }
  .hero-v4-content { padding: 36px 16px 28px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn-hero-primary, .btn-hero-secondary { width: 100%; text-align: center; }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 24px; font-size: 0.72rem;
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2);
  color: var(--primary-light); font-weight: 500; letter-spacing: 0.02em; margin-bottom: 24px;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px rgba(52,211,153,0.6);
  animation: heroPulse 2s ease-in-out infinite;
}
@keyframes heroPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-title-v3 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800;
  letter-spacing: -0.045em; line-height: 1.08; margin: 0 0 20px;
  color: var(--text);
}
.hero-gradient-v3 {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 40%, #f472b6 70%, #fb923c 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: heroShimmer 6s ease-in-out infinite;
}
@keyframes heroShimmer {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-sub-v3 {
  font-size: clamp(0.95rem, 2vw, 1.1rem); color: rgba(148,163,184,0.9);
  max-width: 560px; margin: 0 auto 28px; line-height: 1.65;
}
.hero-ctas {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px;
}
.btn-hero-primary {
  padding: 14px 32px; border-radius: 14px; border: none; cursor: pointer;
  font-size: 0.95rem; font-weight: 600; font-family: inherit; color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-violet) 100%);
  box-shadow: 0 4px 20px rgba(99,102,241,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.25s var(--ease-spring);
}
.btn-hero-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px rgba(99,102,241,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-hero-secondary {
  padding: 14px 32px; border-radius: 14px; cursor: pointer;
  font-size: 0.95rem; font-weight: 600; font-family: inherit;
  color: var(--text-muted); background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease-spring);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2);
  color: #e2e8f0; transform: translateY(-1px);
}
.hero-models {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.hero-model-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px; font-size: 0.7rem; font-weight: 500;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  color: rgba(148,163,184,0.8);
}
.model-dot { width: 6px; height: 6px; border-radius: 50%; }
.model-dot-gpt { background: var(--green); }
.model-dot-sonnet { background: var(--primary); }
.model-dot-opus { background: var(--accent-violet); }
.model-dot-cerebras { background: var(--yellow); }
@media (max-width: 600px) {
  .hero-v3 { padding: 36px 16px 24px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn-hero-primary, .btn-hero-secondary { width: 100%; text-align: center; }
}

/* ---- BENTO GRID — Feature Cards ---- */
.bento-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin: 8px 0 40px; max-width: 900px; margin-left: auto; margin-right: auto;
  padding: 0 4px;
}
.bento-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); cursor: pointer;
  background: var(--bg-card); backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 24px rgba(0,0,0,0.15);
  transition: all 0.35s var(--ease-spring);
  animation: cardEntrance 0.5s var(--ease-spring) backwards;
  min-height: 280px; display: flex; flex-direction: column;
}
.bento-card:nth-child(1) { animation-delay: 0.05s; }
.bento-card:nth-child(2) { animation-delay: 0.1s; }
.bento-card:nth-child(3) { animation-delay: 0.15s; }
.bento-card:nth-child(4) { animation-delay: 0.2s; }
.bento-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,0.25) 50%, rgba(34,211,238,0.15) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.bento-card:hover::before { opacity: 1; }
.bento-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-glow), 0 2px 8px rgba(0,0,0,0.3);
  border-color: rgba(99,102,241,0.25);
}
.bento-card:active { transform: translateY(-1px) scale(0.99); transition-duration: 0.1s; }
.bento-card:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Bento illustration area — GPT Image 1 generated artwork */
.bento-visual {
  height: 200px; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bento-visual img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease-spring);
  filter: brightness(0.85) saturate(1.1);
}
.bento-card:hover .bento-visual img {
  transform: scale(1.08);
  filter: brightness(0.95) saturate(1.2);
}
.bento-visual::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}

/* Bento content area */
.bento-content { padding: 20px 20px 16px; flex: 1; display: flex; flex-direction: column; }
.bento-label {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.bento-card-1 .bento-label { color: var(--primary); }
.bento-card-2 .bento-label { color: var(--cyan); }
.bento-card-3 .bento-label { color: var(--green); }
.bento-card-4 .bento-label { color: var(--yellow); }
.bento-title {
  font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; color: var(--text);
  letter-spacing: -0.01em;
}
.bento-desc {
  font-size: 0.78rem; line-height: 1.5; color: var(--text-muted); margin: 0 0 auto;
}
.bento-stats {
  display: flex; gap: 12px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.bento-stats span {
  font-size: 0.68rem; font-weight: 500; color: rgba(148,163,184,0.7);
}
/* Colored top-edge accents */
.bento-card-1 { border-top: 2px solid rgba(99,102,241,0.5); }
.bento-card-2 { border-top: 2px solid rgba(34,211,238,0.5); }
.bento-card-3 { border-top: 2px solid rgba(52,211,153,0.5); }
.bento-card-4 { border-top: 2px solid rgba(251,191,36,0.5); }

@media (max-width: 700px) {
  .bento-grid { grid-template-columns: 1fr; gap: 14px; }
  .bento-card { min-height: 240px; }
  .bento-visual { height: 180px; }
}
@media (max-width: 400px) {
  .bento-visual { height: 140px; }
  .bento-content { padding: 14px 14px 12px; }
}

/* ---- HERO V2 (Legacy — kept for fallback) ---- */
.hero-v2 {
  text-align: center; padding: 48px 20px 32px; position: relative;
}
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 0.75rem;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc; font-weight: 500; letter-spacing: 0.02em; margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.1; margin: 0 0 16px;
  color: var(--text);
}
.hero-gradient {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-v2 .hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem); color: var(--text-muted);
  max-width: 600px; margin: 0 auto 28px; line-height: 1.6;
}
.hero-stats {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
}
.hero-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.hero-stat-num {
  font-size: 1.5rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label {
  font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 500;
}
@media (max-width: 600px) {
  .hero-v2 { padding: 32px 16px 24px; }
  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 1.2rem; }
}

/* ---- GLASS ACTION CARDS + STAGGERED ENTRANCE ---- */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.action-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 24px rgba(0,0,0,0.15);
  animation: cardEntrance 0.5s var(--ease-spring) backwards;
  transition: all 0.3s var(--ease-spring);
}
.action-card:nth-child(1) { animation-delay: 0.05s; }
.action-card:nth-child(2) { animation-delay: 0.10s; }
.action-card:nth-child(3) { animation-delay: 0.15s; }
.action-card:nth-child(4) { animation-delay: 0.20s; }
.action-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-glow), 0 2px 8px rgba(0,0,0,0.3);
  border-color: rgba(99,102,241,0.3);
}
.action-card:active { transform: translateY(-2px) scale(0.98); transition-duration: 0.1s; }

/* Icon wrap — SVG icons */
.action-icon-wrap {
  width: 64px; height: 64px; border-radius: 16px;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.action-icon-wrap img { width: 100%; height: 100%; border-radius: 16px; }
.action-card:hover .action-icon-wrap { transform: scale(1.1); }
.action-card:nth-child(1) .action-icon-wrap { box-shadow: 0 0 24px rgba(99,102,241,0.15); }
.action-card:nth-child(2) .action-icon-wrap { box-shadow: 0 0 24px rgba(34,211,238,0.15); }
.action-card:nth-child(3) .action-icon-wrap { box-shadow: 0 0 24px rgba(52,211,153,0.15); }
.action-card:nth-child(4) .action-icon-wrap { box-shadow: 0 0 24px rgba(251,191,36,0.15); }

/* ---- GLASS SAMPLE CARDS ---- */
.sample-card {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 0 var(--glass-highlight);
  transition: all 0.25s var(--ease-spring);
}
.sample-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.1);
}

/* ---- GLASS TYPE CARDS ---- */
.type-card {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: var(--glass-border);
  transition: all 0.25s var(--ease-spring);
}
.type-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.06);
}
.type-card.selected { box-shadow: 0 0 20px rgba(99,102,241,0.1); background: rgba(99,102,241,0.1); }

/* ---- GRADIENT MODEL BADGE ---- */
.model-badge {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border-color: rgba(99,102,241,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  color: #818cf8;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---- GRADIENT CHAT MESSAGES ---- */
@keyframes msgSlideLeft {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes msgSlideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.chat-msg.user {
  animation: msgSlideLeft 0.3s var(--ease-spring);
  background: linear-gradient(135deg, var(--blue), var(--accent-violet));
  box-shadow: 0 2px 12px rgba(99,102,241,0.2);
}
.chat-msg.assistant {
  animation: msgSlideRight 0.3s var(--ease-spring);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: var(--glass-border);
}

/* ---- INPUT FOCUS GLOW ---- */
#chat-input {
  background: rgba(8,12,24,0.6);
  transition: all 0.2s ease;
}
#chat-input:focus {
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1), 0 0 20px rgba(99,102,241,0.05);
}
#panel-query:focus {
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1), 0 0 20px rgba(99,102,241,0.05);
}

/* ---- SUGGESTION CHIP HOVER ---- */
.suggestion-chip:hover,
.chat-suggestions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99,102,241,0.1);
}

/* ---- GLASS RESULTS/PROFILE SECTIONS ---- */
.results-area, .panel-results-area, .results-container {
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-color: var(--glass-border);
  animation: fadeSlideIn 0.4s var(--ease-spring);
}
.profile-section, .profile-header-card {
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-color: var(--glass-border);
}
.panel-model-card {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- PROFILE AVATAR GLOW ---- */
.profile-avatar {
  background: linear-gradient(135deg, var(--blue), var(--accent-violet));
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}

/* ---- LOADING GLASS ---- */
.loading-content {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: var(--glass-border);
}
.toast-notification { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ---- ENHANCED GRADIENTS ---- */
.confidence-fill { background: linear-gradient(90deg, var(--red), var(--yellow), var(--green)); }
.progress-bar { background: linear-gradient(90deg, var(--blue), var(--cyan)); }

/* ---- DROPZONE GLOW ---- */
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 24px rgba(99,102,241,0.08);
}

/* ---- CONSENSUS CARD GLOW ---- */
.consensus-card {
  background: rgba(99,102,241,0.08);
  box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 0 24px rgba(99,102,241,0.08);
}

/* ---- VOICE MIC INDIGO ---- */
.btn-voice-mic { border-color: var(--blue); color: var(--blue); }
.btn-voice-mic:hover { background: rgba(99,102,241,0.15); }
.btn-voice-mic.listening { background: var(--blue); }
@keyframes pulse-mic-indigo { 0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); } 50% { box-shadow: 0 0 0 10px rgba(99,102,241,0); } }
.btn-voice-mic.listening { animation: pulse-mic-indigo 1.5s infinite; }
.voice-ring { border-color: rgba(99,102,241,0.2); }

/* ---- FOCUS INDICATORS (indigo) ---- */
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(99,102,241,0.4); }
.profile-field input:focus, .profile-field select:focus { box-shadow: 0 0 0 2px rgba(99,102,241,0.2); }
.chat-retry-btn:hover { background: rgba(99,102,241,0.15); }

/* ---- HOVER STATES (indigo) ---- */
.sample-lab-card:hover { border-color: var(--blue); background: rgba(99,102,241,0.08); }
.lab-history-item:hover { background: rgba(99,102,241,0.06); }
.chat-history-item.active { background: rgba(99,102,241,0.1); }
.upload-dropzone-sm:hover { background: rgba(99,102,241,0.06); }

/* ---- MOBILE FLOATING NAV SPACING ---- */
@media (max-width: 768px) {
  .screen { padding-bottom: 100px; }
  .content-area { padding-bottom: 100px; }
  .chat-layout, .chat-wrapper { height: calc(100vh - 170px); }
}

/* ---- CHAT IMAGE ATTACHMENT (directive 8) ---- */
.chat-image-preview {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: var(--bg-elevated);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid var(--glass-border); border-bottom: none;
}
.chat-image-preview.hidden { display: none; }
.chat-img-thumb {
  width: 48px; height: 48px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--glass-border);
}
.btn-remove-attach {
  background: rgba(248,113,113,0.15); color: var(--red);
  border: none; border-radius: 50%; width: 24px; height: 24px;
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.btn-remove-attach:hover { background: rgba(248,113,113,0.3); }
.btn-attach {
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; padding: 4px 8px; border-radius: 8px;
  transition: background 0.2s;
}
.btn-attach:hover { background: var(--bg-elevated); }

/* ---- CHAT CONTINUE SECTION (directive 9) ---- */
.chat-continue-section {
  margin-top: 16px; text-align: center;
  padding: 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08));
  border: 1px dashed var(--primary);
}
.chat-continue-section.hidden { display: none; }
.chat-continue-section .btn {
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  color: white; border: none;
}
.chat-continue-section .btn:hover { filter: brightness(1.1); }

/* ---- MOBILE MENU CONTROLS ---- */
.mobile-menu-controls {
  padding: 12px 16px; border-top: 1px solid var(--glass-border);
  margin-top: 8px;
}
.mobile-control-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
}
.mobile-control-label {
  color: var(--text-muted); font-size: 0.85rem; font-weight: 500;
}
.mobile-control-select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.85rem; background: var(--bg-elevated); color: var(--text);
  cursor: pointer; font-family: inherit; min-width: 180px;
}

/* ---- MOBILE INLINE MODEL PICKER ---- */
.mobile-model-bar {
  display: none;
}
.mobile-model-chat {
  display: none;
}
@media (max-width: 768px) {
  .mobile-model-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; margin-bottom: 12px;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); backdrop-filter: blur(12px);
  }
  .mobile-model-label {
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
  }
  .mobile-model-inline {
    flex: 1; padding: 6px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.82rem;
    background: var(--bg-elevated); color: var(--text);
    cursor: pointer; font-family: inherit;
  }
  .mobile-model-chat {
    display: inline-block; padding: 4px 8px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.75rem;
    background: var(--bg-elevated); color: var(--text);
    cursor: pointer; font-family: inherit; margin-left: auto;
  }
  #chat-model-badge { display: none; }
}

/* ---- SAMPLE LIBRARY ---- */
.library-filters {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
  padding: 4px; background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}
.lib-filter {
  padding: 8px 14px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 0.8rem; font-weight: 500; font-family: inherit;
  transition: all 0.2s ease; white-space: nowrap;
}
.lib-filter:hover { background: rgba(99,102,241,0.08); color: var(--text); }
.lib-filter.active {
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  color: white; box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.library-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.lib-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; transition: all 0.25s var(--ease-spring);
  box-shadow: inset 0 1px 0 0 var(--glass-highlight);
}
.lib-card:hover {
  border-color: rgba(99,102,241,0.4); transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.12);
}
.lib-card:active { transform: translateY(-1px) scale(0.99); transition-duration: 0.1s; }
.lib-card[style*="display: none"] { display: none !important; }

.lib-card-icon {
  width: 48px; height: 48px; min-width: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; border-radius: 12px;
  background: rgba(99,102,241,0.1);
}

.lib-card-image { flex-direction: column; }
.lib-card-thumb {
  width: 100%; height: 160px; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg);
}
.lib-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s var(--ease-spring);
}
.lib-card-image:hover .lib-card-thumb img { transform: scale(1.05); }

.lib-card-body { flex: 1; }
.lib-card-body strong { font-size: 0.95rem; color: var(--text); display: block; margin-bottom: 4px; }
.lib-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; margin: 0; }

.lib-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lib-chip {
  padding: 2px 8px; border-radius: 12px; font-size: 0.7rem;
  font-weight: 500; letter-spacing: 0.02em;
}
.chip-lab { background: rgba(34,211,238,0.12); color: var(--cyan); }
.chip-values { background: rgba(148,163,184,0.12); color: var(--text-muted); }
.chip-derm { background: rgba(248,113,113,0.12); color: var(--red); }
.chip-rad { background: rgba(99,102,241,0.12); color: var(--primary-light); }
.chip-cardio { background: rgba(244,63,94,0.12); color: var(--red); }
.chip-neuro { background: rgba(139,92,246,0.12); color: var(--accent-violet, #c4b5fd); }
.chip-ortho { background: rgba(52,211,153,0.12); color: var(--green); }
.chip-chat { background: rgba(251,191,36,0.12); color: var(--yellow); }
.chip-severity-low { background: rgba(52,211,153,0.12); color: var(--green); }
.chip-severity-mod { background: rgba(251,191,36,0.12); color: var(--yellow); }
.chip-severity-high { background: rgba(248,113,113,0.12); color: var(--red); }
.chip-severity-urgent { background: rgba(244,63,94,0.2); color: var(--red); font-weight: 700; }
.chip-download { background: rgba(99,102,241,0.15); color: #818cf8; text-decoration: none; cursor: pointer; transition: background 0.2s; }
.chip-download:hover { background: rgba(99,102,241,0.3); color: #a5b4fc; }

/* ---- CASE PREVIEW MODAL ---- */
.case-preview-modal {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeSlideIn 0.25s var(--ease-spring);
}
.case-preview-content {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px); max-width: 800px; width: 100%;
  max-height: 90vh; overflow-y: auto; position: relative;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5);
}
.case-preview-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(0,0,0,0.5); border: none; color: white;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.case-preview-close:hover { background: rgba(244,63,94,0.8); }
.case-preview-image {
  width: 100%; height: 300px; background: var(--bg);
  border-radius: var(--radius-lg, 16px) var(--radius-lg, 16px) 0 0;
  overflow: hidden;
}
.case-preview-image img {
  width: 100%; height: 100%; object-fit: contain;
}
.case-preview-details {
  padding: 24px;
}
.case-preview-details h3 {
  font-size: 1.3rem; color: var(--text); margin: 0 0 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.case-preview-desc {
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.6;
  margin: 0 0 16px;
}
.case-preview-context-box,
.case-preview-findings-box {
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.case-preview-context-box {
  background: rgba(99,102,241,0.06); border: 1px solid rgba(99,102,241,0.15);
}
.case-preview-context-box strong { color: var(--primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.case-preview-context-box p { margin: 6px 0 0; font-size: 0.85rem; color: var(--text-muted); }
.case-preview-findings-box {
  background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.15);
}
.case-preview-findings-box strong { color: var(--green); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.case-preview-chips {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}
.case-preview-chips .finding-chip {
  padding: 4px 10px; border-radius: 12px; font-size: 0.75rem;
  background: rgba(52,211,153,0.1); color: #6ee7b7; font-weight: 500;
}
.case-preview-btn {
  width: 100%; margin-top: 8px;
  font-size: 1rem; padding: 14px;
}
@media (max-width: 600px) {
  .case-preview-image { height: 200px; }
  .case-preview-details { padding: 16px; }
  .case-preview-content { max-height: 95vh; }
}

/* ---- ANNOTATION OVERLAY (Full-screen viewer) ---- */
.annotation-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.95); display: flex; flex-direction: column;
  animation: fadeSlideIn 0.3s var(--ease-spring);
}
.annotation-overlay.hidden { display: none; }
.annotation-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(8,12,24,0.9);
  border-bottom: 1px solid var(--glass-border);
}
.annotation-header h3 { margin: 0; font-size: 1rem; color: var(--text); }
.annotation-controls { display: flex; gap: 6px; }
.annotation-controls .btn { font-size: 0.75rem; padding: 6px 10px; }
.btn-close-annotation { background: rgba(248,113,113,0.15) !important; color: var(--red) !important; }
.btn-close-annotation:hover { background: rgba(248,113,113,0.3) !important; }
.annotation-body {
  flex: 1; display: flex; overflow: hidden;
}
.annotation-image-wrap {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: grab; min-height: 0;
}
.annotation-image-wrap:active { cursor: grabbing; }
#annotation-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transform-origin: center center; transition: transform 0.1s ease;
  user-select: none; -webkit-user-drag: none;
}
.annotation-pins {
  position: absolute; inset: 0; pointer-events: none;
  transform-origin: center center;
}
.annotation-pins .annotation-pin {
  position: absolute; width: 26px; height: 26px;
  border-radius: 50%; border: 2px solid white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: white;
  transform: translate(-50%, -50%); pointer-events: auto;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.annotation-pins .annotation-pin:hover {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 12px rgba(99,102,241,0.5);
}
.annotation-sidebar {
  width: 300px; min-width: 250px; overflow-y: auto;
  padding: 16px; background: rgba(8,12,24,0.95);
  border-left: 1px solid var(--glass-border);
}
.annotation-sidebar h4 { margin: 0 0 12px; font-size: 0.9rem; color: var(--text); }
.annotation-finding {
  padding: 10px 12px; margin-bottom: 8px;
  border-radius: var(--radius-sm); background: var(--bg-card);
  font-size: 0.8rem; color: var(--text-muted); line-height: 1.4;
  display: flex; align-items: flex-start; gap: 8px;
}
.annotation-num {
  min-width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: white;
}
.annotation-analysis { margin-top: 16px; }
.annotation-analysis-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.annotation-trigger { margin-top: 16px; text-align: center; }
.annotation-trigger .btn {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(99,102,241,0.3); color: var(--text);
}
.annotation-trigger .btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  color: white;
}
/* Library card in Image Analysis screen */
.library-card {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--glass-border);
  cursor: pointer; transition: all 0.2s;
}
.library-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.library-card-img { width: 80px; height: 60px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.library-card-img img { width: 100%; height: 100%; object-fit: cover; }
.library-card-info { flex: 1; }
.library-card-info strong { font-size: 0.85rem; color: var(--text); }
.library-card-context { font-size: 0.7rem; color: var(--text-muted); margin: 4px 0; }
.library-card-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.library-card-source { font-size: 0.6rem; color: var(--text-muted); opacity: 0.7; margin-top: 4px; font-style: italic; }
.library-card-img picture { display: block; width: 100%; height: 100%; }
.library-card-img picture img { width: 100%; height: 100%; object-fit: cover; }
.finding-chip {
  padding: 2px 6px; border-radius: 8px; font-size: 0.65rem;
  background: rgba(99,102,241,0.12); color: #a5b4fc;
}
.sample-library-inline { margin: 16px 0; text-align: center; }
.sample-library-panel {
  margin-top: 12px; padding: 16px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--glass-border);
}
.sample-library-panel.hidden { display: none; }
.sample-library-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}

/* Clinical note banner for sample lab data */
.sample-clinical-note {
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px;
  font-size: 0.85rem; color: #c7d2fe; line-height: 1.5;
}
.sample-clinical-note strong { color: #a5b4fc; }
.sample-clinical-ref {
  background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm); padding: 8px 14px; margin: 8px 0 12px;
  font-size: 0.8rem; color: rgba(187,247,208,0.9); line-height: 1.5; font-style: italic;
}
.sample-clinical-ref strong { color: rgba(134,239,172,0.95); font-style: normal; }

@media (max-width: 768px) {
  .annotation-body { flex-direction: column; }
  .annotation-sidebar { width: 100%; min-width: auto; max-height: 40vh; border-left: none; border-top: 1px solid var(--glass-border); }
}

/* ---- AI IMAGE ANNOTATION VIEWER (inline) ---- */
.annotation-viewer {
  position: relative; margin: 16px 0; border-radius: var(--radius);
  overflow: hidden; background: var(--bg); border: 1px solid var(--glass-border);
}
.annotation-viewer-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: rgba(0,0,0,0.4); border-bottom: 1px solid var(--glass-border);
}
.annotation-viewer-toolbar button {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-elevated); color: var(--text); cursor: pointer;
  font-size: 0.8rem; font-family: inherit; transition: all 0.2s;
}
.annotation-viewer-toolbar button:hover { border-color: var(--primary); background: rgba(99,102,241,0.15); }
.annotation-viewer-toolbar button.active { background: var(--primary); border-color: var(--primary); color: white; }
.annotation-zoom-info { color: var(--text-muted); font-size: 0.75rem; margin-left: auto; }

.annotation-canvas-wrap {
  position: relative; overflow: hidden; cursor: grab;
  min-height: 300px; max-height: 500px; display: flex;
  align-items: center; justify-content: center;
}
.annotation-canvas-wrap.dragging { cursor: grabbing; }
.annotation-canvas-wrap img {
  max-width: 100%; max-height: 500px; transition: transform 0.2s ease;
  user-select: none; -webkit-user-drag: none;
}

.annotation-pin {
  position: absolute; width: 28px; height: 28px;
  border-radius: 50%; border: 2px solid white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: white; cursor: pointer;
  transform: translate(-50%, -50%); z-index: 5;
  transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.annotation-pin:hover { transform: translate(-50%, -50%) scale(1.2); z-index: 10; }
.annotation-pin.pin-finding { background: rgba(248,113,113,0.9); }
.annotation-pin.pin-normal { background: rgba(52,211,153,0.9); }
.annotation-pin.pin-concern { background: rgba(251,191,36,0.9); }
.annotation-pin.pin-info { background: rgba(99,102,241,0.9); }

.annotation-tooltip {
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.9); color: white; padding: 8px 12px;
  border-radius: 8px; font-size: 0.75rem; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
  max-width: 240px; white-space: normal; text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.annotation-pin:hover .annotation-tooltip { opacity: 1; }

.annotation-legend {
  display: flex; gap: 12px; flex-wrap: wrap; padding: 10px 12px;
  background: rgba(0,0,0,0.3); border-top: 1px solid var(--glass-border);
  font-size: 0.75rem; color: var(--text-muted);
}
.annotation-legend-item { display: flex; align-items: center; gap: 4px; }
.annotation-legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.legend-finding { background: var(--red); }
.legend-normal { background: var(--green); }
.legend-concern { background: var(--yellow); }
.legend-info { background: var(--primary); }

.annotation-findings-list {
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.annotation-finding-item {
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px;
  border-radius: var(--radius-sm); background: var(--bg-card);
  border: 1px solid var(--glass-border); font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s;
}
.annotation-finding-item:hover { border-color: var(--primary); background: rgba(99,102,241,0.06); }
.annotation-finding-num {
  width: 22px; height: 22px; min-width: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: white;
}
.annotation-finding-text { flex: 1; }
.annotation-finding-text strong { display: block; font-size: 0.8rem; margin-bottom: 2px; }
.annotation-finding-text p { margin: 0; color: var(--text-muted); font-size: 0.75rem; line-height: 1.3; }

@media (max-width: 768px) {
  .library-grid { grid-template-columns: 1fr; }
  .library-filters { gap: 4px; }
  .lib-filter { padding: 6px 10px; font-size: 0.75rem; }
  .lib-card-thumb { height: 140px; }
  .annotation-canvas-wrap { min-height: 200px; max-height: 350px; }
}

/* ---- REDUCED MOTION (Accessibility) ---- */
@media (prefers-reduced-motion: reduce) {
  .action-card, .sample-card, .type-card { animation: none; }
  .chat-msg.user, .chat-msg.assistant { animation: none; }
  .screen.active { animation: none; }
  body::before { display: none; }
}
