.open-dash-name { font-family: var(--f-display); font-size: 16px; color: var(--gold-metal-1); letter-spacing: 0.04em; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.open-dash-meta { font-family: var(--f-mono); font-size: 10px; color: var(--smoke4); letter-spacing: 0.04em; }
.open-overdue-text { color: var(--red-lt); font-weight: 600; }

.open-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.open-stat { padding: 14px 12px; background: rgba(20,28,48,0.5); border: 1px solid rgba(160,120,32,0.20); border-radius: 6px; text-align: center; }
.open-stat-num { font-family: var(--f-display); font-size: 24px; color: var(--gold-metal-1); }
.open-stat-num.open-stat-progress { color: var(--gold-metal-2); }
.open-stat-num.open-stat-blocked { color: var(--red-lt); }
.open-stat-num.open-stat-mine { color: var(--gold-lt); }
.open-stat-label { font-family: var(--f-mono); font-size: 9px; color: var(--smoke4); letter-spacing: 0.10em; text-transform: uppercase; margin-top: 4px; }

.open-filter-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; padding: 10px 4px; }
.open-chip { padding: 7px 14px; background: rgba(160,120,32,0.04); border: 1px solid rgba(160,120,32,0.25); color: var(--smoke3); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em; border-radius: 14px; cursor: pointer; transition: all 0.12s; }
.open-chip:hover { background: rgba(160,120,32,0.10); color: var(--smoke); }
.open-chip.active { background: rgba(160,120,32,0.20); border-color: rgba(160,120,32,0.65); color: var(--gold-metal-1); }

.open-empty-filter { padding: 30px; text-align: center; font-family: var(--f-mono); font-size: 11px; color: var(--smoke4); }

.open-phases { display: flex; flex-direction: column; gap: 14px; }
.open-phase { background: rgba(20,28,48,0.4); border: 1px solid rgba(160,120,32,0.20); border-radius: 8px; overflow: hidden; }
.open-phase-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(20,28,48,0.6); border-bottom: 1px solid rgba(160,120,32,0.15); }
.open-phase-name { font-family: var(--f-display); font-size: 14px; color: var(--gold-metal-1); letter-spacing: 0.05em; }
.open-phase-count { font-family: var(--f-mono); font-size: 10px; color: var(--smoke4); letter-spacing: 0.04em; }
.open-phase-items { display: flex; flex-direction: column; }

.open-milestone { border-bottom: 1px solid rgba(160,120,32,0.10); transition: background 0.12s; }
.open-milestone:last-child { border-bottom: none; }
.open-milestone:hover { background: rgba(160,120,32,0.04); }
.open-milestone-head { display: grid; grid-template-columns: 8px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.open-milestone-status-dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; flex-shrink: 0; }
.open-milestone.open-status-notstarted .open-milestone-status-dot { background: rgba(255,255,255,0.20); }
.open-milestone.open-status-inprogress .open-milestone-status-dot { background: var(--gold-metal-2); box-shadow: 0 0 6px rgba(160,120,32,0.50); }
.open-milestone.open-status-blocked .open-milestone-status-dot { background: var(--red-lt); }
.open-milestone.open-status-completed .open-milestone-status-dot { background: var(--green-lt); box-shadow: 0 0 4px rgba(34,197,94,0.50); }
.open-milestone.open-status-completed .open-milestone-name { text-decoration: line-through; opacity: 0.65; }

.open-milestone-main { min-width: 0; }
.open-milestone-name { font-family: var(--f-ui); font-size: 13px; color: var(--smoke); margin-bottom: 3px; }
.open-milestone-meta { font-family: var(--f-mono); font-size: 9px; color: var(--smoke4); letter-spacing: 0.04em; }
.open-milestone-owner { font-family: var(--f-mono); font-size: 10px; }
.open-owner-tag { background: rgba(74,130,194,0.18); color: var(--gold-lt); padding: 4px 8px; border-radius: 3px; border: 1px solid rgba(74,130,194,0.30); }
.open-owner-empty { color: var(--smoke4); font-style: italic; }
.open-milestone-expand { background: transparent; border: 1px solid rgba(160,120,32,0.25); color: var(--smoke3); padding: 4px 10px; border-radius: 3px; cursor: pointer; font-size: 11px; transition: transform 0.2s; }
.open-milestone.expanded .open-milestone-expand { transform: rotate(180deg); }

