/* Profile Editor v2 — loaded last on purpose to own its cascade. */
#stab-profile {
    --ps-accent: #8b7cff;
    --ps-accent-rgb: 139, 124, 255;
    --ps-cyan: #63dcff;
    --ps-mint: #62e7b3;
    --ps-line: rgba(255, 255, 255, .09);
    --ps-line-strong: rgba(255, 255, 255, .15);
    --ps-surface: rgba(255, 255, 255, .035);
    --ps-surface-strong: rgba(255, 255, 255, .055);
    --ps-ease: cubic-bezier(.2, .78, .22, 1);
}

#stab-profile .profile-editor-heading {
    min-height: 124px;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    padding: 24px 26px !important;
    border: 1px solid rgba(166, 151, 255, .14);
    border-radius: 25px;
    background:
        radial-gradient(circle at 86% 10%, rgba(80, 203, 255, .12), transparent 28%),
        radial-gradient(circle at 8% 100%, rgba(139, 92, 246, .15), transparent 38%),
        linear-gradient(145deg, rgba(18, 22, 43, .82), rgba(8, 11, 25, .68));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 50px rgba(0, 0, 0, .13);
}

#stab-profile .profile-editor-heading::after {
    content: "";
    width: 180px;
    height: 180px;
    position: absolute;
    right: 8%;
    bottom: -135px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 50%;
    box-shadow: 0 0 0 32px rgba(255, 255, 255, .018), 0 0 0 66px rgba(255, 255, 255, .012);
    pointer-events: none;
}

#stab-profile .profile-editor-heading::before { content: none !important; display: none !important; }
#stab-profile .profile-editor-heading > * { position: relative; z-index: 1; }
#stab-profile .profile-editor-heading > div:first-child { min-width: 0; }
#stab-profile .profile-editor-heading h2 { margin: 7px 0 4px !important; font-size: clamp(1.35rem, 3vw, 2rem) !important; letter-spacing: -.045em; }
#stab-profile .profile-editor-heading p { max-width: 620px; margin: 0 !important; line-height: 1.5; }

#stab-profile .profile-editor-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #c5bbff;
    font-size: .62rem;
    font-weight: 780;
    letter-spacing: .095em;
    text-transform: uppercase;
}

#stab-profile .profile-editor-kicker i { color: var(--ps-cyan); font-size: .58rem; }

#stab-profile .profile-editor-heading-meta {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
    padding-bottom: 3px;
}

#stab-profile .profile-editor-heading-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 999px;
    color: rgba(236, 233, 248, .66);
    background: rgba(255, 255, 255, .04);
    font-size: .59rem;
    font-weight: 680;
    white-space: nowrap;
}

#stab-profile .profile-editor-heading-meta i { color: #9ee9ff; }

#stab-profile .profile-settings-grid {
    display: block !important;
}

#stab-profile #settings-accs-card { width: 100% !important; margin-bottom: 14px !important; }

#stab-profile .profile-studio-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, .72fr) minmax(460px, 1.28fr);
    align-items: start;
    gap: 15px;
}

#stab-profile .profile-editor-stack {
    min-width: 0;
    display: grid;
    gap: 14px;
}

#stab-profile .profile-editor-stack > .settings-card,
#stab-profile .profile-live-card,
#stab-profile .profile-save-dock {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    border: 1px solid var(--ps-line) !important;
    border-radius: 23px !important;
    background:
        radial-gradient(circle at 0 0, rgba(139, 124, 255, .055), transparent 32%),
        linear-gradient(145deg, rgba(18, 22, 40, .82), rgba(8, 11, 24, .76)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 16px 44px rgba(0, 0, 0, .15) !important;
}

/* Public profile preview */
#stab-profile .profile-live-card {
    position: sticky;
    top: 0;
    overflow: hidden;
    isolation: isolate;
}

#stab-profile .profile-live-toolbar {
    min-height: 47px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 14px;
    color: rgba(229, 225, 241, .54);
    background: rgba(3, 6, 16, .24);
    font-size: .58rem;
    font-weight: 680;
}

#stab-profile .profile-live-toolbar > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
#stab-profile .profile-live-toolbar > span:first-child i { color: #b4a8ff; }

#stab-profile .profile-save-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border: 1px solid rgba(52, 211, 153, .12);
    border-radius: 999px;
    color: #7ce6bb;
    background: rgba(16, 185, 129, .065);
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

#stab-profile .profile-save-state.is-dirty {
    color: #ffd28c;
    border-color: rgba(245, 158, 11, .16);
    background: rgba(245, 158, 11, .075);
}

#stab-profile .profile-save-state.is-saving { color: #b8afff; border-color: rgba(var(--ps-accent-rgb), .2); background: rgba(var(--ps-accent-rgb), .09); }

#stab-profile .profile-cover-preview {
    width: 100% !important;
    height: 196px !important;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 0 !important;
    border-radius: 0 !important;
    transition: background .28s var(--ps-ease), filter .28s ease !important;
}

#stab-profile .profile-cover-preview::before,
#stab-profile .profile-cover-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#stab-profile .profile-cover-preview::before { background: linear-gradient(180deg, rgba(255, 255, 255, .09), transparent 44%, rgba(3, 5, 14, .5)); }
#stab-profile .profile-cover-preview::after { background: linear-gradient(120deg, rgba(255, 255, 255, .08), transparent 35%, transparent 70%, rgba(4, 7, 18, .15)); }
#stab-profile .profile-cover-preview[data-profile-tone="soft"] { filter: saturate(.78) brightness(1.08); }
#stab-profile .profile-cover-preview[data-profile-tone="soft"]::before { background: linear-gradient(180deg, rgba(255, 255, 255, .19), rgba(255, 255, 255, .045) 44%, rgba(3, 5, 14, .36)); }
#stab-profile .profile-cover-preview[data-profile-tone="balanced"] { filter: saturate(1); }
#stab-profile .profile-cover-preview[data-profile-tone="vivid"] { filter: saturate(1.25) contrast(1.04); }
#stab-profile .profile-cover-preview[data-profile-tone="vivid"]::before { background: radial-gradient(circle at 78% 12%, rgba(255, 255, 255, .28), transparent 31%), linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%, rgba(3, 5, 14, .58)); }

#stab-profile .profile-cover-glow {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

