.profile-layout {
    grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
    align-items: start;
}

.settings-tabs {
    display: grid;
    gap: clamp(16px, 2vw, 24px);
    width: 100%;
    max-width: 1760px;
    min-width: 0;
}

.settings-tab-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.settings-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(167, 184, 218, 0.16);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        rgba(7, 11, 24, 0.42);
}

.settings-tab-list label {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 820;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

.settings-tab-list label:hover {
    color: var(--text);
    border-color: rgba(167, 184, 218, 0.22);
    background: rgba(255, 255, 255, 0.045);
}

.settings-tab-panels {
    min-width: 0;
}

.settings-tab-panel {
    display: none;
}

#settings-tab-public-profile:checked ~ .settings-tab-list label[for="settings-tab-public-profile"],
#settings-tab-theme:checked ~ .settings-tab-list label[for="settings-tab-theme"],
#settings-tab-privacy:checked ~ .settings-tab-list label[for="settings-tab-privacy"],
#settings-tab-achievements:checked ~ .settings-tab-list label[for="settings-tab-achievements"] {
    color: var(--text);
    border-color: rgb(var(--neon-primary-rgb) / 0.36);
    background:
        linear-gradient(180deg, rgb(var(--neon-primary-rgb) / 0.16), rgb(var(--neon-secondary-rgb) / 0.08)),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 18px rgb(var(--neon-primary-rgb) / 0.12);
}

#settings-tab-public-profile:checked ~ .settings-tab-panels [data-settings-panel="public-profile"],
#settings-tab-theme:checked ~ .settings-tab-panels [data-settings-panel="theme"],
#settings-tab-privacy:checked ~ .settings-tab-panels [data-settings-panel="privacy"],
#settings-tab-achievements:checked ~ .settings-tab-panels [data-settings-panel="achievements"] {
    display: block;
}

.settings-public-layout,
.settings-theme-layout {
    display: grid;
    gap: clamp(18px, 2vw, 28px);
    align-items: start;
    width: 100%;
    min-width: 0;
}

.settings-public-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    grid-template-areas:
        "profile-editor profile-preview"
        "profile-support profile-preview";
    max-width: 1280px;
}

.settings-public-layout > .panel,
.settings-theme-layout > .panel {
    min-width: 0;
}

.settings-public-layout .public-profile,
.settings-public-layout .profile-editor {
    padding: clamp(20px, 2vw, 30px);
}

.settings-public-layout .public-profile {
    grid-area: profile-preview;
    position: sticky;
    top: 24px;
    display: grid;
    gap: 16px;
    align-content: start;
}

.settings-public-layout .public-profile > .profile-avatar {
    margin-bottom: 0;
}

.settings-public-layout .public-profile > .eyebrow,
.settings-public-layout .public-profile > h1,
.settings-public-layout .public-profile > p:not(.eyebrow) {
    margin-bottom: 0;
}

.settings-public-layout .public-profile > h1 {
    font-size: clamp(2.25rem, 4vw, 3.35rem);
    line-height: 0.98;
}

.settings-public-layout .public-profile > p:not(.eyebrow) {
    max-width: 32ch;
    color: #c4ccdc;
    line-height: 1.58;
}

.settings-public-layout .profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-public-layout .profile-stats span {
    min-height: 66px;
    padding: 10px;
    font-size: 0.78rem;
    overflow-wrap: normal;
    word-break: normal;
}

.settings-public-layout .profile-stats strong {
    font-size: 0.98rem;
}

.settings-public-layout .profile-editor {
    grid-area: profile-editor;
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: none;
}

.settings-public-layout .profile-editor .section-heading {
    margin-bottom: 0;
}

.profile-support-grid {
    grid-area: profile-support;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: none;
    min-width: 0;
}

.profile-support-grid .profile-starter-empty {
    grid-column: 1 / -1;
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
}

.settings-theme-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1760px;
}

.settings-theme-layout .profile-editor {
    width: 100%;
    max-width: 1280px;
}

.profile-page .neon-profile-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-theme-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 18px;
    align-items: center;
    min-width: 0;
    padding: 24px 28px;
}

.settings-theme-summary .eyebrow {
    grid-column: 1;
    grid-row: 1;
}

.settings-theme-summary h2,
.settings-theme-summary p {
    margin-bottom: 0;
}

.settings-theme-summary h2 {
    grid-column: 1;
    grid-row: 2;
    font-size: 1.35rem;
    line-height: 1.18;
}

.settings-theme-summary p {
    grid-column: 1;
    grid-row: 3;
    color: var(--muted);
    line-height: 1.5;
}

.settings-theme-summary .button {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    justify-self: end;
}

.settings-plan-summary {
    display: grid;
    gap: 10px;
    margin-top: 0;
    padding: 14px;
    border: 1px solid rgb(var(--neon-primary-rgb) / 0.18);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, var(--neon-soft), var(--neon-secondary-soft)),
        rgba(7, 11, 24, 0.42);
}

.settings-plan-summary-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.settings-plan-summary-heading h2,
.settings-plan-summary p {
    margin-bottom: 0;
}

.settings-plan-summary-heading h2 {
    font-size: 1.2rem;
    line-height: 1.12;
}

.settings-plan-summary p {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.settings-plan-summary .button,
.settings-theme-summary .button {
    width: fit-content;
}

.public-profile-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1.45fr);
    gap: 16px;
    align-items: start;
}

