:root {
    --ach-ink: #f8fafc;
    --ach-muted: rgba(226, 232, 240, 0.72);
    --ach-soft: rgba(255, 255, 255, 0.07);
    --ach-line: rgba(255, 255, 255, 0.13);
    --ach-panel: rgba(16, 18, 36, 0.78);
    --ach-panel-strong: rgba(24, 27, 52, 0.9);
    --ach-pink: #fb7185;
    --ach-gold: #fbbf24;
    --ach-cyan: #38bdf8;
    --ach-mint: #34d399;
    --ach-violet: #a78bfa;
    --ach-red: #f87171;
}

.ach-page {
    position: relative;
    width: 100%;
    padding: 18px 0 46px;
    color: var(--ach-ink);
    overflow: hidden;
}

.ach-page::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 420px;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(251, 113, 133, 0.18), transparent 34%),
        linear-gradient(250deg, rgba(56, 189, 248, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.2), transparent);
    opacity: 0.95;
}

.ach-orbit {
    position: absolute;
    pointer-events: none;
    width: 64%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
    transform: rotate(-12deg);
    opacity: 0.45;
}

.ach-orbit--left {
    top: 110px;
    left: -18%;
}

.ach-orbit--right {
    top: 310px;
    right: -22%;
    transform: rotate(9deg);
}

.ach-panel {
    position: relative;
    border: 1px solid var(--ach-line);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
        var(--ach-panel);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    border-radius: 18px;
}

.ach-hero {
    min-height: 280px;
    padding: clamp(22px, 4vw, 40px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: center;
    overflow: hidden;
}

.ach-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 20%, rgba(251, 191, 36, 0.16), transparent 26%),
        radial-gradient(circle at 86% 12%, rgba(52, 211, 153, 0.13), transparent 30%),
        linear-gradient(135deg, rgba(251, 113, 133, 0.12), transparent 42%);
    pointer-events: none;
}

.ach-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -42% 44%;
    height: 260px;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 22px),
        linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.18), transparent);
    transform: rotate(-8deg);
    opacity: 0.34;
    pointer-events: none;
}

.ach-hero--reward-moonlit_profile::before {
    background:
        radial-gradient(circle at 18% 18%, rgba(147, 197, 253, 0.22), transparent 24%),
        linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(15, 23, 42, 0.04));
}

.ach-hero--reward-hanami_profile::before {
    background:
        radial-gradient(circle at 20% 22%, rgba(251, 113, 133, 0.24), transparent 25%),
        radial-gradient(circle at 84% 18%, rgba(251, 191, 36, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(244, 114, 182, 0.14), transparent 44%);
}

.ach-hero__identity,
.ach-level-card,
.ach-section-head,
.ach-dashboard,
.ach-focus-grid,
.ach-shop,
.ach-collection {
    position: relative;
    z-index: 1;
}

.ach-hero__identity {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.ach-avatar {
    position: relative;
    width: 132px;
    height: 132px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
        rgba(15, 23, 42, 0.8);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 35px rgba(0, 0, 0, 0.35);
}

.ach-avatar::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 38px;
    background: conic-gradient(from 220deg, var(--ach-pink), var(--ach-gold), var(--ach-cyan), var(--ach-pink));
    opacity: 0.68;
    z-index: -1;
}

.ach-avatar--sakura_frame::before {
    background: conic-gradient(from 220deg, #fb7185, #fecdd3, #f9a8d4, #fb7185);
    animation: achSpin 8s linear infinite;
}

.ach-avatar--neon_shrine_frame::before {
    background: conic-gradient(from 180deg, #22d3ee, #f472b6, #fbbf24, #22d3ee);
    animation: achSpin 5s linear infinite;
}

.ach-avatar img {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 28px;
    border: 3px solid rgba(15, 23, 42, 0.78);
}

.ach-avatar__level {
    position: absolute;
    right: -8px;
    bottom: 10px;
    min-width: 58px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #10121f;
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow: 0 10px 24px rgba(251, 191, 36, 0.25);
    font-size: 0.84rem;
    font-weight: 900;
    text-align: center;
}

@keyframes achSpin {
    to {
        transform: rotate(360deg);
    }
}

.ach-hero__copy {
    min-width: 0;
}

.ach-eyebrow,
.ach-section-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fda4af;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ach-hero h1 {
    margin: 8px 0 14px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 0.98;
    letter-spacing: 0;
    text-wrap: balance;
}

.ach-rank-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ach-rank-pill {
    --rank-color: var(--ach-cyan);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rank-color) 20%, rgba(15, 23, 42, 0.8));
    border: 1px solid color-mix(in srgb, var(--rank-color) 52%, transparent);
    color: #fff;
    font-weight: 850;
}

.ach-rank-pill i {
    color: var(--rank-color);
}

.ach-rank-pill--status {
    --rank-color: var(--ach-gold);
}

.ach-level-card {
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(8, 12, 26, 0.54);
}

.ach-level-card__top,
.ach-level-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ach-level-card__top span,
.ach-level-card__bottom {
    color: var(--ach-muted);
}

.ach-level-card__top strong {
    font-size: 2.2rem;
    color: #fff;
}

.ach-xp-track,
.ach-mini-track,
.achievement-progress__track {
    position: relative;
    height: 10px;
    margin: 18px 0 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.ach-xp-track span,
.ach-mini-track span,
.achievement-progress__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ach-pink), var(--ach-gold), var(--ach-cyan));
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.32);
}