#stab-profile .profile-cover-glow-a { width: 155px; height: 155px; right: -45px; top: -52px; background: rgba(255, 255, 255, .14); }
#stab-profile .profile-cover-glow-b { width: 90px; height: 90px; left: 12%; bottom: -55px; border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 0 0 18px rgba(255, 255, 255, .025); }

#stab-profile .profile-preview-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    z-index: 2;
    top: 15px;
    right: 15px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    color: rgba(255, 255, 255, .7);
    background: rgba(5, 8, 19, .16);
    backdrop-filter: blur(12px);
    font-size: .53rem;
    font-weight: 760;
    letter-spacing: .08em;
}

#stab-profile .profile-live-body { position: relative; padding: 58px 19px 17px; }

#stab-profile .profile-preview-avatar-stage {
    width: 104px;
    height: 104px;
    position: absolute;
    z-index: 3;
    top: -56px;
    left: 18px;
    border: 5px solid rgba(10, 13, 27, .97);
    border-radius: 32px;
    background: linear-gradient(145deg, #a78bfa, #4f7cff);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .34), 0 0 0 1px rgba(255, 255, 255, .14);
    transition: border-radius .25s var(--ps-ease), transform .25s var(--ps-ease);
}

#stab-profile #cover-preview-avatar,
#stab-profile #settings-avatar-preview {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    inset: 0;
    border-radius: 26px !important;
    object-fit: cover;
    transition: border-radius .25s var(--ps-ease), opacity .2s ease !important;
}

#stab-profile #cover-preview-avatar {
    display: grid;
    place-items: center;
    color: white;
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 7px rgba(0, 0, 0, .25);
}

#stab-profile #settings-avatar-preview:not([src]),
#stab-profile #settings-avatar-preview[src=""] { opacity: 0; }
#stab-profile #settings-avatar-preview[src]:not([src=""]) { opacity: 1; }

#stab-profile .profile-preview-avatar-stage .settings-avatar-edit {
    width: 35px !important;
    height: 35px !important;
    display: grid !important;
    place-items: center;
    position: absolute;
    z-index: 5;
    right: -7px !important;
    bottom: -7px !important;
    border: 3px solid rgba(10, 13, 27, .96) !important;
    border-radius: 13px !important;
    color: #fff;
    background: linear-gradient(145deg, #7c6cf5, #6755dc) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
    cursor: pointer;
    transition: transform .2s var(--ps-ease), box-shadow .2s ease;
}

#stab-profile .profile-preview-avatar-stage .settings-avatar-edit:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 11px 24px rgba(45, 35, 116, .36); }

#stab-profile .profile-avatar-upload-state {
    display: grid;
    place-items: center;
    position: absolute;
    z-index: 6;
    inset: 0;
    border-radius: inherit;
    color: white;
    background: rgba(4, 7, 18, .64);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

#stab-profile .profile-avatar-upload-state.is-visible { opacity: 1; }

#stab-profile .profile-cover-preview[data-avatar-shape="circle"] + .profile-live-body .profile-preview-avatar-stage,
#stab-profile .profile-cover-preview[data-avatar-shape="circle"] + .profile-live-body #cover-preview-avatar,
#stab-profile .profile-cover-preview[data-avatar-shape="circle"] + .profile-live-body #settings-avatar-preview { border-radius: 50% !important; }
#stab-profile .profile-cover-preview[data-avatar-shape="squircle"] + .profile-live-body .profile-preview-avatar-stage { border-radius: 32px !important; }
#stab-profile .profile-cover-preview[data-avatar-shape="squircle"] + .profile-live-body #cover-preview-avatar,
#stab-profile .profile-cover-preview[data-avatar-shape="squircle"] + .profile-live-body #settings-avatar-preview { border-radius: 26px !important; }
#stab-profile .profile-cover-preview[data-avatar-shape="rounded"] + .profile-live-body .profile-preview-avatar-stage { border-radius: 20px !important; }
#stab-profile .profile-cover-preview[data-avatar-shape="rounded"] + .profile-live-body #cover-preview-avatar,
#stab-profile .profile-cover-preview[data-avatar-shape="rounded"] + .profile-live-body #settings-avatar-preview { border-radius: 15px !important; }

#stab-profile .profile-preview-identity { min-width: 0; padding-left: 116px; min-height: 45px; }
#stab-profile .profile-preview-identity h3 { margin: 2px 0 1px; overflow: hidden; color: var(--text-primary); font-size: 1.14rem; font-weight: 790; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
#stab-profile .profile-preview-identity p { margin: 0; overflow: hidden; color: rgba(202, 196, 220, .47); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }

#stab-profile .profile-preview-presence { display: inline-flex; align-items: center; gap: 5px; color: #75dda9; font-size: .56rem; font-weight: 680; }
#stab-profile .profile-preview-presence i { width: 6px; height: 6px; border-radius: 50%; background: #45d595; box-shadow: 0 0 0 3px rgba(69, 213, 149, .1); }

#stab-profile .profile-preview-status {
    min-height: 47px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding: 8px 10px;
    border: 1px solid rgba(160, 145, 255, .1);
    border-radius: 15px;
    color: rgba(236, 232, 247, .78);
    background: linear-gradient(100deg, rgba(128, 105, 255, .105), rgba(78, 203, 255, .035));
}

#stab-profile .profile-preview-status > span { width: 31px; height: 31px; display: grid; flex: 0 0 31px; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .07); font-size: 1rem; }
#stab-profile .profile-preview-status strong { min-width: 0; overflow: hidden; font-size: .66rem; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
#stab-profile .profile-preview-status.is-empty { color: rgba(214, 209, 229, .4); background: rgba(255, 255, 255, .022); }

#stab-profile .profile-preview-bio { min-height: 52px; margin: 14px 2px 0; overflow-wrap: anywhere; color: rgba(216, 211, 230, .57); font-size: .65rem; line-height: 1.58; white-space: pre-line; }
#stab-profile .profile-preview-bio.is-empty { color: rgba(207, 201, 221, .3); font-style: italic; }

#stab-profile .profile-preview-socials { min-height: 31px; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
#stab-profile .profile-preview-socials span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .075); border-radius: 10px; color: #bfb6fa; background: rgba(255, 255, 255, .035); font-size: .7rem; }
#stab-profile .profile-preview-socials .profile-preview-social-more { width: auto; padding: 0 8px; color: rgba(219, 214, 231, .48); font-size: .56rem; font-weight: 700; }
#stab-profile .profile-preview-socials.is-empty::before { content: "Ваши ссылки появятся здесь"; align-self: center; color: rgba(207, 201, 221, .28); font-size: .57rem; }

