:root {
  --bg: #FAF4ED;
  --text: #1E0E04;
  --muted: #8A6A54;
  --muted2: #A98C76;
  --accent: #C53D1A;
  --accent-dark: #9E2E12;
  --accent-light: rgba(197, 61, 26, 0.08);
  --card: #FFFFFF;
  --border: #E8DDD4;
  --border2: #EFE6DC;
  --green: #28965A;
  --peach: #F4E8DC;
  --peach2: #F7EEE4;
  --bubble: #E9E0D4;
  --hover: rgba(0, 0, 0, 0.045);
  --row-hover: rgba(255, 255, 255, 0.6);
  --code-bg: #EFE7DC;
  --code-text: #5A3D2A;
  --modal-scrim: rgba(20, 10, 4, 0.42);
  --track: #EAE0D5;
  --danger: #B42318;
  --danger-soft: rgba(180, 35, 24, 0.08);
  --ink: var(--text);
  --paper: var(--bg);
  --ember: var(--accent);
  --surface: var(--card);
  --surface-raised: var(--card);
  --sage: var(--green);
  /* Workspace view tokens (campaigns / media / direct sales) — alias to theme
     tokens so they follow light/dark automatically instead of falling back to
     hardcoded light values. */
  --surface-page: var(--bg);
  --surface-elevated: var(--card);
  --surface-muted: var(--peach2);
  --border-subtle: var(--border);
  --text-primary: var(--text);
  --text-muted: var(--muted);
  --text-subtle: var(--muted2);
  --radius-md: var(--radius);
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar-w: 272px;
  --header-h: 70px;
  --chat-max: 860px;
  --radius-sm: 9px;
  --radius: 11px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(30, 14, 4, 0.04);
  --shadow-md: 0 6px 30px rgba(30, 14, 4, 0.07);
  --shadow-lg: 0 16px 44px rgba(30, 14, 4, 0.18);
  --cover-shadow: 0 10px 28px rgba(30, 14, 4, 0.16);
}

[data-theme="dark"] {
  --bg: #17100A;
  --text: #F2E7DA;
  --muted: #AD9783;
  --muted2: #877262;
  --accent: #DD5A33;
  --accent-dark: #C2461F;
  --accent-light: rgba(221, 90, 51, 0.15);
  --card: #221811;
  --border: #3A2C1F;
  --border2: #2F2218;
  --green: #45B97C;
  --peach: #2A1E13;
  --peach2: #241A10;
  --bubble: #322318;
  --hover: rgba(255, 255, 255, 0.06);
  --row-hover: rgba(255, 255, 255, 0.045);
  --code-bg: #2E2114;
  --code-text: #E2C8AA;
  --modal-scrim: rgba(0, 0, 0, 0.62);
  --track: #31241A;
  --danger-soft: rgba(221, 90, 51, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 30px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.35);
  --cover-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.25s ease, color 0.25s ease;
}

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 26px 22px 18px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.32s var(--ease);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  flex-shrink: 0;
}

.sidebar-book,
.sidebar-nav,
.sidebar-chats,
.sidebar-auth,
.sidebar-footer {
  flex-shrink: 0;
}

.brand-mark {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 11px;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}

.brand-tagline {
  margin: 1px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.sidebar-book {
  padding: 22px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.cover-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 158px;
  aspect-ratio: 2 / 3;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: var(--peach2);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.2s;
}

.cover-drop:hover,
.cover-drop.dragover {
  border-color: var(--accent);
}

.cover-drop:has(.cover-preview:not([hidden])) {
  border: none;
  box-shadow: var(--cover-shadow);
}

.cover-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.cover-preview:not([hidden]) + .cover-placeholder {
  display: none;
}

.cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}

.cover-placeholder svg {
  width: 28px;
  height: 28px;
  opacity: 0.6;
}

.cover-status {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.cover-status.success {
  color: var(--green);
}

.cover-status.error {
  color: var(--danger);
}

.book-switch-wrap {
  position: relative;
  width: 100%;
}

.book-switch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font: inherit;
  color: inherit;
}

.book-switch:hover {
  border-color: var(--muted2);
}

.book-switch.open {
  border-color: var(--accent);
}