.public-profile-card {
    position: sticky;
    top: 96px;
}

.public-profile-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.public-room-snapshot-panel {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.public-badges-panel {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.public-profile > h1 {
    max-width: 100%;
    font-size: clamp(2.9rem, 5.4vw, 5.4rem);
    line-height: 0.98;
    overflow-wrap: normal;
    word-break: normal;
}

.public-badge-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.public-achievement {
    min-height: 116px;
}

.public-room-snapshot-frame {
    position: relative;
    display: block;
    aspect-ratio: 12 / 7;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(167, 184, 218, 0.16);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(13, 22, 55, 0.84), rgba(7, 11, 28, 0.94)),
        #070b22;
    color: inherit;
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -58px 120px rgba(0, 0, 0, 0.35),
        0 20px 54px rgba(0, 0, 0, 0.24);
}

.public-room-snapshot-shell {
    display: block;
}

.public-room-snapshot-image {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.34));
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    margin-bottom: 18px;
    border: 1px solid rgba(88, 213, 246, 0.28);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(88, 213, 246, 0.22), rgba(123, 110, 246, 0.28));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    overflow: hidden;
    text-transform: uppercase;
}

.profile-avatar-image {
    display: block;
    object-fit: cover;
}

.avatar-upload-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(167, 184, 218, 0.16);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(88, 213, 246, 0.08), rgba(123, 110, 246, 0.08)),
        rgba(255, 255, 255, 0.045);
}

.avatar-upload-preview .profile-avatar {
    width: 78px;
    height: 78px;
    margin-bottom: 0;
    border-radius: 18px;
}

.avatar-upload-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.avatar-file-field input[type="file"] {
    width: 100%;
    min-height: 46px;
    padding: 8px;
    border: 1px dashed rgba(167, 184, 218, 0.24);
    border-radius: var(--radius);
    background: rgba(7, 11, 24, 0.38);
    color: var(--muted);
}

.avatar-file-field input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-right: 10px;
    padding: 0 12px;
    border: 1px solid rgba(88, 213, 246, 0.24);
    border-radius: 8px;
    background: rgba(88, 213, 246, 0.12);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 760;
    cursor: pointer;
}

.avatar-remove-line {
    justify-content: start;
}

.avatar-remove-line span {
    font-size: 0.88rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
    margin-top: 2px;
}

.profile-stats span {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    overflow-wrap: anywhere;
}

.profile-stats strong {
    display: block;
    color: var(--text);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.profile-badge-strip {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgb(var(--neon-primary-rgb) / 0.18);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgb(var(--neon-primary-rgb) / 0.075), rgb(var(--neon-secondary-rgb) / 0.045)),
        rgba(7, 11, 24, 0.42);
}

.profile-badge-strip-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.profile-badge-strip-heading span {
    color: rgb(var(--neon-secondary-rgb) / 0.92);
    font-size: 0.76rem;
    font-weight: 820;
    letter-spacing: 0;
    text-transform: uppercase;
}

.profile-badge-strip-heading a {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 760;
    text-decoration: none;
}

.profile-badge-strip-heading a:hover,
.profile-badge-strip-heading a:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.profile-badge-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.profile-badge {
    display: grid;
    gap: 7px;
    justify-items: center;
    align-content: start;
    min-width: 0;
    min-height: 94px;
    padding: 9px 7px;
    border: 1px solid rgb(var(--neon-primary-rgb) / 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
}

.profile-badge .achievement-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
}