#stab-profile .profile-preview-details { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .055); }
#stab-profile .profile-preview-details span { display: inline-flex; align-items: center; gap: 6px; color: rgba(211, 205, 225, .38); font-size: .54rem; font-weight: 620; }
#stab-profile .profile-preview-details i { color: rgba(164, 151, 255, .65); }

#stab-profile .profile-live-hint { display: flex; align-items: flex-start; gap: 8px; padding: 12px 15px; border-top: 1px solid rgba(255, 255, 255, .055); color: rgba(211, 205, 225, .4); background: rgba(3, 6, 16, .18); font-size: .57rem; line-height: 1.45; }
#stab-profile .profile-live-hint i { margin-top: 2px; color: #a89cff; }
#stab-profile .profile-live-hint.is-saving i { animation: profile-save-spin .8s linear infinite; }
#stab-profile .profile-live-hint.is-saved { color: rgba(119, 225, 177, .58); }
#stab-profile .profile-live-hint.is-saved i { color: #65dba7; }
#stab-profile .profile-live-hint.is-error { color: rgba(251, 170, 180, .66); }
#stab-profile .profile-live-hint.is-error i { color: #fb8798; }

/* Editor cards */
#stab-profile .profile-editor-stack > .settings-card { position: relative; overflow: visible !important; }
#stab-profile .settings-card-section { padding: 17px !important; }

#stab-profile .profile-section-heading,
#stab-profile .profile-studio-header {
    display: grid !important;
    grid-template-columns: 39px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 0 14px !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
}

#stab-profile .profile-section-heading > i {
    width: 39px !important;
    height: 39px !important;
    display: grid !important;
    place-items: center;
    border: 1px solid rgba(166, 151, 255, .13) !important;
    border-radius: 13px !important;
    color: #c9c1ff !important;
    background: linear-gradient(145deg, rgba(128, 105, 255, .18), rgba(75, 199, 255, .055)) !important;
}

#stab-profile .profile-section-number { color: rgba(208, 201, 225, .22); font-size: .59rem; font-weight: 800; letter-spacing: .11em; }

#stab-profile .profile-identity-card .settings-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 11px !important; }
#stab-profile .profile-identity-card .settings-field:first-child { grid-column: 1 / -1; }
#stab-profile .profile-id-field { width: 100%; margin-top: 11px; }

#stab-profile .settings-field { position: relative; }
#stab-profile .settings-field label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-inline: 3px; }
#stab-profile .settings-field label small { color: rgba(197, 190, 213, .35); font-size: .55rem; font-weight: 550; letter-spacing: 0; text-transform: none; }

#stab-profile .settings-input-wrap {
    min-height: 48px !important;
    border: 1px solid rgba(255, 255, 255, .085) !important;
    border-radius: 15px !important;
    background: rgba(3, 6, 16, .22) !important;
    box-shadow: inset 0 1px 7px rgba(0, 0, 0, .09) !important;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

#stab-profile .settings-input-wrap:focus-within { border-color: rgba(148, 132, 255, .42) !important; background: rgba(var(--ps-accent-rgb), .055) !important; box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb), .085) !important; }
#stab-profile .settings-input-wrap .input { height: 46px !important; }
#stab-profile .profile-id-field .input { user-select: all; cursor: text; opacity: .65; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .64rem !important; }

#stab-profile .profile-field-help,
#stab-profile .profile-field-counter { margin-top: 1px; padding: 0 4px; color: rgba(197, 190, 213, .32); font-size: .54rem; line-height: 1.35; }
#stab-profile .profile-field-counter { align-self: flex-end; font-variant-numeric: tabular-nums; }
#stab-profile .profile-field-counter.is-near-limit { color: #f4bd72; }

#stab-profile .profile-copy-id { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; margin-right: -6px; padding: 0; border: 1px solid rgba(160, 145, 255, .12); border-radius: 11px; color: #b8aff5; background: rgba(var(--ps-accent-rgb), .08); cursor: pointer; transition: transform .18s var(--ps-ease), background .18s ease; }
#stab-profile .profile-copy-id:hover { transform: scale(1.05); background: rgba(var(--ps-accent-rgb), .16); }

#stab-profile .status-bio-field { margin-top: 13px !important; }
#stab-profile .settings-textarea { min-height: 112px !important; padding: 13px !important; border: 1px solid rgba(255, 255, 255, .085) !important; border-radius: 15px !important; background: rgba(3, 6, 16, .22) !important; line-height: 1.5; transition: border-color .2s ease, box-shadow .2s ease; }
#stab-profile .settings-textarea:focus { border-color: rgba(148, 132, 255, .42) !important; box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb), .085) !important; }

/* Style controls */
#stab-profile .profile-cover-card,
#stab-profile .profile-social-card { background: radial-gradient(circle at 0 0, rgba(139, 124, 255, .09), transparent 34%), linear-gradient(145deg, rgba(18, 22, 40, .84), rgba(8, 11, 24, .78)) !important; }

#stab-profile .profile-preset-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

#stab-profile .profile-preset-head > span strong,
#stab-profile .profile-preset-head > span small { display: block; }
#stab-profile .profile-preset-head strong { color: rgba(239, 235, 248, .75); font-size: .64rem; }
#stab-profile .profile-preset-head small { margin-top: 2px; color: rgba(204, 197, 220, .32); font-size: .52rem; }

#stab-profile #profile-style-reset {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 10px;
    color: rgba(220, 214, 233, .45);
    background: rgba(255, 255, 255, .025);
    font: inherit;
    font-size: .53rem;
    font-weight: 650;
    cursor: pointer;
}

#stab-profile #profile-style-reset:hover { color: #eeeaff; border-color: rgba(156, 140, 255, .2); background: rgba(124, 100, 255, .07); }

#stab-profile .profile-style-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 10px;
}

#stab-profile .profile-style-preset {
    min-width: 0;
    min-height: 64px;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    isolation: isolate;
    transition: transform .2s var(--ps-ease), border-color .2s ease, box-shadow .2s ease;
}

