/* ==========================================================================
   Profile hub — the sections inside the user panel (/profile/…) and /support/.
   Markup: partials/profile/{edit,charge,buy,bookmark,message,view-message,support,tests,test-id,notifications,music-sara}.php
   Same family as the VIP checkout (vip-checkout.css): dark glass cards, amber accent, gold primary buttons.
   ========================================================================== */

.atv-ph {
    --ph-card: linear-gradient(180deg, #17181f, #121319);
    --ph-surface: #16171e;
    --ph-surface-2: #1c1d25;
    --ph-field: #111218;
    --ph-line: rgba(255, 255, 255, 0.07);
    --ph-line-2: #2a2f3a;
    --ph-line-3: #3a404c;
    --ph-text: #eef0f4;
    --ph-text-2: #c3c8d2;
    --ph-muted: #8b92a1;
    --ph-ac: #f5b942;
    --ph-ac-text: #ffd98a;
    --ph-ac-soft: rgba(245, 185, 66, 0.1);
    --ph-ac-line: rgba(245, 196, 81, 0.32);
    --ph-gold: linear-gradient(180deg, #ffd98a, #f0ab22);
    --ph-ink: #1c1503;
    --ph-chip: rgba(255, 255, 255, 0.04);
    --ph-hover: rgba(255, 255, 255, 0.05);
    --ph-ok: #7be3a3;
    --ph-ok-soft: rgba(123, 227, 163, 0.1);
    --ph-bad: #ff8a8a;
    --ph-bad-soft: rgba(255, 107, 107, 0.1);
    --ph-warn: #ffc56b;
    --ph-warn-soft: rgba(255, 197, 107, 0.1);
    --ph-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.95);

    display: flex;
    flex-direction: column;
    gap: 18px;
    width: calc(100% - 48px);
    max-width: 1320px;
    margin: 26px auto 40px;
    direction: rtl;
    color: var(--ph-text);
    line-height: 1.7;
}
.animetv-profile-content .atv-ph {
    width: 100%;
    margin: 0;
}
#animetvApp.day .atv-ph {
    --ph-card: #ffffff;
    --ph-surface: #f7f8fb;
    --ph-surface-2: #eef1f6;
    --ph-field: #ffffff;
    --ph-line: rgba(15, 23, 42, 0.08);
    --ph-line-2: rgba(15, 23, 42, 0.12);
    --ph-line-3: rgba(15, 23, 42, 0.2);
    --ph-text: #1e2230;
    --ph-text-2: #374151;
    --ph-muted: #6b7280;
    --ph-ac: #d48a0c;
    --ph-ac-text: #a16207;
    --ph-ac-soft: rgba(245, 185, 66, 0.12);
    --ph-ac-line: rgba(212, 138, 12, 0.35);
    --ph-chip: rgba(15, 23, 42, 0.04);
    --ph-hover: rgba(15, 23, 42, 0.05);
    --ph-ok: #15803d;
    --ph-ok-soft: rgba(21, 128, 61, 0.09);
    --ph-bad: #dc2626;
    --ph-bad-soft: rgba(220, 38, 38, 0.08);
    --ph-warn: #b45309;
    --ph-warn-soft: rgba(180, 83, 9, 0.09);
    --ph-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.35);
}
.atv-ph *,
.atv-ph *::before,
.atv-ph *::after {
    box-sizing: border-box;
}
.atv-ph a {
    text-decoration: none;
}
.atv-ph .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.atv-ph .atv-ph-ac {
    color: var(--ph-ac-text);
}
.atv-ph [dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}
@keyframes atvPhRise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Section head ---------- */
.atv-ph-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.atv-ph-head__ic {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 17px;
    font-size: 20px;
    color: var(--ph-ac);
    background: linear-gradient(180deg, rgba(245, 196, 81, 0.2), rgba(245, 196, 81, 0.05));
    box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.26), 0 14px 28px -14px rgba(245, 185, 66, 0.9);
}
.atv-ph-head__ic.is-rose {
    color: #ff8fc7;
    background: linear-gradient(180deg, rgba(255, 143, 199, 0.2), rgba(255, 143, 199, 0.05));
    box-shadow: inset 0 0 0 1px rgba(255, 143, 199, 0.28), 0 14px 28px -14px rgba(255, 95, 168, 0.9);
}
.atv-ph-head__tx {
    min-width: 0;
    flex: 1;
}
.atv-ph .atv-ph-head__tx h2 {
    margin: 0;
    font-family: 'IRANYekanX', 'Vazirmatn', sans-serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.5;
    color: var(--ph-text);
}
.atv-ph .atv-ph-head__tx p {
    margin: 0;
    font-size: 13px;
    color: var(--ph-muted);
}
.atv-ph-head__ac {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.atv-ph-back {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--ph-text);
    background: var(--ph-chip);
    border: 1px solid var(--ph-line);
    transition: border-color 0.2s, color 0.2s;
}
.atv-ph-back:hover {
    color: var(--ph-ac-text);
    border-color: var(--ph-ac-line);
}

/* ---------- Cards, sub titles, buttons ---------- */
.atv-ph-card {
    position: relative;
    padding: 22px 24px;
    border-radius: 24px;
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    box-shadow: var(--ph-shadow);
}
.atv-ph .atv-ph-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ph-text);
}
.atv-ph-sub > i {
    color: var(--ph-ac);
}
.atv-ph-sub small {
    font-size: 12px;
    font-weight: 500;
    color: var(--ph-muted);
}
.atv-ph .atv-ph-btn {
    height: 44px;
    margin: 0;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.atv-ph .atv-ph-btn.is-gold {
    color: var(--ph-ink);
    background: var(--ph-gold);
    box-shadow: 0 14px 30px -14px rgba(245, 185, 66, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.atv-ph .atv-ph-btn.is-gold:hover {
    color: var(--ph-ink);
    transform: translateY(-2px);
}
.atv-ph .atv-ph-btn.is-gold-soft {
    color: var(--ph-ac-text);
    background: var(--ph-ac-soft);
    box-shadow: inset 0 0 0 1px var(--ph-ac-line);
}
.atv-ph .atv-ph-btn.is-ghost {
    color: var(--ph-text);
    background: var(--ph-chip);
    border: 1px solid var(--ph-line-2);
}
.atv-ph .atv-ph-btn.is-ghost:hover {
    color: var(--ph-ac-text);
    border-color: var(--ph-ac-line);
}
.atv-ph .atv-ph-btn.is-lg {
    height: 52px;
    padding: 0 22px;
    border-radius: 16px;
    font-size: 14.5px;
}
.atv-ph .atv-ph-btn.is-sm {
    height: 36px;
    padding: 0 12px;
    border-radius: 11px;
    font-size: 12.5px;
}
.atv-ph .atv-ph-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}
.atv-ph .atv-ph-btn:focus-visible,
.atv-ph-back:focus-visible,
.atv-ph-chips a:focus-visible,
.atv-ph-pages a:focus-visible {
    outline: 2px solid var(--ph-ac);
    outline-offset: 3px;
}

/* ---------- Tags, pills, counters ---------- */
.atv-ph-tag {
    min-height: 30px;
    padding: 4px 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ph-text-2);
    background: var(--ph-chip);
    border: 1px solid var(--ph-line);
}
.atv-ph-tag b {
    color: var(--ph-text);
}
.atv-ph-tag.is-ok {
    color: var(--ph-ok);
    background: var(--ph-ok-soft);
    border-color: transparent;
}
.atv-ph-tag.is-warn {
    color: var(--ph-warn);
    background: var(--ph-warn-soft);
    border-color: transparent;
}
.atv-ph-tag.is-gift {
    color: #f0abfc;
    background: rgba(240, 171, 252, 0.1);
    border-color: transparent;
}
.atv-ph-pill {
    height: 28px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--ph-muted);
    background: var(--ph-chip);
}
.atv-ph-pill.is-ok {
    color: var(--ph-ok);
    background: var(--ph-ok-soft);
}
.atv-ph-pill.is-bad {
    color: var(--ph-bad);
    background: var(--ph-bad-soft);
}
.atv-ph-pill.is-warn {
    color: var(--ph-warn);
    background: var(--ph-warn-soft);
}
.atv-ph-count {
    height: 24px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--ph-ink);
    background: var(--ph-gold);
    box-shadow: 0 0 14px -2px rgba(245, 185, 66, 0.8);
}

