/* ============================================
   DClinPsy Interview Practice — "The Panel Room"
   Editorial institutional aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Palette — warm stone & clinical teal */
  --bg: #F6F3EE;
  --bg-warm: #EDE9E1;
  --surface: #FDFCFA;
  --surface-elevated: #FFFFFF;
  --sidebar-bg: #1C1917;
  --sidebar-surface: rgba(255, 255, 255, 0.04);
  --sidebar-text: #C7C2BA;
  --sidebar-heading: #8C8579;
  --header-bg: rgba(253, 252, 250, 0.88);

  --primary: #115E59;
  --primary-hover: #0D4F4A;
  --primary-light: #CCFBF1;
  --primary-muted: rgba(17, 94, 89, 0.08);

  --text: #292524;
  --text-secondary: #78716C;
  --text-muted: #A8A29E;
  --border: #E7E5E4;
  --border-subtle: #F0EEEB;

  /* Persona tones — muted, sophisticated */
  --williams: #B45309;
  --williams-bg: #FEF3C7;
  --williams-subtle: rgba(180, 83, 9, 0.08);
  --patel: #047857;
  --patel-bg: #D1FAE5;
  --patel-subtle: rgba(4, 120, 87, 0.08);
  --chen: #6D28D9;
  --chen-bg: #EDE9FE;
  --chen-subtle: rgba(109, 40, 217, 0.08);
  --panel-default: #44403C;
  --panel-default-bg: #F5F5F4;

  /* Feedback */
  --success: #059669;
  --warning: #D97706;
  --error: #DC2626;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Shadows — warm tinted */
  --shadow-sm: 0 1px 2px rgba(41, 37, 36, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(41, 37, 36, 0.08), 0 2px 4px -2px rgba(41, 37, 36, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(41, 37, 36, 0.12), 0 4px 8px -4px rgba(41, 37, 36, 0.06);
  --shadow-inner: inset 0 1px 2px rgba(41, 37, 36, 0.06);

  /* Layout */
  --sidebar-width: 272px;
  --header-height: 64px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 450ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain overlay for tactile depth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* App layout */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ============================================
   Header — frosted glass with serif title
   ============================================ */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--space-xl);
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(17, 94, 89, 0.3);
  position: relative;
}

/* Subtle shimmer on logo */
.logo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.header-titles h1 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.timer {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  padding: 6px var(--space-md);
  background: var(--bg-warm);
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.connection-status.connected .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.connection-status.disconnected .status-dot {
  background: var(--error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.connection-status.connecting .status-dot {
  background: var(--warning);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-text {
  color: var(--text-muted);
}

/* ============================================
   Main Layout
   ============================================ */

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ============================================
   Sidebar — deep charcoal with warm undertones
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform var(--transition-normal), width var(--transition-normal);
  position: relative;
}

/* Warm vertical accent line */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.06), rgba(255,255,255,0.02), rgba(255,255,255,0.06));
}

.sidebar-section {
  padding: var(--space-xl) var(--space-xl) var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-section:last-of-type {
  border-bottom: none;
}

.sidebar-title {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-heading);
  margin-bottom: var(--space-lg);
}

/* Phase list — vertical timeline */
.phase-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical connector line */
.phase-list::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 1.5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
}

.phase-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  opacity: 0.4;
  position: relative;
  z-index: 1;
}

.phase-item.active {
  opacity: 1;
  background: var(--sidebar-surface);
}

.phase-item.completed {
  opacity: 0.65;
}

.phase-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
  background: var(--sidebar-bg);
}

.phase-item.active .phase-indicator {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(17, 94, 89, 0.2);
}

.phase-item.completed .phase-indicator {
  border-color: var(--success);
  background: var(--success);
}

.phase-number {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
}

.phase-item.active .phase-number,
.phase-item.completed .phase-number {
  color: white;
}

.phase-item.completed .phase-number::before {
  content: "\2713";
}

