:root {
  color-scheme: dark;
  --bg-top: #0e0e10;
  --bg-bottom: #0b0b0c;
  --surface: rgba(21, 21, 23, 0.76);
  --surface-strong: rgba(21, 21, 23, 0.94);
  --surface-soft: rgba(26, 26, 29, 0.72);
  --surface-glass: rgba(18, 18, 20, 0.82);
  --line: rgba(42, 42, 46, 0.92);
  --text: #e8e8ea;
  --muted: #a8a8ad;
  --accent: #d0c3ad;
  --accent-soft: rgba(208, 195, 173, 0.13);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --tap: 44px;
  --ease: 200ms ease;
  --shell-max: 1100px;
  --content-max: 820px;
  --chat-font-size: 14px;
  --chat-tint-color: rgba(0, 0, 0, 0);
  --spyder-viewport-height: 100dvh;
  --spyder-viewport-offset-top: 0px;
  /*
   * Founder live correction 2026-04-29: all access-code/passkey instruction
   * copy and keypad digits shown at "Enter your/the 4-digit access code"
   * must be smaller. These tokens are fallback-compatible with
   * face/deploy/shared/access-lock.css; keep both in sync so cached or
   * route-specific lock shells cannot reintroduce oversized code text.
   */
  --access-lock-body-font-size: 11px;
  --access-lock-body-line-height: 1.18;
  --access-lock-code-slot-font-size: 13px;
  --access-lock-key-font-size: 15px;
  --access-lock-key-number-font-size: 16px;
  --access-lock-key-letter-font-size: 8px;
  --access-lock-delete-font-size: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(
      circle at 22% 0%,
      rgba(142, 120, 94, 0.12),
      transparent 30%
    ),
    radial-gradient(circle at 82% 8%, rgba(72, 70, 66, 0.12), transparent 32%),
    linear-gradient(
      180deg,
      var(--bg-top) 0%,
      #0c0c0e 44%,
      var(--bg-bottom) 100%
    );
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  touch-action: manipulation;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
textarea {
  font: inherit;
  touch-action: manipulation;
}

#app {
  height: var(--spyder-viewport-height);
  min-height: var(--spyder-viewport-height);
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  height: var(--spyder-viewport-height);
  min-height: var(--spyder-viewport-height);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, var(--chat-tint-color), transparent 34%),
    linear-gradient(140deg, var(--chat-tint-color), transparent 42%);
  opacity: 0;
  transition: opacity var(--ease);
}

.app-shell[data-chat-tint]:not([data-chat-tint="neutral"])::before {
  opacity: 1;
}

.app-content-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--shell-max));
  height: var(--spyder-viewport-height);
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
}

.app-shell.access-locked > :not(.access-lock-overlay) {
  filter: blur(18px);
  transform: scale(0.99);
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

body.chatgpt-helper-open .app-content-shell {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

body.chatgpt-helper-keyboard-open .app-content-shell {
  overflow-anchor: none;
}

body.chatgpt-helper-open .main-panel {
  flex: 0 0 auto;
  min-height: var(--spyder-viewport-height);
}

body.chatgpt-helper-open .conversation-shell {
  min-height: 0;
}

body.chat-keyboard-open .app-shell,
body.chat-keyboard-open .app-content-shell,
body.chat-keyboard-open .main-panel {
  height: var(--spyder-viewport-height);
  min-height: var(--spyder-viewport-height);
}

body.chat-keyboard-open .composer-shell {
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.app-shell.access-unlocked > :not(.access-lock-overlay) {
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  user-select: auto !important;
}

.access-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  /* backdrop-filter is on ::before so iOS Safari touch events reach children */
  isolation: isolate;
}

.access-lock-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

.app-shell.access-unlocked .access-lock-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.access-lock-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
}

.access-lock-panel {
  position: relative;
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 22px 24px;
  border: 1px solid rgba(42, 42, 46, 0.16);
  border-radius: 28px;
  background: rgba(14, 14, 16, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
  cursor: default;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.access-lock-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.access-lock-body {
  margin: 0;
  color: var(--muted);
  line-height: var(--access-lock-body-line-height);
  /* Founder lock-subtitle one-line rule (Pass 73): subtitle must never
     wrap — title can wrap to two lines if needed but the access-code
     instruction line stays a single line on every viewport. nowrap +
     clamp font-size keeps readability without overflow. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: clamp(11px, 3.4vw, var(--access-lock-body-font-size));
}

.access-lock-panel.error {
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 28px 80px rgba(127, 29, 29, 0.28);
}

.access-lock-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.access-lock-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.32);
  transition:
    background 0.1s ease,
    border-color 0.1s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.access-lock-dot.filled {
  background: linear-gradient(180deg, #fff2d9 0%, #d7b98a 100%) !important;
  border-color: rgba(255, 231, 190, 0.95) !important;
  box-shadow:
    0 0 0 4px rgba(215, 185, 138, 0.14),
    0 0 22px rgba(255, 224, 176, 0.38);
  transform: scale(1.1);
}

.access-lock-dot[data-filled="true"] {
  background: linear-gradient(180deg, #fff2d9 0%, #d7b98a 100%) !important;
  border-color: rgba(255, 231, 190, 0.95) !important;
}

.access-lock-input {
  /* Do not remove keypad input focusability. Mobile keyboard auto-popup depends on this input remaining visible, focusable, and pointer-enabled. */
  width: min(248px, 100%);
  height: 42px;
  padding: 0 14px;
  opacity: 1;
  pointer-events: auto;
  border: 1px solid rgba(255, 231, 190, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 242, 222, 0.96);
  caret-color: rgba(255, 231, 190, 0.92);
  font-size: var(--access-lock-key-font-size);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
  transform: none;
  z-index: 1;
  -webkit-text-security: disc;
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.access-lock-input::placeholder {
  color: rgba(231, 226, 217, 0.58);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  -webkit-text-security: none;
}

.access-lock-input:focus {
  border-color: rgba(255, 231, 190, 0.72);
  box-shadow:
    0 0 0 3px rgba(215, 185, 138, 0.16),
    0 0 22px rgba(255, 224, 176, 0.14);
}

.access-lock-input::selection,
.access-lock-input::-moz-selection {
  background: transparent;
  color: transparent;
}

.access-lock-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 248px;
  pointer-events: auto;
}

.access-lock-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 54px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  font-size: var(--access-lock-key-number-font-size);
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.08s ease,
    border-color 0.08s ease,
    transform 0.08s ease;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.access-lock-key-number {
  font-size: var(--access-lock-key-number-font-size);
  font-weight: 600;
  line-height: 1;
}

.access-lock-key-letters {
  min-height: 11px;
  margin-top: 3px;
  color: rgba(231, 226, 217, 0.58);
  font-size: var(--access-lock-key-letter-font-size);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.access-lock-key:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.13);
}

.access-lock-key:active:not(:disabled),
.access-lock-key.pressed:not(:disabled) {
  background: rgba(255, 255, 255, 0.36);
  border-color: rgba(255, 255, 255, 0.32);
  transform: scale(0.94);
}

.access-lock-key-del {
  font-size: var(--access-lock-delete-font-size);
}

.access-lock-key-spacer {
  visibility: hidden;
  pointer-events: none;
}

.access-lock-keypad.submitting .access-lock-key {
  opacity: 0.35;
  pointer-events: none;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
  z-index: 20;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: calc(20px + env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(13, 13, 16, 0.92);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(-104%);
  transition: transform var(--ease);
  visibility: hidden;
  pointer-events: none;
  z-index: 30;
}

.sidebar.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.settings-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(430px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: calc(22px + env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: radial-gradient(
      circle at 40% -10%,
      rgba(96, 78, 52, 0.11),
      transparent 34%
    ),
    rgba(12, 12, 14, 0.96);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(104%);
  transition: transform var(--ease);
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  z-index: 30;
}

.settings-panel.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.settings-header,
.settings-body,
.settings-toggle-copy,
.settings-header-copy {
  display: flex;
  flex-direction: column;
}

.settings-header,
.settings-body {
  gap: 10px;
}

.settings-header-top-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.settings-header-copy {
  min-width: 0;
  gap: 4px;
}

.settings-back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 232, 234, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.settings-back-button.hidden {
  display: none;
}

.settings-back-arrow {
  font-size: 18px;
  line-height: 1;
}

.settings-group,
.settings-group-body {
  display: flex;
  flex-direction: column;
}

.settings-group {
  gap: 8px;
  padding: 2px 0 4px;
}

.settings-group + .settings-group {
  margin-top: 4px;
}

.settings-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(208, 195, 173, 0.12);
  border-radius: 22px;
  background: rgba(18, 18, 21, 0.58);
  color: rgba(232, 232, 234, 0.94);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease),
    transform var(--ease);
}

.settings-group-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(208, 195, 173, 0.22);
  transform: translateY(-1px);
}

.settings-group-toggle::after {
  content: "›";
  margin-left: auto;
  color: rgba(232, 232, 234, 0.52);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  transition: color var(--ease);
}

.settings-group-body {
  gap: 8px;
  padding-top: 2px;
}

.settings-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(208, 195, 173, 0.12);
  color: rgba(245, 238, 230, 0.96);
}

.settings-category-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.settings-category-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.settings-category-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.settings-category-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-panel[data-settings-view]:not([data-settings-view="root"])
  .settings-group:not(.detail-active) {
  display: none;
}

.settings-panel[data-settings-view]:not([data-settings-view="root"])
  .settings-group.detail-active {
  padding-top: 0;
}

.settings-panel[data-settings-view]:not([data-settings-view="root"])
  .settings-group.detail-active
  .settings-group-toggle {
  display: none;
}

.settings-panel[data-settings-view]:not([data-settings-view="root"])
  .settings-group-body {
  animation: settings-drill-in 220ms ease;
}

@keyframes settings-drill-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.settings-header {
  flex: 0 0 auto;
}

.settings-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 10px;
}

.settings-title {
  font-size: 18px;
  font-weight: 700;
}

.settings-note,
.settings-placeholder,
.settings-toggle-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-placeholder {
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: rgba(18, 18, 20, 0.5);
  white-space: pre-wrap;
  word-break: break-word;
}

.settings-sync-card {
  gap: 6px;
}

.settings-sync-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.settings-sync-card .settings-toggle-hint {
  white-space: pre-wrap;
  word-break: break-word;
}

.settings-toggle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: rgba(18, 18, 20, 0.5);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.settings-toggle-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.settings-select-row {
  grid-template-columns: minmax(0, 1fr);
}