/* ---------- Fields ---------- */
.atv-ph-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.atv-ph-grid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.atv-ph-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0 0 14px;
    min-width: 0;
}
.atv-ph-grid2 .atv-ph-field,
.atv-ph-grid3 .atv-ph-field {
    margin: 0;
}
.atv-ph-card > .atv-ph-grid2 + .atv-ph-field {
    margin-top: 14px;
}
.atv-ph-field > span {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ph-text-2);
}
.atv-ph .atv-ph-field input,
.atv-ph .atv-ph-field textarea,
.atv-ph .atv-ph-inline input,
.atv-ph .atv-ph-composer textarea {
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--ph-line-2);
    background: var(--ph-field);
    color: var(--ph-text);
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.atv-ph .atv-ph-field input,
.atv-ph .atv-ph-inline input {
    height: 48px;
}
.atv-ph .atv-ph-field textarea,
.atv-ph .atv-ph-composer textarea {
    min-height: 96px;
    resize: vertical;
}
.atv-ph .atv-ph-field input::placeholder,
.atv-ph .atv-ph-field textarea::placeholder,
.atv-ph .atv-ph-inline input::placeholder,
.atv-ph .atv-ph-composer textarea::placeholder {
    color: var(--ph-muted);
    opacity: 0.8;
}
.atv-ph .atv-ph-field input:focus,
.atv-ph .atv-ph-field textarea:focus,
.atv-ph .atv-ph-inline input:focus,
.atv-ph .atv-ph-composer textarea:focus {
    border-color: var(--ph-ac-line);
    box-shadow: 0 0 0 4px var(--ph-ac-soft);
}
.atv-ph-field.has-ic > i {
    position: absolute;
    left: 14px;
    bottom: 15px;
    font-size: 17px;
    color: var(--ph-muted);
    pointer-events: none;
}
.atv-ph .atv-ph-field.has-ic input {
    padding-left: 42px;
}

/* Segmented radio (gender) */
.atv-ph-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    height: 48px;
    border-radius: 14px;
    background: var(--ph-field);
    border: 1px solid var(--ph-line-2);
}
.atv-ph-seg label {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}
.atv-ph-seg input,
.atv-ph-swatch input,
.atv-ph-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.atv-ph-seg span {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ph-muted);
    transition: all 0.2s;
}
.atv-ph-seg input:checked + span {
    color: var(--ph-ink);
    background: var(--ph-gold);
    box-shadow: 0 8px 18px -10px rgba(245, 185, 66, 0.9);
}
.atv-ph-seg input:focus-visible + span,
.atv-ph-swatch input:focus-visible ~ .atv-ph-swatch__chip,
.atv-ph-opt input:focus-visible ~ .atv-ph-opt__ic {
    outline: 2px solid var(--ph-ac);
    outline-offset: 2px;
}

/* ---------- Empty state ---------- */
.atv-ph-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 34px 18px;
    text-align: center;
}
.atv-ph-empty.is-compact {
    padding: 18px 10px;
}
.atv-ph-empty__ic {
    width: 82px;
    height: 82px;
    margin-bottom: 8px;
    display: grid;
    place-items: center;
    border-radius: 27px;
    font-size: 34px;
    color: var(--ph-ac);
    background: radial-gradient(circle at 50% 0, rgba(245, 196, 81, 0.25), rgba(245, 196, 81, 0.04) 70%);
    box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.26), 0 20px 50px -22px rgba(245, 185, 66, 0.95);
}
.atv-ph-empty.is-compact .atv-ph-empty__ic {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    font-size: 25px;
}
.atv-ph-empty__ic.is-rose {
    color: #ff8fc7;
    background: radial-gradient(circle at 50% 0, rgba(255, 143, 199, 0.25), rgba(255, 143, 199, 0.04) 70%);
    box-shadow: inset 0 0 0 1px rgba(255, 143, 199, 0.28), 0 20px 50px -22px rgba(255, 95, 168, 0.95);
}
.atv-ph-empty > b {
    font-size: 16px;
    color: var(--ph-text);
}
.atv-ph .atv-ph-empty > p {
    max-width: 480px;
    margin: 0;
    font-size: 13px;
    line-height: 2;
    color: var(--ph-muted);
}
.atv-ph-empty__ac {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}
.atv-ph-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    color: var(--ph-warn);
    background: var(--ph-warn-soft);
}
.atv-ph .atv-ph-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 2;
    color: var(--ph-muted);
}
.atv-ph-note > i {
    margin-top: 6px;
    color: var(--ph-ac);
}
.atv-ph-note b {
    color: var(--ph-text);
}

/* ---------- Chips filter + pagination ---------- */
.atv-ph-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.atv-ph-chips a {
    height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ph-text-2);
    background: var(--ph-chip);
    border: 1px solid var(--ph-line);
    transition: all 0.2s;
}
.atv-ph-chips a i {
    font-size: 13px;
    color: var(--ph-muted);
}
.atv-ph-chips a b {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-size: 11.5px;
    color: var(--ph-muted);
    background: var(--ph-chip);
}
.atv-ph-chips a:hover {
    color: var(--ph-text);
    border-color: var(--ph-line-3);
}
.atv-ph-chips a.is-on {
    color: var(--ph-ink);
    border-color: transparent;
    background: var(--ph-gold);
    box-shadow: 0 12px 26px -14px rgba(245, 185, 66, 0.95);
}
.atv-ph-chips a.is-on i {
    color: var(--ph-ink);
}
.atv-ph-chips a.is-on b {
    color: var(--ph-ac-text);
    background: rgba(28, 21, 3, 0.85);
}
.atv-ph-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.atv-ph-pages a {
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 13px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ph-text-2);
    background: var(--ph-chip);
    border: 1px solid var(--ph-line);
}
.atv-ph-pages a.is-wide {
    padding: 0 16px;
}
.atv-ph-pages a:hover {
    border-color: var(--ph-ac-line);
    color: var(--ph-ac-text);
}
.atv-ph-pages a.is-on {
    color: var(--ph-ink);
    border-color: transparent;
    background: var(--ph-gold);
}

/* ---------- Poster grids (buy / bookmarks) ---------- */
.atv-ph .atv-ph-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 16px;
    margin: 0;
}

/* ==========================================================================
   Edit
   ========================================================================== */
