/* ─────────────────────────────────────────
   HELLO DAVID — PROTOTYPE STYLES
───────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  --ink: #1A1D23;
  --ink2: #3A3D45;
  --ink3: #7A7D85;
  --ink4: #B0B3BB;
  --mint: #3EEDC4;
  --mint-dk: #0C9E7A;
  --mint-bg: #EAFAF5;
  --mint-border: #C2EBE1;
  --ivory: #FAF8F5;
  --ivory2: #F3EFE9;
  --ivory3: #EAE5DE;
  --white: #FFFFFF;
  --amber-dk: #7A5010;
  --border: rgba(26,29,35,0.07);
  --border2: rgba(26,29,35,0.14);
  --shadow-sm: 0 1px 3px rgba(26,29,35,0.06), 0 2px 8px rgba(26,29,35,0.04);
  --shadow: 0 2px 6px rgba(26,29,35,0.07), 0 6px 20px rgba(26,29,35,0.05);
  --r: 15px;
  --nav-h: 64px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #DDD8D1;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ── VIEWPORT ── */
.viewport {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #DDD8D1;
}

/* ── SCREEN ── */
.screen {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 900px;
  background: var(--ivory);
  overflow: hidden;
  position: relative;
  border-radius: 0;
  box-shadow: none;
}

.screen.active {
  display: flex;
}

@media (min-width: 480px) {
  .screen {
    border-radius: 40px;
    height: calc(100vh - 40px);
    max-height: 800px;
    border: 6px solid var(--ink);
    box-shadow: 0 32px 72px rgba(26,29,35,0.28);
  }
}

/* ── STATUS BAR ── */
.status-bar {
  height: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 20px 5px;
  flex-shrink: 0;
  background: var(--white);
}

.status-bar span {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
}

.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.status-icons i {
  font-size: 13px;
  color: var(--ink);
}

/* ── TOP BAR ── */
.top-bar {
  padding: 2px 20px 13px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* ── WORDMARK ── */
.wm {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  font-size: 18px;
}

.wordmark-lg {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  font-size: 36px;
  margin-bottom: 7px;
}

.wm-h { color: var(--ink); }
.wm-d { color: var(--mint); }

/* ── ICON BTN ── */
.icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--ink3);
  font-size: 20px;
  flex-shrink: 0;
}

.icon-btn i { font-size: 20px; }

/* ── SCROLL BODY ── */
.scroll-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--ivory);
}

.scroll-body::-webkit-scrollbar { display: none; }

.content-pad {
  padding: 20px 18px 0;
}

.bottom-spacer { height: 24px; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid rgba(26,29,35,0.10);
  box-shadow: 0 -2px 12px rgba(26,29,35,0.07);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px 6px;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 14px;
  border: none;
  background: none;
  font-family: var(--font);
  color: #9A9DA6; /* stronger inactive than ink4 */
  border-radius: 10px;
  transition: color 0.15s;
  min-width: 60px;
}

.nav-item i { font-size: 22px; }
.nav-item span { font-size: 10px; font-weight: 600; letter-spacing: 0.01em; }

/* Active: deep ink icon + label + mint underline dot */
.nav-item.active {
  color: var(--ink);
  position: relative;
}

.nav-item.active i,
.nav-item.active span { color: var(--ink); }

/* Mint indicator dot under active icon */
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint-dk);
}

/* ── DAVID ICON ── */
.david-icon {
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.david-icon i { color: var(--mint); }
.david-icon--lg { width: 36px; height: 36px; }
.david-icon--lg i { font-size: 19px; }
.david-icon--md { width: 28px; height: 28px; }
.david-icon--md i { font-size: 14px; }
.david-icon--sm { width: 26px; height: 26px; }
.david-icon--sm i { font-size: 13px; }

/* ── POLICY ICON ── */
.policy-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--mint-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.policy-icon-wrap i { font-size: 19px; color: var(--ink); }

/* ── GREETING ── */
.greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.page-sub {
  font-size: 13px;
  color: var(--ink3);
  margin-bottom: 22px;
  line-height: 1.55;
  margin-top: -14px;
}

/* ── ASK CARD ── */
.ask-card {
  background: var(--ivory2);
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: opacity 0.15s;
}

.ask-card:active { opacity: 0.85; }

.ask-card--dim { opacity: 0.42; pointer-events: none; }

.ask-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.ask-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.ask-input-fake {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 1px 4px rgba(26,29,35,0.05);
}

.ask-input-fake i { font-size: 14px; color: var(--ink4); }
.ask-input-fake span { font-size: 13px; color: var(--ink4); }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.cat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.slbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink4);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 11px;
}

