.profile-pair-settings {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: 24px;
    margin-block-start: 24px;
    scroll-margin-top: 24px;
}

.profile-pair-settings form { min-width: 0; }
.profile-pair-summary { padding: 16px; border-radius: 12px; background: var(--paper); }
.profile-pair-summary p { font-size: 14px; }
@media (max-width: 640px) {
    .profile-pair-settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

.profile-pair-controls {
    min-inline-size: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    margin: 0 0 14px;
}

.profile-pair-controls legend {
    margin-bottom: 8px;
    font-weight: 800;
}

.profile-pair-search {
    margin-bottom: 10px;
}

.profile-pair-search label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.profile-pair-options {
    display: grid;
    gap: 5px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 5px;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: var(--paper);
}

.profile-pair-options .profile-pair-option {
    display: grid;
    grid-template-columns: 18px 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 46px;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    overflow-wrap: anywhere;
}

.profile-pair-option:first-child { grid-template-columns: 18px minmax(0, 1fr); }
.profile-pair-option:hover { background: var(--white); }
.profile-pair-option:has(:checked) {
    border-color: var(--ink);
    background: var(--yellow-2);
}

.profile-pair-option:has(:focus-visible) { outline: 2px solid var(--blue); }

.profile-pair-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--blue);
}

.profile-pair-option img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    background: var(--white);
    border: 1px solid var(--ink);
    border-radius: 8px;
}

.profile-pair-option small { display: block; color: #51483b; }
.profile-pair-options .profile-pair-empty { margin: 0; padding: 10px; }
.profile-pair-options [hidden], .profile-pair-search[hidden] { display: none; }

.fur-profile-tv:has(> .fur-profile-partner) {
    display: flex;
    align-items: flex-end;
    column-gap: 5px;
}

:is(.fur-profile-tv, .profile-pair-settings) a.fur-profile-partner {
    position: relative;
    display: inline-grid;
    justify-items: center;
    gap: 5px;
    width: 104px;
    max-width: 100%;
    padding-top: 14px;
    color: var(--ink);
    text-decoration: none;
}

.fur-profile-tv > a.fur-profile-partner { z-index: 3; flex: 0 0 88px; }

/* The patch cord sits in front of the cases, with a plug on each bezel. */
.fur-profile-tv > .fur-profile-partner::after {
    content: "";
    position: absolute;
    pointer-events: none;
    left: -29px;
    top: 40px;
    width: 48px;
    height: 48px;
    background: url("../img/profile-pair-cable.svg") center / contain no-repeat;
}

.fur-profile-partner-tv {
    position: relative;
    display: grid;
    grid-template-columns: 56px 11px;
    gap: 4px;
    padding: 5px;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 3px 3px 0 var(--ink);
    rotate: 3deg;
}

.fur-profile-partner-tv::before,
.fur-profile-partner-tv::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 48%;
    width: 3px;
    height: 17px;
    border-radius: 2px;
    background: var(--ink);
    transform-origin: bottom;
}

.fur-profile-partner-tv::before { rotate: -32deg; }
.fur-profile-partner-tv::after { rotate: 27deg; }

.fur-profile-partner-tv img {
    display: block;
    width: 56px;
    height: 56px;
    aspect-ratio: 1;
    object-fit: cover;
    border: 2px solid var(--ink);
    border-radius: 9px;
    background: var(--yellow);
}

.fur-profile-partner-knobs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-block: 2px 3px;
    background: repeating-linear-gradient(var(--ink) 0 1px, transparent 1px 3px) center bottom / 9px 7px no-repeat;
}

.fur-profile-partner-knobs::before,
.fur-profile-partner-knobs::after {
    content: '';
    width: 11px;
    height: 11px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: var(--red);
}

.fur-profile-partner-knobs::after { background: var(--yellow); }

.fur-profile-partner-name {
    box-sizing: border-box;
    max-width: 100%;
    padding: 3px 6px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: var(--yellow-2);
    font: 800 13px/1.25 var(--f-body);
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.fur-profile-partner:hover .fur-profile-partner-name {
    background: var(--yellow);
}

.fur-profile-partner:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.is-positioning-sticker .fur-profile-partner {
    pointer-events: none;
}
