/* ═══════════════════════════════════════════════════════════════════════════
   profile.css — the Profile tab (home.html) and public profiles (user.html).
   Markup comes from profile-shared.js. Shared theme is in site.css.
   ═══════════════════════════════════════════════════════════════════════════ */

html.native-dark .pf {
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 32px 80px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
html.native-dark .pf-head {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

html.native-dark .pf-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface-3), var(--surface));
    box-shadow: 0 0 0 1px var(--line-2);
}

html.native-dark .pf-avatar::before {
    content: attr(data-initial);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-2);
}

html.native-dark .pf-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html.native-dark .pf-id { flex: 1; min-width: 0; }

html.native-dark .pf-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
}

html.native-dark .pf-name {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text);
    overflow-wrap: anywhere;
}

html.native-dark .pf-since {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--text-3);
}

html.native-dark .pf-since:empty { display: none; }

html.native-dark .pf-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

html.native-dark .pf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--text);
    font: 600 0.85rem var(--font);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

html.native-dark .pf-btn:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.25); }

/* Stat tiles */
html.native-dark .pf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

html.native-dark .pf-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}

html.native-dark .pf-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

html.native-dark .pf-stat-label { font-size: 0.8rem; color: var(--text-3); }

/* Tabs + sort */
html.native-dark .pf-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

html.native-dark .pf-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

html.native-dark .pf-tabs::-webkit-scrollbar { display: none; }

html.native-dark .pf-tab {
    position: relative;
    padding: 12px 14px 14px;
    border: 0;
    background: none;
    color: var(--text-3);
    font: 600 0.9rem var(--font);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s;
}

html.native-dark .pf-tab span {
    margin-left: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

html.native-dark .pf-tab:hover { color: var(--text); }
html.native-dark .pf-tab.active { color: var(--text); }

html.native-dark .pf-tab.active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
}

html.native-dark .pf-sort {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 36px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: var(--surface);
}

html.native-dark .pf-sort[hidden] { display: none; }

html.native-dark .pf-sort::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -4px;
    border-right: 2px solid var(--text-3);
    border-bottom: 2px solid var(--text-3);
    transform: rotate(45deg);
    pointer-events: none;
}

html.native-dark .pf-sort select {
    appearance: none;
    -webkit-appearance: none;
    height: 100%;
    padding: 0 32px 0 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: 600 0.82rem var(--font);
    cursor: pointer;
    outline: none;
}

html.native-dark .pf-sort option { background: var(--surface-2); }

/* ── Album grid ─────────────────────────────────────────────────────────── */
html.native-dark .pf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 26px 18px;
}

html.native-dark .pf-album {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

html.native-dark .pf-album-art {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-2) center / cover no-repeat;
    box-shadow: 0 0 0 1px var(--line);
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

html.native-dark .pf-album-art:not(.has-art)::before {
    content: attr(data-initial);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--surface-3);
}

html.native-dark .pf-album:hover .pf-album-art {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line-2);
}

html.native-dark .pf-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #fcd34d;
    font-size: 0.72rem;
    font-weight: 700;
}

html.native-dark .pf-album-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.native-dark .pf-album-meta {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.native-dark .pf-empty {
    padding: 56px 20px;
    text-align: center;
    color: var(--text-2);
    border: 1px dashed var(--line-2);
    border-radius: 16px;
}

/* ── Lists ──────────────────────────────────────────────────────────────── */
html.native-dark .pf-create {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin-bottom: 24px;
}

html.native-dark .pf-create input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}

html.native-dark .pf-create input::placeholder { color: var(--text-3); }
html.native-dark .pf-create input:focus { border-color: rgba(255, 255, 255, 0.35); }

html.native-dark .pf-create button {
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #0a0a0c;
    font: 700 0.85rem var(--font);
    cursor: pointer;
}

html.native-dark .pf-create button:hover { background: #e4e4e7; }
html.native-dark .pf-create button:disabled { opacity: 0.5; }

html.native-dark .pf-lists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
}

html.native-dark .pf-list {
    position: relative;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

html.native-dark .pf-list:hover { background: var(--surface-2); border-color: var(--line-2); }

html.native-dark .pf-list-art {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-2);
    margin-bottom: 12px;
}

html.native-dark .pf-list-art span {
    background: var(--surface-3) center / cover no-repeat;
}

html.native-dark .pf-list-art .pf-list-empty {
    grid-column: 1 / -1;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    font-size: 2.4rem;
    color: var(--text-3);
}

html.native-dark .pf-list-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    overflow-wrap: anywhere;
}

html.native-dark .pf-list-count { margin-top: 2px; font-size: 0.78rem; color: var(--text-3); }

html.native-dark .pf-list-delete {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
}

html.native-dark .pf-list:hover .pf-list-delete,
html.native-dark .pf-list-delete:focus-visible { opacity: 1; }
html.native-dark .pf-list-delete:hover { background: #dc2626; }

html.native-dark .pf-detail-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 20px;
}

html.native-dark .pf-detail-head h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

html.native-dark .pf-detail-head span { font-size: 0.85rem; color: var(--text-3); }

html.native-dark .pf-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: center;
    height: 34px;
    padding: 0 12px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--text);
    font: 600 0.82rem var(--font);
    cursor: pointer;
}

html.native-dark .pf-back:hover { background: var(--surface-2); }

/* ── Guest / message state ──────────────────────────────────────────────── */
html.native-dark .pf-guest {
    max-width: 480px;
    margin: 40px auto;
    padding: 44px 32px;
    text-align: center;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--surface);
}

html.native-dark .pf-guest-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
}

html.native-dark .pf-guest h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 8px;
}

html.native-dark .pf-guest p { color: var(--text-2); line-height: 1.5; }

html.native-dark .pf-guest-btns {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

html.native-dark .pf-guest-btns a.btn-signup {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    html.native-dark .pf { padding: 24px 16px 64px; }
    html.native-dark .pf-head { flex-wrap: wrap; gap: 16px; }
    html.native-dark .pf-avatar { width: 80px; height: 80px; }
    html.native-dark .pf-avatar::before { font-size: 2rem; }
    html.native-dark .pf-head-actions { width: 100%; }
    html.native-dark .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    html.native-dark .pf-stat { padding: 14px; }
    html.native-dark .pf-stat-value { font-size: 1.35rem; }
    html.native-dark .pf-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    html.native-dark .pf-sort { align-self: flex-end; }
    html.native-dark .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
    html.native-dark .pf-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    html.native-dark .pf-list-delete { opacity: 1; }
}