#stab-profile .profile-style-preset::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(4, 7, 18, .48)); }
#stab-profile .profile-style-preset:hover { transform: translateY(-2px); }
#stab-profile .profile-style-preset.active { border-color: rgba(255, 255, 255, .72); box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb), .13), 0 9px 22px rgba(0, 0, 0, .18); }
#stab-profile .profile-style-preset span { min-width: 0; }
#stab-profile .profile-style-preset strong,
#stab-profile .profile-style-preset small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#stab-profile .profile-style-preset strong { font-size: .58rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .28); }
#stab-profile .profile-style-preset small { margin-top: 2px; color: rgba(255, 255, 255, .64); font-size: .47rem; }
#stab-profile .profile-style-preset i { position: absolute; top: 7px; right: 7px; color: rgba(255, 255, 255, .7); font-size: .52rem; opacity: 0; }
#stab-profile .profile-style-preset.active i { opacity: 1; }

#stab-profile .profile-secondary-color {
    min-height: 55px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    position: relative;
    overflow: hidden;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 12px;
    background: rgba(3, 6, 16, .18);
    cursor: pointer;
}

#stab-profile .profile-secondary-color > span:first-child { width: 36px; height: 36px; border: 2px solid rgba(255, 255, 255, .22); border-radius: 11px; background: var(--profile-secondary, #2563eb); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .22), 0 6px 14px rgba(0, 0, 0, .16); }
#stab-profile .profile-secondary-color strong,
#stab-profile .profile-secondary-color small { display: block; }
#stab-profile .profile-secondary-color strong { color: rgba(239, 235, 248, .72); font: 680 .58rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
#stab-profile .profile-secondary-color small { margin-top: 3px; color: rgba(204, 197, 220, .32); font-size: .49rem; }
#stab-profile .profile-secondary-color > i { color: #aaa0eb; font-size: .65rem; }
#stab-profile .profile-secondary-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

#stab-profile .profile-style-options-primary { margin-top: 9px; }
#stab-profile .profile-pattern-option { grid-column: auto; }
#stab-profile .profile-card-style-option { grid-column: 1 / -1; }
#stab-profile .profile-card-style-option .profile-segmented { max-width: 420px; }

#stab-profile .profile-live-card[data-avatar-ring="none"] .profile-preview-avatar-stage { box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
#stab-profile .profile-live-card[data-avatar-ring="subtle"] .profile-preview-avatar-stage { box-shadow: 0 18px 38px rgba(0, 0, 0, .3), 0 0 0 2px rgba(255, 255, 255, .18); }
#stab-profile .profile-live-card[data-avatar-ring="glow"] .profile-preview-avatar-stage { box-shadow: 0 18px 38px rgba(0, 0, 0, .34), 0 0 0 2px rgba(255, 255, 255, .2), 0 0 26px color-mix(in srgb, var(--profile-primary, #7c3aed) 52%, transparent); }
#stab-profile .profile-live-card[data-card-style="solid"] { background: color-mix(in srgb, var(--profile-primary, #7c3aed) 11%, #0c1020) !important; backdrop-filter: none !important; }
#stab-profile .profile-live-card[data-card-style="minimal"] { border-color: transparent !important; background: rgba(7, 10, 20, .52) !important; box-shadow: none !important; }
#stab-profile .profile-live-card[data-card-style="glass"] { backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); }

#stab-profile .profile-cover-controls,
#stab-profile .profile-style-options { width: 100%; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px !important; }
#stab-profile .profile-style-options { margin-top: 9px; }

#stab-profile .profile-cover-control,
#stab-profile .profile-style-option { min-width: 0; padding: 11px; border: 1px solid rgba(255, 255, 255, .065); border-radius: 16px; background: rgba(255, 255, 255, .022); }

#stab-profile .profile-cover-label { min-height: 17px; display: flex !important; align-items: center; justify-content: space-between; gap: 7px; margin: 0 1px 9px !important; color: rgba(235, 231, 246, .65) !important; font-size: .57rem !important; font-weight: 760 !important; letter-spacing: .065em !important; text-transform: uppercase; }
#stab-profile .profile-cover-label small { color: rgba(204, 197, 220, .31) !important; font-size: .51rem !important; font-weight: 550 !important; letter-spacing: 0 !important; text-transform: none; }

#stab-profile #cover-style-picker,
#stab-profile #cover-pattern-picker { display: grid !important; gap: 6px !important; }
#stab-profile #cover-style-picker { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
#stab-profile #cover-pattern-picker { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

#stab-profile .cover-color-opt { width: 100%; min-width: 0; aspect-ratio: 1.15; min-height: 32px; position: relative; overflow: hidden; padding: 0; border: 2px solid rgba(255, 255, 255, .07) !important; border-radius: 11px !important; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25), 0 6px 15px rgba(0, 0, 0, .13); cursor: pointer; transition: transform .18s var(--ps-ease), border-color .18s ease, box-shadow .18s ease; }
#stab-profile .cover-color-opt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255, 255, 255, .19), transparent 48%, rgba(0, 0, 0, .11)); pointer-events: none; }
#stab-profile .cover-color-opt:hover { transform: translateY(-2px) scale(1.02); }
#stab-profile .cover-color-opt.active { border-color: rgba(255, 255, 255, .82) !important; box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb), .18), 0 8px 20px rgba(0, 0, 0, .18) !important; }
#stab-profile .cover-color-opt i { z-index: 2; }