/* ── POLICY ROW CARD (Home) ── */
.policy-row-card {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.policy-row-card:active { opacity: 0.8; }

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

.policy-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.policy-row-ins {
  font-size: 11px;
  color: var(--ink3);
  margin-top: 1px;
}

.policy-row-meta {
  font-size: 11px;
  color: var(--ink3);
  margin-top: 5px;
}

.policy-row-meta strong { color: var(--ink); font-weight: 600; }

.chev {
  font-size: 15px;
  color: var(--ink4);
  flex-shrink: 0;
}

/* ── ADD DOCS LINK ── */
.add-docs-link {
  text-align: center;
  padding: 4px 0 26px;
}

/* ── TEXT BTN ── */
.text-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  color: var(--ink4);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.text-btn--sm { font-size: 11px; }
.text-btn i { font-size: 14px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 44px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--ivory3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.empty-icon i { font-size: 26px; color: var(--ink4); }

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}

.empty-desc {
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 240px;
}

/* ── BTN PRIMARY ── */
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--ivory);
  border: none;
  border-radius: var(--r);
  padding: 13px 30px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: opacity 0.15s;
}

.btn-primary:active { opacity: 0.85; }

/* ── ACCORDION ── */
.accordion {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--border);
  margin-bottom: 9px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}

.accordion.open { border-color: var(--mint-border); }

.accordion-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  user-select: none;
}

.accordion-meta { flex: 1; min-width: 0; }

.accordion-chev {
  font-size: 16px;
  color: var(--ink4);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.accordion.open .accordion-chev {
  transform: rotate(90deg);
}

.accordion-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 13px 14px 14px;
  background: var(--ivory);
}

.accordion.open .accordion-body { display: block; }

.found-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink4);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.detail-row:last-of-type { border-bottom: none; }

.dl { font-size: 12px; color: var(--ink3); flex-shrink: 0; }
.dv { font-size: 12px; font-weight: 500; color: var(--ink); text-align: right; }
.dv--found { color: var(--mint-dk); }
.dv--missing { color: var(--ink4); font-style: italic; font-weight: 400; }
.dv--review { color: var(--ink3); }
.dv--limit { color: var(--ink3); }

.source-ref {
  font-size: 10px;
  color: var(--ink4);
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
}

.source-ref i { font-size: 11px; }

.ask-policy-row {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ask-policy-row:active { opacity: 0.75; }

.ask-policy-row span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
  letter-spacing: -0.01em;
}

.ask-policy-row > i:last-child {
  font-size: 14px;
  color: var(--ink4);
}

/* ── ADD OPTIONS ── */
.add-option-card {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.add-option-card:active { opacity: 0.8; }

.add-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.add-option-icon i { font-size: 22px; }
.add-option-icon--primary { background: var(--ink); }
.add-option-icon--primary i { color: var(--mint); }
.add-option-icon--secondary { background: var(--ivory2); }
.add-option-icon--secondary i { color: var(--ink3); }

.add-option-info { flex: 1; }
.add-option-title { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.add-option-sub { font-size: 11px; color: var(--ink4); margin-top: 3px; }

/* ── PRIVACY NOTE ── */
.privacy-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink4);
}
.privacy-note i { font-size: 12px; color: var(--mint-dk); }
.privacy-note--standalone { margin-top: 0; padding: 0 2px; }