.open-milestone-body { display: none; padding: 0 16px 14px 36px; }
.open-milestone.expanded .open-milestone-body { display: block; }
.open-milestone-desc { font-family: var(--f-ui); font-size: 12px; color: var(--smoke3); line-height: 1.6; margin-bottom: 10px; padding-top: 4px; }
.open-deps-note { font-family: var(--f-mono); font-size: 10px; color: var(--smoke3); padding: 8px 10px; background: rgba(220,38,38,0.10); border-left: 2px solid rgba(220,38,38,0.50); border-radius: 3px; margin-bottom: 10px; }
.open-deps-note strong { color: var(--red-lt); }
.open-completed-note { font-family: var(--f-mono); font-size: 10px; color: var(--green-lt); margin-bottom: 10px; }

.open-milestone-controls { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(160,120,32,0.10); }
.open-milestone-status-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.open-status-btn { padding: 8px; border-radius: 4px; font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border: 1px solid; transition: all 0.12s; background: transparent; }
.open-st-not-started { color: var(--smoke3); border-color: rgba(255,255,255,0.18); }
.open-st-not-started:hover, .open-st-not-started.active { background: rgba(255,255,255,0.06); color: var(--smoke); }
.open-st-in-progress { color: var(--gold-metal-2); border-color: rgba(160,120,32,0.35); }
.open-st-in-progress:hover, .open-st-in-progress.active { background: rgba(160,120,32,0.18); color: var(--gold-metal-1); }
.open-st-blocked { color: var(--red-lt); border-color: rgba(220,38,38,0.35); }
.open-st-blocked:hover, .open-st-blocked.active { background: rgba(220,38,38,0.18); }
.open-st-completed { color: var(--green-lt); border-color: rgba(34,197,94,0.35); }
.open-st-completed:hover, .open-st-completed.active { background: rgba(34,197,94,0.18); }

.open-milestone-assign { display: flex; flex-direction: column; gap: 4px; }
.open-milestone-assign-label { font-family: var(--f-mono); font-size: 9px; color: var(--smoke4); letter-spacing: 0.10em; text-transform: uppercase; }
.open-owner-select { padding: 8px 10px; background: rgba(0,0,0,0.20); border: 1px solid rgba(160,120,32,0.25); color: var(--smoke); font-family: var(--f-ui); font-size: 12px; border-radius: 4px; }
.open-owner-select:focus { outline: none; border-color: rgba(160,120,32,0.55); }

.open-milestone-notes-block { display: flex; flex-direction: column; gap: 4px; }
.open-milestone-notes-label { font-family: var(--f-mono); font-size: 9px; color: var(--smoke4); letter-spacing: 0.10em; text-transform: uppercase; }
.open-milestone-notes { padding: 8px 10px; background: rgba(0,0,0,0.20); border: 1px solid rgba(160,120,32,0.25); color: var(--smoke); font-family: var(--f-ui); font-size: 12px; border-radius: 4px; resize: vertical; min-height: 50px; line-height: 1.5; }
.open-milestone-notes:focus { outline: none; border-color: rgba(160,120,32,0.55); }

/* ━━ Mobile ━━ */
@media (max-width: 720px) {
  .open-project-item { grid-template-columns: 1fr; gap: 8px; }
  .open-project-progress, .open-project-status, .open-project-actions { justify-self: start; }
  .open-form-actions { grid-template-columns: 1fr; }
  .open-stats { grid-template-columns: repeat(2, 1fr); }
  .open-milestone-head { grid-template-columns: 8px 1fr auto; gap: 8px; }
  .open-milestone-owner { display: none; }
  .open-milestone.expanded .open-milestone-owner { display: block; grid-column: 2 / -1; padding-top: 8px; }
  .open-milestone-status-row { grid-template-columns: repeat(2, 1fr); }
  .open-dash-head { flex-wrap: wrap; }
}

