/* ==========================================================================
   Google Gemini Mobile App Replica — Pure Material 3 / OLED Dark & Clean Light
   ========================================================================== */

:root {
  --bg: #131314;
  --surface: #1e1f20;
  --surface-2: #282a2c;
  --surface-3: #333537;
  --sheet-bg: #1e1f20;
  --text: #e3e3e3;
  --text-sub: #c4c7c5;
  --text-muted: #8e918f;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #a8c7fa;
  --accent-fill: #0842a0;
  --accent-soft: rgba(168, 199, 250, 0.14);
  --user-bubble: #282a2c;
  --danger: #f28b82;
  --danger-solid: #dc362e;
  --success: #81c995;
  --backdrop: rgba(0, 0, 0, 0.62);
  --gemini-grad: linear-gradient(90deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f0f4f9;
  --surface-2: #e9eef6;
  --surface-3: #dde3ea;
  --sheet-bg: #ffffff;
  --text: #1f1f1f;
  --text-sub: #444746;
  --text-muted: #747775;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #0b57d0;
  --accent-fill: #d3e3fd;
  --accent-soft: rgba(11, 87, 208, 0.1);
  --user-bubble: #f0f4f9;
  --danger: #b3261e;
  --danger-solid: #dc362e;
  --success: #146c2e;
  --backdrop: rgba(0, 0, 0, 0.4);
}

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

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
}

/* ==================== LOGIN SCREEN ==================== */
.login-view {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  z-index: 900;
}

.login-box {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-sparkle {
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  animation: gentleSpin 12s linear infinite;
}

@keyframes gentleSpin {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(12deg); }
}

.login-heading {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.grad-word {
  background: var(--gemini-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.login-caption {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-pill-form {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  transition: box-shadow 0.2s;
}

.login-pill-form:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}

.login-pill-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 10px 8px 10px 0;
  min-width: 0;
}

.login-go-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.2s;
}

.login-go-btn:active {
  transform: scale(0.92);
}

.login-err-msg {
  margin-top: 14px;
  font-size: 13px;
  color: var(--danger);
  min-height: 20px;
}

/* ==================== APP SHELL (MOBILE-FIRST, CENTERED ON PC) ==================== */
.gemini-app {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Minimal Top Bar */
.top-bar {
  height: calc(56px + var(--safe-top));
  padding: var(--safe-top) 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 20;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  transition: background 0.18s;
}

.icon-btn:hover, .icon-btn:active {
  background: var(--surface);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.top-center-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.18s;
}

.top-center-pill:hover, .top-center-pill:active {
  background: var(--surface);
}

.top-sub-badge {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ==================== MAIN SCROLLABLE CANVAS ==================== */
.chat-canvas {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 18px 18px;
  scroll-behavior: smooth;
}

/* Empty Home State (Exact Gemini Mobile Greeting) */
.home-empty {
  margin: auto 0;
  padding: 20px 6px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: fadeUp 0.35s ease-out;
}

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

.greeting-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.greeting-hello {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  background: var(--gemini-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

.greeting-sub {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  opacity: 0.72;
}

/* Suggestion / Mode Action Chips */
.mode-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gemini-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-sub);
  font-size: 14.5px;
  font-weight: 400;
  transition: background 0.18s, transform 0.12s;
}

.gemini-chip:hover {
  background: var(--surface-2);
}

.gemini-chip:active {
  transform: scale(0.97);
}

.gemini-chip.active-mode {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.chip-emoji {
  font-size: 17px;
  line-height: 1;
}

/* ==================== CONVERSATION / TRANSLATION STREAM ==================== */
.thread-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 8px;
  padding-bottom: 12px;
}

/* User Message (Soft Rounded Pill on Right — Exact Gemini Mobile Style) */
.turn-user {
  align-self: flex-end;
  max-width: 84%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.turn-user-imgs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.turn-user-imgs img {
  width: 140px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 18px;
}

.turn-user-bubble {
  background: var(--user-bubble);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 24px 24px 6px 24px;
  font-size: 15.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Tutor Coach Pill under User Turn */
.tutor-tip-pill {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 9px 13px;
  font-size: 13px;
  color: var(--text-sub);
  max-width: 100%;
}

.tutor-tip-pill.natural {
  border-left-color: var(--success);
}

.tutor-tip-better {
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}

.tutor-tip-pill.natural .tutor-tip-better {
  color: var(--success);
}

/* Model Response (Borderless Clean Canvas + Gemini Sparkle Avatar) */
.turn-model {
  align-self: flex-start;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gemini-star-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.gemini-star-icon.thinking {
  animation: starPulseSpin 1.6s ease-in-out infinite;
}

@keyframes starPulseSpin {
  0% { transform: rotate(0deg) scale(0.92); }
  50% { transform: rotate(180deg) scale(1.12); }
  100% { transform: rotate(360deg) scale(0.92); }
}

.model-tag-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.model-prose {
  padding-left: 2px;
  font-size: 16px;
  line-height: 1.72;
  color: var(--text);
  word-break: break-word;
}

.model-prose p {
  margin-bottom: 12px;
}
.model-prose p:last-child {
  margin-bottom: 0;
}
.model-prose h1, .model-prose h2, .model-prose h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
}
.model-prose ul, .model-prose ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.model-prose li {
  margin-bottom: 5px;
}
.model-prose strong {
  color: var(--accent);
  font-weight: 600;
}
.model-prose code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 14px;
}

.model-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: -2px;
}

.mini-act-btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12.5px;
  transition: background 0.15s, color 0.15s;
}

.mini-act-btn:hover, .mini-act-btn:active {
  background: var(--surface);
  color: var(--text);
}

.mini-act-btn svg {
  width: 16px;
  height: 16px;
}

/* Interpreter Bilingual Summary Card inside Thread */
.bilingual-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bi-src {
  font-size: 14px;
  color: var(--text-muted);
}

.bi-dst {
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
}

/* ==================== BOTTOM GEMINI COMPOSER CAPSULE ==================== */
.composer-dock {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 6px 14px calc(12px + var(--safe-bottom));
  flex-shrink: 0;
}

/* Subtle Context Strip above capsule (only 1 ultra-clean line of small pills) */
.context-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 4px 8px;
  scrollbar-width: none;
}
.context-pills-row::-webkit-scrollbar {
  display: none;
}

.ctx-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-sub);
  font-size: 12.5px;
  transition: background 0.15s;
}

