/* ═══════════════════════════════════════════════════════════════════════════════
   EPISODE ONE — PROFILE PAGE
   profile.css — Rich black, high contrast
   ═══════════════════════════════════════════════════════════════════════════════ */

.profile-page { background: #0d0d0d; min-height: 100vh; padding-bottom: 100px; }
.profile-header { background: #141414; border-bottom: 1px solid #D4AF37; padding: 52px 0 0; }
.profile-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.profile-top { display: flex; align-items: flex-start; gap: 36px; margin-bottom: 36px; }
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid #D4AF37; display: block; }
.profile-avatar-placeholder { width: 100px; height: 100px; border-radius: 50%; background: #1e1e1e; border: 3px solid #D4AF37; display: flex; align-items: center; justify-content: center; }
.profile-avatar-initials { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; color: #D4AF37; letter-spacing: 0.03em; line-height: 1; }
.profile-identity { flex: 1; min-width: 0; }
.profile-seat-label { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #D4AF37; margin-bottom: 6px; }
.profile-display-name { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; font-weight: 600; color: #ffffff; line-height: 1.1; margin-bottom: 4px; }
.profile-username { font-family: 'Source Sans 3', sans-serif; font-size: 13px; color: #888; letter-spacing: 0.5px; margin-bottom: 14px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.profile-meta-item { font-family: 'Source Sans 3', sans-serif; font-size: 13px; color: #bbb; display: flex; align-items: center; gap: 5px; }
.profile-meta-item svg { opacity: 0.5; }
.profile-meta-item a { color: #D4AF37; text-decoration: none; }
.profile-meta-item a:hover { text-decoration: underline; }
.profile-bio { font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 400; color: #ccc; line-height: 1.7; max-width: 520px; }
.profile-actions { flex-shrink: 0; display: flex; gap: 10px; padding-top: 4px; }
.btn-follow { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; padding: 9px 22px; border-radius: 2px; cursor: pointer; transition: all 0.2s; border: 1px solid #D4AF37; background: #D4AF37; color: #111; text-decoration: none; display: inline-block; }
.btn-follow:hover { background: #e8c84a; border-color: #e8c84a; color: #111; }
.btn-follow.following { background: transparent; color: #D4AF37; }
.btn-follow.following:hover { background: rgba(212,175,55,0.08); }
.btn-message { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; padding: 9px 22px; border-radius: 2px; cursor: pointer; transition: all 0.2s; border: 1px solid #D4AF37; background: transparent; color: #D4AF37; text-decoration: none; display: inline-block; margin-left: 10px; }
.btn-message:hover { background: rgba(212,175,55,0.12); color: #e8c84a; }
.btn-edit-profile { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 9px 18px; border-radius: 2px; cursor: pointer; background: transparent; border: 1px solid #444; color: #ccc; text-decoration: none; display: inline-block; transition: all 0.2s; }
.btn-edit-profile:hover { border-color: #D4AF37; color: #D4AF37; }
.profile-stats-bar { display: flex; border-top: 1px solid #222; margin-top: 8px; }
.profile-stat { flex: 1; padding: 20px 0; text-align: center; border-right: 1px solid #222; text-decoration: none; transition: background 0.15s; cursor: pointer; }
.profile-stat:last-child { border-right: none; }
.profile-stat:hover { background: rgba(212,175,55,0.05); }
.profile-stat:hover .profile-stat-number { color: #D4AF37; }
.profile-stat-number { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 600; color: #ffffff; line-height: 1; display: block; transition: color 0.15s; }
.profile-stat-label { font-family: 'Source Sans 3', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #666; display: block; margin-top: 6px; }
.profile-body { max-width: 1100px; margin: 0 auto; padding: 48px 40px 0; display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.profile-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid #2a2a2a; }
.profile-section-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; color: #ffffff; letter-spacing: 0.03em; }
.profile-section-link { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #555; text-decoration: none; transition: color 0.2s; }
.profile-section-link:hover { color: #D4AF37; }
.profile-main { min-width: 0; }

/* ── Tabs ── */
.profile-tabs { display: flex; flex-wrap: wrap; margin-bottom: 32px; border-bottom: 1px solid #2a2a2a; }
.profile-tab { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #666; padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.2s, border-color 0.2s; text-decoration: none; }
.profile-tab:hover { color: #ccc; }
.profile-tab.active { color: #ffffff; border-bottom-color: #D4AF37; }

/* ── Pilot grid ── */
.pilot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.pilot-grid-item { position: relative; aspect-ratio: 2/3; overflow: hidden; border-radius: 2px; background: #1e1e1e; cursor: pointer; }
.pilot-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.pilot-grid-item:hover img { transform: scale(1.04); }
.pilot-grid-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 55%); opacity: 0; transition: opacity 0.25s; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; }
.pilot-grid-item:hover .pilot-grid-overlay { opacity: 1; }
.pilot-grid-title { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; color: #fff; line-height: 1.3; }
.pilot-grid-empty { grid-column: 1 / -1; padding: 60px 0; text-align: center; }
.pilot-grid-empty-icon { font-size: 2rem; margin-bottom: 16px; opacity: 0.2; color: #fff; }
.pilot-grid-empty-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; color: #ccc; margin-bottom: 8px; }
.pilot-grid-empty-text { font-family: 'Source Sans 3', sans-serif; font-size: 13px; color: #666; line-height: 1.6; }
.pilot-grid-empty-text a { color: #D4AF37; text-decoration: none; }
.pilot-grid-empty-text a:hover { text-decoration: underline; }

/* ── Sidebar ── */
.profile-sidebar { min-width: 0; }
.sidebar-card { background: #1a1a1a; border: 1px solid #2a2a2a; border-top: 2px solid #D4AF37; border-radius: 2px; padding: 24px; margin-bottom: 16px; }
.sidebar-card-title { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: #ffffff; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-card-title a { color: #D4AF37; text-decoration: none; font-size: 9px; letter-spacing: 1.5px; }
.sidebar-card-title a:hover { text-decoration: underline; }
.taste-fingerprint { display: flex; flex-direction: column; gap: 10px; }
.taste-bar-row { display: flex; align-items: center; gap: 10px; }
.taste-bar-label { font-family: 'Source Sans 3', sans-serif; font-size: 12px; font-weight: 600; color: #ddd; width: 70px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taste-bar-track { flex: 1; height: 3px; background: #2a2a2a; border-radius: 2px; overflow: hidden; }
.taste-bar-fill { height: 100%; background: linear-gradient(90deg, #B8960C, #D4AF37); border-radius: 2px; transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.taste-bar-count { font-family: 'Source Sans 3', sans-serif; font-size: 11px; font-weight: 600; color: #888; width: 20px; text-align: right; flex-shrink: 0; }
.taste-empty { font-family: 'Source Sans 3', sans-serif; font-size: 13px; color: #888; font-style: italic; line-height: 1.6; }
.stack-list { display: flex; flex-direction: column; gap: 12px; }
.stack-item { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.stack-item:hover .stack-item-title { color: #D4AF37; }
.stack-item-poster { width: 36px; height: 52px; border-radius: 1px; overflow: hidden; flex-shrink: 0; background: #2a2a2a; }
.stack-item-poster img { width: 100%; height: 100%; object-fit: cover; }
.stack-item-info { flex: 1; min-width: 0; }
.stack-item-title { font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 700; color: #ffffff; line-height: 1.3; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack-item-status { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 600; color: #777; margin-top: 3px; }
.stack-empty { font-family: 'Source Sans 3', sans-serif; font-size: 13px; color: #666; font-style: italic; }
.member-since { font-family: 'Source Sans 3', sans-serif; font-size: 12px; color: #555; text-align: center; padding-top: 4px; letter-spacing: 0.5px; }
.member-since span { color: #999; font-weight: 600; }

/* ── Nudges ── */
.profile-nudges-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 40px 0; }
.profile-nudges { display: flex; flex-direction: column; gap: 1px; background: #D4AF37; border-radius: 2px; overflow: hidden; }
.profile-nudge { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #1a1a1a; padding: 14px 20px; transition: background 0.15s; }
.profile-nudge:hover { background: #222; }
.profile-nudge-text { font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 400; color: #ddd; line-height: 1.5; }
.profile-nudge-cta { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #D4AF37; text-decoration: none; white-space: nowrap; transition: color 0.2s; flex-shrink: 0; }
.profile-nudge-cta:hover { color: #e8c84a; }

/* ── Ratings list ── */
.ratings-list { display: flex; flex-direction: column; gap: 1px; background: #2a2a2a; border: 1px solid #2a2a2a; border-radius: 2px; overflow: hidden; }
.rating-row { display: flex; align-items: center; gap: 16px; background: #1a1a1a; padding: 14px 16px; text-decoration: none; transition: background 0.15s; }
.rating-row:hover { background: #202020; }
.rating-row-poster { width: 36px; height: 52px; flex-shrink: 0; background: #2a2a2a; overflow: hidden; border-radius: 1px; }
.rating-row-poster img { width: 100%; height: 100%; object-fit: cover; }
.rating-row-info { flex: 1; min-width: 0; }
.rating-row-title { font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 700; color: #ffffff; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-row-scores { display: flex; gap: 8px; flex-wrap: wrap; }
.rating-score-pill { font-family: 'Source Sans 3', sans-serif; font-size: 11px; color: #888; }
.rating-score-pill strong { color: #D4AF37; font-weight: 700; }
.rating-row-composite { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 600; color: #ffffff; flex-shrink: 0; }
.rating-row-composite span { font-size: 0.9rem; color: #555; font-weight: 300; }

/* ── Notes list ── */
.notes-list { display: flex; flex-direction: column; gap: 1px; background: #2a2a2a; border: 1px solid #2a2a2a; border-radius: 2px; overflow: hidden; }
.note-row { display: flex; gap: 16px; background: #1a1a1a; padding: 18px 16px; transition: background 0.15s; }
.note-row:hover { background: #202020; }
.note-row-poster { width: 36px; height: 52px; flex-shrink: 0; background: #2a2a2a; overflow: hidden; border-radius: 1px; }
.note-row-poster img { width: 100%; height: 100%; object-fit: cover; }
.note-row-content { flex: 1; min-width: 0; }
.note-row-title { font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 700; color: #ffffff; text-decoration: none; display: block; margin-bottom: 4px; }
.note-row-title:hover { color: #D4AF37; }
.note-spoiler-badge { font-family: 'Source Sans 3', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #e07070; border: 1px solid rgba(224,112,112,0.4); padding: 2px 6px; margin-left: 6px; }
.note-row-body { font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 300; color: #bbb; line-height: 1.65; margin: 6px 0 4px; }
.note-row-date { font-family: 'Source Sans 3', sans-serif; font-size: 10px; color: #555; }
.note-row-edit { font-family: 'Source Sans 3', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #555; text-decoration: none; flex-shrink: 0; align-self: flex-start; transition: color 0.2s; }
.note-row-edit:hover { color: #D4AF37; }

/* ── Creators grid ── */
.creators-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.creator-grid-item { position: relative; aspect-ratio: 2/3; overflow: hidden; border-radius: 2px; background: #1e1e1e; text-decoration: none; }
.creator-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.creator-grid-item:hover img { transform: scale(1.04); }
.creator-grid-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #222; }
.creator-grid-placeholder span { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; color: #D4AF37; }
.creator-grid-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 55%); opacity: 0; transition: opacity 0.25s; display: flex; align-items: flex-end; padding: 10px; }
.creator-grid-item:hover .creator-grid-overlay { opacity: 1; }
.creator-grid-name { font-family: 'Source Sans 3', sans-serif; font-size: 11px; font-weight: 700; color: #fff; line-height: 1.3; }

/* ── Reading goal ── */
.goal-progress-wrap { display: flex; flex-direction: column; gap: 8px; }
.goal-progress-track { height: 5px; background: #2a2a2a; border-radius: 3px; overflow: hidden; }
.goal-progress-fill { height: 100%; background: linear-gradient(90deg, #B8960C, #D4AF37); border-radius: 3px; transition: width 0.8s ease; }
.goal-progress-label { font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 700; color: #ffffff; }
.goal-progress-pct { font-family: 'Source Sans 3', sans-serif; font-size: 11px; color: #888; }

/* ── My Writing ── */
.my-writing-list { display: flex; flex-direction: column; gap: 1px; background: #2a2a2a; border-radius: 2px; overflow: hidden; margin: -4px; }
.my-writing-item { display: flex; align-items: center; justify-content: space-between; background: #141414; padding: 11px 14px; text-decoration: none; transition: background 0.15s; color: inherit; }
.my-writing-item:hover, .my-writing-item:visited, .my-writing-item:focus { text-decoration: none; color: inherit; }
.my-writing-item:hover { background: #1e1e1e; }
.my-writing-item.disabled { pointer-events: none; opacity: 0.4; }
.my-writing-label { font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 600; color: #ddd; }
.my-writing-item:hover .my-writing-label { color: #D4AF37; }
.my-writing-count { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; color: #D4AF37; }

/* ── Quick stats strip ── */
.profile-quick-stats { display: flex; align-items: center; gap: 10px; padding: 16px 0 0; flex-wrap: wrap; }
.profile-quick-stat { font-family: 'Source Sans 3', sans-serif; font-size: 13px; color: #888; cursor: pointer; transition: color 0.2s; }
.profile-quick-stat:hover { color: #D4AF37; }
.profile-quick-stat strong { color: #ffffff; font-weight: 700; }
.profile-quick-sep { color: #333; font-size: 12px; }

/* ── User list ── */
.userlist { display: flex; flex-direction: column; gap: 1px; background: #2a2a2a; border: 1px solid #2a2a2a; border-radius: 2px; overflow: hidden; }
.userlist-row { display: flex; align-items: center; gap: 14px; background: #1a1a1a; padding: 14px 16px; text-decoration: none; transition: background 0.15s; }
.userlist-row:hover { background: #202020; }
.userlist-avatar { width: 44px; height: 44px; border-radius: 50%; background: #2a2a2a; border: 2px solid #D4AF37; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.userlist-avatar img { width: 100%; height: 100%; object-fit: cover; }
.userlist-avatar-initial { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; color: #D4AF37; }
.userlist-info { flex: 1; min-width: 0; }
.userlist-name { font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 700; color: #ffffff; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userlist-handle { font-weight: 400; color: #555; font-size: 12px; margin-left: 4px; }
.userlist-stats { font-family: 'Source Sans 3', sans-serif; font-size: 11px; color: #777; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.userlist-stat-val { color: #D4AF37; font-weight: 700; }
.userlist-dot { color: #444; }
.userlist-genre { font-family: 'Source Sans 3', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #666; border: 1px solid #2a2a2a; padding: 2px 7px; border-radius: 2px; }
.userlist-arrow { font-size: 14px; color: #333; flex-shrink: 0; transition: color 0.2s; }
.userlist-row:hover .userlist-arrow { color: #D4AF37; }

/* ── Mobile ── */
@media (max-width: 991px) {
    .profile-header-inner { padding: 0 20px; }
    .profile-top { gap: 20px; }
    .profile-avatar, .profile-avatar-placeholder { width: 72px; height: 72px; }
    .profile-avatar-initials { font-size: 1.5rem; }
    .profile-display-name { font-size: 1.8rem; }
    .profile-actions { display: none; }
    .profile-actions-mobile { display: flex; gap: 10px; margin-top: 16px; margin-bottom: 8px; }
    .profile-stats-bar { overflow-x: auto; }
    .profile-stat { min-width: 80px; padding: 14px 0; }
    .profile-body { padding: 32px 20px 0; grid-template-columns: 1fr; gap: 40px; }
    .pilot-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
    .profile-sidebar { order: -1; }
    .profile-nudges-wrap { padding: 20px 20px 0; }

    /* Tabs: single scrollable row */
    .profile-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        margin-bottom: 24px;
    }

    .profile-tabs::-webkit-scrollbar { display: none; }
    .profile-tab { flex-shrink: 0; white-space: nowrap; padding: 12px 14px; font-size: 10px; }
}

@media (min-width: 992px) {
    .profile-actions-mobile { display: none; }
}

/* ── Inline followers/following panel (mobile only) ──────────────────────────── */
.profile-inline-panel {
    display: none;
    border-top: 1px solid #2a2a2a;
    padding: 16px 0 8px;
    margin-top: 12px;
}

@media (min-width: 992px) {
    .profile-inline-panel { display: none !important; }
}

/* Section title inside inline panel */
.profile-inline-panel .profile-section-header {
    margin-bottom: 16px;
    padding-bottom: 10px;
}

.profile-inline-close {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #555;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 14px 0 4px;
    display: block;
    width: 100%;
    text-align: center;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.profile-inline-close:hover,
.profile-inline-close:active { color: #D4AF37; }

/* ── Nudges inline (below tabs) ─────────────────────────────────────────────── */
.profile-nudges-wrap--inline {
    padding: 32px 0 0;
    max-width: 100%;
}

/* ── Mobile: tabs + content above sidebar ────────────────────────────────────── */
@media (max-width: 991px) {
    .profile-sidebar { order: 2; }
    .profile-main { order: 1; }
}
/* ── Avatar edit button ──────────────────────────────────────────────────────── */
.profile-avatar-wrap { position: relative; display: inline-block; }
.profile-avatar-edit-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #D4AF37;
    border: 2px solid #0d0d0d;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.profile-avatar-edit-btn:hover { background: #e5c84a; }

/* ── Avatar modal overlay ────────────────────────────────────────────────────── */
.avatar-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.avatar-modal-overlay.active { display: flex; }
.avatar-modal {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    width: 420px;
    max-width: 90vw;
    padding: 28px;
}
.avatar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.avatar-modal-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: #f0ece4;
    margin: 0;
}
.avatar-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.avatar-modal-close:hover { color: #fff; }
.avatar-modal-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.avatar-option img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #333;
    transition: border-color 0.15s;
}
.avatar-option.active img,
.avatar-option:hover img { border-color: #D4AF37; }
.avatar-option-blank {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1e1e1e;
    border: 3px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}
.avatar-option.active .avatar-option-blank,
.avatar-option:hover .avatar-option-blank { border-color: #D4AF37; }
.avatar-option-blank span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: #D4AF37;
}
.avatar-option p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 11px;
    color: #888;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.avatar-option.active p { color: #D4AF37; }
.avatar-modal-actions {
    border-top: 1px solid #222;
    padding-top: 20px;
}
.avatar-modal-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ccc;
    border: 1px solid #333;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.avatar-modal-upload-btn:hover { border-color: #D4AF37; color: #D4AF37; }
.avatar-modal-loading, .avatar-modal-empty {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    color: #666;
}

/* ── Avatar delete X ─────────────────────────────────────────────────────────── */
.avatar-option-img-wrap {
    position: relative;
    display: inline-block;
}
.avatar-option-img-wrap img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #333;
    transition: border-color 0.15s;
    display: block;
}
.avatar-option.active .avatar-option-img-wrap img,
.avatar-option:hover .avatar-option-img-wrap img { border-color: #D4AF37; }
.avatar-delete-x {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #aaa;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.avatar-option:hover .avatar-delete-x { opacity: 1; }
.avatar-delete-x:hover { color: #fff; border-color: #888; }

/* ── Request a Script btn ────────────────────────────────────────────────── */
.btn-request-script {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    border: 1px solid #333;
    padding: 8px 16px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}
.btn-request-script:hover {
    border-color: #D4AF37;
    color: #D4AF37;
}

/* ── Reading goal sidebar ─────────────────────────────────────────────────── */
.sidebar-card--cta { border-left: 2px solid #D4AF37; }
.sidebar-goal-prompt {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 12px;
    color: #888;
    margin: 6px 0 12px;
    line-height: 1.5;
}
.sidebar-goal-btn {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #D4AF37;
    text-decoration: none;
    transition: opacity 0.15s;
}
.sidebar-goal-btn:hover { opacity: 0.7; }
.goal-on-track { color: #2ecc71; font-size: 10px; }
.goal-behind { color: #e07070; font-size: 10px; }

/* ── Recommendations sidebar grid ────────────────────────────────────────── */
.sidebar-recs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.sidebar-rec-poster {
    display: block;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #1a1a1a;
}
.sidebar-rec-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}
.sidebar-rec-poster:hover img { opacity: 0.8; }
.sidebar-rec-poster-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #D4AF37;
    background: #1a1a1a;
}

/* ── Taste fingerprint bars ───────────────────────────────────────────────── */
.fingerprint-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.fingerprint-genre {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #888;
    width: 70px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fingerprint-bar-wrap {
    flex: 1;
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}
.fingerprint-bar {
    height: 100%;
    background: linear-gradient(90deg, #B8960C, #D4AF37);
    border-radius: 2px;
    transition: width 0.6s ease;
}
.fingerprint-count {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    color: #555;
    width: 16px;
    text-align: right;
    flex-shrink: 0;
}

/* Message composer modal */
#eo-msg-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
#eo-msg-modal {
    background: #f2f2f2;
    border-radius: 8px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    overflow: hidden;
}
.eo-msg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}
.eo-msg-modal-title {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}
.eo-msg-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0;
}
.eo-msg-modal-close:hover { color: #1a1a1a; }
.eo-msg-modal-body { padding: 18px 20px; }
.eo-msg-modal-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    padding: 10px 12px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    background: #fff;
    resize: vertical;
    min-height: 90px;
}
.eo-msg-modal-textarea:focus {
    outline: none;
    border-color: #D4AF37;
}
.eo-msg-modal-error {
    margin-top: 10px;
    font-size: 12px;
    color: #b3261e;
}
.eo-msg-modal-success {
    margin-top: 10px;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.5;
}
.eo-msg-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}
.eo-msg-modal-cancel {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 9px 18px;
    border-radius: 2px;
    border: 1px solid #d4d4d4;
    background: #f2f2f2;
    color: #444;
    cursor: pointer;
}
.eo-msg-modal-cancel:hover { background: #e8e8e8; }
.eo-msg-modal-send {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 9px 18px;
    border-radius: 2px;
    border: 1px solid #D4AF37;
    background: #D4AF37;
    color: #1a1a1a;
    cursor: pointer;
}
.eo-msg-modal-send:hover { background: #e8c84a; border-color: #e8c84a; }
.eo-msg-modal-send:disabled { opacity: 0.6; cursor: default; }