/* ━━ Light mode ━━ */
html body[data-theme="light"] .open-intro,
html body[data-theme="light"] .open-card,
html body[data-theme="light"] .open-create-card,
html body[data-theme="light"] .open-dash-head,
html body[data-theme="light"] .open-stat,
html body[data-theme="light"] .open-phase {
  background: var(--surface) !important;
  border: 1.5px solid var(--border-strong) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,1) !important;
}
html body[data-theme="light"] .open-intro-title,
html body[data-theme="light"] .open-create-title,
html body[data-theme="light"] .open-dash-name,
html body[data-theme="light"] .open-project-name,
html body[data-theme="light"] .open-phase-name,
html body[data-theme="light"] .open-stat-num,
html body[data-theme="light"] .open-milestone-name { color: var(--smoke) !important; }
html body[data-theme="light"] .open-intro-body,
html body[data-theme="light"] .open-create-sub,
html body[data-theme="light"] .open-milestone-desc { color: var(--smoke3) !important; }
html body[data-theme="light"] .open-card-eyebrow,
html body[data-theme="light"] .open-form-label,
html body[data-theme="light"] .open-stat-label,
html body[data-theme="light"] .open-phase-count,
html body[data-theme="light"] .open-project-meta,
html body[data-theme="light"] .open-dash-meta,
html body[data-theme="light"] .open-milestone-meta,
html body[data-theme="light"] .open-milestone-assign-label,
html body[data-theme="light"] .open-milestone-notes-label,
html body[data-theme="light"] .open-project-progress-label { color: var(--smoke4) !important; }
html body[data-theme="light"] .open-stat-num.open-stat-progress { color: var(--amber) !important; }
html body[data-theme="light"] .open-stat-num.open-stat-blocked { color: var(--red) !important; }
html body[data-theme="light"] .open-stat-num.open-stat-mine { color: var(--gold) !important; }
html body[data-theme="light"] .open-project-item,
html body[data-theme="light"] .open-action-btn,
html body[data-theme="light"] .open-back-btn,
html body[data-theme="light"] .open-chip {
  background: var(--surface) !important;
  border: 1.5px solid var(--border-strong) !important;
  color: var(--smoke) !important;
}
html body[data-theme="light"] .open-chip.active {
  background: var(--gold) !important;
  color: var(--surface) !important;
  border-color: var(--gold) !important;
}
html body[data-theme="light"] .open-form-input,
html body[data-theme="light"] .open-owner-select,
html body[data-theme="light"] .open-milestone-notes {
  background: var(--surface) !important;
  border: 1.5px solid var(--border-strong) !important;
  color: var(--smoke) !important;
}
html body[data-theme="light"] .open-create-btn,
html body[data-theme="light"] .open-form-submit { background: var(--gold) !important; border: 1.5px solid var(--gold) !important; color: var(--surface) !important; }
html body[data-theme="light"] .open-form-cancel { background: var(--surface) !important; border: 1.5px solid var(--border-strong) !important; color: var(--smoke) !important; }
html body[data-theme="light"] .open-phase-head { background: var(--surface2) !important; border-bottom-color: rgba(60,100,145,0.20) !important; }
html body[data-theme="light"] .open-milestone { border-bottom-color: rgba(60,100,145,0.15) !important; }
html body[data-theme="light"] .open-milestone:hover { background: var(--surface) !important; }
html body[data-theme="light"] .open-status-btn { background: var(--surface) !important; }
html body[data-theme="light"] .open-st-not-started { color: var(--smoke4) !important; border: 1px solid var(--border-strong) !important; }
html body[data-theme="light"] .open-st-in-progress { color: var(--amber) !important; border: 1px solid var(--amber) !important; }
html body[data-theme="light"] .open-st-blocked { color: var(--red) !important; border: 1px solid var(--red) !important; }
html body[data-theme="light"] .open-st-completed { color: var(--green) !important; border: 1px solid var(--green) !important; }
html body[data-theme="light"] .open-st-not-started.active { background: var(--surface3) !important; }
html body[data-theme="light"] .open-st-in-progress.active { background: rgba(180,83,9,0.15) !important; }
html body[data-theme="light"] .open-st-blocked.active { background: rgba(153,27,27,0.15) !important; }
html body[data-theme="light"] .open-st-completed.active { background: rgba(21,128,61,0.15) !important; }
html body[data-theme="light"] .open-owner-tag { background: rgba(45,90,143,0.15) !important; color: var(--gold) !important; border-color: rgba(45,90,143,0.40) !important; }
html body[data-theme="light"] .open-deps-note { background: rgba(153,27,27,0.10) !important; color: var(--red) !important; }
html body[data-theme="light"] .open-deps-note strong { color: var(--red) !important; }
html body[data-theme="light"] .open-completed-note { color: var(--green) !important; }
html body[data-theme="light"] .open-project-progress-bar { background: var(--surface3) !important; }
html body[data-theme="light"] .open-project-progress-fill { background: linear-gradient(90deg, var(--gold), var(--gold-lt)) !important; }

