.agent-center-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.025);
    text-decoration: none;
    font-size: 12px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.agent-center-link:hover {
    color: var(--text);
    border-color: rgba(245,160,184,.26);
    background: rgba(245,160,184,.07);
}
.agent-center-link svg {
    width: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.agent-selector {
    position: relative;
    z-index: 14;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 9px;
    padding: 0 3px;
}
.agent-selector.is-open { z-index: 60; }
.agent-selector-title {
    flex: 0 0 auto;
    color: var(--text-tertiary);
    font-size: 10px;
    letter-spacing: .04em;
}
.agent-selector-control {
    position: relative;
    min-width: 0;
    flex: 1;
}
.agent-selector-trigger {
    width: 100%;
    height: 35px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0 10px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.028);
    cursor: pointer;
    text-align: left;
    transition: border-color .2s, background .2s, color .2s;
}
.agent-selector-trigger:hover,
.agent-selector.is-open .agent-selector-trigger {
    color: var(--text);
    border-color: rgba(245,160,184,.3);
    background: rgba(245,160,184,.065);
}
.agent-selector-trigger > svg:first-child {
    width: 15px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.agent-selector-trigger .selector-chevron {
    width: 14px;
    margin-left: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    transition: transform .2s;
}
.agent-selector.is-open .selector-chevron { transform: rotate(180deg); }
.agent-selector-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}
.agent-selector-status {
    flex: 0 0 auto;
    padding: 3px 6px;
    border-radius: 999px;
    color: #d8bfc8;
    background: rgba(245,160,184,.1);
    font-size: 8px;
}
.agent-selector-menu {
    position: absolute;
    z-index: 61;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    max-height: 310px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(27,27,31,.98);
    box-shadow: 0 18px 55px rgba(0,0,0,.46);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.agent-selector-menu[hidden] { display: none; }
.agent-option-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 30px;
    align-items: center;
    gap: 4px;
    border-radius: 10px;
}
.agent-option-row:hover { background: rgba(255,255,255,.035); }
.agent-option {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    padding: 9px 8px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    text-align: left;
}
.agent-option.is-selected { color: var(--text); }
.agent-option-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    background: rgba(255,255,255,.035);
    font-size: 15px;
}
.agent-option-copy { min-width: 0; }
.agent-option-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}
.agent-option-desc {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-tertiary);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
}
.agent-option-help {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--text-tertiary);
    background: transparent;
    cursor: help;
}
.agent-option-help:hover {
    color: var(--pink-soft);
    border-color: rgba(245,160,184,.25);
    background: rgba(245,160,184,.08);
}
.agent-option-help svg {
    width: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}
.agent-selector-empty {
    padding: 18px 12px;
    color: var(--text-tertiary);
    text-align: center;
    font-size: 10px;
}

.agent-help-popover {
    position: fixed;
    inset: 0;
    z-index: 2300;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(5,5,8,.67);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.agent-help-popover[hidden] { display: none; }
.agent-help-card {
    width: min(480px, 100%);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: #202024;
    box-shadow: 0 25px 80px rgba(0,0,0,.52);
}
.agent-help-head {
    display: grid;
    grid-template-columns: 34px 1fr 32px;
    align-items: center;
    gap: 10px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border-soft);
}
.agent-help-head > svg {
    width: 32px;
    height: 32px;
    padding: 8px;
    border: 1px solid rgba(245,160,184,.22);
    border-radius: 10px;
    fill: none;
    stroke: var(--pink-soft);
    stroke-width: 1.8;
    stroke-linecap: round;
}
.agent-help-head h3 { margin: 0; font-size: 13px; }
.agent-help-head span { display: block; margin-bottom: 3px; color: var(--text-tertiary); font-size: 9px; }
.agent-help-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    color: var(--text-tertiary);
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}
.agent-help-close:hover { color: var(--text); background: rgba(255,255,255,.05); }
.agent-help-content {
    max-height: 55vh;
    overflow: auto;
    margin: 0;
    padding: 18px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.8;
}
.ai-identity-label {
    margin: 0 0 6px;
    color: var(--text-tertiary);
    font-size: 9px;
    letter-spacing: .03em;
}

@media (max-width: 768px) {
    .agent-selector { margin-bottom: 7px; }
    .agent-selector-title { display: none; }
    .agent-selector-menu { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); max-height: min(55dvh, 360px); }
    .agent-option-desc { max-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
    .agent-selector *, .agent-help-popover * { transition: none !important; }
}
