@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+Sinhala:wght@400;500;600;700&display=swap');

:root {
  --bg-black: #030305;
  --bg-surface: #0b0c10;
  --bg-elevated: #111319;
  --border-hair: rgba(255, 255, 255, 0.11);
  --border-hi: rgba(255, 255, 255, 0.24);
  --shadow-white-sm: 0 4px 16px -4px rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.09);
  --shadow-white-md: 0 10px 30px -10px rgba(255, 255, 255, 0.13), 0 0 18px -6px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-white-hi: 0 12px 34px -8px rgba(255, 255, 255, 0.18), 0 0 22px -6px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.2);

  --text-main: #f7f8fa;
  --text-soft: rgba(255, 255, 255, 0.62);
  --text-muted: rgba(255, 255, 255, 0.38);
  --accent: #ffffff;
  --danger: #ff6b7a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* TIGHT MINIMAL BORDER RADII */
  --r-shell: 14px;
  --r-card: 10px;
  --r-btn: 8px;
  --r-chip: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  background: #000000;
  color: var(--text-main);
  font-family: 'Inter', 'Noto Sans Sinhala', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: transparent;
}

button { cursor: pointer; }

/* FULL-VIEWPORT RESPONSIVE STAGE (MOBILE + TABLET PORTRAIT + DESKTOP!) */
.pwa-stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100svh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--bg-black);
}

.phone-shell {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-black);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

/* Keep top bar, notes stream, composer & voice overlay cleanly centered on Tablet Portrait & Desktop */
.top-bar,
.session-strip,
.notes-scroll,
.composer-dock,
.voice-top-bar,
.voice-preview-card,
.voice-actions-row {
  width: 100%;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* TABLET PORTRAIT (600px - 1080px, iPad / Galaxy Tab Portrait) — Full Edge-to-Edge Spacious Layout! */
@media (min-width: 600px) {
  .top-bar {
    padding: calc(18px + env(safe-area-inset-top, 0px)) 24px 12px;
  }
  .icon-glass-btn {
    width: 42px;
    height: 42px;
  }
  .icon-glass-btn svg {
    width: 19px;
    height: 19px;
  }
  .top-center-pill {
    font-size: 13px;
    padding: 8px 16px;
    max-width: 280px;
  }
  .hero-orb-btn,
  .hero-orb-canvas {
    width: 316px;
    height: 316px;
  }
  .hero-greeting {
    font-size: 15px;
    margin-bottom: 8px;
  }
  .hero-title {
    font-size: 34px;
    max-width: 440px;
  }
  .orb-style-btn {
    padding: 7px 15px;
    font-size: 12.5px;
  }
  .session-strip {
    padding: 8px 24px 12px;
  }
  .session-title-display {
    font-size: 16.5px;
  }
  .notes-scroll {
    padding: 6px 24px 22px;
    gap: 13px;
  }
  .note-card {
    padding: 16px 18px;
  }
  .note-body {
    font-size: 15.2px;
    line-height: 1.62;
  }
  .composer-dock {
    padding: 10px 24px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .tag-chip {
    padding: 6px 13px;
    font-size: 12px;
  }
  .glass-pill-form {
    padding: 9px 10px 9px 16px;
  }
  .pill-input {
    font-size: 15.5px;
    min-height: 40px;
  }
  .pill-btn {
    width: 42px;
    height: 42px;
  }
  .voice-overlay {
    padding: calc(20px + env(safe-area-inset-top, 0px)) 24px calc(26px + env(safe-area-inset-bottom, 0px));
  }
  .voice-orb-canvas {
    width: 268px;
    height: 268px;
  }
  .voice-preview-input {
    font-size: 16.5px;
  }
  .btn-glass,
  .btn-primary-glow {
    height: 46px;
    font-size: 14px;
  }
  .drawer-panel {
    width: 340px;
  }
  .bottom-sheet {
    max-width: 560px;
    margin: 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
  }
}

/* LARGE DESKTOP LANDSCAPE (>= 1120px & landscape) — Crisp Framed Obsidian Studio */
@media (min-width: 1120px) and (orientation: landscape) {
  .pwa-stage {
    align-items: center;
    padding: 18px;
  }
  .phone-shell {
    max-width: 820px;
    height: min(900px, 94dvh);
    border-radius: var(--r-shell);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 44px -10px rgba(255, 255, 255, 0.15), 0 24px 70px rgba(0, 0, 0, 0.92);
  }
}

/* ULTRA-SUBTLE MINIMAL WHITE AMBIENT DEPTH (NO HEAVY COLOR BLOBS!) */
.ambient-top-glow {
  position: absolute;
  top: -12%;
  left: 15%;
  right: 15%;
  height: 26%;
  background: radial-gradient(ellipse 60% 60% at 50% 20%, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0) 75%);
  pointer-events: none;
  z-index: 0;
}

.ambient-bottom-glow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -14%;
  height: 24%;
  background: radial-gradient(ellipse 70% 65% at 50% 100%, rgba(255, 255, 255, 0.055) 0%, rgba(0, 0, 0, 0) 75%);
  pointer-events: none;
  z-index: 0;
}