.book-switch-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.book-title {
  font-size: 17px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-switch-chev {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.book-switch.open .book-switch-chev {
  transform: rotate(180deg);
}

.book-pop-scrim {
  position: fixed;
  inset: 0;
  z-index: 300;
}

.book-pop {
  position: absolute;
  z-index: 301;
  left: 0;
  right: 0;
  top: calc(100% - 10px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  animation: bbPop 0.16s ease;
}

@keyframes bbPop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.book-pop-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 8px 10px 6px;
}

.book-pop-item,
.book-pop-book {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 9px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.13s;
}

.book-pop-item {
  background: var(--peach2);
  cursor: default;
}

.book-pop-book:hover {
  background: var(--hover);
}

.book-pop-book.active {
  background: var(--peach2);
}

.book-pop-cover {
  width: 30px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
  background: linear-gradient(150deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-pop-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.book-pop-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-pop-author {
  font-size: 12px;
  color: var(--muted);
}

.book-pop-check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.book-pop-divider {
  height: 1px;
  background: var(--border2);
  margin: 8px 6px;
}

.book-pop-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 9px 10px;
  border-radius: 9px;
  border: none;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.13s;
  font-family: inherit;
}

.book-pop-action svg {
  color: var(--muted);
  flex-shrink: 0;
}

.book-pop-action:hover {
  background: var(--hover);
}

.book-pop-action:hover svg {
  color: var(--accent);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
  margin-bottom: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s;
}

.sidebar-link:hover {
  background: var(--hover);
}

.sidebar-link:hover svg {
  color: var(--accent);
}

.sidebar-link.is-active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-link.is-active svg {
  color: var(--accent);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar-chats {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  min-height: 0;
  max-height: 200px;
  padding-right: 2px;
}

.thread-list-empty {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted2);
  font-style: italic;
}

.thread-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.13s;
}

.thread-item:hover {
  background: var(--hover);
}

.thread-item.is-active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.thread-item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-label {
  margin: 24px 0 12px 4px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sidebar-integrations {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.integrations {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.integration-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.integration-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 500;
  background: var(--peach);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.integration-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted2);
  flex-shrink: 0;
}

.integration-chip.connected .integration-dot {
  background: var(--green);
}

.integration-chip.expired .integration-dot,
.integration-chip.disconnected .integration-dot {
  background: var(--muted2);
}

.integration-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-connect {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
}

.btn-connect:hover {
  background: var(--accent-light);
}

.sidebar-auth {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-form input,
.auth-form select {
  font: inherit;
  font-size: 13px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  width: 100%;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.auth-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.auth-row select {
  flex: 1;
}

.auth-status {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.auth-status-error {
  color: var(--danger);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
}

.sidebar-footnote {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted2);
}

.account-chip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: 12px;
  font: inherit;
  color: inherit;
}

.account-chip:hover {
  border-color: var(--muted2);
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.account-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-email {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-gear {
  color: var(--muted);
  flex-shrink: 0;
}

.chat-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.chat-header {
  flex-shrink: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.sidebar-toggle {
  display: none;
}

.chat-context {
  margin: 0;
  font-size: 15.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 10px;
  padding: 9px 15px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--muted2);
}

.btn-secondary svg {
  color: var(--muted);
}

.btn-primary svg {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: var(--hover);
  color: var(--text);
}

.btn-outreach {
  position: relative;
}

.badge,
.profile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
}

.badge[hidden],
.profile-badge[hidden] {
  display: none;
}

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

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

.btn-icon:hover {
  background: var(--hover);
  color: var(--text);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.header-actions svg {
  width: 15px;
  height: 15px;
}

.connect-toast {
  margin: 12px 28px 0;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--accent-light);
  border: 1px solid var(--border2);
  font-size: 14px;
  color: var(--text);
}

.connect-toast[hidden] {
  display: none;
}

.server-offline-banner {
  margin: 12px 28px 0;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--danger-soft);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.server-offline-banner code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--code-text);
}

.server-offline-banner[hidden] {
  display: none;
}

.main-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 26px 28px 16px;
}

.outreach-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 30px;
  padding: 20px 24px;
  background: var(--peach2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.2s;
}

.outreach-bar-clickable:hover,
.outreach-bar-clickable:focus-visible {
  border-color: var(--muted2);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.outreach-bar-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
}

.outreach-bar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

.outreach-draft-count {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.outreach-pipeline-stats {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 0;
}

.outreach-pipeline-stats .outreach-chip {
  display: inline;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  border: none;
  background: none;
  color: inherit;
}

.outreach-dot-sep {
  margin: 0 8px;
  opacity: 0.6;
}

.outreach-count-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.outreach-count-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.outreach-expand-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, transform 0.2s;
}

.outreach-expand-btn:hover {
  color: var(--accent);
}

.outreach-expand-btn svg {
  width: 14px;
  height: 14px;
}

.outreach-bar.is-expanded .outreach-expand-btn {
  transform: rotate(180deg);
}

.outreach-bar-body {
  margin-top: 12px;
}

.outreach-summary {
  min-width: 0;
}

.outreach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.outreach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--text);
  white-space: nowrap;
}

