
/* Content popup styling migrated from module sheets; workflow geometry retained. */
#archived-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 10000;
  align-items: center; justify-content: center;
}
#archived-modal-overlay.visible { display: flex; }
#archived-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; width: 90%; max-width: 420px;
  max-height: 70vh; max-height: 70dvh; display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#archived-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#archived-modal-header h3 {
  margin: 0; font-size: 16px; font-weight: 600; color: var(--text);
}
.archived-modal-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.archived-modal-close:hover { color: var(--text); }
.overseer-ledger-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overseer-ledger-modal-overlay.visible {
  display: flex;
}
.overseer-ledger-modal-inner {
  background: #171c23;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 26px 28px;
  width: min(94vw, 980px);
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 76px rgba(0,0,0,0.36);
}
.overseer-ledger-modal-overlay .modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  z-index: 1;
}
.overseer-ledger-modal-overlay .modal-close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
@media (max-width:720px){.overseer-ledger-modal-overlay {
    padding: 12px;
  }}
@media (max-width:720px){.overseer-ledger-modal-inner {
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }}
.overseer-wake-prompt-modal .overseer-ledger-modal-inner {
  padding: 24px;
}
.overseer-wake-prompt-modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
}
#schedule-archived-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 10000;
  align-items: center; justify-content: center;
}
#schedule-archived-modal-overlay.visible { display: flex; }
#schedule-archived-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; width: 90%; max-width: 480px;
  max-height: 70vh; display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#schedule-archived-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#schedule-archived-modal-header h3 {
  margin: 0; font-size: 16px; font-weight: 600; color: var(--text);
}
#schedule-editor-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10001;
  align-items: center; justify-content: center;
}
#schedule-editor-modal.visible { display: flex; }
#schedule-editor-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 90%; max-width: 1350px; aspect-ratio: 16/9;
  max-height: 90vh; max-height: 90dvh; overflow: hidden;
  position: relative; display: flex; flex-direction: column;
}
#schedule-editor-modal-inner h3 {
  margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--text); flex-shrink: 0;
}
#schedule-editor-modal .modal-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; line-height: 1; z-index: 1;
}
#schedule-editor-modal .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
#schedule-editor-modal .me-prompt-section { flex: 1; display: flex; flex-direction: column; }
#schedule-editor-modal #schedule-modal-textarea {
  flex: 1; min-height: 0; width: 100%; padding: 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; color: var(--text);
  font-size: 14px; font-family: inherit; resize: none; outline: none; box-sizing: border-box;
}
#schedule-editor-modal #schedule-modal-textarea:focus { border-color: var(--accent); }
#schedule-editor-modal #schedule-runat-date,
#schedule-editor-modal #schedule-runat-time {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  color-scheme: dark;
}
#schedule-editor-modal #schedule-runat-date:focus,
#schedule-editor-modal #schedule-runat-time:focus {
  border-color: var(--accent);
  outline: none;
}
#schedule-editor-modal #schedule-runat-date::-webkit-calendar-picker-indicator,
#schedule-editor-modal #schedule-runat-time::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.65;
}
#schedule-editor-modal #schedule-runat-field .schedule-row {
  display: grid;
  grid-template-columns: minmax(136px, 1fr) minmax(118px, 0.85fr);
  gap: 8px;
  align-items: end;
}
#schedule-editor-modal #schedule-runat-field .form-group {
  min-width: 0;
}
@media (max-width:768px){#schedule-editor-modal-inner { aspect-ratio: auto; max-width: 95%; padding: 16px; }}
@media (max-width:900px){#schedule-editor-modal-inner {
    aspect-ratio: auto;
    height: auto;
    max-height: 92dvh;
    overflow-y: auto;
  }}
@media (max-width:900px){#schedule-editor-modal .me-columns {
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    overflow: visible;
  }}
@media (max-width:900px){#schedule-editor-modal .me-left-col,
  #schedule-editor-modal .me-right-col {
    width: 100%;
    max-width: none;
  }}
@media (max-width:900px){#schedule-editor-modal .me-avatar-col {
    margin-bottom: 10px;
  }}
@media (max-width:900px){#schedule-editor-modal .me-avatar-preview {
    width: 112px;
    height: 112px;
    margin: 0 auto 10px;
  }}
@media (max-width:900px){#schedule-editor-modal #sch-avatar-initial {
    font-size: 30px !important;
  }}
@media (max-width:900px){#schedule-editor-modal .me-right-col .me-prompt-section {
    min-height: 220px;
  }}
@media (max-width:520px){#schedule-editor-modal #schedule-runat-field .schedule-row {
    grid-template-columns: 1fr;
  }}
