/* Shared decoration: keep avatar sizing and existing status badges intact. */
.avatar-frame {
    --frame-ring: linear-gradient(135deg, #dadfe8, #717d93, #edf4ff);
    position: relative !important;
    overflow: visible !important;
    isolation: isolate;
    border-radius: 50% !important;
}
.avatar-frame > img { border-radius: 50%; object-fit: cover; }
.avatar-frame::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    padding: 3px;
    background: var(--frame-ring);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}
.avatar-frame-gold { --frame-ring: linear-gradient(135deg, #fff2b0, #a66b10 35%, #ffe393 55%, #c28a21 80%, #fff2b0); }
.avatar-frame-rose { --frame-ring: linear-gradient(135deg, #ffbdce, #d84076 40%, #ffdae5 70%, #b8357b); }
.avatar-frame-neon { --frame-ring: conic-gradient(#22e6f4, #4061ff, #ec4dff, #22e6f4); }
.avatar-frame-aurora { --frame-ring: conic-gradient(#85ffd0, #259cdd, #a979ff, #85ffd0); }
.avatar-frame-galaxy { --frame-ring: conic-gradient(#e9c7ff, #6839e8, #ff7fbd, #3143a2, #e9c7ff); }
.avatar-frame-neon::before, .avatar-frame-aurora::before, .avatar-frame-galaxy::before { animation: avatar-frame-orbit 9s linear infinite; }
@keyframes avatar-frame-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .avatar-frame::before { animation: none; }
}
.frame-shop-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.frame-shop-header h1 { font-size: 1.35rem; margin: 0 0 4px; }
.frame-shop-header p { color: var(--bs-secondary-color); font-size: .85rem; margin: 0; }
.frame-shop-balance { flex-shrink: 0; font-size: .85rem; color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); border-radius: 10px; padding: 9px 12px; text-decoration: none; }
.frame-shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.frame-shop-card { overflow: hidden; }
.frame-shop-card[hidden], #frame-filters[hidden] { display: none !important; }
.frame-card-stage { display: flex; justify-content: center; align-items: center; min-height: 100px; background: radial-gradient(ellipse at center, rgba(126, 91, 228, .18), transparent 75%); }
.frame-preview-avatar { width: 96px; height: 96px; border-radius: 50%; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; background: var(--bs-tertiary-bg); color: var(--bs-body-color); font-size: 2.4rem; font-weight: 700; }
.frame-preview-avatar > img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.frame-fitting { border-color: rgba(126, 91, 228, .35); margin-bottom: 12px; }
.frame-fitting .card-body { padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.frame-fitting .frame-preview-avatar { width: 44px; height: 44px; font-size: 1.2rem; }
.frame-fitting-copy { flex: 1; min-width: 0; }
.frame-fitting-copy h2 { font-size: .9rem; margin: 0 0 4px; }
.frame-fitting-copy p { font-size: .75rem; }
.frame-fitting .btn { min-height: 40px; font-size: .8rem; }
#frame-filters { margin-bottom: 12px; }
#frame-filters .btn { min-height: 40px; font-size: .85rem; }
.frame-card-stage .frame-preview-avatar { width: 64px; height: 64px; font-size: 1.6rem; }
.frame-shop-card .card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.frame-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
.frame-card-heading h2 { font-size: .95rem; overflow-wrap: anywhere; }
.frame-card-heading .badge { font-size: .65rem; white-space: normal; }
.frame-card-price { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0 0 auto; font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
.frame-shop-card .btn { min-height: 40px; padding: 6px 4px; font-size: .85rem; }
.frame-shop-card .frame-try { margin-top: 4px; }
.frame-shop-footer { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; margin-top: 16px; }
.frame-shop-footer details { flex: 1; min-width: 150px; }
.frame-shop-footer summary { cursor: pointer; padding: 10px 0; }
.frame-shop-footer p { margin: 8px 0; }
.frame-shop-footer .btn { font-size: .85rem; min-height: 40px; }
.frame-preview-dialog { width: min(340px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; position: fixed; padding: 44px 24px 24px; border: 1px solid var(--bs-border-color); border-radius: 18px; background: var(--bs-body-bg); color: var(--bs-body-color); text-align: center; }
.frame-preview-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.frame-dialog-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 1.8rem; }
.frame-preview-dialog h2 { margin: 20px 0 8px; font-size: 1.1rem; }
.frame-preview-dialog p { font-size: .85rem; }
.frame-preview-dialog .btn { min-height: 44px; }
@media (max-width: 575.98px) {
    .frame-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .frame-shop-header h1 { font-size: 1.05rem; }
    .frame-shop-header p { font-size: .75rem; }
    .frame-shop-balance { padding: 8px; font-size: .75rem; }
    .frame-fitting .card-body { padding: 10px 12px; gap: 12px; }
    .frame-card-stage { min-height: 82px; }
    .frame-card-stage .frame-preview-avatar { width: 54px; height: 54px; font-size: 1.4rem; }
    .frame-shop-card .card-body { padding: 6px 8px 8px; gap: 5px; }
    .frame-card-heading h2 { font-size: .85rem; }
    .frame-card-price { font-size: .75rem; }
    .frame-shop-card .btn { font-size: .78rem; }
}