.outreach-chip-count {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.outreach-chip--business {
  background: var(--accent-light);
  border-color: rgba(197, 61, 26, 0.2);
  color: var(--accent);
}

.outreach-chip--event {
  background: var(--peach);
  border-color: var(--border);
  color: var(--text);
}

.outreach-chip--library {
  background: rgba(40, 150, 90, 0.1);
  border-color: rgba(40, 150, 90, 0.25);
  color: var(--green);
}

.outreach-chip--podcast {
  background: rgba(139, 90, 107, 0.1);
  border-color: rgba(139, 90, 107, 0.2);
  color: #8b5a6b;
}

.outreach-chip--school {
  background: rgba(74, 107, 138, 0.1);
  border-color: rgba(74, 107, 138, 0.2);
  color: #4a6b8a;
}

.outreach-chip--media {
  background: var(--hover);
  border-color: var(--border);
  color: var(--muted);
}

.outreach-bar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.outreach-compact-cta {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s;
}

.outreach-bar-clickable:hover .outreach-compact-cta,
.outreach-bar-clickable:focus-visible .outreach-compact-cta {
  color: var(--accent);
}

.outreach-bar-arrow {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: transform 0.15s, color 0.15s;
}

.outreach-bar-clickable:hover .outreach-bar-arrow,
.outreach-bar-clickable:focus-visible .outreach-bar-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.outreach-bar-arrow svg {
  width: 16px;
  height: 16px;
}

.outreach-bar:not(.is-expanded) .outreach-recent,
.outreach-bar:not(.is-expanded) .outreach-hint {
  display: none;
}

.outreach-bar.is-expanded .outreach-bar-foot {
  display: none;
}

.outreach-recent {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.outreach-recent-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
}

.outreach-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.outreach-subject {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outreach-type-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  white-space: nowrap;
}

.outreach-hint {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.outreach-meta {
  font-size: 14px;
  color: var(--muted);
}

.messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: var(--chat-max);
  margin: 0 auto;
  width: 100%;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}

.message {
  line-height: 1.65;
  word-break: break-word;
  animation: message-in 0.35s var(--ease) both;
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.message.user {
  align-self: flex-end;
  max-width: 78%;
  background: var(--bubble);
  border-radius: 16px 16px 4px 16px;
  padding: 15px 20px;
  font-size: 15.5px;
  border: none;
}

.message.assistant {
  align-self: stretch;
  max-width: 100%;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 26px 30px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  white-space: normal;
}

.message.assistant.activity-only {
  padding: 14px 18px;
  background: var(--peach2);
  border: 1px dashed var(--border);
  box-shadow: none;
}

.message.assistant.activity-only .md:empty,
.message.assistant.activity-only .file-links:empty {
  display: none;
}

.message.error {
  align-self: center;
  max-width: 100%;
  padding: 14px 18px;
  background: var(--danger-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--danger);
}

.message.loading {
  align-self: flex-start;
  max-width: 100%;
  padding: 14px 18px;
  color: var(--muted);
  font-style: italic;
  background: transparent;
  border: none;
}

.md > *:first-child {
  margin-top: 0;
}

.md > *:last-child {
  margin-bottom: 0;
}

.md h1,
.md h2,
.md h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0.75em 0 0.35em;
  letter-spacing: -0.01em;
}

.md h1 {
  font-size: 1.5rem;
}

.md h2 {
  font-size: 1.25rem;
}

.md h3 {
  font-size: 1.1rem;
}

.md p {
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.md p:last-of-type {
  margin-bottom: 0;
}

.md ul,
.md ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.md li {
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.md strong {
  font-weight: 700;
}

.md code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.86em;
  color: var(--code-text);
}

.md pre {
  background: var(--code-bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}

.md pre code {
  background: none;
  border: none;
  padding: 0;
}

.md a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.agent-status::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: activity-pulse 1.4s ease-in-out infinite;
}

.message.assistant.has-content .agent-status::before {
  display: none;
}

.message.assistant.activity-only.activity-done .agent-status::before {
  background: var(--green);
  animation: none;
}

@keyframes activity-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.agent-status[hidden] {
  display: none;
}

.message.assistant.has-content .agent-status:not([hidden]) {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border2);
  font-size: 13px;
}

.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, color 0.12s, border-color 0.12s, background 0.12s;
}

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