#team-builder-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
#team-builder-modal.open {
  display: flex;
}
#team-builder-modal .modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 40vw;
  width: 90%;
  max-height: 80vh;
  max-height: 80dvh;
  overflow-y: auto;
}
#new-team-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 9999;
  align-items: center; justify-content: center;
}
#new-team-modal.visible { display: flex; }
#new-team-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 90%; max-width: 900px; aspect-ratio: 16/9;
  max-height: 85vh; max-height: 85dvh; overflow-y: auto;
  position: relative; display: flex; flex-direction: column;
}
#new-team-modal-inner h3 {
  margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
#new-team-modal .modal-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; line-height: 1;
}
#new-team-modal .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
@media (max-width:768px){#new-team-modal-inner { aspect-ratio: auto; max-width: 95vw; padding: 16px; }}
#add-member-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10000;
  align-items: center; justify-content: center;
}
#add-member-modal.visible { display: flex; }
#add-member-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; width: 90%; max-width: 520px; max-height: 80vh; max-height: 80dvh; overflow-y: auto;
  position: relative;
}
#add-member-modal-inner h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--text); }
#add-member-modal .modal-close-btn {
  position: absolute; top: 10px; right: 12px; background: none; border: none;
  color: var(--text-dim); font-size: 20px; cursor: pointer; padding: 2px 6px;
  border-radius: 4px; line-height: 1;
}
#add-member-modal .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
#new-agent-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10000;
  align-items: center; justify-content: center;
}
#new-agent-modal.visible { display: flex; }
#new-agent-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 24px 20px; width: min(92vw, 860px); max-width: 860px;
  min-height: 620px; max-height: 85vh; max-height: 85dvh; overflow-y: auto;
  position: relative; display: flex; flex-direction: column;
}
#new-agent-modal-inner h3 {
  width: min(100%, 760px); margin: 0 auto 16px; font-size: 20px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
#new-agent-modal .modal-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; line-height: 1; z-index: 1;
}
#new-agent-modal .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
#new-agent-modal .modal-primary-btn:disabled { opacity: 0.6; cursor: wait; }
#new-freelancer-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10000;
  align-items: center; justify-content: center;
}
#new-freelancer-modal.visible { display: flex; }
#new-freelancer-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 24px 20px; width: min(92vw, 860px); max-width: 860px;
  min-height: 620px; max-height: 85vh; max-height: 85dvh; overflow-y: auto;
  position: relative; display: flex; flex-direction: column;
}
#new-freelancer-modal-inner h3 {
  width: min(100%, 760px); margin: 0 auto 16px; font-size: 20px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
#new-freelancer-modal .modal-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; line-height: 1; z-index: 1;
}
#new-freelancer-modal .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.modal-subtitle {
  width: min(100%, 760px); font-size: 0.8rem; color: var(--text-dim); margin: 0 auto 18px;
  flex-shrink: 0;
}
.modal-footer-actions { display: flex; justify-content: flex-end; gap: 8px; width: min(100%, 760px); margin: auto auto 0; padding-top: 0; }
.modal-cancel-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.15); color: var(--text-dim);
  border-radius: 6px; padding: 9px 16px; font-size: 0.9rem; cursor: pointer;
}
.modal-cancel-btn:hover { background: rgba(255,255,255,0.06); }
.modal-primary-btn {
  background: var(--accent); border: none; color: #fff;
  border-radius: 6px; padding: 9px 16px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.modal-primary-btn:hover { opacity: 0.85; }
@media (max-width:960px){#new-agent-modal-inner,
  #new-freelancer-modal-inner {
    width: 95vw;
    max-width: 95vw;
    min-height: auto;
  }}
#member-editor-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10001;
  align-items: center; justify-content: center;
}
#member-editor-modal.visible { display: flex; }
#member-editor-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 90%; max-width: 1350px; aspect-ratio: 16/9;
  max-height: 85vh; max-height: 85dvh; overflow-y: auto;
  position: relative; display: flex; flex-direction: column;
}
#member-editor-modal-inner h3 {
  margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
#member-editor-modal .modal-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; line-height: 1; z-index: 1;
}
#member-editor-modal .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
@media (max-width:768px){#member-editor-modal-inner {
    aspect-ratio: auto; max-width: 95%; padding: 16px;
  }}
#decisions-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
#decisions-modal-overlay.open { display: flex; }
#decisions-modal {
  background: #1a1a2e;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 90vw;
  max-height: 80vh;
  max-height: 80dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#decisions-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#decisions-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
