/* Settings navigation overrides the shared segmented-control treatment.
   Settings is a workspace with a navigation rail, so its pages need a
   vertical control instead of a single connected row. */
.settings-panel .settings-tabs {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    gap: 3px !important;
    margin-top: 28px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.settings-panel .settings-tabs button,
.settings-panel .settings-tabs button:hover,
.settings-panel .settings-tabs button:focus-visible,
.settings-panel .settings-tabs button.active {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-left: 0 !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
    text-align: left;
}

.settings-panel .settings-tabs button:hover,
.settings-panel .settings-tabs button.active {
    color: var(--text-primary) !important;
    background: var(--surface-selected) !important;
}

.settings-panel .settings-tabs button.active::after {
    display: none !important;
}

@media (max-width: 760px) {
    .settings-panel .settings-tabs {
        flex-direction: row !important;
        align-items: center;
        overflow-x: auto;
    }

    .settings-panel .settings-tabs button,
    .settings-panel .settings-tabs button:hover,
    .settings-panel .settings-tabs button:focus-visible,
    .settings-panel .settings-tabs button.active {
        width: auto !important;
        min-width: max-content !important;
        text-align: center;
    }
}

/* Settings uses the same full-height product rail as Chat and Music.  The
   page content remains the settings workspace; only its navigation becomes
   a proper rail instead of a floating menu. */
@media (min-width: 761px) {
    main:has(.settings-panel.active) {
        padding: 0 !important;
        overflow: hidden !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }

    .settings-panel.active,
    .settings-panel.active:has(.settings-page[data-page="profile"].active) {
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        min-height: 100% !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: stretch !important;
    }

    .settings-window {
        width: 100%;
        height: 100%;
        min-height: 100%;
        display: grid !important;
        grid-template-columns: var(--product-sidebar-width, 224px) minmax(0, 1fr) !important;
        gap: 0 !important;
        align-items: stretch !important;
    }

    .settings-top {
        position: relative !important;
        inset: auto !important;
        align-self: stretch !important;
        height: 100% !important;
        min-height: 100% !important;
        box-sizing: border-box;
        padding: 16px 10px 12px !important;
        background: var(--sidebar) !important;
        border-right: 1px solid var(--product-divider, var(--border)) !important;
        border-bottom: 0 !important;
    }

    .settings-eyebrow { display: none !important; }

    .settings-top .settings-subtitle { display: none !important; }

    .settings-panel .settings-tabs {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    .settings-panel .settings-tabs button,
    .settings-panel .settings-tabs button:hover,
    .settings-panel .settings-tabs button:focus-visible,
    .settings-panel .settings-tabs button.active {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 35px !important;
        height: 35px !important;
        box-sizing: border-box;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 0 10px !important;
        border: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        outline: 0 !important;
        border-radius: var(--radius-md) !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--muted) !important;
        font: 500 12.5px/1 var(--font-body) !important;
        text-align: left;
        transition: background var(--speed) var(--curve), color var(--speed) var(--curve);
    }

    .settings-panel .settings-tabs button:hover,
    .settings-panel .settings-tabs button.active {
        background: var(--surface-selected) !important;
        color: var(--text) !important;
    }

    .settings-tab-icon {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
        display: grid;
        place-items: center;
        color: var(--muted-dim);
    }

    .settings-tab-icon svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .settings-panel .settings-tabs button:hover .settings-tab-icon,
    .settings-panel .settings-tabs button.active .settings-tab-icon {
        color: var(--accent);
    }

    .settings-scroll {
        min-width: 0;
        height: 100%;
        max-height: none !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding: 30px clamp(22px, 5vw, 68px) 56px !important;
        background: var(--bg);
    }

    .settings-content-heading,
    .settings-page {
        width: min(100%, 820px) !important;
        max-width: 820px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: left !important;
    }
}

@media (max-width: 760px) {
    .settings-panel.active,
    .settings-panel.active:has(.settings-page[data-page="profile"].active) {
        width: 100% !important;
        max-width: none !important;
        min-height: 100%;
        padding: 18px 14px 42px !important;
    }

    .settings-top h1 { display: none !important; }
    .settings-tab-icon { display: none; }
}

/* The rail is intentionally quiet: Chat and Music do not repeat their
   workspace name above the navigation, so Settings should not either. */
.settings-top h1,
.settings-top .settings-eyebrow {
    display: none !important;
}

.settings-top {
    padding-top: 12px !important;
}

.settings-content-kicker {
    display: none !important;
}

.settings-content-heading,
.settings-page {
    text-align: left !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.settings-panel .settings-content-heading h2,
.settings-panel .settings-content-heading p {
    text-align: left !important;
}

.settings-content-heading {
    margin-top: 0 !important;
}

.settings-panel .settings-tabs {
    border-left: 0 !important;
    border-right: 0 !important;
    margin-left: -2px !important;
    margin-right: -2px !important;
}

.settings-panel .settings-tabs button,
.settings-panel .settings-tabs button:hover,
.settings-panel .settings-tabs button:focus,
.settings-panel .settings-tabs button:focus-visible,
.settings-panel .settings-tabs button.active {
    border: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background-image: none !important;
    width: calc(100% + 2px) !important;
}

.settings-panel .settings-tabs button::before,
.settings-panel .settings-tabs button::after {
    content: none !important;
    display: none !important;
}

/* product-cohesion joins the old segmented-tab treatment with a left rule on
   every button after the first; the Settings rail is a vertical nav, so none
   of its buttons should inherit that rule. */
.settings-panel .settings-tabs button + button,
.settings-panel .settings-tabs button + button:hover,
.settings-panel .settings-tabs button + button:focus,
.settings-panel .settings-tabs button + button:focus-visible,
.settings-panel .settings-tabs button + button.active {
    border-left: 0 !important;
}

/* Reference-style Settings layout: small section labels sit above a quiet,
   connected surface instead of turning every group into a large card. */
.settings-content-heading {
    margin-bottom: 22px !important;
}

.settings-panel .settings-content-heading h2 {
    color: var(--muted-dim) !important;
    font: 500 10px/1 var(--font-mono) !important;
    letter-spacing: .14em !important;
    text-transform: uppercase;
}

.settings-panel .settings-content-heading p {
    display: none !important;
}

.settings-panel .settings-page > .settings-group {
    overflow: visible !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.settings-panel .settings-page > .settings-group > h3 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: var(--muted-dim) !important;
    font: 500 10px/1 var(--font-mono) !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
}

.settings-panel .settings-page > .settings-group > .theme-section-caption {
    margin: -2px 0 11px !important;
    padding: 0 !important;
    color: var(--muted-dim) !important;
    font-size: 10px !important;
    line-height: 1.45;
}

.settings-panel .settings-page > .settings-group > .setting-row {
    min-height: 64px;
    box-sizing: border-box;
    padding: 13px 16px !important;
    background: var(--surface) !important;
    border-top: 1px solid var(--border-subtle) !important;
    border-right: 1px solid var(--border-subtle) !important;
    border-left: 1px solid var(--border-subtle) !important;
    border-radius: 0 !important;
}

.settings-panel .settings-page > .settings-group > .setting-row:first-of-type {
    border-top-left-radius: var(--radius-md) !important;
    border-top-right-radius: var(--radius-md) !important;
}

.settings-panel .settings-page > .settings-group > .setting-row:last-child {
    border-bottom: 1px solid var(--border-subtle) !important;
    border-bottom-left-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

.settings-panel .settings-page > .settings-group > .setting-row:only-of-type {
    border-radius: var(--radius-md) !important;
}

.settings-panel .settings-page > .settings-group .row-info > span {
    color: var(--text) !important;
    font-size: 13px;
    font-weight: 500;
}

.settings-panel .settings-page > .settings-group .row-info > small {
    color: var(--muted-dim) !important;
    font-size: 10px;
}

/* Theme cards use the compact four-column palette treatment from the
   reference while keeping the existing theme data and click behavior. */
.settings-panel .settings-page > .settings-group:has(.theme-grid) {
    overflow: visible !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.settings-panel .settings-page > .settings-group:has(.theme-grid) > h3 {
    margin-bottom: 10px !important;
}

.settings-panel .theme-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 !important;
}

.settings-panel .theme-card {
    min-height: 88px !important;
    box-sizing: border-box;
    padding: 13px !important;
    gap: 8px !important;
    border: 1px solid color-mix(in srgb, var(--border) 85%, transparent) !important;
    border-radius: 12px !important;
    background: var(--surface-2) !important;
    transition: border-color var(--speed) var(--curve), transform var(--speed) var(--curve), filter var(--speed) var(--curve) !important;
}

.settings-panel .theme-card:hover {
    border-color: var(--border-strong) !important;
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.settings-panel .theme-card.active {
    border: 2px solid var(--text) !important;
    padding: 12px !important;
}

.settings-panel .theme-card strong {
    font-size: 12px !important;
    font-weight: 600 !important;
}

.settings-panel .theme-card small {
    font-size: 10px !important;
}

.settings-panel .theme-card[data-theme-id="carbon"] { background: #080909 !important; }
.settings-panel .theme-card[data-theme-id="ember"] { background: #2b1a11 !important; }
.settings-panel .theme-card[data-theme-id="verdant"] { background: #07120b !important; }
.settings-panel .theme-card[data-theme-id="mint"] { background: #071714 !important; }
.settings-panel .theme-card[data-theme-id="vapor"] { background: #100b1b !important; }
.settings-panel .theme-card[data-theme-id="ocean"] { background: #08121c !important; }
.settings-panel .theme-card[data-theme-id="dusk"] { background: #0b0d1b !important; }
.settings-panel .theme-card[data-theme-id="cherryblossom"] { background: #f4e7ec !important; }

@media (max-width: 980px) {
    .settings-panel .theme-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .settings-panel .theme-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Restore the individual section hierarchy inside grouped pages. */
.settings-collection {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.settings-collection > h3 {
    margin: 0 0 12px !important;
    padding: 0 !important;
    color: var(--muted-dim) !important;
    font: 500 10px/1 var(--font-mono) !important;
    letter-spacing: .08em !important;
    text-transform: uppercase;
}

.settings-collection > .settings-group {
    overflow: hidden;
    margin: 0 0 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.settings-collection > .settings-group h3 {
    margin: 0 !important;
    padding: 15px 16px 4px !important;
    color: var(--text) !important;
    font: 600 13px/1.2 var(--font-body) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.settings-collection > .settings-group .theme-section-caption {
    margin: 0 !important;
    padding: 0 16px 13px !important;
    color: var(--muted-dim) !important;
    font-size: 11px;
}

.settings-collection > .settings-group .setting-row {
    border-left: 0;
    border-right: 0;
    border-radius: 0 !important;
}

.settings-collection > .settings-group .setting-row:first-of-type {
    border-top-color: var(--border);
}

.settings-collection > .settings-subdivider {
    display: none !important;
}

/* Standalone groups use the same restored section surface when the page is
   not being flattened into collections. */
.settings-panel .settings-page > .settings-group {
    overflow: hidden;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
}

.settings-panel .settings-page > .settings-group:has(.theme-grid) {
    padding: 16px !important;
}

.settings-page > .settings-group:not(:has(.theme-grid)):not(.credits-group) {
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
}

.settings-page > .settings-group:not(:has(.theme-grid)):not(.credits-group) > h3 {
    margin: 0 !important;
    padding: 15px 16px 4px !important;
    color: var(--text) !important;
    font: 600 13px/1.2 var(--font-body) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.settings-page > .settings-group:not(:has(.theme-grid)):not(.credits-group) > .theme-section-caption {
    margin: 0 !important;
    padding: 0 16px 13px !important;
}

.settings-page > .settings-group:not(:has(.theme-grid)):not(.credits-group) > .setting-row {
    border-left: 0;
    border-right: 0;
    border-radius: 0 !important;
    background: var(--surface) !important;
}

/* Final density pass: section labels stay outside the connected surfaces,
   while every control row shares one compact rhythm. */
.settings-panel .settings-scroll {
    padding-top: 24px !important;
    padding-bottom: 40px !important;
}

.settings-panel .settings-content-heading {
    margin-bottom: 16px !important;
}

.settings-panel .settings-page > .settings-group,
.settings-panel .settings-page > .settings-group:not(:has(.theme-grid)),
.settings-panel .settings-page > .settings-group:has(.theme-grid) {
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.settings-panel .settings-page > .settings-group > h3 {
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: var(--muted-dim) !important;
    font: 500 9px/1.2 var(--font-mono) !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
}

/* Match the specificity of the legacy group rule so section labels cannot
   become large white card headings again. */
.settings-panel .settings-page > .settings-group:not(:has(.theme-grid)):not(.credits-group) > h3,
.settings-panel .settings-page > .settings-group:has(.theme-grid) > h3 {
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: var(--muted-dim) !important;
    font: 500 9px/1.2 var(--font-mono) !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
}

.settings-panel .settings-page > .settings-group > .theme-section-caption {
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: var(--muted-dim) !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
}

.settings-panel .settings-page > .settings-group:not(:has(.theme-grid)):not(.credits-group) > .theme-section-caption,
.settings-panel .settings-page > .settings-group:has(.theme-grid) > .theme-section-caption {
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: var(--muted-dim) !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
}

.settings-panel .settings-page > .settings-group > .setting-row {
    min-height: 56px !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    gap: 16px !important;
    border-top: 1px solid var(--border-subtle) !important;
    border-right: 1px solid var(--border-subtle) !important;
    border-left: 1px solid var(--border-subtle) !important;
    border-radius: 0 !important;
    background: var(--surface) !important;
}

.settings-panel .settings-page > .settings-group > .setting-row:first-of-type {
    border-top-left-radius: var(--radius-md) !important;
    border-top-right-radius: var(--radius-md) !important;
}

.settings-panel .settings-page > .settings-group > .setting-row:last-child {
    border-bottom: 1px solid var(--border-subtle) !important;
    border-bottom-left-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

.settings-panel .settings-page > .settings-group > .setting-row:only-of-type {
    border-radius: var(--radius-md) !important;
}

.settings-panel .settings-page > .settings-group > .setting-row.setting-row-stacked {
    min-height: 70px !important;
    align-items: flex-start !important;
}

.settings-panel .settings-page > .settings-group .row-info > span {
    font-size: 12px !important;
    line-height: 1.25 !important;
}

.settings-panel .settings-page > .settings-group .row-info > small {
    margin-top: 3px !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
}

/* Both theme grids use the exact same track sizing and gap. This prevents a
   second custom-theme grid (when present) from introducing a different row
   rhythm than the preset grid above it. */
.settings-panel .settings-page > .settings-group:has(.theme-grid) > h3 {
    margin-bottom: 7px !important;
}

.settings-panel .settings-page > .settings-group:has(.theme-grid) > .theme-section-caption {
    margin-bottom: 9px !important;
}

.settings-panel .theme-grid {
    display: grid !important;
    grid-auto-rows: 88px !important;
    align-items: stretch !important;
    align-content: start !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.settings-panel .theme-grid + .theme-grid {
    margin-top: 8px !important;
}

.settings-panel .theme-card {
    height: 88px !important;
    min-height: 0 !important;
    padding: 11px !important;
    gap: 6px !important;
    border-radius: 10px !important;
}

.settings-panel .theme-card.active {
    padding: 10px !important;
}

/* Make the destructive group read as a warning without giving its heading a
   separate card. The action surface carries the danger treatment instead. */
.settings-panel .settings-page > .settings-group.danger-zone > h3 {
    color: var(--danger, #f07178) !important;
}

.settings-panel .settings-page > .settings-group.danger-zone > .theme-section-caption {
    color: color-mix(in srgb, var(--danger, #f07178) 62%, var(--muted-dim)) !important;
}

.settings-panel .settings-page > .settings-group.danger-zone > .setting-row {
    background: color-mix(in srgb, var(--danger-dim, rgba(240,113,120,.1)) 38%, var(--surface)) !important;
    border-color: color-mix(in srgb, var(--danger, #f07178) 28%, var(--border-subtle)) !important;
}

.settings-panel .settings-page > .settings-group.danger-zone .danger-text {
    color: var(--danger, #f07178) !important;
}

.settings-panel .settings-page > .settings-group.danger-zone .small-button.danger {
    color: var(--danger, #f07178) !important;
    background: var(--danger-dim, rgba(240,113,120,.12)) !important;
    border-color: var(--danger-border, rgba(240,113,120,.36)) !important;
}

/* Keep section headings concise; descriptions remain on the individual rows. */
.settings-panel .settings-page > .settings-group > .theme-section-caption {
    display: none !important;
}

.settings-panel [data-exclusive-theme-section][hidden] {
    display: none !important;
}

/* Community gallery ---------------------------------------------------- */
.settings-panel .community-theme-grid {
    grid-auto-rows: 88px !important;
}

.settings-panel .community-theme-create {
    min-height: 88px !important;
    height: 88px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    border: 1px dashed color-mix(in srgb, var(--border-strong) 80%, transparent) !important;
    background: transparent !important;
    color: var(--muted-dim) !important;
    text-align: center !important;
}

.settings-panel .community-theme-create:hover {
    border-color: var(--border-strong) !important;
    background: var(--surface) !important;
    filter: none !important;
    transform: none !important;
}

.community-theme-create-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--muted);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

.community-theme-create > span:last-child {
    color: var(--muted-dim);
    font: 500 10px/1 var(--font-mono);
    letter-spacing: .04em;
}

.settings-panel .community-theme-card {
    position: relative;
    height: 88px !important;
    min-height: 88px !important;
    align-items: flex-start !important;
    padding-top: 11px !important;
}

.community-theme-card .community-theme-author {
    position: absolute;
    top: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    overflow: visible;
    color: var(--muted-dim);
    font-size: 8.5px;
    line-height: 1.1;
    text-overflow: clip;
    white-space: nowrap;
    cursor: pointer;
}

.community-theme-card .community-theme-author:hover,
.community-theme-card .community-theme-author:focus-visible {
    color: var(--text);
    text-decoration: underline;
    outline: none;
}

.community-theme-card .theme-dots {
    margin-top: 0 !important;
    flex: 0 0 auto;
}

.community-theme-card strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-theme-card small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-theme-card.is-hidden-community-theme {
    opacity: .62;
}

.community-theme-actions {
    position: absolute;
    right: 8px;
    bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted-dim);
    font: 500 8px/1 var(--font-mono);
    letter-spacing: .02em;
}

.community-theme-action {
    cursor: pointer;
}

.community-theme-action:hover,
.community-theme-action:focus-visible {
    color: var(--text);
    text-decoration: underline;
    outline: none;
}

.community-theme-delete {
    color: var(--danger, #f07178);
}

.community-theme-delete[aria-disabled="true"] {
    opacity: .55;
    pointer-events: none;
}

.community-hidden-toggle {
    align-self: flex-end;
    margin: -22px 0 7px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--muted-dim);
    font: 500 9px/1 var(--font-mono);
    cursor: pointer;
}

.community-hidden-toggle:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Community theme composer */
.community-theme-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .62);
}

.community-theme-dialog {
    position: relative;
    width: min(100%, 440px);
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--sidebar);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.community-theme-close {
    position: absolute;
    top: 13px;
    right: 15px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.community-theme-close:hover {
    background: var(--surface-selected);
    color: var(--text);
}

.settings-dialog-kicker {
    display: block;
    margin-bottom: 9px;
    color: var(--muted-dim);
    font: 500 9px/1 var(--font-mono);
    letter-spacing: .14em;
}

.community-theme-dialog h2 {
    margin: 0;
    color: var(--text);
    font-size: 19px;
}

.community-theme-dialog-copy {
    margin: 7px 0 20px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.community-theme-dialog form {
    display: grid;
    gap: 14px;
}

.community-theme-dialog label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}

.community-theme-dialog label > span {
    color: var(--muted-dim);
    font-size: 10px;
}

.community-theme-dialog input:not([type="color"]),
.community-theme-dialog textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 11px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    resize: vertical;
}

.community-theme-dialog input:not([type="color"]):focus,
.community-theme-dialog textarea:focus {
    border-color: var(--accent);
    outline: 0;
}

.community-theme-colors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.community-theme-colors label {
    gap: 7px;
}

.community-theme-colors input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
}

.community-theme-error {
    margin: -2px 0 0;
    color: var(--danger, #f07178);
    font-size: 11px;
    line-height: 1.4;
}

.community-theme-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 3px;
}

.community-theme-publish {
    color: var(--text-on-accent, #111) !important;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

/* The full palette composer is intentionally roomier than the compact
   settings popovers. Each swatch controls one semantic part of the UI. */
.community-theme-dialog {
    width: min(720px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 26px;
    background: var(--surface-overlay, var(--sidebar));
}

.community-theme-dialog form {
    gap: 20px;
}

.community-theme-form-head {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.community-theme-palette {
    display: grid;
    gap: 18px;
}

.community-theme-palette-group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.community-theme-palette-group legend {
    margin: 0 0 8px;
    padding: 0;
    color: var(--muted-dim);
    font: 500 9px/1 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.community-theme-palette-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.community-theme-color-field {
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row;
    align-items: center;
    gap: 9px !important;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.community-theme-color-field:hover,
.community-theme-color-field:focus-within {
    background: var(--surface-selected);
    border-color: var(--border-subtle);
}

.community-theme-color-field input[type="color"] {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

.community-theme-color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.community-theme-color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.community-theme-color-field input[type="color"]::-moz-color-swatch { border: 0; border-radius: 5px; }

.community-theme-color-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.community-theme-color-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-theme-color-copy code {
    color: var(--muted-dim);
    font: 400 9px/1 var(--font-mono);
    letter-spacing: .02em;
}

.community-theme-font-field {
    gap: 7px !important;
}

.community-theme-font-field select {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: 400 12px/1 var(--font-body);
}

.community-theme-font-field select:focus {
    border-color: var(--border-subtle);
    outline: 0;
    box-shadow: none;
}

.community-theme-font-field .settings-dropdown {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.community-theme-font-field .settings-dropdown-popover {
    width: min(260px, 100%);
}

.community-theme-dialog .community-theme-actions {
    position: static;
    right: auto;
    bottom: auto;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.settings-panel .settings-page > .settings-group[data-exclusive-theme-section][hidden] {
    display: none !important;
}

/* Searchable Settings dropdowns ---------------------------------------- */
.settings-dropdown {
    position: relative;
    flex: 0 0 min(220px, 42%);
    min-width: 178px;
    z-index: 2;
}

.settings-dropdown.is-open {
    z-index: 50;
}

.settings-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.settings-dropdown-trigger {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font: 500 12px/1 var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.settings-dropdown-trigger:hover,
.settings-dropdown.is-open .settings-dropdown-trigger {
    background: var(--surface-selected) !important;
    border-color: transparent;
    color: var(--white);
}

.settings-dropdown-trigger svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .72;
    transition: transform .15s ease;
}

.settings-dropdown.is-open .settings-dropdown-trigger svg {
    transform: rotate(180deg);
}

.settings-dropdown-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: min(260px, calc(100vw - 40px));
    padding: 7px;
    border: 1px solid var(--border-emphasis);
    border-radius: var(--radius-md);
    background: var(--surface-overlay);
    box-shadow: var(--shadow-overlay);
    z-index: 60;
}

.settings-dropdown.opens-up .settings-dropdown-popover {
    top: auto;
    bottom: calc(100% + 6px);
}

.settings-dropdown-search {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--muted);
}

.settings-dropdown-search svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.settings-dropdown-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--text) !important;
    font: 400 12px/1 var(--font-body);
}

.settings-dropdown-search:focus-within {
    border-color: var(--border-subtle) !important;
    box-shadow: none !important;
}

.settings-dropdown-search input::placeholder { color: var(--muted-dim); }

.settings-dropdown-options {
    max-height: 228px;
    margin-top: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.settings-dropdown-option {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 0 9px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font: 400 12px/1 var(--font-body);
    text-align: left;
    cursor: pointer;
}

.settings-dropdown-option[hidden] { display: none !important; }

.settings-dropdown-option:hover,
.settings-dropdown-option.is-selected {
    background: var(--surface-selected) !important;
    color: var(--white);
}

.settings-dropdown-option.is-selected::after {
    content: "✓";
    margin-left: auto;
    color: var(--accent);
    font-size: 12px;
}

.settings-dropdown-empty {
    display: block;
    padding: 12px 9px 8px;
    color: var(--muted-dim);
    font: 400 11px/1.3 var(--font-body);
}

.settings-dropdown-empty[hidden] { display: none !important; }

/* Small semantic marks keep the section labels easy to scan without turning
   them into separate cards or changing the compact Settings hierarchy. */
.settings-panel .settings-page > .settings-group > h3.settings-section-heading {
    display: flex !important;
    align-items: center;
    gap: 7px;
}

.settings-section-icon {
    width: 14px;
    height: 14px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 14px;
    color: var(--muted-dim);
}

.settings-section-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-panel .settings-page > .settings-group:hover > h3.settings-section-heading .settings-section-icon,
.settings-panel .settings-page > .settings-group.danger-zone > h3.settings-section-heading .settings-section-icon {
    color: var(--accent);
}

.settings-panel .settings-page > .settings-group.danger-zone > h3.settings-section-heading,
.settings-panel .settings-page > .settings-group.danger-zone > h3.settings-section-heading .settings-section-icon {
    color: var(--danger, #f07178) !important;
}

/* Profile settings workspace ------------------------------------------- */
.settings-panel:has(.settings-page[data-page="profile"].active) {
    width: min(1180px, calc(100% - 48px));
    max-width: 1180px;
}

.profile-settings-v2 {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 310px);
    align-items: start;
    gap: 32px;
    padding: 0;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-form {
    min-width: 0;
    padding: 0;
    gap: 24px;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-grid {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-section,
.profile-settings-v2 .profile-settings-editor .acct-editor-section-media,
.profile-settings-v2 .profile-settings-editor .acct-editor-section-about,
.profile-settings-v2 .profile-settings-editor .acct-editor-section-accent {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-section-media {
    border-top: 0;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-section-about,
.profile-settings-v2 .profile-settings-editor .acct-editor-section-accent {
    background: transparent;
}

.profile-settings-v2 .profile-settings-editor .acct-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 22px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.profile-settings-v2 .profile-settings-editor .acct-section-heading .acct-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted-dim);
    font: 500 10px/1.2 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.profile-settings-v2 .profile-settings-editor .acct-section-icon {
    width: 15px;
    height: 15px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 15px;
    color: var(--muted-dim);
}

.profile-settings-v2 .profile-settings-editor .acct-section-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-settings-v2 .profile-settings-editor .acct-section-note {
    color: var(--muted-dim);
    font: 400 10px/1.2 var(--font-body);
}

.profile-settings-v2 .profile-settings-editor .acct-avatar-field {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    padding: 0;
    border: 0;
    background: transparent;
}

.profile-settings-v2 .profile-settings-editor .acct-avatar-field > .acct-avatar,
.profile-settings-v2 .profile-settings-editor .acct-avatar-field > .acct-avatar-fallback {
    width: 82px;
    height: 82px;
    margin: 2px 0 0;
    border: 3px solid var(--accent);
    background: var(--surface-3);
}

.profile-settings-v2 .profile-settings-editor .acct-banner-field {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.profile-settings-v2 .profile-settings-editor .acct-input,
.profile-settings-v2 .profile-settings-editor .acct-textarea {
    min-height: 42px;
    box-sizing: border-box;
    border-color: var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: none;
}

.profile-settings-v2 .profile-settings-editor .acct-input:focus,
.profile-settings-v2 .profile-settings-editor .acct-textarea:focus {
    border-color: var(--border-strong);
    box-shadow: none;
}

.profile-settings-v2 .profile-settings-editor .acct-textarea {
    min-height: 92px;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 0;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--border-subtle);
    border-radius: 0;
    background: transparent;
}

.profile-settings-v2 .profile-settings-editor .acct-preview {
    position: sticky;
    top: 20px;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-emphasis);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-overlay);
    transform: none;
}

.profile-settings-v2 .profile-settings-editor .acct-preview::before {
    padding: 12px 16px 10px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border-subtle);
    content: "Preview";
    color: var(--muted-dim);
    font: 500 9px/1 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.profile-settings-v2 .profile-settings-editor .acct-preview-banner {
    height: 112px;
    border-radius: 0;
}

.profile-settings-v2 .profile-settings-editor .acct-preview .acct-avatar,
.profile-settings-v2 .profile-settings-editor .acct-preview .acct-avatar-fallback {
    width: 76px;
    height: 76px;
    margin: -32px 0 0 18px;
    border: 4px solid var(--surface);
    background: var(--surface-2);
}

.profile-settings-v2 .profile-settings-editor .acct-preview-info {
    padding: 12px 18px 20px;
}

.profile-settings-v2 .profile-settings-editor .acct-preview-name {
    font-size: 18px;
}

.profile-settings-v2 .profile-settings-editor .acct-preview-status {
    margin-top: 11px;
    padding: 9px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
}

.profile-settings-v2 .profile-settings-editor .acct-preview-bio {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

@media (max-width: 860px) {
    .settings-panel:has(.settings-page[data-page="profile"].active) {
        width: calc(100% - 28px);
    }

    .profile-settings-v2 .profile-settings-editor .acct-editor-inline {
        grid-template-columns: 1fr;
    }

    .profile-settings-v2 .profile-settings-editor .acct-preview {
        position: relative;
        top: auto;
        grid-column: 1;
        grid-row: 1;
    }

    .profile-settings-v2 .profile-settings-editor .acct-editor-form {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 700px) {
    .settings-dropdown {
        flex-basis: 46%;
        min-width: 150px;
    }
}

@media (max-width: 520px) {
    .community-theme-dialog {
        padding: 20px;
    }

    .community-theme-form-head {
        grid-template-columns: 1fr;
    }

    .community-theme-palette-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .community-theme-colors {
        gap: 7px;
    }
}

/* Profile editor final visual pass: the editor itself is an open workspace;
   only the live preview remains a contained card. */
.settings-panel:has(.settings-page[data-page="profile"].active) .profile-settings-shell,
.settings-panel:has(.settings-page[data-page="profile"].active) .profile-settings-editor,
.settings-panel:has(.settings-page[data-page="profile"].active) .settings-page[data-page="profile"],
.profile-settings-v2 .profile-settings-editor .acct-editor-inline {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero {
    width: 100%;
    margin: 0 0 18px;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner {
    position: relative;
    height: 176px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner::after {
    position: absolute;
    inset: 0;
    content: "";
    border-radius: inherit;
    background: rgba(0, 0, 0, .46);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--speed) var(--curve);
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner:hover::after,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner:focus-within::after {
    opacity: 1;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner-upload {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar {
    position: relative;
    display: block;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border-radius: 50%;
    cursor: pointer;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar > .acct-avatar,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar > .acct-avatar-fallback {
    width: 100%;
    height: 100%;
    border: 4px solid var(--bg);
    border-radius: 50%;
    background: var(--surface-2);
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar::after {
    position: absolute;
    inset: 0;
    content: "";
    border-radius: 50%;
    background: rgba(0, 0, 0, .52);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--speed) var(--curve);
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar:hover::after,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar:focus-within::after {
    opacity: 1;
}

.profile-settings-v2 .profile-settings-editor .acct-media-upload-hitbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--white);
    font: 500 10px/1 var(--font-body);
    letter-spacing: .02em;
    opacity: 0;
    transition: opacity var(--speed) var(--curve), transform var(--speed) var(--curve);
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner:hover .acct-media-upload-hitbox,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner:focus-within .acct-media-upload-hitbox,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar:hover .acct-media-upload-hitbox,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar:focus-within .acct-media-upload-hitbox {
    opacity: 1;
    transform: translateY(0);
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner .acct-media-upload-hitbox svg {
    width: 17px;
    height: 17px;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar .acct-media-upload-hitbox {
    position: absolute;
    inset: 0;
    z-index: 2;
    flex-direction: column;
    gap: 3px;
    font-size: 8px;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-avatar .acct-media-upload-hitbox svg {
    width: 16px;
    height: 16px;
}

.profile-settings-v2 .profile-settings-editor .acct-image-url-control {
    display: none;
}

.profile-settings-v2 .profile-settings-editor .acct-hidden-image-fields,
.profile-settings-v2 .profile-settings-editor .acct-file-input {
    display: none !important;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-banner-upload {
    display: none;
}

.profile-settings-v2 .profile-settings-editor .acct-avatar-field .acct-upload-label,
.profile-settings-v2 .profile-settings-editor .acct-banner-field > .acct-upload-label {
    display: none;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-body {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    min-height: 70px;
    margin-top: -34px;
    padding: 0 12px 0 18px;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-body > .acct-avatar,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-body > .acct-avatar-fallback {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border: 4px solid var(--bg);
    border-radius: 50%;
    background: var(--surface-2);
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-meta {
    min-width: 0;
    padding-bottom: 7px;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-meta strong,
.profile-settings-v2 .profile-settings-editor .acct-profile-hero-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-meta strong {
    color: var(--text);
    font: 600 17px/1.2 var(--font-display);
}

.profile-settings-v2 .profile-settings-editor .acct-profile-hero-meta span {
    margin-top: 3px;
    color: var(--muted-dim);
    font: 400 10px/1 var(--font-mono);
}

.profile-settings-v2 .profile-settings-editor .acct-avatar-field {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.profile-settings-v2 .profile-settings-editor .acct-editor-section-media {
    padding-bottom: 26px;
}

.profile-settings-v2 .profile-settings-editor .acct-editor-section-banner {
    padding-top: 0;
}

@media (max-width: 620px) {
    .profile-settings-v2 .profile-settings-editor .acct-profile-hero-banner {
        height: 140px;
    }

    .profile-settings-v2 .profile-settings-editor .acct-profile-hero-body {
        padding-left: 10px;
    }
}

/* Keep the hero/media area as one cohesive section. The banner swatches
   belong to the hero and should not introduce a second visual divider. */
.profile-settings-v2 .profile-settings-editor .acct-banner-color-row {
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
}

/* About is the final section, so avoid a trailing rule at the bottom of the
   editor while retaining the two useful separators above it. */
.profile-settings-v2 .profile-settings-editor .acct-editor-section-about {
    padding-bottom: 0;
    border-bottom: 0;
}

/* The custom banner swatch is a compact color control, not a full-height
   form row. Explicit dimensions prevent the flex/grid parent from stretching
   it vertically. */
.profile-settings-v2 .profile-settings-editor .acct-custom-color {
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
    min-height: 29px !important;
    max-width: 29px !important;
    max-height: 29px !important;
    aspect-ratio: 1 / 1;
    align-self: center;
    box-sizing: border-box;
    padding: 0 !important;
    line-height: 0;
}

.profile-settings-v2 .profile-settings-editor .acct-custom-color .acct-color-picker {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}