.copy-btn[hidden] {
  display: none;
}

.message.assistant.has-content:hover .copy-btn,
.message.assistant.has-content:focus-within .copy-btn {
  opacity: 1;
  pointer-events: auto;
  border-color: var(--border);
  color: var(--text);
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-btn.is-copied {
  opacity: 1;
  pointer-events: auto;
  color: var(--green);
  border-color: rgba(40, 150, 90, 0.35);
}

.copy-btn.is-failed {
  opacity: 1;
  pointer-events: auto;
  color: var(--danger);
}

@media (hover: none) {
  .message.assistant.has-content .copy-btn {
    opacity: 0.5;
    pointer-events: auto;
  }
}

.file-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border2);
}

.file-links-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 8px;
}

.file-links a {
  color: var(--accent);
}

.generated-image {
  margin: 12px 0;
}

.generated-image img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.welcome {
  margin: auto;
  max-width: 100%;
  padding: 1.5rem 0 2rem;
  animation: message-in 0.5s var(--ease) both;
}

.welcome-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.welcome-eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
}

.welcome-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
}

.welcome-divider {
  width: min(280px, 60%);
  height: 1px;
  margin: 0 auto 0.85rem;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.welcome-lead {
  margin: 0 auto;
  max-width: 440px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.welcome-footnote {
  margin: 1.75rem 0 0;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--muted2);
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.prompt-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px;
  text-align: left;
  font: inherit;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s, background 0.15s;
  color: var(--text);
}

.prompt-card:hover {
  background: var(--peach2);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.prompt-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.prompt-card-icon-wrap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
  transition: background 0.15s;
}

.prompt-card-icon-wrap svg {
  width: 16px;
  height: 16px;
}

.prompt-card-label {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
}

.prompt-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  padding-left: 42px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  margin: auto;
  padding: 2rem;
}

.composer {
  flex-shrink: 0;
  padding: 6px 28px 26px;
  max-width: var(--chat-max);
  margin: 0 auto;
  width: 100%;
}

.composer-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 22px 14px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.composer-panel:focus-within {
  border-color: var(--muted2);
  box-shadow: 0 8px 36px rgba(30, 14, 4, 0.1);
}

.composer-panel textarea {
  width: 100%;
  resize: none;
  min-height: 26px;
  max-height: 160px;
  padding: 0;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
}

.composer-panel textarea::placeholder {
  color: var(--muted2);
}

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border2);
}

.composer-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted2);
}

.btn-send {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--peach);
  color: var(--accent);
  cursor: not-allowed;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

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

.btn-send.is-ready {
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.btn-send.is-ready:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-send:disabled:not(.is-ready) {
  opacity: 1;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  justify-content: flex-end;
}

.drawer-overlay[hidden] {
  display: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-scrim);
  backdrop-filter: blur(2px);
}

.drawer {
  position: relative;
  max-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  box-shadow: -20px 0 60px rgba(20, 10, 4, 0.18);
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.32s var(--ease) both;
}

@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
}

.profile-panel {
  width: min(440px, 94vw);
  border-left: 1px solid var(--border);
}

.outreach-panel {
  width: min(780px, 94vw);
  border-left: 1px solid var(--border);
}

.drawer-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px 30px 18px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}

.drawer-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 30px 32px;
}

.profile-completeness {
  margin-bottom: 16px;
}

.profile-meter-track {
  height: 4px;
  background: var(--track);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.profile-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 999px;
  transition: width 0.4s var(--ease);
}

.profile-focus {
  padding: 14px 16px;
  background: var(--peach2);
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--border2);
}

.profile-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.profile-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 12px;
}

.profile-form input,
.profile-form textarea {
  font-size: 14.5px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s;
}

.profile-form input:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.profile-section h3 {
  margin: 20px 0 12px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}

.profile-section:first-child h3 {
  margin-top: 0;
}

.profile-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.profile-status {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}

.profile-status.error {
  color: var(--danger);
}

