/* Stage 4, revised 9.1: one continuous image, sliced across the existing panels. */
.fox-account-profile .fox-profile-overview {
    --fox-profile-mosaic-image: url("../img/fox/profile-foxland.png?v=20260927d");
    --fox-profile-mosaic-shade: rgba(var(--fox-rgb-ts2l1, 15, 10, 27), .78);
}

/* Every fragment uses the same image dimensions and the common overview origin. */
.fox-account-profile .fox-profile-overview.is-fox-profile-mosaic-ready > .fox-profile-friends,
.fox-account-profile .fox-profile-overview.is-fox-profile-mosaic-ready > .fox-profile-identity,
.fox-account-profile .fox-profile-overview.is-fox-profile-mosaic-ready > .fox-profile-details {
    background-image:
        linear-gradient(var(--fox-profile-mosaic-shade), var(--fox-profile-mosaic-shade)),
        var(--fox-profile-mosaic-image);
    background-size:
        100% 100%,
        var(--fox-profile-mosaic-width) var(--fox-profile-mosaic-height);
    background-position:
        0 0,
        var(--fox-profile-mosaic-x) var(--fox-profile-mosaic-y);
    background-repeat: no-repeat;
    background-origin: border-box;
}

/* Muted captions stay readable; group colors and main content styles are retained. */
.fox-account-profile .fox-profile-overview .fox-profile-info-group dt,
.fox-account-profile .fox-profile-overview .fox-profile-details__top > span,
.fox-account-profile .fox-profile-overview .fox-profile-friends .fox-profile-panel__head > a,
.fox-account-profile .fox-profile-overview .fox-profile-contact-list > a,
.fox-account-profile .fox-profile-overview .fox-profile-contact-list > span,
.fox-account-profile .fox-profile-overview .fox-profile-forum-grid span,
.fox-account-profile .fox-profile-overview .fox-profile-last-topic > span,
.fox-account-profile .fox-profile-overview .fox-profile-friends__list:empty::after,
.fox-account-profile .fox-profile-overview .fox-profile-friends__list .empty-element,
.fox-account-profile .fox-profile-overview .fox-profile-forum-stats > p {
    color: var(--fox-tone-as1l15, #baadc9);
}

/* Stage 4, 9.2: the three statistics tiles move independently of the mosaic. */
.fox-account-profile .fox-profile-overview .fox-profile-forum-grid > div {
    transform: none;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .fox-account-profile .fox-profile-overview .fox-profile-forum-grid > div:hover {
        transform: scale(1.015);
        border-color: rgba(var(--fox-rgb-as4l15, 196, 141, 248), .58);
        box-shadow:
            inset 0 1px rgba(var(--fox-rgb-gs4l18, 233, 211, 255), clamp(0, calc(.045 * var(--fox-glow-strength, 1)), 1)),
            0 0 12px rgba(var(--fox-rgb-gs3l11, 145, 65, 224), clamp(0, calc(.22 * var(--fox-glow-strength, 1)), 1));
    }
}

@media (prefers-reduced-motion: reduce) {
    .fox-account-profile .fox-profile-overview .fox-profile-forum-grid > div {
        transition: none;
    }

    .fox-account-profile .fox-profile-overview .fox-profile-forum-grid > div:hover {
        transform: none;
    }
}

/* Stage 4, 9.3: the signed-in viewer's native blacklist replaces forum activity. */
.fox-account-profile .fox-profile-blacklist__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 6px;
    overflow: visible;
}

.fox-account-profile .fox-profile-blacklist__list.has-scroll {
    max-height: 276px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--fox-tone-as3l13, #a56ae2) transparent;
}

.fox-account-profile .fox-profile-blacklist__list::-webkit-scrollbar { width: 5px; }
.fox-account-profile .fox-profile-blacklist__list::-webkit-scrollbar-track { background: transparent; }
.fox-account-profile .fox-profile-blacklist__list::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: var(--fox-tone-as3l13, #a56ae2);
}

.fox-account-profile .fox-profile-blacklist__card {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    min-width: 0;
    min-height: 60px;
    padding: 10px;
    border: 1px solid var(--fox-profile-inner);
    border-radius: 10px;
    background: rgba(var(--fox-rgb-ts2l1, 15, 10, 27), .28);
    box-shadow: 0 0 8px rgba(var(--fox-rgb-gs3l11, 145, 65, 224), clamp(0, calc(.09 * var(--fox-glow-strength, 1)), 1));
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.fox-account-profile .fox-profile-blacklist__user {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
}

.fox-account-profile .fox-profile-blacklist__user img {
    box-sizing: border-box;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--fox-profile-inner);
    border-radius: 10px;
    object-fit: cover;
}