/* ── READING STATE ── */
.reading-banner {
  background: var(--mint-bg);
  border: 1px solid var(--mint-border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.reading-text {}
.reading-title { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.reading-sub { font-size: 11px; color: var(--ink3); margin-top: 2px; }

.file-status-card {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.file-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #FDECEA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-icon i { font-size: 16px; color: #C0392B; }

.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 12px; font-weight: 500; color: var(--ink); }
.file-size { font-size: 11px; color: var(--ink4); margin-top: 1px; }

.progress-bar {
  height: 2px;
  background: var(--ivory3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 5px;
}
.progress-fill {
  height: 100%;
  background: var(--mint-dk);
  border-radius: 2px;
}

.file-status { font-size: 11px; font-weight: 600; flex-shrink: 0; }
.file-status--ready { color: var(--mint-dk); }
.file-status--reading { color: var(--ink3); }
.file-status--closer { color: var(--amber-dk); }

/* ── ASK DAVID SCREEN ── */
.ask-top-bar {
  padding: 2px 20px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ask-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ask-header-title { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.ask-header-sub { font-size: 11px; color: var(--ink4); }

.context-bar {
  padding: 8px 20px 9px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.context-label { font-size: 11px; color: var(--ink3); font-weight: 500; white-space: nowrap; }

.context-selector { position: relative; display: inline-flex; }

.ctx-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--mint-bg);
  border: 1px solid var(--mint-border);
  border-radius: 20px;
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--mint-dk);
  cursor: pointer;
}

.ctx-btn i { font-size: 11px; }

.ctx-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 4px;
  z-index: 200;
  min-width: 210px;
  box-shadow: 0 4px 16px rgba(26,29,35,0.12);
}

.ctx-dropdown.open { display: block; }

.ctx-dropdown button {
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 7px;
  font-family: var(--font);
  transition: background 0.1s;
}

.ctx-dropdown button:hover { background: var(--ivory2); }

/* ── CHAT ── */
.chat-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--ivory);
}

.chat-body::-webkit-scrollbar { display: none; }

.msg-row {
  display: flex;
  gap: 9px;
  align-items: flex-end;
}

.msg-row--user { flex-direction: row-reverse; }

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ivory3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar i { font-size: 12px; color: var(--ink2); }

.msg-content { max-width: 82%; }

.msg-bubble {
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.65;
}

.msg-bubble--david {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 3px;
  box-shadow: var(--shadow-sm);
}

.msg-bubble--user {
  background: var(--ink);
  color: var(--ivory);
  border-bottom-right-radius: 3px;
}

.msg-time { font-size: 10px; color: var(--ink4); margin-top: 4px; }
.msg-time--right { text-align: right; }

.src-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  margin-top: 6px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.prompt-chip {
  font-size: 11px;
  font-weight: 400;
  padding: 5px 11px;
  background: var(--white);
  color: var(--ink3);
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid var(--border2);
  font-family: var(--font);
  box-shadow: 0 1px 3px rgba(26,29,35,0.05);
  transition: opacity 0.15s;
}

.prompt-chip:active { opacity: 0.7; }

.disclaimer-note {
  font-size: 10px;
  color: var(--ink4);
  line-height: 1.6;
  padding: 0 2px;
}

/* ── LISTEN BAR ── */
.listen-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--mint-bg);
  border-top: 1px solid var(--mint-border);
  flex-shrink: 0;
}

.listen-bar.active { display: flex; }

.listen-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-dk);
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.listen-bar > span { font-size: 12px; font-weight: 500; color: var(--mint-dk); }
.listen-bar .text-btn { margin-left: auto; color: var(--ink3); }

/* ── CHAT INPUT ── */
.chat-input-bar {
  padding: 8px 12px 14px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}

.chat-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  border: 1px solid var(--border2);
  border-radius: 22px;
  background: var(--ivory);
  overflow: hidden;
  padding-right: 4px;
}

.chat-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--ink);
  outline: none;
}

.chat-input-wrap input::placeholder { color: var(--ink4); }

.mic-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
}

#mic-icon { font-size: 16px; color: var(--ink4); transition: color 0.15s; }
#mic-icon.active { color: var(--mint-dk); }

.send-btn {
  width: 36px;
  height: 36px;
  background: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.send-btn:active { opacity: 0.8; }
.send-btn i { font-size: 14px; color: var(--mint); }

/* ── LOGIN ── */
.login-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: var(--ivory);
}

.login-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 32px 0;
}

.app-icon {
  width: 64px;
  height: 64px;
  background: var(--ink);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(26,29,35,0.20);
}

.app-icon span {
  font-family: var(--font);
  font-weight: 700;
  color: var(--mint);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.tagline-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 28px;
}

.tagline-slash { color: var(--mint); font-weight: 600; font-size: 13px; }
.tagline-text { font-size: 13px; font-weight: 500; color: var(--ink); letter-spacing: 0.04em; }

.login-headline {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink2);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 30px;
  max-width: 220px;
  letter-spacing: -0.01em;
}