/* TOP BAR — MINIMAL DARK WITH CRISP WHITE RIM SHADOW */
.top-bar {
  position: relative;
  z-index: 20;
  padding: calc(13px + env(safe-area-inset-top, 0px)) 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.top-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-glass-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-sm);
  color: rgba(255, 255, 255, 0.86);
  transition: all 0.16s var(--ease);
}

.icon-glass-btn:hover,
.icon-glass-btn:active {
  background: #161821;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-white-hi);
  color: #ffffff;
  transform: translateY(-1px);
}

.icon-glass-btn.pdf-accent {
  background: #14161e;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.icon-glass-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.85;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-center-pill {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-sm);
  border-radius: var(--r-btn);
  padding: 6px 12px;
  max-width: 152px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* CENTER STAGE */
.center-stage {
  position: relative;
  z-index: 10;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HERO IDLE VIEW */
.hero-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 22px 16px;
  text-align: center;
  animation: fadeIn 0.3s var(--ease);
}

.hero-orb-btn {
  position: relative;
  width: 262px;
  height: 262px;
  border-radius: var(--r-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: transform 0.24s var(--ease);
}

.hero-orb-btn:active {
  transform: scale(0.96);
}

.hero-orb-canvas {
  width: 262px;
  height: 262px;
  display: block;
}

.hero-greeting {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 6px;
  cursor: pointer;
}

.hero-title {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: #ffffff;
  max-width: 290px;
}

.orb-style-row {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.orb-style-btn {
  padding: 5px 11px;
  border-radius: var(--r-chip);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-sm);
  transition: all 0.16s ease;
}

.orb-style-btn.active {
  background: #ffffff;
  color: #050507;
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}

/* CAPTURED KNOWLEDGE STREAM */
.notes-view {
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
}

.notes-view.active {
  display: flex;
}

.session-strip {
  padding: 4px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.session-meta-left { min-width: 0; }

.session-title-display {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.session-count-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.mini-pdf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--r-chip);
  background: #ffffff;
  color: #050507;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.notes-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.note-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-md);
  border-radius: var(--r-card);
  padding: 13px 14px;
  animation: slideUp 0.22s var(--ease);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.note-card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow-white-hi);
}

.note-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.note-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.note-num {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.note-tag-pill {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
}

.note-src-pill {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.note-time {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.note-body {
  font-size: 13.8px;
  line-height: 1.56;
  color: rgba(255, 255, 255, 0.94);
  white-space: pre-wrap;
  word-break: break-word;
}

.note-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.note-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--r-chip);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  transition: all 0.15s ease;
}

.note-act-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.note-act-btn.del:hover {
  background: rgba(255, 107, 122, 0.16);
  border-color: rgba(255, 107, 122, 0.42);
  color: #ffb3bc;
}

/* INLINE EDIT BOX */
.note-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.note-edit-textarea {
  width: 100%;
  min-height: 82px;
  padding: 10px 11px;
  border-radius: var(--r-btn);
  background: #050608;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-size: 13.6px;
  line-height: 1.5;
  resize: vertical;
}

.note-edit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-select-mini {
  height: 28px;
  padding: 0 9px;
  border-radius: var(--r-chip);
  background: #0e1015;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
}

.tag-select-mini option {
  background: #0b0c10;
  color: #ffffff;
}

/* BOTTOM COMPOSER DOCK — SHARP MINIMAL RECTANGLE WITH WHITE SHADOW! */
.composer-dock {
  position: relative;
  z-index: 20;
  padding: 8px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}

.tag-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 9px;
  scrollbar-width: none;
}

.tag-strip::-webkit-scrollbar { display: none; }

.tag-chip {
  padding: 4.5px 10px;
  border-radius: var(--r-chip);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tag-chip.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #050507;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.24);
}

.glass-pill-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-white-md);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.glass-pill-form:focus-within {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow-white-hi);
}

.pill-input {
  flex: 1;
  min-height: 36px;
  max-height: 116px;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.42;
  color: #ffffff;
  resize: none;
  overflow-y: auto;
}