#decisions-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
#decisions-modal-close:hover { color: var(--text); }
#decisions-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
@media (max-width:768px){#decisions-modal { width: calc(100% - 16px); max-width: none; max-height: 90vh; max-height: 90dvh; border-radius: 8px; }}
@media (max-width:768px){#team-builder-modal .modal-content { max-width: 95vw; }}
@media (max-width:768px){#member-editor-modal-inner { max-width: 95vw; }}
@media (max-width:768px){#add-member-modal-inner { max-width: 95vw; }}
#relay-wizard-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10002;
  align-items: center; justify-content: center;
}
#relay-wizard-modal.visible { display: flex; }
#relay-wizard-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 90%; max-width: 560px;
  max-height: 85vh; max-height: 85dvh; overflow-y: auto;
  position: relative; display: flex; flex-direction: column;
}
#relay-wizard-modal-inner h3 {
  margin: 0 0 16px; font-size: 18px; font-weight: 700; color: var(--text); flex-shrink: 0;
}
#relay-wizard-modal .modal-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; line-height: 1; z-index: 1;
}
#relay-wizard-modal .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
@media (max-width:768px){#relay-wizard-modal-inner { max-width: 95vw; padding: 16px; }}
#settings-modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10001;
  align-items: center; justify-content: center;
}
#settings-modal-overlay.visible { display: flex; }
#settings-modal-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 90%; max-width: 1350px; aspect-ratio: 16/9;
  max-height: 85vh; max-height: 85dvh;
  height: min(85vh, 85dvh);
  overflow: hidden;
  position: relative; display: flex; flex-direction: column;
}
#settings-modal-inner h3 {
  margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
#settings-modal-overlay .modal-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; line-height: 1; z-index: 1;
}
#settings-modal-overlay .modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
@media (max-width:768px){#settings-modal-inner {
    aspect-ratio: auto; max-width: 95%; padding: 16px;
  }}
#schedule-editor-modal .me-left-col{gap:18px}
#schedule-editor-modal .me-avatar-col{margin-top:0;margin-bottom:2px}
#schedule-editor-modal .me-left-col>.me-field{margin:0}
#schedule-editor-modal .me-left-col>.me-field>.me-field{margin-top:18px}
#schedule-editor-modal .me-field label{margin-bottom:6px}
#schedule-editor-modal .schedule-interval-row{margin-top:0}
#schedule-editor-modal .me-field .hint{margin-top:6px;line-height:1.35}
@media (max-width:900px){#schedule-editor-modal-inner{padding:20px 24px 24px}}
#session-binding-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10020;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
}
#session-binding-modal.visible { display: flex; }
#session-binding-modal-inner {
  position: relative;
  width: min(92vw, 620px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
#session-binding-modal-inner h3 { margin: 0 0 8px; }
#session-binding-modal .modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
}
#new-agent-modal-inner {
  height: 671px !important;
  min-height: min(671px, calc(100dvh - 32px)) !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
}
#new-agent-modal-inner h3 {
  margin-bottom: 16px;
}
.pab-new-agent-body .modal-subtitle,
.pab-new-agent-body #new-agent-name-input,
.pab-new-agent-body .engine-picker {
  width: 100%;
}
#new-agent-modal-inner .modal-footer-actions {
  width: auto;
  margin: auto -24px 0;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
#member-editor-modal-inner {
  overflow: hidden !important;
}
#member-editor-modal-inner > .me-actions {
  display: none !important;
}
#member-editor-modal-inner .me-columns {
  gap: 24px;
}
#member-editor-modal-inner .me-left-col {
  position: relative;
  width: 20%;
  padding-right: 12px;
  box-sizing: border-box;
}
#member-editor-modal-inner .me-left-col::after {
  content: "";
  position: absolute;
  top: 0;
  right: -12px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
#member-editor-modal-inner .me-right-col {
  padding-left: 12px;
}
#member-editor-modal-inner #me-name,
#member-editor-modal-inner .me-left-action-link {
  width: 100%;
  height: 36px;
  min-height: 36px;
  border-radius: 6px;
  box-sizing: border-box;
}
#member-editor-modal-inner .me-left-actions {
  gap: 8px;
  margin-top: auto;
  margin-bottom: 64px;
}
#member-editor-modal-inner .me-left-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
#member-editor-modal-inner .me-tab-btn {
  border-radius: 0;
}
#member-editor-modal-inner .me-tab-panel.active {
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width:768px){#member-editor-modal-inner .me-columns {
    gap: 16px;
  }}
@media (max-width:768px){#member-editor-modal-inner .me-left-col {
    width: 100%;
    padding-right: 0;
  }}
@media (max-width:768px){#member-editor-modal-inner .me-left-col::after {
    display: none;
  }}
@media (max-width:768px){#member-editor-modal-inner .me-right-col {
    padding-left: 0;
  }}
