  .config-sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 62vh;
    max-height: 580px;
    background: rgba(13, 11, 10, 0.86);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    border-top: 1px solid rgba(220, 170, 100, 0.22);
    transform: translateY(100%);
    transition: transform 0.55s cubic-bezier(0.7, 0, 0.2, 1);
    z-index: 32;
    overflow-y: auto;
    padding: 32px 36px 100px;
    display: flex; flex-direction: column;
  }
  .config-sheet.open { transform: translateY(0); }
  .config-sheet::-webkit-scrollbar { width: 4px; }
  .config-sheet::-webkit-scrollbar-track { background: transparent; }
  .config-sheet::-webkit-scrollbar-thumb { background: var(--bone-15); border-radius: 2px; }

  .config-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--bone-08);
  }
  .config-header-left { display: flex; align-items: center; gap: 14px; }
  .config-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--bone-30);
  }
  .config-title {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 28px;
    line-height: 1;
    color: var(--bone);
    margin-top: 4px;
    display: block;
  }
  .config-title.coral { color: var(--april); }
  .config-title.teal  { color: var(--tk); }
  .config-close {
    background: none; border: none; padding: 6px 10px;
    color: var(--bone-50); cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
    transition: color 0.2s ease;
  }
  .config-close:hover { color: var(--gold-icon); }

  .config-section { margin-bottom: 24px; }
  .config-section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--bone-30);
    margin-bottom: 10px;
  }
  .config-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--bone-08);
    gap: 16px;
  }
  .config-row:last-child { border-bottom: none; }
  .config-row-label {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    color: var(--bone-70);
    flex-shrink: 0;
  }
  .config-row-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--gold-icon-soft);
    text-align: right;
  }

  .config-input,
  .config-select,
  .config-textarea {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(220, 170, 100, 0.22);
    border-radius: 3px;
    padding: 10px 14px;
    font-family: 'Fraunces', serif;
    font-size: 16px;
    color: var(--bone);
    width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease;
  }
  .config-input:focus,
  .config-select:focus,
  .config-textarea:focus {
    outline: none;
    border-color: rgba(220, 170, 100, 0.55);
    background: rgba(50, 35, 18, 0.18);
  }
  .config-textarea {
    resize: vertical;
    min-height: 84px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
  }
  .config-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1L6 6L11 1' stroke='%23c4a878' stroke-width='1.2' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
  }

  /* Toggle switch — gold-accent */
  .config-toggle {
    position: relative;
    width: 42px; height: 22px;
    border-radius: 11px;
    background: rgba(245, 240, 232, 0.08);
    border: 1px solid rgba(220, 170, 100, 0.22);
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;
  }
  .config-toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bone-50);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), background 0.3s ease;
  }
  .config-toggle.on {
    background: rgba(70, 48, 28, 0.45);
    border-color: rgba(220, 170, 100, 0.55);
  }
  .config-toggle.on::after {
    transform: translateX(20px);
    background: var(--gold-icon);
    box-shadow: 0 0 8px rgba(232, 196, 120, 0.55);
  }

  /* Color signature swatch row */
  .signature-swatches {
    display: flex; gap: 10px;
    margin-top: 8px;
  }
  .signature-swatch {
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid var(--bone-15);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .signature-swatch.selected {
    border-color: var(--gold-icon);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(232, 196, 120, 0.45);
  }

  /* Agent identity block — top of resident sheet */
  .agent-identity {
    display: flex; align-items: center; gap: 18px;
    padding: 18px;
    background: rgba(50, 35, 18, 0.14);
    border: 1px solid rgba(220, 170, 100, 0.22);
    border-radius: 6px;
    margin-bottom: 22px;
  }
  .agent-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background:
      radial-gradient(circle at 35% 30%, rgba(255, 220, 180, 0.6), transparent 65%),
      radial-gradient(circle at 50% 50%, rgba(255, 138, 101, 0.6), rgba(120, 50, 80, 0.4));
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(255, 138, 101, 0.32);
  }
  .agent-avatar.teal {
    background:
      radial-gradient(circle at 35% 30%, rgba(220, 250, 240, 0.6), transparent 65%),
      radial-gradient(circle at 50% 50%, rgba(94, 234, 212, 0.6), rgba(40, 100, 110, 0.4));
    box-shadow: 0 0 18px rgba(94, 234, 212, 0.32);
  }
  .agent-avatar.amethyst {
    background:
      radial-gradient(circle at 35% 30%, rgba(230, 210, 255, 0.6), transparent 65%),
      radial-gradient(circle at 50% 50%, rgba(184, 122, 255, 0.6), rgba(70, 30, 110, 0.4));
    box-shadow: 0 0 18px rgba(184, 122, 255, 0.32);
  }
  .agent-identity-text { flex: 1; min-width: 0; }
  .agent-identity-name {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 22px;
    color: var(--bone);
    line-height: 1;
  }
  .agent-identity-role {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-icon-soft);
    margin-top: 6px;
  }
  .agent-identity-action {
    background: none; border: 1px solid rgba(220, 170, 100, 0.32);
    border-radius: 3px;
    padding: 8px 14px;
    color: var(--gold-icon-soft);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .agent-identity-action:hover {
    color: var(--gold-icon);
    border-color: rgba(220, 170, 100, 0.55);
    background: rgba(50, 35, 18, 0.32);
  }

  /* Agent picker strip — scales to many agents */
  .agent-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--bone-08);
  }
  .agent-chip {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 14px 7px 10px;
    background: rgba(245, 240, 232, 0.03);
    border: 1px solid var(--bone-08);
    border-radius: 999px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bone-50);
    transition: all 0.2s ease;
    user-select: none;
  }
  .agent-chip:hover {
    color: var(--bone);
    background: rgba(50, 35, 18, 0.18);
    border-color: rgba(220, 170, 100, 0.32);
  }
  .agent-chip .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
    flex-shrink: 0;
  }
  .agent-chip.active {
    color: var(--gold-icon);
    background: rgba(50, 35, 18, 0.35);
    border-color: rgba(220, 170, 100, 0.55);
    box-shadow: 0 0 14px rgba(232, 196, 120, 0.18);
  }

  .agent-identity-domain {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bone-50);
    margin-top: 4px;
  }

  /* Reset button — destructive-but-elegant action */
  .reset-section {
    margin-top: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--bone-08);
  }
  .config-reset {
    background: none;
    border: 1px solid rgba(196, 80, 64, 0.35);
    border-radius: 3px;
    padding: 10px 18px;
    color: var(--copper-icon);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .config-reset:hover {
    color: #ffb09c;
    border-color: rgba(232, 144, 128, 0.65);
    background: rgba(86, 32, 22, 0.22);
    box-shadow: 0 0 14px rgba(232, 144, 128, 0.18);
  }
  .config-reset-note {
    margin-top: 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--bone-30);
    line-height: 1.5;
  }