.google-btn {
  width: 88%;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid #DADCE0;
  border-radius: 12px;
  background: var(--white);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(26,29,35,0.09);
  margin-bottom: 14px;
  transition: opacity 0.15s;
  white-space: nowrap;   /* prevent text wrapping */
}

.google-btn:active { opacity: 0.85; }
.google-logo { flex-shrink: 0; }

.login-footer {
  padding: 18px 32px 26px;
  text-align: center;
}

.login-footer p {
  font-size: 11px;
  color: var(--ink4);
  line-height: 1.6;
}

.login-footer a {
  color: var(--mint-dk);
  text-decoration: none;
  font-weight: 500;
}

/* ── GLOBAL MENU ── */
.menu-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(26,29,35,0.45);
}

.menu-scrim.active { display: block; }

.menu-drop {
  display: none;
  position: fixed;
  top: 72px;
  right: 14px;
  width: 258px;
  background: var(--ivory);
  border: 1px solid var(--border2);
  border-radius: 16px;
  box-shadow: 0 8px 36px rgba(26,29,35,0.18);
  z-index: 500;
  overflow: hidden;
  max-height: 80vh;
  overflow-y: auto;
}

.menu-drop.active { display: block; }

.menu-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-items {}

.menu-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--ivory2); }

.menu-item-label { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 2px; }
.menu-item-desc { font-size: 11px; color: var(--ink3); line-height: 1.45; }
.menu-item--danger .menu-item-label { color: #A83232; }

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ≤ 768px  →  full-screen native mobile app, no device frame
   > 768px  →  centred phone mockup on desktop
──────────────────────────────────────────────────────────── */

/* ── DESKTOP: phone mockup ── */
@media (min-width: 769px) {
  .menu-drop { right: calc(50% - 215px + 14px); }
}

/* ── MOBILE: full-screen, no frame ── */
@media (max-width: 768px) {

  /* ── 1. Page base ── */
  html, body {
    height: auto;
    min-height: 100%;
    overflow: auto;
    overflow-x: hidden;
    background: var(--ivory);
  }

  /* Viewport is just a normal block container */
  .viewport {
    position: static;
    display: block;
    width: 100%;
    min-height: 100vh;
    background: var(--ivory);
  }

  /* ── 2. Screen: fill the real viewport, no fake device frame ── */
  .screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100%;
    max-width: 100vw;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  /* ── 3. Hide fake phone status bar (time, Wi-Fi, battery) ── */
  .status-bar {
    display: none;
  }

  /* ── 4. Top bar: replace the space status bar took with safe-area padding ── */
  .top-bar {
    padding-top: max(env(safe-area-inset-top, 12px), 12px);
    padding-bottom: 12px;
  }

  /* Ask David screen has its own top bar variant */
  .ask-top-bar {
    padding-top: max(env(safe-area-inset-top, 12px), 12px);
    padding-bottom: 10px;
  }

  /* Login screen: the status-bar was part of login-body flow, compensate */
  .login-center {
    padding-top: max(env(safe-area-inset-top, 20px), 20px);
  }

  /* ── 5. Scroll body: clear the fixed bottom nav ── */
  .scroll-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px));
  }

  /* Chat body needs clearance for fixed input + nav */
  .chat-body {
    padding-bottom: calc(var(--nav-h) + 72px + env(safe-area-inset-bottom, 0px));
  }

  /* ── 6. Bottom nav: fixed, elevated, safe-area aware ── */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    /* Height = base nav height + iPhone home indicator space */
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 6px);
    /* Elevation so it's clearly above content */
    border-top: 1px solid rgba(26,29,35,0.12);
    box-shadow: 0 -3px 16px rgba(26,29,35,0.09);
    background: var(--white);
  }

  /* ── 7. Chat input: fixed above nav ── */
  .chat-input-bar {
    position: fixed;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 99;
    border-top: 1px solid var(--border);
    background: var(--white);
  }

  /* Listening bar sits above the input bar */
  .listen-bar {
    position: fixed;
    bottom: calc(var(--nav-h) + 58px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 98;
  }

  /* ── 8. Menu dropdown ── */
  .menu-drop {
    right: 10px;
    top: 62px;
    max-height: 80vh;
  }

  /* ── 9. Prevent horizontal overflow ── */
  .content-pad {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* ── 10. Google button: never wrap, full comfortable width ── */
  .google-btn {
    width: 92%;
    max-width: 340px;
    white-space: nowrap;
  }
}