.profile-badge span {
    display: -webkit-box;
    overflow: hidden;
    max-width: 100%;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.public-profile-share {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.public-profile-share-heading,
.share-link-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.public-profile-share-heading span:first-child {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.9rem;
}

.public-profile-share-heading strong {
    color: var(--text);
    font-size: 1rem;
}

.share-link-field input {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.share-link-actions {
    flex-wrap: wrap;
}

.share-link-actions .button {
    min-height: 40px;
    padding: 0 14px;
}

.settings-public-layout .settings-form > .button {
    min-height: 54px;
    font-size: 0.98rem;
}

.share-link-actions p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

body.profile-page[data-neon-theme] .settings-tab-list {
    border-color: var(--neon-line);
    background:
        radial-gradient(circle at 16% 0%, var(--neon-soft), transparent 34%),
        linear-gradient(180deg, rgb(var(--neon-primary-rgb) / 0.085), rgb(var(--neon-secondary-rgb) / 0.045)),
        rgba(7, 11, 24, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 0 24px rgb(var(--neon-primary-rgb) / 0.1);
}

body.profile-page[data-neon-theme] .settings-tab-list label:hover {
    border-color: rgb(var(--neon-primary-rgb) / 0.32);
    background:
        linear-gradient(180deg, rgb(var(--neon-primary-rgb) / 0.11), rgb(var(--neon-secondary-rgb) / 0.055)),
        rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 18px rgb(var(--neon-primary-rgb) / 0.08);
}

body.profile-page[data-neon-theme] .public-profile,
body.profile-page[data-neon-theme] .profile-editor,
body.profile-page[data-neon-theme] .padded-panel,
body.profile-page[data-neon-theme] .settings-theme-summary,
body.public-profile-page[data-neon-theme] .public-profile-card,
body.public-profile-page[data-neon-theme] .public-room-snapshot-panel,
body.public-profile-page[data-neon-theme] .public-badges-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: var(--neon-line);
    background:
        radial-gradient(circle at 12% 0%, var(--neon-soft), transparent 34%),
        radial-gradient(circle at 92% 100%, var(--neon-secondary-soft), transparent 42%),
        linear-gradient(180deg, rgba(9, 14, 29, 0.68), rgba(5, 8, 18, 0.58)),
        rgba(5, 8, 18, 0.36);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 0 54px rgb(var(--neon-primary-rgb) / 0.045),
        0 22px 68px rgba(0, 0, 0, 0.32),
        0 0 32px rgb(var(--neon-primary-rgb) / 0.16),
        0 0 62px rgb(var(--neon-secondary-rgb) / 0.1);
}

body.profile-page[data-neon-theme] .public-profile::before,
body.profile-page[data-neon-theme] .profile-editor::before,
body.profile-page[data-neon-theme] .padded-panel::before,
body.profile-page[data-neon-theme] .settings-theme-summary::before,
body.public-profile-page[data-neon-theme] .public-profile-card::before,
body.public-profile-page[data-neon-theme] .public-room-snapshot-panel::before,
body.public-profile-page[data-neon-theme] .public-badges-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(90deg, transparent 0 8%, rgb(var(--neon-primary-rgb) / 0.22) 48%, rgb(var(--neon-secondary-rgb) / 0.16) 64%, transparent 94%) left top / 100% 1px no-repeat,
        linear-gradient(180deg, rgb(var(--neon-primary-rgb) / 0.06), transparent 26%);
    opacity: 0.9;
}

body.profile-page[data-neon-theme] .profile-avatar,
body.public-profile-page[data-neon-theme] .profile-avatar {
    border-color: var(--neon-line);
    box-shadow:
        inset 0 0 18px var(--neon-soft),
        0 0 24px rgb(var(--neon-primary-rgb) / 0.22),
        0 0 42px rgb(var(--neon-secondary-rgb) / 0.14);
}

body.profile-page[data-neon-theme] .avatar-upload-card,
body.profile-page[data-neon-theme] .profile-stats span,
body.profile-page[data-neon-theme] .profile-badge-strip,
body.profile-page[data-neon-theme] .profile-badge,
body.profile-page[data-neon-theme] .public-profile-share,
body.profile-page[data-neon-theme] .settings-plan-summary,
body.profile-page[data-neon-theme] .profile-privacy-card,
body.profile-page[data-neon-theme] .fair-use-details span,
body.public-profile-page[data-neon-theme] .public-achievement,
body.profile-page[data-neon-theme] .achievement.is-unlocked {
    border-color: rgb(var(--neon-primary-rgb) / 0.24);
    background:
        linear-gradient(135deg, var(--neon-soft), var(--neon-secondary-soft)),
        rgba(255, 255, 255, 0.032);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 0 22px rgb(var(--neon-primary-rgb) / 0.09);
}

body.profile-page[data-neon-theme] .profile-privacy-card-danger {
    border-color: rgba(255, 111, 145, 0.32);
    background:
        linear-gradient(135deg, rgba(255, 111, 145, 0.11), rgb(var(--neon-secondary-rgb) / 0.055)),
        rgba(255, 255, 255, 0.032);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 0 22px rgba(255, 111, 145, 0.08);
}

body.profile-page[data-neon-theme] .neon-profile-field {
    border-color: rgb(var(--neon-primary-rgb) / 0.26);
    background:
        linear-gradient(180deg, rgb(var(--neon-primary-rgb) / 0.075), rgb(var(--neon-secondary-rgb) / 0.04)),
        rgba(7, 11, 24, 0.34);
}

body.profile-page[data-neon-theme] .neon-choice {
    border-color: rgb(var(--neon-primary-rgb) / 0.16);
    background:
        linear-gradient(180deg, rgb(var(--neon-primary-rgb) / 0.055), rgba(255, 255, 255, 0.026)),
        rgba(7, 11, 24, 0.34);
}

body.profile-page[data-neon-theme] .neon-choice.is-selected {
    border-color: rgb(var(--neon-primary-rgb) / 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 24px rgb(var(--neon-primary-rgb) / 0.14);
}

body.profile-page[data-neon-theme] .fair-use-profile {
    border-top-color: var(--neon-line);
}

body.public-profile-page[data-neon-theme] .public-room-snapshot-frame {
    border-color: rgb(var(--neon-primary-rgb) / 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -58px 120px rgba(0, 0, 0, 0.35),
        0 20px 54px rgba(0, 0, 0, 0.24),
        0 0 22px rgb(var(--neon-primary-rgb) / 0.09);
}

.fair-use-profile {
    display: grid;
    gap: 12px;
    margin-top: 0;
    padding: 14px;
    border: 1px solid rgb(var(--neon-primary-rgb) / 0.18);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgb(var(--neon-primary-rgb) / 0.07), rgb(var(--neon-secondary-rgb) / 0.04)),
        rgba(7, 11, 24, 0.4);
}

.fair-use-profile-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.fair-use-profile-heading .eyebrow {
    margin-bottom: 6px;
}

.fair-use-profile-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.18rem, 1.7vw, 1.42rem);
    line-height: 1.08;
}

.fair-use-profile p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.48;
}

.fair-use-profile .bandwidth-meter {
    position: relative;
    width: 100%;
    height: 9px;
    overflow: hidden;
    border: 1px solid rgb(var(--neon-primary-rgb) / 0.18);
    border-radius: 999px;
    background: rgba(7, 11, 24, 0.58);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.24);
}

