:root {
  --bg: #131314;
  --surface: #1e1f20;
  --surface-2: #282a2c;
  --surface-3: #333538;
  --border: rgba(255, 255, 255, 0.09);
  --text: #e3e3e3;
  --text-muted: #9aa0a6;
  --accent: #8ab4f8;
  --accent-strong: #4facfe;
  --purple: #c58af9;
  --danger: #f28b82;
  --success: #81c995;
  --user-bubble: #282a2c;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Google Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: var(--app-height, 100dvh);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
  overscroll-behavior: none;
}

[hidden] {
  display: none !important;
}

/* ---- Login Overlay ---- */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.login-card h1 {
  margin: 14px 0 6px;
  font-size: 1.5rem;
  background: linear-gradient(90deg, #4facfe, #c58af9, #fbc2eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-sub {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  margin-bottom: 12px;
  outline: none;
}

.login-card input:focus {
  border-color: var(--accent);
}

.btn-primary {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #4facfe, #9b72cb);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.login-error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 0.9rem;
}

/* ---- Sidebar Drawer ---- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 90;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  max-width: 84vw;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-102%);
  transition: transform 0.24s cubic-bezier(0.2, 0, 0, 1);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}

.new-chat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 14px;
}

.new-chat-pill:hover {
  background: var(--surface-3);
}

.sidebar-section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 10px 8px;
}

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

.chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.15s;
}

.chat-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
  background: rgba(138, 180, 248, 0.16);
  color: #d2e3fc;
  font-weight: 500;
}

.chat-item-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-lang {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-transform: uppercase;
}

.chat-del-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.chat-del-btn:hover {
  color: var(--danger);
  background: rgba(242, 139, 130, 0.12);
}

.sidebar-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.model-lock-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(138, 180, 248, 0.07);
}

.model-lock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  flex-shrink: 0;
}

.model-lock-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.model-lock-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ---- Main App Shell ---- */
.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: var(--app-height, 100dvh);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  background: rgba(19, 19, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-brand-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.topbar-brand {
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.Guided-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(197, 138, 249, 0.22));
  color: #d2e3fc;
  border: 1px solid rgba(138, 180, 248, 0.3);
  white-space: nowrap;
}

.topbar-model-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.sparkle-mini {
  color: var(--purple);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

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

/* ---- RU / EN Language Switcher ---- */
.lang-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lang-btn.active {
  background: linear-gradient(135deg, #4facfe, #9b72cb);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 172, 254, 0.35);
}

/* ---- Chat Stream ---- */
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px 12px;
}

.chat-container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

/* ---- Welcome Screen ---- */
.welcome-screen {
  padding: 24px 8px 20px;
  text-align: left;
}

.welcome-sparkle {
  margin-bottom: 12px;
}

.welcome-title {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.22;
  background: linear-gradient(90deg, #4facfe 0%, #c58af9 55%, #fbc2eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-subtitle {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 620px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.quick-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.quick-card:hover, .quick-card:active {
  background: var(--surface-2);
  border-color: rgba(138, 180, 248, 0.35);
}

.quick-card-camera {
  border-color: rgba(79, 172, 254, 0.35);
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.11), rgba(197, 138, 249, 0.09));
}

.quick-icon {
  font-size: 1.45rem;
  line-height: 1;
  padding-top: 2px;
}

.quick-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quick-text strong {
  font-size: 0.94rem;
  font-weight: 600;
}

.quick-text small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Messages ---- */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 12px;
}

.msg-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* User Message (Right aligned Gemini pill bubble) */
.msg-row.user {
  align-items: flex-end;
}

.user-bubble {
  max-width: min(86%, 560px);
  background: var(--user-bubble);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 22px 22px 6px 22px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.user-bubble p {
  margin: 0 0 8px;
}
.user-bubble p:last-child {
  margin-bottom: 0;
}

.msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.att-thumb {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: #000;
}

.att-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}

/* Assistant Message (Gemini Sparkle + Full Width Mobile Readable Stream) */
.msg-row.assistant {
  align-items: flex-start;
}

.asst-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.asst-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.asst-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.tier-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(138, 180, 248, 0.14);
  color: var(--accent);
  border: 1px solid rgba(138, 180, 248, 0.28);
}

.tier-badge.high {
  background: rgba(197, 138, 249, 0.16);
  color: #e2b6ff;
  border-color: rgba(197, 138, 249, 0.35);
}

.lang-tag {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-transform: uppercase;
}

.asst-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(138, 180, 248, 0.08);
  margin-bottom: 8px;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 1.1s infinite ease-in-out;
}

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

.asst-body {
  width: 100%;
  padding-left: 2px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.asst-body p {
  margin: 0 0 12px;
}

.asst-body ul, .asst-body ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.asst-body li {
  margin-bottom: 6px;
}

.asst-body strong {
  color: #fff;
}

.asst-body blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(138, 180, 248, 0.06);
  border-radius: 0 10px 10px 0;
}

.asst-body pre {
  background: #0d0e10;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 0.88rem;
}