#stab-profile .cover-pattern-opt { min-width: 0; min-height: 91px; display: flex !important; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px !important; padding: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .065) !important; border-radius: 13px !important; color: rgba(227, 222, 240, .55) !important; background: rgba(255, 255, 255, .02) !important; box-shadow: none !important; cursor: pointer; transition: transform .18s var(--ps-ease), color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
#stab-profile .cover-pattern-swatch { position: relative; width: 100%; height: 43px; flex: 0 0 43px; display: block; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; background-color: #3e3765; background-repeat: repeat; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -14px 24px rgba(5, 5, 16, .12); transition: border-color .18s ease, filter .18s ease, transform .18s var(--ps-ease); }
#stab-profile .cover-pattern-swatch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255, 255, 255, .07), transparent 46%, rgba(7, 5, 22, .12)); pointer-events: none; }
#stab-profile .cover-pattern-swatch.is-empty { display: grid; place-items: center; color: rgba(237, 233, 247, .56); background-color: rgba(86, 78, 112, .36); background-image: linear-gradient(145deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .08)); }
#stab-profile .cover-pattern-swatch.is-empty i { position: relative; z-index: 1; font-size: .8rem; }
#stab-profile .cover-pattern-copy { min-width: 0; display: block; padding: 0 2px 2px; text-align: left; line-height: 1.15; }
#stab-profile .cover-pattern-copy strong,
#stab-profile .cover-pattern-copy small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#stab-profile .cover-pattern-copy strong { color: inherit; font-size: .56rem; font-weight: 720; }
#stab-profile .cover-pattern-copy small { margin-top: 2px; color: rgba(207, 201, 221, .34); font-size: .45rem; font-weight: 540; }
#stab-profile .cover-pattern-opt:hover { transform: translateY(-2px); color: rgba(245, 242, 252, .84) !important; border-color: rgba(174, 161, 255, .17) !important; }
#stab-profile .cover-pattern-opt:hover .cover-pattern-swatch { filter: brightness(1.12); transform: translateY(-1px); }
#stab-profile .cover-pattern-opt.active { color: #f4f1ff !important; border-color: rgba(159, 143, 255, .38) !important; background: linear-gradient(145deg, rgba(124, 100, 255, .17), rgba(76, 191, 255, .06)) !important; box-shadow: 0 0 0 2px rgba(132, 112, 255, .08) !important; }
#stab-profile .cover-pattern-opt.active .cover-pattern-swatch { border-color: rgba(255, 255, 255, .4); filter: brightness(1.16) saturate(1.08); }
#stab-profile .cover-pattern-opt.active .cover-pattern-copy small { color: rgba(220, 214, 236, .5); }

#stab-profile .profile-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, .055); border-radius: 13px; background: rgba(3, 6, 16, .2); }
#stab-profile .profile-segmented-option { min-width: 0; min-height: 35px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; border: 1px solid transparent; border-radius: 9px; color: rgba(214, 208, 228, .4); background: transparent; font-size: .52rem; font-weight: 680; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s var(--ps-ease); }
#stab-profile .profile-segmented-option:hover { color: rgba(244, 241, 252, .78); transform: translateY(-1px); }
#stab-profile .profile-segmented-option.active { color: #f4f1ff; border-color: rgba(164, 151, 255, .18); background: linear-gradient(145deg, rgba(125, 103, 255, .19), rgba(84, 211, 255, .055)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

#stab-profile .profile-shape-preview { width: 14px; height: 14px; flex: 0 0 14px; border: 1px solid rgba(255, 255, 255, .35); background: linear-gradient(145deg, #a78bfa, #4f9cff); }
#stab-profile .profile-shape-preview.circle { border-radius: 50%; }
#stab-profile .profile-shape-preview.squircle { border-radius: 5px; }
#stab-profile .profile-shape-preview.rounded { border-radius: 2px; }

#stab-profile .profile-cover-note { display: flex; gap: 8px; margin-top: 9px !important; padding: 9px 11px !important; border: 1px solid rgba(132, 216, 255, .085) !important; border-radius: 13px !important; color: rgba(216, 212, 229, .41) !important; background: linear-gradient(90deg, rgba(99, 102, 241, .05), rgba(34, 211, 238, .025)) !important; font-size: .55rem !important; }
#stab-profile .profile-cover-note i { color: #aa9dff !important; }

#stab-profile .profile-advanced-customization {
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(124, 100, 255, .035), rgba(255, 255, 255, .018));
}

#stab-profile .profile-advanced-customization > summary {
    display: grid;
    min-height: 58px;
    grid-template-columns: 36px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

#stab-profile .profile-advanced-customization > summary::-webkit-details-marker { display: none; }
#stab-profile .profile-advanced-summary-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(165, 142, 247, .15); border-radius: 11px; color: #b7a8f7; background: rgba(124, 100, 255, .09); font-size: .65rem; }
#stab-profile .profile-advanced-customization > summary > span:nth-child(2) strong,
#stab-profile .profile-advanced-customization > summary > span:nth-child(2) small { display: block; }
#stab-profile .profile-advanced-customization > summary > span:nth-child(2) strong { color: rgba(240, 236, 248, .74); font-size: .62rem; }
#stab-profile .profile-advanced-customization > summary > span:nth-child(2) small { margin-top: 3px; color: rgba(205, 198, 220, .34); font-size: .5rem; }
#stab-profile .profile-advanced-badge { padding: 5px 7px; border: 1px solid rgba(121, 207, 241, .1); border-radius: 9px; color: rgba(143, 218, 244, .55); background: rgba(51, 185, 222, .055); font-size: .48rem; font-weight: 720; }
#stab-profile .profile-advanced-chevron { color: rgba(216, 209, 230, .3); font-size: .52rem; transition: transform .22s var(--ps-ease); }
#stab-profile .profile-advanced-customization[open] .profile-advanced-chevron { transform: rotate(180deg); }
#stab-profile .profile-advanced-customization .profile-style-options { margin: 0 9px 9px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, .055); }
#stab-profile #cover-primary-swatch { background: var(--profile-secondary, #7c3aed); }

[data-theme="light"] #stab-profile .profile-advanced-customization { border-color: rgba(54, 45, 78, .08); background: rgba(255, 255, 255, .42); }
[data-theme="light"] #stab-profile .profile-advanced-customization > summary > span:nth-child(2) strong { color: rgba(45, 39, 57, .74); }
[data-theme="light"] #stab-profile .profile-advanced-customization > summary > span:nth-child(2) small { color: rgba(68, 61, 84, .4); }