.phase-item.completed .phase-number {
  font-size: 0;
}

.phase-item.completed .phase-number::before {
  font-size: 11px;
}

.phase-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.phase-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phase-item.active .phase-name {
  color: #F5F5F4;
  font-weight: 600;
}

.phase-lead {
  font-size: 11px;
  color: var(--sidebar-heading);
}

/* Panel members */
.panel-members {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.panel-member {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.panel-member:hover {
  background: var(--sidebar-surface);
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  position: relative;
}

.member-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.member-avatar.williams { background: var(--williams); }
.member-avatar.patel { background: var(--patel); }
.member-avatar.chen { background: var(--chen); }

/* Ring effect on avatars */
.member-avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.member-info {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
}

.member-role {
  font-size: 11px;
  color: var(--sidebar-heading);
  font-style: italic;
}

/* Sidebar toggle (mobile) */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 100px;
  left: var(--space-lg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  color: white;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 20;
}

/* ============================================
   Chat Container
   ============================================ */

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
  position: relative;
}

/* Subtle radial glow behind chat area */
.chat-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 300px;
  background: radial-gradient(ellipse at center top, rgba(17, 94, 89, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2xl) var(--space-2xl) var(--space-lg);
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}

/* ============================================
   Welcome Prompt — dramatic, editorial
   ============================================ */

.welcome-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  min-height: 65%;
  animation: welcome-enter 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes welcome-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-2xl);
  background: var(--primary-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2xl);
  position: relative;
  animation: welcome-icon-enter 800ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}

@keyframes welcome-icon-enter {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Decorative rings around welcome icon */
.welcome-icon::before,
.welcome-icon::after {
  content: '';
  position: absolute;
  border-radius: inherit;
  border: 1px solid rgba(17, 94, 89, 0.08);
}

.welcome-icon::before {
  inset: -8px;
}

.welcome-icon::after {
  inset: -16px;
  border-color: rgba(17, 94, 89, 0.04);
}

.welcome-prompt h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  line-height: 1.2;
  animation: welcome-text-enter 800ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both;
}

@keyframes welcome-text-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-prompt p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: var(--space-3xl);
  line-height: 1.7;
  animation: welcome-text-enter 800ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both;
}

.welcome-panel {
  display: flex;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  justify-content: center;
  animation: welcome-text-enter 800ms cubic-bezier(0.16, 1, 0.3, 1) 550ms both;
}

.welcome-member {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.welcome-member:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.welcome-member em {
  font-style: italic;
  color: var(--text-muted);
  font-family: var(--font-display);
}

/* ============================================
   Messages
   ============================================ */

.message {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  max-width: 740px;
  animation: msg-enter 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msg-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User message */
.message-user {
  flex-direction: row-reverse;
  margin-left: auto;
}

.message-user .message-bubble {
  background: var(--primary);
  color: white;
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-xl);
  border: none;
  box-shadow: 0 2px 8px rgba(17, 94, 89, 0.2);
}

/* Assistant message */
.message-assistant .message-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) var(--radius-sm);
}

.message-bubble {
  padding: var(--space-lg) var(--space-xl);
  box-shadow: var(--shadow-sm);
  max-width: 580px;
  min-width: 0;
  position: relative;
}

.message-persona {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.01em;
  font-style: italic;
}

.persona-williams .message-persona { color: var(--williams); }
.persona-patel .message-persona { color: var(--patel); }
.persona-chen .message-persona { color: var(--chen); }
.persona-panel .message-persona { color: var(--panel-default); }

/* Colored left accent on assistant messages */
.persona-williams .message-bubble { border-left: 3px solid var(--williams); }
.persona-patel .message-bubble { border-left: 3px solid var(--patel); }
.persona-chen .message-bubble { border-left: 3px solid var(--chen); }
.persona-panel .message-bubble { border-left: 3px solid var(--border); }