.ach-dashboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.ach-stat {
    min-height: 128px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--ach-line);
    background: rgba(18, 21, 42, 0.72);
    display: grid;
    align-content: center;
    gap: 7px;
}

.ach-stat__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.28), rgba(56, 189, 248, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ach-stat strong {
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1;
}

.ach-stat span:last-child {
    color: var(--ach-muted);
    font-size: 0.9rem;
}

.ach-stat--wallet {
    border-color: rgba(251, 191, 36, 0.45);
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.13), transparent),
        rgba(18, 21, 42, 0.76);
}

.ach-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ach-focus-card {
    padding: 20px;
}

.ach-section-head {
    margin-bottom: 16px;
}

.ach-section-head--row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.ach-section-head h2 {
    margin: 4px 0 0;
    color: #fff;
    font-size: clamp(1.35rem, 3vw, 2rem);
    letter-spacing: 0;
}

.ach-muted {
    color: var(--ach-muted);
    margin: 0;
}

.ach-mini-progress,
.ach-recent-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.ach-mini-progress + .ach-mini-progress,
.ach-recent-item + .ach-recent-item {
    margin-top: 10px;
}

.ach-mini-progress img,
.ach-recent-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.ach-mini-progress strong,
.ach-recent-item strong {
    display: block;
    color: #fff;
    min-width: 0;
}

.ach-mini-progress span,
.ach-recent-item span {
    color: var(--ach-muted);
    font-size: 0.88rem;
}

.ach-mini-track {
    height: 7px;
    margin: 8px 0 0;
}

.ach-recent-item {
    grid-template-columns: 52px minmax(0, 1fr) auto;
}

.ach-recent-item em {
    color: var(--ach-gold);
    font-style: normal;
    font-weight: 900;
}

.ach-shop,
.ach-collection {
    padding: clamp(18px, 3vw, 26px);
    margin-top: 16px;
}

.ach-wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 999px;
    color: #fff;
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.34);
    white-space: nowrap;
}

.ach-wallet-pill i,
.ach-wallet-pill strong {
    color: var(--ach-gold);
}

.ach-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.reward-card {
    position: relative;
    overflow: hidden;
    min-height: 242px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(12, 16, 34, 0.64);
    display: grid;
    grid-template-rows: 92px minmax(0, 1fr);
}

.reward-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 48%);
    opacity: 0.8;
    pointer-events: none;
}

.reward-card.is-equipped {
    border-color: rgba(52, 211, 153, 0.56);
    box-shadow: 0 18px 42px rgba(52, 211, 153, 0.11);
}

.reward-card.is-equipped .reward-action {
    color: #092016;
    background: linear-gradient(135deg, #bbf7d0, #34d399);
    border-color: transparent;
}

.rarity-common {
    --reward-accent: #94a3b8;
}

.rarity-rare {
    --reward-accent: #38bdf8;
}

.rarity-epic {
    --reward-accent: #c084fc;
}

.rarity-legendary {
    --reward-accent: #fbbf24;
}

.reward-preview {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 92px;
    border-radius: 14px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--reward-accent) 36%, transparent), rgba(15, 23, 42, 0.24)),
        rgba(255, 255, 255, 0.06);
    border: 1px solid color-mix(in srgb, var(--reward-accent) 42%, rgba(255, 255, 255, 0.12));
}

.reward-preview i {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

.reward-preview::after {
    content: '';
    position: absolute;
    inset: auto -20% -45% -20%;
    height: 80px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 18px);
    transform: rotate(-7deg);
    opacity: 0.44;
}

.reward-preview--sakura-frame {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.42), rgba(244, 114, 182, 0.16));
}

.reward-preview--neon-frame {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.38), rgba(244, 114, 182, 0.24));
}

.reward-preview--moon-bg {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.34), rgba(129, 140, 248, 0.22));
}

.reward-preview--hanami-bg {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.34), rgba(251, 191, 36, 0.24));
}

.reward-preview--status {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(56, 189, 248, 0.18));
}

.reward-preview--time-status {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.34), rgba(167, 139, 250, 0.2));
}

.reward-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 13px;
}

.reward-card__top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--ach-muted);
    font-size: 0.82rem;
}

.reward-card__top strong {
    color: var(--ach-gold);
}

.reward-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.08rem;
}

.reward-card p {
    margin: 0;
    color: var(--ach-muted);
    line-height: 1.45;
    font-size: 0.9rem;
}

.reward-action,
.featured-badge-btn,
.ach-filter-tabs button,
.ach-category-tabs button {
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.reward-action {
    margin-top: auto;
    min-height: 40px;
    border: 1px solid color-mix(in srgb, var(--reward-accent) 58%, rgba(255, 255, 255, 0.18));
    border-radius: 12px;
    color: #fff;
    background: color-mix(in srgb, var(--reward-accent) 22%, rgba(255, 255, 255, 0.07));
}

.reward-action:hover:not(:disabled),
.featured-badge-btn:hover:not(:disabled),
.ach-filter-tabs button:hover,
.ach-category-tabs button:hover {
    transform: translateY(-1px);
}

.reward-action:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.ach-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ach-filter-tabs button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--ach-muted);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ach-filter-tabs button.active {
    color: #10121f;
    background: linear-gradient(135deg, #ffe4e6, #fbbf24);
    border-color: transparent;
}

.ach-category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.ach-category-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--ach-muted);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.052);
    border: 1px solid rgba(255, 255, 255, 0.11);
}

.ach-category-tabs button span {
    min-width: 28px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
}

.ach-category-tabs button.active {
    color: #fff;
    border-color: rgba(251, 113, 133, 0.48);
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.24), rgba(56, 189, 248, 0.12));
}

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