.fox-account-profile .fox-profile-blacklist__name {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
    color: var(--fox-tone-as4l17, #e1bbff);
    background: linear-gradient(100deg, var(--fox-tone-ts3l15, #bb86f4) 10%, var(--fox-tone-ts4l19, #f3e5ff) 48%, var(--fox-tone-ts3l15, #bd88ee) 88%);
    background-size: 215% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fox-profile-type-glint 13s ease-in-out infinite alternate;
}

.fox-account-profile .fox-profile-blacklist__unblock,
.fox-account-profile .fox-profile-blacklist__retry {
    box-sizing: border-box;
    border: 1px solid var(--fox-profile-inner);
    border-radius: 8px;
    background: rgba(var(--fox-rgb-as2l9, 112, 45, 177), .13);
    color: var(--fox-tone-as4l17, #e1bbff);
    cursor: pointer;
    transition: border-color .22s ease, box-shadow .22s ease;
}

.fox-account-profile .fox-profile-blacklist__unblock {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    font-size: 14px;
}

.fox-account-profile .fox-profile-blacklist__retry { max-width: 100%; padding: 8px 12px; }
.fox-account-profile .fox-profile-blacklist__feedback {
    margin: 8px 6px 0;
    color: var(--fox-tone-as2l17, #dfcbee);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.fox-account-profile .fox-profile-blacklist__feedback.is-error { color: #ffb6c3; }
.fox-account-profile .fox-profile-blacklist__feedback[hidden],
.fox-account-profile .fox-profile-blacklist__retry[hidden] { display: none !important; }
.fox-account-profile .fox-profile-blacklist__unblock:disabled,
.fox-account-profile .fox-profile-blacklist__retry:disabled { opacity: .5; cursor: wait; }
.fox-account-profile .fox-profile-blacklist__user:focus-visible,
.fox-account-profile .fox-profile-blacklist__unblock:focus-visible,
.fox-account-profile .fox-profile-blacklist__retry:focus-visible,
.fox-account-profile .fox-profile-blacklist__list:focus-visible {
    outline: 2px solid var(--fox-tone-as4l17, #e1bbff);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .fox-account-profile .fox-profile-blacklist__card:hover {
        transform: translateY(-1px);
        border-color: rgba(var(--fox-rgb-as4l15, 196, 141, 248), .58);
        box-shadow: 0 0 10px rgba(var(--fox-rgb-gs3l11, 145, 65, 224), clamp(0, calc(.2 * var(--fox-glow-strength, 1)), 1));
    }
    .fox-account-profile .fox-profile-blacklist__unblock:hover:not(:disabled),
    .fox-account-profile .fox-profile-blacklist__retry:hover:not(:disabled) {
        border-color: rgba(var(--fox-rgb-as4l15, 196, 141, 248), .7);
        box-shadow: 0 0 8px rgba(var(--fox-rgb-gs3l11, 145, 65, 224), clamp(0, calc(.22 * var(--fox-glow-strength, 1)), 1));
    }
}

@media (prefers-reduced-motion: reduce) {
    .fox-account-profile .fox-profile-blacklist__card,
    .fox-account-profile .fox-profile-blacklist__unblock,
    .fox-account-profile .fox-profile-blacklist__retry { transition: none; }
    .fox-account-profile .fox-profile-blacklist__name { animation: none; }
    .fox-account-profile .fox-profile-blacklist__card:hover { transform: none; }
}

/* Stage 4, 9.4: keep the profile action in place until the server confirms it. */
.fox-account-profile .fox-profile-actions [data-fox-profile-block-toggle]:disabled {
    opacity: .55;
    cursor: wait;
}
.fox-account-profile .fox-profile-block-feedback {
    margin: 8px 12px 0;
    color: var(--fox-tone-as2l17, #dfcbee);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.fox-account-profile .fox-profile-block-feedback.is-error { color: #ffb6c3; }
.fox-account-profile .fox-profile-block-feedback[hidden] { display: none !important; }

/* Stage 4, 9.5: collapse only after the native server confirms removal. */
.fox-account-profile .fox-profile-blacklist__card.is-fox-blacklist-removing {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    border-bottom-width: 0;
    margin-bottom: var(--fox-blacklist-collapse-gap, 0px);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: height .24s ease, opacity .18s ease, padding-top .24s ease,
        padding-bottom .24s ease, border-top-width .24s ease, border-bottom-width .24s ease,
        margin-bottom .24s ease;
}
@media (prefers-reduced-motion: reduce) {
    .fox-account-profile .fox-profile-blacklist__card.is-fox-blacklist-removing { transition: none; }
}

/* Stage 4, 9.6: keep the native wall input and give its label enough room. */
.fox-account-profile .fox-profile-wall .fox-profile-wall__composer > .smile_input_forum {
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    padding: 2px 0 4px;
}

.fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: auto;
    min-width: 124px;
    max-width: 100%;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid rgba(var(--fox-rgb-as4l16, 205, 149, 255), .68);
    border-radius: 10px;
    background: linear-gradient(115deg, var(--fox-tone-ts2l9, #7135a9), var(--fox-tone-ts2l11, #9e49d2));
    background-size: 180% 100%;
    background-position: 0 50%;
    color: var(--fox-tone-as4l19, #f6e5ff);
    box-shadow:
        inset 0 1px rgba(var(--fox-rgb-gs4l18, 233, 211, 255), clamp(0, calc(.12 * var(--fox-glow-strength, 1)), 1)),
        0 0 10px rgba(var(--fox-rgb-gs3l11, 145, 65, 224), clamp(0, calc(.16 * var(--fox-glow-strength, 1)), 1));
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    text-overflow: clip;
    overflow: visible;
    cursor: pointer;
    transform: none;
    filter: none;
    outline: none;
    transition: transform .2s ease, background-position .28s ease,
        border-color .2s ease, box-shadow .25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send:hover:not(:disabled) {
        transform: translateY(-1px);
        background-position: 100% 50%;
        border-color: var(--fox-tone-as4l17, #e1bbff);
        box-shadow:
            inset 0 1px rgba(var(--fox-rgb-gs4l18, 233, 211, 255), clamp(0, calc(.16 * var(--fox-glow-strength, 1)), 1)),
            0 0 17px rgba(var(--fox-rgb-gs3l11, 145, 65, 224), clamp(0, calc(.29 * var(--fox-glow-strength, 1)), 1));
    }
}

.fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send:focus-visible {
    outline: 2px solid var(--fox-tone-as4l17, #e1bbff);
    outline-offset: 3px;
    border-color: var(--fox-tone-as4l17, #e1bbff);
    box-shadow: 0 0 17px rgba(var(--fox-rgb-gs3l11, 145, 65, 224), clamp(0, calc(.29 * var(--fox-glow-strength, 1)), 1));
}

.fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send:active:not(:disabled) {
    transform: translateY(1px) scale(.985);
    background-position: 100% 50%;
    box-shadow: inset 0 2px 7px rgba(var(--fox-rgb-ts2l1, 15, 10, 27), .28);
}

.fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 480px) {
    .fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send {
        min-width: 116px;
        padding: 10px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send { transition: none; }
    .fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send:hover:not(:disabled),
    .fox-account-profile .fox-profile-wall #send_btn.fox-profile-wall__send:active:not(:disabled) { transform: none; }
}

/* Stage 4, 9.7: Kitsune gets its own art; the native purchase card stays intact. */
.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune {
    --fox-service-rgb: 244, 72, 84;
    --fox-card-art: url("../img/fox/profile-service-kitsune-v1.webp");
    background: #090708;
    border-color: rgba(244, 72, 84, .58);
    box-shadow:
        0 15px 31px rgba(0, 0, 0, .35),
        inset 0 1px rgba(255, 133, 145, .12),
        0 0 14px rgba(244, 72, 84, clamp(0, calc(.12 * var(--fox-glow-strength, 1)), 1));
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune::before {
    background-color: #090708;
    background-position: 32% 40%;
    background-size: cover;
    pointer-events: none;
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune::after {
    background:
        linear-gradient(180deg, rgba(9, 5, 7, .28), rgba(9, 5, 7, .54) 45%, rgba(9, 5, 7, .9)),
        linear-gradient(110deg, rgba(151, 18, 38, .15), transparent 48%, rgba(151, 18, 38, .13));
    pointer-events: none;
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune .fox-service-card__state {
    background: rgba(13, 5, 8, .88);
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune .fox-service-card__expiry {
    color: #eed3d7;
    border-top-color: rgba(244, 72, 84, .3);
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune .fox-service-card__expiry strong {
    color: #fff1f3;
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune .fox-service-card__renew {
    border-color: rgba(255, 112, 128, .64);
    background: linear-gradient(110deg, rgba(38, 8, 13, .94), rgba(157, 21, 43, .62));
    color: #fff1f3;
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune .fox-service-card__renew:hover:not(:disabled),
.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune .fox-service-card__renew:focus-visible {
    background: rgba(157, 21, 43, .72);
    outline-color: #ff8b98;
    box-shadow: 0 0 18px rgba(244, 72, 84, clamp(0, calc(.28 * var(--fox-glow-strength, 1)), 1));
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune .fox-service-card__renew:disabled {
    opacity: .55;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune:hover,
.fox-account-profile .fox-profile-privileges .fox-service-card--kitsune:focus-within {
    border-color: #ff7a85;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, .4),
        0 0 22px rgba(244, 72, 84, clamp(0, calc(.24 * var(--fox-glow-strength, 1)), 1));
}