.atv-ph-edit {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
}
.atv-ph-id {
    padding: 0 24px 20px;
    overflow: hidden;
}
.atv-ph-id__banner {
    height: 110px;
    margin: 0 -24px;
    background: radial-gradient(260px 120px at 85% 10%, rgba(255, 241, 201, 0.55), transparent 70%), radial-gradient(320px 140px at 10% 100%, rgba(240, 171, 34, 0.6), transparent 70%), linear-gradient(135deg, #3b2a07, #1c1503);
    transition: background 0.4s;
}
.atv-ph-id__banner::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 110px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 16px 16px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent);
    mask-image: linear-gradient(180deg, #000, transparent);
    pointer-events: none;
}
.atv-ph-edit:has(input[name="profile_banner_theme"][value="emerald"]:checked) .atv-ph-id__banner {
    background: radial-gradient(260px 120px at 85% 10%, rgba(167, 243, 208, 0.5), transparent 70%), radial-gradient(320px 140px at 10% 100%, rgba(16, 185, 129, 0.55), transparent 70%), linear-gradient(135deg, #053b2a, #04150f);
}
.atv-ph-edit:has(input[name="profile_banner_theme"][value="cosmic"]:checked) .atv-ph-id__banner {
    background: radial-gradient(260px 120px at 85% 10%, rgba(196, 181, 253, 0.6), transparent 70%), radial-gradient(320px 140px at 10% 100%, rgba(236, 72, 153, 0.45), transparent 70%), linear-gradient(135deg, #2a1f4d, #120d24);
}
.atv-ph-edit:has(input[name="profile_banner_theme"][value="crimson"]:checked) .atv-ph-id__banner {
    background: radial-gradient(260px 120px at 85% 10%, rgba(254, 202, 202, 0.45), transparent 70%), radial-gradient(320px 140px at 10% 100%, rgba(225, 29, 72, 0.55), transparent 70%), linear-gradient(135deg, #4c0519, #1a0208);
}
.atv-ph-edit:has(input[name="profile_banner_theme"][value="cyber"]:checked) .atv-ph-id__banner {
    background: radial-gradient(260px 120px at 85% 10%, rgba(165, 243, 252, 0.5), transparent 70%), radial-gradient(320px 140px at 10% 100%, rgba(59, 130, 246, 0.55), transparent 70%), linear-gradient(135deg, #0c2a4d, #050d1c);
}
.atv-ph-edit:has(input[name="profile_banner_theme"][value="obsidian"]:checked) .atv-ph-id__banner {
    background: radial-gradient(260px 120px at 85% 10%, rgba(226, 232, 240, 0.3), transparent 70%), radial-gradient(320px 140px at 10% 100%, rgba(100, 116, 139, 0.5), transparent 70%), linear-gradient(135deg, #1f232b, #0b0c10);
}
.atv-ph-id__row {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: -46px;
    flex-wrap: wrap;
}
.atv-ph-id__av {
    position: relative;
    width: 104px;
    height: 104px;
    flex-shrink: 0;
    margin: 0;
    padding: 4px;
    border-radius: 32px;
    background: conic-gradient(from 200deg, #ffd98a, #f0ab22, #fff1c9, #ffd98a);
    box-shadow: 0 18px 40px -14px rgba(245, 185, 66, 0.9);
    cursor: pointer;
}
.atv-ph-id__av img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 28px;
    border: 4px solid #17181f;
}
#animetvApp.day .atv-ph-id__av img {
    border-color: #ffffff;
}
.atv-ph-id__cam {
    position: absolute;
    left: -4px;
    bottom: -4px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-size: 15px;
    color: var(--ph-ink);
    background: var(--ph-gold);
    border: 3px solid #17181f;
    transition: transform 0.2s;
}
.atv-ph-id__av:hover .atv-ph-id__cam {
    transform: scale(1.08);
}
.atv-ph-id__name {
    display: flex;
    flex-direction: column;
    padding-bottom: 6px;
    line-height: 1.5;
}
.atv-ph-id__name strong {
    font-family: 'IRANYekanX', 'Vazirmatn', sans-serif;
    font-size: 21px;
    font-weight: 900;
    color: var(--ph-text);
}
.atv-ph-id__name span {
    font-size: 13px;
    color: var(--ph-muted);
    text-align: right;
}
.atv-ph .atv-ph-id__hint {
    margin: 0 auto 8px 0;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-id__hint i {
    color: var(--ph-ac);
}
.atv-ph-edit__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}
.atv-ph-edit__main,
.atv-ph-edit__side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
.atv-ph-swatches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.atv-ph-swatch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
}
.atv-ph-swatch__chip {
    width: 100%;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    font-size: 15px;
    color: transparent;
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: all 0.2s;
}
.atv-ph-swatch.is-gold .atv-ph-swatch__chip {
    background: linear-gradient(135deg, #ffd98a, #b7791f 60%, #3b2a07);
}
.atv-ph-swatch.is-emerald .atv-ph-swatch__chip {
    background: linear-gradient(135deg, #a7f3d0, #10b981 55%, #053b2a);
}
.atv-ph-swatch.is-cosmic .atv-ph-swatch__chip {
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6 50%, #ec4899);
}
.atv-ph-swatch.is-crimson .atv-ph-swatch__chip {
    background: linear-gradient(135deg, #fecaca, #e11d48 55%, #4c0519);
}
.atv-ph-swatch.is-cyber .atv-ph-swatch__chip {
    background: linear-gradient(135deg, #a5f3fc, #3b82f6 55%, #0c2a4d);
}
.atv-ph-swatch.is-obsidian .atv-ph-swatch__chip {
    background: linear-gradient(135deg, #e2e8f0, #64748b 55%, #0b0c10);
}
.atv-ph-swatch__lb {
    font-size: 12px;
    font-weight: 700;
    color: var(--ph-muted);
}
.atv-ph-swatch:hover .atv-ph-swatch__chip {
    transform: translateY(-2px);
}
.atv-ph-swatch input:checked ~ .atv-ph-swatch__chip {
    color: #ffffff;
    border-color: var(--ph-ac);
    box-shadow: 0 0 0 3px var(--ph-ac-soft), 0 12px 24px -12px rgba(245, 185, 66, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.atv-ph-swatch input:checked ~ .atv-ph-swatch__lb {
    color: var(--ph-ac-text);
}
.atv-ph-opts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.atv-ph-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--ph-line-2);
    background: var(--ph-surface);
    cursor: pointer;
    transition: all 0.2s;
}
.atv-ph-opt__ic {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--ph-muted);
    background: var(--ph-chip);
}
.atv-ph-opt__tx {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}
.atv-ph-opt__tx b {
    font-size: 13.5px;
    color: var(--ph-text);
}
.atv-ph-opt__tx small {
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-opt:has(input:checked) {
    border-color: var(--ph-ac-line);
    background: linear-gradient(270deg, var(--ph-ac-soft), transparent), var(--ph-surface);
}
.atv-ph-opt input:checked ~ .atv-ph-opt__ic {
    color: var(--ph-ink);
    background: var(--ph-gold);
    box-shadow: 0 8px 18px -8px rgba(245, 185, 66, 0.9);
}
.atv-ph-savebar {
    position: sticky;
    bottom: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px 12px 12px;
    border-radius: 22px;
    background: rgba(20, 21, 28, 0.86);
    border: 1px solid rgba(245, 196, 81, 0.25);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.95), 0 0 50px -30px rgba(245, 185, 66, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
#animetvApp.day .atv-ph-savebar {
    background: rgba(255, 255, 255, 0.9);
}
.atv-ph .atv-ph-savebar p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ph-muted);
}
.atv-ph-savebar p i {
    color: var(--ph-ac);
}

/* ==========================================================================
   Wallet
   ========================================================================== */
.atv-ph-whero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas: "bal card" "vip card";
    gap: 14px 28px;
    align-items: center;
    padding: 26px 30px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(245, 196, 81, 0.24);
    background: radial-gradient(520px 260px at 100% 0, rgba(245, 185, 66, 0.17), transparent 70%), radial-gradient(420px 240px at 0 100%, rgba(124, 92, 255, 0.16), transparent 70%), #121319;
    box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.95);
}
.atv-ph-whero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 217, 138, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(270deg, #000, transparent 55%);
    mask-image: linear-gradient(270deg, #000, transparent 55%);
    pointer-events: none;
}
.atv-ph-whero__bal {
    grid-area: bal;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}
.atv-ph-whero__orb {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 22px;
    font-size: 27px;
    color: #f5c451;
    background: linear-gradient(180deg, rgba(245, 196, 81, 0.24), rgba(245, 196, 81, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 217, 138, 0.35), inset 0 0 0 1px rgba(245, 196, 81, 0.3), 0 18px 36px -14px rgba(245, 185, 66, 0.95);
}
.atv-ph-whero__eyebrow {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #d9b96a;
}
.atv-ph-whero__num {
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1.3;
}
.atv-ph-whero__num strong {
    font-size: 40px;
    font-weight: 900;
    background: linear-gradient(180deg, #fff1c9, #f5c451 55%, #c98a1c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.atv-ph-whero__num span {
    font-size: 14px;
    font-weight: 700;
    color: #aab0bd;
}
.atv-ph-whero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.atv-ph-whero .atv-ph-tag {
    color: #c3c8d2;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}
.atv-ph-whero .atv-ph-tag.is-ok {
    color: #7be3a3;
    background: rgba(123, 227, 163, 0.1);
}
.atv-ph-whero .atv-ph-tag.is-warn {
    color: #ffc56b;
    background: rgba(255, 197, 107, 0.1);
}
.atv-ph-whero .atv-ph-tag b {
    color: #ffffff;
}
.atv-ph .atv-ph-whero__vip {
    grid-area: vip;
    position: relative;
    z-index: 1;
    justify-self: start;
    color: #ffd98a;
    background: rgba(245, 185, 66, 0.1);
    box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.35);
}
.atv-ph-whero__card {
    grid-area: card;
    position: relative;
    z-index: 1;
    height: 176px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 22px;
    overflow: hidden;
    color: #1c1503;
    background: radial-gradient(220px 140px at 15% 0, rgba(255, 255, 255, 0.55), transparent 70%), linear-gradient(135deg, #ffe3a3, #f5b942 45%, #c27c12);
    box-shadow: 0 30px 50px -24px rgba(245, 185, 66, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: rotate(-4deg);
    transition: transform 0.35s ease;
}
.atv-ph-whero:hover .atv-ph-whero__card {
    transform: rotate(-1deg) translateY(-4px);
}
.atv-ph-whero__card::before {
    content: "";
    position: absolute;
    left: -40px;
    bottom: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 26px solid rgba(255, 255, 255, 0.14);
}
.atv-ph-whero__chip {
    width: 44px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff1c9, #d9a43a);
    box-shadow: inset 0 0 0 1px rgba(28, 21, 3, 0.25);
}
.atv-ph-whero__brand {
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    direction: ltr;
    text-align: left;
    opacity: 0.75;
}
.atv-ph-whero__amt {
    position: relative;
    font-size: 22px;
    font-weight: 900;
}
.atv-ph-whero__amt small {
    font-size: 12px;
}
.atv-ph-verify {
    display: flex;
    gap: 18px;
    border-color: rgba(255, 197, 107, 0.35);
    background: radial-gradient(500px 200px at 100% 0, rgba(255, 197, 107, 0.1), transparent 70%), var(--ph-card);
}
.atv-ph-verify__ic {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 17px;
    font-size: 22px;
    color: var(--ph-warn);
    background: var(--ph-warn-soft);
}
.atv-ph-verify__body {
    flex: 1;
    min-width: 0;
}
.atv-ph .atv-ph-verify h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--ph-text);
}
.atv-ph-verify h3 small {
    margin-right: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ph-warn);
}
.atv-ph .atv-ph-verify p {
    margin: 4px 0 12px;
    font-size: 13px;
    color: var(--ph-muted);
}
.atv-ph-inline {
    display: flex;
    gap: 10px;
    max-width: 520px;
    margin: 0;
}
.atv-ph-verify .atv-ph-inline + .atv-ph-inline {
    margin-top: 10px;
}
.atv-ph-inline input {
    flex: 1;
    min-width: 0;
}
.atv-ph .atv-ph-inline .atv-ph-btn {
    height: 48px;
}
.atv-ph-charge__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.atv-ph-charge__head .atv-ph-sub {
    margin: 0;
}
.atv-ph-presets {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.atv-ph .atv-ph-preset {
    position: relative;
    margin: 0;
    padding: 22px 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-radius: 20px;
    border: 1px solid var(--ph-line-2);
    background: var(--ph-surface);
    color: var(--ph-text);
    font: inherit;
    line-height: 1.5;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.atv-ph-preset__lb {
    font-size: 12px;
    font-weight: 700;
    color: var(--ph-muted);
}
.atv-ph-preset strong {
    font-size: 24px;
    font-weight: 900;
    color: var(--ph-text);
}
.atv-ph-preset__cur {
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-preset__rib {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 22px;
    padding: 0 10px;
    display: grid;
    place-items: center;
    border-radius: 0 0 10px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(180deg, #a78bfa, #7c5cff);
    box-shadow: 0 6px 16px -6px rgba(124, 92, 255, 0.9);
}
.atv-ph-preset__check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 10px;
    color: transparent;
    border: 2px solid var(--ph-line-3);
    transition: all 0.2s;
}
.atv-ph .atv-ph-preset.is-selected {
    border-color: rgba(245, 196, 81, 0.7);
    background: radial-gradient(200px 110px at 50% 0, rgba(245, 185, 66, 0.2), transparent 75%), var(--ph-surface);
    box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.12), 0 20px 40px -24px rgba(245, 185, 66, 0.95);
    transform: translateY(-3px);
}
.atv-ph-preset.is-selected strong {
    color: var(--ph-ac-text);
}
.atv-ph-preset.is-selected .atv-ph-preset__check {
    color: var(--ph-ink);
    border-color: transparent;
    background: var(--ph-gold);
}
.atv-ph-checkout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 14px 14px 18px;
    border-radius: 20px;
    background: var(--ph-surface);
    border: 1px dashed var(--ph-ac-line);
}
.atv-ph-checkout__sum {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}
.atv-ph-checkout__sum span {
    font-size: 12.5px;
    color: var(--ph-muted);
}
.atv-ph-checkout__sum strong {
    font-size: 15px;
    color: var(--ph-text);
}
.atv-ph-checkout__sum strong b {
    font-size: 26px;
    font-weight: 900;
    color: var(--ph-ac-text);
}
.atv-ph-settle__form {
    align-items: end;
}
.atv-ph-settle__submit {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}
.atv-ph-settle__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.atv-ph-bankcard {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.atv-ph-bankcard strong {
    font-size: 15px;
    color: var(--ph-text);
}
.atv-ph-bankcard span[dir] {
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--ph-muted);
}
.atv-ph-settle__bar .atv-ph-inline {
    flex: 1;
    min-width: 280px;
}
.atv-ph-tx {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.atv-ph-tx__row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--ph-surface);
    border: 1px solid var(--ph-line);
}
.atv-ph-tx__ic {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 16px;
    color: var(--ph-ok);
    background: var(--ph-ok-soft);
}
.atv-ph-tx__ic.is-vip {
    color: var(--ph-ac);
    background: var(--ph-ac-soft);
}
.atv-ph-tx__row.is-fail .atv-ph-tx__ic {
    color: var(--ph-muted);
    background: var(--ph-chip);
}
.atv-ph-tx__tx {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}
.atv-ph-tx__tx b {
    font-size: 14px;
    color: var(--ph-text);
}
.atv-ph-tx__tx small {
    font-size: 12px;
    color: var(--ph-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-ph-tx__amt {
    font-size: 12.5px;
    color: var(--ph-muted);
    white-space: nowrap;
}
.atv-ph-tx__amt b {
    font-size: 16px;
    color: var(--ph-text);
}
.atv-ph-tx__row.is-fail .atv-ph-tx__amt b {
    color: var(--ph-muted);
    text-decoration: line-through;
}

/* ==========================================================================
   Messages, chat, notifications, tests
   ========================================================================== */
.atv-ph-threads,
.atv-ph-rows,
.atv-ph-notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.atv-ph-thread {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    color: var(--ph-text);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    box-shadow: var(--ph-shadow);
    animation: atvPhRise 0.35s ease both;
    transition: transform 0.2s, border-color 0.2s;
}
.atv-ph-thread:hover {
    transform: translateY(-2px);
    border-color: var(--ph-line-3);
    color: var(--ph-text);
}
.atv-ph-thread.is-unread {
    border-color: var(--ph-ac-line);
    background: radial-gradient(460px 130px at 100% 0, var(--ph-ac-soft), transparent 70%), var(--ph-card);
}
.atv-ph-thread.is-unread::before {
    content: "";
    position: absolute;
    right: -1px;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: var(--ph-ac);
    box-shadow: 0 0 14px rgba(245, 185, 66, 0.9);
}
.atv-ph-thread__av {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    overflow: hidden;
    background: var(--ph-surface-2);
}
.atv-ph-thread__av img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.atv-ph-thread__tx {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}
.atv-ph-thread__tx b {
    font-size: 14.5px;
    color: var(--ph-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-ph-thread__tx > span {
    font-size: 13px;
    color: var(--ph-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-ph-thread__tx em {
    font-style: normal;
    color: var(--ph-text-2);
}
.atv-ph-thread.is-unread .atv-ph-thread__tx > span {
    color: var(--ph-text-2);
}
.atv-ph-thread__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: 12px;
    color: var(--ph-muted);
    white-space: nowrap;
}
.atv-ph-chat {
    padding: 0;
    overflow: hidden;
}
.atv-ph-chat__stream {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 62vh;
    padding: 22px 22px 10px;
    overflow-y: auto;
    background-image: radial-gradient(var(--ph-line) 1px, transparent 1px);
    background-size: 22px 22px;
}
.atv-ph-bubble {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 78%;
    animation: atvPhRise 0.3s ease both;
}
.atv-ph-bubble.is-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.atv-ph-bubble__av {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 13px;
    object-fit: cover;
}
.atv-ph-bubble__body {
    min-width: 0;
    padding: 12px 15px;
    border-radius: 18px 18px 18px 6px;
    background: var(--ph-surface-2);
    border: 1px solid var(--ph-line);
}
.atv-ph-bubble.is-theirs .atv-ph-bubble__body {
    border-radius: 18px 18px 6px 18px;
}
.atv-ph-bubble.is-mine .atv-ph-bubble__body {
    background: linear-gradient(180deg, rgba(245, 196, 81, 0.18), rgba(245, 196, 81, 0.08));
    border-color: var(--ph-ac-line);
}
.atv-ph-bubble__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-bubble__meta strong {
    font-size: 13px;
    color: var(--ph-text);
}
.atv-ph-bubble.is-mine .atv-ph-bubble__meta strong {
    color: var(--ph-ac-text);
}
/* Other person's name / avatar = link to their public profile (view-message.php). */
.atv-ph-bubble__avlink {
    flex-shrink: 0;
    display: block;
    border-radius: 13px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.atv-ph-bubble__avlink:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px var(--ph-ac-line), 0 8px 18px -8px rgba(245, 185, 66, 0.6);
}
.atv-ph-bubble__who {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}
.atv-ph-bubble__who::after {
    content: "\f08e";
    font-family: "Font Awesome 6 Pro";
    font-weight: 300;
    font-size: 10px;
    color: var(--ph-muted);
    opacity: 0;
    transition: opacity 0.2s;
}
.atv-ph-bubble__who:hover strong,
.atv-ph-bubble__who:focus-visible strong {
    color: var(--ph-ac-text);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--ph-ac-line);
}
.atv-ph-bubble__who:hover::after {
    opacity: 1;
}
.atv-ph-bubble__text {
    font-size: 14px;
    line-height: 2;
    color: var(--ph-text-2);
    overflow-wrap: anywhere;
}
.atv-ph-composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--ph-line);
    background: var(--ph-surface);
}
.atv-ph .atv-ph-composer textarea {
    flex: 1;
    min-height: 52px;
}
.atv-ph .atv-ph-composer .atv-ph-btn {
    height: 52px;
}
.atv-ph-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    color: var(--ph-text);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    box-shadow: var(--ph-shadow);
    transition: transform 0.2s, border-color 0.2s;
}
.atv-ph-row:hover {
    transform: translateY(-2px);
    border-color: var(--ph-line-3);
    color: var(--ph-text);
}
.atv-ph-row__ic,
.atv-ph-result__ic {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    font-size: 17px;
    color: var(--ph-muted);
    background: var(--ph-chip);
}
.atv-ph-row__ic.is-ok,
.atv-ph-result.is-ok .atv-ph-result__ic {
    color: var(--ph-ok);
    background: var(--ph-ok-soft);
}
.atv-ph-row__ic.is-bad,
.atv-ph-result.is-bad .atv-ph-result__ic {
    color: var(--ph-bad);
    background: var(--ph-bad-soft);
}
.atv-ph-row__ic.is-warn,
.atv-ph-result.is-warn .atv-ph-result__ic {
    color: var(--ph-warn);
    background: var(--ph-warn-soft);
}
.atv-ph-row__tx {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}
.atv-ph-row__tx b {
    font-size: 14.5px;
}
.atv-ph-row__tx small {
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-row__go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ph-ac-text);
}
.atv-ph-result {
    display: flex;
    gap: 18px;
}
.atv-ph-result.is-ok {
    border-color: rgba(123, 227, 163, 0.35);
    background: radial-gradient(500px 200px at 100% 0, var(--ph-ok-soft), transparent 70%), var(--ph-card);
}
.atv-ph-result.is-bad {
    border-color: rgba(255, 107, 107, 0.3);
}
.atv-ph-result .atv-ph-result__ic {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 20px;
    font-size: 26px;
}
.atv-ph-result__tx {
    min-width: 0;
    flex: 1;
}
.atv-ph .atv-ph-result h3 {
    margin: 10px 0 14px;
    font-size: 17px;
    font-weight: 800;
    color: var(--ph-text);
}
.atv-ph-result dl {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.atv-ph-result dl div {
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--ph-surface);
    border: 1px solid var(--ph-line);
}
.atv-ph-result dt {
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-result dd {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--ph-text);
}
.atv-ph .atv-ph-answer p {
    margin: 0;
    font-size: 14px;
    line-height: 2.1;
    color: var(--ph-text-2);
}
.atv-ph-notif {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    box-shadow: var(--ph-shadow);
    animation: atvPhRise 0.35s ease both;
}
.atv-ph-notif.is-unread {
    border-color: var(--ph-ac-line);
}
.atv-ph-notif__ic {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ph-ac);
    background: var(--ph-ac-soft);
}
.atv-ph-notif__tx {
    min-width: 0;
}
.atv-ph .atv-ph-notif h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ph-text);
}
.atv-ph-notif h3 a {
    color: inherit;
}
.atv-ph-notif h3 a:hover {
    color: var(--ph-ac-text);
}
.atv-ph-notif__msg {
    margin-top: 2px;
    font-size: 13px;
    line-height: 2;
    color: var(--ph-text-2);
}
.atv-ph-notif__msg a {
    color: var(--ph-ac-text);
}
.atv-ph-notif time {
    font-size: 12px;
    color: var(--ph-muted);
}

/* ==========================================================================
   Support
   ========================================================================== */
.atv-ph-support__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.atv-ph-ticket__form {
    margin: 0;
}
.atv-ph-ticket__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.atv-ph .atv-ph-ticket__foot p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ph-muted);
}
.atv-ph-ticket__foot p i {
    color: var(--ph-ac);
}
.atv-ph-faq details {
    border-radius: 16px;
    background: var(--ph-surface);
    border: 1px solid var(--ph-line);
    transition: border-color 0.2s;
}
.atv-ph-faq details + details {
    margin-top: 10px;
}
.atv-ph-faq details[open] {
    border-color: var(--ph-ac-line);
}
.atv-ph-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ph-text);
    cursor: pointer;
    list-style: none;
}
.atv-ph-faq summary::-webkit-details-marker {
    display: none;
}
.atv-ph-faq summary i {
    font-size: 12px;
    color: var(--ph-muted);
    transition: transform 0.25s;
}
.atv-ph-faq details[open] summary i {
    transform: rotate(180deg);
    color: var(--ph-ac);
}
.atv-ph .atv-ph-faq details p {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 13px;
    line-height: 2;
    color: var(--ph-muted);
}