.settings-font-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: rgba(18, 18, 20, 0.5);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.settings-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.settings-font-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.settings-font-value {
  min-width: 22px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.settings-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: rgba(18, 18, 20, 0.5);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.settings-control-row .control-group {
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.settings-control-row .control-label {
  flex: 0 0 auto;
}

.settings-control-row .control-pill-group {
  flex: 0 0 154px;
  min-width: 154px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    rgba(32, 31, 34, 0.66),
    rgba(20, 20, 22, 0.7)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.026),
    0 16px 36px rgba(0, 0, 0, 0.16);
}

.settings-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.settings-section-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-summary-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(30, 29, 34, 0.58);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.notification-summary-item.notification-row-shell,
.notification-panel-item.notification-row-shell {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: default;
}

.notification-summary-item.notification-row-shell {
  min-height: 52px;
  padding: 9px 10px 9px 14px;
}

.notification-row-main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notification-row-main .notification-panel-item-title,
.notification-row-main .notification-panel-item-meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-row-controls {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.notification-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(208, 195, 173, 0.2);
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.54);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.notification-action-button:hover,
.notification-action-button:focus-visible {
  border-color: rgba(208, 195, 173, 0.42);
  color: var(--text);
  outline: none;
}

.notification-dismiss-button:hover,
.notification-dismiss-button:focus-visible {
  border-color: rgba(255, 124, 124, 0.42);
  color: #ffb4b4;
}

.notification-row-shell.is-read {
  opacity: 0.58;
}

.settings-select {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(17, 17, 20, 0.88);
  color: var(--text);
}

.settings-select:focus {
  outline: 1px solid rgba(208, 195, 173, 0.32);
  border-color: rgba(208, 195, 173, 0.32);
}

.settings-panel[data-profile-read-only="true"] .settings-note {
  color: rgba(227, 214, 192, 0.86);
}

.settings-panel[data-profile-read-only="true"]
  :is(
    .settings-control-row,
    .settings-toggle-row,
    .settings-section,
    .settings-placeholder
  ) {
  border-color: rgba(208, 195, 173, 0.08);
}

.settings-panel[data-profile-read-only="true"]
  :is(button:disabled, input:disabled, select:disabled, textarea[readonly]) {
  opacity: 0.58;
  filter: saturate(0.72);
}

.settings-toggle-title {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-top,
.sidebar-header,
.sidebar-bottom {
  display: flex;
  flex-direction: column;
}

.sidebar-top {
  gap: 14px;
}

.sidebar-header {
  gap: 8px;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sidebar-note,
.sidebar-footnote,
.thread-subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-bottom {
  margin-top: auto;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.new-chat-button,
.send-button,
.composer-icon-button,
.icon-button,
.thread-menu-button,
.tool-pill,
.suggestion-pill,
.thread-context-option {
  min-height: var(--tap);
  border: 0;
  cursor: pointer;
  transition:
    transform var(--ease),
    background var(--ease),
    border-color var(--ease),
    opacity var(--ease);
}

.ui-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-icon-button .ui-icon,
.send-button .ui-icon {
  width: 19px;
  height: 19px;
}

.new-chat-button {
  width: 100%;
  border-radius: 16px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #ded4c2 0%, #9d8f7a 100%);
  color: #111111;
  font-weight: 600;
}

.new-chat-button:hover,
.send-button:hover,
.composer-icon-button:hover,
.icon-button:hover,
.thread-menu-button:hover,
.tool-pill:hover,
.suggestion-pill:hover,
.thread-context-option:hover {
  transform: translateY(-1px);
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
}

.thread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.thread-button {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(30, 29, 34, 0.58);
}

.thread-button.active {
  border-color: rgba(208, 195, 173, 0.24);
  background: rgba(208, 195, 173, 0.1);
}

.thread-row.non-founder-thread .thread-button,
.thread-button.non-founder-thread-button {
  border-color: rgba(108, 162, 214, 0.18);
  background: rgba(52, 77, 109, 0.28);
}

.thread-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.thread-subtitle {
  display: block;
  margin-top: 4px;
}

.thread-menu-button {
  min-width: var(--tap);
  border-radius: 16px;
  background: rgba(30, 29, 34, 0.7);
  color: var(--muted);
}

.thread-rename-input {
  width: 100%;
  min-height: 46px;
  resize: none;
  border: 1px solid rgba(208, 195, 173, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  background: rgba(18, 18, 21, 0.94);
  color: var(--text);
  overflow: hidden;
}

.thread-context-menu,
.message-context-menu {
  position: fixed;
  z-index: 40;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(14, 14, 17, 0.96);
  box-shadow: var(--shadow);
}

.thread-context-option,
.message-context-option {
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.thread-context-option:hover,
.message-context-option:hover {
  background: rgba(208, 195, 173, 0.12);
}

.thread-context-option.destructive,
.message-context-option.destructive {
  color: #fda4af;
}

.main-panel {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  margin: 0 auto;
  background: radial-gradient(
      circle at 12% 0%,
      rgba(126, 110, 87, 0.08),
      transparent 34%
    ),
    linear-gradient(180deg, rgba(24, 24, 27, 0.82), rgba(8, 8, 10, 0.56));
  backdrop-filter: blur(18px);
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(14px + env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right)) 10px;
  padding-left: max(16px, env(safe-area-inset-left));
  background: linear-gradient(
    180deg,
    rgba(14, 14, 17, 0.94) 0%,
    rgba(14, 14, 17, 0.72) 100%
  );
  backdrop-filter: blur(20px);
}

.top-bar {
  display: grid;
  grid-template-columns: var(--tap) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(42, 42, 46, 0.12);
  border-radius: 22px;
  background: rgba(18, 18, 21, 0.74);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.top-bar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.header-title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  color: rgba(170, 166, 160, 0.92);
}

.profile-button {
  font-size: 16px;
}

.notification-entry-button {
  min-width: var(--tap);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  gap: 5px;
}

.notification-count {
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.notification-entry-button.has-notifications {
  color: rgba(218, 212, 201, 0.96);
}

.sales-assist-entry-button {
  min-width: var(--tap);
  color: rgba(205, 176, 255, 0.96);
  border: 1px solid rgba(155, 112, 255, 0.22);
  background: linear-gradient(135deg, rgba(80, 43, 160, 0.24), rgba(20, 21, 26, 0.12));
}

.sales-assist-entry-button.active {
  color: #f4efff;
  border-color: rgba(177, 139, 255, 0.58);
  box-shadow: 0 0 0 1px rgba(177, 139, 255, 0.18), 0 12px 28px rgba(65, 38, 140, 0.22);
}

.notification-panel {
  position: fixed;
  top: calc(78px + env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 38;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  max-height: min(520px, calc(100dvh - 120px));
  padding: 12px;
  border: 1px solid rgba(42, 42, 46, 0.14);
  border-radius: 22px;
  background: rgba(14, 14, 17, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.search-queue-panel {
  position: absolute;
  right: max(10px, calc(50% - 390px + 10px));
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  width: min(320px, calc(100vw - 24px));
  max-height: min(420px, calc(100dvh - 140px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(17, 17, 20, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.search-queue-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.search-queue-panel-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.search-queue-panel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 10px;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-panel-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notification-panel-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.notification-panel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
}

.notification-panel-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 42, 46, 0.14);
  border-radius: 16px;
  background: rgba(30, 29, 34, 0.66);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.notification-panel-item.notification-row-shell {
  min-height: 58px;
  padding: 10px 10px 10px 12px;
}

.notification-panel-item-title {
  font-size: 13px;
  font-weight: 700;
}

.notification-panel-item-meta,
.notification-panel-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.notification-panel-empty {
  padding: 12px;
}

.status-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  width: min(100%, var(--content-max));
  margin-right: auto;
  margin-left: auto;
}

.status-line {
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 18, 21, 0.72);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-push-line {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 18, 21, 0.42);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.control-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  width: min(100%, var(--content-max));
  margin: 10px auto 0;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.control-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-pill-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 154px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 18, 21, 0.58);
  overflow: hidden;
}

.control-pill-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: rgba(226, 211, 185, 0.26);
  box-shadow: inset 0 0 0 1px rgba(245, 231, 206, 0.18);
  transition: transform 220ms ease;
  z-index: 0;
}

.control-pill-group[data-active="offline"] .control-pill-thumb,
.control-pill-group[data-active="silent"] .control-pill-thumb {
  transform: translateX(100%);
}

.control-pill-group[data-active="none"] .control-pill-thumb {
  opacity: 0;
  transform: scaleX(0.82);
}

.control-pill-button {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    transform var(--ease);
}

.control-pill-button:hover {
  color: var(--text);
}

.control-pill-button:active,
.icon-button:active,
.composer-icon-button:active,
.scroll-to-bottom-button:active {
  transform: scale(0.97);
  filter: brightness(1.08);
}

.control-pill-button.active {
  color: var(--text);
  font-weight: 700;
}

.control-pill-group[data-variant="worker-visual"] .control-pill-thumb {
  background: rgba(42, 118, 66, 0.52);
  box-shadow: inset 0 0 0 1px rgba(144, 225, 171, 0.22);
}

.control-pill-group[data-variant="worker-visual"] .control-pill-button.active {
  color: #eef7f0;
}

.backup-restore-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.backup-restore-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(20, 21, 24, 0.58);
}

.backup-restore-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.backup-restore-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.backup-restore-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.backup-restore-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.backup-restore-input,
.backup-restore-select,
.backup-restore-textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(13, 14, 16, 0.86);
  color: var(--text);
  font: inherit;
}

.backup-restore-textarea {
  min-height: 88px;
  resize: vertical;
}

.backup-restore-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.backup-restore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.backup-restore-entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.backup-restore-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(14, 15, 17, 0.72);
}

.backup-restore-entry-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.backup-restore-entry-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.backup-restore-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.backup-restore-impact {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.backup-restore-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-tracker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.progress-tracker-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-tracker-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-tracker-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(42, 42, 46, 0.7);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.7);
}

.progress-tracker-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(126, 110, 87, 0.86),
    rgba(208, 195, 173, 0.88)
  );
  transition: width 520ms ease;
}

.system-status-list,
.voice-profile-list,
.search-queue-list,
.export-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.system-status-row,
.voice-profile-row,
.search-queue-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.34);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

/* v2 layout: title row + summary on separate lines, no collision */
.system-status-row-v2 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-height: unset;
  padding: 10px 13px;
}

.system-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-status-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.system-status-badge-green {
  color: rgba(128, 173, 132, 0.92);
}

.system-status-badge-orange {
  color: rgba(207, 158, 91, 0.92);
}

.system-status-badge-red {
  color: rgba(190, 104, 104, 0.92);
}

.worker-owner-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.worker-owner-pill + .system-status-badge {
  margin-left: 0;
}

.worker-owner-pill.owner-founder {
  color: rgba(211, 168, 255, 0.98);
  background: rgba(117, 63, 174, 0.22);
  border-color: rgba(178, 116, 255, 0.26);
}

.worker-owner-pill.owner-mathew {
  color: rgba(119, 228, 217, 0.96);
  background: rgba(28, 118, 123, 0.2);
  border-color: rgba(108, 224, 215, 0.24);
}

.worker-owner-pill.owner-temporary {
  color: rgba(250, 191, 99, 0.98);
  background: rgba(179, 103, 21, 0.2);
  border-color: rgba(242, 171, 78, 0.26);
}

.worker-owner-pill.owner-unknown {
  color: rgba(190, 190, 196, 0.9);
  background: rgba(132, 134, 142, 0.16);
  border-color: rgba(190, 190, 196, 0.16);
}

.system-status-summary-block {
  margin-left: 16px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.settings-compact-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.ai-role-status-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* Multi-line role label — top-align the status dot with the first line */
.ai-role-status-list .settings-compact-status-row {
  align-items: flex-start;
  padding-top: 4px;
  padding-bottom: 4px;
}

.ai-role-status-meta span:last-child {
  color: rgba(167, 160, 149, 0.84);
  font-size: 10px;
  font-weight: 600;
}

.status-dot-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-dot-label.ready {
  color: rgba(128, 173, 132, 0.92);
}

.status-dot-label.pending {
  color: rgba(207, 158, 91, 0.92);
}

.voice-profile-row {
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
}

.system-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(208, 195, 173, 0.7);
}

.system-status-dot.green {
  background: rgba(128, 173, 132, 0.92);
}

.system-status-dot.orange {
  background: rgba(207, 158, 91, 0.92);
}

.system-status-dot.red {
  background: rgba(190, 104, 104, 0.92);
}

.system-status-name,
.voice-profile-label,
.search-queue-label,
.export-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
}

.system-status-summary {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.system-status-current-state {
  margin: -2px 0 2px 22px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(9, 9, 10, 0.38);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}

.worker-device-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: -2px 0 6px 22px;
}

.worker-device-shell {
  margin: 0 0 8px;
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.18);
}

.worker-device-shell.owner-founder {
  box-shadow: inset 3px 0 0 rgba(178, 116, 255, 0.62);
}

.worker-device-shell.owner-mathew {
  box-shadow: inset 3px 0 0 rgba(108, 224, 215, 0.58);
}

.worker-device-shell.owner-temporary {
  box-shadow: inset 3px 0 0 rgba(242, 171, 78, 0.62);
}

.worker-device-shell.owner-unknown {
  box-shadow: inset 3px 0 0 rgba(190, 190, 196, 0.24);
}

.worker-device-shell[open] {
  background: rgba(12, 12, 14, 0.08);
}

.worker-device-shell > summary {
  list-style: none;
  cursor: pointer;
}

.worker-device-shell > summary::-webkit-details-marker {
  display: none;
}

.worker-device-summary {
  position: relative;
  padding-right: 34px;
}

.worker-device-summary::after {
  content: "›";
  position: absolute;
  right: 12px;
  top: 12px;
  color: rgba(232, 232, 234, 0.52);
  font-size: 22px;
  font-weight: 650;
  transform: rotate(90deg);
  transition: transform var(--ease), color var(--ease);
}

.worker-device-shell[open] .worker-device-summary::after {
  transform: rotate(-90deg);
  color: rgba(232, 232, 234, 0.78);
}