@media (max-width:768px){#member-editor-modal-inner .me-left-actions {
    margin-bottom: 0;
  }}
.response-annotation-toolbar button,
.response-annotation-editor button,
.response-annotation-count,
.response-annotation-anchor {
  font: inherit;
}
.response-annotation-toolbar button:focus-visible,
.response-annotation-anchor:focus-visible,
.response-annotation-count:focus-visible,
.response-annotation-editor button:focus-visible,
.response-annotation-editor textarea:focus-visible,
.response-annotation-list__item:focus-visible {
  outline: 2px solid var(--ann-focus);
  outline-offset: 2px;
}
.response-annotation-editor {
  position: fixed;
  z-index: 86;
  width: 308px;
  min-height: 112px;
  max-height: 220px;
  overflow: auto;
  padding: 16px 16px 10px;
  border: 1px solid var(--ann-editor-border);
  border-radius: 22px;
  background: var(--ann-editor-bg);
  color: var(--ann-primary-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .36);
}
.response-annotation-editor__quote {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 2px solid var(--ann-anchor);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.response-annotation-editor__unavailable {
  margin: -4px 0 10px;
  color: var(--ann-danger);
  font-size: 12px;
  line-height: 1.4;
}
.response-annotation-editor label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.response-annotation-editor textarea {
  width: 276px;
  min-height: 44px;
  max-height: 132px;
  resize: none;
  overflow-y: auto;
  padding: 10px 11px;
  border: 1px solid var(--ann-editor-border);
  border-radius: 12px;
  background: var(--ann-canvas);
  color: var(--ann-primary-text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
}
.response-annotation-editor textarea::placeholder {
  color: var(--ann-placeholder);
}
.response-annotation-editor__error {
  min-height: 18px;
  margin-top: 6px;
  color: var(--ann-danger);
  font-size: 12px;
  line-height: 1.4;
}
.response-annotation-editor__error button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ann-primary-text);
  cursor: pointer;
  text-decoration: underline;
}
.response-annotation-editor__actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}
.response-annotation-editor__actions button {
  min-height: 36px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.response-annotation-editor__actions .response-annotation-editor__microphone {
  width: 36px;
  padding: 0;
  background: transparent;
  color: var(--ann-primary-text);
  font-size: 16px;
  line-height: 16px;
}
.response-annotation-editor__microphone:hover,
.response-annotation-editor__microphone:active,
.response-annotation-editor__microphone.is-listening {
  background: var(--ann-control-hover);
  color: var(--ann-primary-text);
}
.response-annotation-editor__delete {
  width: 36px;
  padding: 0;
  background: transparent;
  color: var(--ann-danger);
}
.response-annotation-editor__delete svg {
  width: 16px;
  height: 16px;
}
.response-annotation-editor__delete:hover,
.response-annotation-editor__delete:active {
  background: var(--ann-control-hover);
}
.response-annotation-editor__cancel {
  min-width: 64px;
  padding: 0 12px;
  margin-left: auto;
  background: transparent;
  color: var(--ann-primary-text);
}
.response-annotation-editor__save {
  min-width: 48px;
  padding: 0 14px;
  background: var(--ann-anchor);
  color: var(--ann-primary-text);
}
.response-annotation-editor__save:hover,
.response-annotation-editor__save:active {
  filter: brightness(1.1);
}
.response-annotation-editor__save:disabled {
  background: var(--ann-save-disabled-bg);
  color: var(--ann-placeholder);
  cursor: not-allowed;
  filter: none;
}
.response-annotation-editor.is-saving .response-annotation-editor__actions button:not(.response-annotation-editor__cancel) {
  pointer-events: none;
  opacity: .7;
}
.response-annotation-list h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.response-annotation-list__item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ann-primary-text);
  cursor: pointer;
  text-align: left;
}
.response-annotation-list__item strong {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ann-anchor-text);
  border-radius: 50%;
  background: var(--ann-anchor);
  color: var(--ann-anchor-text);
  font-size: 12px;
}
.response-annotation-list__detail {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.response-annotation-list__quote,
.response-annotation-list__comment {
  overflow: hidden;
  color: var(--text-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.response-annotation-list__quote {
  color: var(--text);
}
.response-annotation-list__item:hover,
.response-annotation-list__item:active {
  border-color: var(--ann-editor-border);
  background: var(--ann-control-hover);
}
@media (max-width:420px){.response-annotation-editor {
    width: calc(100vw - 24px);
    max-width: 308px;
  }}
@media (max-width:420px){.response-annotation-editor textarea {
    width: 100%;
  }}
@media (pointer:coarse){.response-annotation-toolbar__annotate,
  .response-annotation-toolbar__dismiss,
  .response-annotation-editor__actions button {
    min-height: 44px;
  }}
@media (prefers-reduced-motion:reduce){.response-annotation-anchor,
  .response-annotation-toolbar,
  .response-annotation-editor {
    transition: none !important;
  }}
.conversation-minimap__cluster-list,
.conversation-minimap__outline-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.conversation-minimap__cluster-link,
.conversation-minimap__outline-link {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 6px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.conversation-minimap__outline-link:hover {
  background: var(--border);
}
.conversation-minimap__outline-link:focus-visible {
  background: var(--border);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.conversation-minimap__outline-button,
.conversation-minimap__outline {
  display: none;
}
.conversation-minimap__outline-button.is-available {
  position: fixed;
  z-index: 41;
  top: 10px;
  left: 52px;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
}
.conversation-minimap__outline.is-mobile {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  max-height: min(72dvh, 620px);
  overflow: auto;
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  background: var(--surface);
  box-shadow: 0 -8px 24px var(--bg);
  padding: 16px;
}
.conversation-minimap__outline.is-mobile[hidden] { display: none; }
.conversation-minimap__outline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.conversation-minimap__outline-heading {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}
.conversation-minimap__outline-close {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
}
.conversation-minimap__outline-title,
.conversation-minimap__outline-excerpt {
  display: block;
}
.conversation-minimap__outline-title { color: var(--text); font-size: 13px; font-weight: 600; }
.conversation-minimap__outline-excerpt { margin-top: 2px; color: var(--text-dim); font-size: 12px; line-height: 18px; }
.large-paste-card button:disabled,.large-paste-dialog button:disabled { opacity:.45; cursor:not-allowed; }
.large-paste-card button:focus-visible, .large-paste-undo:focus-visible, .large-paste-dialog button:focus-visible, .large-paste-dialog textarea:focus-visible,.large-paste-search:focus-visible { outline:2px solid #8ab4f8; outline-offset:2px; }
.large-paste-dialog { width:min(90vw,760px); max-height:90vh; overflow:auto; padding:20px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); }
.large-paste-dialog::backdrop { background:rgba(0,0,0,.7); }
.large-paste-dialog textarea { display:block; width:100%; height:min(55vh,500px); margin:12px 0; padding:12px; resize:vertical; background:var(--surface); color:var(--text); border:1px solid var(--border); }
.large-paste-dialog textarea[hidden] { display:none; }
.large-paste-dialog button { min-height:44px; margin-right:8px; padding:0 16px; border-radius:8px; border:1px solid var(--border); background:#333; color:#fff; cursor:pointer; }
.workspace-source-details { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 12px 32px color-mix(in srgb, var(--bg) 80%, transparent); }
.workspace-source-details::backdrop { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.workspace-source-details h2 { margin: 0 0 10px; color: var(--text); font-size: 17px; }
.workspace-source-details p { overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; color: var(--text-dim); }
.workspace-source-details textarea { display: block; width: 100%; min-height: 180px; max-height: 40dvh; padding: 10px; resize: vertical; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.workspace-source-details textarea[hidden] { display: none; }
.workspace-source-details button { min-height: 44px; padding: 0 12px; margin: 8px 8px 0 0; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); cursor: pointer; }
.workspace-source-details button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.workspace-side-chat-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.workspace-side-chat-dialog::backdrop { background: color-mix(in srgb, var(--bg) 65%, transparent); }
.workspace-side-chat-dialog textarea { width: 100%; min-height: 68px; resize: vertical; }
.workspace-side-chat-dialog button { min-height: 36px; margin: 5px; }
.workspace-side-chat-dialog :focus-visible, #workspace-side-chat-form :focus-visible, #workspace-side-chat-create:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.artifact-workspace__review,
.artifact-workspace__annotation-composer,
.artifact-workspace__preview-feedback,
.artifact-workspace__command-request,
.artifact-workspace__close-confirm,
.artifact-workspace__external-confirm,
.artifact-workspace__recovery,
.artifact-workspace__history { display: grid; gap: 10px; margin: 12px 14px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.artifact-workspace__review strong,
.artifact-workspace__preview-feedback strong,
.artifact-workspace__command-request strong,
.artifact-workspace__close-confirm strong,
.artifact-workspace__external-confirm strong { color: var(--text); }
.artifact-workspace__preview-feedback label,
.artifact-workspace__command-request label { display: grid; gap: 5px; color: var(--text); font-size: 12px; }
.artifact-workspace__preview-feedback textarea,
.artifact-workspace__command-request input { border: 1px solid var(--border); border-radius: 6px; padding: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 12px; }
.artifact-workspace__preview-feedback textarea { min-height: 76px; resize: vertical; }
.artifact-workspace__command-request { gap: 4px; margin: 4px 14px; padding: 6px; }
.artifact-workspace__command-request p { margin: 0; line-height: 1.3; }
.artifact-workspace__command-request label { gap: 3px; }
.artifact-workspace__command-request input { padding: 5px; }
.artifact-workspace__external-confirm { color: var(--text-dim); font-size: 12px; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.artifact-workspace__new-artifact { margin-top: 0; }
@media (max-width:899px) and (max-height:520px){.artifact-workspace--stopped .artifact-workspace__command-request { gap: 1px; margin-block: 0; padding: 4px 6px; line-height: 1.25; }}
@media (max-width:899px) and (max-height:520px){.artifact-workspace--stopped .artifact-workspace__command-request > p,
  .artifact-workspace--stopped .artifact-workspace__command-request label { font-size: 11px; }}
@media (max-width:899px) and (max-height:520px){.artifact-workspace--stopped .artifact-workspace__command-request input { padding-block: 4px; }}
.skills-search-dialog { width: min(560px,calc(100vw - 32px)); max-height: 75dvh; margin: 12dvh auto auto; padding: 24px; border: 1px solid var(--hairline); border-radius: 4px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 90px #0005; }
.skills-search-dialog::backdrop { background: #080b14b3; backdrop-filter: blur(8px); }
.skills-search-dialog input { width: 100%; padding: 16px 0; margin-bottom: 12px; border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0; background: none; font: 18px var(--sans); color: var(--ink); outline: none; }
/* Canonical NLC dialogs, notices, toasts, and tooltips. */
:root {
  --nlc-overlay-radius: 10px;
  --nlc-overlay-padding: 20px;
  --nlc-overlay-border: var(--border, var(--hairline, #353942));
  --nlc-overlay-surface: var(--bg-secondary, var(--paper, #202329));
  --nlc-overlay-text: var(--text, var(--ink, #e6edf3));
}
.nlc-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: var(--nlc-overlay-padding);
  border: 1px solid var(--nlc-overlay-border);
  border-radius: var(--nlc-overlay-radius);
  background: var(--nlc-overlay-surface);
  color: var(--nlc-overlay-text);
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
  font-family: inherit;
}
.nlc-dialog::backdrop { background: rgba(0,0,0,.66); }
.nlc-dialog h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.3; }
.nlc-dialog p { margin: 0 0 18px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.nlc-dialog input {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  margin: 0 0 20px;
  padding: 0 10px;
  border: 1px solid var(--nlc-overlay-border);
  border-radius: 7px;
  background: var(--bg, #16191d);
  color: var(--nlc-overlay-text);
  font: inherit;
}
.nlc-dialog input:focus { outline: 2px solid var(--accent, #58a6ff); outline-offset: 1px; }
.nlc-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.nlc-dialog-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--nlc-overlay-border);
  border-radius: 7px;
  background: transparent;
  color: var(--nlc-overlay-text);
  font: inherit;
  cursor: pointer;
}
.nlc-dialog-actions [data-dialog-confirm] {
  border-color: var(--accent, #58a6ff);
  background: var(--accent, #58a6ff);
  color: #0d1117;
}
.nlc-toast {
  position: fixed;
  z-index: 10003;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  box-sizing: border-box;
  max-width: min(480px, calc(100vw - 32px));
  padding: 9px 14px;
  border: 1px solid var(--nlc-overlay-border);
  border-radius: var(--nlc-overlay-radius);
  background: var(--nlc-overlay-surface);
  color: var(--nlc-overlay-text);
  box-shadow: 0 10px 28px rgba(0,0,0,.36);
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.4;
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 220ms ease;
}
.nlc-toast[data-tone="error"] { border-color: #cf6674; }
.nlc-toast[data-tone="success"] { border-color: #52ad87; }
.nlc-toast[data-tone="warning"] { border-color: #d5a45e; }
.nlc-toast.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .nlc-toast { transition: none; } }

.nlc-tooltip {
  position: fixed;
  z-index: 10001;
  box-sizing: border-box;
  max-width: min(320px, calc(100vw - 16px));
  padding: 6px 9px;
  border: 1px solid var(--nlc-overlay-border);
  border-radius: 6px;
  background: var(--nlc-overlay-surface);
  color: var(--nlc-overlay-text);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  font: 12px/1.4 sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.nlc-overlay-surface {
  border: 1px solid var(--nlc-overlay-border);
  border-radius: var(--nlc-overlay-radius);
  background: var(--nlc-overlay-surface);
  color: var(--nlc-overlay-text);
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
}
dialog.nlc-overlay-surface::backdrop { background: rgba(0,0,0,.66); }

/* Tooltips use this same stylesheet, including dynamically-created Slash descriptions. */
#mind-map-tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  background: rgba(10, 10, 20, 0.92);
  border: 1px solid rgba(0, 212, 170, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #e6edf3;
  z-index: 100;
  max-width: 220px;
  backdrop-filter: blur(4px);
}
#mind-map-tooltip .tt-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
#mind-map-tooltip .tt-status { color: #8b949e; font-size: 11px; }
#mind-map-tooltip .tt-duration { color: #58a6ff; font-size: 11px; margin-top: 2px; }
.slash-menu-tooltip {
  position: fixed;
  background: #1c2028;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px 12px;
  max-width: 280px;
  font-size: 12px;
  line-height: 1.5;
  color: #e6edf3;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 1001;
  pointer-events: none;
}
/* Existing content modals keep their layout; these shared surface tokens win over
   legacy ID rules so popup appearance is edited here. */
:is(#schedule-editor-modal-inner, #new-team-modal-inner, #add-member-modal-inner,
    #new-agent-modal-inner, #new-freelancer-modal-inner, #member-editor-modal-inner,
    #archived-modal, #schedule-archived-modal, #relay-wizard-modal-inner,
    #settings-modal-inner, #team-builder-modal .modal-content,
    .large-paste-dialog, .workspace-side-chat-dialog, .workspace-source-details,
    .skills-search-dialog, .artifact-workspace__external-confirm,
    .artifact-workspace__command-request, .artifact-workspace__preview-feedback).nlc-overlay-surface {
  padding: var(--nlc-overlay-padding);
  font-family: inherit;
  border: 1px solid var(--nlc-overlay-border);
  border-radius: var(--nlc-overlay-radius);
  background: var(--nlc-overlay-surface);
  color: var(--nlc-overlay-text);
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
}
:is(.slash-menu-tooltip, #mind-map-tooltip) {
  border: 1px solid var(--nlc-overlay-border);
  border-radius: 6px;
  background: var(--nlc-overlay-surface);
  color: var(--nlc-overlay-text);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}

.nlc-overlay-backdrop { position:fixed; inset:0; z-index:10002; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.66); }
.nlc-question-surface { padding:var(--nlc-overlay-padding); font-family:inherit; }
.nlc-question-surface button { margin:0 8px; min-height:36px; padding:0 14px; border:1px solid var(--nlc-overlay-border); border-radius:7px; background:transparent; color:var(--nlc-overlay-text); font:inherit; cursor:pointer; }
.nlc-question-surface .nlc-question-confirm { border-color:var(--accent,#58a6ff); background:var(--accent,#58a6ff); color:#0d1117; }

#compaction-overlay-sub { display:block; margin-top:4px; font-size:12px; }
#claude-oauth-box.nlc-overlay-surface { background:var(--nlc-overlay-surface); color:var(--nlc-overlay-text); border:1px solid var(--nlc-overlay-border); border-radius:var(--nlc-overlay-radius); padding:var(--nlc-overlay-padding); box-shadow:0 24px 64px rgba(0,0,0,.45); }

/* OAuth content popup appearance is shared; no server activation performed. */
#claude-oauth-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); z-index: 10002;
  align-items: center; justify-content: center;
}
#claude-oauth-overlay.visible { display: flex; }
#claude-oauth-box {
  background: #161b22; border: 1px solid #30363d; border-radius: 16px;
  padding: 40px 36px; max-width: 420px; width: 90%; text-align: center;
  position: relative;
}
#claude-oauth-box h2 {
  font-size: 22px; font-weight: 600; color: #e6edf3; margin-bottom: 12px;
}
#claude-oauth-box p {
  font-size: 15px; color: #8b949e; margin-bottom: 28px; line-height: 1.5;
}
#claude-oauth-connect-btn {
  width: 100%; padding: 14px; background: #1f6feb; color: white;
  border: none; border-radius: 10px; font-size: 16px; font-weight: 500;
  cursor: pointer; transition: background 0.15s;
}
#claude-oauth-connect-btn:hover { background: #388bfd; }
#claude-oauth-connect-btn:disabled { opacity: 0.6; cursor: not-allowed; }
#claude-oauth-waiting {
  display: none; align-items: center; justify-content: center; gap: 10px;
  margin-top: 20px; color: #8b949e; font-size: 14px;
}
#claude-oauth-waiting.visible { display: flex; }
.oauth-spinner {
  width: 18px; height: 18px; border: 2px solid #30363d;
  border-top-color: #58a6ff; border-radius: 50%;
  animation: oauth-spin 0.8s linear infinite;
}
#claude-oauth-code-section {
  display: none; margin-top: 20px;
}
#claude-oauth-code-section.visible { display: block; }
#claude-oauth-code-input {
  width: 100%; padding: 12px; background: #0d1117; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 8px; font-size: 15px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  box-sizing: border-box; margin-bottom: 12px; text-align: center;
  letter-spacing: 1px;
}
#claude-oauth-code-input:focus {
  outline: none; border-color: #58a6ff;
}
#claude-oauth-code-input::placeholder {
  color: #484f58; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: normal;
}
#claude-oauth-code-submit {
  width: 100%; padding: 12px; background: #238636; color: white;
  border: none; border-radius: 8px; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: background 0.15s;
}
#claude-oauth-code-submit:hover { background: #2ea043; }
#claude-oauth-code-submit:disabled { opacity: 0.6; cursor: not-allowed; }
#claude-oauth-code-hint {
  font-size: 13px; color: #8b949e; margin-bottom: 14px; line-height: 1.4;
}
#claude-oauth-signin-link {
  display: none; margin-bottom: 16px;
}
#claude-oauth-signin-link a {
  display: inline-block; width: 100%; padding: 14px; background: #1f6feb; color: white;
  border-radius: 10px; font-size: 16px; font-weight: 500; text-decoration: none;
  text-align: center; transition: background 0.15s; box-sizing: border-box;
}
#claude-oauth-signin-link a:hover { background: #388bfd; }
#claude-oauth-signin-link.visible { display: block; }
#claude-oauth-error {
  display: none; color: #f85149; font-size: 13px; margin-top: 14px;
}
#claude-oauth-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: #8b949e; font-size: 22px;
  cursor: pointer; padding: 4px 8px; line-height: 1; border-radius: 6px;
  transition: background 0.15s, color 0.15s; display: none;
}
#claude-oauth-close:hover { background: rgba(255,255,255,0.08); color: #e6edf3; }
#settings-modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10001;
  align-items: center; justify-content: center;
}
#settings-modal-overlay.visible { display: flex; }
#settings-modal-inner {
  background: #161b22; border: 1px solid #30363d; border-radius: 14px;
  width: 90%; max-width: 1350px; aspect-ratio: 16/9;
  max-height: 85vh; max-height: 85dvh;
  padding: 24px; position: relative;
  display: flex; flex-direction: column;
  box-sizing: border-box;
}
@media (max-width:768px){#settings-modal-inner { aspect-ratio: auto; max-width: 95%; padding: 16px; }}
#settings-modal-inner h3 {
  font-size: 20px; font-weight: 700; margin: 0 0 16px; color: var(--text);
  flex-shrink: 0;
}
#settings-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: #8b949e; font-size: 20px;
  cursor: pointer; padding: 2px 6px; border-radius: 6px; line-height: 1;
  transition: background 0.15s, color 0.15s;
}
#settings-modal-close:hover { background: rgba(255,255,255,0.08); color: #e6edf3; }
#settings-modal-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr;
  gap: 24px;
  flex: 1;
  min-height: 0;
}
@media (max-width:768px){#settings-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }}
/* Every marked content shell uses the same design, including annotations and outline. */
.nlc-overlay-surface.nlc-overlay-surface {
 padding:var(--nlc-overlay-padding) !important; border:1px solid var(--nlc-overlay-border) !important; border-radius:var(--nlc-overlay-radius) !important; background:var(--nlc-overlay-surface) !important; color:var(--nlc-overlay-text) !important; font-family:inherit !important; box-shadow:0 24px 64px rgba(0,0,0,.45) !important;
}

#member-delete-dialog .nlc-question-surface {text-align:center;min-width:280px;max-width:520px;width:calc(100% - 48px);max-height:80vh;overflow:auto;}
#member-delete-title {margin:0 0 16px;font-size:16px;overflow-wrap:anywhere;}
#member-delete-dialog .nlc-question-detail {margin:0 0 16px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;}

/* Actionable Undo notices retain their placement and callbacks; appearance lives here. */
.response-annotation-undo {
  position: sticky;
  z-index: 35;
  bottom: 12px;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0 auto 12px;
  padding: 9px 12px;
  border: 1px solid var(--nlc-overlay-border);
  border-radius: 10px;
  background: var(--nlc-overlay-surface);
  color: var(--nlc-overlay-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  font-size: 13px;
}
.response-annotation-undo button {
  border: 0;
  background: transparent;
  color: var(--nlc-overlay-text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.large-paste-undo { min-height:44px; border:1px solid var(--nlc-overlay-border); border-radius:8px; background:var(--nlc-overlay-surface); color:var(--nlc-overlay-text); cursor:pointer; }
