:root {
  color-scheme: light;
  --ink: #18131f;
  --muted: #6b6375;
  --purple: #6e49c7;
  --purple-dark: #4c2a9c;
  --lavender: #eee7ff;
  --lavender-soft: #f8f5ff;
  --peach: #ffb690;
  --paper: rgba(255, 255, 255, 0.82);
  --line: rgba(59, 39, 83, 0.11);
  --shadow: 0 22px 70px rgba(72, 43, 111, 0.16);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  overflow: hidden;
  color: var(--ink);
  background: #f5f0ff;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", sans-serif;
}
button, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(77, 42, 156, .55);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(30px);
  opacity: .56;
  pointer-events: none;
}
.ambient-one { width: 34rem; height: 34rem; top: -13rem; right: -7rem; background: #e2c8ff; }
.ambient-two { width: 28rem; height: 28rem; bottom: -15rem; left: 8%; background: #ffd1bd; }

.login-shell {
  height: 100dvh;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 24px;
  overscroll-behavior: contain;
}
.loading-shell {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
}
.loading-mark { display: grid; place-items: center; width: 58px; height: 58px; overflow: hidden; border-radius: 20px; background: linear-gradient(145deg, #805ee0, #5430a5); box-shadow: var(--shadow); animation: pulse 1.4s ease-in-out infinite; }
.loading-shell p { margin: 0; font-size: 14px; font-weight: 700; }
.loading-shell button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--purple); color: white; font-weight: 800; cursor: pointer; }
.login-card {
  width: min(440px, 100%);
  padding: 54px 46px 42px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(22px);
}
@supports not (backdrop-filter: blur(1px)) {
  .login-card { background: #fff; }
}
.mark, .welcome-mark, .brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #805ee0, #5430a5);
  box-shadow: 0 10px 30px rgba(92, 57, 165, .28);
}
.mark img, .welcome-mark img, .brand-mark img, .loading-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mark { width: 66px; height: 66px; margin: 0 auto 30px; border-radius: 22px; font-size: 32px; }
.eyebrow {
  margin: 0 0 16px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  opacity: .88;
  text-transform: uppercase;
}
.login-card h1 { margin: 0; color: var(--ink); font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; font-size: clamp(38px, 8vw, 54px); line-height: .98; letter-spacing: -.04em; }
.login-copy { margin: 22px auto 28px; max-width: 31ch; color: #554d60; font-size: 16px; line-height: 1.55; }
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  border-radius: 16px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 750;
  transition: transform .18s ease, box-shadow .18s ease;
}
.google-button:hover { transform: translateY(-2px); background: #282130; box-shadow: 0 10px 24px rgba(32,26,42,.18); }
.google-button:active { transform: translateY(1px); }
.preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 14px;
  border-radius: 13px;
  color: var(--purple-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.preview-button:hover { background: var(--lavender-soft); }
.preview-button span { transition: transform .16s ease; }
.preview-button:hover span { transform: translateX(2px); }
.google-g { display: grid; place-items: center; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: white; }
.google-g svg { display: block; width: 100%; height: 100%; }
.invite-note { margin: 18px 0 0; color: #685f72; font-size: 12px; }

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  height: 100dvh;
}
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 22px 16px 14px;
  border-right: 1px solid var(--line);
  background: rgba(247, 243, 255, .78);
  backdrop-filter: blur(20px);
}
.sidebar-head, .brand, .profile, .topbar, .topbar-title, .mode { display: flex; align-items: center; }
.sidebar-head { justify-content: space-between; padding: 0 5px 18px; }
.brand { gap: 10px; font-weight: 850; letter-spacing: -.02em; }
.brand-mark { width: 33px; height: 33px; border-radius: 11px; }
.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(110,73,199,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  font-weight: 750;
  cursor: pointer;
}
.new-chat span { color: var(--purple); font-size: 20px; }
.privacy-workspace-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 7px 2px 10px;
  padding: 0 13px;
  border: 1px solid rgba(44,113,88,.16);
  border-radius: 13px;
  background: rgba(238,249,244,.78);
  color: #245c49;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.privacy-workspace-entry:hover { border-color: rgba(44,113,88,.3); background: #e4f7ee; }
.history { flex: 1; overflow-y: auto; padding: 20px 2px; }
.history-label { margin: 8px 10px; color: #655c6e; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  min-height: 44px;
  margin-bottom: 2px;
  border-radius: 11px;
}
.history-row:hover, .history-row.active, .history-row.menu-open { background: rgba(255,255,255,.68); }
.history-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  min-width: 0;
  padding: 11px 12px;
  overflow: hidden;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.history-item:hover { background: transparent; }
.history-pin { flex: 0 0 auto; font-size: 12px; }
.history-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-menu-toggle {
  width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .08em;
  cursor: pointer;
  opacity: .68;
}
.history-menu-toggle:hover, .history-menu-toggle:focus-visible, .history-menu-toggle[aria-expanded="true"] {
  background: var(--lavender-soft);
  color: var(--purple-dark);
  opacity: 1;
}
.history-menu {
  display: grid;
  grid-column: 1 / -1;
  gap: 2px;
  margin: 0 5px 7px;
  padding: 5px;
  border: 1px solid rgba(74,46,106,.12);
  border-radius: 11px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 24px rgba(53,34,76,.08);
}
.history-menu[hidden] { display: none; }
.history-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}
.history-menu button:hover, .history-menu button:focus-visible { background: var(--lavender-soft); color: var(--purple-dark); }
.history-menu .history-delete { color: #9c3f50; }
.history-menu .history-delete:hover, .history-menu .history-delete:focus-visible { background: rgba(180,62,82,.09); color: #8a3042; }
.history-empty { line-height: 1.45; text-transform: none; letter-spacing: 0; }
.clear-history {
  min-height: 42px;
  margin: 0 2px 4px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.clear-history { margin-bottom: 10px; }
.clear-history:hover { background: rgba(255,255,255,.68); color: var(--purple-dark); }
.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.profile { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 6px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: #e7dcff; color: var(--purple-dark); font-weight: 850; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.profile-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy span { color: var(--muted); font-size: 11px; }
.logout {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.52);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.logout svg, .feedback-entry svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logout:hover { border-color: rgba(110,73,199,.22); background: white; color: var(--purple-dark); }

.chat { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; width: 100%; min-width: 0; height: 100dvh; }
.topbar {
  z-index: 3;
  min-height: 66px;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(252,250,255,.68);
  backdrop-filter: blur(18px);
}
.topbar-title { flex-direction: column; align-items: flex-start; gap: 3px; }
.topbar-title strong { font-size: 15px; }
.topbar-title span { color: var(--muted); font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #59b77d; }
.feedback-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(179,91,61,.2);
  border-radius: 12px;
  background: rgba(255,248,244,.82);
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(66,41,97,.06);
}
.feedback-entry svg { color: #9a4c38; stroke-width: 2; }
.feedback-entry:hover {
  border-color: rgba(179,91,61,.4);
  background: #fffaf7;
  box-shadow: 0 7px 22px rgba(66,41,97,.1);
  transform: translateY(-1px);
}
.feedback-entry:active { transform: translateY(0); }
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: rgba(255,255,255,.65);
  cursor: pointer;
}
.topbar-spacer { width: 44px; height: 44px; }

.messages { overflow-y: auto; scroll-behavior: smooth; }
.welcome { width: min(720px, calc(100% - 40px)); margin: min(12vh, 110px) auto 44px; text-align: center; }
.welcome-orbit { position: relative; width: 94px; height: 84px; margin: auto; }
.welcome-mark { width: 70px; height: 70px; margin: auto; border-radius: 24px; font-size: 34px; transform: rotate(-3deg); }
.spark { position: absolute; color: var(--peach); font-size: 25px; }
.spark-one { top: -7px; right: 1px; }
.spark-two { bottom: 4px; left: -1px; color: #9c7ee8; }
.welcome h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(38px, 7vw, 58px); letter-spacing: -.045em; }
.welcome > p:last-of-type { margin: 12px 0 30px; color: var(--muted); font-size: 18px; }
.starters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.starters button {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.64);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.starters button:hover { transform: translateY(-2px); background: white; }
.starters span { color: var(--purple); font-size: 19px; }
.thread { width: min(760px, calc(100% - 34px)); margin: 28px auto; }
.message { display: flex; gap: 12px; margin: 22px 0; animation: rise .25s ease both; }
.message.user { justify-content: flex-end; }
.answer { max-width: min(650px, 88%); }
.bubble { padding: 13px 17px; border-radius: 20px; line-height: 1.62; }
.bubble p { margin: 0 0 .75em; }
.bubble p:last-child { margin-bottom: 0; }
.bubble h3, .bubble h4, .bubble h5 { margin: 1.05em 0 .4em; font-family: Georgia, serif; line-height: 1.18; }
.bubble ul, .bubble ol { margin: .45em 0 .8em; padding-left: 1.45em; }
.bubble li + li { margin-top: .3em; }
.bubble blockquote { margin: .7em 0; padding-left: .9em; border-left: 3px solid #b69de9; color: var(--muted); }
.bubble a { color: var(--purple-dark); font-weight: 700; }
.bubble pre { max-width: 100%; overflow-x: auto; padding: 12px; border-radius: 12px; background: #272131; color: #fff; }
.bubble code { padding: .12em .35em; border-radius: 5px; background: rgba(78,43,132,.09); font-size: .9em; }
.bubble pre code { padding: 0; background: transparent; }
.user .bubble { border-bottom-right-radius: 6px; background: var(--purple); color: white; }
.assistant .bubble { border: 1px solid var(--line); border-top-left-radius: 7px; background: rgba(255,255,255,.72); }
.assistant .speaker { display: grid; place-items: center; flex: 0 0 30px; height: 30px; margin-top: 4px; border-radius: 10px; background: var(--lavender); font-size: 15px; }
.assistant .speaker.fast { background: #fff0cf; }
.assistant .speaker.high {
  border: 1px solid rgba(255,255,255,.58);
  background: linear-gradient(145deg, #7450ce, #4c2a9c);
  color: white;
  box-shadow: 0 5px 14px rgba(76,42,156,.24);
}
.assistant .speaker.sean { background: #ffd9ce; }
.mode-chip { display: inline-block; margin: 0 0 5px 5px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mode-chip.high {
  margin-left: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #4c2a9c;
  color: white;
  letter-spacing: .07em;
  box-shadow: 0 3px 10px rgba(76,42,156,.16);
}
.user .mode-chip { display: none; }
.thinking .bubble::after { content: "  ●  ●  ●"; color: var(--purple); animation: pulse 1.2s infinite; }
.wait-copy { display: block; color: var(--muted); font-size: 13px; font-weight: 650; }
.error .bubble { border-color: #efb4b4; background: #fff1f1; color: #822d2d; }
.message-actions {
  display: flex;
  gap: 4px;
  min-height: 27px;
  margin-top: 3px;
  opacity: .42;
  transition: opacity .16s ease;
}
.message.user .message-actions { justify-content: flex-end; }
.message:hover .message-actions, .message:focus-within .message-actions { opacity: 1; }
.message-action {
  min-height: 27px;
  padding: 3px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.message-action:hover { background: rgba(78,43,132,.08); color: var(--purple-dark); }
.message-action.copied { color: #247a52; }
.error .message-actions { opacity: 1; }
.retry-message { background: rgba(130,45,45,.07); color: #822d2d; }

.feedback-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 26px;
  background: #fdfbff;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(43,27,64,.28);
}
.feedback-dialog::backdrop { background: rgba(31,22,42,.34); backdrop-filter: blur(5px); }
.feedback-form { padding: 28px; }
.feedback-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.feedback-head .eyebrow { margin-bottom: 8px; }
.feedback-head h2 { margin: 0; font-family: Georgia, "Iowan Old Style", serif; font-size: 30px; letter-spacing: -.035em; }
.dialog-close {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--lavender-soft);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.feedback-intro { margin: 14px 0 20px; color: var(--muted); line-height: 1.5; }
.feedback-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.feedback-types legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.feedback-types label { cursor: pointer; }
.feedback-types input { position: absolute; opacity: 0; pointer-events: none; }
.feedback-types span {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.feedback-types input:checked + span { border-color: rgba(110,73,199,.4); background: var(--lavender-soft); color: var(--purple-dark); box-shadow: inset 0 0 0 1px rgba(110,73,199,.12); }
.feedback-types input:focus-visible + span { outline: 3px solid rgba(77,42,156,.55); outline-offset: 3px; }
.feedback-message { display: grid; gap: 8px; margin-top: 18px; }
.feedback-message > span { font-size: 13px; font-weight: 800; }
.feedback-message textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid rgba(74,46,106,.2);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  line-height: 1.5;
}
.feedback-privacy { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.feedback-status { min-height: 20px; margin: 9px 0 0; color: var(--purple-dark); font-size: 12px; font-weight: 750; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.feedback-actions button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; }
.feedback-actions button:first-child { background: transparent; color: var(--muted); }
.feedback-actions button:last-child { background: var(--purple-dark); color: white; }
.feedback-actions button:disabled { cursor: wait; opacity: .6; }

.rename-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  background: #fdfbff;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(43,27,64,.28);
}
.rename-dialog::backdrop { background: rgba(31,22,42,.34); backdrop-filter: blur(5px); }
.rename-form { padding: 26px; }
.rename-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.rename-head .eyebrow { margin-bottom: 7px; }
.rename-head h2 { margin: 0; font-family: Georgia, "Iowan Old Style", serif; font-size: 28px; letter-spacing: -.035em; }
.rename-field { display: grid; gap: 8px; margin-top: 22px; }
.rename-field > span { font-size: 13px; font-weight: 800; }
.rename-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(74,46,106,.2);
  border-radius: 13px;
  outline: 0;
  background: white;
  color: var(--ink);
  font: inherit;
}
.rename-field input:focus { border-color: rgba(110,73,199,.5); box-shadow: 0 0 0 3px rgba(110,73,199,.09); }
.rename-status { min-height: 20px; margin: 8px 0 0; color: #9c3f50; font-size: 12px; font-weight: 750; }
.rename-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.rename-actions button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; }
.rename-actions button:first-child { background: transparent; color: var(--muted); }
.rename-actions button:last-child { background: var(--purple-dark); color: white; }

.composer-wrap { z-index: 3; min-width: 0; padding: 10px 22px max(13px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(248,245,255,.96) 25%); }
.privacy-panel {
  width: min(760px, 100%);
  max-height: min(58dvh, 680px);
  margin: 0 auto 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(44,113,88,.2);
  border-radius: 20px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 52px rgba(42,31,55,.18);
}
.mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(520px, 100%);
  margin: 0 auto 9px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.65);
  box-shadow: 0 8px 28px rgba(61,41,90,.07);
  backdrop-filter: blur(14px);
}
.mode {
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.mode strong, .mode small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode small { color: var(--muted); font-size: 11px; }
.mode.active { background: white; box-shadow: 0 4px 14px rgba(74,45,111,.12); }
.mode.active strong { color: var(--purple-dark); }
.mode[data-mode="fast"].active { background: #fff9e8; }
.mode[data-mode="high"].active { background: #f5efff; }
.mode[data-mode="sean"].active { background: #fff0eb; }
.mode-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(620px, 100%);
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.mode-guide strong { color: var(--purple-dark); }
.mode-guide > span { min-width: 0; }
.mode-guide button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--lavender); color: var(--purple-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.privacy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: min(520px, 100%);
  height: 46px;
  margin: 0 auto 8px;
  padding: 0 4px 0 0;
  border: 1px solid rgba(51,112,88,.2);
  border-radius: 14px;
  background: rgba(239,252,247,.94);
  color: #245c49;
  box-shadow: 0 6px 20px rgba(38,91,70,.07);
  font-size: 12px;
  font-weight: 800;
}
.privacy-bar[hidden] { display: none; }
.privacy-bar.paused { border-color: rgba(166,105,27,.22); background: rgba(255,248,232,.96); color: #7c541d; }
.privacy-options-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  flex: 1 1 auto;
  padding: 0 11px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.privacy-options-trigger:hover { background: rgba(255,255,255,.72); }
.privacy-bar-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.privacy-options-chevron { flex: 0 0 auto; font-size: 17px; line-height: 1; }
.privacy-resume-inline {
  flex: 0 0 auto;
  min-width: 78px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #7c541d;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.privacy-options-trigger:disabled, .privacy-resume-inline:disabled { cursor: not-allowed; opacity: .45; }
.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: min(760px, 100%);
  margin: 0 auto 8px;
}
.attachment-tray[hidden] { display: none; }
.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(100%, 320px);
  min-height: 34px;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(77,49,111,.13);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  color: var(--purple-dark);
  box-shadow: 0 5px 16px rgba(67,43,98,.08);
  font-size: 12px;
  font-weight: 700;
}
.attachment-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-pill small { flex: none; color: var(--muted); font-size: 10px; font-weight: 600; }
.attachment-pill button {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  background: var(--lavender);
  color: var(--purple-dark);
  cursor: pointer;
}
.message-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 9px; }
.message-attachment {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  max-width: 260px;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(72,46,103,.07);
  color: var(--purple-dark);
  font-size: 11px;
  font-weight: 700;
}
.message-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-attachment.file-link {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(72,46,103,.1);
  text-decoration: none;
}
.message-attachment.file-link:hover { background: rgba(72,46,103,.12); }
.message-attachment.audio-card {
  display: grid;
  width: min(100%, 370px);
  max-width: 370px;
  padding: 9px 10px;
  border: 1px solid rgba(72,46,103,.1);
  background: rgba(255,255,255,.72);
}
.audio-card strong { color: var(--purple-dark); font-size: 11px; }
.audio-card audio { width: 100%; height: 36px; }
.user .audio-card { background: rgba(255,255,255,.94); }
.message-image {
  display: block;
  width: min(100%, 340px);
  overflow: hidden;
  border-radius: 13px;
  background: rgba(72,46,103,.08);
}
.message-image img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.transcript-label {
  display: block;
  margin: 2px 0 6px;
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  opacity: .72;
  text-transform: uppercase;
}
.message-privacy {
  display: block;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(226,247,238,.82);
  color: #245c49;
  font-size: 10px;
  font-weight: 850;
}
.message-privacy.skipped { background: rgba(255,240,207,.85); color: #7c541d; }
.reply-media-notice {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: min(760px, 100%);
  margin: auto;
  padding: 9px 9px 9px 18px;
  border: 1px solid rgba(77,49,111,.16);
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 38px rgba(67,43,98,.12);
}
.composer:focus-within { border-color: rgba(110,73,199,.45); box-shadow: 0 12px 38px rgba(67,43,98,.16), 0 0 0 3px rgba(110,73,199,.08); }
.composer.dragging { border-color: var(--purple); background: #f6f0ff; box-shadow: 0 0 0 4px rgba(110,73,199,.12); }
.attach {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 3px 0;
  border: 0;
  border-radius: 12px;
  background: var(--lavender);
  color: var(--purple-dark);
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
}
.attach:hover { background: #e6dcfb; }
.attach:disabled { opacity: .45; cursor: not-allowed; }
.privacy-shield {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 64px;
  height: 38px;
  padding: 0 9px;
  margin: 3px 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.privacy-shield svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.privacy-shield-label { font-size: 12px; font-weight: 850; }
.privacy-shield:hover { background: #eef9f4; color: #276b53; }
.privacy-shield[aria-pressed="true"] { background: #e4f7ee; color: #216149; }
.privacy-shield.paused { background: #fff0cf; color: #8b5d19; }
.privacy-shield.unavailable { opacity: 1; color: #5d5566; }
.privacy-shield.unavailable:hover { background: rgba(107,99,117,.08); color: #4f4758; }
.privacy-shield:disabled { opacity: .38; cursor: not-allowed; }
.record-voice {
  position: relative;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 3px 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--purple-dark);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.record-voice svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.record-voice:hover { background: var(--lavender); }
.record-voice.recording {
  background: #ffe5e7;
  color: #b52d3a;
  animation: recordPulse 1.25s ease-in-out infinite;
}
.record-voice.recording::after {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -24px -24px 0 0;
  border: 2px solid white;
  border-radius: 999px;
  background: #d93646;
  content: "";
}
.record-voice:disabled { opacity: .38; cursor: not-allowed; }
textarea {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-height: 150px;
  padding: 8px 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1.45;
}
#prompt:focus-visible { outline: 0; }
textarea::placeholder { color: #6d6476; }
.send {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--purple);
  color: white;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}
.send.cancel-recording {
  background: #b52d3a;
}
.send.cancel-recording:hover {
  background: #9f2431;
}
.send:disabled { opacity: .45; cursor: not-allowed; }
.privacy-options-dialog {
  width: min(500px, calc(100% - 32px));
  max-height: min(88dvh, 720px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(72,46,103,.12);
  border-radius: 24px;
  background: #fffdfd;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(31,22,42,.28);
}
.privacy-options-dialog::backdrop { background: rgba(31,22,42,.38); backdrop-filter: blur(5px); }
.privacy-options-form { padding: 25px 26px 22px; }
.privacy-options-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.privacy-options-head .dialog-close { flex-basis: 44px; width: 44px; height: 44px; }
.privacy-options-head .eyebrow { margin-bottom: 7px; }
.privacy-options-head h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; line-height: 1.05; }
.privacy-beta-warning { display: grid; gap: 4px; margin-top: 16px; padding: 11px 12px; border: 1px solid rgba(72,46,103,.12); border-radius: 12px; background: #f7f3ff; color: var(--muted); font-size: 14px; line-height: 1.45; }
.privacy-beta-warning strong { color: var(--purple-dark); font-size: 14px; }
.privacy-scope-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 22px 0 0; padding: 0; border: 0; }
.privacy-scope-options legend { grid-column: 1 / -1; margin-bottom: 1px; color: var(--purple-dark); font-size: 12px; font-weight: 850; }
.privacy-scope-options button {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.privacy-scope-options button[aria-pressed="true"] { border-color: rgba(44,113,88,.38); background: #eef9f4; color: #245c49; box-shadow: inset 0 0 0 1px rgba(44,113,88,.08); }
.privacy-scope-options strong { color: inherit; font-size: 13px; }
.privacy-scope-options small { font-size: 11px; line-height: 1.35; }
.privacy-option-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 0; }
.privacy-option-actions button {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: var(--lavender-soft);
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.privacy-option-actions #privacyTurnOff, .privacy-option-actions #privacyStopChat { background: #fff1f2; color: #8c313b; }
.privacy-options-names { display: grid; gap: 7px; margin-top: 20px; color: var(--purple-dark); font-size: 12px; font-weight: 800; }
.privacy-options-names small { color: var(--muted); font-weight: 650; }
.privacy-options-names textarea { width: 100%; min-height: 74px; max-height: 130px; padding: 10px 12px; resize: vertical; border: 1px solid rgba(74,46,106,.2); border-radius: 12px; background: white; color: var(--ink); line-height: 1.45; }
.privacy-options-names textarea:focus { border-color: rgba(110,73,199,.5); box-shadow: 0 0 0 3px rgba(110,73,199,.09); }
.privacy-options-names textarea:focus-visible,
.privacy-names textarea:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.privacy-options-limitations { display: grid; gap: 4px; margin-top: 14px; padding: 11px 12px; border-radius: 12px; background: #f7f3ff; color: var(--muted); font-size: 11px; line-height: 1.45; }
.privacy-options-limitations strong { color: var(--purple-dark); font-size: 12px; }
.privacy-options-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.privacy-options-actions button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; }
.privacy-options-actions button:first-child { background: transparent; color: var(--muted); }
.privacy-options-actions button:last-child { background: #276b53; color: white; }
.privacy-review-form { display: flex; flex-direction: column; min-height: 0; padding: 20px; }
.privacy-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.privacy-review-head .eyebrow { margin-bottom: 6px; }
.privacy-review-head h2 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 26px; line-height: 1.05; }
.privacy-boundary { margin: 14px 0 4px; padding: 10px 12px; border-radius: 12px; background: #eef9f4; color: #245c49; font-size: 14px; font-weight: 750; line-height: 1.45; }
.privacy-boundary.privacy-compare-warning { border: 1px solid rgba(173,63,72,.18); background: #fff1f2; color: #7d3039; }
.privacy-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 12px 0 10px; }
.privacy-result-heading h2 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 28px; line-height: 1.05; }
.privacy-review-summary { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.45; }
.privacy-result-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #e4f7ee; color: #245c49; font-size: 12px; font-weight: 850; white-space: nowrap; }
.privacy-result-badge.warning { background: #fff1f2; color: #8c313b; }
.privacy-blockers, .privacy-coverage { margin: 0 0 12px; padding: 12px 14px; border-radius: 13px; }
.privacy-blockers { border: 1px solid rgba(173,63,72,.18); background: #fff1f2; color: #8c313b; }
.privacy-coverage { border: 1px solid rgba(72,46,103,.1); background: #f7f3ff; color: var(--purple-dark); }
.privacy-blockers h3, .privacy-coverage h3 { margin: 0 0 5px; font-size: 12px; }
.privacy-blockers ul, .privacy-coverage ul { margin: 0; padding-left: 19px; font-size: 12px; line-height: 1.5; }
.privacy-output { display: grid; gap: 10px; }
.privacy-output-message { display: grid; gap: 7px; color: var(--purple-dark); font-size: 13px; font-weight: 850; }
.privacy-output-message > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.privacy-output-message small { color: #276b53; font-size: 12px; font-weight: 800; }
.privacy-output-message small.dirty { color: #8c5f1c; }
.privacy-output-message textarea {
  width: 100%;
  min-height: 96px;
  max-height: 220px;
  padding: 12px;
  resize: vertical;
  border: 1px solid rgba(74,46,106,.18);
  border-radius: 13px;
  background: #fcfbff;
  color: var(--ink);
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.privacy-file-results { display: grid; gap: 8px; }
.privacy-file-card { padding: 11px 12px; border: 1px solid rgba(72,46,103,.11); border-radius: 13px; background: #faf8ff; }
.privacy-file-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.privacy-file-card-copy { min-width: 0; }
.privacy-file-card-copy strong, .privacy-file-card-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.privacy-file-card-copy strong { color: var(--ink); font-size: 13px; }
.privacy-file-card-copy span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.privacy-file-card-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.privacy-file-card button, .privacy-output-actions button, .privacy-back, .privacy-input-actions button,
.privacy-input-head button {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: var(--lavender);
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.privacy-file-preview { margin-top: 9px; }
.privacy-file-preview summary, .privacy-context-result summary { min-height: 44px; color: var(--purple-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
.privacy-file-preview pre, .privacy-context-item pre { max-height: 180px; margin: 0; padding: 10px; overflow: auto; border-radius: 10px; background: #f0edf5; color: var(--ink); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.privacy-file-editor { display: block; width: 100%; min-width: 0; min-height: 150px; max-height: 360px; margin: 0; padding: 10px; resize: vertical; overflow: auto; border: 1px solid rgba(74,46,106,.18); border-radius: 10px; background: #f0edf5; color: var(--ink); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.privacy-file-editor:focus { border-color: rgba(110,73,199,.58); box-shadow: 0 0 0 3px rgba(110,73,199,.12); }
.privacy-context-result { padding: 2px 0; }
.privacy-context-item { margin-top: 7px; }
.privacy-context-item strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.privacy-output-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.privacy-output-actions .privacy-primary-output { background: #276b53; color: white; }
.privacy-output-actions .privacy-primary-action, .privacy-input-actions .privacy-primary-action { margin-left: auto; background: #276b53; color: white; }
.privacy-output-actions button:disabled { opacity: .45; cursor: not-allowed; }
.privacy-file-card-actions button:disabled { opacity: .45; cursor: not-allowed; }
.privacy-review-details { margin-top: 12px; border: 1px solid rgba(72,46,103,.11); border-radius: 13px; background: #faf8ff; }
.privacy-review-details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 13px; color: var(--purple-dark); font-size: 13px; font-weight: 850; cursor: pointer; list-style: none; }
.privacy-review-details > summary::-webkit-details-marker { display: none; }
.privacy-review-details[open] > summary span:last-child { transform: rotate(180deg); }
.privacy-review-details-body { padding: 0 12px 12px; }
.privacy-names { display: grid; gap: 6px; margin: 0 0 7px; color: var(--purple-dark); font-size: 13px; font-weight: 800; }
.privacy-names small { color: var(--muted); font-weight: 650; }
.privacy-names textarea { width: 100%; min-height: 58px; max-height: 100px; padding: 10px 12px; border: 1px solid rgba(74,46,106,.2); border-radius: 12px; background: white; }
.privacy-names textarea:focus { border-color: rgba(110,73,199,.5); box-shadow: 0 0 0 3px rgba(110,73,199,.09); }
.privacy-rescan { align-self: flex-start; min-height: 44px; margin: 0 0 10px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--lavender); color: var(--purple-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.privacy-output > .privacy-rescan { margin: 0; }
.privacy-findings { min-height: 0; margin: 0; padding: 0; overflow: visible; border: 0; }
.privacy-findings legend { margin-bottom: 8px; color: var(--purple-dark); font-size: 12px; font-weight: 850; }
.privacy-finding-list { display: grid; gap: 7px; }
.privacy-finding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(72,46,103,.1);
  border-radius: 12px;
  background: rgba(248,245,255,.7);
}
.privacy-finding-copy { min-width: 0; }
.privacy-finding-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; }
.privacy-finding-title strong { font-size: 12px; }
.privacy-finding-title code { color: #276b53; font-size: 11px; }
.privacy-finding-choice { display: block; margin-top: 3px; color: #276b53; font-size: 11px; font-weight: 850; }
.privacy-finding.kept { border-color: rgba(173,63,72,.35); background: #fff6f6; }
.privacy-finding.kept .privacy-finding-choice { color: #8c313b; }
.privacy-finding-value { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; font-weight: 700; }
.privacy-finding-snippet { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.35; }
.privacy-finding-controls { display: flex; align-self: center; gap: 5px; }
.privacy-finding-controls button { min-width: 54px; min-height: 44px; padding: 0 8px; border: 1px solid rgba(72,46,103,.12); border-radius: 10px; background: white; color: var(--muted); font-size: 11px; font-weight: 850; cursor: pointer; }
.privacy-finding-controls button[aria-pressed="true"] { border-color: rgba(44,113,88,.3); background: #e4f7ee; color: #245c49; }
.privacy-finding-controls .privacy-keep-choice[aria-pressed="true"] { border-color: rgba(173,63,72,.28); background: #fff1f2; color: #8c313b; }
.privacy-finding-locked { align-self: center; padding: 6px 8px; border-radius: 9px; background: #e4f7ee; color: #245c49; font-size: 11px; font-weight: 850; }
.privacy-reveal-value { grid-column: 1 / -1; justify-self: start; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--purple-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.privacy-empty { margin: 0 0 10px; padding: 12px; border-radius: 12px; background: #f5f4f7; color: var(--muted); font-size: 12px; line-height: 1.45; }
.privacy-keep-warning { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff1f2; color: #8c313b; font-size: 14px; font-weight: 800; line-height: 1.45; }
.privacy-assistive-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.privacy-review-status { min-height: 20px; margin: 8px 0 0; color: #8c313b; font-size: 13px; font-weight: 750; }
.privacy-review-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.privacy-review-actions button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; }
.privacy-review-actions button:first-child { background: transparent; color: var(--muted); }
.privacy-review-actions .privacy-recovery { background: var(--lavender); color: var(--purple-dark); }
.privacy-review-actions button:last-child { background: #276b53; color: white; }
.privacy-review-actions button:disabled { opacity: .45; cursor: not-allowed; }
.privacy-compare-dialog {
  width: min(1120px, calc(100% - 32px));
  max-height: min(90dvh, 900px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(72,46,103,.14);
  border-radius: 24px;
  background: #fffdfd;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(31,22,42,.3);
}
.privacy-compare-dialog::backdrop { background: rgba(31,22,42,.42); backdrop-filter: blur(5px); }
.privacy-compare-form { padding: 24px; }
.privacy-compare-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.privacy-compare-head .eyebrow { margin-bottom: 6px; }
.privacy-compare-head h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; }
.privacy-compare-content { display: grid; gap: 16px; margin-top: 18px; }
.privacy-compare-item { min-width: 0; padding: 14px; border: 1px solid rgba(72,46,103,.11); border-radius: 14px; background: #faf8ff; }
.privacy-compare-item h3 { margin: 0 0 10px; overflow-wrap: anywhere; color: var(--purple-dark); font-size: 13px; }
.privacy-compare-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.privacy-compare-columns section { min-width: 0; }
.privacy-compare-columns h4 { margin: 0 0 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.privacy-compare-columns pre { min-height: 120px; max-height: 44dvh; margin: 0; padding: 12px; overflow: auto; border-radius: 11px; background: #f0edf5; color: var(--ink); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.privacy-compare-columns section:last-child pre { background: #eef9f4; }
.privacy-workspace {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  overflow-y: auto;
  background: linear-gradient(150deg, rgba(250,247,255,.92), rgba(245,252,249,.9));
}
.privacy-workspace-topbar { position: sticky; z-index: 4; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 64px; padding: 9px 24px; border-bottom: 1px solid var(--line); background: rgba(252,250,255,.88); backdrop-filter: blur(18px); }
.privacy-back { justify-self: start; background: transparent; }
.privacy-beta-chip { justify-self: center; padding: 6px 10px; border-radius: 999px; background: #f1ecff; color: var(--purple-dark); font-size: 12px; font-weight: 850; }
.privacy-inline-beta { display: inline-flex; margin-right: 5px; padding: 3px 7px; border-radius: 999px; background: #f1ecff; color: var(--purple-dark); font-size: 11px; line-height: 1; vertical-align: 1px; }
.privacy-signout { justify-self: end; min-height: 44px; padding: 13px 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.privacy-workspace-shell { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 64px; }
.privacy-workspace-hero { max-width: 680px; margin: 0 auto 24px; text-align: center; }
.privacy-workspace-hero .eyebrow { margin-bottom: 9px; }
.privacy-workspace-hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 7vw, 66px); line-height: .98; letter-spacing: -.04em; }
.privacy-workspace-hero > p:not(.eyebrow) { margin: 14px 0 0; color: var(--muted); font-size: 18px; }
.privacy-workspace-hero .privacy-beta-warning { max-width: 640px; margin: 22px auto 0; text-align: left; }
.privacy-workbench { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 820px; margin: auto; }
.privacy-input-card, .privacy-standalone-result { padding: 24px; border: 1px solid rgba(72,46,103,.12); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 18px 54px rgba(67,43,98,.11); }
.privacy-input-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.privacy-input-head .eyebrow { margin-bottom: 6px; }
.privacy-input-head h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; }
.privacy-input-head button { background: transparent; color: var(--muted); }
.privacy-dropzone { display: grid; place-items: center; width: 100%; min-height: 132px; margin-top: 18px; padding: 18px; border: 2px dashed rgba(44,113,88,.28); border-radius: 18px; background: #f4fbf8; color: #245c49; text-align: center; cursor: pointer; }
.privacy-dropzone.dragging { border-color: #276b53; background: #e4f7ee; }
.privacy-dropzone strong { margin-top: 7px; font-size: 14px; }
.privacy-dropzone span:last-child { margin-top: 3px; color: var(--muted); font-size: 12px; }
.privacy-drop-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: white; font-size: 23px; }
.privacy-standalone-files { display: grid; gap: 7px; margin-top: 10px; }
.privacy-standalone-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 6px 8px 6px 12px; border: 1px solid rgba(72,46,103,.1); border-radius: 12px; background: #faf8ff; }
.privacy-standalone-file span { min-width: 0; overflow: hidden; color: var(--purple-dark); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.privacy-standalone-file button { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--lavender); cursor: pointer; }
.privacy-standalone-file button:disabled { opacity: .45; cursor: not-allowed; }
.privacy-paste-field { display: grid; gap: 7px; margin-top: 18px; color: var(--purple-dark); font-size: 13px; font-weight: 850; }
.privacy-paste-field textarea { width: 100%; min-height: 170px; max-height: 360px; padding: 13px; resize: vertical; border: 1px solid rgba(74,46,106,.18); border-radius: 15px; background: #fcfbff; color: var(--ink); font-size: 15px; line-height: 1.5; }
.privacy-input-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.privacy-input-actions p { margin: 0; color: #245c49; font-size: 12px; font-weight: 750; }
.privacy-workspace-status { min-height: 20px; margin: 9px 0 0; color: var(--muted); font-size: 13px; font-weight: 750; }
.privacy-standalone-result .privacy-review-details { margin-top: 14px; }
.fine-print { margin: 7px 0 0; color: #655d6c; font-size: 11px; text-align: center; }
.privacy-draft-note { margin: 7px 2px 5px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.composer-wrap.privacy-reviewing .composer { border-color: rgba(72,46,103,.1); background: #f8f6fa; box-shadow: none; opacity: .62; }
.fine-print.privacy-restrictions { margin-top: 1px; font-size: 14px; font-weight: 650; line-height: 1.2; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mobile-only { display: none; }
.scrim { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes recordPulse { 50% { transform: scale(.94); box-shadow: 0 0 0 5px rgba(217,54,70,.08); } }

@media (max-width: 760px) {
  .mobile-only { display: grid; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 20px 0 55px rgba(40,25,57,.18);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; z-index: 19; inset: 0; background: rgba(25,17,34,.28); backdrop-filter: blur(2px); }
  .scrim.open { display: block; }
  .topbar { min-height: 58px; padding: 8px 13px; }
  .topbar-title { align-items: center; }
  .feedback-entry { width: 44px; height: 44px; padding: 0; }
  .feedback-entry span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .welcome { width: calc(100% - 28px); margin-top: 7vh; }
  .welcome-orbit { transform: scale(.88); }
  .welcome > p:last-of-type { margin-bottom: 22px; font-size: 16px; }
  .starters { grid-template-columns: 1fr; }
  .starters button { min-height: 52px; }
  .composer-wrap { padding: 8px 10px max(11px, env(safe-area-inset-bottom)); }
  .mode { flex-wrap: wrap; gap: 3px 5px; padding: 7px 4px; }
  .mode > span { flex: 0 0 100%; text-align: center; }
  .mode small { flex-basis: 100%; }
  .composer-wrap.privacy-configured .mode { flex-wrap: nowrap; min-height: 44px; gap: 4px; padding-block: 6px; }
  .composer-wrap.privacy-configured .mode > span { flex: 0 0 auto; }
  .composer-wrap.privacy-configured .mode small { display: none; }
  .answer { max-width: 92%; }
  .message-actions { opacity: .62; }
  .mode-guide { flex-wrap: wrap; align-items: flex-start; line-height: 1.35; padding-inline: 10px; }
  .mode-guide > span { flex: 1 1 230px; }
  .mode-guide button { flex: 0 0 auto; }
  .composer { min-width: 0; }
  .composer { gap: 6px; padding-left: 10px; }
  .attach, .privacy-shield, .record-voice { flex-basis: 44px; width: 44px; height: 44px; margin-block: 0; }
  .attachment-pill button { width: 44px; height: 44px; }
  .privacy-workspace-topbar { padding-inline: 12px; }
  .privacy-workspace-shell { width: calc(100% - 24px); padding: 28px 0 42px; }
  .privacy-workspace-hero { margin-bottom: 18px; }
  .privacy-workspace-hero h1 { font-size: clamp(40px, 13vw, 54px); }
  .privacy-workspace-hero > p:not(.eyebrow) { font-size: 16px; }
  .privacy-input-card, .privacy-standalone-result { padding: 20px; border-radius: 20px; }
  .privacy-input-actions { flex-wrap: wrap; }
  .privacy-file-card-head { align-items: flex-start; flex-wrap: wrap; }
  .privacy-compare-columns { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .feedback-dialog {
    width: 100%;
    max-width: none;
    max-height: min(86dvh, 700px);
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
  }
  .feedback-form { padding: 24px 20px max(24px, env(safe-area-inset-bottom)); }
  .feedback-head h2 { font-size: 27px; }
  .feedback-types { grid-template-columns: 1fr; }
  .rename-dialog { width: calc(100% - 24px); }
  .rename-form { padding: 24px 20px; }
  .privacy-options-dialog { width: 100%; max-width: none; max-height: min(90dvh, 760px); margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .privacy-options-form { padding: 24px 20px max(22px, env(safe-area-inset-bottom)); }
  .privacy-options-head h2 { font-size: 27px; }
  .privacy-panel { max-height: min(48dvh, 480px); border-radius: 16px; }
  .privacy-review-form { padding: 18px 16px; }
  .privacy-review-head h2 { font-size: 24px; }
  .privacy-review-actions { padding-inline: 0; }
  .privacy-input-actions .privacy-primary-action { flex: 1 0 100%; margin-left: 0; }
}

@media (max-width: 420px) {
  .privacy-scope-options { grid-template-columns: 1fr; }
  .privacy-bar { font-size: 11px; }
  .privacy-resume-inline { min-width: 72px; padding-inline: 9px; }
  .login-shell { place-items: start center; padding: 16px; }
  .login-card { margin: auto 0; padding: 36px 24px 28px; border-radius: 28px; }
  .mode-picker { border-radius: 14px; }
  .mode { font-size: 13px; }
  .thread { width: calc(100% - 22px); }
  .privacy-input-card, .privacy-standalone-result { padding: 17px; }
  .privacy-input-head h2 { font-size: 24px; }
  .privacy-finding { grid-template-columns: minmax(0, 1fr); }
  .privacy-finding-controls { width: 100%; }
  .privacy-finding-controls button { flex: 1; }
  .privacy-finding-locked { justify-self: start; }
  .privacy-output-actions button { flex: 1 1 132px; }
  .privacy-compare-dialog { width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .privacy-compare-form { padding: 18px 16px max(20px, env(safe-area-inset-bottom)); }
  .privacy-compare-head h2 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