@media (max-width: 520px) {
    #stab-profile .profile-advanced-customization > summary { grid-template-columns: 36px minmax(0, 1fr) 18px; }
    #stab-profile .profile-advanced-badge { display: none; }
    #stab-profile .profile-advanced-customization .profile-style-options { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Social links */
#stab-profile #social-links-list { width: 100%; display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 7px !important; }
#stab-profile .profile-social-row { min-width: 0; display: grid !important; grid-template-columns: 38px minmax(100px, .75fr) minmax(150px, 1.25fr) 33px !important; align-items: center !important; gap: 7px !important; padding: 6px !important; border: 1px solid rgba(255, 255, 255, .07) !important; border-radius: 14px !important; background: rgba(255, 255, 255, .022) !important; transition: border-color .18s ease, background .18s ease, transform .18s var(--ps-ease); }
#stab-profile .profile-social-row:focus-within { border-color: rgba(139, 124, 255, .26) !important; background: rgba(var(--ps-accent-rgb), .04) !important; }
#stab-profile .profile-social-row-icon { width: 38px !important; height: 38px !important; display: grid !important; place-items: center; border: 1px solid rgba(163, 148, 255, .13); border-radius: 11px !important; color: #c6bcff !important; background: linear-gradient(145deg, rgba(124, 99, 255, .16), rgba(71, 200, 255, .05)) !important; font-size: .78rem; }
#stab-profile #social-links-list input { width: 100% !important; min-width: 0 !important; height: 37px !important; min-height: 37px !important; padding: 0 9px !important; border: 1px solid rgba(255, 255, 255, .065) !important; border-radius: 10px !important; outline: none; color: rgba(241, 238, 248, .82) !important; background: rgba(3, 6, 16, .2) !important; box-shadow: none !important; font: inherit; font-size: .59rem !important; }
#stab-profile #social-links-list input:focus { border-color: rgba(137, 121, 255, .34) !important; background: rgba(var(--ps-accent-rgb), .045) !important; box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb), .07) !important; }
#stab-profile .profile-social-row .remove-social-link { width: 33px !important; height: 33px !important; min-width: 33px !important; display: grid !important; place-items: center; padding: 0 !important; border: 1px solid transparent !important; border-radius: 10px !important; color: rgba(245, 208, 215, .34) !important; background: transparent !important; }
#stab-profile .profile-social-row .remove-social-link:hover { color: #fecdd3 !important; border-color: rgba(251, 113, 133, .11) !important; background: rgba(244, 63, 94, .075) !important; }

#stab-profile .profile-social-empty { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 14px; border: 1px dashed rgba(167, 151, 255, .13); border-radius: 15px; color: rgba(218, 213, 230, .35); background: rgba(255, 255, 255, .014); }
#stab-profile .profile-social-empty > i { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: #9f92ea; background: rgba(124, 100, 255, .08); }
#stab-profile .profile-social-empty strong,
#stab-profile .profile-social-empty small { display: block; }
#stab-profile .profile-social-empty strong { color: rgba(238, 234, 247, .57); font-size: .63rem; }
#stab-profile .profile-social-empty small { margin-top: 2px; font-size: .53rem; }

#stab-profile #add-social-link-btn { width: 100% !important; min-height: 48px !important; display: grid !important; grid-template-columns: 33px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-top: 8px !important; padding: 6px 10px !important; border: 1px dashed rgba(157, 137, 255, .17) !important; border-radius: 13px !important; color: rgba(224, 219, 238, .54) !important; background: rgba(124, 100, 255, .032) !important; text-align: left; }
#stab-profile #add-social-link-btn:hover { border-color: rgba(157, 137, 255, .32) !important; color: #eeeaff !important; background: rgba(124, 100, 255, .07) !important; }
#stab-profile #add-social-link-btn > span:nth-child(2) strong,
#stab-profile #add-social-link-btn > span:nth-child(2) small { display: block; }
#stab-profile #add-social-link-btn strong { font-size: .61rem; }
#stab-profile #add-social-link-btn small { margin-top: 2px; color: rgba(206, 200, 220, .31); font-size: .51rem; }
#stab-profile #add-social-link-btn > i { color: rgba(197, 189, 220, .25); font-size: .55rem; }
#stab-profile .profile-add-link-icon { width: 33px; height: 33px; display: grid !important; place-items: center; border-radius: 10px; color: #c9c1ff; background: linear-gradient(145deg, rgba(124, 100, 255, .16), rgba(73, 204, 255, .055)); }

/* Save dock */
#stab-profile .profile-save-dock { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 14px; position: sticky; z-index: 8; bottom: 0; padding: 9px 10px 9px 14px; border-color: rgba(160, 145, 255, .13) !important; background: rgba(10, 13, 27, .88) !important; backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%); }
#stab-profile .profile-save-dock-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
#stab-profile .profile-save-dock-copy > i { width: 35px; height: 35px; display: grid; flex: 0 0 35px; place-items: center; border-radius: 11px; color: #77dfb0; background: rgba(16, 185, 129, .08); }
#stab-profile .profile-save-dock-copy strong,
#stab-profile .profile-save-dock-copy small { display: block; }
#stab-profile .profile-save-dock-copy strong { overflow: hidden; color: rgba(239, 236, 247, .75); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
#stab-profile .profile-save-dock-copy small { margin-top: 2px; color: rgba(205, 199, 219, .32); font-size: .51rem; }

#stab-profile .profile-save-dock.is-dirty .profile-save-dock-copy > i { color: #ffd28c; background: rgba(245, 158, 11, .08); }
#stab-profile .profile-save-dock.is-dirty .profile-save-dock-copy strong { color: #f2d5a7; }

#stab-profile #save-profile-btn { width: auto !important; min-width: 154px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: static !important; margin: 0 !important; padding: 0 12px !important; border-radius: 13px !important; transition: transform .2s var(--ps-ease), opacity .2s ease, box-shadow .2s ease; }
#stab-profile #save-profile-btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(78, 61, 192, .28); }
#stab-profile #save-profile-btn:disabled { opacity: .42; cursor: default; filter: saturate(.55); }
#stab-profile #save-profile-btn kbd { padding: 3px 5px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 5px; color: rgba(255, 255, 255, .56); background: rgba(4, 7, 18, .16); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); font: 500 .48rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
#stab-profile #save-profile-btn.is-loading i { animation: profile-save-spin .8s linear infinite; }
@keyframes profile-save-spin { to { transform: rotate(360deg); } }

/* Public profile modal reflects customization. */
#user-profile-modal[data-profile-tone="soft"] .up-cover { filter: saturate(.78) brightness(1.08); }
#user-profile-modal[data-profile-tone="balanced"] .up-cover { filter: saturate(1) brightness(1); }
#user-profile-modal[data-profile-tone="vivid"] .up-cover { filter: saturate(1.28) contrast(1.04); }
#user-profile-modal[data-avatar-shape="circle"] .up-avatar-ring,
#user-profile-modal[data-avatar-shape="circle"] .up-avatar { border-radius: 50% !important; }
#user-profile-modal[data-avatar-shape="squircle"] .up-avatar-ring { border-radius: 38px !important; }
#user-profile-modal[data-avatar-shape="squircle"] .up-avatar { border-radius: 34px !important; }
#user-profile-modal[data-avatar-shape="rounded"] .up-avatar-ring { border-radius: 24px !important; }
#user-profile-modal[data-avatar-shape="rounded"] .up-avatar { border-radius: 20px !important; }
#user-profile-modal[data-avatar-ring="none"] .up-avatar-ring { box-shadow: none !important; }
#user-profile-modal[data-avatar-ring="subtle"] .up-avatar-ring { box-shadow: 0 0 0 2px rgba(255, 255, 255, .2), 0 14px 36px rgba(0, 0, 0, .28) !important; }
#user-profile-modal[data-avatar-ring="glow"] .up-avatar-ring { box-shadow: 0 0 0 2px rgba(255, 255, 255, .22), 0 0 30px color-mix(in srgb, var(--up-profile-color, #7c3aed) 52%, transparent), 0 16px 40px rgba(0, 0, 0, .32) !important; }
#user-profile-modal[data-card-style="solid"] .up-modal { background: color-mix(in srgb, var(--up-profile-color, #7c3aed) 10%, #0c1020) !important; backdrop-filter: none !important; }
#user-profile-modal[data-card-style="minimal"] .up-modal { border-color: transparent !important; background: rgba(8, 11, 22, .94) !important; box-shadow: 0 24px 70px rgba(0, 0, 0, .34) !important; }

/* Light theme */
[data-theme="light"] #stab-profile {
    --ps-line: rgba(67, 54, 101, .1);
    --ps-line-strong: rgba(67, 54, 101, .16);
}