.worker-device-block {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 9, 10, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.worker-device-block-title {
  margin-bottom: 8px;
  color: rgba(232, 232, 234, 0.92);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.worker-device-block-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.worker-device-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.worker-device-row-label {
  color: rgba(167, 160, 149, 0.82);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.worker-device-row-value {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.system-status-current-state-compact {
  margin-bottom: 6px;
  padding: 7px 11px;
  font-size: 10px;
  line-height: 1.5;
}

.system-status-debug-line {
  margin: 4px 0 2px 22px;
  color: rgba(167, 160, 149, 0.82);
  font-size: 10px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

/* System completion checklist */
.system-checklist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.system-checklist-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(12, 12, 14, 0.34);
}

.system-checklist-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-checklist-status-icon {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
}

.system-checklist-label {
  font-size: 12px;
  font-weight: 760;
  color: var(--text);
  letter-spacing: 0.01em;
}

.system-checklist-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.settings-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(12, 12, 14, 0.42);
  color: rgba(218, 212, 201, 0.9);
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.settings-action-button:hover:not(:disabled) {
  color: var(--text);
  background: rgba(208, 195, 173, 0.1);
}

.settings-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.settings-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.settings-control-card {
  gap: 8px;
}

/* Founder LIVE EDIT 2026-05-01 (chat. TikToke / Netbics native settings
   redesign): the prior implementation rendered every entry as a raw
   <a> link (settings-toggle-row tiktoke-admin-link) which Founder
   flagged as link soup. New structure uses chat-native expandable
   <details> cards with real form controls inside, matching the
   visual language of General / Security / Worker Devices etc.
   tiktoke-admin-row is the expandable card; tiktoke-admin-row-summary
   is the always-visible header; tiktoke-admin-row-body is the
   expanded controls panel. tiktoke-admin-field carries each labeled
   form control. tiktoke-admin-bridge-button is the secondary "Open
   in /demo" link styled as a chat-native action button (no underline,
   no hint paragraph). */
/* Founder LIVE EDIT 2026-05-01 (REBUILD ADMIN MENUS — chat. native dark
   theme parity): the prior tiktoke-admin-* rules used cream paper +
   leaf-green leaf-deep colors (TikToke-platform palette). Founder's
   exact follow-up: "Make sure the chat. settings aren't using
   different color schemes. Use the EXACT SAME style as the rest of
   the settings." Below rules now mirror the chat-native
   .settings-section / .settings-control-card / .settings-section-toggle
   visual language: dark surface gradient, --line hairline borders,
   --text light foreground, --muted secondary, --accent warm cream
   highlight. The TikToke / Netbics drilled-in body now reads as a
   native chat. settings panel — no leaf-green/cream bleed-through. */
.tiktoke-admin-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.tiktoke-admin-row {
  position: relative;
  border-radius: 24px;
  border: 0;
  background: linear-gradient(
    180deg,
    rgba(32, 31, 34, 0.66),
    rgba(20, 20, 22, 0.7)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.026),
    0 16px 36px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}
.tiktoke-admin-row[open] {
  background: linear-gradient(
    180deg,
    rgba(38, 37, 41, 0.78),
    rgba(24, 24, 26, 0.82)
  );
}
.tiktoke-admin-row-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: grid;
  gap: 3px;
  user-select: none;
  color: var(--text);
}
.tiktoke-admin-row-summary::-webkit-details-marker { display: none; }
.tiktoke-admin-row-summary::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 650;
  color: rgba(232, 232, 234, 0.52);
  transition: transform .18s ease, color .18s ease;
}
.tiktoke-admin-row[open] .tiktoke-admin-row-summary::after {
  transform: translateY(-50%) rotate(90deg);
  color: var(--text);
}
.tiktoke-admin-row-title {
  font-weight: 650;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0;
}
.tiktoke-admin-row-subtitle {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}
.tiktoke-admin-row-body {
  padding: 6px 16px 16px;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}
.tiktoke-admin-field {
  display: grid;
  gap: 4px;
}
.tiktoke-admin-field-label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.tiktoke-admin-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 18, 20, 0.82);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.tiktoke-admin-select:focus {
  outline: none;
  border-color: rgba(208, 195, 173, 0.38);
  box-shadow: 0 0 0 3px rgba(208, 195, 173, 0.16);
}
.tiktoke-admin-bridge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.tiktoke-admin-bridge-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(26, 26, 29, 0.72);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .12s;
}
.tiktoke-admin-bridge-button:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(208, 195, 173, 0.28);
  transform: translateY(-1px);
}
.tiktoke-admin-bridge-button-secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}
.tiktoke-admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tiktoke-admin-action-button {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(26, 26, 29, 0.72);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
}
.tiktoke-admin-action-button-primary {
  background: var(--accent);
  color: #1a1a1c;
  border-color: var(--accent);
}
.tiktoke-admin-action-button-primary:hover {
  filter: brightness(1.05);
}
.tiktoke-admin-action-button:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(208, 195, 173, 0.28);
  transform: translateY(-1px);
}
.tiktoke-admin-row-status {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
  min-height: 14px;
}
.tiktoke-admin-row-status[data-state="ok"] { color: var(--accent); }
.tiktoke-admin-row-status[data-state="warn"] { color: #e0b56b; }
.tiktoke-admin-row-status[data-state="error"] { color: #ff9d9d; }
.tiktoke-admin-row-status[data-state="info"] { color: var(--text); }

/* Founder LIVE EDIT 2026-05-01 (REBUILD ADMIN MENUS — bottom-anchored
   Save / Apply for everyone in TikToke / Netbics drill-in): the
   chat. surface keeps a Save + Apply for everyone pair OUTSIDE any
   sub-row, mirroring the floating /demo panel. Below rule gives that
   row a hairline top border + tighter layout so it reads as a sticky
   footer rather than a third-tier card. */
.tiktoke-admin-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.tiktoke-admin-bottom-actions .tiktoke-admin-row-status {
  flex: 1 0 100%;
  margin-top: 4px;
  text-align: left;
}
/* Pass: WEBSITE-ADMIN-COMMAND-CENTRE — sticky Save/Apply Storewide
   bar in the chat-side TikToke/Netbics drill-in. The settings panel
   is the scroll container; the bottom-actions stay pinned at the
   bottom while rows scroll above. Opaque background so settings
   bleed-through doesn't compete with the buttons. Safe-area padding
   for iPhone home indicator. */
.tiktoke-admin-bottom-actions[data-tk-sticky="true"] {
  position: sticky;
  bottom: 0;
  background: var(--bg, #0d1117);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  z-index: 6;
  box-shadow: 0 -8px 12px -8px rgba(0, 0, 0, 0.45);
}

/* ADMIN SETTINGS MUST NEVER BE LINKED OUT. ALL SETTINGS MUST BE
   EDITABLE INLINE. NO REDIRECTS. NO PLACEHOLDERS.
   Founder LIVE EDIT 2026-05-01 (REMOVE LAZY ADMIN LINKS — INLINE ALL
   SETTINGS): styles for the new inline control kinds (range / toggle
   / textarea / inline spin wheel campaign list / inline moderation
   action row). Kept on chat-native dark surface tokens so they read
   as part of the surrounding settings drill-in. */
.tiktoke-admin-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
}
.tiktoke-admin-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}
.tiktoke-admin-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(208, 195, 173, 0.16);
}
.tiktoke-admin-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(208, 195, 173, 0.16);
}
.tiktoke-admin-range-output {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  text-align: right;
  padding: 4px 6px;
  background: rgba(18, 18, 20, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tiktoke-admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 18, 20, 0.82);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.tiktoke-admin-toggle-row input[type="checkbox"] {
  appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.tiktoke-admin-toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--text);
  transition: transform .15s;
}
.tiktoke-admin-toggle-row input[type="checkbox"]:checked {
  background: var(--accent);
}
.tiktoke-admin-toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(16px);
  background: #1a1a1c;
}
textarea.tiktoke-admin-select {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  line-height: 1.5;
}
.tiktoke-admin-spin-wheel-inline,
.tiktoke-admin-legal-inline,
.tiktoke-admin-moderation-inline {
  display: grid;
  gap: 14px;
}
.tiktoke-admin-spin-wheel-campaign {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(26, 26, 29, 0.55);
}
.tiktoke-admin-spin-wheel-section {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 18, 20, 0.6);
}

.settings-sales-system-group {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.settings-sales-system-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(210, 197, 177, 0.32),
    transparent
  );
}

.settings-sales-system-header {
  display: grid;
  gap: 4px;
  padding: 0 2px;
}