/* ---------- Music-sara inside the profile: reuse the music archive cards ---------- */
.atv-ph .atv-ph-sara__wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* ==========================================================================
   Profile menu — design 2 "side column with user card" (partials/profile/main.php, .atv-pm*)
   ========================================================================== */
body.animetv-native-body .animetv-profile-shell.atv-pm {
    width: calc(100% - 48px) !important;
    max-width: 1320px !important;
    margin: 26px auto 44px !important;
}
.atv-pm {
    --pm-card: linear-gradient(180deg, #17181f, #121319);
    --pm-surface: #191a22;
    --pm-line: rgba(255, 255, 255, 0.07);
    --pm-line-2: rgba(255, 255, 255, 0.05);
    --pm-text: #eef0f4;
    --pm-text-2: #c3c8d2;
    --pm-muted: #8b92a1;
    --pm-faint: #6b7180;
    --pm-ic: #1e2029;
    --pm-chip: rgba(255, 255, 255, 0.04);
    --pm-hover: rgba(255, 255, 255, 0.04);
    --pm-ring: #191a22;

    display: grid;
    grid-template-columns: 304px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    direction: rtl;
}
#animetvApp.day .atv-pm {
    --pm-card: #ffffff;
    --pm-surface: #f7f8fb;
    --pm-line: rgba(15, 23, 42, 0.08);
    --pm-line-2: rgba(15, 23, 42, 0.06);
    --pm-text: #1e2230;
    --pm-text-2: #374151;
    --pm-muted: #6b7280;
    --pm-faint: #9aa1ad;
    --pm-ic: #eef1f6;
    --pm-chip: rgba(15, 23, 42, 0.05);
    --pm-hover: rgba(15, 23, 42, 0.04);
    --pm-ring: #f7f8fb;
}
.atv-pm .animetv-profile-content {
    min-width: 0;
}
/* The rail keeps its natural height (no inner scrollbar); it only sticks on screens tall enough to show all of it. */
.atv-pm__rail {
    position: relative;
    align-self: start;
    padding: 12px;
    border-radius: 28px;
    background: var(--pm-card);
    border: 1px solid var(--pm-line);
    box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.95), 0 0 90px -50px rgba(124, 92, 255, 0.6);
}
#animetvApp.day .atv-pm__rail {
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.35);
}
.atv-pm a {
    text-decoration: none;
}

