/*
 * profile.css — the profile page (Pages/profile/Details) and the public channel page (Pages/Channel): the header with the picture, the section cards, the Following /
 * Followers / Blocked-users cards (Pages/Shared/_UserCard) and the picture editor.
 *
 * WHY A SEPARATE FILE: the compiled Tailwind in assets/css/style.css is committed but its SCSS sources are not in git, so no
 * new utility class can be generated. Everything this page needs beyond the theme's own components (form-control, form-label,
 * ti-btn) lives here, the same pattern as creator-analytics.css and shorts.css. Every class is prefixed `pf-` so it cannot
 * collide with a theme or Tailwind name.
 *
 * LIGHT AND DARK: built on the theme's CSS variables (space-separated RGB triplets). The site toggles `light` / `dark` on
 * <html>; --light, --body-bg, --default-text-color and --primary flip by themselves, the few colours that do not get a
 * `.dark` rule right beside them.
 */

.pf-root {
    --pf-card: #fff;
    --pf-line: rgb(0 0 0 / 0.08);
    --pf-line-strong: rgb(0 0 0 / 0.2);
    --pf-soft: rgb(var(--light));
    /* The theme's muted grey (140 144 151) is 3.2:1 on white, under the 4.5:1 small text needs: darker here, the theme's own on dark. */
    --pf-muted: 95 102 116;
    --pf-radius: 1rem;
    --pf-shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 6px 20px rgb(16 24 40 / 0.05);
    min-width: 0;
}
.dark .pf-root {
    --pf-card: rgb(var(--body-bg));
    --pf-line: rgb(255 255 255 / 0.1);
    --pf-line-strong: rgb(255 255 255 / 0.3);
    --pf-muted: var(--text-muted);
    --pf-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 20px rgb(0 0 0 / 0.25);
}

.pf-root [hidden], .pf-dialog [hidden] { display: none !important; }
.pf-muted { color: rgb(var(--pf-muted)); }
.pf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ buttons (the card and dialog buttons; the theme's .ti-btn
   recolours itself on hover in ways that fight a state colour) */