[data-theme="light"] #stab-profile .profile-editor-heading { border-color: rgba(91, 72, 178, .1); background: radial-gradient(circle at 86% 10%, rgba(55, 186, 228, .1), transparent 28%), radial-gradient(circle at 8% 100%, rgba(122, 92, 220, .1), transparent 38%), rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 #fff, 0 16px 42px rgba(60, 48, 94, .07); }
[data-theme="light"] #stab-profile .profile-editor-heading-meta span { border-color: rgba(68, 54, 104, .08); color: rgba(44, 39, 57, .58); background: rgba(255, 255, 255, .56); }
[data-theme="light"] #stab-profile .profile-editor-stack > .settings-card,
[data-theme="light"] #stab-profile .profile-live-card { border-color: rgba(78, 63, 117, .09) !important; background: radial-gradient(circle at 0 0, rgba(129, 105, 255, .06), transparent 34%), rgba(255, 255, 255, .7) !important; box-shadow: inset 0 1px 0 #fff, 0 14px 38px rgba(60, 48, 94, .065) !important; }
[data-theme="light"] #stab-profile .profile-live-toolbar,
[data-theme="light"] #stab-profile .profile-live-hint { color: rgba(56, 48, 73, .48); background: rgba(81, 65, 119, .025); }
[data-theme="light"] #stab-profile .profile-preview-avatar-stage { border-color: rgba(255, 255, 255, .96); }
[data-theme="light"] #stab-profile .profile-preview-avatar-stage .settings-avatar-edit { border-color: #fff !important; }
[data-theme="light"] #stab-profile .profile-preview-identity h3 { color: #292434; }
[data-theme="light"] #stab-profile .profile-preview-identity p,
[data-theme="light"] #stab-profile .profile-preview-bio { color: rgba(55, 48, 70, .55); }
[data-theme="light"] #stab-profile .profile-preview-status { color: rgba(45, 39, 57, .76); border-color: rgba(91, 72, 178, .09); }
[data-theme="light"] #stab-profile .profile-section-heading { border-bottom-color: rgba(52, 43, 77, .07); }
[data-theme="light"] #stab-profile .settings-input-wrap,
[data-theme="light"] #stab-profile .settings-textarea,
[data-theme="light"] #stab-profile .profile-segmented,
[data-theme="light"] #stab-profile #social-links-list input { border-color: rgba(54, 45, 78, .085) !important; color: #2f2a3b !important; background: rgba(255, 255, 255, .7) !important; }
[data-theme="light"] #stab-profile .profile-cover-control,
[data-theme="light"] #stab-profile .profile-style-option,
[data-theme="light"] #stab-profile .profile-social-row { border-color: rgba(66, 53, 101, .075) !important; background: rgba(74, 56, 116, .02) !important; }
[data-theme="light"] #stab-profile .profile-cover-label { color: rgba(44, 39, 57, .65) !important; }
[data-theme="light"] #stab-profile .profile-cover-label small { color: rgba(68, 61, 84, .39) !important; }
[data-theme="light"] #stab-profile .cover-pattern-opt { color: rgba(48, 42, 62, .7) !important; border-color: rgba(65, 52, 97, .09) !important; background: rgba(255, 255, 255, .45) !important; }
[data-theme="light"] #stab-profile .cover-pattern-opt:hover { color: #332d40 !important; border-color: rgba(103, 83, 190, .2) !important; }
[data-theme="light"] #stab-profile .cover-pattern-opt.active { color: #2d2740 !important; border-color: rgba(100, 79, 206, .3) !important; background: linear-gradient(145deg, rgba(112, 88, 223, .12), rgba(58, 171, 215, .045)) !important; }
[data-theme="light"] #stab-profile .cover-pattern-swatch { border-color: rgba(255, 255, 255, .68); background-color: #756ca7; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 12px rgba(58, 45, 94, .08); }
[data-theme="light"] #stab-profile .cover-pattern-copy small { color: rgba(65, 57, 82, .46); }
[data-theme="light"] #stab-profile .cover-pattern-opt.active .cover-pattern-copy small { color: rgba(57, 48, 79, .58); }
[data-theme="light"] #stab-profile .profile-social-empty { color: rgba(67, 58, 86, .4); background: rgba(83, 65, 126, .02); }
[data-theme="light"] #stab-profile .profile-social-empty strong { color: rgba(45, 39, 57, .66); }
[data-theme="light"] #stab-profile .profile-preset-head strong,
[data-theme="light"] #stab-profile .profile-secondary-color strong { color: rgba(45, 39, 57, .7); }
[data-theme="light"] #stab-profile .profile-preset-head small,
[data-theme="light"] #stab-profile .profile-secondary-color small { color: rgba(68, 61, 84, .4); }
[data-theme="light"] #stab-profile .profile-secondary-color { border-color: rgba(54, 45, 78, .08); background: rgba(255, 255, 255, .62); }
[data-theme="light"] #stab-profile .profile-save-dock { border-color: rgba(78, 63, 117, .1) !important; background: rgba(248, 247, 253, .9) !important; box-shadow: inset 0 1px 0 #fff, 0 14px 36px rgba(60, 48, 94, .08) !important; }
[data-theme="light"] #stab-profile .profile-save-dock-copy strong { color: rgba(45, 39, 57, .72); }
[data-theme="light"] #stab-profile .profile-save-dock-copy small { color: rgba(68, 61, 84, .42); }