/* Upgraded resp-card — recessed vault panel feel */
.resp-card {
  background: linear-gradient(170deg, rgba(20,28,48,1) 0%, rgba(13,18,32,1) 40%, rgba(7,10,18,1) 100%);
  border: 1px solid rgba(160,120,32,0.35);
  border-top-color: rgba(210,175,90,0.50);
  border-bottom-color: rgba(0,0,0,0.80);
  border-left-color: rgba(160,120,32,0.18);
  border-right-color: rgba(160,120,32,0.18);
  border-radius: var(--r2);
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 6px 20px rgba(0,0,0,0.80),
    0 2px 5px rgba(0,0,0,0.90),
    inset 0 1px 0 rgba(210,175,90,0.18),
    inset 0 -2px 0 rgba(0,0,0,0.65),
    inset 0 3px 14px rgba(0,0,0,0.35),
    inset 2px 0 6px rgba(0,0,0,0.15),
    inset -2px 0 6px rgba(0,0,0,0.15);
}
/* Gold top-edge shimmer */
.resp-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(160,120,32,0.55) 25%, rgba(210,175,90,0.90) 50%, rgba(160,120,32,0.55) 75%, transparent 95%);
  opacity: 1;
}
/* Subtle inner face highlight */
.resp-card::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(150deg, rgba(210,175,90,0.05) 0%, rgba(210,175,90,0.02) 25%, transparent 55%);
}
.resp-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 12px 14px 10px; gap: 12px;
  position: relative; z-index: 1;
}
.resp-card-meta {
  font-family: var(--f-mono); font-size: 9px;
  color: var(--smoke4); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 4px;
}
.resp-card-prompt {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--gold-lt); letter-spacing: 0.03em;
  line-height: 1.5; max-width: 600px;
}
.resp-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* Raised micro-buttons — match lbtn language at small scale */
.resp-card-btn {
  padding: 5px 11px; border-radius: 3px;
  border: 1px solid rgba(160,120,32,0.28);
  background: linear-gradient(180deg, rgba(20,28,46,0.97) 0%, rgba(10,14,24,0.99) 100%);
  color: var(--smoke4); font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(210,175,90,0.10),
    inset 1px 0 0 rgba(210,175,90,0.04),
    inset -1px 0 0 rgba(210,175,90,0.04),
    0 2px 5px rgba(0,0,0,0.60),
    0 1px 2px rgba(0,0,0,0.80),
    inset 0 -1px 0 rgba(0,0,0,0.45);
}
.resp-card-btn:hover {
  border-color: rgba(160,120,32,0.55);
  color: var(--gold-lt);
  background: linear-gradient(180deg, rgba(26,36,56,0.98) 0%, rgba(14,18,32,1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(210,175,90,0.16),
    inset 1px 0 0 rgba(210,175,90,0.06),
    inset -1px 0 0 rgba(210,175,90,0.06),
    0 3px 8px rgba(0,0,0,0.70),
    0 0 12px rgba(160,120,32,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.50);
}
.resp-card-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.50);
}
.resp-card-btn.del:hover {
  border-color: rgba(180,50,50,0.55); color: var(--red-lt);
  background: linear-gradient(180deg, rgba(28,12,12,0.98) 0%, rgba(16,6,6,1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,100,100,0.08),
    0 3px 8px rgba(0,0,0,0.70),
    inset 0 -1px 0 rgba(0,0,0,0.50);
}
.resp-preview {
  padding: 0 14px 14px;
  font-size: 12px; color: var(--smoke3);
  line-height: 1.7; letter-spacing: 0.01em;
  max-height: 120px; overflow: hidden;
  position: relative; z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.resp-preview.expanded {
  max-height: none;
  -webkit-mask-image: none; mask-image: none;
}
/* Recessed expand button — sunken tray feel */
.resp-expand-btn {
  display: block; width: 100%; padding: 8px 14px;
  background: linear-gradient(180deg, rgba(5,7,14,0.90) 0%, rgba(8,11,20,0.95) 100%);
  border: none; border-top: 1px solid rgba(0,0,0,0.55);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.45), inset 0 1px 0 rgba(0,0,0,0.30);
  color: var(--smoke4); font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase; text-align: center;
  cursor: pointer; transition: all 0.15s; position: relative; z-index: 1;
}
.resp-expand-btn:hover { color: var(--gold-lt); background: linear-gradient(180deg, rgba(12,16,28,0.95) 0%, rgba(8,12,22,0.98) 100%); }

.msg-sources {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--smoke4);
  padding-left: 2px;
  text-transform: uppercase;
}
.msg-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--gold-lt);
  text-transform: uppercase;
  margin-top: 6px;
  padding: 3px 8px 3px 7px;
  background: rgba(160,120,32,0.06);
  border: 1px solid rgba(160,120,32,0.20);
  border-radius: 3px;
  width: fit-content;
}
.msg-sources b { color: var(--gold); font-weight: 400; }
.msg-sources .source-link {
  cursor: pointer;
  transition: all 0.2s var(--ease);
  border-bottom: 1px solid rgba(160,120,32,0.3);
  padding-bottom: 1px;
}
.msg-sources .source-link:hover {
  color: var(--gold-lt);
  border-bottom-color: var(--gold);
}