.ctx-pill:active, .ctx-pill:hover {
  background: var(--surface-2);
}

.ctx-pill.highlight {
  background: var(--accent-soft);
  color: var(--accent);
}

/* The Iconic Rounded Input Capsule */
.gemini-capsule {
  background: var(--surface);
  border-radius: 28px;
  padding: 8px 10px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s;
}

.attach-preview-row {
  display: flex;
  gap: 8px;
  padding: 4px 8px 2px;
  overflow-x: auto;
}

.attach-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attach-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.capsule-main-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.capsule-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  flex-shrink: 0;
  transition: background 0.15s;
}

.capsule-icon-btn:hover, .capsule-icon-btn:active {
  background: var(--surface-2);
}

.capsule-icon-btn svg {
  width: 22px;
  height: 22px;
}

.capsule-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  max-height: 132px;
  min-height: 24px;
  padding: 8px 4px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
}

.capsule-textarea::placeholder {
  color: var(--text-muted);
}

/* Iconic Gemini Live Waveform + Sparkle Button */
.live-launch-btn {
  height: 40px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.2s;
}

.live-launch-btn:hover {
  background: var(--surface-3);
}

.live-launch-btn:active {
  transform: scale(0.93);
}

.live-launch-btn svg {
  width: 20px;
  height: 20px;
}

.send-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #041e49;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.15s;
}

[data-theme="light"] .send-circle-btn {
  background: #0b57d0;
  color: #ffffff;
}

.send-circle-btn:active {
  transform: scale(0.92);
}

.send-circle-btn svg {
  width: 20px;
  height: 20px;
}

/* ==================== FULL-SCREEN IMMERSIVE GEMINI LIVE OVERLAY ==================== */
.live-fullscreen {
  position: fixed;
  inset: 0;
  background: #0b0b0d;
  color: #f1f3f4;
  z-index: 600;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  animation: liveFadeIn 0.28s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes liveFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* Top Minimal Header inside Live */
.live-top-bar {
  padding: calc(12px + var(--safe-top)) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.live-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  color: #e3e3e3;
  font-size: 13.5px;
  font-weight: 500;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #81c995;
}

.live-dot.connecting {
  background: #fdd663;
  animation: blinkDot 1s infinite;
}

.live-dot.paused {
  background: #f28b82;
}

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

.live-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-mini-pill {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.live-mini-pill.off {
  opacity: 0.45;
}

/* Center Ambient Fluid Aura & Optional Camera Viewport */
.live-center-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  min-height: 0;
}

/* Authentic Gemini Live Multi-Layered Glowing Cloud Aura */
.aura-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.35s ease;
}