@media (max-width: 980px) {
    #stab-profile .profile-studio-layout { grid-template-columns: minmax(0, 1fr); }
    #stab-profile .profile-live-card { position: relative; top: auto; }
    #stab-profile .profile-live-card { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(300px, 1.2fr); grid-template-rows: auto 1fr auto; }
    #stab-profile .profile-live-toolbar { grid-column: 1 / -1; }
    #stab-profile .profile-cover-preview { height: 100% !important; min-height: 300px; }
    #stab-profile .profile-live-body { min-width: 0; padding-top: 58px; }
    #stab-profile .profile-preview-avatar-stage { left: 18px; }
    #stab-profile .profile-live-hint { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    #stab-profile .profile-editor-heading { min-height: 112px; align-items: flex-start !important; padding: 19px !important; }
    #stab-profile .profile-editor-heading-meta { display: none; }
    #stab-profile .profile-live-card { display: block; }
    #stab-profile .profile-cover-preview { height: 180px !important; min-height: 0; }
    #stab-profile .profile-cover-controls,
    #stab-profile .profile-style-options { grid-template-columns: minmax(0, 1fr) !important; }
    #stab-profile .profile-style-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #stab-profile .profile-social-row { grid-template-columns: 36px minmax(90px, .7fr) minmax(128px, 1.3fr) 31px !important; }
    #stab-profile .profile-save-dock-copy small { display: none; }
}

@media (max-width: 480px) {
    #stab-profile,
    #stab-profile .profile-settings-grid,
    #stab-profile .profile-studio-layout,
    #stab-profile .profile-editor-stack { width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }
    #stab-profile .profile-editor-heading { min-height: 102px; border-radius: 21px; }
    #stab-profile .profile-editor-kicker { font-size: .56rem; }
    #stab-profile .profile-editor-heading h2 { margin-top: 5px !important; font-size: 1.35rem !important; }
    #stab-profile .profile-editor-heading p { max-width: 100%; overflow: hidden; font-size: .68rem !important; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
    #stab-profile .profile-editor-stack { gap: 10px; }
    #stab-profile .profile-live-card,
    #stab-profile .profile-editor-stack > .settings-card,
    #stab-profile .profile-save-dock { border-radius: 20px !important; }
    #stab-profile .profile-live-toolbar { min-height: 44px; padding-inline: 12px; }
    #stab-profile .profile-live-toolbar > span:first-child { font-size: 0; }
    #stab-profile .profile-live-toolbar > span:first-child i { font-size: .65rem; }
    #stab-profile .profile-save-state { width: 29px; height: 29px; flex: 0 0 29px; justify-content: center; padding: 0; }
    #stab-profile .profile-save-state span { display: none; }
    #stab-profile .profile-cover-preview { height: 166px !important; }
    #stab-profile .profile-live-body { padding: 51px 14px 14px; }
    #stab-profile .profile-preview-avatar-stage { width: 88px; height: 88px; top: -47px; left: 14px; border-width: 4px; border-radius: 28px; }
    #stab-profile #cover-preview-avatar,
    #stab-profile #settings-avatar-preview { border-radius: 23px !important; }
    #stab-profile .profile-preview-identity { padding-left: 100px; }
    #stab-profile .profile-preview-identity h3 { font-size: 1rem; }
    #stab-profile .profile-preview-status { margin-top: 14px; }
    #stab-profile .settings-card-section { padding: 14px !important; }
    #stab-profile .profile-section-heading { grid-template-columns: 36px minmax(0, 1fr) auto !important; }
    #stab-profile .profile-section-heading > i { width: 36px !important; height: 36px !important; }
    #stab-profile .profile-identity-card .settings-form-grid { grid-template-columns: minmax(0, 1fr) !important; }
    #stab-profile .profile-identity-card .settings-field:first-child { grid-column: auto; }
    #stab-profile .profile-cover-control,
    #stab-profile .profile-style-option { padding: 10px; }
    #stab-profile .profile-style-presets { gap: 6px; }
    #stab-profile .profile-style-preset { min-height: 58px; }
    #stab-profile .profile-preset-head small { display: none; }
    #stab-profile #profile-style-reset span { display: none; }
    #stab-profile .profile-social-row { grid-template-columns: 33px minmax(0, 1fr) 29px !important; grid-template-areas: "icon platform remove" "icon url remove"; gap: 5px 7px !important; }
    #stab-profile .profile-social-row-icon { grid-area: icon; width: 33px !important; height: 33px !important; }
    #stab-profile .social-platform { grid-area: platform; }
    #stab-profile .social-url { grid-area: url; }
    #stab-profile .remove-social-link { grid-area: remove; }
    #stab-profile #social-links-list input { height: 33px !important; min-height: 33px !important; }
    #stab-profile .profile-avatar-shapes .profile-segmented-option span:last-child { display: none; }
    #stab-profile .profile-save-dock { min-height: 62px; padding: 8px; }
    #stab-profile .profile-save-dock-copy { display: none; }
    #stab-profile #save-profile-btn { width: 100% !important; min-width: 0; }
    #stab-profile #save-profile-btn kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    #stab-profile *,
    #stab-profile *::before,
    #stab-profile *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* The studio intentionally exposes only the three choices people understand. */
#stab-profile .profile-simple-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(230px, .85fr);
    gap: 10px;
}
#stab-profile .profile-simple-controls > .profile-cover-control:first-child {
    grid-row: span 2;
}
#stab-profile .profile-simple-controls .profile-style-option,
#stab-profile .profile-simple-controls .profile-cover-control {
    min-width: 0;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-elevated) 72%, transparent);
}
#stab-profile .profile-simple-controls #cover-pattern-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 760px) {
    #stab-profile .profile-simple-controls { grid-template-columns: minmax(0, 1fr); }
    #stab-profile .profile-simple-controls > .profile-cover-control:first-child { grid-row: auto; }
    #stab-profile .profile-simple-controls #cover-pattern-picker { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (max-width: 440px) {
    #stab-profile .profile-simple-controls #cover-pattern-picker { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
