.profile-cosmetic-avatar[data-cosmetic-frame="explorer"] {
    --cosmetic-ring: linear-gradient(145deg,#dcfaff,#7bdaed 37%,#346d95 60%,#8dcee9 83%,#ebfbff);
}
.profile-cosmetic-avatar[data-cosmetic-frame="hunter"] {
    --cosmetic-ring: linear-gradient(145deg,#d5c5ff,#906af4 36%,#ad79d5 56%,#6445ae 71%,#e7caff);
}
.profile-cosmetic-avatar[data-cosmetic-frame="master"] {
    --cosmetic-ring: conic-gradient(#ffe3a7,#fe9b56 17%,#b84a38 34%,#ffcf7d 47%,#f58248 69%,#b84a38 81%,#ffe3a7);
}
.profile-cosmetic-avatar[data-cosmetic-frame="legend"] {
    --cosmetic-ring: conic-gradient(#f9d4fa,#9fb3ff 19%,#a1fae3 34%,#f9e6b0 57%,#dda9f7 75%,#aaa8fc 87%,#f9d4fa);
}

.profile-cosmetic-avatar[data-cosmetic-frame="festival-01"] { --cosmetic-frame-image: url("../images/profile-frames/festival/01.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-02"] { --cosmetic-frame-image: url("../images/profile-frames/festival/02.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-03"] { --cosmetic-frame-image: url("../images/profile-frames/festival/03.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-04"] { --cosmetic-frame-image: url("../images/profile-frames/festival/04.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-05"] { --cosmetic-frame-image: url("../images/profile-frames/festival/05.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-06"] { --cosmetic-frame-image: url("../images/profile-frames/festival/06.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-07"] { --cosmetic-frame-image: url("../images/profile-frames/festival/07.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-08"] { --cosmetic-frame-image: url("../images/profile-frames/festival/08.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-09"] { --cosmetic-frame-image: url("../images/profile-frames/festival/09.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-10"] { --cosmetic-frame-image: url("../images/profile-frames/festival/10.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-11"] { --cosmetic-frame-image: url("../images/profile-frames/festival/11.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-12"] { --cosmetic-frame-image: url("../images/profile-frames/festival/12.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-13"] { --cosmetic-frame-image: url("../images/profile-frames/festival/13.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-14"] { --cosmetic-frame-image: url("../images/profile-frames/festival/14.png"); }
.profile-cosmetic-avatar[data-cosmetic-frame="festival-15"] { --cosmetic-frame-image: url("../images/profile-frames/festival/15.png"); }

.comment-festival-badges {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-inline-start: 5px;
    vertical-align: middle;
}
.comment-festival-badges img { display: block; width: 24px; height: 24px; object-fit: contain; }
.v3-profile-heading.has-earned-badges {
    display: grid;
    grid-template-columns: auto minmax(0,auto) minmax(0,1fr) auto;
}
.v3-profile-earned-badges {
    display: flex;
    box-sizing: content-box;
    min-width: 0;
    max-inline-size: calc(10 * 34px + 9 * 5px);
    max-block-size: calc(3 * 34px + 2 * 5px);
    overflow: clip;
    align-self: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0 0;
    padding: 0 0 0 12px;
    border-inline-start: 1px solid #624635;
    list-style: none;
}
.v3-profile-earned-badges img { display: block; width: 34px; height: 34px; object-fit: contain; }
@media (max-width: 1050px) {
    .v3-profile-heading.has-earned-badges { grid-template-columns: auto minmax(0,1fr); }
    .has-earned-badges > .v3-profile-edit, .has-earned-badges > .v3-profile-follow { grid-column: 1 / -1; }
    .v3-profile-earned-badges {
        grid-column: 1 / -1;
        margin: 0;
        padding: 8px 0 0;
        border: 0;
        border-top: 1px solid #624635;
    }
}
.v3-profile-earned-badges > li { flex: none; }
.profile-cosmetic-avatar { position: relative; }
.profile-cosmetic-avatar[data-cosmetic-frame]:not([data-cosmetic-frame=""])::after {
    position: absolute;
    z-index: 2;
    content: '';
    pointer-events: none;
}
.profile-cosmetic-avatar[data-cosmetic-frame]:not([data-cosmetic-frame=""], [data-cosmetic-frame^="festival-"])::after {
    inset: -2px;
    padding: 2px;
    border-radius: 50%;
    background: var(--cosmetic-ring);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.v3-profile-avatar-frame { display: flex; flex: none; margin-top: -38px; border-radius: 50%; }
.v3-profile-avatar-frame .v3-profile-avatar { margin-top: 0; box-shadow: 0 10px 25px #0005; }
.v3-profile-avatar-frame[data-cosmetic-frame]::after { inset: -2px; padding: 4px; }

.profile-cosmetic-avatar[data-cosmetic-frame^="festival-"] {
    --cosmetic-avatar-border-width: 0px;
}
.profile-cosmetic-avatar[data-cosmetic-frame^="festival-"]::after {
    /* Place the avatar edge under the frame rim to avoid a gap. */
    inset: -15%;
    padding: 0;
    background: var(--cosmetic-frame-image) center / 100% 100% no-repeat;
}

:is(.v3-profile-page[data-profile-color], .v3-profile-theme-preview) {
    --profile-theme-text: color-mix(in srgb, var(--profile-theme-color) 38%, white);
    --profile-theme-line: color-mix(in srgb, var(--profile-theme-color) 42%, #25232a);
    --profile-theme-amount: 17%;
    --profile-theme-cover-amount: 34%;
    --profile-theme-cover-tint: 12%;
    --profile-theme-heading-amount: 10%;
    --profile-theme-fill: color-mix(in srgb, var(--profile-theme-color) var(--profile-theme-amount), #18171b);
    --profile-theme-cover-fill: linear-gradient(115deg,
        color-mix(in srgb, var(--profile-theme-color) var(--profile-theme-cover-amount), #1b1a21),
        color-mix(in srgb, var(--profile-theme-end) var(--profile-theme-cover-amount), #1b1a21) 85%);
    --profile-theme-cover-overlay: linear-gradient(115deg,
        color-mix(in srgb, var(--profile-theme-color) var(--profile-theme-cover-tint), transparent),
        color-mix(in srgb, var(--profile-theme-end) var(--profile-theme-cover-tint), transparent));
    --profile-theme-heading-fill: linear-gradient(115deg,
        color-mix(in srgb, var(--profile-theme-color) var(--profile-theme-heading-amount), transparent),
        color-mix(in srgb, var(--profile-theme-end) var(--profile-theme-heading-amount), transparent));
}
:is(.v3-profile-page[data-profile-color], .v3-profile-theme-preview)[data-profile-intensity="subtle"] {
    --profile-theme-amount: 8%;
    --profile-theme-cover-amount: 10%;
    --profile-theme-cover-tint: 0%;
    --profile-theme-heading-amount: 0%;
}
:is(.v3-profile-page[data-profile-color], .v3-profile-theme-preview)[data-profile-intensity="strong"] {
    --profile-theme-amount: 26%;
    --profile-theme-cover-amount: 52%;
    --profile-theme-cover-tint: 24%;
    --profile-theme-heading-amount: 23%;
}
:is(.v3-profile-page[data-profile-color] .v3-profile-card, .v3-profile-theme-preview-card) {
    border-color: var(--profile-theme-line);
    background: linear-gradient(145deg, var(--profile-theme-fill), #19181c 72%);
}
.v3-profile-cover > img { opacity: 1; }
.v3-profile-cover > img[hidden] { display: none; }

:is(.v3-profile-page[data-profile-color] .v3-profile-cover, .v3-profile-theme-preview-cover):not(:has(> img:not([hidden]))) {
    background: var(--profile-theme-cover-fill);

    &::after {
        background: linear-gradient(0deg, rgba(20,16,13,.76), transparent 68%), var(--profile-theme-cover-overlay);
    }
}
:is(.v3-profile-page[data-profile-color] .v3-profile-heading, .v3-profile-theme-preview-heading) {
    border-color: var(--profile-theme-line);
    background: var(--profile-theme-heading-fill);
}
.v3-profile-page[data-profile-color][data-profile-intensity="strong"] :is(.v3-profile-about, .v3-profile-watch-summary, .v3-profile-overview-panel),
.v3-profile-theme-preview[data-profile-intensity="strong"] .v3-profile-theme-preview-panel {
    border-color: var(--profile-theme-line);
    background: var(--profile-theme-fill);
}
.v3-profile-page[data-profile-color] :is(.v3-profile-nickname, .v3-profile-overview-heading a, .v3-profile-bio a, .v3-profile-watch-summary-heading a:hover, .v3-profile-socials a:hover) {
    color: var(--profile-theme-text);
}
.v3-profile-page[data-profile-color] .v3-profile-bio a { text-decoration-color: currentColor; }

.v3-profile-theme-form { padding: 15px; }
.v3-profile-theme-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 14px; }
.v3-profile-theme-controls {
    display: flex;
    flex-wrap: wrap;
    align-self: start;
    gap: 10px 14px;
    padding: 12px;
    border: 1px solid var(--v3-line);
    border-radius: 6px;
    background: #1b1714;
}
.v3-profile-theme-controls label:not([hidden]) { display: grid; align-content: start; gap: 6px; }
.v3-profile-theme-controls label > span, .v3-profile-theme-preview figcaption {
    color: #d2c5bb;
    font-size: .8125rem;
    font-weight: 650;
}
.v3-profile-theme-controls input:is([type="color"], [type="text"]) {
    height: 44px;
    margin: 0;
    border: 1px solid var(--v3-line);
    border-radius: 6px;
    background: #151310;
    color: #fff5e9;
    font: inherit;
}
.v3-profile-theme-controls input[type="color"] { width: 70px; padding: 4px; cursor: pointer; }
.v3-profile-theme-controls input[type="text"] { width: 9ch; padding-inline: 8px; font: 1rem ui-monospace, Consolas, monospace; }
.v3-theme-control-group {
    flex: 1 0 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.v3-theme-control-group legend { padding: 0; margin-bottom: 6px; color: #d2c5bb; font-size: .8125rem; font-weight: 650; }
.v3-theme-intensities, .v3-theme-swatches, .v3-theme-secondary { display: flex; flex-wrap: wrap; gap: 8px; }
.v3-theme-palette-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.v3-theme-palette-actions button { cursor: pointer; }
.v3-theme-palette-actions button:disabled { cursor: wait; opacity: .65; }
.v3-theme-secondary { margin-top: 8px; }
.v3-profile-theme-controls :is(.v3-theme-intensities label, .v3-theme-check):not([hidden]) {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    cursor: pointer;
}
.v3-theme-intensities label { padding: 0 8px; border: 1px solid var(--v3-line); border-radius: 6px; }
.v3-theme-intensities label:has(input:checked) { border-color: #ee873b; background: #35271e; }
.v3-profile-theme-controls input:is([type="radio"], [type="checkbox"]) { accent-color: #ee873b; }
.v3-theme-swatches button {
    width: 36px;
    height: 36px;
    border: 1px solid #a89990;
    border-radius: 7px;
    background: var(--swatch);
    cursor: pointer;
}
.v3-theme-swatches button:is(:focus-visible, [aria-pressed="true"]) { outline: 2px solid #ffe2bb; outline-offset: 2px; }
[data-theme-cover-status] { margin: 6px 0; color: #d2c5bb; font-size: .8125rem; }
.v3-profile-theme-preview { min-width: 0; margin: 0; }
.v3-profile-theme-preview figcaption { margin-bottom: 8px; }
.v3-profile-theme-preview-card { overflow: hidden; border: 1px solid var(--profile-theme-line); border-radius: 8px; }
.v3-profile-theme-preview-cover { height: clamp(88px, 12vw, 138px); }
.v3-theme-secondary[hidden] { display: none; }
.v3-profile-theme-preview-heading { display: flex; align-items: end; gap: 9px; padding: 0 11px 8px; }
.v3-profile-theme-preview-heading img { z-index: 1; flex: none; margin-top: -21px; border: 2px solid #1b191c; border-radius: 50%; object-fit: cover; }
.v3-profile-theme-preview-heading div { display: grid; gap: 2px; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; }
.v3-profile-theme-preview-heading span { color: var(--profile-theme-text); font-size: .75rem; }
.v3-profile-theme-preview-tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 11px; color: #d7d2d5; font-size: .75rem; }
.v3-profile-theme-preview-tabs span { padding: 3px 6px; border: 1px solid var(--v3-line); border-radius: 4px; }
.v3-profile-theme-preview-tabs span:first-child { border-color: #f07820; color: #ffc290; background: rgba(229,116,24,.16); }
.v3-profile-theme-preview-panel { margin: 2px 11px 11px; padding: 8px; border: 1px solid var(--v3-line); border-radius: 6px; background: #201a16; font-size: .75rem; }
.v3-profile-theme-form .v3-settings-form-actions { margin-top: 12px; }

@media (max-width: 620px) {
    .v3-profile-theme-editor { grid-template-columns: minmax(0, 1fr); }
}

.v3-profile-cosmetics {
    --cosmetics-surface: #211c18;
    --cosmetics-inset: #191511;
    --cosmetics-tile: #2b221a;
    --cosmetics-line: #49372a;
    --cosmetics-muted: #cdbba9;
    --cosmetics-accent: #ffba88;
    --cosmetics-selected: #3c2a1a;
    --cosmetics-selected-line: #b47a46;
    --cosmetics-padding: clamp(12px,2vw,21px);
    border: 1px solid var(--cosmetics-line);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cosmetics-surface), #1b1714 75%);
    scroll-margin-top: 86px;
}
.v3-settings-inner > .v3-profile-cosmetics { margin: 0 0 14px; }
.v3-profile-cosmetics-heading {
    display: flex;
    min-height: 54px;
    align-items: center;
    gap: 12px;
    padding: 12px var(--cosmetics-padding);
    border-radius: inherit;
    cursor: pointer;
    list-style: none;
}
.v3-profile-cosmetics-heading::-webkit-details-marker { display: none; }
.v3-profile-cosmetics-heading:hover { background: var(--cosmetics-tile); }
.v3-profile-cosmetics-heading:focus-visible { outline: 2px solid var(--cosmetics-accent); outline-offset: -2px; }
.v3-profile-cosmetics-heading > svg { width: 18px; height: 18px; flex: none; color: var(--cosmetics-accent); }
.v3-profile-cosmetics[open] > .v3-profile-cosmetics-heading > svg { transform: rotate(180deg); }
.v3-profile-cosmetics-summary-text,
.v3-cosmetics-panel-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.v3-profile-cosmetics-summary-text { flex: 1; }
.v3-profile-cosmetics-summary-text > strong { font-size: 1.1rem; }
.v3-profile-cosmetics-summary-text > span,
.v3-cosmetics-panel-heading > span { color: var(--cosmetics-accent); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.v3-profile-cosmetics-form { display: grid; gap: 14px; margin: 0; padding: 0 var(--cosmetics-padding) var(--cosmetics-padding); }
.v3-profile-cosmetics > :is(.v3-profile-cosmetics-success, .v3-profile-cosmetics-error) { margin: 0 var(--cosmetics-padding) 12px; }
.v3-profile-cosmetics [hidden] { display: none !important; }
.v3-cosmetics-tabs {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--cosmetics-line);
    border-radius: 8px;
    background: var(--cosmetics-inset);
}
.v3-cosmetics-tabs [role="tab"] {
    min-width: 0;
    min-height: 42px;
    padding: 7px 5px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--cosmetics-muted);
    font: inherit;
    font-size: .875rem;
    line-height: 1.2;
    cursor: pointer;
}
.v3-cosmetics-tabs [role="tab"]:hover { background: var(--cosmetics-tile); color: #fff1e9; }
.v3-cosmetics-tabs [role="tab"][aria-selected="true"] {
    border-color: var(--cosmetics-selected-line);
    background: var(--cosmetics-selected);
    color: #fff0e5;
    font-weight: 650;
}
.v3-cosmetics-panel { display: grid; gap: 12px; min-width: 0; scroll-margin-top: 96px; }
.v3-cosmetics-panel-heading h3 { margin: 0; font-size: 1rem; }
.v3-cosmetics-panel-heading p { flex-basis: 100%; margin: 0; color: var(--cosmetics-muted); font-size: .875rem; }
.v3-cosmetics-badge-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.v3-cosmetics-badge-group > :is(legend, h4) { margin: 0 0 6px; padding: 0; color: var(--cosmetics-muted); font-size: .875rem; font-weight: 600; }
.v3-profile-comment-badge-count { margin: 0; font-weight: 650; }
.v3-cosmetics-comment-preview {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
    width: min(100%,360px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.v3-cosmetics-comment-slot {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 52px;
    padding: 3px;
    border: 1px solid var(--cosmetics-line);
    border-radius: 7px;
    background: var(--cosmetics-inset);
    color: var(--cosmetics-muted);
    font-size: .8125rem;
    text-align: center;
    overflow-wrap: anywhere;
}
.v3-cosmetics-comment-slot:has(img) { border-color: var(--cosmetics-selected-line); background: var(--cosmetics-selected); color: #ffe6d4; }
.v3-cosmetics-comment-slot img { width: 32px; height: 32px; object-fit: contain; }
.v3-cosmetics-comment-slot button {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 44px;
    padding: 4px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.v3-cosmetics-comment-slot button span {
    position: absolute;
    inset-inline-end: 5px;
    inset-block-start: 2px;
    font-size: 1rem;
    line-height: 1;
}
.v3-profile-badge-actions button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #775435;
    border-radius: 5px;
    background: var(--cosmetics-selected);
    color: #ffe4cc;
    font: inherit;
    cursor: pointer;
}
.v3-cosmetics-comment-slot button:hover,
.v3-profile-badge-actions button:not(:disabled):hover { background: #56391f; }
.v3-profile-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(min(100%,98px),1fr));
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.v3-profile-badge-tile { position: relative; min-width: 0; }
.v3-profile-badge-tile:has(.v3-profile-badge-actions),
.v3-cosmetics-badge-choice,
.v3-cosmetics-frame-choice {
    position: relative;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    height: 100%;
    padding: 7px 5px;
    border: 1px solid var(--cosmetics-line);
    border-radius: 7px;
    background: var(--cosmetics-tile);
    text-align: center;
}
.v3-cosmetics-badge-choice,
.v3-cosmetics-frame-choice { cursor: pointer; }
.v3-cosmetics-badge-choice input,
.v3-cosmetics-frame-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.v3-cosmetics-badge-choice:hover:not(:has(input:disabled)),
.v3-cosmetics-frame-choice:hover:not(:has(input:disabled)) { border-color: var(--cosmetics-selected-line); }
.v3-cosmetics-badge-choice:has(input:checked),
.v3-cosmetics-frame-choice:has(input:checked) { border-color: #e1a267; background: var(--cosmetics-selected); }
.v3-cosmetics-badge-choice:has(input:focus-visible),
.v3-cosmetics-frame-choice:has(input:focus-visible) { outline: 2px solid var(--cosmetics-accent); outline-offset: 2px; }
.v3-cosmetics-badge-choice:has(input:disabled),
.v3-cosmetics-frame-choice:has(input:disabled) { opacity: .62; cursor: default; }
.v3-cosmetics-choice-mark,
.v3-cosmetics-badge-position {
    position: absolute;
    inset-block-start: 5px;
    padding: 1px 4px;
    border-radius: 4px;
    color: var(--cosmetics-accent);
    background: var(--cosmetics-inset);
    font-size: .75rem;
    line-height: 1.25;
}
.v3-cosmetics-choice-mark { inset-inline-end: 5px; display: none; }
.v3-cosmetics-badge-choice:has(input:checked) .v3-cosmetics-choice-mark,
.v3-cosmetics-frame-choice:has(input:checked) .v3-cosmetics-choice-mark { display: block; }
.v3-cosmetics-badge-position { inset-inline-start: 5px; font-variant-numeric: tabular-nums; }
.v3-profile-badge-tile img,
.v3-cosmetics-badge-choice img { display: block; width: 52px; height: 52px; object-fit: contain; }
.v3-profile-badge-name,
.v3-cosmetics-frame-name { min-height: 2.45em; color: #fae3d7; font-size: .8125rem; line-height: 1.2; overflow-wrap: anywhere; }
.v3-profile-badge-actions { display: flex; align-items: center; gap: 6px; }
.v3-profile-badge-actions button:disabled { opacity: .35; cursor: default; }
.v3-profile-badge-tile[draggable="true"] { cursor: grab; }
.v3-profile-badge-tile[draggable="true"] img { pointer-events: none; }
.v3-profile-badge-tile.is-dragging { opacity: .55; }
.v3-profile-badge-tile.is-drop-target { border-color: var(--cosmetics-accent); background: var(--cosmetics-selected); }
.v3-profile-badge-empty { grid-column: 1 / -1; margin: 0; padding: 8px 0; color: var(--cosmetics-muted); font-size: .875rem; }
.v3-cosmetics-frames-layout {
    display: grid;
    grid-template-columns: minmax(130px,.25fr) minmax(0,1fr);
    align-items: start;
    gap: 14px;
}
.v3-profile-cosmetics-preview {
    display: grid;
    justify-items: center;
    gap: 16px;
    min-width: 0;
    padding: 20px 8px 11px;
    border: 1px solid var(--cosmetics-line);
    border-radius: 7px;
    background: var(--cosmetics-inset);
    text-align: center;
}
.v3-profile-cosmetics-preview-avatar { width: 90px; height: 90px; }
.v3-cosmetics-frame-caption { min-width: 0; color: var(--cosmetics-accent); font-size: .875rem; overflow-wrap: anywhere; }
.v3-cosmetics-frame-groups { display: grid; gap: 12px; min-width: 0; }
.v3-cosmetics-frame-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.v3-cosmetics-frame-group legend { margin-bottom: 6px; padding: 0; color: var(--cosmetics-muted); font-size: .875rem; }
.v3-cosmetics-frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(min(100%,90px),1fr));
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.v3-cosmetics-frame-choice { gap: 8px; padding-top: 10px; }
.v3-cosmetics-frame-thumb { width: 39px; height: 39px; }
.v3-profile-cosmetics-preview-avatar img,
.v3-cosmetics-frame-thumb img { display: block; width: 100%; height: 100%; border: var(--cosmetic-avatar-border-width,1px) solid #624a36; border-radius: 50%; object-fit: cover; }
.v3-cosmetics-frame-level { color: var(--cosmetics-muted); font-size: .75rem; }
.v3-cosmetics-goals { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.v3-cosmetics-goal {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) minmax(90px,34%);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--cosmetics-line);
    border-radius: 7px;
    background: var(--cosmetics-tile);
}
.v3-cosmetics-goal img { display: block; width: 42px; height: 42px; object-fit: contain; }
.v3-cosmetics-goal-copy { display: grid; gap: 2px; min-width: 0; color: var(--cosmetics-muted); font-size: .8125rem; overflow-wrap: anywhere; }
.v3-cosmetics-goal-copy strong { color: #fae3d7; }
.v3-cosmetics-goal-progress { display: flex; align-items: center; gap: 6px; color: var(--cosmetics-accent); font-size: .75rem; font-variant-numeric: tabular-nums; }
.v3-cosmetics-goal-progress progress { flex: 1; width: 0; min-width: 0; height: 6px; accent-color: #eea77d; }
.v3-cosmetics-goal-progress > span { white-space: nowrap; }
.v3-profile-cosmetics-footer {
    position: sticky;
    z-index: 3;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 9px;
    border-top: 1px solid var(--cosmetics-line);
    background: var(--cosmetics-surface);
}
.v3-profile-cosmetics-status { margin: 0; color: var(--cosmetics-muted); font-size: .8125rem; }
.v3-profile-cosmetics-footer button { min-height: 44px; margin-inline-start: auto; padding: 7px 13px; font-size: .875rem; }
.v3-profile-cosmetics-success, .v3-profile-cosmetics-error { margin: 0; font-size: .875rem; }
.v3-profile-cosmetics-success { color: #b9e6cc; }
.v3-profile-cosmetics-error { color: #ffadb3; }
@media (max-width: 780px) { .v3-profile-avatar-frame { margin-top: -31px; } }
@media (max-width: 760px) {
    .v3-profile-avatar-frame { margin-top: -25px; }
    .v3-profile-cosmetics-footer { bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); }
}
@media (max-width: 540px) {
    .v3-cosmetics-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .v3-cosmetics-frames-layout { grid-template-columns: minmax(0,1fr); }
    .v3-profile-cosmetics-preview { grid-template-columns: 75px minmax(0,1fr); align-items: center; justify-items: start; gap: 12px; padding: 12px; text-align: start; }
    .v3-profile-cosmetics-preview-avatar { justify-self: center; width: 62px; height: 62px; }
    .v3-cosmetics-comment-slot { min-height: 48px; }
    .v3-cosmetics-goal { grid-template-columns: 38px minmax(0,1fr); }
    .v3-cosmetics-goal img { grid-row: span 2; width: 38px; height: 38px; }
    .v3-cosmetics-goal-progress { grid-column: 2; }
}
@media (pointer: coarse) {
    .v3-cosmetics-tabs [role="tab"],
    .v3-profile-badge-actions button { min-height: 44px; }
    .v3-profile-badge-actions button { width: 44px; }
    .v3-profile-badge-grid[data-badge-grid] { grid-template-columns: repeat(auto-fill,minmax(min(100%,112px),1fr)); }
}