.live-fullscreen.has-video .aura-wrap {
  position: absolute;
  bottom: -60px;
  width: 340px;
  height: 140px;
  opacity: 0.85;
}

.aura-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(34px);
  mix-blend-mode: screen;
  transition: transform 0.08s ease-out, opacity 0.25s ease;
}

.aura-b1 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(66, 133, 244, 0.88) 0%, rgba(66, 133, 244, 0) 72%);
  animation: drift1 6s ease-in-out infinite;
}

.aura-b2 {
  width: 190px;
  height: 190px;
  background: radial-gradient(circle, rgba(155, 114, 203, 0.82) 0%, rgba(155, 114, 203, 0) 72%);
  animation: drift2 7s ease-in-out infinite;
}

.aura-b3 {
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(217, 101, 112, 0.72) 0%, rgba(217, 101, 112, 0) 72%);
  animation: drift3 5.5s ease-in-out infinite;
}

.aura-core {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(211, 227, 253, 0.92), rgba(102, 157, 246, 0.65) 45%, rgba(155, 114, 203, 0.38) 80%, transparent 100%);
  filter: blur(8px);
  transition: transform 0.08s ease-out, opacity 0.3s;
}

@keyframes drift1 {
  0%, 100% { transform: translate(-16px, -10px) scale(1); }
  50% { transform: translate(18px, 12px) scale(1.08); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(18px, -12px) scale(1.04); }
  50% { transform: translate(-16px, 14px) scale(0.95); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0px, 18px) scale(0.96); }
  50% { transform: translate(-10px, -16px) scale(1.08); }
}

/* Full Rounded Camera / Screen Feed (Gemini Live Vision Style) */
.live-video-card {
  width: 100%;
  max-width: 520px;
  flex: 1;
  max-height: 58dvh;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  background: #161719;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 4;
}

.live-video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cam-flip-fab {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Minimal Floating Live Captions above Bottom Dock */
.live-captions-zone {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  z-index: 8;
  min-height: 68px;
  justify-content: flex-end;
}

.live-cap-user {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-cap-ai {
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.live-coach-float {
  align-self: center;
  background: rgba(168, 199, 250, 0.15);
  border: 1px solid rgba(168, 199, 250, 0.3);
  backdrop-filter: blur(10px);
  color: #d3e3fd;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-state-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
}

/* Authentic 4-Pill Gemini Live Bottom Control Bar */
.live-bottom-bar {
  padding: 8px 20px calc(24px + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
}

.live-ctrl-btn {
  width: 58px;
  height: 58px;
  border-radius: 29px;
  background: #282a2c;
  color: #e3e3e3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s, background 0.2s;
}

.live-ctrl-btn svg {
  width: 24px;
  height: 24px;
}

.live-ctrl-btn:active {
  transform: scale(0.92);
}

.live-ctrl-btn.on {
  background: #d3e3fd;
  color: #041e49;
}

.live-ctrl-btn.muted {
  background: rgba(242, 139, 130, 0.24);
  color: #f28b82;
}

.live-end-btn {
  width: 68px;
  height: 58px;
  border-radius: 29px;
  background: var(--danger-solid);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s, opacity 0.2s;
}

.live-end-btn svg {
  width: 26px;
  height: 26px;
}

.live-end-btn:active {
  transform: scale(0.92);
}

/* ==================== SLIDE-OUT DRAWER & BOTTOM SHEETS ==================== */
.overlay-mask {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 700;
  animation: maskIn 0.2s ease;
}

@keyframes maskIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.side-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 290px;
  max-width: 82vw;
  background: var(--sheet-bg);
  z-index: 750;
  padding: calc(18px + var(--safe-top)) 14px calc(18px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(0);
  animation: slideRight 0.24s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 18px;
  font-size: 19px;
  font-weight: 500;
}

.drawer-section-label {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 14px 6px;
}

.drawer-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-sub);
  text-align: left;
  transition: background 0.15s;
}

.drawer-item:hover, .drawer-item:active {
  background: var(--surface-2);
}

.drawer-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.drawer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Native Bottom Sheet */
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  max-height: 82dvh;
  background: var(--sheet-bg);
  border-radius: 28px 28px 0 0;
  z-index: 800;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
  animation: sheetUp 0.25s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: var(--surface-3);
  margin: 4px auto 16px;
  flex-shrink: 0;
}

.sheet-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

.sheet-group {
  margin-bottom: 18px;
}

.sheet-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.sheet-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt-pill {
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-sub);
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
}

.opt-pill.selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.mem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-2);
  margin-bottom: 8px;
}

/* Toast */
.gemini-toast {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: var(--surface-2);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gemini-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