.fair-use-profile .bandwidth-meter span {
    display: block;
    width: min(var(--bandwidth-percent, 0%), 100%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--neon-primary), var(--neon-secondary));
    box-shadow: 0 0 16px var(--neon-glow);
}

.fair-use-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.fair-use-details span {
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid rgb(var(--neon-primary-rgb) / 0.16);
    border-radius: 8px;
    background: rgba(7, 11, 24, 0.42);
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.fair-use-details strong {
    display: block;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.18;
}

.achievement-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flash {
    --flash-duration: 5200ms;
    position: relative;
    overflow: hidden;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    animation: nightflat-flash-lifetime var(--flash-duration) ease forwards;
}

.flash::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius) var(--radius);
    background: linear-gradient(90deg, var(--neon-primary), var(--neon-secondary));
    box-shadow: 0 0 14px var(--neon-glow);
    transform-origin: left center;
    animation: nightflat-flash-timer var(--flash-duration) linear forwards;
}

.flash.is-paused,
.flash.is-paused::after {
    animation-play-state: paused;
}

.flash[data-flash-dismissing="true"] {
    pointer-events: none;
    animation: nightflat-flash-remove 260ms ease forwards;
}

.flash[data-flash-dismissing="true"]::after {
    animation-play-state: paused;
}

.flash-success {
    border-color: rgba(84, 215, 157, 0.34);
    background: rgba(84, 215, 157, 0.1);
}

.flash-error {
    border-color: rgba(210, 109, 145, 0.38);
    background: rgba(210, 109, 145, 0.12);
}

.flash-warning {
    border-color: rgba(231, 169, 95, 0.38);
    background: rgba(231, 169, 95, 0.12);
}

@keyframes nightflat-flash-timer {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@keyframes nightflat-flash-lifetime {
    0%,
    82% {
        max-height: 160px;
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes nightflat-flash-remove {
    to {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
        opacity: 0;
        transform: translateY(-8px);
    }
}

.email-verification-banner,
.email-verification-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(231, 169, 95, 0.34);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(231, 169, 95, 0.14), rgba(88, 213, 246, 0.08)),
        rgba(255, 255, 255, 0.052);
    color: var(--text);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.email-verification-panel {
    align-items: flex-start;
    margin-bottom: 20px;
}

.email-verification-banner div,
.email-verification-panel div {
    min-width: 0;
}

.email-verification-banner strong,
.email-verification-banner span,
.email-verification-panel h2,
.email-verification-panel p {
    display: block;
}

.email-verification-banner strong,
.email-verification-panel h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.25;
}

.email-verification-banner span,
.email-verification-panel p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.email-verification-banner form,
.email-verification-panel form {
    flex: 0 0 auto;
}

.email-verification-banner .button,
.email-verification-panel .button {
    white-space: nowrap;
}

.profile-privacy-panel {
    margin-top: 20px;
}

.settings-tab-panel.profile-privacy-panel {
    margin-top: 0;
    width: 100%;
    max-width: 1120px;
}

.profile-privacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.profile-page [data-settings-panel="achievements"].padded-panel {
    width: 100%;
    max-width: 1280px;
}

.profile-privacy-card {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.045);
}

.profile-privacy-card-danger {
    border-color: rgba(255, 111, 145, 0.28);
    background: rgba(255, 111, 145, 0.055);
}

.profile-privacy-card h3,
.profile-privacy-card p {
    margin: 0;
}

.profile-privacy-card p {
    color: var(--muted);
    line-height: 1.55;
}

.compact-delete-form {
    gap: 10px;
}

.compact-delete-form label {
    margin: 0;
}

@media (max-width: 720px) {
    .email-verification-banner,
    .email-verification-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .email-verification-banner .button,
    .email-verification-panel .button {
        width: 100%;
    }

    .profile-privacy-grid {
        grid-template-columns: 1fr;
    }

    .settings-tab-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-tab-list label {
        padding: 0 10px;
        text-align: center;
    }
}

@media (max-width: 1080px) {
    .settings-public-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "profile-editor"
            "profile-preview"
            "profile-support";
    }

    .profile-support-grid {
        grid-template-columns: 1fr;
    }

    .profile-support-grid .profile-starter-empty {
        grid-template-columns: 1fr;
    }

    .settings-public-layout .public-profile {
        position: static;
    }
}

@media (max-width: 520px) {
    .settings-tab-list {
        grid-template-columns: 1fr;
    }

    .settings-plan-summary-heading,
    .settings-theme-summary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .settings-theme-summary {
        padding: 20px;
    }

    .settings-plan-summary .button,
    .settings-theme-summary .button {
        grid-column: 1;
        grid-row: auto;
        justify-self: stretch;
        width: 100%;
    }
}

.empty-state {
    margin: 0;
    padding: 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
}

.profile-starter-empty {
    margin-top: 0;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    overflow: hidden;
}

.profile-starter-empty .starter-empty-copy {
    gap: 9px;
}

.profile-starter-empty .starter-empty-copy h3 {
    max-width: 14ch;
    font-size: clamp(1.2rem, 2.3vw, 1.45rem);
}

.profile-starter-empty .starter-empty-copy p {
    font-size: 0.92rem;
    line-height: 1.58;
}

.profile-starter-empty .starter-empty-meta,
.profile-starter-empty .starter-empty-moods {
    gap: 7px;
}