.asst-body code {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.asst-body pre code {
  background: none;
  padding: 0;
}

.asst-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 0.92rem;
}

.asst-body th, .asst-body td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.asst-body th {
  background: var(--surface-2);
}

/* Math Formatting */
.math-display {
  display: block;
  margin: 12px 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(138, 180, 248, 0.18);
  border-radius: 12px;
  font-family: "Cambria Math", "STIX Two Math", Georgia, serif;
  font-size: 1.08rem;
  overflow-x: auto;
  text-align: center;
}

.math-inline {
  display: inline-block;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(138, 180, 248, 0.09);
  font-family: "Cambria Math", "STIX Two Math", Georgia, serif;
  font-size: 1.03em;
}

.math-frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  text-align: center;
  padding: 0 3px;
  font-size: 0.92em;
}

.math-frac-num {
  border-bottom: 1px solid currentColor;
  padding: 0 3px 1px;
}

.math-frac-den {
  padding: 1px 3px 0;
}

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

.msg-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.msg-action-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ---- Bottom Gemini Composer ---- */
.composer-wrap {
  flex-shrink: 0;
  padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(19, 19, 20, 0) 0%, var(--bg) 22%);
  position: relative;
  z-index: 30;
}

.composer-inner {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

/* Voice Recording Active Banner */
.voice-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 18px;
  background: rgba(242, 139, 130, 0.14);
  border: 1px solid rgba(242, 139, 130, 0.4);
  color: #fad2cf;
}

.voice-banner-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 500;
}

.voice-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f28b82;
  animation: pulseDot 0.9s infinite;
}

.voice-timer {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.voice-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-btn-cancel {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}

.voice-btn-done {
  border: none;
  background: #81c995;
  color: #0d1f12;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}

/* + Attachment Bottom Sheet */
.attach-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  z-index: 50;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.sheet-item:hover, .sheet-item:active {
  background: var(--surface-3);
}

.sheet-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(138, 180, 248, 0.14);
  flex-shrink: 0;
}

.sheet-text {
  display: flex;
  flex-direction: column;
}

.sheet-text strong {
  font-size: 0.95rem;
}

.sheet-text small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Gemini Rounded Pill */
.gemini-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  transition: border-color 0.18s;
}

.gemini-pill:focus-within {
  border-color: rgba(138, 180, 248, 0.45);
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px 2px;
}

.tray-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 10px 4px 6px;
  max-width: 220px;
}

.tray-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.tray-name {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tray-remove {
  border: none;
  background: var(--surface-3);
  color: var(--text);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pill-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

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

.mic-btn.recording {
  background: rgba(242, 139, 130, 0.22);
  color: var(--danger);
}

#message-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 22px;
  height: 38px;
  min-height: 38px;
  max-height: 132px;
  padding: 8px 4px;
  margin: 0;
  resize: none;
  outline: none;
  overflow-y: hidden;
}

#message-input::placeholder {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #4facfe, #9b72cb);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}

.send-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

.composer-footnote {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.82;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox img {
  max-width: 96vw;
  max-height: 90dvh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 600px) {
  .topbar {
    padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px;
  }
  .topbar-left {
    gap: 4px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  .topbar-brand {
    font-size: 1.02rem;
  }
  .Guided-badge {
    display: none;
  }
  .topbar-model-row {
    font-size: 0.7rem;
  }
  .lang-btn {
    padding: 5px 10px;
    font-size: 0.76rem;
  }
  .chat-scroll {
    padding: 10px 12px 8px;
  }
  .welcome-screen {
    padding: 6px 2px 8px;
  }
  .welcome-sparkle {
    margin-bottom: 6px;
  }
  .welcome-sparkle img {
    width: 34px;
    height: 34px;
  }
  .welcome-title {
    font-size: 1.32rem;
    line-height: 1.22;
    margin-bottom: 6px;
  }
  .welcome-subtitle {
    font-size: 0.85rem;
    line-height: 1.42;
    margin-bottom: 12px;
  }
  .quick-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .quick-card {
    padding: 10px 12px;
    gap: 10px;
    align-items: center;
    border-radius: 14px;
  }
  .quick-icon {
    font-size: 1.25rem;
    padding-top: 0;
  }
  .quick-text {
    gap: 2px;
  }
  .quick-text strong {
    font-size: 0.88rem;
    line-height: 1.22;
  }
  .quick-text small {
    font-size: 0.75rem;
    line-height: 1.25;
  }
  .user-bubble {
    max-width: 90%;
    padding: 10px 14px;
    font-size: 0.95rem;
  }
  .asst-body {
    font-size: 0.96rem;
    line-height: 1.56;
  }
  .composer-wrap {
    padding: 4px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .gemini-pill {
    padding: 5px 6px;
    border-radius: 24px;
  }
  .pill-row {
    gap: 2px;
  }
  .pill-icon-btn,
  .send-btn {
    width: 36px;
    height: 36px;
  }
  #message-input {
    font-size: 16px;
    padding: 8px 4px;
  }
  .composer-footnote {
    font-size: 0.66rem;
    margin-top: 3px;
  }
}