.anime-achievement-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    min-height: 214px;
    overflow: hidden;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
        rgba(13, 16, 34, 0.72);
}

.anime-achievement-card[hidden] {
    display: none;
}

.anime-achievement-card__shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(105deg, transparent 0 38%, rgba(255, 255, 255, 0.1) 46%, transparent 54% 100%);
    transform: translateX(-55%);
    opacity: 0;
}

.anime-achievement-card:hover .anime-achievement-card__shine {
    opacity: 1;
    animation: achSweep 0.9s ease;
}

@keyframes achSweep {
    to {
        transform: translateX(55%);
    }
}

.status-unlocked {
    border-color: rgba(251, 191, 36, 0.36);
}

.status-in-progress {
    border-color: rgba(56, 189, 248, 0.34);
}

.status-locked {
    opacity: 0.72;
}

.anime-badge-frame {
    position: relative;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    align-self: start;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
        rgba(255, 255, 255, 0.06);
}

.anime-badge-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--ach-pink), var(--ach-gold), var(--ach-cyan));
    opacity: 0.7;
}

.tier-1 .anime-badge-frame::before {
    background: linear-gradient(135deg, #fb923c, #facc15);
}

.tier-2 .anime-badge-frame::before {
    background: linear-gradient(135deg, #38bdf8, #c4b5fd);
}

.tier-3 .anime-badge-frame::before {
    background: linear-gradient(135deg, #fbbf24, #f472b6, #38bdf8);
}

.anime-badge-frame img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.anime-achievement-card:hover .anime-badge-frame img {
    transform: scale(1.06) rotate(2deg);
}

.status-locked .anime-badge-frame img {
    filter: grayscale(1) brightness(0.62);
}

.anime-badge-lock {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(5, 8, 17, 0.54);
}

.anime-achievement-card__content {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.anime-achievement-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--ach-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.anime-achievement-card__meta em {
    color: var(--ach-gold);
    font-style: normal;
}

.anime-achievement-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.18;
}

.anime-achievement-card p {
    margin: 0;
    color: var(--ach-muted);
    line-height: 1.45;
    font-size: 0.92rem;
}

.achievement-state,
.achievement-state--done,
.achievement-progress {
    margin-top: auto;
}

.achievement-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--ach-muted);
    font-size: 0.9rem;
}

.achievement-state--done span {
    color: var(--ach-mint);
    font-weight: 850;
}

.achievement-state time {
    color: rgba(226, 232, 240, 0.58);
    font-size: 0.82rem;
}

.achievement-progress__numbers {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--ach-muted);
    font-size: 0.88rem;
}

.achievement-progress__numbers strong {
    color: var(--ach-cyan);
}

.achievement-progress__track {
    height: 8px;
    margin: 8px 0 0;
}

.achievement-progress small {
    display: inline-block;
    margin-top: 7px;
    color: var(--ach-mint);
    font-weight: 850;
}

.featured-badge-btn {
    min-height: 38px;
    width: 100%;
    margin-top: 2px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.38);
    color: var(--ach-gold);
    background: rgba(251, 191, 36, 0.09);
}

.featured-badge-btn.active {
    color: #102017;
    background: linear-gradient(135deg, #bbf7d0, #34d399);
    border-color: transparent;
}

.ach-empty {
    min-height: 190px;
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    color: var(--ach-muted);
}

.ach-empty[hidden] {
    display: none;
}

.ach-empty i {
    color: var(--ach-cyan);
    font-size: 2rem;
}

/* Profile sidebar compatibility */
.profile-achievements {
    background: rgba(18, 21, 42, 0.68);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.profile-achievements h3 {
    color: #fff;
    margin: 0 0 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.profile-achievements h3 i:first-child {
    color: var(--ach-gold);
}

.profile-achievements h3.collapsed i.fa-chevron-down {
    transform: rotate(-90deg);
}

.profile-achievements h3 .fa-chevron-down {
    margin-left: auto;
    font-size: 1rem;
}

.achievements-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 12px;
}

.summary-text {
    color: var(--ach-muted);
}

.view-all-btn {
    padding: 0.65rem 0.9rem;
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.9), rgba(251, 191, 36, 0.92));
    color: #10121f;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badges-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.badge-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.badge-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.09);
}

.badge-item img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin-bottom: 0.45rem;
}

.badge-item-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
}

.near-completion-widget {
    margin-top: 1rem;
}

.near-completion-widget h4 {
    color: var(--ach-mint);
    margin: 0 0 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.near-completion-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.near-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    border-left: 3px solid var(--ach-mint);
}

.near-item img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 10px;
}

.near-item-info {
    flex: 1;
    min-width: 0;
}

.near-item-name {
    color: #fff;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.near-item-progress {
    font-size: 0.82rem;
    color: var(--ach-muted);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.collapsed {
    max-height: 0 !important;
}

.user-badge {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 5px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 5px;
    border: 1px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.18);
    opacity: 0.92;
}