.pill-input::placeholder {
  color: var(--text-muted);
}

.pill-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s var(--ease);
}

.pill-voice-btn {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pill-voice-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.pill-send-btn {
  background: #ffffff;
  color: #050507;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.3);
  display: none;
}

.pill-send-btn.visible {
  display: inline-flex;
}

.pill-send-btn:active {
  transform: scale(0.94);
}

/* FULL-SCREEN VOICE ORB + LIVE SPEECH DISPLAY PREVIEW OVERLAY */
.voice-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: #020204;
  display: none;
  flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: fadeIn 0.2s var(--ease);
}

.voice-overlay.open {
  display: flex;
}

.voice-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lang-toggle-wrap {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-btn);
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-sm);
}

.lang-pill {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
  transition: all 0.15s ease;
}

.lang-pill.active {
  background: #ffffff;
  color: #050507;
}

.voice-orb-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 8px 0 8px;
}

.voice-orb-canvas {
  width: 214px;
  height: 214px;
  display: block;
  cursor: pointer;
}

.voice-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--r-chip);
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-sm);
  font-size: 11.8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 2px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
  animation: pulseDot 1.1s infinite;
}

.pulse-dot.paused {
  background: #f59e0b;
  box-shadow: none;
  animation: none;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.8); opacity: 0.55; }
  50% { transform: scale(1.25); opacity: 1; }
}

.voice-preview-card {
  flex: 1;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-white-md);
  border-radius: var(--r-card);
  padding: 12px 14px;
  margin: 10px 0 14px;
}

.voice-preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.voice-preview-input {
  flex: 1;
  width: 100%;
  font-size: 15px;
  line-height: 1.56;
  color: #ffffff;
  resize: none;
  overflow-y: auto;
}

.voice-preview-input::placeholder {
  color: var(--text-muted);
}

.voice-interim-line {
  font-size: 12.8px;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
  margin-top: 6px;
  min-height: 18px;
}

.voice-actions-row {
  display: grid;
  grid-template-columns: auto 1fr 1.3fr;
  gap: 8px;
}

/* MINIMAL MONOCHROME BUTTONS WITH WHITE GLOW */
.btn-glass {
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-btn);
  font-size: 12.8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-sm);
  color: rgba(255, 255, 255, 0.88);
  transition: all 0.15s ease;
}

.btn-glass:hover {
  background: #171922;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.btn-primary-glow {
  height: 42px;
  padding: 0 16px;
  border-radius: var(--r-btn);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  color: #050507;
  box-shadow: 0 0 24px -2px rgba(255, 255, 255, 0.34);
  transition: all 0.15s ease;
}

.btn-primary-glow:active { transform: scale(0.97); }
.btn-primary-glow:disabled { opacity: 0.45; cursor: not-allowed; }

/* RECENT CHATS DRAWER */
.drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(306px, 84%);
  background: #07080b;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 8px 0 36px -6px rgba(255, 255, 255, 0.12);
  padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  transform: translateX(-104%);
  transition: transform 0.24s var(--ease);
}

.drawer-backdrop.open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.drawer-search {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--r-btn);
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  font-size: 12.8px;
  margin-bottom: 12px;
}

.drawer-search:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--r-btn);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s ease;
}

.recent-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-white-sm);
}

.recent-item.active {
  background: #161820;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: var(--shadow-white-sm);
}

.recent-info { min-width: 0; flex: 1; }

.recent-name {
  font-size: 12.8px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.drawer-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* BACKUP BOTTOM SHEET — TIGHT RADIUS + WHITE SHADOW */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.open { display: flex; }

.bottom-sheet {
  width: 100%;
  background: #0a0b0f;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 -10px 36px -6px rgba(255, 255, 255, 0.14);
  border-radius: 14px 14px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.22s var(--ease);
}

.sheet-handle {
  width: 36px;
  height: 3.5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.26);
  margin: 0 auto 14px;
}

.sheet-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-white-sm);
  text-align: left;
  margin-top: 8px;
  transition: all 0.15s ease;
}

.sheet-card-btn:hover {
  background: #161820;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow-white-hi);
}

.sheet-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--r-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  flex-shrink: 0;
}

/* TOAST */
.toast {
  position: absolute;
  top: calc(60px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 120;
  background: #12141b;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 26px -4px rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--r-btn);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.voice-mode-banner {
  display: none;
  width: 100%;
  max-width: 780px;
  margin: 0 auto 8px;
  padding: 8px 12px;
  border-radius: var(--r-btn);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fde68a;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.voice-mode-banner.show { display: block; }