.typing-wrap { display: flex; align-items: center; gap: 5px; padding: 12px 16px; }
.td {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--smoke4);
  animation: pulse 1.4s ease infinite;
}
.td:nth-child(2) { animation-delay: 0.2s; }
.td:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%,60%,100% { opacity: 0.3; transform: scale(1); } 30% { opacity: 1; transform: scale(1.3); } }

.chat-bar {
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: rgba(5,8,16,0.88);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(160,120,32,0.12);
  flex-shrink: 0;
  z-index: 10;
  position: relative;
}
.chat-bar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160,120,32,0.25) 20%, rgba(210,175,90,0.4) 50%, rgba(160,120,32,0.25) 80%, transparent);
  pointer-events: none;
  opacity: 1;
}
.chat-row { display: flex; gap: 8px; align-items: flex-end; pointer-events: all; }
.chat-bar-inner {
  max-width: none;
  margin: 0;
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  pointer-events: all;
}
.chat-ta {
  flex: 1;
  background: rgba(4,6,14,0.90);
  border: 1px solid rgba(160,120,32,0.14);
  border-top-color: rgba(0,0,0,0.85);
  border-bottom-color: rgba(160,120,32,0.14);
  border-radius: var(--r);
  padding: 12px 16px;
  color: var(--smoke);
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 300;
  resize: none; outline: none;
  min-height: 46px; max-height: 140px;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-appearance: none;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 2px 0 rgba(160,120,32,0.12),
    inset 2px 0 0 rgba(160,120,32,0.06),
    inset -2px 0 0 rgba(160,120,32,0.06),
    inset 0 3px 8px rgba(0,0,0,0.75),
    inset 0 1px 3px rgba(0,0,0,0.90);
}
.chat-ta::placeholder {
  color: var(--smoke4);
  font-family: var(--f-ui);
  font-weight: 300;
  letter-spacing: 0.06em;
}
.chat-ta:focus {
  border-color: rgba(160,120,32,0.22);
  border-top-color: rgba(0,0,0,0.80);
  box-shadow:
    inset 0 2px 0 rgba(160,120,32,0.22),
    inset 2px 0 0 rgba(160,120,32,0.10),
    inset -2px 0 0 rgba(160,120,32,0.10),
    inset 0 3px 8px rgba(0,0,0,0.75),
    inset 0 1px 3px rgba(0,0,0,0.90),
    0 0 0 2px rgba(160,120,32,0.06);
}
.send-btn {
  width: 46px; height: 46px;
  border-radius: var(--r);
  border: 1px solid rgba(160,120,32,0.22);
  border-top-color: rgba(0,0,0,0.70);
  border-bottom-color: rgba(160,120,32,0.18);
  background: linear-gradient(160deg, rgba(6,9,18,0.98) 0%, rgba(10,14,24,0.97) 100%);
  color: rgba(160,120,32,0.65);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s var(--ease);
  -webkit-appearance: none;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.80),
    inset 0 1px 3px rgba(0,0,0,0.60),
    inset 0 2px 0 rgba(160,120,32,0.12),
    0 1px 0 rgba(210,175,90,0.06),
    0 2px 6px rgba(0,0,0,0.50);
}
.send-btn::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.8), transparent);
  opacity: 1;
}
.send-btn:hover {
  color: rgba(210,175,90,0.90);
  border-color: rgba(160,120,32,0.32);
  border-top-color: rgba(0,0,0,0.65);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.80),
    inset 0 1px 3px rgba(0,0,0,0.60),
    inset 0 2px 0 rgba(160,120,32,0.20),
    0 1px 0 rgba(210,175,90,0.08),
    0 0 10px rgba(160,120,32,0.10);
}
.send-btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 3px 8px rgba(0,0,0,0.90),
    inset 0 1px 3px rgba(0,0,0,0.70);
}
.send-btn:disabled { opacity: 0.25; cursor: default; }
.img-attach-btn {
  flex-shrink: 0;
  width: 32px; height: 32px;
  background: none;
  border: 1px solid rgba(160,120,32,0.22);
  border-radius: var(--r);
  color: rgba(160,120,32,0.5);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.img-attach-btn:hover { border-color: rgba(160,120,32,0.55); color: rgba(160,120,32,0.9); background: rgba(160,120,32,0.06); }
.img-attach-btn.has-image { border-color: rgba(160,120,32,0.7); color: rgba(160,120,32,1); background: rgba(160,120,32,0.10); }
.img-preview-strip {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--smoke4);
  letter-spacing: 0.06em;
}
.img-preview-strip.visible { display: flex; }
.img-preview-thumb {
  width: 40px; height: 40px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid rgba(160,120,32,0.3);
  flex-shrink: 0;
}
.img-preview-clear {
  background: none; border: none; color: rgba(220,90,90,0.6);
  cursor: pointer; font-size: 14px; padding: 0 4px; line-height: 1;
  transition: color 0.15s;
}
.img-preview-clear:hover { color: rgba(220,90,90,1); }
.msg-image { max-width: 280px; max-height: 200px; border-radius: 4px; border: 1px solid rgba(160,120,32,0.2); margin-bottom: 6px; display: block; }