.pf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.55rem 1rem; border-radius: 0.65rem; border: 1px solid var(--pf-line-strong);
    background: transparent; color: rgb(var(--default-text-color)); font: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1.2;
    cursor: pointer; text-decoration: none; transition: background-color 0.15s, border-color 0.15s, filter 0.15s, color 0.15s;
}
.pf-btn:hover { background: var(--pf-soft); }
.pf-btn:focus-visible, .pf-avatar-edit:focus-visible, .pf-tab:focus-visible, .pf-crop:focus-visible, .pf-drop:has(:focus-visible), .pf-row-link:focus-visible {
    outline: 2px solid rgb(var(--primary)); outline-offset: 2px;
}
.pf-btn-primary { background: rgb(var(--primary)); border-color: transparent; color: #fff; }
.pf-btn-primary:hover { background: rgb(var(--primary)); filter: brightness(1.08); }
.pf-btn[disabled] { opacity: 0.55; cursor: not-allowed; filter: none; }
.pf-btn-danger { background: rgb(var(--danger)); border-color: transparent; color: #fff; }
.pf-btn-danger:hover { background: rgb(var(--danger)); filter: brightness(1.08); }
.pf-btn-block { width: 100%; }

.pf-spin {
    width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
    animation: pf-spin 0.7s linear infinite;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ header */

.pf-hero {
    margin-bottom: 1.25rem; overflow: hidden;
    background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); box-shadow: var(--pf-shadow);
}

/* The same night sky as the sign-in pages: a few soft colour clouds and some stars. */
.pf-cover {
    position: relative; height: 11rem;
    background-color: #03040b;
    background-image:
        radial-gradient(circle at 12% 30%, rgb(68 0 102 / 0.55) 0%, transparent 45%),
        radial-gradient(circle at 88% 70%, rgb(0 41 141 / 0.5) 0%, transparent 52%),
        radial-gradient(circle at 50% 120%, rgb(237 50 55 / 0.38) 0%, transparent 60%);
}
.pf-cover::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 24%, #fff 50%, transparent 52%),
        radial-gradient(1px 1px at 17% 72%, #fff 50%, transparent 52%),
        radial-gradient(2px 2px at 29% 38%, #fff 50%, transparent 52%),
        radial-gradient(1px 1px at 41% 82%, #fff 50%, transparent 52%),
        radial-gradient(1.5px 1.5px at 53% 18%, #fff 50%, transparent 52%),
        radial-gradient(1px 1px at 64% 62%, #fff 50%, transparent 52%),
        radial-gradient(2px 2px at 76% 28%, #fff 50%, transparent 52%),
        radial-gradient(1px 1px at 86% 84%, #fff 50%, transparent 52%),
        radial-gradient(1.5px 1.5px at 94% 44%, #fff 50%, transparent 52%);
}

.pf-hero-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 1.25rem; padding: 0 1.5rem 1.25rem; }

.pf-avatar-wrap { position: relative; flex: none; width: 12rem; height: 12rem; margin-top: -6rem; }
.pf-avatar {
    display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--pf-card); background: var(--pf-soft); box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
}
.pf-avatar-edit {
    position: absolute; right: 0.45rem; bottom: 0.45rem; width: 2.6rem; height: 2.6rem; padding: 0;
    display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--pf-card);
    background: rgb(var(--primary)); color: #fff; font-size: 1.15rem; cursor: pointer;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); transition: filter 0.15s, transform 0.15s;
}
.pf-avatar-edit:hover { filter: brightness(1.1); transform: scale(1.06); }

.pf-ident { flex: 1 1 14rem; min-width: 0; padding-top: 1rem; }
.pf-name { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; color: rgb(var(--default-text-color)); }
.pf-handle { margin: 0.2rem 0 0; font-size: 0.875rem; color: rgb(var(--pf-muted)); overflow-wrap: anywhere; }
.pf-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.pf-pill {
    display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%;
    padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--pf-soft); font-size: 0.75rem; color: rgb(var(--pf-muted));
}
.pf-pill i { font-size: 0.9rem; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 1rem; }

.pf-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--pf-line); }
.pf-stat { padding: 0.85rem 0.5rem; text-align: center; }
.pf-stat + .pf-stat { border-inline-start: 1px solid var(--pf-line); }
.pf-stat-n { display: block; font-size: 1.125rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; color: rgb(var(--default-text-color)); }
.pf-stat-l { display: block; margin-top: 0.1rem; font-size: 0.75rem; color: rgb(var(--pf-muted)); }

@media (max-width: 639px) {
    .pf-cover { height: 8.5rem; }
    .pf-hero-body { padding: 0 1rem 1rem; }
    .pf-avatar-wrap { width: 9rem; height: 9rem; margin-top: -4.5rem; }
    .pf-avatar-edit { right: 0.2rem; bottom: 0.2rem; width: 2.3rem; height: 2.3rem; }
    .pf-ident { padding-top: 0.75rem; }
    .pf-actions { padding-top: 0.75rem; }
    .pf-name { font-size: 1.3rem; }
    .pf-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pf-stat:nth-child(3n + 1) { border-inline-start: 0; }
    .pf-stat:nth-child(n + 4) { border-top: 1px solid var(--pf-line); }
}

/* ------------------------------------------------------------------ tabs (the soft-filter bar: the selected tab carries filter-chip-active) */

.pf-tabs {
    display: flex; gap: 0.25rem; width: max-content; max-width: 100%; margin-bottom: 1.25rem; padding: 0.25rem; overflow-x: auto;
    background: var(--pf-soft); border: 1px solid var(--pf-line); border-radius: 999px; scrollbar-width: none;
}
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab {
    display: inline-flex; align-items: center; gap: 0.45rem; flex: none; padding: 0.45rem 0.95rem; border-radius: 999px;
    font-size: 0.8125rem; font-weight: 600; white-space: nowrap; text-decoration: none; color: rgb(var(--pf-muted));
    transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.pf-tab:hover { color: rgb(var(--default-text-color)); }
.pf-tab.filter-chip-active { background: var(--pf-card); color: rgb(var(--default-text-color)); box-shadow: 0 1px 4px rgb(0 0 0 / 0.14); }
.pf-tab-n {
    min-width: 1.35rem; padding: 0.05rem 0.4rem; border-radius: 999px; text-align: center;
    background: rgb(var(--primary) / 0.12); color: rgb(var(--primary)); font-size: 0.6875rem; font-variant-numeric: tabular-nums;
}
.dark .pf-tab-n { background: rgb(var(--primary) / 0.22); color: #ff8a8e; }
@media (max-width: 639px) { .pf-tabs { width: 100%; } }
/* Narrow phones: the four tabs are a 2 x 2 grid, so all of them are in view and easy to tap (a row of four would scroll sideways). */
@media (max-width: 479px) {
    .pf-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; border-radius: 1.25rem; }
    .pf-tab { justify-content: center; border-radius: 1rem; }
}

/* ------------------------------------------------------------------ notices */

.pf-alert {
    display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.25rem; padding: 0.8rem 1rem; border-radius: 0.8rem;
    font-size: 0.8125rem; line-height: 1.45; border: 1px solid transparent;
}
.pf-alert i { font-size: 1.1rem; line-height: 1.3; flex: none; }
.pf-alert-ok { background: rgb(var(--success) / 0.1); border-color: rgb(var(--success) / 0.3); color: #0b7a5f; }
.pf-alert-bad { background: rgb(var(--danger) / 0.09); border-color: rgb(var(--danger) / 0.3); color: #b3361f; }
.dark .pf-alert-ok { color: #5fe0bd; }
.dark .pf-alert-bad { color: #ff9b8a; }

/* ------------------------------------------------------------------ layout and cards */

.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .pf-layout { grid-template-columns: minmax(0, 1fr) 21rem; } }
.pf-stack { display: grid; gap: 1.25rem; min-width: 0; }

.pf-card { min-width: 0; background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); box-shadow: var(--pf-shadow); }
.pf-card-head { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--pf-line); }
.pf-card-icon {
    flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.65rem; font-size: 1.15rem;
    background: rgb(var(--primary) / 0.1); color: rgb(var(--primary));
}
.pf-card-head:not(:has(.pf-card-sub)) { align-items: center; } /* a title with no line under it sits level with its icon */
.pf-card-title { margin: 0; font-size: 0.9375rem; font-weight: 700; line-height: 1.3; color: rgb(var(--default-text-color)); }
.pf-card-sub { margin: 0.15rem 0 0; font-size: 0.75rem; line-height: 1.4; color: rgb(var(--pf-muted)); }
.pf-card-body { padding: 1.25rem; }
/* a row of buttons at the bottom of a card (a channel's Report / Block) */
.pf-card-foot { display: flex; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid var(--pf-line); }

/* A channel's description: the web addresses FormatStringFromDB turns into links (the theme leaves a link the colour of its text). */
.channel-about { font-size: 0.875rem; line-height: 1.65; overflow-wrap: anywhere; color: rgb(var(--default-text-color)); }
.channel-about a { color: rgb(var(--primary)); text-decoration: underline; }

.pf-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pf-full { grid-column: 1 / -1; }
.pf-form-single { grid-template-columns: minmax(0, 1fr); }
.pf-form .form-label { margin-bottom: 0.35rem; }
.pf-req { margin-top: -0.25rem; font-size: 0.75rem; color: rgb(var(--pf-muted)); }
.pf-req b { color: rgb(var(--primary)); }
.pf-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
@media (max-width: 479px) { .pf-form { grid-template-columns: minmax(0, 1fr); } }

/* account rows: the e-mail and the VueXR ID, each with its change link */
.pf-rows { margin: 0; padding: 0; list-style: none; }
.pf-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.25rem; }
.pf-row + .pf-row { border-top: 1px solid var(--pf-line); }
.pf-row-icon { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--pf-soft); color: rgb(var(--pf-muted)); }
.pf-row-text { flex: 1; min-width: 0; }
.pf-row-label { display: block; font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: rgb(var(--pf-muted)); }
.pf-row-value { display: block; font-size: 0.875rem; font-weight: 600; overflow-wrap: anywhere; color: rgb(var(--default-text-color)); }
.pf-row-link { flex: none; font-size: 0.8125rem; font-weight: 600; color: rgb(var(--primary)); text-decoration: none; border-radius: 0.3rem; }
.pf-row-link:hover { text-decoration: underline; }

.pf-link { color: rgb(var(--primary)); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.pf-link:hover { text-decoration: underline; }
button.pf-link { padding: 0; border: 0; background: none; font-family: inherit; line-height: inherit; cursor: pointer; }

.pf-danger { border-color: rgb(var(--danger) / 0.3); }
.pf-danger .pf-card-icon { background: rgb(var(--danger) / 0.1); color: rgb(var(--danger)); }
.pf-danger .pf-card-title { color: rgb(var(--danger)); }
.pf-danger-text { margin: 0 0 0.9rem; font-size: 0.8125rem; line-height: 1.5; color: rgb(var(--pf-muted)); }

/* ------------------------------------------------------------------ people cards (Following / Followers / Blocked users) */

.pf-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.pf-users > * { min-width: 0; }

.pf-user {
    --tone-a: #7c3aed; --tone-b: #2563eb;
    display: flex; flex-direction: column; align-items: center; height: 100%; padding: 0 1rem 1.1rem; overflow: hidden; text-align: center;
    background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); box-shadow: var(--pf-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pf-user:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(16 24 40 / 0.06), 0 14px 30px rgb(16 24 40 / 0.12); }
.dark .pf-user:hover { box-shadow: 0 2px 4px rgb(0 0 0 / 0.35), 0 14px 30px rgb(0 0 0 / 0.45); }
/* Each person gets one of eight colourways for the strip (picked from their id), so a long list is not a wall of one grey. */
.pf-user[data-tone="1"] { --tone-a: #db2777; --tone-b: #7c3aed; }
.pf-user[data-tone="2"] { --tone-a: #0891b2; --tone-b: #2563eb; }
.pf-user[data-tone="3"] { --tone-a: #059669; --tone-b: #0891b2; }
.pf-user[data-tone="4"] { --tone-a: #ea580c; --tone-b: #db2777; }
.pf-user[data-tone="5"] { --tone-a: #4f46e5; --tone-b: #0ea5e9; }
.pf-user[data-tone="6"] { --tone-a: #ed3237; --tone-b: #9333ea; }
.pf-user[data-tone="7"] { --tone-a: #0d9488; --tone-b: #4f46e5; }
.pf-user-cover {
    align-self: stretch; height: 3.5rem; margin: 0 -1rem;
    background: linear-gradient(135deg, var(--tone-a), var(--tone-b));
}
.pf-user-avatar-link { margin-top: -2.4rem; line-height: 0; border-radius: 50%; }
.pf-user-avatar-link:focus-visible { outline: 2px solid rgb(var(--primary)); outline-offset: 2px; }
.pf-user-avatar {
    width: 4.8rem; height: 4.8rem; border-radius: 50%; object-fit: cover; background: var(--pf-soft);
    border: 3px solid var(--pf-card); box-shadow: 0 4px 12px rgb(0 0 0 / 0.2);
}
.pf-user-name {
    display: block; max-width: 100%; margin-top: 0.6rem; font-size: 0.9375rem; font-weight: 700; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: rgb(var(--default-text-color));
}
.pf-user-name:hover { color: rgb(var(--primary)); }
.pf-user-handle { max-width: 100%; margin: 0.1rem 0 0; font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(var(--pf-muted)); }
.pf-user-about {
    margin: 0.55rem 0 0; font-size: 0.8125rem; line-height: 1.4; color: rgb(var(--pf-muted)); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.pf-user-stat {
    display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.7rem; padding: 0.15rem 0.6rem;
    border-radius: 999px; background: var(--pf-soft); font-size: 0.75rem; color: rgb(var(--pf-muted));
}
.pf-user-action { width: 100%; margin-top: auto; padding-top: 0.95rem; }

/* The follow button's state is its data-follow attribute (vuexr.actions.js flips it after a click, and only changes the
   label): "true" = the click would follow, so the person is not followed yet. */
.pf-follow { min-width: 7rem; border-radius: 999px; }
.pf-user-action .pf-follow { width: 100%; }
.pf-follow[data-follow="true"] { background: rgb(var(--primary)); border-color: transparent; color: #fff; }
.pf-follow[data-follow="true"]:hover { background: rgb(var(--primary)); filter: brightness(1.08); }
.pf-follow[data-follow="false"] { background: transparent; border-color: var(--pf-line-strong); color: rgb(var(--default-text-color)); }
.pf-follow[data-follow="false"]:hover { background: var(--pf-soft); }
.pf-follow[disabled] { opacity: 0.6; cursor: wait; }

/* On your own list or channel there is nothing to follow: say whose card it is. */
.pf-user-self {
    display: block; width: 100%; padding: 0.5rem 1rem; text-align: center; font-size: 0.8125rem; color: rgb(var(--pf-muted));
    border: 1px dashed var(--pf-line-strong); border-radius: 999px;
}

.pf-empty {
    grid-column: 1 / -1; display: grid; justify-items: center; gap: 0.5rem; padding: 3rem 1.5rem; text-align: center;
    background: var(--pf-card); border: 1px dashed var(--pf-line-strong); border-radius: var(--pf-radius);
}
.pf-empty-icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: rgb(var(--primary) / 0.1); color: rgb(var(--primary)); font-size: 1.6rem; }
.pf-empty-title { margin: 0.25rem 0 0; font-size: 1rem; font-weight: 700; color: rgb(var(--default-text-color)); }
.pf-empty-text { margin: 0 0 0.5rem; max-width: 22rem; font-size: 0.8125rem; color: rgb(var(--pf-muted)); }

/* ------------------------------------------------------------------ picture editor */

.pf-dialog {
    width: min(30rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 1.5rem); padding: 0; overflow: auto;
    background: var(--pf-card); color: rgb(var(--default-text-color));
    border: 1px solid var(--pf-line); border-radius: 1.25rem; box-shadow: 0 28px 70px rgb(0 0 0 / 0.4);
}
.pf-dialog:not([open]) { display: none; }
/* (A <dialog> sits in the page's .pf-root, so it has the colour variables above even in the top layer.) */
.pf-dialog::backdrop { background: rgb(3 4 11 / 0.62); backdrop-filter: blur(3px); }

.pf-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--pf-line); }
.pf-dialog-title { margin: 0; font-size: 1rem; font-weight: 700; }
.pf-dialog-close {
    display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: rgb(var(--pf-muted)); font-size: 1.2rem; cursor: pointer;
}
.pf-dialog-close:hover { background: var(--pf-soft); color: rgb(var(--default-text-color)); }
.pf-dialog-close:focus-visible { outline: 2px solid rgb(var(--primary)); outline-offset: 2px; }
.pf-dialog-body { padding: 1.25rem; }
.pf-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding: 0 1.25rem 1.25rem; }
.pf-dialog-foot [data-pic-back] { margin-inline-end: auto; }
/* On a phone: Save is the full-width first row, the other two share the one below. */
@media (max-width: 479px) {
    .pf-dialog-foot .pf-btn { flex: 1 1 auto; }
    .pf-dialog-foot [data-pic-save] { order: -1; flex-basis: 100%; }
    .pf-dialog-foot [data-pic-back] { margin-inline-end: 0; }
}

.pf-drop {
    display: grid; justify-items: center; gap: 0.35rem; padding: 2.25rem 1rem; text-align: center; cursor: pointer;
    background: var(--pf-soft); border: 2px dashed var(--pf-line-strong); border-radius: 1rem;
    transition: border-color 0.15s, background-color 0.15s;
}
.pf-drop:hover, .pf-drop.is-over { border-color: rgb(var(--primary)); background: rgb(var(--primary) / 0.06); }
.pf-drop-icon { font-size: 2.1rem; color: rgb(var(--primary)); line-height: 1; }
.pf-drop-title { font-size: 0.9375rem; font-weight: 700; }
.pf-drop-hint { font-size: 0.75rem; color: rgb(var(--pf-muted)); }

/* The square the visitor moves the picture under; the circle shows what the round avatar will keep. */
.pf-crop {
    position: relative; width: 100%; max-width: 20rem; aspect-ratio: 1; margin: 0 auto; overflow: hidden;
    background: #0b0d14; border-radius: 1rem; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.pf-crop.is-dragging { cursor: grabbing; }
.pf-crop img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.pf-crop-mask {
    position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 0 999px rgb(3 4 11 / 0.62); outline: 2px solid rgb(255 255 255 / 0.9);
}
.pf-zoom { display: flex; align-items: center; gap: 0.6rem; max-width: 20rem; margin: 1rem auto 0; color: rgb(var(--pf-muted)); }
.pf-zoom input[type="range"] { flex: 1; min-width: 0; accent-color: rgb(var(--primary)); }
.pf-zoom button { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--pf-line-strong); border-radius: 50%; background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; }
.pf-zoom button:hover { background: var(--pf-soft); color: rgb(var(--default-text-color)); }
.pf-crop-tip { margin: 0.75rem 0 0; text-align: center; font-size: 0.75rem; color: rgb(var(--pf-muted)); }
.pf-pic-error { margin: 1rem 0 0; padding: 0.7rem 0.9rem; border-radius: 0.7rem; background: rgb(var(--danger) / 0.09); border: 1px solid rgb(var(--danger) / 0.3); font-size: 0.8125rem; color: #b3361f; }
.dark .pf-pic-error { color: #ff9b8a; }

@media (prefers-reduced-motion: reduce) {
    .pf-user, .pf-btn, .pf-tab, .pf-avatar-edit, .pf-drop { transition: none; }
    .pf-user:hover, .pf-avatar-edit:hover { transform: none; }
    .pf-spin { animation-duration: 2s; }
}