/* User card */
.atv-pm__user {
    position: relative;
    padding: 0 16px 16px;
    margin-bottom: 8px;
    border-radius: 21px;
    overflow: hidden;
    background: var(--pm-surface);
    border: 1px solid var(--pm-line-2);
}
.atv-pm__banner {
    position: relative;
    height: 84px;
    margin: 0 -16px;
    background: radial-gradient(160px 90px at 80% 20%, rgba(255, 241, 201, 0.55), transparent 70%), radial-gradient(200px 110px at 10% 100%, rgba(240, 171, 34, 0.6), transparent 70%), linear-gradient(135deg, #3b2a07, #1c1503);
}
.atv-pm__banner.is-emerald {
    background: radial-gradient(160px 90px at 80% 20%, rgba(167, 243, 208, 0.5), transparent 70%), radial-gradient(200px 110px at 10% 100%, rgba(16, 185, 129, 0.55), transparent 70%), linear-gradient(135deg, #053b2a, #04150f);
}
.atv-pm__banner.is-cosmic {
    background: radial-gradient(160px 90px at 80% 20%, rgba(167, 139, 250, 0.65), transparent 70%), radial-gradient(200px 110px at 10% 100%, rgba(245, 185, 66, 0.5), transparent 70%), linear-gradient(135deg, #2a1f4d, #16142a);
}
.atv-pm__banner.is-crimson {
    background: radial-gradient(160px 90px at 80% 20%, rgba(254, 202, 202, 0.45), transparent 70%), radial-gradient(200px 110px at 10% 100%, rgba(225, 29, 72, 0.55), transparent 70%), linear-gradient(135deg, #4c0519, #1a0208);
}
.atv-pm__banner.is-cyber {
    background: radial-gradient(160px 90px at 80% 20%, rgba(165, 243, 252, 0.5), transparent 70%), radial-gradient(200px 110px at 10% 100%, rgba(59, 130, 246, 0.55), transparent 70%), linear-gradient(135deg, #0c2a4d, #050d1c);
}
.atv-pm__banner.is-obsidian {
    background: radial-gradient(160px 90px at 80% 20%, rgba(226, 232, 240, 0.3), transparent 70%), radial-gradient(200px 110px at 10% 100%, rgba(100, 116, 139, 0.5), transparent 70%), linear-gradient(135deg, #1f232b, #0b0c10);
}
.atv-pm__banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 14px 14px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent);
    mask-image: linear-gradient(180deg, #000, transparent);
}
.atv-pm__who {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: -30px;
}
.atv-pm__av {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 23px;
    background: linear-gradient(180deg, #3a3f4c, #262a34);
    box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.8);
    transition: transform 0.25s;
}
.atv-pm__av.is-vip {
    background: conic-gradient(from 200deg, #ffd98a, #f0ab22, #fff1c9, #ffd98a);
    box-shadow: 0 12px 26px -8px rgba(245, 185, 66, 0.85);
}
.atv-pm__av:hover {
    transform: translateY(-2px);
}
.atv-pm__av img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid var(--pm-ring);
}
.atv-pm__name {
    min-width: 0;
    padding-bottom: 4px;
    display: flex;
    flex-direction: column;
    line-height: 1.45;
}
.atv-pm__name b {
    font-size: 17px;
    font-weight: 900;
    color: var(--pm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-pm__name small {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
    font-size: 12px;
    color: var(--pm-muted);
}
.atv-pm__vip {
    display: block;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 15px;
    background: linear-gradient(270deg, rgba(245, 196, 81, 0.15), rgba(245, 196, 81, 0.04));
    box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.25);
    transition: box-shadow 0.2s;
}
.atv-pm__vip:hover {
    box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.5);
}
.atv-pm__vip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 800;
    color: #ffd98a;
}
#animetvApp.day .atv-pm__vip-row {
    color: #a16207;
}
.atv-pm__vip-row > span {
    display: flex;
    align-items: center;
    gap: 7px;
}
.atv-pm__vip-row i {
    font-size: 12px;
    color: #f5c451;
}
.atv-pm__vip-row em {
    font-style: normal;
    font-size: 12px;
    color: #f5c451;
}
#animetvApp.day .atv-pm__vip-row em {
    color: #b45309;
}
.atv-pm__vip.is-off {
    background: var(--pm-chip);
    box-shadow: inset 0 0 0 1px var(--pm-line);
}
.atv-pm__vip.is-off .atv-pm__vip-row {
    color: var(--pm-text-2);
}
.atv-pm__bar {
    display: block;
    height: 6px;
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}
#animetvApp.day .atv-pm__bar {
    background: rgba(15, 23, 42, 0.08);
}
.atv-pm__bar i {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(270deg, #ffd98a, #f0ab22);
    box-shadow: 0 0 10px #f5b942;
}
.atv-pm__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}
.atv-pm__stats > * {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 13px;
    background: var(--pm-chip);
    border: 1px solid var(--pm-line-2);
    line-height: 1.5;
}
.atv-pm__stats a:hover {
    border-color: rgba(245, 196, 81, 0.35);
}
.atv-pm__stats small {
    display: block;
    font-size: 11px;
    color: var(--pm-muted);
}
.atv-pm__stats b {
    display: block;
    font-size: 13.5px;
    color: var(--pm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-pm__stats b small {
    display: inline;
}

/* Groups + items */
.atv-pm__group {
    padding: 8px 0 6px;
    border-top: 1px solid var(--pm-line-2);
}
.atv-pm__gh {
    display: block;
    padding: 2px 12px 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--pm-faint);
}
.atv-pm__it {
    position: relative;
    height: 48px;
    padding: 0 8px 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 15px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pm-text-2);
    transition: background 0.2s, color 0.2s;
}
.atv-pm__it:hover {
    color: var(--pm-text);
    background: var(--pm-hover);
}
.atv-pm__ic {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 15px;
    color: var(--pm-muted);
    background: var(--pm-ic);
    box-shadow: inset 0 0 0 1px var(--pm-line);
    transition: all 0.25s;
}
.atv-pm__it:hover .atv-pm__ic {
    color: #f5c451;
}
.atv-pm__lb {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-pm__chip {
    height: 22px;
    padding: 0 8px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--pm-muted);
    background: var(--pm-chip);
}
.atv-pm__badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-style: normal;
    font-size: 11.5px;
    font-weight: 800;
    color: #ffffff;
    background: #ff5f7e;
    box-shadow: 0 0 12px rgba(255, 95, 126, 0.6);
}
.atv-pm__ext {
    font-size: 11px;
    color: var(--pm-faint);
}
.atv-pm__it.is-on {
    color: var(--pm-text);
    background: linear-gradient(270deg, rgba(245, 185, 66, 0.17), rgba(245, 185, 66, 0.02) 85%);
}
.atv-pm__it.is-on::before {
    content: "";
    position: absolute;
    right: -12px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: #f5c451;
    box-shadow: 0 0 16px #f5b942;
    animation: atvPmGlow 0.3s ease;
}
.atv-pm__it.is-on .atv-pm__ic {
    color: #1c1503;
    background: linear-gradient(180deg, #ffd98a, #f0ab22);
    box-shadow: 0 10px 20px -8px rgba(245, 185, 66, 0.95);
}
.atv-pm__it.is-on .atv-pm__chip {
    color: #ffd98a;
    background: rgba(245, 196, 81, 0.12);
}
#animetvApp.day .atv-pm__it.is-on .atv-pm__chip {
    color: #a16207;
}
.atv-pm__it:focus-visible,
.atv-pm__av:focus-visible,
.atv-pm__vip:focus-visible {
    outline: 2px solid #f5c451;
    outline-offset: 2px;
}
@keyframes atvPmGlow {
    from {
        opacity: 0;
        transform: scaleY(0.3);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .atv-pm {
        grid-template-columns: 264px minmax(0, 1fr);
        gap: 18px;
    }
}
@media (max-width: 900px) {
    body.animetv-native-body .animetv-profile-shell.atv-pm {
        width: calc(100% - 32px) !important;
        margin-top: 16px !important;
    }
    .atv-pm {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .atv-pm__rail {
        position: static;
        padding: 10px;
        border-radius: 22px;
    }
    .atv-pm__user {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        margin-bottom: 8px;
        border-radius: 18px;
    }
    .atv-pm__banner {
        position: absolute;
        inset: 0;
        height: auto;
        margin: 0;
        opacity: 0.45;
    }
    .atv-pm__who {
        margin: 0;
        align-items: center;
    }
    .atv-pm__av {
        width: 52px;
        height: 52px;
        border-radius: 17px;
    }
    .atv-pm__av img {
        border-radius: 14px;
        border-width: 2px;
    }
    .atv-pm__vip {
        position: relative;
        margin: 0;
        padding: 8px 10px;
        min-width: 150px;
    }
    .atv-pm__stats {
        display: none;
    }
    .atv-pm__nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    .atv-pm__nav::-webkit-scrollbar {
        display: none;
    }
    .atv-pm__group {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
        padding: 0;
        border-top: 0;
    }
    .atv-pm__group + .atv-pm__group {
        padding-right: 6px;
        border-right: 1px solid var(--pm-line);
    }
    .atv-pm__gh {
        display: none;
    }
    .atv-pm__it {
        height: 42px;
        padding: 0 6px 0 12px;
        gap: 8px;
        flex-shrink: 0;
        scroll-snap-align: start;
        font-size: 13px;
    }
    .atv-pm__ic {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 13px;
    }
    .atv-pm__lb {
        overflow: visible;
    }
    .atv-pm__chip,
    .atv-pm__ext {
        display: none;
    }
    .atv-pm__it.is-on::before {
        top: auto;
        right: 14px;
        left: 14px;
        bottom: 0;
        width: auto;
        height: 3px;
        border-radius: 3px 3px 0 0;
    }
}
@media (max-width: 480px) {
    .atv-pm__user {
        grid-template-columns: minmax(0, 1fr);
    }
    .atv-pm__vip {
        min-width: 0;
    }
}

@media (max-width: 1100px) {
    .atv-ph-edit__grid,
    .atv-ph-support__grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .atv-ph-presets {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .atv-ph {
        width: calc(100% - 32px);
        gap: 14px;
    }
    .atv-ph-card {
        padding: 18px 16px;
        border-radius: 20px;
    }
    .atv-ph .atv-ph-head__tx h2 {
        font-size: 19px;
    }
    .atv-ph-head__ic {
        width: 46px;
        height: 46px;
        border-radius: 15px;
        font-size: 18px;
    }
    .atv-ph-head__ac {
        width: 100%;
    }
    .atv-ph-head__ac .atv-ph-btn {
        flex: 1;
    }
    .atv-ph-grid2,
    .atv-ph-grid3,
    .atv-ph-result dl {
        grid-template-columns: minmax(0, 1fr);
    }
    .atv-ph-id {
        padding: 0 16px 16px;
    }
    .atv-ph-id__banner {
        margin: 0 -16px;
    }
    .atv-ph .atv-ph-id__hint {
        margin: 0;
        width: 100%;
    }
    .atv-ph-whero {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "bal" "vip";
        padding: 20px 18px;
    }
    .atv-ph-whero__card {
        display: none;
    }
    .atv-ph-whero__num strong {
        font-size: 32px;
    }
    .atv-ph .atv-ph-whero__vip {
        justify-self: stretch;
    }
    .atv-ph-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .atv-ph-checkout .atv-ph-btn {
        width: 100%;
    }
    .atv-ph-inline {
        flex-direction: column;
    }
    .atv-ph-verify {
        flex-direction: column;
    }
    .atv-ph-savebar {
        flex-direction: column;
        align-items: stretch;
    }
    .atv-ph-savebar p {
        justify-content: center;
    }
    .atv-ph-tx__row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }
    .atv-ph-tx__row .atv-ph-pill {
        grid-column: 2 / -1;
        justify-self: start;
    }
    .atv-ph-thread {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 12px;
    }
    .atv-ph-thread__av {
        width: 48px;
        height: 48px;
    }
    .atv-ph-thread__meta {
        grid-column: 2;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .atv-ph-row {
        grid-template-columns: 46px minmax(0, 1fr) auto;
    }
    .atv-ph-row__go {
        display: none;
    }
    .atv-ph-notif {
        grid-template-columns: 40px minmax(0, 1fr);
    }
    .atv-ph-notif > .atv-ph-btn {
        grid-column: 2;
        justify-self: start;
    }
    .atv-ph-bubble {
        max-width: 92%;
    }
    .atv-ph-chat__stream {
        padding: 16px 12px 8px;
    }
    .atv-ph-composer {
        padding: 12px;
    }
    .atv-ph .atv-ph-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .atv-ph-result {
        flex-direction: column;
    }
}
@media (prefers-reduced-motion: reduce) {
    .atv-ph-thread,
    .atv-ph-notif,
    .atv-ph-bubble {
        animation: none;
    }
    .atv-ph-whero__card {
        transition: none;
    }
}

@media (min-width: 901px) and (min-height: 1080px) {
    .atv-pm__rail {
        position: sticky;
        top: 100px;
    }
}

/* ==========================================================================
   Financial history — profile » «تراکنش‌ها» (partials/profile/transactions.php) and the last rows on the wallet page.
   Table markup: partials/profile/tx-table.php · data: classes/class-wallet-log.php.
   Desktop: a real table in a rounded frame; phones (<=640px): every row becomes a small two-line card.
   ========================================================================== */
.atv-ph-fin__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.atv-ph-fin__stat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 22px;
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    box-shadow: var(--ph-shadow);
    overflow: hidden;
}
.atv-ph-fin__stat::after {
    content: "";
    position: absolute;
    left: -30px;
    bottom: -40px;
    width: 140px;
    height: 110px;
    border-radius: 50%;
    background: var(--fin-glow, rgba(245, 185, 66, 0.16));
    filter: blur(28px);
    pointer-events: none;
}
.atv-ph-fin__stat.is-in {
    --fin-glow: rgba(123, 227, 163, 0.14);
}
.atv-ph-fin__stat.is-out {
    --fin-glow: rgba(167, 139, 250, 0.16);
}
.atv-ph-fin__si {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 18px;
    color: var(--ph-ac);
    background: var(--ph-ac-soft);
}
.atv-ph-fin__stat.is-in .atv-ph-fin__si {
    color: var(--ph-ok);
    background: var(--ph-ok-soft);
}
.atv-ph-fin__stat.is-out .atv-ph-fin__si {
    color: #b49bff;
    background: rgba(167, 139, 250, 0.12);
}
#animetvApp.day .atv-ph-fin__stat.is-out .atv-ph-fin__si {
    color: #7c3aed;
}
.atv-ph-fin__stat > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}
.atv-ph-fin__stat small {
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-fin__stat b {
    font-size: 20px;
    font-weight: 900;
    color: var(--ph-text);
    white-space: nowrap;
}
.atv-ph-fin__stat em {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: var(--ph-muted);
}
.atv-ph-fin__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 14px;
}
.atv-ph .atv-ph-fin__bar .atv-ph-sub {
    margin: 0;
}
.atv-ph-fin__bar .atv-ph-btn small {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--ph-ink);
    background: var(--ph-gold);
}
.atv-ph-fin__tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--ph-surface);
    border: 1px solid var(--ph-line);
}
.atv-ph-fin__tabs a {
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ph-text-2);
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}
.atv-ph-fin__tabs a i {
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-fin__tabs a:hover {
    background: var(--ph-hover);
}
.atv-ph-fin__tabs a.is-on {
    color: var(--ph-ink);
    background: var(--ph-gold);
    box-shadow: 0 8px 20px -12px rgba(245, 185, 66, 0.9);
}
.atv-ph-fin__tabs a.is-on i {
    color: var(--ph-ink);
}
.atv-ph-fin__card .atv-ph-pages,
.atv-ph-fin__card .atv-ph-note {
    margin-top: 16px;
}

.atv-ph-ledger {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid var(--ph-line);
    background: var(--ph-surface);
}
.atv-ph-ledger__t {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 13.5px;
}
.atv-ph-ledger__t th {
    padding: 12px 16px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: var(--ph-muted);
    white-space: nowrap;
    background: var(--ph-surface-2);
    border-bottom: 1px solid var(--ph-line);
}
.atv-ph-ledger__t td {
    padding: 12px 16px;
    vertical-align: middle;
    color: var(--ph-text-2);
    border-bottom: 1px solid var(--ph-line);
}
.atv-ph-ledger__r:last-child td {
    border-bottom: 0;
}
.atv-ph-ledger__r {
    transition: background-color 0.2s;
}
.atv-ph-ledger__r:hover {
    background: var(--ph-hover);
}
.atv-ph-ledger__desc > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
}
.atv-ph-ledger__ic {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-size: 15px;
    color: var(--ph-ok);
    background: var(--ph-ok-soft);
}
.atv-ph-ledger__ic.k-vip {
    color: var(--ph-ac);
    background: var(--ph-ac-soft);
    box-shadow: 0 0 18px -6px rgba(245, 185, 66, 0.55);
}
.atv-ph-ledger__ic.k-sub {
    color: #7cc4ff;
    background: rgba(124, 196, 255, 0.12);
}
.atv-ph-ledger__ic.k-donate {
    color: #ff8fc7;
    background: rgba(255, 143, 199, 0.12);
}
.atv-ph-ledger__ic.k-debit {
    color: var(--ph-bad);
    background: var(--ph-bad-soft);
}
#animetvApp.day .atv-ph-ledger__ic.k-sub {
    color: #0369a1;
}
#animetvApp.day .atv-ph-ledger__ic.k-donate {
    color: #be185d;
}
.atv-ph-ledger__r.is-fail .atv-ph-ledger__ic {
    color: var(--ph-muted);
    background: var(--ph-chip);
    box-shadow: none;
}
.atv-ph-ledger__tx {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.55;
}
.atv-ph-ledger__tx b {
    font-size: 14px;
    font-weight: 800;
    color: var(--ph-text);
}
.atv-ph-ledger__tx small {
    max-width: 320px;
    font-size: 12px;
    color: var(--ph-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-ph-ledger__date,
.atv-ph-ledger__meth,
.atv-ph-ledger__amt,
.atv-ph-ledger__st {
    white-space: nowrap;
}
.atv-ph-ledger__date span {
    display: block;
    color: var(--ph-text);
    font-weight: 600;
}
.atv-ph-ledger__date small {
    font-size: 12px;
    color: var(--ph-muted);
}
.atv-ph-ledger__amt b {
    font-size: 15.5px;
    font-weight: 900;
    color: var(--ph-text);
}
.atv-ph-ledger__r.is-in.is-ok .atv-ph-ledger__amt b {
    color: var(--ph-ok);
}
.atv-ph-ledger__r.is-fail .atv-ph-ledger__amt b {
    color: var(--ph-muted);
    text-decoration: line-through;
}
.atv-ph-ledger__amt small {
    font-size: 11.5px;
    color: var(--ph-muted);
}

@media (max-width: 900px) {
    .atv-ph-fin__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .atv-ph-fin__stat {
        padding: 14px 16px;
    }
    .atv-ph-fin__stat.is-bal {
        grid-column: 1 / -1;
    }
}
@media (max-width: 480px) {
    .atv-ph-fin__stat:not(.is-bal) {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }
    .atv-ph-fin__stat:not(.is-bal) .atv-ph-fin__si {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        font-size: 15px;
    }
    .atv-ph-fin__stat:not(.is-bal) b {
        font-size: 17px;
    }
}
@media (max-width: 640px) {
    .atv-ph-fin__tabs {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .atv-ph-fin__tabs a {
        flex: 1 0 auto;
        justify-content: center;
        padding: 0 12px;
    }
    .atv-ph-ledger {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: none;
    }
    .atv-ph-ledger__t,
    .atv-ph-ledger__t tbody {
        display: block;
        min-width: 0;
    }
    .atv-ph-ledger__t thead {
        display: none;
    }
    .atv-ph-ledger__r {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 10px 10px;
        margin-bottom: 8px;
        padding: 12px 14px;
        border-radius: 18px;
        background: var(--ph-surface);
        border: 1px solid var(--ph-line);
    }
    .atv-ph-ledger__t td {
        display: block;
        padding: 0;
        border: 0;
    }
    .atv-ph-ledger__desc {
        grid-column: 1 / -1;
    }
    .atv-ph-ledger__desc > div {
        min-width: 0;
    }
    .atv-ph-ledger__tx small {
        max-width: none;
    }
    .atv-ph-ledger__date {
        grid-column: 1;
        font-size: 12.5px;
    }
    .atv-ph-ledger__date span,
    .atv-ph-ledger__date small {
        display: inline;
        margin-left: 6px;
    }
    .atv-ph-ledger__t .atv-ph-ledger__meth {
        display: none;
    }
    .atv-ph-ledger__st {
        grid-column: 2;
        grid-row: 2;
    }
    .atv-ph-ledger__amt {
        grid-column: 3;
        grid-row: 2;
        text-align: left;
    }
    .atv-ph-ledger__amt b {
        font-size: 14.5px;
    }
    .atv-ph-ledger__st .atv-ph-pill {
        height: 24px;
        font-size: 11.5px;
    }
}