.profile-starter-empty .starter-empty-meta span,
.profile-starter-empty .starter-empty-mood {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 0.74rem;
}

.profile-starter-empty .starter-empty-actions {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    align-items: stretch;
}

.profile-starter-empty .starter-empty-track {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 0;
    padding: 10px;
}

.profile-starter-empty .starter-empty-track-art {
    width: 58px;
    height: 58px;
}

.profile-starter-empty .starter-empty-track-action {
    grid-column: 1 / -1;
    justify-self: stretch;
    min-height: 34px;
}

.profile-starter-empty .starter-empty-action,
.profile-starter-empty .starter-empty-action.favorite-track-manage-button {
    display: grid;
    align-content: center;
    justify-items: start;
    place-items: initial;
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: left;
    white-space: normal;
}

.profile-starter-empty .starter-empty-action strong {
    overflow-wrap: normal;
    word-break: normal;
}

.profile-starter-empty .starter-empty-links {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.profile-starter-empty .starter-empty-links .button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 12px;
}

.profile-starter-empty .starter-empty-links .button:first-child {
    grid-column: 1 / -1;
}

.config-list {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.config-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.config-list dd {
    margin: 0;
}

/* Wide settings use form columns instead of stretching single inputs forever. */
@media (min-width: 1366px) {
    .settings-public-layout {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
        justify-content: start;
    }

    .settings-public-layout .settings-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .settings-public-layout .settings-form > .avatar-upload-card,
    .settings-public-layout .settings-form > label:has(textarea),
    .settings-public-layout .settings-form > .check-line,
    .settings-public-layout .settings-form > .public-profile-share,
    .settings-public-layout .settings-form > .button {
        grid-column: 1 / -1;
    }

    .settings-public-layout .settings-form > .form-split {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .settings-theme-layout {
        grid-template-columns: minmax(0, 1fr) clamp(320px, 24vw, 440px);
        justify-content: start;
    }

    .settings-theme-summary {
        align-self: start;
        position: sticky;
        top: 24px;
    }

    .public-profile-shell {
        grid-template-columns: clamp(320px, 23vw, 440px) minmax(0, 1fr);
    }

    .achievement-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (min-width: 2000px) {
    .settings-public-layout {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    }

    .profile-privacy-grid,
    .public-badge-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 640px) {
    .avatar-upload-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .profile-badge-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-profile-share-heading,
    .share-link-actions,
    .profile-stats,
    .fair-use-details {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Account settings reset */
.profile-page .settings-tabs {
    max-width: 1280px;
    margin-inline: auto;
    gap: clamp(14px, 1.8vw, 20px);
    padding-bottom: clamp(220px, 24vh, 300px);
}

.profile-page .settings-tab-list {
    gap: clamp(18px, 3vw, 42px);
    padding: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    border-bottom-color: rgba(167, 184, 218, 0.16);
    background: rgba(4, 10, 20, 0.2);
    box-shadow: none;
}

.profile-page .settings-tab-list label {
    position: relative;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(224, 232, 247, 0.62);
    font-size: clamp(0.95rem, 1.15vw, 1.08rem);
    font-weight: 850;
}

.profile-page .settings-tab-list label::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--neon-primary), var(--neon-secondary));
    opacity: 0;
    transform: scaleX(0.35);
    transform-origin: left center;
    transition: opacity 160ms ease, transform 160ms ease;
}

.profile-page .settings-tab-list label:hover {
    color: var(--text);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

#settings-tab-public-profile:checked ~ .settings-tab-list label[for="settings-tab-public-profile"],
#settings-tab-theme:checked ~ .settings-tab-list label[for="settings-tab-theme"],
#settings-tab-privacy:checked ~ .settings-tab-list label[for="settings-tab-privacy"],
#settings-tab-achievements:checked ~ .settings-tab-list label[for="settings-tab-achievements"],
#settings-tab-starter:checked ~ .settings-tab-list label[for="settings-tab-starter"] {
    color: var(--text);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

#settings-tab-public-profile:checked ~ .settings-tab-list label[for="settings-tab-public-profile"]::after,
#settings-tab-theme:checked ~ .settings-tab-list label[for="settings-tab-theme"]::after,
#settings-tab-privacy:checked ~ .settings-tab-list label[for="settings-tab-privacy"]::after,
#settings-tab-achievements:checked ~ .settings-tab-list label[for="settings-tab-achievements"]::after,
#settings-tab-starter:checked ~ .settings-tab-list label[for="settings-tab-starter"]::after {
    opacity: 1;
    transform: scaleX(1);
}

#settings-tab-starter:checked ~ .settings-tab-panels [data-settings-panel="starter"] {
    display: block;
}

.profile-page .profile-settings-console,
.profile-page .starter-settings-console {
    display: grid;
    gap: 14px;
    max-width: 1280px;
    margin-inline: auto;
}

.profile-page .profile-settings-header,
.profile-page .profile-settings-main,
.profile-page .profile-preview-card,
.profile-page .profile-share-card,
.profile-page .profile-quick-stats,
.profile-page .profile-settings-row,
.profile-page .starter-settings-header,
.profile-page .starter-settings-card,
.profile-page .starter-settings-side > section,
.profile-page .settings-theme-layout > .panel,
.profile-page .profile-privacy-panel,
.profile-page [data-settings-panel="achievements"].padded-panel {
    border: 1px solid rgba(99, 236, 207, 0.17);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(99, 236, 207, 0.045), transparent 36%),
        rgba(4, 8, 18, 0.97);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 44px rgba(0, 0, 0, 0.22);
}

