/* Stage 3, 18.1: profile composition and purchased services. */
.fox-account-profile {
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.fox-account-profile *, .fox-account-profile *::before, .fox-account-profile *::after { box-sizing: border-box; }
.fox-account-profile .fox-profile-overview,
.fox-account-profile .fox-profile-lower-grid,
.fox-account-profile .fox-profile-side-stack { min-width: 0; }

/* These three areas share a surface instead of stacking neon frames. */
.fox-account-profile .fox-profile-friends,
.fox-account-profile .fox-profile-identity,
.fox-account-profile .fox-profile-details,
.fox-account-profile .fox-profile-friends:hover,
.fox-account-profile .fox-profile-identity:hover,
.fox-account-profile .fox-profile-details:hover {
    border: 0;
    box-shadow: none;
    background: linear-gradient(150deg, rgba(var(--fox-rgb-ts2l3, 35, 22, 52), .75), rgba(var(--fox-rgb-ts2l1, 15, 10, 27), .67));
}
.fox-account-profile .fox-profile-friends .fox-profile-panel__head { border-bottom: 0; }
.fox-account-profile .fox-profile-avatar { border-color: rgba(var(--fox-rgb-as3l15, 196, 150, 243), .17); box-shadow: 0 14px 35px rgba(0, 0, 0, .3); }
.fox-account-profile .fox-profile-details__top { border-bottom: 0; }
.fox-account-profile .fox-profile-info-group,
.fox-account-profile .fox-profile-info-group:last-child {
    margin: 0 12px 5px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.fox-account-profile .fox-profile-info-group + .fox-profile-info-group { border-top: 1px solid rgba(var(--fox-rgb-as3l16, 199, 158, 243), .1); }
.fox-account-profile .fox-profile-info-group dl > div {
    align-items: center;
    gap: 8px;
    min-height: 29px;
    border-bottom-color: rgba(var(--fox-rgb-as3l16, 205, 167, 245), .07);
}
.fox-account-profile .fox-profile-info-group dl > div:last-child,
.fox-account-profile .fox-profile-info-group dl > .fox-profile-info-group__server-nick { border-bottom: 0; }
.fox-account-profile .fox-profile-info-group dt,
.fox-account-profile .fox-profile-info-group dd { flex: 1 1 50%; min-width: 0; line-height: 1.35; }
.fox-account-profile .fox-profile-info-group dd {
    max-width: none;
    overflow: visible;
    overflow-wrap: anywhere;
    text-align: right;
    text-overflow: clip;
    white-space: normal;
}

.fox-account-profile .fox-profile-forum-grid > div,
.fox-account-profile .fox-profile-last-topic {
    min-width: 0;
    border: 1px solid rgba(var(--fox-rgb-as3l14, 180, 114, 244), .2);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(var(--fox-rgb-ts2l4, 58, 31, 83), .36), rgba(var(--fox-rgb-ts2l2, 19, 13, 33), .84));
    box-shadow: inset 0 1px rgba(var(--fox-rgb-gs4l18, 233, 211, 255), clamp(0, calc(.045 * var(--fox-glow-strength, 1)), 1));
}
.fox-account-profile .fox-profile-last-topic:hover {
    border-color: rgba(var(--fox-rgb-as4l15, 196, 141, 248), .5);
    background: linear-gradient(145deg, rgba(var(--fox-rgb-ts2l6, 75, 39, 106), .43), rgba(var(--fox-rgb-ts2l2, 22, 15, 36), .88));
}

.fox-account-profile .fox-profile-privileges { overflow: hidden; }
.fox-account-profile .fox-profile-privileges__list { display: grid; gap: 14px; padding: 15px; }
.fox-account-profile .fox-service-group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.fox-account-profile .fox-service-group__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr));
    gap: 14px;
    align-items: stretch;
}
.fox-account-profile .fox-service-card {
    --fox-service-rgb: 168, 112, 224;
    --fox-card-art: none;
    position: relative;
    isolation: isolate;
    display: flex;
    min-width: 0;
    min-height: 245px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    padding: 12px 16px 14px;
    border: 1px solid rgba(var(--fox-service-rgb), .36);
    border-radius: 13px;
    background: var(--fox-tone-as2l2, #120d20);
    box-shadow: 0 15px 31px rgba(0, 0, 0, .23), inset 0 1px rgba(255, 255, 255, .06);
    text-align: center;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.fox-account-profile .fox-service-card::before,
.fox-account-profile .fox-service-card::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
}
.fox-account-profile .fox-service-card::before {
    background-image: var(--fox-card-art);
    background-repeat: no-repeat;
    background-position: 35% center;
    background-size: cover;
}
.fox-account-profile .fox-service-card::after {
    background: linear-gradient(180deg, rgba(var(--fox-rgb-ts2l1, 10, 7, 17), .26), rgba(var(--fox-rgb-ts2l1, 10, 7, 17), .48) 45%, rgba(var(--fox-rgb-ts2l1, 12, 8, 22), .79));
}
.fox-account-profile .fox-service-card > * { position: relative; z-index: 1; }
.fox-account-profile .fox-service-card--pearl { --fox-service-rgb: 229, 236, 248; }
.fox-account-profile .fox-service-card--gold { --fox-service-rgb: 249, 200, 98; }
.fox-account-profile .fox-service-card--violet { --fox-service-rgb: 186, 115, 244; }
.fox-account-profile .fox-service-card--red { --fox-service-rgb: 239, 91, 107; }
.fox-account-profile .fox-service-card--ronin { --fox-card-art: url("../img/fox/profile-service-ronin-v1.webp"); }
.fox-account-profile .fox-service-card--dayme { --fox-card-art: url("../img/fox/profile-service-dayme-v1.webp"); }
.fox-account-profile .fox-service-card--shogun { --fox-card-art: url("../img/fox/profile-service-shogun-v1.webp"); }
.fox-account-profile .fox-service-card--imperator { --fox-card-art: url("../img/fox/profile-service-imperator-v1.webp"); }
.fox-account-profile .fox-service-card--admin { --fox-card-art: url("../img/fox/profile-service-admin-v1.webp"); }
.fox-account-profile .fox-service-card:hover,
.fox-account-profile .fox-service-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(var(--fox-service-rgb), .7);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .32), 0 0 22px rgba(var(--fox-service-rgb), .18);
}
.fox-account-profile .fox-service-card__top { display: flex; width: 100%; justify-content: flex-end; min-height: 25px; }
.fox-account-profile .fox-service-card__state { border-color: rgba(var(--fox-service-rgb), .32); background: rgba(var(--fox-rgb-as2l1, 10, 7, 18), .76); backdrop-filter: blur(3px); }
.fox-account-profile .fox-service-card__content {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 7px;
}
.fox-account-profile .fox-service-card__content h4 {
    width: 100%;
    margin: 0;
    color: rgb(var(--fox-service-rgb));
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .035em;
    text-align: center;
    text-shadow: 0 2px 12px var(--fox-tone-gs2l2, #100b1c), 0 0 18px rgba(var(--fox-service-rgb), .28);
    overflow-wrap: anywhere;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .fox-account-profile .fox-service-card__content h4 {
        background-image: linear-gradient(100deg, rgb(var(--fox-service-rgb)), #fff 26%, rgb(var(--fox-service-rgb)) 51%, #fff 75%, rgb(var(--fox-service-rgb)));
        background-size: 225% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .9));
        animation: fox-profile-service-flow 7s linear infinite;
    }
}
@keyframes fox-profile-service-flow { to { background-position: -225% 0; } }
.fox-account-profile .fox-service-card__visual {
    width: min(100%, 74px);
    height: 56px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.fox-account-profile .fox-service-card__renew {
    align-self: center;
    min-height: 38px;
    margin: 0;
    padding: 7px 18px;
    border-color: rgba(var(--fox-service-rgb), .58);
    border-radius: 8px;
    background: linear-gradient(110deg, rgba(var(--fox-rgb-ts2l3, 40, 24, 53), .88), rgba(var(--fox-service-rgb), .23));
    color: #fff;
    font-size: 12px;
    box-shadow: inset 0 1px rgba(255, 255, 255, .1);
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.fox-account-profile .fox-service-card__renew:hover,
.fox-account-profile .fox-service-card__renew:focus-visible {
    transform: translateY(-2px);
    background: rgba(var(--fox-service-rgb), .37);
    box-shadow: 0 0 18px rgba(var(--fox-service-rgb), .32);
    outline: 2px solid rgba(var(--fox-service-rgb), .55);
    outline-offset: 2px;
}
.fox-account-profile .fox-service-card__expiry { gap: 3px 10px; margin: 0; color: var(--fox-tone-as1l14, #b9a8c8); border-top-color: rgba(var(--fox-service-rgb), .2); }

.fox-account-profile .fox-profile-wall__send {
    min-height: 39px;
    border: 1px solid rgba(var(--fox-rgb-as4l16, 205, 149, 255), .62);
    border-radius: 9px;
    background: linear-gradient(115deg, var(--fox-tone-ts2l9, #7135a9), var(--fox-tone-ts2l11, #9e49d2));
    box-shadow: 0 6px 15px rgba(var(--fox-rgb-gs3l7, 101, 35, 155), clamp(0, calc(.22 * var(--fox-glow-strength, 1)), 1));
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.fox-account-profile .fox-profile-wall__send:hover,
.fox-account-profile .fox-profile-wall__send:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.16);
    box-shadow: 0 9px 23px rgba(var(--fox-rgb-gs3l11, 146, 62, 214), clamp(0, calc(.34 * var(--fox-glow-strength, 1)), 1));
    outline: 2px solid rgba(var(--fox-rgb-as4l16, 213, 163, 255), .5);
    outline-offset: 2px;
}
.fox-account-profile .fox-profile-wall__send:active { transform: translateY(0); }

@media (max-width: 680px) {
    .fox-account-profile { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .fox-account-profile .fox-profile-privileges__list { padding: 10px; }
    .fox-account-profile .fox-service-group { padding: 0; }
    .fox-account-profile .fox-service-card { min-height: 230px; }
    .fox-account-profile .fox-profile-info-group dl { grid-template-columns: 1fr; }
    .fox-account-profile .fox-profile-forum-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fox-account-profile .fox-profile-forum-grid > div { padding: 9px 7px; }
    .fox-account-profile .fox-profile-forum-grid span { font-size: 10px; overflow-wrap: anywhere; }
}
@media (max-width: 380px) {
    .fox-account-profile .fox-profile-forum-grid { gap: 5px; }
    .fox-account-profile .fox-profile-forum-grid span { font-size: 9px; }
    .fox-account-profile .fox-profile-details__top { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .fox-account-profile .fox-service-card__content h4 { animation: none; }
    .fox-account-profile .fox-service-card,
    .fox-account-profile .fox-service-card__renew,
    .fox-account-profile .fox-profile-wall__send { transition: none; }
    .fox-account-profile .fox-service-card:hover,
    .fox-account-profile .fox-service-card__renew:hover,
    .fox-account-profile .fox-profile-wall__send:hover { transform: none; }
}