/* New conversation button */
.new-chat-btn {
  display: none;
  margin: 4px auto 0;
  padding: 3px 14px;
  background: none;
  border: 1px solid rgba(160,120,32,0.20);
  border-radius: 20px;
  color: rgba(160,120,32,0.40);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.new-chat-btn:hover { border-color: rgba(160,120,32,0.55); color: rgba(160,120,32,0.85); }
.chat-bar.has-messages .new-chat-btn { display: block; }
#saved-resp-btn { display: block; }

/* ── Compliance Mode ─────────────────────────────────────── */
.compliance-btn {
  width: 32px; height: 32px;
  border-radius: var(--r);
  border: 1px solid rgba(160,120,32,0.20);
  border-top-color: rgba(210,175,90,0.28);
  border-bottom-color: rgba(0,0,0,0.55);
  background: linear-gradient(160deg, rgba(12,17,28,0.95) 0%, rgba(7,10,18,0.98) 100%);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
  -webkit-appearance: none;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.55),
    0 1px 2px rgba(0,0,0,0.70),
    inset 0 1px 0 rgba(210,175,90,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.40);
}
.compliance-btn svg {
  width: 18px; height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.80));
}
.compliance-btn:hover {
  border-color: rgba(160,120,32,0.35);
  border-top-color: rgba(210,175,90,0.45);
  background: linear-gradient(160deg, rgba(18,24,38,0.97) 0%, rgba(10,14,22,0.99) 100%);
  box-shadow:
    0 3px 10px rgba(0,0,0,0.65),
    0 1px 3px rgba(0,0,0,0.80),
    inset 0 1px 0 rgba(210,175,90,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.50),
    0 0 10px rgba(160,120,32,0.12);
}
.compliance-btn.eligible {
  border-color: rgba(200,60,60,0.35);
  border-top-color: rgba(255,100,100,0.45);
}
.compliance-btn.eligible:hover { border-color: rgba(255,68,68,0.55); }
.compliance-btn.armed {
  border-color: rgba(255,68,68,0.45);
  border-top-color: rgba(255,120,120,0.55);
  background: linear-gradient(160deg, rgba(30,8,8,0.97) 0%, rgba(18,4,4,0.99) 100%);
  box-shadow:
    0 0 12px rgba(255,68,68,0.25),
    0 2px 6px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,120,120,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.50);
  animation: compliance-pulse 2s ease-in-out infinite;
}
@keyframes compliance-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255,68,68,0.2); }
  50% { box-shadow: 0 0 16px rgba(255,68,68,0.45); }
}
.chat-bar.compliance-armed {
  border-top-color: rgba(255,68,68,0.5);
}
.chat-bar.compliance-armed::before {
  background: linear-gradient(90deg, transparent, rgba(255,68,68,0.3) 20%, rgba(255,100,100,0.5) 50%, rgba(255,68,68,0.3) 80%, transparent);
  animation: compliance-bar-pulse 2s ease-in-out infinite;
}
@keyframes compliance-bar-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.chat-ta.compliance-armed {
  border-color: rgba(255,68,68,0.4) !important;
  box-shadow: 0 0 0 3px rgba(255,68,68,0.1) !important;
}
.send-btn.compliance-armed {
  background: linear-gradient(150deg, rgba(255,68,68,0.25) 0%, rgba(200,30,30,0.15) 100%) !important;
  border-color: rgba(255,68,68,0.6) !important;
  color: var(--red-lt) !important;
  font-family: var(--f-mono);
  font-size: 8px !important;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.send-btn.compliance-armed:hover {
  background: linear-gradient(150deg, rgba(255,68,68,0.4) 0%, rgba(200,30,30,0.3) 100%) !important;
  box-shadow: 0 2px 16px rgba(255,68,68,0.35) !important;
  color: var(--red-lt) !important;
}
.compliance-armed-label {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,68,68,0.7);
  text-align: center;
  margin-bottom: 6px;
  animation: compliance-bar-pulse 2s ease-in-out infinite;
}
/* Modal */
.compliance-modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.compliance-modal-bg.open { display: flex; }
.compliance-modal {
  background: var(--ink2);
  border: 1px solid rgba(255,68,68,0.3);
  border-radius: var(--r2);
  padding: 28px 32px;
  max-width: 420px; width: 90%;
  box-shadow: 0 8px 40px rgba(255,68,68,0.15), 0 2px 16px rgba(0,0,0,0.6);
}
.compliance-modal-icon {
  color: var(--red-lt);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.compliance-modal-icon svg { width: 22px; height: 22px; }
.compliance-modal-title {
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--red-lt);
  text-transform: uppercase;
}
.compliance-modal-body {
  font-size: 13px;
  color: var(--smoke2);
  line-height: 1.65;
  margin: 14px 0 22px;
}
.compliance-modal-body strong { color: var(--smoke); }
.compliance-modal-btns { display: flex; gap: 10px; justify-content: flex-end; }
.compliance-modal-cancel {
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  color: var(--smoke3);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.compliance-modal-cancel:hover { border-color: var(--smoke3); color: var(--smoke2); }
.compliance-modal-confirm {
  padding: 9px 18px;
  background: rgba(255,68,68,0.12);
  border: 1px solid rgba(255,68,68,0.4);
  border-radius: var(--r);
  color: var(--red-lt);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.compliance-modal-confirm:hover { background: rgba(255,68,68,0.22); color: var(--red-lt); }


/* ── Discovery Greeting ────────────────────────────────── */
/* Name sits just above the input bar — injected into bar zone */
.dg-name-above-bar {
  text-align: center;
  margin-bottom: 12px;
  animation: dg-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  pointer-events: none;
}
/* Greeting strip — sits just above the input bar */
#discovery-greeting-strip {
  padding: 12px 0 0;
  text-align: center;
  animation: dg-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
  position: relative;
  z-index: 2;
}
#discovery-greeting-strip::before {
  content: '';
  display: block;
  width: 120px;
  height: 1px;
  margin: 0 auto 10px;
  background: linear-gradient(90deg, transparent, rgba(160,120,32,0.35) 50%, transparent);
}
#discovery-greeting-strip .dgs-text {
  font-family: var(--f-ui);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.9;
  max-width: 640px;
  margin: 0 auto;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9), 0 1px 4px rgba(0,0,0,0.8);
  background: linear-gradient(105deg,
    rgba(160,120,32,0.75) 0%,
    rgba(193,152,40,0.85) 30%,
    rgba(210,175,90,0.95) 50%,
    rgba(193,152,40,0.85) 70%,
    rgba(160,120,32,0.75) 100%
  );
  background-size: 100% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dg-eyebrow {
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin-top: 4px;
  margin-bottom: 8px;
}
.dg-name {
  font-family: var(--f-display);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1;
  background: linear-gradient(105deg,
    var(--gold-metal-3) 0%,
    var(--gold-metal-2) 25%,
    var(--gold-metal-1) 40%,
    rgba(255,248,210,1) 50%,
    var(--gold-metal-1) 60%,
    var(--gold-metal-2) 75%,
    var(--gold-metal-3) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(160,120,32,0.50)) drop-shadow(0 0 12px rgba(210,175,90,0.30));
  animation: nameShimmer 3.5s ease-in-out 0.5s infinite;
}
@keyframes nameShimmer {
  0%, 100% { background-position: 100% 0; }
  50%       { background-position: 0% 0; }
}
/* Greeting text floats below the bar */
.dg-text-below-bar {
  display: none;
}
.dg-text {
  display: none;
}
@keyframes dg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Hide collection pills — greeting text already covers it */
.dg-collections { display: none; }