.message-text {
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

.message-assistant .msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.msg-avatar.williams { background: var(--williams); }
.msg-avatar.patel { background: var(--patel); }
.msg-avatar.chen { background: var(--chen); }
.msg-avatar.panel { background: var(--panel-default); }

/* Streaming cursor */
.message-bubble.streaming .message-text::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* System message */
.message-system {
  justify-content: center;
  max-width: 100%;
}

.message-system .message-bubble {
  background: var(--primary-muted);
  color: var(--primary);
  border: 1px solid rgba(17, 94, 89, 0.1);
  border-radius: var(--radius-full);
  border-left: 1px solid rgba(17, 94, 89, 0.1);
  padding: var(--space-sm) var(--space-xl);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  box-shadow: none;
}

.message-system.error .message-bubble {
  background: rgba(220, 38, 38, 0.06);
  color: var(--error);
  border-color: rgba(220, 38, 38, 0.1);
}

/* ============================================
   Typing Indicator
   ============================================ */

.typing-indicator {
  display: none;
  align-items: center;
  gap: var(--space-md);
  padding: 0 var(--space-2xl) var(--space-sm);
}

.typing-indicator.visible {
  display: flex;
}

.typing-dots {
  display: flex;
  gap: 5px;
  padding: var(--space-sm);
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.typing-text {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   Chat Input — refined, warm
   ============================================ */

.chat-input-area {
  padding: var(--space-md) var(--space-2xl) var(--space-xl);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(17, 94, 89, 0.08);
}

.input-wrapper textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  padding: var(--space-sm) 0;
  max-height: 150px;
}

.input-wrapper textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.input-actions {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-audio {
  background: transparent;
  color: var(--text-muted);
}

.btn-audio:hover {
  background: var(--bg-warm);
  color: var(--text);
}

.btn-audio.recording {
  background: rgba(220, 38, 38, 0.08);
  color: var(--error);
  animation: pulse-audio 1.5s ease-in-out infinite;
}

@keyframes pulse-audio {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1); }
}

.btn-send {
  background: var(--primary);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 4px rgba(17, 94, 89, 0.2);
}

.btn-send:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(17, 94, 89, 0.3);
  transform: translateY(-1px);
}

.btn-send:active {
  transform: translateY(0);
}

.btn-send:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Audio recording bar */
.audio-bar {
  display: none;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--primary-muted);
  border: 1px solid rgba(17, 94, 89, 0.12);
  border-radius: var(--radius-lg);
  margin-top: var(--space-sm);
}

.audio-bar.visible {
  display: flex;
}

.audio-visualizer {
  width: 160px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
}

.audio-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  flex: 1;
}

.btn-audio-stop {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 5px var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  background: var(--error);
  color: white;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-audio-stop:hover {
  background: #B91C1C;
}

.input-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-sm);
  letter-spacing: 0.01em;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 15;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-toggle {
    display: flex;
  }

  .header-titles h1 {
    font-size: 15px;
  }

  .chat-messages {
    padding: var(--space-lg);
  }

  .chat-input-area {
    padding: var(--space-sm) var(--space-md) var(--space-md);
  }

  .message-bubble {
    max-width: calc(100vw - 100px);
  }

  .welcome-prompt {
    padding: var(--space-2xl) var(--space-lg);
  }

  .welcome-prompt h2 {
    font-size: 22px;
  }

  .welcome-panel {
    flex-direction: column;
    align-items: center;
  }

  .timer {
    display: none;
  }
}

/* Sidebar overlay on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.4);
  backdrop-filter: blur(2px);
  z-index: 14;
}

.sidebar-overlay.visible {
  display: block;
}

/* ============================================
   Scrollbar — subtle, warm
   ============================================ */

.chat-messages::-webkit-scrollbar {
  width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox scrollbar */
.chat-messages {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ============================================
   Utilities
   ============================================ */

.hidden {
  display: none !important;
}

/* Selection color matching brand */
::selection {
  background: rgba(17, 94, 89, 0.15);
  color: var(--text);
}