.profile-status.success {
  color: var(--green);
}

.headshot-preview {
  max-width: 100px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.inbox-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  padding: 0 30px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.inbox-tab {
  padding: 12px 18px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-tab:hover {
  color: var(--text);
}

.inbox-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.inbox-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.inbox-list-pane {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  border-right: 1px solid var(--border);
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inbox-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s;
  margin-bottom: 0;
}

.inbox-item:hover {
  background: var(--row-hover);
}

.inbox-item.selected {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(30, 14, 4, 0.06);
}

.inbox-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted2);
  font-size: 14px;
}

.inbox-detail-pane {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
}

.inbox-detail {
  padding: 26px 32px 40px;
}

.inbox-detail h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 22px;
  color: var(--text);
}

.inbox-action-bar {
  flex-shrink: 0;
  padding: 14px 30px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inbox-footer {
  flex-shrink: 0;
  padding: 16px 30px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
}

.inbox-footer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inbox-gmail-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* OUT-204: "How sends work" trust panel — make the invisible safety guarantees
   visible right where the author decides to send. */
.send-safety {
  border: 1px solid var(--border-subtle, var(--border));
  background: var(--surface-muted, var(--peach2));
  border-radius: var(--radius-md, 11px);
  padding: 12px 14px;
}

.send-safety-title {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted, var(--muted));
}

.send-safety-shield {
  color: var(--green);
}

.send-safety-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
}

.send-safety-rules li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-primary, var(--text));
}

.send-safety-rules li svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--green);
}

.send-safety-cap {
  font-weight: 500;
}

.send-safety-cap svg {
  color: var(--muted2) !important;
}

.send-safety.is-low .send-safety-cap {
  color: var(--accent);
}

.send-safety.is-low .send-safety-cap svg {
  color: var(--accent) !important;
}

.inbox-type-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}

.inbox-item-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 4px;
}

.inbox-item-subject {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-outcome {
  align-self: stretch;
  max-width: 100%;
}

.crm-outcome-title {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 12px;
}

.onboarding-banner {
  margin: 0 0 12px;
  padding: 12px 16px;
  background: var(--peach2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding: 1rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dash-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
}

.dash-header .subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}

@media (min-width: 521px) {
  .inbox-body.has-detail {
    flex-direction: row;
  }

  .inbox-body.has-detail .inbox-list-pane {
    width: 296px;
    flex-shrink: 0;
  }

  .inbox-body.has-detail .inbox-detail-pane {
    flex: 1;
  }

  .inbox-body.has-detail .inbox-back {
    display: none;
  }
}

@media (max-width: 520px) {
  .inbox-body.has-detail .inbox-list-pane {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 150;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

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

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 140;
    background: var(--modal-scrim);
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .chat-header {
    padding: 0 16px;
  }

  .main-scroll {
    padding: 16px;
  }

  .composer {
    padding: 6px 16px 20px;
  }

  .connect-toast,
  .server-offline-banner {
    margin-left: 16px;
    margin-right: 16px;
  }

  .header-actions .btn-secondary,
  .header-actions .btn-primary {
    font-size: 0;
    padding: 9px;
    gap: 0;
  }

  .header-actions .btn-secondary svg,
  .header-actions .btn-primary svg {
    width: 16px;
    height: 16px;
  }

  .header-actions .badge {
    font-size: 10px;
    margin-left: -4px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .prompt-card-desc {
    padding-left: 0;
  }

  .outreach-panel {
    width: 100%;
  }

  .drawer-head {
    padding: 20px 20px 16px;
  }

  .drawer-body {
    padding: 16px 20px 24px;
  }

  .inbox-tabs {
    padding: 0 16px;
  }

  .inbox-list-pane {
    padding: 12px;
  }

  .inbox-detail {
    padding: 20px 16px 32px;
  }

  .inbox-footer {
    padding: 14px 16px 20px;
  }
}

@media (max-width: 480px) {
  .outreach-count-num {
    font-size: 22px;
  }

  .outreach-draft-count {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .message.user {
    max-width: 92%;
  }
}

/* Center the Profile panel as a modal (instead of a right-edge drawer).
   Scoped to .drawer-centered so the Outreach inbox stays a side drawer. */
.drawer-overlay.drawer-centered {
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.drawer-overlay.drawer-centered .drawer {
  max-height: 90vh;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: ws-modal-pop 0.2s var(--ease) both;
}