.profile-page .profile-settings-header,
.profile-page .starter-settings-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 18px;
    align-items: end;
    padding: clamp(18px, 2vw, 24px);
}

.profile-page .profile-settings-header h1,
.profile-page .starter-settings-header h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.profile-page .profile-settings-header p,
.profile-page .starter-settings-header p {
    max-width: 68ch;
    margin: 8px 0 0;
    color: rgba(202, 213, 232, 0.76);
}

.profile-page .profile-status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.profile-page .profile-status-strip div {
    display: grid;
    min-width: 0;
    gap: 4px;
    min-height: 62px;
    align-content: center;
    border: 1px solid rgba(167, 184, 218, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(9, 15, 28, 0.82);
}

.profile-page .profile-status-strip dt {
    overflow: hidden;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-page .profile-status-strip dd {
    margin: 0;
    color: rgba(202, 213, 232, 0.62);
    font-size: 0.78rem;
}

.profile-page .profile-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(286px, 328px);
    grid-template-areas: "editor rail";
    gap: 14px;
    align-items: start;
}

.profile-page .profile-settings-side {
    grid-area: rail;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.profile-page .profile-settings-main {
    grid-area: editor;
    min-width: 0;
    padding: clamp(18px, 2vw, 24px);
}

.profile-page .profile-settings-main::before,
.profile-page .profile-preview-card::before,
.profile-page .profile-share-card::before,
.profile-page .profile-quick-stats::before,
.profile-page .profile-settings-row::before,
.profile-page .starter-settings-card::before,
.profile-page .starter-settings-side > section::before {
    opacity: 0.12;
}

.profile-page .profile-settings-main .section-heading,
.profile-page .profile-privacy-panel .section-heading,
.profile-page [data-settings-panel="achievements"].padded-panel .section-heading {
    gap: 12px;
    margin-bottom: 18px;
}

.profile-page .profile-settings-main .section-heading h2 {
    font-size: clamp(1.45rem, 2vw, 2rem);
    letter-spacing: 0;
}

.profile-page .profile-settings-main .settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-page .profile-settings-main .avatar-upload-card,
.profile-page .profile-settings-main .profile-bio-field,
.profile-page .profile-settings-main .form-split,
.profile-page .profile-settings-main .check-line,
.profile-page .profile-settings-main .settings-form > .button {
    grid-column: 1 / -1;
}

.profile-page .profile-settings-main .avatar-upload-card {
    align-items: center;
    padding: 16px;
    background:
        linear-gradient(90deg, rgba(99, 236, 207, 0.11), rgba(88, 213, 246, 0.04)),
        rgba(13, 24, 38, 0.88);
}

.profile-page .avatar-file-field {
    position: relative;
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
}

.profile-page .avatar-file-field input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.profile-page .avatar-file-button {
    display: inline-grid;
    place-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgb(var(--neon-primary-rgb) / 0.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgb(var(--neon-primary-rgb) / 0.16), rgb(var(--neon-secondary-rgb) / 0.08)),
        rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 820;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-page .avatar-file-field:focus-within .avatar-file-button,
.profile-page .avatar-file-field:hover .avatar-file-button {
    border-color: rgb(var(--neon-primary-rgb) / 0.48);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 18px rgb(var(--neon-primary-rgb) / 0.12);
}

.profile-page .profile-settings-main textarea {
    min-height: 118px;
}

.profile-page .profile-settings-main .button[type="submit"] {
    min-height: 48px;
    border-radius: 8px;
}

.profile-page .profile-preview-card,
.profile-page .profile-share-card,
.profile-page .profile-quick-stats {
    padding: 16px;
}

.profile-page .profile-preview-card {
    min-height: 0;
    justify-items: center;
    text-align: center;
}

.profile-page .profile-preview-card-heading,
.profile-page .profile-rail-chip-row,
.profile-page .share-link-actions,
.profile-page .profile-quick-stats dl,
.profile-page .profile-settings-row dl,
.profile-page .starter-settings-side dl {
    width: 100%;
}

.profile-page .profile-preview-card .profile-avatar {
    width: 82px;
    height: 82px;
}

.profile-page .profile-preview-card h2 {
    margin: 0;
    font-size: 1.42rem;
    letter-spacing: 0;
}

.profile-page .profile-preview-card p {
    max-width: 24ch;
    margin: 0;
    color: rgba(202, 213, 232, 0.72);
}

.profile-page .share-link-field input {
    min-height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-page .share-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-page .share-link-actions .button {
    min-height: 38px;
    border-radius: 8px;
}

.profile-page .profile-quick-stats dl,
.profile-page .profile-settings-row dl,
.profile-page .starter-settings-side dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.profile-page .profile-quick-stats dl div,
.profile-page .profile-settings-row dl div,
.profile-page .starter-settings-side dl div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    min-height: 34px;
    align-items: center;
    border-top: 1px solid rgba(167, 184, 218, 0.1);
}

.profile-page .profile-quick-stats dl div:first-child,
.profile-page .profile-settings-row dl div:first-child,
.profile-page .starter-settings-side dl div:first-child {
    border-top: 0;
}

.profile-page .profile-quick-stats dt,
.profile-page .profile-settings-row dd,
.profile-page .starter-settings-side dd {
    color: var(--text);
    font-weight: 850;
}

.profile-page .profile-quick-stats dd,
.profile-page .profile-settings-row dt,
.profile-page .starter-settings-side dt {
    margin: 0;
    color: rgba(202, 213, 232, 0.62);
}

.profile-page .profile-settings-sections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.profile-page .profile-settings-row {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
    min-height: 178px;
    padding: 16px;
}

.profile-page .profile-settings-row h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.profile-page .profile-settings-row p {
    margin: 0;
    color: rgba(202, 213, 232, 0.72);
}

.profile-page .profile-card-link {
    align-self: end;
    color: rgb(var(--neon-primary-rgb) / 0.96);
    font-weight: 850;
}

.profile-page .settings-theme-layout {
    grid-template-columns: minmax(0, 1fr) minmax(286px, 328px);
    max-width: 1280px;
    gap: 14px;
    margin-inline: auto;
}

.profile-page .settings-theme-layout > .panel,
.profile-page .profile-privacy-panel,
.profile-page [data-settings-panel="achievements"].padded-panel {
    padding: clamp(18px, 2vw, 24px);
}

.profile-page .neon-profile-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-page .profile-privacy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-page .profile-privacy-card {
    border-radius: 8px;
    background: rgba(9, 15, 28, 0.78);
}

.profile-page .achievement-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.profile-page .achievement {
    border-radius: 8px;
    background: rgba(9, 15, 28, 0.78);
}

.profile-page .starter-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(286px, 328px);
    gap: 14px;
    align-items: start;
}

.profile-page .starter-settings-card,
.profile-page .starter-settings-side > section {
    min-width: 0;
    padding: 16px;
}

.profile-page .starter-settings-side {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.profile-page .starter-settings-side h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 1.12rem;
    line-height: 1.18;
    letter-spacing: 0;
}

.profile-page .starter-next-actions {
    display: grid;
    gap: 8px;
}

.profile-page .starter-next-actions .button {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
}

.profile-page .profile-starter-empty-full.starter-empty-state {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.profile-page .profile-starter-empty-full .starter-empty-track {
    min-height: 72px;
    background: rgba(2, 5, 16, 0.5);
}

.profile-page .profile-starter-empty-full .starter-empty-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    .profile-page .profile-settings-header,
    .profile-page .profile-settings-layout,
    .profile-page .settings-theme-layout,
    .profile-page .starter-settings-header,
    .profile-page .starter-settings-layout {
        grid-template-columns: 1fr;
        grid-template-areas: none;
    }

    .profile-page .profile-settings-side,
    .profile-page .profile-settings-main {
        grid-area: auto;
    }

    .profile-page .profile-settings-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .profile-page .settings-tab-list {
        gap: 18px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: thin;
    }

    .profile-page .settings-tab-list label {
        flex: 0 0 auto;
        min-height: 44px;
    }

    .profile-page .profile-settings-main .settings-form,
    .profile-page .profile-status-strip,
    .profile-page .profile-settings-sections,
    .profile-page .profile-privacy-grid,
    .profile-page .profile-starter-empty-full.starter-empty-state,
    .profile-page .profile-starter-empty-full .starter-empty-actions {
        grid-template-columns: 1fr;
    }

    .profile-page .profile-settings-main .avatar-upload-card {
        align-items: start;
    }
}

/* Professional settings polish */
.profile-page .settings-tabs {
    max-width: min(1280px, calc(100vw - 48px));
    gap: 16px;
}

.profile-page .settings-tab-list {
    width: fit-content;
    max-width: 100%;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(99, 236, 207, 0.14);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(10, 18, 30, 0.92), rgba(4, 8, 18, 0.88)),
        rgba(4, 8, 18, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 16px 34px rgba(0, 0, 0, 0.18);
}

.profile-page .settings-tab-list label {
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(224, 232, 247, 0.68);
    font-size: 0.92rem;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

.profile-page .settings-tab-list label::after {
    display: none;
}

.profile-page .settings-tab-list label:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
}

#settings-tab-public-profile:checked ~ .settings-tab-list label[for="settings-tab-public-profile"],
#settings-tab-theme:checked ~ .settings-tab-list label[for="settings-tab-theme"],
#settings-tab-privacy:checked ~ .settings-tab-list label[for="settings-tab-privacy"],
#settings-tab-achievements:checked ~ .settings-tab-list label[for="settings-tab-achievements"],
#settings-tab-starter:checked ~ .settings-tab-list label[for="settings-tab-starter"] {
    color: #fff;
    border-color: rgba(99, 236, 207, 0.28);
    background:
        linear-gradient(180deg, rgba(99, 236, 207, 0.16), rgba(88, 213, 246, 0.07)),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 18px rgba(99, 236, 207, 0.11);
}

.profile-page .profile-settings-console,
.profile-page .starter-settings-console {
    gap: 16px;
}

.profile-page .profile-settings-header,
.profile-page .profile-settings-main,
.profile-page .profile-preview-card,
.profile-page .profile-share-card,
.profile-page .profile-quick-stats,
.profile-page .profile-settings-row,
.profile-page .starter-settings-header,
.profile-page .starter-settings-card,
.profile-page .starter-settings-side > section,
.profile-page .settings-theme-layout > .panel,
.profile-page .profile-privacy-panel,
.profile-page [data-settings-panel="achievements"].padded-panel {
    border-color: rgba(99, 236, 207, 0.14);
    background:
        linear-gradient(180deg, rgba(5, 9, 20, 0.985), rgba(4, 8, 18, 0.965)),
        rgba(4, 8, 18, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 16px 38px rgba(0, 0, 0, 0.24);
}

.profile-page .profile-settings-header,
.profile-page .starter-settings-header {
    min-height: 168px;
    align-items: center;
    border-color: rgba(99, 236, 207, 0.12);
    background:
        linear-gradient(90deg, rgba(4, 8, 18, 0.99), rgba(4, 8, 18, 0.94)),
        rgba(4, 8, 18, 0.98);
}

.profile-page .profile-settings-header h1,
.profile-page .starter-settings-header h2 {
    font-size: clamp(2.1rem, 3.3vw, 3rem);
    line-height: 1.02;
}

.profile-page .profile-settings-header p,
.profile-page .starter-settings-header p {
    max-width: 58ch;
    color: rgba(202, 213, 232, 0.72);
    font-size: 0.98rem;
}

.profile-page .profile-status-strip div {
    min-height: 72px;
    background: rgba(8, 13, 26, 0.86);
}

.profile-page .profile-settings-layout,
.profile-page .starter-settings-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 16px;
}

.profile-page .profile-settings-side,
.profile-page .starter-settings-side,
.profile-page .settings-theme-summary {
    position: sticky;
    top: 18px;
}

.profile-page .profile-settings-side,
.profile-page .starter-settings-side {
    gap: 14px;
}

.profile-page .profile-settings-main {
    padding: clamp(22px, 2vw, 28px);
}

.profile-page .profile-settings-main .section-heading {
    align-items: start;
    margin-bottom: 22px;
}

.profile-page .profile-settings-main .section-heading h2 {
    font-size: clamp(1.65rem, 2.2vw, 2.15rem);
}

.profile-page .profile-settings-main .settings-form {
    gap: 16px;
}

.profile-page .profile-settings-main .form-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}

