/* Shared control finish. Native semantics and existing multi-state choices remain intact. */
:is(.application-shell-v2, .auth-page) {
    --control-surface: #151515;
    --control-border: #ffffff26;
    --control-ink: var(--color-gray-200);
    --control-radius: 10px;
}
:is(.application-shell-v2, .auth-page) button { font-family: inherit; }
.application-shell-v2 .btn { text-align: center; white-space: normal; }
.application-shell-v2 .btn > :is(svg, span) { min-width: 0; }
.application-shell-v2 .btn > svg { flex: 0 0 auto; }
.application-shell-v2 .profile-hero-icon-action > svg { width: 21px; height: 21px; }
.application-shell-v2 .profile-hero-icon-action[aria-pressed='true'] > svg { fill: currentColor; }
.application-shell-v2 :is(.icon-btn, .calendar-icon-button, .kinky-tech-device-menu, [data-profile-preview-carousel-nav], [data-album-viewer-nav]) {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    min-width: 36px; min-height: 36px; padding: 8px; line-height: 1;
}
.application-shell-v2 :is(.icon-btn, .calendar-icon-button, .kinky-tech-device-menu, [data-profile-preview-carousel-nav], [data-album-viewer-nav]) > .ui-icon { width: 18px; height: 18px; }
/* The SVG replaces the old dots, it is not an additional decoration. */
.application-shell-v2 :is(.media-album-menu, .kinky-tech-device-menu):has(svg)::before,
.application-shell-v2 .bdsm-relationship-close:has(svg)::before,
.application-shell-v2 .bdsm-relationship-close:has(svg)::after,
.application-shell-v2 .kinky-tech-device-menu:has(svg)::after,
.application-shell-v2 .kinky-tech-device-menu:has(svg) span::before { content: none; }
.application-shell-v2 .section-help-trigger { flex-shrink: 0; cursor: help; border-radius: 50%; }
.application-shell-v2 .section-help-trigger:hover { color: var(--color-gray-100); background: #ffffff0b; }
.application-shell-v2 .section-help-trigger:focus-visible { outline: 2px solid var(--color-accent-light); outline-offset: 2px; }
.application-shell-v2 .section-heading { align-items: center; flex-wrap: wrap; }
.application-shell-v2 .section-heading > :is(h2, h3, h4) { margin: 0; }
.application-shell-v2 :is(.section-title, .section-heading) > .section-help { align-self: center; }
.application-shell-v2 :is(.field, .workspace-field, .profile-inline-select, .relation-identity-picker) { min-width: 0; }
:is(.application-shell-v2, .auth-page) select:not([multiple]):not([size]) {
    appearance: none; min-height: 42px; padding: 10px 36px 10px 12px;
    color: var(--control-ink); background-color: var(--control-surface);
    background-image: url('/assets/icons/chevron-down.svg'); background-repeat: no-repeat;
    background-position: right 12px center; background-size: 16px;
    border: 1px solid var(--control-border); border-radius: var(--control-radius);
    font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer;
    max-width: 100%; text-overflow: ellipsis;
}
:is(.application-shell-v2, .auth-page) select option { background: var(--control-surface); color: var(--control-ink); }
:is(.application-shell-v2, .auth-page) select:disabled { opacity: .55; cursor: not-allowed; }
:is(.application-shell-v2, .auth-page) select:focus-visible { outline: 2px solid #c41e3a66; outline-offset: 2px; border-color: var(--color-accent-light); }
.application-shell-v2 .application-shell-language select:not([multiple]):not([size]) { width: 68px; padding-left: 10px; font-size: 12px; }
/* Standard binary controls only: do not change personae or multi-state practice markers. */
:is(.application-shell-v2, .auth-page) input:is([type='checkbox'], [type='radio']):not(.multi-state-choice > input) {
    appearance: none; display: inline-grid; place-items: center; flex: 0 0 18px;
    width: 18px; min-width: 18px; max-width: 18px; height: 18px; min-height: 18px; max-height: 18px;
    padding: 0; margin: 0; vertical-align: middle; border: 1px solid #ffffff40;
    border-radius: 5px; background: var(--control-surface); color: #fff; cursor: pointer;
    transition: border-color 140ms ease, background-color 140ms ease;
}
:is(.application-shell-v2, .auth-page) input[type='checkbox']:not(.multi-state-choice > input)::before {
    content: ''; display: block; width: 5px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0;
    transform: translateY(-1px) rotate(45deg) scale(0); transition: transform 120ms ease;
}
:is(.application-shell-v2, .auth-page) input[type='checkbox']:checked:not(.multi-state-choice > input)::before { transform: translateY(-1px) rotate(45deg) scale(1); }
:is(.application-shell-v2, .auth-page) input[type='checkbox']:indeterminate:not(.multi-state-choice > input)::before { width: 8px; height: 0; border-width: 0 0 2px; transform: none; }
:is(.application-shell-v2, .auth-page) input[type='radio']:not(.multi-state-choice > input) { border-radius: 50%; }
:is(.application-shell-v2, .auth-page) input[type='radio']::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; transform: scale(0); }
:is(.application-shell-v2, .auth-page) input[type='radio']:checked::before { transform: scale(1); }
:is(.application-shell-v2, .auth-page) input:is([type='checkbox'], [type='radio']):is(:checked, :indeterminate):not(.multi-state-choice > input) { border-color: var(--color-accent-light); background: var(--color-accent); }
:is(.application-shell-v2, .auth-page) input:is([type='checkbox'], [type='radio']):focus-visible { outline: 2px solid #e6394680; outline-offset: 3px; }
:is(.application-shell-v2, .auth-page) input:is([type='checkbox'], [type='radio']):disabled { opacity: .45; cursor: not-allowed; }
.application-shell-v2 :is(.conversation-compose-actions, .workspace-actions, .profile-save-actions, .media-form-actions) { align-items: center; gap: 10px; }
.application-shell-v2 :is(.conversation-compose-actions, .media-command-risk, .discovery-action-risk) label,
.application-shell-v2 :is(.workspace-check, .media-command-risk, .discovery-action-risk) { align-items: center; gap: 9px; line-height: 1.5; }
.application-shell-v2 .conversation-compose-actions > label { display: inline-flex; min-height: 36px; font-size: 12px; }
.application-shell-v2 .profile-preview-disclosure-action { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.application-shell-v2 .profile-preview-disclosure-action::after { content: ''; width: 16px; height: 16px; margin: 0; background: url('/assets/icons/chevron-down.svg') center / contain no-repeat; }
.application-shell-v2 .profile-preview-disclosure[open] .profile-preview-disclosure-action { font-size: .8rem; }
.application-shell-v2 .profile-preview-disclosure[open] .profile-preview-disclosure-action::before { content: none; }
.profile-preview-disclosure:not([open]) .disclosure-hide, .profile-preview-disclosure[open] .disclosure-show { display: none; }
@media (max-width: 700px) {
    .application-shell-v2 .application-shell-language select:not([multiple]):not([size]) { min-height: 36px; width: 60px; padding: 6px 26px 6px 8px; background-position: right 7px center; background-size: 13px; }
    .application-shell-v2 .topbar > :first-child { min-width: 0; }
    .application-shell-v2 .topbar-actions { width: auto; }
    .application-shell-v2 .section-title > div { text-align: left; }
    .application-shell-v2 .profile-preview-disclosure > summary { gap: 12px; padding: 14px; }
    .application-shell-v2 .profile-preview-disclosure-action { max-width: 110px; text-align: right; }
}
@media (forced-colors: active) {
    :is(.application-shell-v2, .auth-page) input:is([type='checkbox'], [type='radio']):not(.multi-state-choice > input) { appearance: auto; }
    :is(.application-shell-v2, .auth-page) input:is([type='checkbox'], [type='radio'])::before { content: none; }
    :is(.application-shell-v2, .auth-page) select:not([multiple]):not([size]) { appearance: auto; background-image: none; }
}