.settings-sales-system-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-sales-system-hint {
  color: rgba(219, 212, 198, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.settings-sales-system-body {
  display: grid;
  gap: 12px;
}

.sales-assist-preference-textarea {
  min-height: 104px;
}

.sales-tracker-list,
.sales-assist-tracker-inline {
  display: grid;
  gap: 10px;
}

.sales-tracker-card {
  border: 1px solid rgba(210, 197, 177, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: rgba(8, 9, 12, 0.48);
}

.sales-tracker-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sales-tracker-card-title-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sales-tracker-card.top-contributor,
.sales-global-tracker-summary {
  border-color: rgba(74, 222, 128, 0.28);
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 38%),
    rgba(8, 9, 12, 0.54);
}

.sales-tracker-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sales-tracker-kpi {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(210, 197, 177, 0.1);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.sales-tracker-kpi span {
  color: rgba(219, 212, 198, 0.68);
  font-size: 11px;
}

.sales-tracker-kpi strong {
  color: var(--text);
  font-size: 14px;
}

@media (max-width: 680px) {
  .sales-tracker-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.sales-tracker-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.sales-tracker-meta,
.sales-tracker-payout,
.sales-tracker-empty {
  color: rgba(219, 212, 198, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.sales-tracker-progress {
  height: 8px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.sales-tracker-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #86efac);
}

.sales-tracker-progress-row {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.sales-tracker-progress-label,
.sales-simulation-item {
  color: rgba(219, 212, 198, 0.76);
  font-size: 12px;
  line-height: 1.45;
}

.sales-simulation-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.sales-pay-explain-button {
  width: fit-content;
  margin-bottom: 8px;
}

.sales-profile-pay-button {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.sales-pay-popup-overlay,
.sales-assist-entry-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(12px);
}

.sales-pay-popup,
.sales-assist-entry-modal {
  width: min(760px, 100%);
  max-height: min(86dvh, 820px);
  overflow: auto;
  border: 1px solid rgba(210, 197, 177, 0.16);
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 34%),
    rgba(11, 12, 16, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.sales-pay-title,
.sales-assist-modal-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 24px;
}

.sales-pay-subtitle,
.sales-pay-section-title {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sales-pay-section-title {
  letter-spacing: 0.02em;
  text-transform: none;
}

.sales-pay-copy,
.sales-assist-modal-copy,
.sales-assist-result-copy {
  color: rgba(225, 216, 202, 0.78);
  font-size: 14px;
  line-height: 1.55;
}

.sales-pay-popup table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  color: var(--text);
  font-size: 13px;
  min-width: 620px;
}

.sales-pay-popup th,
.sales-pay-popup td {
  border: 1px solid rgba(210, 197, 177, 0.14);
  padding: 9px;
  text-align: left;
}

.sales-pay-popup table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

.sales-pay-popup tbody,
.sales-pay-popup thead,
.sales-pay-popup tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.sales-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sales-pay-got-it {
  border-color: rgba(74, 222, 128, 0.38);
  background: rgba(34, 197, 94, 0.18);
}

@media (max-width: 680px) {
  .sales-tracker-card-header {
    display: grid;
  }

  .sales-profile-pay-button {
    width: 100%;
  }

  .sales-pay-popup {
    padding: 14px;
  }

  .sales-pay-title {
    font-size: 21px;
  }

  .sales-pay-popup table {
    font-size: 12px;
    min-width: 560px;
  }
}

.sales-pay-close,
.sales-assist-modal-close,
.sales-assist-modal-primary,
.sales-assist-choice-button,
.sales-assist-change-style,
.sales-assist-back-button {
  border: 1px solid rgba(207, 194, 174, 0.14);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.sales-assist-modal-primary {
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.8), rgba(34, 197, 94, 0.4));
}

.sales-assist-choice-list,
.sales-assist-count-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.sales-assist-custom-style-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: rgba(225, 216, 202, 0.82);
  font-size: 13px;
  font-weight: 850;
}

.sales-assist-custom-style-field.active .sales-assist-custom-style-input {
  border-color: rgba(134, 239, 172, 0.62);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.sales-assist-custom-style-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(210, 197, 177, 0.16);
  border-radius: 16px;
  padding: 11px 12px;
  min-height: 92px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.sales-assist-loading-stages {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.sales-assist-loading-stage {
  border: 1px solid rgba(210, 197, 177, 0.12);
  border-radius: 999px;
  padding: 9px 12px;
  color: rgba(225, 216, 202, 0.62);
  background: rgba(255, 255, 255, 0.045);
}

.sales-assist-loading-stage.complete {
  color: rgba(187, 247, 208, 0.86);
  border-color: rgba(74, 222, 128, 0.36);
}

.sales-assist-loading-stage.active {
  color: var(--text);
  border-color: rgba(134, 239, 172, 0.68);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.32), rgba(34, 197, 94, 0.12));
}

.sales-assist-choice-button.active,
.sales-assist-tool-button.active {
  border-color: rgba(134, 239, 172, 0.72);
  background: rgba(22, 163, 74, 0.28);
}

.chatgpt-usage-summary {
  border: 1px solid rgba(208, 195, 173, 0.1);
  background: linear-gradient(
      180deg,
      rgba(16, 17, 21, 0.88),
      rgba(10, 11, 15, 0.94)
    ),
    rgba(18, 18, 20, 0.5);
}

.settings-action-button.destructive-action {
  background: rgba(115, 42, 42, 0.36);
  color: rgba(248, 222, 222, 0.92);
}

.settings-action-button.destructive-action:hover:not(:disabled) {
  background: rgba(143, 52, 52, 0.5);
  color: rgba(255, 238, 238, 0.98);
}

.test-site-preview-card {
  margin-top: 10px;
  border: 1px solid rgba(208, 195, 173, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(
    180deg,
    rgba(25, 25, 29, 0.82),
    rgba(15, 15, 18, 0.92)
  );
  color: rgba(238, 233, 224, 0.94);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.chatgpt-helper-drawer {
  --chatgpt-helper-height: 620px;
  position: relative;
  z-index: 4;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-height: 320px;
  height: var(--chatgpt-helper-height);
  margin: 0;
  border-top: 1px solid rgba(208, 195, 173, 0.14);
  border-bottom: 1px solid rgba(208, 195, 173, 0.08);
  background: radial-gradient(
      circle at top left,
      rgba(190, 167, 134, 0.11),
      transparent 28%
    ),
    linear-gradient(180deg, rgba(16, 17, 20, 0.96), rgba(8, 8, 10, 0.985));
  box-shadow:
    0 -18px 40px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
  overflow: hidden;
  isolation: isolate;
  transition:
    height 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.chatgpt-helper-drawer.hidden {
  display: none;
}

.chatgpt-helper-handle {
  position: relative;
  flex: 0 0 18px;
  width: 100%;
  cursor: ns-resize;
  touch-action: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0)
  );
}

.chatgpt-helper-handle::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 72px;
  height: 5px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(214, 201, 181, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.chatgpt-helper-drawer[data-resizing="true"] {
  transition: none;
  border-top-color: rgba(214, 201, 181, 0.32);
  box-shadow:
    0 -22px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.chatgpt-helper-keyboard-open .chatgpt-helper-drawer,
body.chatgpt-helper-keyboard-open .chatgpt-helper-body {
  scroll-behavior: auto;
}

body.chatgpt-helper-resizing {
  cursor: ns-resize;
  user-select: none;
}

.chatgpt-helper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(18px, env(safe-area-inset-right)) 14px
    max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(208, 195, 173, 0.08);
}

.chatgpt-helper-header-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.chatgpt-helper-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.chatgpt-helper-meta,
.chatgpt-helper-status,
.chatgpt-helper-field-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chatgpt-helper-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.chatgpt-helper-close {
  opacity: 0.84;
}

.chatgpt-helper-body {
  display: grid;
  grid-template-columns: minmax(360px, 748px) 14px minmax(320px, 1fr);
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
}

.chatgpt-helper-workspace,
.chatgpt-helper-sidebar {
  min-height: 0;
}

.chatgpt-helper-split-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  min-height: 14px;
  touch-action: none;
  background: rgba(208, 195, 173, 0.05);
  border-left: 1px solid rgba(208, 195, 173, 0.08);
  border-right: 1px solid rgba(208, 195, 173, 0.08);
  cursor: ew-resize;
}

.chatgpt-helper-split-divider-grip {
  width: 4px;
  height: 72px;
  border-radius: 999px;
  background: rgba(214, 201, 181, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body.chatgpt-helper-split-resizing {
  cursor: ew-resize;
  user-select: none;
}

body.chatgpt-helper-mobile-layout.chatgpt-helper-split-resizing {
  cursor: ns-resize;
}

.chatgpt-helper-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 18px 18px 18px max(18px, env(safe-area-inset-left));
}

.chatgpt-helper-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chatgpt-helper-workspace-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.chatgpt-helper-workspace-meta {
  max-width: 440px;
  color: rgba(219, 213, 202, 0.72);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.chatgpt-helper-workspace-viewport {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  border: 1px solid rgba(208, 195, 173, 0.12);
  border-radius: 22px;
  background: radial-gradient(
      circle at 15% 0%,
      rgba(179, 159, 130, 0.08),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(14, 15, 18, 0.98), rgba(8, 8, 11, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.2);
}

.chatgpt-helper-workspace-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(208, 195, 173, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.chatgpt-helper-workspace-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(208, 195, 173, 0.24);
}

.chatgpt-helper-workspace-label {
  margin-left: 4px;
  color: rgba(218, 212, 201, 0.72);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chatgpt-helper-workspace-host {
  display: flex;
  flex: 1 1 auto;
  min-height: min-content;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 24px;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(184, 161, 130, 0.1),
      transparent 32%
    ),
    linear-gradient(180deg, rgba(19, 21, 25, 0.95), rgba(10, 11, 15, 0.95));
}

.chatgpt-helper-workspace-host-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}

.chatgpt-helper-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chatgpt-helper-workspace-target-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(208, 195, 173, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.chatgpt-helper-workspace-target-label {
  color: rgba(233, 228, 220, 0.92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chatgpt-helper-workspace-target-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(208, 195, 173, 0.16);
  border-radius: 14px;
  background: rgba(8, 9, 12, 0.82);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.chatgpt-helper-workspace-target-input:focus {
  outline: none;
  border-color: rgba(214, 201, 181, 0.44);
  box-shadow: 0 0 0 1px rgba(214, 201, 181, 0.18);
}

.chatgpt-helper-workspace-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chatgpt-helper-workspace-target-status,
.chatgpt-helper-workspace-strategy {
  color: rgba(228, 223, 214, 0.74);
  font-size: 12px;
  line-height: 1.55;
}

.chatgpt-helper-workspace-host.session-active
  .chatgpt-helper-workspace-host-intro {
  opacity: 0.92;
}

.chatgpt-helper-workspace-frame-status {
  color: rgba(228, 223, 214, 0.74);
  font-size: 12px;
  line-height: 1.5;
}

.chatgpt-helper-workspace-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 320px;
  border: 1px solid rgba(208, 195, 173, 0.14);
  border-radius: 18px;
  background: rgba(9, 9, 11, 0.92);
}

.chatgpt-helper-workspace-host-title {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.chatgpt-helper-workspace-host-body {
  max-width: 620px;
  color: rgba(230, 224, 214, 0.78);
  font-size: 14px;
  line-height: 1.65;
}

.chatgpt-helper-workspace-mobile-note {
  display: none;
}

.chatgpt-helper-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: min-content;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 18px max(20px, env(safe-area-inset-right)) 18px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: rgba(10, 10, 13, 0.48);
}

.chatgpt-helper-current-chat-section,
.chatgpt-helper-format-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(208, 195, 173, 0.1);
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.5);
}

.chatgpt-helper-section-heading {
  color: rgba(230, 224, 214, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chatgpt-helper-current-chat {
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.4;
  word-break: break-word;
}

.chatgpt-helper-current-chat-meta {
  color: rgba(219, 213, 202, 0.64);
  font-size: 11px;
  line-height: 1.5;
}

.chatgpt-helper-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.chatgpt-helper-input,
.chatgpt-helper-textarea,
.chatgpt-helper-select {
  width: 100%;
  border: 1px solid rgba(208, 195, 173, 0.14);
  border-radius: 16px;
  padding: 11px 13px;
  background: rgba(8, 8, 10, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.chatgpt-helper-input[readonly] {
  color: rgba(231, 224, 213, 0.84);
}

.chatgpt-helper-textarea {
  resize: none;
  min-height: 0;
  overflow-y: auto;
}

.chatgpt-helper-reply-field .chatgpt-helper-textarea {
  min-height: 156px;
}

.chatgpt-helper-notes-field .chatgpt-helper-textarea,
.chatgpt-helper-notes {
  min-height: 88px;
}

.chatgpt-helper-format-textarea {
  min-height: 84px;
  color: rgba(229, 222, 210, 0.88);
  font-size: 12px;
  line-height: 1.5;
}

.chatgpt-helper-select {
  margin-top: 0;
}

.chatgpt-helper-controls-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chatgpt-helper-controls-row .settings-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.chatgpt-helper-controls-row .settings-action-button .ui-icon {
  width: 15px;
  height: 15px;
}

.chatgpt-helper-status {
  padding: 2px 2px 0;
  color: rgba(219, 213, 202, 0.76);
  font-size: 10.5px;
  line-height: 1.45;
}

.chatgpt-helper-copy-popup {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(183, 160, 128, 0.16);
  border: 1px solid rgba(208, 195, 173, 0.18);
  color: rgba(244, 237, 227, 0.94);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.chatgpt-helper-copy-popup.visible {
  opacity: 1;
  transform: translateY(0);
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.latest-idea-summary {
  width: 100%;
  resize: vertical;
  min-height: 86px;
  border: 0;
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(9, 9, 10, 0.48);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.conversation-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 0 max(10px, env(safe-area-inset-right)) 10px
    max(10px, env(safe-area-inset-left));
  overflow: hidden;
}

.sales-assist-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px max(12px, env(safe-area-inset-right)) 14px
    max(12px, env(safe-area-inset-left));
  overflow: hidden;
}

.sales-assist-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(180, 148, 255, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(132, 84, 255, 0.2), transparent 40%),
    rgba(11, 12, 16, 0.72);
}

.sales-assist-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.sales-assist-meta,
.sales-assist-status {
  color: rgba(225, 216, 202, 0.72);
  font-size: 12px;
}

.sales-assist-controls,
.sales-assist-split-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sales-assist-split-button,
.sales-assist-exit-button,
.sales-assist-back-button,
.sales-assist-tool-button {
  border: 1px solid rgba(207, 194, 174, 0.14);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.sales-assist-split-button.active,
.sales-assist-back-button:hover,
.sales-assist-tool-button:hover {
  border-color: rgba(147, 197, 253, 0.55);
  background: rgba(38, 92, 146, 0.26);
}

.sales-assist-panels {
  display: grid;
  grid-template-columns: repeat(var(--sales-assist-columns, 1), minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  overflow: auto;
}

.sales-style-dashboard-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(134, 239, 172, 0.2);
  border-radius: 20px;
  padding: 13px;
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.13), transparent 42%),
    rgba(10, 12, 16, 0.72);
}

.sales-style-dashboard-title {
  color: var(--text);
  font-weight: 950;
}

.sales-style-dashboard-copy,
.sales-assist-style-tip {
  margin: 0;
  color: rgba(225, 216, 202, 0.76);
  font-size: 12px;
  line-height: 1.45;
}

.sales-style-dashboard-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-style-dashboard-tip {
  border: 1px solid rgba(210, 197, 177, 0.12);
  border-radius: 999px;
  padding: 7px 9px;
  color: rgba(225, 216, 202, 0.82);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.sales-assist-shell[data-split-count="2"] .sales-assist-panels {
  --sales-assist-columns: 2;
}

.sales-assist-shell[data-split-count="3"] .sales-assist-panels {
  --sales-assist-columns: 3;
}

/* Pass 72 — Messenger-style Sales Assist inbox.
   Compact rows, single-column list on every viewport, grid for the
   3-cell row layout (avatar + body + meta). Detail view keeps the
   existing 1/2/3 panel split. */
.sales-assist-shell[data-view-mode="inbox"] .sales-assist-panels {
  --sales-assist-columns: 1;
  display: block;
  padding: 8px 0;
}
.sales-inbox {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sales-inbox-search-row {
  display: flex;
  padding: 0 12px;
}
.sales-inbox-search {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(210, 197, 177, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
}
.sales-inbox-search::placeholder {
  color: rgba(225, 216, 202, 0.42);
}
.sales-inbox-tabs {
  display: flex;
  gap: 6px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sales-inbox-tabs::-webkit-scrollbar { display: none; }
.sales-inbox-tab {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(210, 197, 177, 0.14);
  background: transparent;
  color: rgba(225, 216, 202, 0.78);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.sales-inbox-tab[data-active="true"] {
  background: rgba(58, 143, 90, 0.22);
  border-color: rgba(58, 143, 90, 0.55);
  color: #d8f3df;
}
.sales-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0 12px;
  background: rgba(255, 255, 255, 0.02);
}
.sales-inbox-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(210, 197, 177, 0.05);
}
.sales-inbox-row:hover,
.sales-inbox-row:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}
/* Pass: SALES-DASHBOARD-COMMAND-CENTRE — pinned "Sales Dashboard"
   row at the top of the inbox. Visually distinct so it never
   reads as a client/lead. Active state when no conversation is
   open. */
.sales-inbox-row--pinned-dashboard {
  background: linear-gradient(180deg, rgba(58, 143, 90, 0.10), rgba(58, 143, 90, 0.04));
  border-bottom: 1px solid rgba(58, 143, 90, 0.32);
  position: sticky;
  top: 0;
  z-index: 3;
}
/* Pass: SALES-COMMAND-CENTRE-PASS-2 — mobile Enter intro
   shown on first /sales load to non-founder salespeople. */
.sales-mobile-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 22px calc(env(safe-area-inset-bottom, 0px) + 28px);
  min-height: 60dvh;
  min-height: 60vh;
  align-items: stretch;
  justify-content: center;
  text-align: left;
  color: var(--text);
}
.sales-mobile-intro-heading {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: #d8f3df;
}
.sales-mobile-intro-sub {
  margin: 0;
  font-size: 14px;
  color: rgba(225, 216, 202, 0.7);
  line-height: 1.45;
}
.sales-mobile-intro-summary {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: rgba(225, 216, 202, 0.85);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sales-mobile-intro-enter {
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(58, 143, 90, 0.55);
  background: rgba(58, 143, 90, 0.32);
  color: #d8f3df;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 14px;
  cursor: pointer;
}
.sales-mobile-intro-enter:hover,
.sales-mobile-intro-enter:focus-visible {
  background: rgba(58, 143, 90, 0.45);
  outline: none;
}
.sales-inbox-row--pinned-dashboard[data-active="true"] {
  background: linear-gradient(180deg, rgba(58, 143, 90, 0.22), rgba(58, 143, 90, 0.10));
}
.sales-inbox-avatar--dashboard {
  background: rgba(58, 143, 90, 0.32);
  color: #d8f3df;
}
.sales-inbox-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(58, 143, 90, 0.7), rgba(58, 143, 90, 0.35));
  color: #082413;
  font-weight: 950;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.sales-inbox-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.sales-inbox-name {
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-inbox-preview {
  color: rgba(225, 216, 202, 0.62);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-inbox-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.sales-inbox-time {
  color: rgba(225, 216, 202, 0.5);
  font-size: 11px;
  font-weight: 700;
}
.sales-inbox-bubbles {
  display: inline-flex;
  gap: -6px;
}
.sales-inbox-bubble {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  color: #082413;
  border: 1.5px solid var(--bg, #0b0f15);
  margin-left: -4px;
}
.sales-inbox-bubble:first-child { margin-left: 0; }
.sales-inbox-empty {
  padding: 28px 16px;
  color: rgba(225, 216, 202, 0.5);
  font-size: 12px;
  text-align: center;
}
.sales-assist-detail-header {
  display: flex;
  align-items: center;
  padding: 0 12px 8px;
}
.sales-assist-inbox-back {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(210, 197, 177, 0.18);
  background: transparent;
  color: rgba(225, 216, 202, 0.85);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.sales-assist-inbox-back:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Pass 76 — Helper style picker + personalized loader + Qwen modal. */
.sales-helper-style-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sales-helper-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.sales-helper-style-chip {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(210, 197, 177, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.sales-helper-style-chip[data-active="true"] {
  background: rgba(58, 143, 90, 0.22);
  border-color: rgba(58, 143, 90, 0.55);
  color: #d8f3df;
}
.sales-helper-style-custom {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sales-helper-style-custom > span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(225, 216, 202, 0.55);
}
.sales-helper-style-custom-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(210, 197, 177, 0.18);
  font: inherit;
  resize: vertical;
}
.sales-loader-overlay { background: rgba(2, 6, 12, 0.92); }
.sales-loader-stages {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sales-loader-stage {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(210, 197, 177, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(225, 216, 202, 0.7);
  font-size: 12px;
  position: relative;
}
.sales-loader-stage[data-state="active"] {
  background: rgba(58, 143, 90, 0.22);
  border-color: rgba(58, 143, 90, 0.55);
  color: #d8f3df;
}
.sales-loader-stage[data-state="done"] {
  opacity: 0.6;
  border-color: rgba(58, 143, 90, 0.35);
}
.sales-loader-stage[data-state="done"]::after {
  content: "✓";
  position: absolute;
  right: 12px;
  color: rgba(58, 143, 90, 0.85);
  font-weight: 900;
}
.sales-qwen-modal { width: min(480px, 100%); }
.sales-qwen-routes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.sales-qwen-route {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(210, 197, 177, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.sales-qwen-route[data-active="true"] {
  background: rgba(58, 143, 90, 0.22);
  border-color: rgba(58, 143, 90, 0.65);
  outline: 2px solid rgba(58, 143, 90, 0.45);
}
.sales-qwen-route-label { font-weight: 800; font-size: 13px; }
.sales-qwen-route-meta {
  font-size: 11px;
  color: rgba(225, 216, 202, 0.55);
  font-style: italic;
}
.sales-qwen-send { margin-top: 6px; }
.sales-qwen-send:disabled { opacity: 0.45; cursor: not-allowed; }
.sales-dashboard-qwen-cta { display: flex; justify-content: flex-start; }

/* Pass 76 — per-conversation mode chips + Load 50 more. */
.sales-mode-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.sales-mode-chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(210, 197, 177, 0.18);
  background: transparent;
  color: rgba(225, 216, 202, 0.62);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sales-mode-chip[data-active="true"] {
  background: rgba(58, 143, 90, 0.22);
  border-color: rgba(58, 143, 90, 0.55);
  color: #d8f3df;
}
.sales-assist-load-more {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 999px;
  border: 1px dashed rgba(210, 197, 177, 0.22);
  background: transparent;
  color: rgba(225, 216, 202, 0.7);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.sales-assist-load-more:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Pass 75 — Sales eligibility gate (Canada/age check). */
.sales-eligibility-overlay {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 12, 0.78);
  backdrop-filter: blur(8px);
  padding: 16px;
}
.sales-eligibility-dialog {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(210, 197, 177, 0.18);
  background: rgba(15, 18, 24, 0.96);
  color: var(--text);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
}
.sales-eligibility-title {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.01em;
}
.sales-eligibility-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(225, 216, 202, 0.78);
}
.sales-eligibility-action {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(210, 197, 177, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.sales-eligibility-action:hover,
.sales-eligibility-action:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}
.sales-eligibility-action--primary {
  background: linear-gradient(135deg, rgba(58, 143, 90, 0.95), rgba(58, 143, 90, 0.7));
  border-color: rgba(58, 143, 90, 0.85);
  color: #082413;
}
.sales-eligibility-action--muted {
  opacity: 0.78;
}
.sales-eligibility-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(210, 197, 177, 0.22);
  font-size: 14px;
}
.sales-story-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(210, 197, 177, 0.18);
  font: inherit;
  resize: vertical;
}

/* Pass 75 — top brand-darker filter row (Unlisted/Listed/Clients). */
.sales-inbox-tabs--top {
  background: linear-gradient(180deg, rgba(31, 61, 44, 0.65), rgba(31, 61, 44, 0.45));
  padding: 8px 12px;
  border-bottom: 1px solid rgba(58, 143, 90, 0.32);
  margin-top: 4px;
}
.sales-inbox-tab--top {
  border-color: rgba(58, 143, 90, 0.35);
  color: #d8f3df;
  background: rgba(15, 27, 20, 0.55);
}
.sales-inbox-tab--top[data-active="true"] {
  background: rgba(58, 143, 90, 0.85);
  color: #082413;
  border-color: rgba(58, 143, 90, 0.95);
}
.sales-inbox-tab--top[data-locked="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.sales-inbox-tabs--bottom {
  background: rgba(58, 143, 90, 0.08);
  padding: 6px 12px;
}

/* Pass 75 — Founder story row + presence strip. */
.sales-inbox-story-presence {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px 4px;
}
.sales-inbox-stories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sales-inbox-stories::-webkit-scrollbar { display: none; }
.sales-story-add {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(58, 143, 90, 0.55);
  background: rgba(58, 143, 90, 0.12);
  color: #d8f3df;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.sales-story-add-icon { font-size: 14px; }
.sales-story-empty,
.sales-presence-empty {
  font-size: 11px;
  color: rgba(225, 216, 202, 0.52);
  font-style: italic;
}
.sales-story-item {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(58, 143, 90, 0.45);
  background: rgba(58, 143, 90, 0.18);
  color: #d8f3df;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.sales-inbox-presence {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.sales-presence-helper {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(58, 143, 90, 0.7), rgba(58, 143, 90, 0.35));
  color: #082413;
  border: 2px solid var(--bg, #0b0f15);
  position: relative;
}
.sales-presence-helper[data-status="idle"] {
  background: linear-gradient(135deg, rgba(180, 160, 110, 0.55), rgba(180, 160, 110, 0.25));
}
.sales-presence-helper::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  bottom: -1px;
  right: -1px;
  border: 2px solid var(--bg, #0b0f15);
}
.sales-presence-helper[data-status="idle"]::after { background: #d4a93f; }
.sales-presence-helper[data-status="offline"]::after { display: none; }

/* Pass 75 — mobile bottom utility strip.
   Founder: compact, fades into background, doesn't cover last row.
   Left = money/earnings, center = input/search, right = bot/helper.
   Only renders inside Sales Chat at viewport ≤720px. */
.sales-mobile-utility-strip {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
  margin-top: 12px;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.0) 0%, rgba(10, 12, 16, 0.78) 28%, rgba(10, 12, 16, 0.94) 100%);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}
.sales-mobile-utility-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(210, 197, 177, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(225, 216, 202, 0.85);
  cursor: pointer;
}
.sales-mobile-utility-btn:hover,
.sales-mobile-utility-btn:focus-visible {
  background: rgba(58, 143, 90, 0.22);
  border-color: rgba(58, 143, 90, 0.55);
  color: #d8f3df;
  outline: none;
}
.sales-mobile-utility-input {
  flex: 1 1 auto;
  width: auto;
  border-radius: 999px;
}

/* Pass 75 — phone-link badge on inbox rows. */
.sales-inbox-phone {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  color: #082413;
  background: linear-gradient(135deg, rgba(58, 143, 90, 0.85), rgba(58, 143, 90, 0.55));
}
.sales-inbox-phone[data-status="missing"] {
  background: rgba(220, 80, 80, 0.22);
  color: #ffb3b3;
  border: 1px dashed rgba(220, 80, 80, 0.55);
}

/* Pass 75 — embedded Sales Assist mode topbar cleanup.
   Founder: when Sales Chat is open in the chat shell:
     - menu/hamburger goes away, replaced by a back arrow
     - the chat status pills (Offline / Qwen / coin / last push)
       are hidden so the topbar is clean
     - the redundant purple Sales Assist body header is hidden
   The fullscreen pass already nukes everything; this pair is the
   subset for the embedded case so the regular chat shell still
   renders correctly when Sales is closed. */
/* Hide the chat hamburger / menu toggle in embedded Sales mode.
   It's the first .icon-button child of .top-bar; .top-bar-actions
   wraps the rest (notifications/sales/settings) so this selector
   only targets the menuToggle. */
.app-shell.app-shell-sales-embedded .top-bar > .icon-button:first-child {
  display: none !important;
}
.app-shell.app-shell-sales-embedded .sales-embedded-back.hidden {
  display: inline-flex !important;
}
.app-shell.app-shell-sales-embedded .status-bar,
.app-shell.app-shell-sales-embedded .sync-warning,
.app-shell.app-shell-sales-embedded .sync-inline-card,
.app-shell.app-shell-sales-embedded .chat-use-group,
.app-shell.app-shell-sales-embedded .system-use-group,
.app-shell.app-shell-sales-embedded .worker-visual-group,
.app-shell.app-shell-sales-embedded .sales-assist-header,
.app-shell.app-shell-sales-embedded .sales-assist-controls,
.app-shell.app-shell-sales-embedded .sales-assist-status {
  display: none !important;
}
.app-shell.app-shell-sales-embedded .header-title::after {
  content: "Sales Assist Mode";
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(225, 216, 202, 0.55);
}
/* Force the back button visible (overrides .hidden when set). */
.app-shell.app-shell-sales-embedded .sales-embedded-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Pass 75 — direct /sales is its OWN full-width container.
   Founder: "when I'm on the sales page I DON'T want to see anything
   from 'chat.': purple Sales button, chat menu, 'Back to chat',
   NOTHING. It is its own full width and height container."
   Hide every chat-shell artefact so the Sales Chat shell occupies
   the entire viewport. */
.app-shell.app-shell-sales-fullscreen .conversation-shell,
.app-shell.app-shell-sales-fullscreen .composer-shell,
.app-shell.app-shell-sales-fullscreen .sidebar,
.app-shell.app-shell-sales-fullscreen .top-bar,
.app-shell.app-shell-sales-fullscreen .header,
.app-shell.app-shell-sales-fullscreen .status-bar,
.app-shell.app-shell-sales-fullscreen .drawer-backdrop,
.app-shell.app-shell-sales-fullscreen .sales-assist-header,
.app-shell.app-shell-sales-fullscreen .sales-assist-back-button,
.app-shell.app-shell-sales-fullscreen .sales-assist-exit-button,
.app-shell.app-shell-sales-fullscreen .sales-assist-controls,
.app-shell.app-shell-sales-fullscreen .sales-assist-status,
.app-shell.app-shell-sales-fullscreen .icon-button.sales-assist-entry-button,
.app-shell.app-shell-sales-fullscreen .icon-button.notification-button,
.app-shell.app-shell-sales-fullscreen .settings-button,
.app-shell.app-shell-sales-fullscreen .menu-toggle {
  display: none !important;
}
.app-shell.app-shell-sales-fullscreen {
  padding: 0 !important;
  margin: 0 !important;
}
.app-shell.app-shell-sales-fullscreen .main-panel,
.app-shell.app-shell-sales-fullscreen .app-content-shell {
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.app-shell.app-shell-sales-fullscreen .sales-assist-shell {
  display: flex !important;
  flex: 1 1 auto;
  min-height: 100vh;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
}
.app-shell.app-shell-sales-fullscreen .sales-assist-panels {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* Pass 75 — desktop split: left third inbox / right two-thirds
   detail panel. Founder: list must remain visible when conversation
   opens. Active on /sales fullscreen at >=1024px. */
@media (min-width: 1024px) {
  .app-shell.app-shell-sales-fullscreen .sales-assist-shell[data-view-mode="detail"] .sales-assist-panels,
  .app-shell.app-shell-sales-fullscreen .sales-assist-shell[data-view-mode="inbox"] .sales-assist-panels,
  .app-shell.app-shell-sales-fullscreen .sales-assist-shell[data-view-mode="dashboard"] .sales-assist-panels {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
  }
  /* Inbox always renders into the left column. */
  .app-shell.app-shell-sales-fullscreen .sales-inbox {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    overflow-y: auto;
    border-right: 1px solid rgba(210, 197, 177, 0.08);
  }
  /* Detail header + panel articles go to the right column. Dashboard
     surface renders into right column too. */
  .app-shell.app-shell-sales-fullscreen .sales-assist-detail-header,
  .app-shell.app-shell-sales-fullscreen .sales-assist-panel,
  .app-shell.app-shell-sales-fullscreen .sales-style-dashboard-card,
  .app-shell.app-shell-sales-fullscreen .sales-dashboard {
    grid-column: 2 / 3;
  }
  .app-shell.app-shell-sales-fullscreen .sales-assist-detail-header {
    grid-row: 1 / 2;
  }
}

/* Pass 74 — Sales Dashboard surface.
   Distinct from Sales Reports (tracker tables) and Sales Chat
   (Messenger inbox). Operating cards: overview metrics, customers,
   helpers, bot personas, urgency, pending actions. */
.sales-assist-shell[data-view-mode="dashboard"] .sales-assist-panels {
  --sales-assist-columns: 1;
  display: block;
  padding: 12px;
}
.sales-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sales-dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}
.sales-dashboard-title {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.01em;
  color: var(--text);
}
.sales-dashboard-subtitle {
  margin: 0;
  font-size: 12px;
  color: rgba(225, 216, 202, 0.62);
}
.sales-dashboard-card {
  border: 1px solid rgba(210, 197, 177, 0.14);
  border-radius: 16px;
  padding: 12px;
  background: rgba(10, 12, 16, 0.74);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sales-dashboard-card-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(225, 216, 202, 0.55);
}
.sales-dashboard-card-body {
  color: var(--text);
  font-size: 13px;
  line-height: 1.42;
}
.sales-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}
.sales-dashboard-metric {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(210, 197, 177, 0.08);
}
.sales-dashboard-metric-value {
  font-size: 18px;
  font-weight: 900;
  color: #d8f3df;
}
.sales-dashboard-metric-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(225, 216, 202, 0.55);
}
.sales-dashboard-data-state {
  font-size: 12px;
  color: rgba(225, 216, 202, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sales-dashboard-data-note {
  margin: 0;
  font-style: italic;
}
.sales-dashboard-import-counts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-style: normal;
  color: var(--text);
}
.sales-dashboard-import-counts > span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(58, 143, 90, 0.12);
  border: 1px solid rgba(58, 143, 90, 0.32);
}
.sales-dashboard-import-counts b {
  color: #d8f3df;
  margin-right: 4px;
}
.sales-dashboard-helpers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sales-dashboard-helper-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(58, 143, 90, 0.7), rgba(58, 143, 90, 0.35));
  color: #082413;
  font-weight: 950;
  font-size: 11px;
}
.sales-dashboard-personas {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sales-dashboard-persona-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.sales-dashboard-persona-name {
  font-weight: 800;
  color: var(--text);
}
.sales-dashboard-persona-meta {
  color: rgba(225, 216, 202, 0.62);
  font-size: 12px;
}
.sales-dashboard-urgency {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sales-dashboard-urgency-slider {
  width: 100%;
}
.sales-dashboard-urgency-label {
  font-size: 12px;
  color: rgba(225, 216, 202, 0.78);
}
.sales-dashboard-actions {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: rgba(225, 216, 202, 0.85);
}

/* Pass 73 — Sales button dropdown (Dashboard / Sales Chat).
   Anchored under the Sales icon on desktop; bottom sheet on
   mobile. Closes on outside click and Escape. */
.sales-dropdown-menu {
  position: fixed;
  z-index: 4200;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(210, 197, 177, 0.18);
  background: rgba(15, 18, 24, 0.96);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}
.sales-dropdown-menu--mobile {
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  top: auto;
  min-width: 0;
  padding: 8px;
  border-radius: 18px;
  flex-direction: column;
  gap: 4px;
}
.sales-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.sales-dropdown-item:hover,
.sales-dropdown-item:focus-visible {
  background: rgba(58, 143, 90, 0.18);
  outline: none;
}
.sales-dropdown-item-icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  opacity: 0.85;
}
.sales-dropdown-item-label {
  flex: 1;
  min-width: 0;
}
@media (max-width: 720px) {
  .sales-dropdown-item {
    padding: 14px 16px;
    font-size: 14px;
  }
}
@media (max-width: 720px) {
  .sales-inbox-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 9px 12px;
  }
  .sales-inbox-avatar { width: 34px; height: 34px; font-size: 12px; }
  .sales-inbox-search { height: 36px; }
}

.sales-assist-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(210, 197, 177, 0.14);
  border-radius: 20px;
  padding: 14px;
  background: rgba(10, 12, 16, 0.74);
}

.sales-assist-panel-title {
  color: var(--text);
  font-weight: 900;
}

.sales-assist-panel-meta,
.sales-assist-reason,
.sales-assist-diagnosis,
.sales-assist-human-need {
  color: rgba(225, 216, 202, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.sales-assist-transcript {
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.sales-assist-message {
  display: grid;
  gap: 3px;
}

.sales-assist-speaker {
  color: rgba(196, 181, 253, 0.92);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sales-assist-message-text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.sales-assist-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.sales-assist-action-area {
  display: grid;
  gap: 8px;
}

.sales-assist-result-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(210, 197, 177, 0.12);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(225, 216, 202, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.sales-assist-result-title {
  color: var(--text);
  font-weight: 900;
}

.sales-assist-note-input,
.sales-assist-followup-input,
.sales-qwen-helper-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(210, 197, 177, 0.14);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.sales-qwen-helper-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(134, 239, 172, 0.24);
  border-radius: 20px;
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 40%),
    rgba(10, 12, 16, 0.82);
}

.sales-qwen-helper-header,
.sales-qwen-helper-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sales-qwen-helper-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-qwen-scope-choice,
.sales-qwen-send-button {
  border: 1px solid rgba(207, 194, 174, 0.14);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.sales-qwen-scope-choice.active {
  border-color: rgba(147, 197, 253, 0.72);
  background: rgba(37, 99, 235, 0.24);
}

.sales-qwen-send-button.primary {
  border-color: rgba(134, 239, 172, 0.48);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.82), rgba(34, 197, 94, 0.42));
}

.sales-qwen-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  background: rgba(255, 255, 255, 0.05);
}

.sales-qwen-helper-messages {
  display: grid;
  gap: 6px;
}

.sales-qwen-message {
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(225, 216, 202, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.sales-qwen-message.helper {
  background: rgba(59, 130, 246, 0.14);
}

.sales-assist-empty {
  padding: 18px;
  border: 1px dashed rgba(210, 197, 177, 0.18);
  border-radius: 18px;
  color: rgba(225, 216, 202, 0.72);
}

@media (max-width: 920px) {
  .sales-assist-shell[data-split-count="2"] .sales-assist-panels,
  .sales-assist-shell[data-split-count="3"] .sales-assist-panels {
    --sales-assist-columns: 1;
  }

  .sales-assist-header {
    flex-direction: column;
  }
}

.message-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 4px 20px;
  scroll-behavior: auto;
  overflow-anchor: none;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.scroll-to-bottom-button {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(45, 45, 50, 0.92);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition:
    background 0.15s,
    color 0.15s,
    opacity 0.2s;
  backdrop-filter: blur(6px);
  opacity: 1;
}

.scroll-to-bottom-button:hover {
  background: rgba(60, 60, 66, 0.96);
  color: #fff;
}

.scroll-to-bottom-button.hidden {
  opacity: 0;
  pointer-events: none;
}

.sync-warning {
  width: min(100%, var(--content-max));
  margin: 10px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 16px;
  background: rgba(120, 53, 15, 0.2);
}

/* Inside Connection Settings the panel fills the section naturally */
.settings-section-body .sync-warning {
  width: 100%;
  margin: 0;
}

.sync-warning-title {
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
}

.sync-warning-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 0;
}

.message-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
}

.message-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 1 auto;
  width: fit-content;
  min-width: 0;
  max-width: min(85%, 760px);
}

.message-item.user {
  justify-content: flex-end;
}

.message-item.user .message-stack {
  align-items: flex-end;
  margin-left: auto;
}

.message-item.gpt,
.message-item.claude,
.message-item.gemini,
.message-item.grok,
.message-item.assistant,
.message-item.ai-response-item,
.message-item.typing-item {
  justify-content: flex-start;
}

.message-item.ai-response-item .message-stack {
  width: 100%;
  max-width: 100%;
}

.message-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
  width: auto;
  min-width: min(180px, 100%);
  max-width: 100%;
  border: 1px solid rgba(42, 42, 46, 0.08);
  border-radius: 20px;
  padding: 12px 14px;
  background: rgba(20, 20, 23, 0.86);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition:
    transform var(--ease),
    box-shadow var(--ease);
}

.message-card.user {
  background: linear-gradient(
    180deg,
    rgba(54, 53, 59, 0.96),
    rgba(36, 36, 41, 0.97)
  );
  margin-left: auto;
  align-self: flex-end;
}

.ai-response-section {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--content-max));
  max-width: 100%;
  border: 0;
  border-left: 1px solid rgba(174, 166, 153, 0.22);
  border-radius: 0;
  padding: 14px 14px 16px 16px;
  color: var(--text);
  transition:
    border-color var(--ease),
    background var(--ease);
}

.ai-response-section.ai-alt-light {
  background: radial-gradient(
      circle at 0% 0%,
      rgba(191, 170, 141, 0.055),
      transparent 36%
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0));
}

.ai-response-section.ai-alt-dark {
  background: radial-gradient(
      circle at 0% 12%,
      rgba(89, 86, 78, 0.08),
      transparent 34%
    ),
    linear-gradient(90deg, rgba(8, 8, 10, 0.56), rgba(8, 8, 10, 0));
}

.ai-response-section.regenerating {
  border-left-color: rgba(208, 195, 173, 0.48);
}

.ai-response-section.regenerating .ai-response-body {
  opacity: 0.28;
}

.message-item.message-delivering .message-stack {
  transform: translateY(-1px);
}

.ai-response-section.delivering {
  border-left-color: rgba(219, 194, 150, 0.58);
  background:
    radial-gradient(
      circle at 0% 12%,
      rgba(216, 190, 146, 0.12),
      transparent 34%
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0));
  box-shadow: inset 0 0 0 1px rgba(216, 190, 146, 0.05);
}

.ai-response-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.ai-provider-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(218, 212, 201, 0.92);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.provider-brand-icon {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-provider-name {
  color: rgba(218, 212, 201, 0.9);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.ai-provider-role {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(208, 195, 173, 0.08);
  color: rgba(187, 179, 167, 0.88);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.ai-response-body {
  color: rgba(242, 240, 235, 0.94);
  font-size: var(--chat-font-size);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.ai-response-transcript {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.ai-response-transcript-plain {
  min-width: 0;
}

.ai-response-transcript-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 11px 12px 12px;
  background: rgba(18, 19, 23, 0.92);
  overflow: hidden;
}

.ai-response-transcript-run-card {
  background: #000;
  border-color: rgba(255, 255, 255, 0.16);
}

.ai-response-transcript-output-card {
  background: rgba(8, 10, 15, 0.98);
  border-color: rgba(255, 255, 255, 0.1);
}

.ai-response-transcript-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  min-width: 0;
}

.ai-response-transcript-run-head {
  align-items: flex-start;
}

.ai-response-transcript-head-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.ai-response-transcript-role {
  font-size: calc(var(--chat-font-size) - 4px);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(237, 243, 255, 0.72);
}

.ai-response-transcript-status {
  font-size: calc(var(--chat-font-size) - 4px);
  color: rgba(237, 243, 255, 0.62);
}

.ai-response-transcript-body-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-size: calc(var(--chat-font-size) - 4px);
}

.ai-response-transcript-output-text {
  font-style: italic;
}

.ai-response-transcript-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 243, 242, 0.86);
  padding: 0 0 0 10px;
  font: inherit;
  font-size: 1.05em;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.ai-response-transcript-output-group {
  margin-top: 10px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.ai-response-transcript-output-group[hidden] {
  display: none !important;
}

.bot-bringup-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 4px 0;
  color: rgba(218, 212, 201, 0.76);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bot-bringup-bar {
  color: rgba(208, 195, 173, 0.72);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.ai-response-body > *:first-child {
  margin-top: 0;
}

.ai-response-body > *:last-child {
  margin-bottom: 0;
}

.ai-response-paragraph {
  margin: 0 0 12px;
  white-space: pre-wrap;
}

.ai-response-heading {
  margin: 2px 0 9px;
  font-size: calc(var(--chat-font-size) + 2px);
  line-height: 1.28;
  color: #f5f1e9;
}

.ai-response-subheading {
  margin: 12px 0 7px;
  font-size: calc(var(--chat-font-size) + 1px);
  line-height: 1.3;
  color: rgba(232, 225, 214, 0.96);
}

.ai-response-list {
  margin: 0 0 12px 18px;
  padding: 0;
  list-style-position: outside;
}

.ai-response-list:not(.ai-response-numbered-list) {
  list-style-type: disc;
}

.ai-response-numbered-list {
  margin-left: 20px;
  list-style-type: decimal;
}

.ai-response-list li {
  margin: 5px 0;
  padding-left: 2px;
}

.ai-response-quote {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-left: 3px solid rgba(208, 195, 173, 0.42);
  border-radius: 12px;
  background: rgba(208, 195, 173, 0.07);
  color: rgba(226, 221, 211, 0.92);
}

.ai-response-code {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 42, 46, 0.12);
  border-radius: 12px;
  background: rgba(6, 6, 8, 0.72);
  color: rgba(242, 240, 235, 0.95);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: calc(var(--chat-font-size) - 1px);
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-response-divider {
  height: 1px;
  margin: 14px 0;
  border: 0;
  background: rgba(42, 42, 46, 0.16);
}

.message-regenerating-note {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(208, 195, 173, 0.16);
  border-radius: 999px;
  background: rgba(208, 195, 173, 0.08);
  color: rgba(218, 212, 201, 0.86);
  font-size: 11px;
  font-weight: 700;
}

.message-secondary-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-height: 22px;
  padding: 6px 0 0 2px;
  overflow: visible;
}

.message-secondary-actions::-webkit-scrollbar {
  display: none;
}

.message-item.user .message-secondary-actions {
  justify-content: flex-end;
  padding: 5px 4px 0 0;
}

.message-expand-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.message-expand-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  padding: 0;
  font: inherit;
  font-size: 0.9em;
  line-height: 1.2;
  cursor: pointer;
}

.message-action-timestamp {
  display: inline-flex;
  align-items: center;
  color: rgba(170, 166, 160, 0.72);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.message-redo-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.message-redo-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 34px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(208, 195, 173, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(170, 166, 160, 0.82);
  cursor: pointer;
  transition:
    border-color var(--ease),
    color var(--ease),
    background var(--ease),
    transform var(--ease);
}

.message-redo-trigger:hover,
.message-redo-trigger.open {
  color: var(--text);
  border-color: rgba(208, 195, 173, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.message-redo-trigger:hover {
  transform: translateY(-1px);
}

.message-redo-trigger .ui-icon {
  width: 14px;
  height: 14px;
}

.message-redo-trigger-arrow {
  font-size: 10px;
  line-height: 1;
  opacity: 0.72;
}

.message-redo-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 6px;
  border: 1px solid rgba(208, 195, 173, 0.12);
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.message-redo-menu-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(222, 216, 206, 0.88);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease);
}

.message-redo-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 242, 233, 0.98);
}

.message-redo-menu-item .ui-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.message-redo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  min-height: 24px;
  padding: 0 2px;
  background: transparent;
  color: rgba(170, 166, 160, 0.82);
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  transition:
    color var(--ease),
    opacity var(--ease);
}

.message-redo-button .ui-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.message-redo-button:hover,
.message-action-icon-button:hover {
  color: var(--text);
}

.message-action-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(170, 166, 160, 0.82);
  cursor: pointer;
  transition:
    color var(--ease),
    opacity var(--ease),
    transform var(--ease);
}

.message-action-icon-button:hover {
  transform: translateY(-1px);
}

.message-action-icon-button .ui-icon {
  width: 15px;
  height: 15px;
}

.composer-reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 2px;
  padding: 10px 12px;
  border: 1px solid rgba(142, 132, 118, 0.26);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(43, 41, 37, 0.88),
    rgba(28, 26, 23, 0.94)
  );
}

.composer-reply-label {
  flex: 0 0 auto;
  color: rgba(229, 224, 215, 0.9);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.composer-reply-preview {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(197, 189, 178, 0.9);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-reply-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(214, 207, 197, 0.88);
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    transform var(--ease);
}

.composer-reply-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 242, 233, 0.98);
  transform: translateY(-1px);
}

.composer-reply-dismiss .ui-icon {
  width: 14px;
  height: 14px;
}

.message-action-speaking {
  color: rgba(226, 221, 211, 0.96);
  opacity: 1;
}

.message-action-text-button {
  white-space: nowrap;
}

.message-action-trash {
  background: rgba(115, 42, 42, 0.32);
  color: rgba(248, 222, 222, 0.94);
  border-radius: 999px;
}

.message-action-trash:hover {
  background: rgba(143, 52, 52, 0.46);
  color: rgba(255, 238, 238, 0.98);
}

.message-redo-note-row {
  padding-top: 8px;
}

.message-redo-note-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 360px);
}

.message-redo-note-input {
  width: 100%;
  min-height: 44px;
  resize: none;
  border: 1px solid rgba(208, 195, 173, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(18, 18, 21, 0.9);
  color: var(--text);
  overflow: hidden;
}

.message-redo-note-actions {
  display: inline-flex;
  gap: 8px;
}

.message-redo-save-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-left: 2px;
}

.message-redo-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 0 4px;
}

.message-redo-picker-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-right: 2px;
  white-space: nowrap;
}

.message-redo-picker-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.message-redo-picker-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
}

.message-redo-picker-option .ui-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.message-role {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-action-trigger {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity var(--ease),
    background var(--ease),
    transform var(--ease);
}

.message-card:hover .message-action-trigger,
.message-card:focus-within .message-action-trigger,
.message-card.menu-active .message-action-trigger,
.message-card.editing .message-action-trigger,
.ai-response-section:hover .message-action-trigger,
.ai-response-section:focus-within .message-action-trigger,
.ai-response-section.menu-active .message-action-trigger {
  opacity: 1;
}

.message-edit-input {
  width: 100%;
  min-height: 72px;
  resize: none;
  border: 1px solid rgba(208, 195, 173, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  background: rgba(18, 18, 21, 0.94);
  color: var(--text);
  font-size: var(--chat-font-size);
  overflow: hidden;
}

.message-edit-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.message-item.user .message-edit-controls {
  margin-left: auto;
}

.message-edit-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.message-edit-button.primary {
  background: linear-gradient(180deg, #ded4c2 0%, #9d8f7a 100%);
  border-color: transparent;
  color: #111111;
}

.message-text {
  color: var(--text);
  font-size: var(--chat-font-size);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-hidden-visible .message-card {
  opacity: 0.48;
  filter: saturate(0.75);
}

.message-hidden-visible .ai-response-section {
  opacity: 0.48;
  filter: saturate(0.75);
}

.typing-card {
  align-items: center;
  flex-direction: row;
  gap: 6px;
  min-width: 112px;
  background: rgba(20, 20, 23, 0.78);
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 18px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.35;
  animation: typing-pulse 0.67s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-pulse {
  0%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.empty-state {
  flex: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 34px 18px 44px;
  text-align: center;
}

.empty-state-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(208, 195, 173, 0.1);
  color: var(--accent);
  font-size: 26px;
}

.empty-state-title {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.empty-state-body {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.sync-inline-card {
  align-self: center;
  width: min(100%, 560px);
  margin: 10px auto 8px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(14, 14, 17, 0.9);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}

.sync-inline-card.sync-inline-card-active {
  border-color: rgba(214, 191, 156, 0.22);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(214, 191, 156, 0.04);
}

.sync-inline-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.sync-inline-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.sync-inline-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.sync-pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.sync-pending-item {
  padding: 10px 12px;
  border: 1px dashed rgba(208, 195, 173, 0.16);
  border-radius: 14px;
  background: rgba(18, 18, 21, 0.48);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.sync-retry-button {
  min-height: 38px;
  border: 1px solid rgba(208, 195, 173, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(208, 195, 173, 0.1);
  color: var(--text);
  cursor: pointer;
  transition:
    transform var(--ease),
    background var(--ease),
    opacity var(--ease);
}

.sync-retry-button:hover {
  transform: translateY(-1px);
  background: rgba(208, 195, 173, 0.16);
}

.sync-retry-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.empty-state-suggestions,
.composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggestion-pill,
.tool-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.suggestion-pill {
  border: 1px solid rgba(42, 42, 46, 0.12);
  color: var(--muted);
}

.tool-pill {
  min-height: 38px;
  min-width: 38px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
}

.web-tool-pill {
  min-width: 38px;
  padding: 8px 10px;
  color: rgba(170, 166, 160, 0.92);
}

.composer-shell {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 8px max(10px, env(safe-area-inset-right))
    calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: linear-gradient(
    180deg,
    rgba(8, 8, 10, 0) 0%,
    rgba(8, 8, 10, 0.72) 20%,
    rgba(8, 8, 10, 0.96) 100%
  );
  backdrop-filter: blur(18px);
}

.composer-shell.composer-live-ready {
  background: linear-gradient(
    180deg,
    rgba(8, 8, 10, 0) 0%,
    rgba(8, 8, 10, 0.66) 20%,
    rgba(11, 11, 14, 0.98) 100%
  );
}

.composer-shell.composer-live-pending {
  box-shadow: inset 0 1px 0 rgba(214, 191, 156, 0.08);
}

.composer-shell.composer-live-blocked {
  background: linear-gradient(
    180deg,
    rgba(8, 8, 10, 0.08) 0%,
    rgba(8, 8, 10, 0.78) 22%,
    rgba(10, 10, 12, 0.99) 100%
  );
}

.composer-shell.composer-live-ready .composer {
  border-color: rgba(232, 223, 209, 0.12);
}

.composer-shell.composer-live-pending .composer {
  border-color: rgba(214, 191, 156, 0.22);
  background: rgba(21, 21, 25, 0.92);
  box-shadow: 0 0 0 1px rgba(214, 191, 156, 0.04);
}

.composer-shell.composer-live-blocked .composer {
  border-color: rgba(120, 116, 108, 0.16);
  background: rgba(15, 15, 18, 0.92);
}

.composer-note {
  width: min(100%, var(--content-max));
  margin: 0 auto 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.composer-shell.composer-live-pending .composer-note {
  color: rgba(219, 205, 180, 0.9);
}

.composer-control-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: min(100%, var(--content-max));
  margin: 0 auto 6px;
}

.voice-status-line {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: auto;
  min-width: 118px;
  margin: 0 2px 0 auto;
  padding-top: 5px;
  padding-right: 0;
  color: var(--muted);
}

.voice-status-timer {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.voice-status-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.1;
}

.voice-status-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(208, 195, 173, 0.85);
  box-shadow: 0 0 0 0 rgba(208, 195, 173, 0.45);
  animation: voice-ping 1.4s ease-out infinite;
}

.live-typing-lane {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  width: min(100%, var(--content-max));
  margin: 0 auto 8px;
  padding-inline: 2px;
}

.live-typing-row {
  display: block;
  width: auto;
  max-width: 100%;
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.live-typing-row.status-typing,
.live-typing-row.status-streaming,
.live-typing-row.status-retrying,
.live-typing-row.status-preparing {
  border-color: rgba(232, 223, 209, 0.06);
  background: rgba(255, 255, 255, 0.035);
}

.live-typing-row.status-queued {
  border-color: rgba(214, 191, 156, 0.12);
  background: rgba(214, 191, 156, 0.06);
}

.live-typing-content {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: auto;
  max-width: 100%;
}

.live-typing-provider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  color: rgba(218, 212, 201, 0.92);
  animation: provider-icon-pulse 1.35s ease-in-out infinite;
}

.live-typing-provider-icon .provider-brand-icon {
  width: 14px;
  height: 14px;
}

.live-typing-label {
  display: inline;
  color: rgba(218, 212, 201, 0.86);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.live-typing-status {
  display: inline;
  color: rgba(180, 175, 165, 0.76);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
}

.live-typing-row.status-queued .live-typing-provider-icon,
.live-typing-row.status-preparing .live-typing-provider-icon {
  animation: none;
  opacity: 0.72;
}

.composer-command-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(100%, var(--content-max));
  margin: 0 auto 10px;
}

.composer-image-queue,
.attachment-card-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: min(100%, var(--content-max));
  margin: 0 auto 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.attachment-card-row.sent {
  width: 100%;
  margin: 0 0 8px;
}

.message-item.ai-response-item .attachment-card-row.sent {
  justify-content: flex-start;
}

.attachment-card-row.sent .attachment-card {
  width: min(360px, 100%);
}

.attachment-card-row.sent .attachment-card.image {
  width: min(520px, 100%);
}

.message-item.user .attachment-card-row.sent {
  justify-content: flex-end;
}

.attachment-card {
  position: relative;
  flex: 0 0 auto;
  width: min(210px, 72vw);
  min-height: 58px;
}

.attachment-card.image {
  width: min(320px, 82vw);
}

.attachment-card-body {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 58px;
  padding: 7px 10px;
  border: 1px solid rgba(42, 42, 46, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.attachment-card-image,
.attachment-card-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.attachment-card.image .attachment-card-body {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.attachment-card.image .attachment-card-image {
  width: 100%;
  height: min(180px, 42vw);
}

.attachment-card-row.sent .attachment-card.image .attachment-card-image {
  height: min(260px, 46vw);
}

.attachment-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(170, 166, 160, 0.92);
  font-size: 22px;
}

.attachment-card-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.attachment-card-name,
.attachment-card-details {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-card-name {
  color: var(--text);
  font-weight: 700;
}

.attachment-card-details {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.attachment-remove-button,
.attachment-save-link {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(42, 42, 46, 0.18);
  border-radius: 999px;
  background: rgba(14, 14, 17, 0.94);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.attachment-save-link {
  color: rgba(218, 212, 201, 0.96);
}

.attachment-save-link .ui-icon {
  width: 14px;
  height: 14px;
}

.attachment-menu {
  display: flex;
  position: absolute;
  left: max(10px, calc(50% - 390px + 10px));
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 24;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  width: max-content;
  min-width: 196px;
  max-width: min(278px, calc(100vw - 24px));
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(42, 42, 46, 0.14);
  border-radius: 16px;
  background: rgba(17, 17, 20, 0.96);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.attachment-menu-option {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition:
    transform var(--ease),
    background var(--ease),
    border-color var(--ease);
}

.attachment-menu-option:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.045);
}

.attachment-menu-option .ui-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: rgba(170, 166, 160, 0.92);
}

.attachment-menu-option span,
.attachment-target-option span:last-child {
  white-space: nowrap;
}

.attachment-menu-arrow {
  margin-left: auto;
  color: rgba(170, 166, 160, 0.78);
  font-size: 16px;
  line-height: 1;
}

.attachment-target-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid rgba(42, 42, 46, 0.12);
}

.attachment-target-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 11px;
  padding: 0 12px;
  background: transparent;
  color: rgba(232, 225, 214, 0.92);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-align: left;
}

.attachment-target-option:hover {
  background: rgba(255, 255, 255, 0.045);
}

.attachment-target-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: rgba(170, 166, 160, 0.94);
}

.attachment-target-icon .provider-brand-icon {
  width: 15px;
  height: 15px;
}

.attachment-target-label {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(232, 225, 214, 0.92);
}

.attachment-target-role-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: rgba(170, 166, 160, 0.8);
}

.attachment-target-role-icon .ui-icon {
  width: 15px;
  height: 15px;
}

.attachment-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
}

.attachment-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(720px, 100%);
  max-height: min(760px, 90dvh);
  padding: 14px;
  border: 1px solid rgba(42, 42, 46, 0.16);
  border-radius: 24px;
  background: rgba(14, 14, 17, 0.96);
  box-shadow: var(--shadow);
}

.attachment-preview-header,
.attachment-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.attachment-preview-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 800;
}

.attachment-preview-close,
.attachment-preview-remove,
.attachment-preview-save {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(42, 42, 46, 0.14);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.attachment-preview-close {
  width: 36px;
  padding: 0;
}

.attachment-preview-save.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.attachment-preview-body {
  min-height: 0;
  overflow: auto;
}

.attachment-preview-image {
  display: block;
  width: 100%;
  max-height: 68dvh;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.attachment-preview-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 420px;
  border: 1px solid rgba(42, 42, 46, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.attachment-preview-file-icon {
  color: rgba(170, 166, 160, 0.92);
  font-size: 54px;
}

.attachment-preview-file-name {
  color: var(--text);
  font-weight: 800;
}

.attachment-preview-file-meta {
  color: var(--muted);
  font-size: 12px;
}

.composer-command-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(208, 195, 173, 0.18);
  border-radius: 999px;
  background: rgba(208, 195, 173, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.composer {
  display: grid;
  grid-template-columns: var(--tap) minmax(0, 1fr) var(--tap) var(--tap);
  align-items: end;
  gap: 10px;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(42, 42, 46, 0.12);
  border-radius: 24px;
  background: rgba(18, 18, 21, 0.88);
  box-shadow: var(--shadow);
}

.composer-tools {
  width: auto;
  margin: 0;
}

.composer-input,
.thread-rename-input {
  outline: none;
  resize: none;
  font: inherit;
}

.composer-input {
  border: 0;
  /* min-height and padding scale with chat font size so the caret stays
     vertically balanced when the founder changes font size or after refresh. */
  min-height: calc(var(--chat-font-size) * 1.7);
  max-height: 160px;
  padding: 0.62em 0;
  background: transparent;
  color: var(--text);
  font-size: var(--chat-font-size);
  line-height: 1.5;
  overflow-y: auto;
}

.composer-input:disabled {
  opacity: 0.46;
}

.composer-input::placeholder {
  color: var(--muted);
}

.composer-icon-button,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.composer-icon-button {
  background: transparent;
  color: rgba(170, 166, 160, 0.92);
}

.composer-icon-button.attachment-open {
  color: var(--text);
}

.composer-icon-button.voice-active {
  color: var(--text);
  animation: voice-pulse 1.3s ease-in-out infinite;
}

.composer-icon-button.voice-finalizing {
  color: var(--text);
}

.composer-icon-button.voice-unsupported {
  color: rgba(248, 113, 113, 0.92);
}

.send-button {
  background: transparent;
  color: rgba(170, 166, 160, 0.94);
  font-size: 18px;
}

.composer-shell.composer-live-ready .send-button:not(:disabled) {
  color: rgba(232, 223, 209, 0.98);
}

.composer-shell.composer-live-blocked .send-button,
.composer-shell.composer-live-blocked .composer-icon-button {
  opacity: 0.55;
}

.send-button:not(:disabled):hover {
  color: var(--text);
}

@keyframes voice-pulse {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes voice-ping {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(208, 195, 173, 0.32);
    opacity: 0.7;
  }

  50% {
    box-shadow: 0 0 0 6px rgba(208, 195, 173, 0);
    opacity: 1;
  }
}

@keyframes provider-icon-pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.98);
    color: rgba(218, 212, 201, 0.72);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
    color: rgba(244, 236, 221, 0.98);
  }
}

.new-chat-button:disabled,
.send-button:disabled,
.composer-icon-button:disabled,
.thread-menu-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

@media (min-width: 860px) {
  .main-panel {
    margin: max(12px, env(safe-area-inset-top)) auto
      max(12px, env(safe-area-inset-bottom));
    height: calc(
      var(--spyder-viewport-height) -
        max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom))
    );
    border: 1px solid rgba(42, 42, 46, 0.12);
    border-radius: 32px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  }

  .conversation-shell {
    padding-inline: 22px;
  }

  .header {
    padding-right: max(22px, env(safe-area-inset-right));
    padding-left: max(22px, env(safe-area-inset-left));
  }

  .message-card {
    max-width: min(72%, 760px);
    min-width: min(220px, 100%);
  }

  .empty-state {
    min-height: 100%;
  }
}

@media (max-width: 700px) {
  .sidebar {
    width: min(320px, 92vw);
  }

  .settings-panel {
    width: min(380px, 92vw);
  }

  .app-content-shell {
    width: 100%;
    overflow: hidden;
  }

  .main-panel {
    flex: 1 1 auto;
    min-height: 0;
  }

  .chatgpt-helper-drawer {
    min-height: 360px;
  }

  .chatgpt-helper-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(170px, 60fr) 14px minmax(170px, 40fr);
    overflow: hidden;
  }

  .chatgpt-helper-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chatgpt-helper-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .chatgpt-helper-workspace {
    padding: 14px max(12px, env(safe-area-inset-right)) 12px
      max(12px, env(safe-area-inset-left));
  }

  .chatgpt-helper-split-divider {
    min-width: 100%;
    min-height: 14px;
    border-left: 0;
    border-right: 0;
    border-top: 1px solid rgba(208, 195, 173, 0.08);
    border-bottom: 1px solid rgba(208, 195, 173, 0.08);
    cursor: ns-resize;
  }

  .chatgpt-helper-split-divider-grip {
    width: 72px;
    height: 4px;
  }

  .chatgpt-helper-workspace-header {
    flex-direction: column;
    gap: 8px;
  }

  .chatgpt-helper-workspace-meta {
    max-width: none;
    text-align: left;
  }

  .chatgpt-helper-workspace-viewport {
    min-height: 0;
  }

  .chatgpt-helper-workspace-host {
    min-height: 0;
    padding: 18px;
  }

  .chatgpt-helper-workspace-actions {
    flex-direction: column;
  }

  .chatgpt-helper-workspace-target-actions {
    flex-direction: column;
  }

  .chatgpt-helper-workspace-frame {
    min-height: 220px;
  }

  .chatgpt-helper-workspace-host-title {
    font-size: 21px;
  }

  .chatgpt-helper-workspace-host-body {
    max-width: none;
  }

  .chatgpt-helper-sidebar {
    grid-auto-rows: min-content;
    padding: 14px max(12px, env(safe-area-inset-right))
      calc(14px + env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    overflow-y: auto;
  }

  .chatgpt-helper-controls-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chatgpt-helper-controls-row .settings-action-button:last-child {
    grid-column: 1 / -1;
  }

  .chatgpt-helper-reply-field .chatgpt-helper-textarea {
    min-height: 128px;
  }

  .chatgpt-helper-notes-field .chatgpt-helper-textarea,
  .chatgpt-helper-notes {
    min-height: 84px;
  }

  .chatgpt-helper-format-textarea {
    min-height: 78px;
  }

  .header {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .status-line {
    max-width: calc(100vw - 36px);
    font-size: 10px;
  }

  .last-push-line {
    font-size: 11px;
  }

  .top-bar {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .top-bar-actions {
    gap: 6px;
  }

  .notification-entry-button {
    min-width: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  .settings-control-row {
    gap: 8px;
    padding: 12px 14px;
  }

  .settings-control-row .control-label {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .settings-control-row .control-pill-group {
    flex: 0 0 142px;
    min-width: 142px;
  }

  .settings-control-row .control-pill-button {
    padding: 0 12px;
    font-size: 11px;
  }

  .voice-status-line {
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    min-width: 108px;
    width: auto;
    margin-right: 0;
  }

  .voice-status-timer {
    font-size: 13px;
  }

  .voice-status-meta {
    font-size: 11px;
  }

  .composer-control-row {
    width: 100%;
  }

  .composer-control-row .composer-tools {
    width: auto;
  }

  .conversation-shell {
    padding-right: max(6px, env(safe-area-inset-right));
    padding-left: max(6px, env(safe-area-inset-left));
  }

  .message-scroll {
    padding-inline: 2px;
  }

  .message-card {
    max-width: 88%;
    min-width: min(150px, 100%);
    padding: 12px 13px;
    border-radius: 16px;
  }

  .message-stack {
    max-width: 88%;
  }

  .message-item.ai-response-item .message-stack {
    max-width: 100%;
  }

  .message-action-trigger {
    opacity: 0.85;
  }

  .empty-state {
    min-height: 100%;
    padding-top: 36px;
  }

  .empty-state-title {
    font-size: 26px;
  }

  .suggestion-pill {
    width: 100%;
  }

  .composer {
    grid-template-columns: 40px minmax(0, 1fr) 40px 40px;
    gap: 8px;
    padding: 9px;
    border-radius: 22px;
  }

  .attachment-menu {
    position: absolute;
    left: max(10px, env(safe-area-inset-left));
    bottom: calc(82px + env(safe-area-inset-bottom));
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    border-radius: 16px;
    width: max-content;
    min-width: 196px;
    max-width: min(
      278px,
      calc(
        100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)
      )
    );
    margin: 0;
  }

  .search-queue-panel {
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: min(
      286px,
      calc(
        100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)
      )
    );
  }

  .attachment-menu-option {
    justify-content: flex-start;
    text-align: left;
  }

  .attachment-card-row {
    padding-bottom: 2px;
  }

  .attachment-card {
    width: min(220px, 74vw);
  }

  .attachment-preview-panel {
    max-height: 88dvh;
    border-radius: 22px;
  }

  .sync-inline-card,
  .sync-warning,
  .message-list,
  .empty-state,
  .composer-command-chips,
  .composer-image-queue,
  .live-typing-lane,
  .composer-note,
  .composer,
  .top-bar,
  .status-bar {
    width: 100%;
  }
}