.profile-page .profile-settings-main input,
.profile-page .profile-settings-main select,
.profile-page .profile-settings-main textarea,
.profile-page .share-link-field input {
    border-color: rgba(167, 184, 218, 0.13);
    background: rgba(17, 24, 38, 0.94);
}

.profile-page .profile-settings-main textarea {
    min-height: 126px;
}

.profile-page .profile-settings-main .avatar-upload-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    background:
        linear-gradient(90deg, rgba(99, 236, 207, 0.1), rgba(88, 213, 246, 0.035)),
        rgba(12, 23, 36, 0.9);
}

.profile-page .profile-settings-main .avatar-upload-preview .profile-avatar,
.profile-page .profile-settings-main .avatar-upload-preview img {
    width: 86px;
    height: 86px;
}

.profile-page .profile-settings-main .button[type="submit"] {
    min-height: 54px;
    font-size: 0.98rem;
}

.profile-page .profile-preview-card,
.profile-page .profile-share-card,
.profile-page .profile-quick-stats,
.profile-page .starter-settings-side > section {
    padding: 18px;
}

.profile-page .profile-preview-card {
    min-height: 282px;
    align-content: center;
}

.profile-page .profile-preview-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-page .profile-preview-card h2 {
    font-size: 1.54rem;
}

.profile-page .profile-share-card h2,
.profile-page .profile-quick-stats h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.35rem;
    letter-spacing: 0;
}