.user-badge:hover {
    opacity: 1;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.user-level-badge {
    --user-level-color: var(--ach-cyan);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #fff;
    background: color-mix(in srgb, var(--user-level-color) 22%, rgba(15, 23, 42, 0.88));
    border: 1px solid color-mix(in srgb, var(--user-level-color) 55%, transparent);
    box-shadow: 0 3px 12px color-mix(in srgb, var(--user-level-color) 16%, transparent);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
}

.user-level-badge i {
    color: var(--user-level-color);
    font-size: 0.68rem;
}

@media (max-width: 1180px) {
    .ach-grid,
    .ach-shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ach-hero {
        grid-template-columns: 1fr;
    }

    .ach-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ach-focus-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .ach-page {
        padding-top: 8px;
    }

    .ach-hero {
        padding: 18px;
    }

    .ach-hero__identity {
        flex-direction: column;
        align-items: flex-start;
    }

    .ach-avatar {
        width: 112px;
        height: 112px;
        border-radius: 28px;
    }

    .ach-avatar img {
        width: 94px;
        height: 94px;
        border-radius: 23px;
    }

    .ach-level-card__top,
    .ach-level-card__bottom,
    .ach-section-head--row {
        align-items: flex-start;
        flex-direction: column;
    }

    .ach-filter-tabs {
        justify-content: flex-start;
    }

    .ach-grid,
    .ach-shop-grid,
    .ach-dashboard {
        grid-template-columns: 1fr;
    }

    .anime-achievement-card {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .anime-badge-frame {
        width: 78px;
        height: 78px;
        border-radius: 20px;
    }

    .anime-badge-frame img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 420px) {
    .anime-achievement-card {
        grid-template-columns: 1fr;
    }

    .anime-badge-frame {
        width: 88px;
        height: 88px;
    }
}

/* Calmer AniVibe pass: closer to the site's glass/sakura tone, less showroom glare. */
:root {
    --ach-ink: #f4f6fb;
    --ach-muted: rgba(218, 224, 238, 0.68);
    --ach-line: rgba(255, 255, 255, 0.1);
    --ach-panel: rgba(25, 26, 48, 0.72);
    --ach-panel-strong: rgba(31, 33, 58, 0.84);
    --ach-pink: #d98da0;
    --ach-gold: #d7ad45;
    --ach-cyan: #7ca6d8;
    --ach-mint: #7bbf9b;
    --ach-violet: #9d8ac6;
}

.ach-orbit,
.ach-hero::after {
    display: none;
}

.ach-page::before {
    height: 300px;
    background: linear-gradient(180deg, rgba(78, 70, 116, 0.22), rgba(20, 22, 40, 0));
    opacity: 0.8;
}

.ach-panel {
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
        var(--ach-panel);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.ach-hero {
    min-height: 244px;
}

.ach-hero::before {
    background:
        linear-gradient(135deg, rgba(217, 141, 160, 0.12), transparent 42%),
        linear-gradient(250deg, rgba(124, 166, 216, 0.1), transparent 38%);
}

.ach-avatar::before,
.anime-badge-frame::before {
    background: linear-gradient(135deg, rgba(215, 173, 69, 0.75), rgba(217, 141, 160, 0.5));
}

.ach-avatar--sakura_frame::before,
.ach-avatar--neon_shrine_frame::before {
    animation: none;
}

.ach-avatar--neon_shrine_frame::before {
    background: linear-gradient(135deg, rgba(124, 166, 216, 0.76), rgba(157, 138, 198, 0.55));
}

.ach-level-card,
.ach-stat,
.reward-card,
.anime-achievement-card,
.ach-mini-progress,
.ach-recent-item {
    background: rgba(29, 31, 55, 0.62);
    border-color: rgba(255, 255, 255, 0.095);
}

.reward-card::before,
.anime-achievement-card__shine {
    opacity: 0;
}

.reward-preview {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
        rgba(29, 31, 55, 0.72);
}

.reward-preview::after {
    opacity: 0.16;
}

.ach-xp-track span,
.ach-mini-track span,
.achievement-progress__track span {
    background: linear-gradient(90deg, var(--ach-pink), var(--ach-gold));
    box-shadow: none;
}

.ach-filter-tabs button.active {
    color: #17182b;
    background: linear-gradient(135deg, #e9c4cf, #d7ad45);
}

.ach-category-tabs button.active {
    border-color: rgba(217, 141, 160, 0.38);
    background: rgba(217, 141, 160, 0.12);
}

.status-unlocked {
    border-color: rgba(215, 173, 69, 0.28);
}

.status-in-progress {
    border-color: rgba(124, 166, 216, 0.28);
}

.reward-action {
    background: rgba(255, 255, 255, 0.06);
}

.reward-card.is-equipped {
    border-color: rgba(123, 191, 155, 0.4);
    box-shadow: none;
}

.reward-card.is-equipped .reward-action,
.featured-badge-btn.active {
    color: #122018;
    background: #9fd2b6;
}

.profile-avatar-wrap--reward,
.comment-avatar-container--reward {
    position: relative;
    display: inline-flex;
}

.profile-avatar-wrap--reward {
    border-radius: 31px;
}

.comment-avatar-container--reward {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
}

.comment-avatar-container--reward > a {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.comment-avatar-container--reward .comment-avatar {
    width: 100%;
    height: 100%;
    display: block;
}

.profile-avatar-wrap--reward::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 33px;
    pointer-events: none;
    border: 2px solid rgba(215, 173, 69, 0.65);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.24);
}

.comment-avatar-container--reward::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    pointer-events: none;
    border: 2px solid rgba(215, 173, 69, 0.65);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 14px rgba(0, 0, 0, 0.2);
}

body.page-anime .comment-thread .comment-avatar-container--reward {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

body.page-anime .comment-thread .comment-avatar-container--reward::after {
    inset: -3px;
}

.profile-avatar-wrap--sakura_frame::after,
.comment-avatar-container--sakura_frame::after {
    border-color: rgba(217, 141, 160, 0.78);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(217, 141, 160, 0.22);
}

.profile-avatar-wrap--neon_shrine_frame::after,
.comment-avatar-container--neon_shrine_frame::after {
    border-color: rgba(124, 166, 216, 0.82);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(124, 166, 216, 0.22);
}

.profile-hero--reward-moonlit_profile .profile-hero__overlay {
    background: linear-gradient(90deg, rgba(18, 21, 42, 0.86), rgba(45, 54, 91, 0.58));
}

.profile-hero--reward-hanami_profile .profile-hero__overlay {
    background: linear-gradient(90deg, rgba(22, 22, 40, 0.86), rgba(94, 54, 75, 0.5));
}

.profile-rank-pill--reward {
    --rank-color: var(--ach-pink);
}

.user-profile-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(217, 141, 160, 0.16);
    border: 1px solid rgba(217, 141, 160, 0.32);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    vertical-align: middle;
}

/* Rich reward frames: make avatar cosmetics read like owned items, not plain borders. */
.ach-avatar--sakura_frame,
.ach-avatar--neon_shrine_frame {
    isolation: isolate;
}

.ach-avatar--sakura_frame::before,
.ach-avatar--neon_shrine_frame::before {
    inset: -10px;
    border-radius: 42px;
    opacity: 1;
    z-index: -2;
}

.ach-avatar--sakura_frame::after,
.ach-avatar--neon_shrine_frame::after {
    content: '';
    position: absolute;
    inset: -7px;
    z-index: 2;
    pointer-events: none;
    border-radius: 40px;
}

.ach-avatar--sakura_frame::before {
    background:
        radial-gradient(circle at 18% 16%, #ffe4ea 0 5px, transparent 6px),
        radial-gradient(circle at 82% 24%, #f7a9ba 0 6px, transparent 7px),
        radial-gradient(circle at 18% 82%, #f8c2cf 0 5px, transparent 6px),
        radial-gradient(circle at 84% 82%, #ffe4ea 0 4px, transparent 5px),
        conic-gradient(from 218deg, rgba(218, 119, 145, 0.12), #d98da0, #f4c0cb, #d7ad45, #d98da0, rgba(218, 119, 145, 0.12));
    box-shadow: 0 0 28px rgba(217, 141, 160, 0.24), 0 16px 34px rgba(0, 0, 0, 0.24);
}

.ach-avatar--sakura_frame::after {
    background:
        linear-gradient(135deg, #ffe5ec 0 12px, transparent 13px) top left / 34px 34px no-repeat,
        linear-gradient(225deg, #f3a6b8 0 12px, transparent 13px) top right / 34px 34px no-repeat,
        linear-gradient(45deg, #f3a6b8 0 12px, transparent 13px) bottom left / 34px 34px no-repeat,
        linear-gradient(315deg, #ffe5ec 0 12px, transparent 13px) bottom right / 34px 34px no-repeat,
        linear-gradient(90deg, rgba(255, 229, 236, 0.85), rgba(217, 141, 160, 0.2), rgba(215, 173, 69, 0.55)) top / calc(100% - 42px) 3px no-repeat,
        linear-gradient(90deg, rgba(215, 173, 69, 0.45), rgba(217, 141, 160, 0.32), rgba(255, 229, 236, 0.78)) bottom / calc(100% - 42px) 3px no-repeat,
        linear-gradient(180deg, rgba(255, 229, 236, 0.82), rgba(217, 141, 160, 0.25)) left / 3px calc(100% - 42px) no-repeat,
        linear-gradient(180deg, rgba(217, 141, 160, 0.25), rgba(255, 229, 236, 0.82)) right / 3px calc(100% - 42px) no-repeat;
    filter: drop-shadow(0 0 12px rgba(217, 141, 160, 0.34));
}

.ach-avatar--neon_shrine_frame::before {
    background:
        linear-gradient(90deg, transparent 16%, rgba(124, 166, 216, 0.9) 16% 24%, transparent 24% 76%, rgba(157, 138, 198, 0.9) 76% 84%, transparent 84%),
        linear-gradient(180deg, transparent 10%, rgba(181, 210, 244, 0.95) 10% 17%, transparent 17% 83%, rgba(95, 230, 237, 0.84) 83% 90%, transparent 90%),
        conic-gradient(from 180deg, rgba(124, 166, 216, 0.05), #7ca6d8, #9d8ac6, #5fe6ed, #7ca6d8, rgba(124, 166, 216, 0.05));
    box-shadow: 0 0 34px rgba(124, 166, 216, 0.28), 0 0 18px rgba(157, 138, 198, 0.2);
}

.ach-avatar--neon_shrine_frame::after {
    background:
        linear-gradient(90deg, transparent 8%, #9fe7ff 8% 92%, transparent 92%) top 5px left 0 / 100% 4px no-repeat,
        linear-gradient(90deg, transparent 18%, rgba(157, 138, 198, 0.86) 18% 82%, transparent 82%) bottom 6px left 0 / 100% 4px no-repeat,
        linear-gradient(180deg, #9fe7ff, rgba(95, 230, 237, 0.2)) top 8px left 9px / 4px calc(100% - 24px) no-repeat,
        linear-gradient(180deg, rgba(157, 138, 198, 0.25), #d8ccff) top 8px right 9px / 4px calc(100% - 24px) no-repeat,
        radial-gradient(circle at 15% 13%, #ecfeff 0 3px, transparent 4px),
        radial-gradient(circle at 85% 13%, #f0eaff 0 3px, transparent 4px),
        radial-gradient(circle at 50% 88%, rgba(95, 230, 237, 0.9) 0 3px, transparent 4px);
    filter: drop-shadow(0 0 12px rgba(95, 230, 237, 0.34));
}

.reward-preview--sakura-frame,
.reward-preview--neon-frame {
    overflow: visible;
}

.reward-preview--sakura-frame i,
.reward-preview--neon-frame i {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(13, 16, 34, 0.72);
    border: 2px solid rgba(255, 255, 255, 0.24);
}

.reward-preview--sakura-frame::before,
.reward-preview--neon-frame::before {
    content: '';
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 21px;
    pointer-events: none;
}

.reward-preview--sakura-frame::before {
    background:
        radial-gradient(circle at 14% 18%, #ffe4ea 0 4px, transparent 5px),
        radial-gradient(circle at 86% 25%, #f3a6b8 0 4px, transparent 5px),
        radial-gradient(circle at 18% 84%, #f8c2cf 0 3px, transparent 4px),
        linear-gradient(135deg, transparent 0 11px, #ffe5ec 12px 15px, transparent 16px) top left / 28px 28px no-repeat,
        linear-gradient(225deg, transparent 0 11px, #f3a6b8 12px 15px, transparent 16px) top right / 28px 28px no-repeat,
        linear-gradient(45deg, transparent 0 11px, #f3a6b8 12px 15px, transparent 16px) bottom left / 28px 28px no-repeat,
        linear-gradient(315deg, transparent 0 11px, #ffe5ec 12px 15px, transparent 16px) bottom right / 28px 28px no-repeat,
        conic-gradient(from 220deg, #d98da0, #f4c0cb, #d7ad45, #d98da0);
    box-shadow: 0 0 18px rgba(217, 141, 160, 0.28);
}

.reward-preview--neon-frame::before {
    background:
        linear-gradient(90deg, transparent 10%, #9fe7ff 10% 90%, transparent 90%) top 5px left 0 / 100% 4px no-repeat,
        linear-gradient(90deg, transparent 18%, #9d8ac6 18% 82%, transparent 82%) bottom 7px left 0 / 100% 4px no-repeat,
        linear-gradient(180deg, #9fe7ff, rgba(95, 230, 237, 0.18)) top 9px left 9px / 4px calc(100% - 25px) no-repeat,
        linear-gradient(180deg, rgba(157, 138, 198, 0.25), #d8ccff) top 9px right 9px / 4px calc(100% - 25px) no-repeat,
        conic-gradient(from 180deg, #7ca6d8, #9d8ac6, #5fe6ed, #7ca6d8);
    box-shadow: 0 0 20px rgba(95, 230, 237, 0.28);
}

.profile-avatar-wrap--reward,
.comment-avatar-container--reward {
    isolation: isolate;
}

.profile-avatar-wrap--reward .profile-avatar-lg,
.comment-avatar-container--reward > a,
.comment-avatar-container--reward .comment-avatar {
    position: relative;
    z-index: 2;
}

.profile-avatar-wrap--reward::before,
.comment-avatar-container--reward::before {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.profile-avatar-wrap--reward::before {
    inset: -11px;
    border-radius: 39px;
}

.profile-avatar-wrap--reward::after {
    inset: -8px;
    z-index: 3;
    border: 0;
    border-radius: 37px;
}

.comment-avatar-container--reward::before {
    inset: -7px;
    border-radius: 50%;
}

.comment-avatar-container--reward::after {
    inset: -5px;
    z-index: 3;
    border: 0;
}

.profile-avatar-wrap--sakura_frame::before {
    background:
        radial-gradient(circle at 17% 15%, #ffe4ea 0 5px, transparent 6px),
        radial-gradient(circle at 83% 22%, #f3a6b8 0 6px, transparent 7px),
        radial-gradient(circle at 18% 84%, #f8c2cf 0 5px, transparent 6px),
        conic-gradient(from 220deg, rgba(217, 141, 160, 0.1), #d98da0, #f4c0cb, #d7ad45, #d98da0);
    box-shadow: 0 0 26px rgba(217, 141, 160, 0.24), 0 16px 32px rgba(0, 0, 0, 0.22);
}

.profile-avatar-wrap--sakura_frame::after {
    background:
        linear-gradient(135deg, #ffe5ec 0 11px, transparent 12px) top left / 31px 31px no-repeat,
        linear-gradient(225deg, #f3a6b8 0 11px, transparent 12px) top right / 31px 31px no-repeat,
        linear-gradient(45deg, #f3a6b8 0 11px, transparent 12px) bottom left / 31px 31px no-repeat,
        linear-gradient(315deg, #ffe5ec 0 11px, transparent 12px) bottom right / 31px 31px no-repeat,
        linear-gradient(90deg, rgba(255, 229, 236, 0.84), rgba(217, 141, 160, 0.24), rgba(215, 173, 69, 0.48)) top / calc(100% - 40px) 3px no-repeat,
        linear-gradient(90deg, rgba(215, 173, 69, 0.42), rgba(217, 141, 160, 0.24), rgba(255, 229, 236, 0.76)) bottom / calc(100% - 40px) 3px no-repeat,
        linear-gradient(180deg, rgba(255, 229, 236, 0.76), rgba(217, 141, 160, 0.2)) left / 3px calc(100% - 40px) no-repeat,
        linear-gradient(180deg, rgba(217, 141, 160, 0.2), rgba(255, 229, 236, 0.76)) right / 3px calc(100% - 40px) no-repeat;
    box-shadow: none;
}

.comment-avatar-container--sakura_frame::before {
    background:
        radial-gradient(circle at 18% 15%, #ffe4ea 0 2px, transparent 3px),
        radial-gradient(circle at 83% 24%, #f3a6b8 0 2px, transparent 3px),
        conic-gradient(from 220deg, #d98da0, #f4c0cb, #d7ad45, #d98da0);
    box-shadow: 0 0 12px rgba(217, 141, 160, 0.28);
}

.comment-avatar-container--sakura_frame::after {
    background:
        linear-gradient(135deg, #ffe5ec 0 6px, transparent 7px) top left / 15px 15px no-repeat,
        linear-gradient(225deg, #f3a6b8 0 6px, transparent 7px) top right / 15px 15px no-repeat,
        linear-gradient(45deg, #f3a6b8 0 6px, transparent 7px) bottom left / 15px 15px no-repeat,
        linear-gradient(315deg, #ffe5ec 0 6px, transparent 7px) bottom right / 15px 15px no-repeat;
}

.profile-avatar-wrap--neon_shrine_frame::before {
    background:
        linear-gradient(90deg, transparent 16%, rgba(124, 166, 216, 0.9) 16% 24%, transparent 24% 76%, rgba(157, 138, 198, 0.9) 76% 84%, transparent 84%),
        linear-gradient(180deg, transparent 10%, rgba(181, 210, 244, 0.95) 10% 17%, transparent 17% 83%, rgba(95, 230, 237, 0.84) 83% 90%, transparent 90%),
        conic-gradient(from 180deg, rgba(124, 166, 216, 0.06), #7ca6d8, #9d8ac6, #5fe6ed, #7ca6d8);
    box-shadow: 0 0 30px rgba(124, 166, 216, 0.28), 0 0 16px rgba(95, 230, 237, 0.18);
}

.profile-avatar-wrap--neon_shrine_frame::after {
    background:
        linear-gradient(90deg, transparent 8%, #9fe7ff 8% 92%, transparent 92%) top 5px left 0 / 100% 4px no-repeat,
        linear-gradient(90deg, transparent 18%, rgba(157, 138, 198, 0.86) 18% 82%, transparent 82%) bottom 6px left 0 / 100% 4px no-repeat,
        linear-gradient(180deg, #9fe7ff, rgba(95, 230, 237, 0.2)) top 8px left 9px / 4px calc(100% - 24px) no-repeat,
        linear-gradient(180deg, rgba(157, 138, 198, 0.25), #d8ccff) top 8px right 9px / 4px calc(100% - 24px) no-repeat,
        radial-gradient(circle at 15% 13%, #ecfeff 0 3px, transparent 4px),
        radial-gradient(circle at 85% 13%, #f0eaff 0 3px, transparent 4px),
        radial-gradient(circle at 50% 88%, rgba(95, 230, 237, 0.9) 0 3px, transparent 4px);
    box-shadow: none;
}

.comment-avatar-container--neon_shrine_frame::before {
    background:
        linear-gradient(90deg, transparent 15%, rgba(124, 166, 216, 0.92) 15% 24%, transparent 24% 76%, rgba(157, 138, 198, 0.92) 76% 85%, transparent 85%),
        conic-gradient(from 180deg, #7ca6d8, #9d8ac6, #5fe6ed, #7ca6d8);
    box-shadow: 0 0 13px rgba(95, 230, 237, 0.28);
}

.comment-avatar-container--neon_shrine_frame::after {
    background:
        linear-gradient(90deg, transparent 8%, #9fe7ff 8% 92%, transparent 92%) top 2px left 0 / 100% 3px no-repeat,
        linear-gradient(90deg, transparent 18%, rgba(157, 138, 198, 0.86) 18% 82%, transparent 82%) bottom 3px left 0 / 100% 3px no-repeat,
        linear-gradient(180deg, #9fe7ff, rgba(95, 230, 237, 0.2)) top 6px left 5px / 3px calc(100% - 14px) no-repeat,
        linear-gradient(180deg, rgba(157, 138, 198, 0.25), #d8ccff) top 6px right 5px / 3px calc(100% - 14px) no-repeat;
}

body.page-anime .comment-thread .comment-avatar-container--reward::before {
    inset: -6px;
}

body.page-anime .comment-thread .comment-avatar-container--reward::after {
    inset: -4px;
}

/* Compact achievements layout: collection is the primary content, rewards follow it. */
.ach-page {
    display: flex;
    flex-direction: column;
}

.ach-collection {
    order: 10;
}

.ach-shop {
    order: 20;
}

.ach-mobile-summary,
.ach-expand-list {
    display: none;
}

@media (max-width: 680px) {
    .ach-page {
        padding-top: 6px;
        padding-bottom: 28px;
    }

    .ach-hero {
        min-height: 0;
        padding: 14px;
        gap: 12px;
        border-radius: 14px;
    }

    .ach-hero__identity {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .ach-avatar {
        width: 68px;
        height: 68px;
        border-radius: 19px;
    }

    .ach-avatar::before {
        inset: -3px;
        border-radius: 21px;
    }

    .ach-avatar img {
        width: 58px;
        height: 58px;
        border-width: 2px;
        border-radius: 16px;
    }

    .ach-avatar__level {
        right: -8px;
        bottom: -5px;
        min-width: 43px;
        padding: 4px 7px;
        font-size: 0.68rem;
    }

    .ach-eyebrow {
        display: none;
    }

    .ach-hero h1 {
        margin: 0 0 7px;
        font-size: 1.2rem;
        line-height: 1.2;
        text-wrap: pretty;
    }

    .ach-rank-row {
        gap: 6px;
    }

    .ach-rank-pill {
        gap: 5px;
        padding: 5px 8px;
        font-size: 0.72rem;
    }

    .ach-level-card {
        padding: 11px 12px;
        border-radius: 12px;
    }

    .ach-level-card__top,
    .ach-level-card__bottom {
        flex-direction: row;
        align-items: center;
    }

    .ach-level-card__top strong {
        font-size: 1.25rem;
    }

    .ach-level-card__bottom {
        gap: 8px;
        font-size: 0.7rem;
    }

    .ach-xp-track {
        height: 7px;
        margin: 9px 0 7px;
    }

    .ach-dashboard {
        display: none;
    }

    .ach-mobile-summary {
        display: block;
        margin-top: 10px;
        padding: 13px 14px;
        border-radius: 14px;
    }

    .ach-mobile-summary__top,
    .ach-mobile-summary__wallet {
        display: flex;
        align-items: center;
    }

    .ach-mobile-summary__top {
        justify-content: space-between;
        gap: 12px;
    }

    .ach-mobile-summary__top div {
        min-width: 0;
    }

    .ach-mobile-summary__top strong,
    .ach-mobile-summary__top span {
        display: block;
    }

    .ach-mobile-summary__top strong {
        color: #fff;
        font-size: 1.12rem;
    }

    .ach-mobile-summary__top span,
    .ach-mobile-summary__wallet span {
        color: var(--ach-muted);
        font-size: 0.76rem;
    }

    .ach-mobile-summary__top em {
        color: var(--ach-gold);
        font-size: 1.05rem;
        font-style: normal;
        font-weight: 900;
    }

    .ach-mobile-summary__track {
        height: 7px;
        margin: 9px 0 10px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
    }

    .ach-mobile-summary__track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--ach-pink), var(--ach-gold));
    }

    .ach-mobile-summary__wallet {
        gap: 6px;
    }

    .ach-mobile-summary__wallet i,
    .ach-mobile-summary__wallet strong {
        color: var(--ach-gold);
    }

    .ach-focus-grid {
        gap: 10px;
        margin-top: 10px;
    }

    .ach-focus-card {
        padding: 13px;
    }

    .ach-focus-card .ach-section-head {
        margin-bottom: 9px;
    }

    .ach-focus-card .ach-section-head h2 {
        font-size: 1.08rem;
    }

    .ach-mini-progress,
    .ach-recent-item {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 9px;
        border-radius: 11px;
    }

    .ach-mini-progress {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .ach-mini-progress img,
    .ach-recent-item img {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .ach-focus-card:not(.is-expanded) .ach-mini-progress:nth-of-type(n + 2),
    .ach-focus-card:not(.is-expanded) .ach-recent-item:nth-of-type(n + 2) {
        display: none;
    }

    .ach-expand-list {
        width: 100%;
        min-height: 32px;
        margin-top: 8px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        color: var(--ach-muted);
        background: rgba(255, 255, 255, 0.04);
        font: inherit;
        font-size: 0.78rem;
        font-weight: 800;
    }

    .ach-collection,
    .ach-shop {
        padding: 13px;
        border-radius: 14px;
    }

    .ach-collection .ach-section-head {
        margin-bottom: 10px;
    }

    .ach-collection .ach-section-head--row {
        gap: 10px;
    }

    .ach-filter-tabs {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .ach-filter-tabs::-webkit-scrollbar,
    .ach-category-tabs::-webkit-scrollbar {
        display: none;
    }

    .ach-filter-tabs button {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 11px;
        font-size: 0.78rem;
    }

    .ach-category-tabs {
        gap: 6px;
        margin-bottom: 11px;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .ach-category-tabs button {
        min-height: 38px;
        gap: 6px;
        padding: 0 10px;
        border-radius: 11px;
        font-size: 0.78rem;
    }

    .ach-category-tabs button span {
        min-width: 22px;
        padding: 2px 5px;
    }

    .ach-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .anime-achievement-card,
    .anime-achievement-card.status-locked {
        grid-template-columns: 64px minmax(0, 1fr);
        min-height: 0;
        gap: 11px;
        padding: 11px;
        border-radius: 13px;
        opacity: 1;
    }

    .anime-badge-frame,
    .anime-badge-frame:where(.tier-1, .tier-2, .tier-3) {
        width: 64px;
        height: 64px;
        border-radius: 17px;
    }

    .anime-badge-frame::before {
        border-radius: 19px;
    }

    .anime-badge-frame img {
        width: 50px;
        height: 50px;
        border-radius: 13px;
    }

    .anime-badge-lock {
        border-radius: 17px;
    }

    .anime-achievement-card__content {
        gap: 6px;
    }

    .anime-achievement-card__meta {
        font-size: 0.68rem;
    }

    .anime-achievement-card h3 {
        padding-right: 2px;
        font-size: 0.96rem;
    }

    .anime-achievement-card p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .achievement-progress__numbers,
    .achievement-state {
        font-size: 0.76rem;
    }

    .achievement-progress__track {
        height: 6px;
        margin-top: 5px;
    }

    .achievement-progress small {
        margin-top: 4px;
        font-size: 0.7rem;
    }

    .featured-badge-btn {
        width: 34px;
        min-height: 34px;
        margin: 0 0 0 auto;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }

    .featured-badge-btn i {
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .anime-achievement-card,
    .anime-achievement-card.status-locked {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .anime-badge-frame {
        width: 58px;
        height: 58px;
    }

    .anime-badge-frame img {
        width: 46px;
        height: 46px;
    }
}