.profile-page .profile-share-card,
.profile-page .profile-quick-stats {
    display: grid;
    gap: 12px;
}

.profile-page .profile-quick-stats dl div,
.profile-page .profile-settings-row dl div,
.profile-page .starter-settings-side dl div {
    min-height: 40px;
}

.profile-page .profile-settings-sections {
    gap: 16px;
}

.profile-page .profile-settings-row {
    min-height: 166px;
    padding: 18px;
}

.profile-page .profile-settings-row h2 {
    font-size: 1.12rem;
}

.profile-page .profile-settings-row p,
.profile-page .profile-preview-card p,
.profile-page .profile-share-card p {
    color: rgba(202, 213, 232, 0.68);
}

.profile-page .profile-card-link {
    text-decoration: none;
}

.profile-page .profile-card-link:hover,
.profile-page .profile-card-link:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.profile-page .settings-theme-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 16px;
}

.profile-page .profile-privacy-grid {
    gap: 16px;
}

.profile-page .profile-privacy-card,
.profile-page .achievement {
    border: 1px solid rgba(167, 184, 218, 0.11);
    border-radius: 8px;
    background: rgba(8, 13, 26, 0.86);
}

.profile-page .achievement-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 14px;
}

.profile-page .starter-settings-card {
    padding: 18px;
}

.profile-page .profile-starter-empty-full.starter-empty-state {
    gap: 20px;
}

.profile-page .profile-starter-empty-full .starter-empty-track,
.profile-page .profile-starter-empty-full .starter-empty-action {
    background: rgba(8, 13, 26, 0.86);
}

@media (max-width: 1180px) {
    .profile-page .profile-settings-side,
    .profile-page .starter-settings-side,
    .profile-page .settings-theme-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .profile-page .settings-tabs {
        max-width: calc(100vw - 28px);
    }

    .profile-page .settings-tab-list label {
        min-height: 48px;
    }

    .profile-page .profile-settings-header,
    .profile-page .starter-settings-header {
        min-height: 0;
    }

    .profile-page .profile-settings-main .form-split,
    .profile-page .profile-settings-main .avatar-upload-card {
        grid-template-columns: 1fr;
    }
}

