/* =============================================================================
   Profile Page — War Card Design (Pencil)
   ============================================================================= */

/* ── PROFILE WRAPPER ─────────────────────────────────────────────────────── */
.inv-profile-wrap { width: 100%; padding: 0 0 60px; }

/* ── KINGDOM BAND ────────────────────────────────────────────────────────── */
.profile-kingdom-band {
    background: linear-gradient(90deg, rgba(245,158,11,0.07), rgba(245,158,11,0.03), transparent);
    border-top: 1px solid rgba(245,158,11,0.14);
    border-bottom: 1px solid rgba(245,158,11,0.07);
    padding: 11px 22px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.kingdom-block {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kingdom-flag-wrap {
    width: 28px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kingdom-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #e8e0d0;
    letter-spacing: 0.03em;
    line-height: 1.2;
}
.kingdom-rank {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #f0f4ff;
    line-height: 1.2;
}
.kingdom-sub {
    font-size: 10px;
    color: #6b7280;
    letter-spacing: 0.05em;
}
.kingdom-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.07);
    margin: 0 16px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .kingdom-divider { display: none; }
    .profile-kingdom-band { gap: 12px; }
}
.kingdom-tier-pill {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 4px;
}
.kingdom-seasons {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}
.season-dot {
    font-size: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 1px 4px;
    border-radius: 3px;
}
.season-dot--gold { background: rgba(245,158,11,0.2); color: #fbbf24; }
.season-dot--silver { background: rgba(156,163,175,0.15); color: #d1d5db; }
.season-dot--bronze { background: rgba(180,120,60,0.18); color: #cd7f32; }
.season-dot--muted { background: rgba(255,255,255,0.05); color: #9ca3af; }
.season-dot--empty { background: transparent; color: rgba(255,255,255,0.15); }

/* ── HERO SECTION ────────────────────────────────────────────────────────── */
.inv-hero { position: relative; overflow: hidden; min-height: 220px; }
.inv-hero-banner {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--theme-bg, #0a0f1e) 0%, #1a0f05 50%, var(--theme-bg, #0d1424) 100%);
}
.inv-hero-banner-img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0.6;
}
.inv-hero-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
    z-index: 1;
}
.inv-hero-lines {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.inv-hero-lines::before {
    content: ''; position: absolute; top: -50%; left: -20%; width: 140%; height: 200%;
    background: repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(245,158,11,0.02) 40px, rgba(245,158,11,0.02) 41px);
}
.inv-hero-lines::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
    background: linear-gradient(to bottom, transparent, #080d1a);
}
.inv-hero-top-border {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--theme-accent, #f59e0b), #ff6b00, var(--theme-accent, #f59e0b), transparent);
}
#inv-profile-page .inv-hero-top-border {
    background-image: var(--theme-hero-border, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 20px;
}
.inv-hero-banner-cta {
    position: absolute; top: 10px; right: 12px;
    background: rgba(0,0,0,0.5); border: 1px dashed rgba(245,158,11,0.3);
    color: rgba(245,158,11,0.6); font-size: 10px; font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.05em; padding: 4px 8px; border-radius: 4px;
    cursor: pointer; transition: all 0.2s; z-index: 10;
}
.inv-hero-banner-cta:hover {
    border-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,0.1);
}
.inv-hero-content {
    position: relative; z-index: 2;
    display: flex; align-items: flex-end; gap: 20px; padding: 28px 24px 20px;
}
@media (max-width: 480px) {
    .inv-hero-content { flex-direction: column; align-items: center; text-align: center; }
}

/* ── AVATAR FRAME ────────────────────────────────────────────────────────── */
.inv-hero-avatar { position: relative; width: 100px; height: 100px; flex-shrink: 0; }
.inv-hero-avatar .inv-avatar-wrap { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.inv-hero-avatar .inv-hero-frame-svg {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
}

/* ── HERO IDENTITY ───────────────────────────────────────────────────────── */
.inv-hero-identity { flex: 1; min-width: 0; padding-bottom: 4px; }
.inv-hero-name {
    font-family: var(--theme-username-font, 'Rajdhani', sans-serif); font-size: 28px; font-weight: 700;
    color: #fff; letter-spacing: 0.03em; line-height: 1.1;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
@media (max-width: 480px) { .inv-hero-name { justify-content: center; } }
.inv-badge-level {
    font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border-radius: 3px;
}
.inv-badge-warlord { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.inv-badge-commander { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.inv-badge-scout { background: rgba(107,116,148,0.15); color: #6b7494; border: 1px solid rgba(107,116,148,0.3); }
.inv-badge-champion { background: rgba(245,158,11,0.1); color: rgba(245,158,11,0.8); border: 1px solid rgba(245,158,11,0.2); font-size: 10px; }

.inv-hero-sub {
    display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap;
}
@media (max-width: 480px) { .inv-hero-sub { justify-content: center; } }
.inv-hero-sub span { font-size: 12px; color: #9ca3af; }
.inv-alliance-tag {
    background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25);
    color: #f59e0b; font-size: 11px; font-family: 'Rajdhani', sans-serif;
    font-weight: 600; letter-spacing: 0.08em; padding: 1px 7px; border-radius: 3px;
}
.inv-officer-tag {
    background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.25);
    color: #60a5fa; font-size: 10px; font-family: 'Rajdhani', sans-serif;
    font-weight: 600; letter-spacing: 0.08em; padding: 1px 6px; border-radius: 3px;
}
.inv-hero-social { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
@media (max-width: 480px) { .inv-hero-social { justify-content: center; } }
.inv-hero-social span { font-size: 11px; color: #6b7280; }

/* ── STATS BAR ───────────────────────────────────────────────────────────── */
.inv-stats-bar {
    display: flex; gap: 0; background: var(--theme-bg, #111827);
    border-top: 1px solid rgba(255,255,255,0.07);
    border-bottom: 2px solid var(--theme-accent, rgba(245,158,11,0.15));
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.inv-stats-bar::-webkit-scrollbar { display: none; }
.inv-stat-item {
    flex: 1; min-width: 70px; text-align: center; padding: 10px 8px;
    border-right: 1px solid rgba(255,255,255,0.07);
    cursor: default; transition: background 0.15s;
}
.inv-stat-item:last-child { border-right: none; }
.inv-stat-item:hover { background: rgba(245,158,11,0.08); }
.inv-stat-val {
    font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700;
    color: #fff; line-height: 1;
}
.inv-stat-val--amber { color: #f59e0b; }
.inv-stat-val--glory { color: #fbbf24; }
.inv-stat-val--green { color: #7DCE00; }
.inv-stat-label {
    font-size: 10px; color: #6b7280; letter-spacing: 0.06em;
    text-transform: uppercase; margin-top: 2px; font-family: 'Rajdhani', sans-serif;
}

/* ── SECTION DIVIDER ─────────────────────────────────────────────────────── */
.inv-section-divider {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px; margin: 20px 0 4px;
}
@media (max-width: 700px) { .inv-section-divider { padding: 0 12px; margin: 16px 0 4px; } }
.inv-divider-line { flex: 1; height: 1px; background: rgba(255,255,255,0.07); }
.inv-divider-diamond {
    width: 5px; height: 5px; background: rgba(245,158,11,0.4);
    transform: rotate(45deg); flex-shrink: 0;
}
.inv-divider-label {
    font-family: 'Rajdhani', sans-serif; font-size: 10px; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase; color: #6b7280;
}

/* ── GRID LAYOUT ─────────────────────────────────────────────────────────── */
.inv-main-grid {
    padding: 16px 16px 0; display: grid;
    grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 700px) { .inv-main-grid { grid-template-columns: 1fr; padding: 12px 12px 0; } }
.inv-section-row { padding: 0 16px; margin-top: 14px; }
@media (max-width: 700px) { .inv-section-row { padding: 0 12px; } }

/* ── CARD ────────────────────────────────────────────────────────────────── */
.inv-wc-card {
    background: var(--theme-card-bg, #111827);
    border: 1px solid var(--theme-card-border, rgba(255,255,255,0.07));
    border-radius: 10px; overflow: hidden; transition: border-color 0.2s;
    position: relative;
    border-image: var(--theme-border-image, none);
}
.inv-wc-card:hover { border-color: rgba(245,158,11,0.2); }

/* Ornamental corners (activated by --theme-corner-img) */
.inv-wc-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; z-index: 1;
    background-image: var(--theme-corner-img, none), var(--theme-corner-img, none), var(--theme-corner-img, none), var(--theme-corner-img, none);
    background-repeat: no-repeat;
    background-position: top left, top right, bottom left, bottom right;
    background-size: 24px 24px;
}
.inv-wc-card::after {
    content: '';
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 48px; height: 16px;
    background-image: var(--theme-center-border, none);
    background-size: contain; background-repeat: no-repeat;
    pointer-events: none; z-index: 1;
}
.inv-wc-card--full { grid-column: 1 / -1; }

.inv-wc-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.2);
}
.inv-wc-card-title {
    font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase; color: #9ca3af;
    display: flex; align-items: center; gap: 6px;
}
.inv-wc-card-title-accent {
    width: 3px; height: 14px; background: var(--theme-accent, #f59e0b); border-radius: 2px; flex-shrink: 0;
}
.inv-wc-card-body { padding: 14px 16px; }
.inv-wc-card-link {
    font-size: 10px; color: #f59e0b; cursor: pointer;
    font-family: 'Rajdhani', sans-serif; font-weight: 600;
    letter-spacing: 0.05em; text-decoration: none;
}
.inv-wc-card-link:hover { color: #fbbf24; }

/* ── EMPTY STATES ────────────────────────────────────────────────────────── */
.inv-empty { text-align: center; padding: 24px 16px; color: #6b7280; font-size: 13px; }
.inv-empty-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.4; }
.inv-empty-title {
    font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 600; color: #9ca3af;
}
.inv-empty-sub { font-size: 11px; color: #6b7280; margin-top: 3px; }
.inv-empty-cta {
    display: inline-block; margin-top: 8px;
    font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 600;
    letter-spacing: 0.06em; color: #f59e0b; text-decoration: none;
    border: 1px solid rgba(245,158,11,0.3); padding: 4px 12px; border-radius: 4px;
}
.inv-empty-cta:hover { background: rgba(245,158,11,0.1); border-color: #f59e0b; }

/* ── LINEUPS ─────────────────────────────────────────────────────────────── */
.inv-wc-lineup-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none; transition: background 0.15s;
}
.inv-wc-lineup-item:last-child { border-bottom: none; }
.inv-wc-lineup-item:hover { background: rgba(245,158,11,0.04); }
.inv-wc-lineup-heroes { display: flex; }
.inv-wc-hero-thumb {
    width: 28px; height: 28px; border-radius: 50%; border: 2px solid #111827;
    background: #1a2540; display: flex; align-items: center; justify-content: center;
    font-size: 12px; margin-right: -6px; position: relative; overflow: hidden;
}
.inv-wc-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.inv-wc-lineup-info { flex: 1; min-width: 0; }
.inv-wc-lineup-name {
    font-size: 13px; color: #e8e0d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inv-wc-lineup-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.inv-wc-tier-pill {
    font-family: 'Rajdhani', sans-serif; font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em; padding: 1px 5px; border-radius: 3px;
}
.inv-wc-vote-count { font-size: 11px; color: #6b7280; display: flex; align-items: center; gap: 3px; }

/* ── BADGE IMAGE — global (all contexts) ─────────────────────────────────── */
.inv-badge-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ── BADGES ──────────────────────────────────────────────────────────────── */
.inv-wc-badges-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 16px;
}
@media (max-width: 400px) { .inv-wc-badges-grid { grid-template-columns: repeat(3, 1fr); } }
.inv-wc-badge-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 4px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.2);
    transition: all 0.15s; cursor: default;
}
.inv-wc-badge-item--earned {
    border-color: rgba(245,158,11,0.2); background: rgba(245,158,11,0.04);
}
.inv-wc-badge-item--earned:hover {
    border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.08);
}
.inv-wc-badge-item--locked { opacity: 0.35; }

/* Badge icon container — fixed square, uniform across all badges */
.inv-wc-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 26px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.inv-wc-badge-name {
    font-size: 9px; font-family: 'Rajdhani', sans-serif; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase; color: #9ca3af;
    text-align: center; line-height: 1.2;
}
.inv-wc-badge-item--earned .inv-wc-badge-name { color: rgba(245,158,11,0.8); }

/* ── STELLAR GLORY ───────────────────────────────────────────────────────── */
.inv-glory-rank { display: flex; align-items: center; gap: 16px; padding: 14px 16px 10px; }
.inv-rank-num {
    font-family: 'Rajdhani', sans-serif; font-size: 36px; font-weight: 700; line-height: 1; color: #f59e0b;
}
.inv-rank-num span { font-size: 18px; color: #6b7280; }
.inv-rank-info { flex: 1; }
.inv-server-dot { width: 8px; height: 8px; background: #f59e0b; border-radius: 50%; display: inline-block; }
.inv-total-pts { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 700; color: #fff; }
.inv-pts-label { font-size: 10px; color: #6b7280; letter-spacing: 0.08em; text-transform: uppercase; }
.inv-glory-chart { padding: 0 16px 14px; height: 64px; }
.inv-chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.inv-chart-bar {
    flex: 1; border-radius: 3px 3px 0 0; min-height: 4px;
    transition: all 0.2s; cursor: default; position: relative;
}
.inv-chart-bar:hover::after {
    content: attr(data-v); position: absolute; bottom: calc(100% + 4px);
    left: 50%; transform: translateX(-50%);
    font-size: 9px; color: #e8e0d0; background: #1a2540;
    padding: 2px 5px; border-radius: 3px; white-space: nowrap;
}

/* ── PET ─────────────────────────────────────────────────────────────────── */
.inv-wc-pet { padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.inv-wc-pet--link { text-decoration: none; color: inherit; display: flex; transition: background .15s; }
.inv-wc-pet--link:hover { background: rgba(245,158,11,0.04); }
.inv-wc-pet-frame { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.inv-wc-pet-img {
    width: 72px; height: 72px; border-radius: 8px;
    background: linear-gradient(135deg, #1a2540, #0d1a30);
    border: 1px solid rgba(245,158,11,0.2);
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    overflow: hidden;
}
.inv-wc-pet-img img { width: 100%; height: 100%; object-fit: cover; }
.inv-wc-pet-level {
    position: absolute; bottom: -4px; right: -4px; background: #111827;
    border: 1px solid rgba(245,158,11,0.3); color: #f59e0b;
    font-family: 'Rajdhani', sans-serif; font-size: 10px; font-weight: 700;
    padding: 1px 5px; border-radius: 3px;
}
.inv-wc-pet-info { flex: 1; min-width: 0; }
.inv-wc-pet-name {
    font-family: 'Rajdhani', sans-serif; font-size: 16px; font-weight: 700; color: #fff;
    display: flex; align-items: center; gap: 6px;
}
.inv-wc-pet-tags { display: flex; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.inv-wc-pet-tag {
    font-size: 10px; font-family: 'Rajdhani', sans-serif; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px;
}
.inv-wc-pet-stats { margin-top: 8px; display: flex; gap: 10px; }
.inv-wc-pet-stat { font-size: 11px; color: #9ca3af; display: flex; align-items: center; gap: 3px; }
.inv-wc-pet-progress { margin-top: 8px; }
.inv-wc-progress-label {
    display: flex; justify-content: space-between; font-size: 10px; color: #6b7280;
    margin-bottom: 3px; font-family: 'Rajdhani', sans-serif; letter-spacing: 0.05em;
}
.inv-wc-progress-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.inv-wc-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #f59e0b, #ff6b00); }

/* ── STAMPS ──────────────────────────────────────────────────────────────── */
.inv-wc-stamp-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s;
}
.inv-wc-stamp-row:last-child { border-bottom: none; }
.inv-wc-stamp-row:hover { background: rgba(255,255,255,0.02); }
.inv-wc-stamp-type {
    font-family: 'Rajdhani', sans-serif; font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px;
}
.inv-wc-stamp--legend { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.inv-wc-stamp--defender { background: rgba(96,165,250,0.1); color: #60a5fa; border: 1px solid rgba(96,165,250,0.2); }
.inv-wc-stamp--crush { background: rgba(244,114,182,0.1); color: #f472b4; border: 1px solid rgba(244,114,182,0.2); }
.inv-wc-stamp--ally { background: rgba(52,211,153,0.1); color: #34d399; border: 1px solid rgba(34,211,153,0.2); }
.inv-wc-stamp--rival { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.inv-wc-stamp--invictus { background: rgba(59,130,246,0.1); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }

/* ── ACHIEVEMENTS ────────────────────────────────────────────────────────── */
.inv-wc-achievements-grid {
    padding: 12px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.inv-wc-achievement-item {
    border-radius: 6px; overflow: hidden; aspect-ratio: 4/3;
    background: #1a2540; border: 1px solid rgba(255,255,255,0.07);
    position: relative; cursor: pointer; transition: border-color 0.2s;
}
.inv-wc-achievement-item:hover { border-color: rgba(245,158,11,0.3); }
.inv-wc-achievement-item img { width: 100%; height: 100%; object-fit: cover; }
.inv-wc-achievement-label {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    font-size: 9px; font-family: 'Rajdhani', sans-serif; font-weight: 600;
    letter-spacing: 0.05em; color: rgba(255,255,255,0.7);
    text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
}

/* ── RAFFLE WINS ─────────────────────────────────────────────────────────── */
.inv-wc-raffle-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.inv-wc-raffle-item:last-child { border-bottom: none; }
.inv-wc-raffle-pos {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.inv-wc-raffle-pos--1 { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.inv-wc-raffle-pos--2 { background: rgba(192,192,192,0.15); color: #c0c0c0; border: 1px solid rgba(192,192,192,0.3); }
.inv-wc-raffle-pos--3 { background: rgba(180,120,60,0.15); color: #cd7f32; border: 1px solid rgba(180,120,60,0.3); }
.inv-wc-raffle-pos--other { background: rgba(107,116,148,0.1); color: #6b7494; border: 1px solid rgba(107,116,148,0.2); }
.inv-wc-raffle-info { flex: 1; min-width: 0; }
.inv-wc-raffle-title { font-size: 12px; color: #e8e0d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-wc-raffle-date { font-size: 10px; color: #6b7280; margin-top: 1px; }

/* ── Settings Tabs ────────────────────────────────────────────────────────── */

.inv-settings-tabs {
    display: flex;
    align-items: center;
    position: sticky;
    top: var(--inv-header-h, 64px);
    z-index: 30;
    background: #080d1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 1rem;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 1200px;
    margin: 0 auto 0.5rem;
}

.inv-settings-tabs::-webkit-scrollbar { display: none; }

.inv-settings-tab {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7494;
    background: none;
    border: none;
    padding: 14px 18px;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
    white-space: nowrap;
}

.inv-settings-tab:hover { color: #c8cce8; }

.inv-settings-tab.is-active { color: #f59e0b; }

.inv-settings-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: #f59e0b;
    border-radius: 2px 2px 0 0;
}

.inv-settings-panel {
    display: none;
}

.inv-settings-panel.is-active {
    display: block;
}

@media (max-width: 767px) {
    .inv-settings-tabs {
        top: 56px;
        padding: 0 0.5rem;
    }
    .inv-settings-tab {
        font-size: 0.68rem;
        padding: 12px 12px;
    }
}

/* Avatar component CSS moved to assets/css/user-avatar.css (enqueued globally) */

/* ── Header edit button (camera icon overlay) ─────────────────────────────── */

.inv-avatar-edit-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f59e0b;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    z-index: 10;
    border: 2px solid #080d1a;
    transition: opacity 0.15s;
}
.inv-avatar-edit-btn:hover {
    opacity: 0.85;
}

/* Hidden file input — must remain accessible for iOS file picker */
.inv-avatar-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ── Customize Avatar section ─────────────────────────────────────────────── */

/* Large preview wrap in the edit section */
.inv-avatar-preview-wrap {
    position: relative;
    display: inline-block;
}

/* "Change Photo" button */
.inv-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #f59e0b;
    color: #000;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}
.inv-upload-btn:hover {
    opacity: 0.85;
}

/* "Remove photo" link */
.inv-remove-btn {
    font-size: 0.65rem;
    color: #6b7494;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.15s;
}
.inv-remove-btn:hover {
    color: #ef4444;
}

/* Flash message */
.inv-avatar-flash {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    text-align: center;
    width: 100%;
}
.inv-avatar-flash.is-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.inv-avatar-flash.is-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── Frame selector grid ──────────────────────────────────────────────────── */

.inv-frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.5rem;
}

.inv-frame-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.25rem;
    border-radius: 0.6rem;
    border: 2px solid rgba(255, 255, 255, 0.06);
    background: #111827;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.inv-frame-option:hover {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.05);
}
.inv-frame-option.is-active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.inv-frame-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-frame-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c8cce8;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

/* ── Knowledge Check section ─────────────────────────────────────────────── */

/* Verified Strategist badge pill */
.inv-kc-verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	font-size: 0.58rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #22c55e;
	border: 1px solid rgba(34, 197, 94, 0.3);
	background: rgba(34, 197, 94, 0.08);
	white-space: nowrap;
}

/* Shared progress bar track */
.inv-kc-bar-track {
	height: 6px;
	border-radius: 3px;
	background: #1f2937;
	overflow: hidden;
}

/* Question-progress fill (amber) */
.inv-kc-bar-fill {
	height: 100%;
	border-radius: 3px;
	background: #f59e0b;
	transition: width 0.4s ease;
}

/* Cooldown-elapsed fill (gray, lower visual priority) */
.inv-kc-cooldown-bar-fill {
	height: 100%;
	border-radius: 3px;
	background: #374151;
	transition: width 1s linear;
}

/* =============================================================================
   Social Layer — Likes, Follows, Stamps (v2.8.0)
   ============================================================================= */

/* ── Profile header social stats row ─────────────────────────────────────── */

.inv-profile-social-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin-top: 0.5rem;
}

.inv-social-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.inv-social-stat__icon {
    font-size: 0.85rem;
    line-height: 1;
}

.inv-social-stat__count {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f0f4ff;
    font-family: 'Rajdhani', sans-serif;
}

.inv-social-stat__label {
    font-size: 0.65rem;
    color: #6b7494;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inv-social-stat__sep {
    color: #3d4560;
    font-size: 0.75rem;
}

/* ── Stamps inline (in profile header) ──────────────────────────────────── */

.inv-profile-stamps-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.inv-stamp-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
}

.inv-stamp-inline__count {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: #6b7494;
}

/* ── Like button ─────────────────────────────────────────────────────────── */

.inv-profile-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 36px;
    padding: 0 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #c8cce8;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}

.inv-profile-like-btn:hover:not(:disabled) {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.06);
    color: #f87171;
    transform: translateY(-1px);
}

.inv-profile-like-btn.is-liked {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

.inv-profile-like-btn.is-liked .inv-like-icon {
    animation: inv-heart-pop 0.25s ease;
}

.inv-profile-like-btn.is-guest,
.inv-profile-like-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

@keyframes inv-heart-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.inv-like-icon {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.15s;
}

/* ── Follow button ───────────────────────────────────────────────────────── */

.inv-profile-follow-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 1.1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(245, 158, 11, 0.5);
    background: transparent;
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}

.inv-profile-follow-btn:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-1px);
}

.inv-profile-follow-btn.is-following {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #d97706;
}

/* ── Stamp CTA button ────────────────────────────────────────────────────── */

.inv-profile-stamp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 36px;
    padding: 0 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #c8cce8;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.inv-profile-stamp-btn:hover {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.05);
    transform: translateY(-1px);
}

.inv-profile-stamp-btn.has-stamp {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.07);
    color: #f59e0b;
}

/* ── Stamp count bar ─────────────────────────────────────────────────────── */

.inv-stamp-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
}

.inv-stamp-count-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
}

.inv-stamp-count-item__count {
    font-weight: 700;
    color: #f0f4ff;
    font-family: 'Rajdhani', sans-serif;
}

/* ── Stamp modal ─────────────────────────────────────────────────────────── */

.inv-stamp-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.inv-stamp-modal[hidden] {
    display: none;
}

.inv-stamp-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 26, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.inv-stamp-modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: inv-modal-in 0.2s ease;
}

@keyframes inv-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.inv-stamp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-stamp-modal__title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f0f4ff;
    margin: 0;
}

.inv-stamp-modal__close {
    background: none;
    border: none;
    color: #6b7494;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
    border-radius: 0.25rem;
}

.inv-stamp-modal__close:hover {
    color: #ef4444;
}

.inv-stamp-modal__body {
    padding: 1rem 1.25rem;
}

.inv-stamp-modal__subtitle {
    font-size: 0.72rem;
    color: #6b7494;
    margin: 0 0 0.85rem;
    line-height: 1.5;
}

.inv-stamp-modal__error {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.inv-stamp-modal__footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-stamp-modal__cancel {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #6b7494;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.45rem 1rem;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.inv-stamp-modal__cancel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: #c8cce8;
}

/* ── Stamp picker grid ───────────────────────────────────────────────────── */

.inv-stamp-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.inv-stamp-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem 0.4rem;
    border-radius: 0.6rem;
    border: 2px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    text-align: center;
}

.inv-stamp-option:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.04);
    transform: translateY(-2px);
}

.inv-stamp-option.is-selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.inv-stamp-option.is-premium {
    background: rgba(245, 158, 11, 0.02);
}

.inv-stamp-option__emoji {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
}

.inv-stamp-option__label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #c8cce8;
}

.inv-stamp-option__cost {
    font-size: 0.58rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

.inv-stamp-option__cost-free {
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inv-stamp-option__cost-premium {
    color: #f59e0b;
}

/* ── Who Stamped Me section ──────────────────────────────────────────────── */

.inv-who-stamped {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inv-who-stamped__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.6rem;
    flex-wrap: wrap;
}

.inv-who-stamped__user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    color: #c8cce8;
    transition: color 0.15s;
}

.inv-who-stamped__user:hover {
    color: #f59e0b;
}

.inv-who-stamped__username {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-who-stamped__stamp {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #f0f4ff;
    font-weight: 600;
    white-space: nowrap;
}

.inv-who-stamped__expires {
    font-size: 0.6rem;
    color: #3d4560;
    white-space: nowrap;
    margin-left: auto;
}

/* ── Toast notification ─────────────────────────────────────────────────── */

.inv-toast {
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #111827;
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f0f4ff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 0.6rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
}

.inv-toast.is-success {
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.inv-toast.is-error {
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.inv-toast.is-hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(0.5rem);
}

/* =============================================================================
   Skins Section — Visual Previews (Fix 5)
   ============================================================================= */

/* Card container */
.inv-skin-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.1s;
}

.inv-skin-card:hover {
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
}

.inv-skin-card--active {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Generic preview container */
.inv-skin-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Avatar frame preview */
.inv-skin-preview--frame {
    min-height: 96px;
}

.inv-skin-preview__avatar-bg {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-skin-preview__avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.inv-skin-preview__avatar-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2540, #0d1424);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #6b7494;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.inv-skin-preview__frame-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    pointer-events: none;
    z-index: 2;
}

/* Banner preview */
.inv-skin-preview--banner {
    min-height: 64px;
    padding: 0;
}

.inv-skin-preview__banner-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* Theme preview: colored swatch */
.inv-skin-preview--theme {
    min-height: 56px;
    border-radius: 0;
    flex-direction: column;
    gap: 0.25rem;
}

.inv-skin-preview--theme.inv-theme-swatch--dark {
    background: linear-gradient(135deg, #080d1a, #111827);
}

.inv-skin-preview--theme.inv-theme-swatch--gold {
    background: linear-gradient(135deg, #78350f, #d97706);
}

.inv-skin-preview--theme.inv-theme-swatch--blood {
    background: linear-gradient(135deg, #450a0a, #dc2626);
}

.inv-skin-preview--theme.inv-theme-swatch--invblue {
    background: linear-gradient(135deg, #0c1a6b, #3b82f6);
}

.inv-skin-preview__theme-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
}

/* Generic fallback */
.inv-skin-preview--generic {
    background: rgba(255, 255, 255, 0.02);
}

/* Equipped badge */
.inv-skin-equipped-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* =============================================================================
   Server / Kingdom Name — Inline Edit (Fix 6)
   ============================================================================= */

/* Edit icon button (pencil) */
.inv-server-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.75rem;
    line-height: 1;
    vertical-align: middle;
    opacity: 0.6;
    transition: opacity 0.15s;
    display: inline-block;
    min-width: 32px;
    min-height: 32px;
    text-align: center;
}

.inv-server-edit-btn:hover {
    opacity: 1;
}

/* "Add server" ghost button */
.inv-server-add-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #3d4560;
    font-size: 0.72rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.inv-server-add-btn:hover {
    color: #6b7494;
    text-decoration-color: #6b7494;
}

/* Edit field wrapper */
.inv-server-edit-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* Text input */
.inv-server-name-input {
    height: 30px;
    padding: 0 0.6rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
    color: #f0f4ff;
    font-size: 0.72rem;
    font-family: inherit;
    outline: none;
    min-width: 160px;
    max-width: 240px;
    transition: border-color 0.15s;
}

.inv-server-name-input:focus {
    border-color: #f59e0b;
}

.inv-server-name-input::placeholder {
    color: #3d4560;
}

/* Save button */
.inv-server-save-btn {
    height: 30px;
    padding: 0 0.75rem;
    border-radius: 0.4rem;
    border: none;
    background: #f59e0b;
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.inv-server-save-btn:hover {
    opacity: 0.85;
}

/* Cancel button */
.inv-server-cancel-btn {
    height: 30px;
    padding: 0 0.6rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: none;
    color: #6b7494;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.inv-server-cancel-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: #c8cce8;
}

/* Flash message below the edit field */
.inv-server-flash {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    margin-top: 0.2rem;
    width: 100%;
}

.inv-server-flash.is-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.inv-server-flash.is-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* =============================================================================
   Badge locked state (Fix 4)
   ============================================================================= */

.inv-badge-locked {
    opacity: 0.4;
}

/* =============================================================================
   Path to Warlord — Progress Cards
   ============================================================================= */

.inv-warlord-path {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    transition: border-color 0.15s;
}

.inv-warlord-path:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.inv-warlord-path--done {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.03);
}

.inv-warlord-path__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.inv-warlord-path__bar {
    height: 6px;
    border-radius: 3px;
    background: #1f2937;
    overflow: hidden;
}

.inv-warlord-path__fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #a855f7, #c084fc);
    transition: width 0.6s ease;
}

.inv-warlord-path__fill--glory {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* =============================================================================
   Profile Theme Overrides — applied via .inv-theme--{slug} on #inv-profile-page
   ============================================================================= */

/* ── Gold theme ──────────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--gold {
    --profile-accent: #d97706;
    --profile-bg: #0e0a04;
    --profile-card: #1a1005;
    --profile-border: rgba(217, 119, 6, 0.2);
}
#inv-profile-page.inv-theme--gold .bg-bg-siege {
    background: linear-gradient(180deg, var(--profile-bg) 0%, #120d02 50%, var(--profile-bg) 100%);
}
#inv-profile-page.inv-theme--gold .bg-bg-siege-secondary,
#inv-profile-page.inv-theme--gold .bg-\[#0d1424\] {
    background-color: var(--profile-card) !important;
    background-image: radial-gradient(circle at 30% 10%, rgba(217, 119, 6, 0.04) 0%, transparent 50%);
}
#inv-profile-page.inv-theme--gold .border-white\/5 {
    border-color: var(--profile-border) !important;
}
#inv-profile-page.inv-theme--gold .text-amber-flame,
#inv-profile-page.inv-theme--gold .bg-amber-flame {
    --tw-text-opacity: 1;
    color: var(--profile-accent);
}
#inv-profile-page.inv-theme--gold .bg-amber-flame {
    background-color: var(--profile-accent) !important;
    color:white;
}

/* ── Blood theme ─────────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--blood {
    --profile-accent: #dc2626;
    --profile-bg: #0d0404;
    --profile-card: #180808;
    --profile-border: rgba(220, 38, 38, 0.2);
}
#inv-profile-page.inv-theme--blood .bg-bg-siege {
    background: linear-gradient(180deg, var(--profile-bg) 0%, #120808 50%, var(--profile-bg) 100%);
}
#inv-profile-page.inv-theme--blood .bg-bg-siege-secondary,
#inv-profile-page.inv-theme--blood .bg-\[#0d1424\] {
    background-color: var(--profile-card) !important;
    background-image: radial-gradient(circle at 70% 80%, rgba(220, 38, 38, 0.04) 0%, transparent 50%);
}
#inv-profile-page.inv-theme--blood .border-white\/5 {
    border-color: var(--profile-border) !important;
}
#inv-profile-page.inv-theme--blood .text-amber-flame {
    color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--blood .bg-amber-flame {
    background-color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--blood .border-amber-flame {
    border-color: var(--profile-accent) !important;
}

/* ── Invictus Blue theme ─────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--invblue {
    --profile-accent: #3b82f6;
    --profile-bg: #03060e;
    --profile-card: #060d1c;
    --profile-border: rgba(59, 130, 246, 0.2);
}
#inv-profile-page.inv-theme--invblue .bg-bg-siege {
    background: linear-gradient(180deg, var(--profile-bg) 0%, #050d24 50%, var(--profile-bg) 100%);
}
#inv-profile-page.inv-theme--invblue .bg-bg-siege-secondary,
#inv-profile-page.inv-theme--invblue .bg-\[#0d1424\] {
    background-color: var(--profile-card) !important;
    background-image: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, transparent 40%);
}
#inv-profile-page.inv-theme--invblue .border-white\/5 {
    border-color: var(--profile-border) !important;
}
#inv-profile-page.inv-theme--invblue .text-amber-flame {
    color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--invblue .bg-amber-flame {
    background-color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--invblue .border-amber-flame {
    border-color: var(--profile-accent) !important;
}

/* ── Dark / Iron Fortress theme (default palette — minimal overrides) ────── */
#inv-profile-page.inv-theme--dark {
    --profile-accent: #f59e0b;
    --profile-bg: #080d1a;
    --profile-card: #111827;
    --profile-border: rgba(255, 255, 255, 0.05);
}

/* ── Dragon Throne theme ─────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--dragon {
    --profile-accent: #ef4444;
    --profile-bg: #0a0404;
    --profile-card: #140808;
    --profile-border: rgba(239, 68, 68, 0.15);
}
#inv-profile-page.inv-theme--dragon .bg-bg-siege {
    background: linear-gradient(180deg, #0a0404 0%, #120606 50%, #0a0404 100%);
}
#inv-profile-page.inv-theme--dragon .bg-bg-siege-secondary,
#inv-profile-page.inv-theme--dragon .bg-\[#0d1424\] {
    background-color: var(--profile-card) !important;
    background-image: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.05) 0%, transparent 60%);
}
#inv-profile-page.inv-theme--dragon .border-white\/5 {
    border-color: var(--profile-border) !important;
}
#inv-profile-page.inv-theme--dragon .text-amber-flame {
    color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--dragon .bg-amber-flame {
    background-color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--dragon .border-amber-flame {
    border-color: var(--profile-accent) !important;
}

/* ── Shadow Assassin theme ───────────────────────────────────────────────── */
#inv-profile-page.inv-theme--shadow {
    --profile-accent: #8b5cf6;
    --profile-bg: #050508;
    --profile-card: #0a0a12;
    --profile-border: rgba(139, 92, 246, 0.12);
}
#inv-profile-page.inv-theme--shadow .bg-bg-siege {
    background: linear-gradient(180deg, #050508 0%, #08081a 50%, #050508 100%);
}
#inv-profile-page.inv-theme--shadow .bg-bg-siege-secondary,
#inv-profile-page.inv-theme--shadow .bg-\[#0d1424\] {
    background-color: var(--profile-card) !important;
    background-image: linear-gradient(135deg, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
}
#inv-profile-page.inv-theme--shadow .border-white\/5 {
    border-color: var(--profile-border) !important;
}
#inv-profile-page.inv-theme--shadow .text-amber-flame {
    color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--shadow .bg-amber-flame {
    background-color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--shadow .border-amber-flame {
    border-color: var(--profile-accent) !important;
}

/* ── Ancient Kingdom theme ───────────────────────────────────────────────── */
#inv-profile-page.inv-theme--ancient {
    --profile-accent: #10b981;
    --profile-bg: #040a08;
    --profile-card: #081410;
    --profile-border: rgba(16, 185, 129, 0.12);
}
#inv-profile-page.inv-theme--ancient .bg-bg-siege {
    background: linear-gradient(180deg, #040a08 0%, #06120e 50%, #040a08 100%);
}
#inv-profile-page.inv-theme--ancient .bg-bg-siege-secondary,
#inv-profile-page.inv-theme--ancient .bg-\[#0d1424\] {
    background-color: var(--profile-card) !important;
    background-image: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
}
#inv-profile-page.inv-theme--ancient .border-white\/5 {
    border-color: var(--profile-border) !important;
}
#inv-profile-page.inv-theme--ancient .text-amber-flame {
    color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--ancient .bg-amber-flame {
    background-color: var(--profile-accent) !important;
}
#inv-profile-page.inv-theme--ancient .border-amber-flame {
    border-color: var(--profile-accent) !important;
}

/* ── Theme hero banner (dynamic — applied when --theme-hero-banner is set) ── */
#inv-profile-page .inv-hero-banner {
    background-image: var(--theme-hero-banner, none) !important;
    background-size: cover !important;
    background-position: center right !important;
    background-repeat: no-repeat !important;
}

/* ── Skin card — cursor + hover ──────────────────────────────────────────── */
.inv-skin-card {
    cursor: pointer;
}

/* =============================================================================
   Profile Header — Ambient theme gradient
   ============================================================================= */

/* Needs position:relative so the ::before pseudo-element can be absolute */
.inv-profile-header {
    position: relative;
    overflow: hidden;
}

/* Lift content above the gradient layer */
.inv-profile-header > * {
    position: relative;
    z-index: 1;
}

/* Gradient canvas — painted by theme classes */
.inv-profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* Covers top ~60% of the header; avatar/text sit in the lower half */
    height: 60%;
    pointer-events: none;
    z-index: 0;
}

/* ── Gold ──────────────────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--gold .inv-profile-header {
    background-color: #0e0b04 !important;
    border-bottom-color: rgba(217, 119, 6, 0.25) !important;
}
#inv-profile-page.inv-theme--gold .inv-profile-header::before {
    background: radial-gradient(
        ellipse 140% 120% at 50% -20%,
        rgba(217, 119, 6, 0.45) 0%,
        transparent 65%
    );
}
#inv-profile-page.inv-theme--gold .inv-profile-header h1 {
    text-shadow: 0 0 24px rgba(217, 119, 6, 0.55);
}

/* ── Blood ─────────────────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--blood .inv-profile-header {
    background-color: #0d0505 !important;
    border-bottom-color: rgba(220, 38, 38, 0.25) !important;
}
#inv-profile-page.inv-theme--blood .inv-profile-header::before {
    background: radial-gradient(
        ellipse 140% 120% at 50% -20%,
        rgba(220, 38, 38, 0.45) 0%,
        transparent 65%
    );
}
#inv-profile-page.inv-theme--blood .inv-profile-header h1 {
    text-shadow: 0 0 24px rgba(220, 38, 38, 0.55);
}

/* ── Invictus Blue ─────────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--invblue .inv-profile-header {
    background-color: #05080f !important;
    border-bottom-color: rgba(59, 130, 246, 0.25) !important;
}
#inv-profile-page.inv-theme--invblue .inv-profile-header::before {
    background: radial-gradient(
        ellipse 140% 120% at 50% -20%,
        rgba(59, 130, 246, 0.45) 0%,
        transparent 65%
    );
}
#inv-profile-page.inv-theme--invblue .inv-profile-header h1 {
    text-shadow: 0 0 24px rgba(59, 130, 246, 0.55);
}

/* ── Dragon Throne ────────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--dragon .inv-profile-header {
    background-color: #0a0404 !important;
    border-bottom-color: rgba(239, 68, 68, 0.25) !important;
}
#inv-profile-page.inv-theme--dragon .inv-profile-header::before {
    background: radial-gradient(
        ellipse 140% 120% at 50% -20%,
        rgba(239, 68, 68, 0.5) 0%,
        rgba(245, 158, 11, 0.15) 40%,
        transparent 70%
    );
}
#inv-profile-page.inv-theme--dragon .inv-profile-header h1 {
    text-shadow: 0 0 24px rgba(239, 68, 68, 0.6);
}

/* ── Shadow Assassin ──────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--shadow .inv-profile-header {
    background-color: #050508 !important;
    border-bottom-color: rgba(139, 92, 246, 0.2) !important;
}
#inv-profile-page.inv-theme--shadow .inv-profile-header::before {
    background: radial-gradient(
        ellipse 140% 120% at 50% -20%,
        rgba(139, 92, 246, 0.35) 0%,
        transparent 60%
    );
}
#inv-profile-page.inv-theme--shadow .inv-profile-header h1 {
    text-shadow: 0 0 24px rgba(139, 92, 246, 0.5);
}

/* ── Ancient Kingdom ──────────────────────────────────────────────────────── */
#inv-profile-page.inv-theme--ancient .inv-profile-header {
    background-color: #040a08 !important;
    border-bottom-color: rgba(16, 185, 129, 0.2) !important;
}
#inv-profile-page.inv-theme--ancient .inv-profile-header::before {
    background: radial-gradient(
        ellipse 140% 120% at 50% -20%,
        rgba(16, 185, 129, 0.35) 0%,
        transparent 60%
    );
}
#inv-profile-page.inv-theme--ancient .inv-profile-header h1 {
    text-shadow: 0 0 24px rgba(16, 185, 129, 0.5);
}

/* =============================================================================
   Follow List Modal
   ============================================================================= */

/* Clickable social stat buttons */
.inv-social-stat--clickable {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.15s;
}

.inv-social-stat--clickable:hover {
    opacity: 0.75;
}

.inv-social-stat--clickable:hover .inv-social-stat__count {
    text-decoration: underline;
}

/* Modal container */
.inv-follow-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.inv-follow-modal[hidden] {
    display: none;
}

.inv-follow-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 26, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.inv-follow-modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: inv-modal-in 0.2s ease;
}

.inv-follow-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.inv-follow-modal__title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f0f4ff;
    margin: 0;
}

.inv-follow-modal__close {
    background: none;
    border: none;
    color: #6b7494;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
    border-radius: 0.25rem;
}

.inv-follow-modal__close:hover {
    color: #ef4444;
}

.inv-follow-modal__body {
    padding: 0.75rem 1.25rem 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Loading spinner */
.inv-follow-modal__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    color: #6b7494;
    font-size: 0.75rem;
}

/* Empty state */
.inv-follow-modal__empty {
    text-align: center;
    padding: 2rem 0;
    color: #3d4560;
    font-size: 0.8rem;
}

/* User card row */
.inv-follow-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.inv-follow-user:last-child {
    border-bottom: none;
}

.inv-follow-user__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a2540, #0d1424);
}

.inv-follow-user__avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2540, #0d1424);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7494;
    flex-shrink: 0;
}

.inv-follow-user__info {
    flex: 1;
    min-width: 0;
}

.inv-follow-user__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #c8cce8;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.inv-follow-user__name:hover {
    color: #f59e0b;
}

.inv-follow-user__level {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7494;
    margin-top: 0.1rem;
}

.inv-follow-user__btn {
    flex-shrink: 0;
    height: 28px;
    padding: 0 0.75rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(245, 158, 11, 0.5);
    background: transparent;
    color: #f59e0b;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.inv-follow-user__btn:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.1);
}

.inv-follow-user__btn.is-following {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #d97706;
}

.inv-follow-user__btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Message button ─────────────────────────────────────────────────────────── */
.inv-profile-message-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 34px;
    padding: 0 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #c8cce8;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.inv-profile-message-btn:hover {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.35);
    color: #f59e0b;
    text-decoration: none;
}

/* =============================================================================
   Stellar Glory Card (v2.31.0)
   ============================================================================= */

.inv-stellar-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.15s;
}

.inv-stellar-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.inv-stellar-card__header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.inv-stellar-card__rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}

.inv-stellar-card__rank-num {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f59e0b;
    line-height: 1;
}

.inv-stellar-card__rank-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7494;
    margin-top: 0.15rem;
}

.inv-stellar-card__info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
}

.inv-stellar-card__server {
    font-size: 0.8rem;
    font-weight: 600;
    color: #c8cce8;
}

.inv-stellar-card__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.inv-stellar-card__total-val {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f0f4ff;
    line-height: 1;
}

.inv-stellar-card__total-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7494;
    margin-top: 0.15rem;
}

.inv-stellar-card__seasons {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .inv-stellar-card__seasons {
        grid-template-columns: repeat(3, 1fr);
    }
}

.inv-stellar-card__season {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.75rem 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.inv-stellar-card__season:last-child {
    border-right: none;
}

.inv-stellar-card__season-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3d4560;
}

.inv-stellar-card__season-pts {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #f0f4ff;
    line-height: 1;
}

.inv-stellar-card__season-pts--none {
    color: #3d4560;
}

.inv-stellar-card__pos {
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 1;
}

.inv-stellar-card__pos--grey {
    color: #3d4560;
}

.inv-stellar-card__pos--medal {
    font-weight: 800;
}

.inv-stellar-card__pos--1 { color: #fbbf24; }
.inv-stellar-card__pos--2 { color: #94a3b8; }
.inv-stellar-card__pos--3 { color: #d97706; }

.inv-stellar-card__footer {
    padding: 0.6rem 1.25rem;
    text-align: right;
}

.inv-stellar-card__link {
    font-size: 0.72rem;
    font-weight: 600;
    color: #f59e0b;
    text-decoration: none;
    transition: opacity 0.15s;
}

.inv-stellar-card__link:hover {
    opacity: 0.75;
}

/* =============================================================================
   Achievements Gallery (v2.31.0)
   ============================================================================= */

/* ── Add button ──────────────────────────────────────────────────────────────── */

.inv-ach-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding: 4px 12px;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 6px;
    color: #f59e0b;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.inv-ach-add-btn:hover,
.inv-ach-add-btn[aria-expanded="true"] {
    background: rgba(245,158,11,0.22);
    border-color: rgba(245,158,11,0.6);
}

/* ── View-all footer link ────────────────────────────────────────────────────── */

.inv-wc-ach-footer {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.inv-wc-ach-view-all {
    font-size: 0.75rem;
    color: #f59e0b;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.15s;
}

.inv-wc-ach-view-all:hover {
    color: #fbbf24;
    text-decoration: underline;
}

/* ── Achievements page filter tabs ───────────────────────────────────────────── */

.inv-ach-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.inv-ach-filter {
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.05);
    color: #9ca3af;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.inv-ach-filter:hover {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    border-color: rgba(245,158,11,0.3);
}

.inv-ach-filter.is-active {
    background: rgba(245,158,11,0.18);
    color: #f59e0b;
    border-color: rgba(245,158,11,0.5);
}

.inv-achievement-card[hidden] {
    display: none;
}

/* ── Upload form ─────────────────────────────────────────────────────────────── */

.inv-achievement-upload {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.15s;
}

.inv-achievement-upload:hover,
.inv-achievement-upload:focus-within {
    border-color: rgba(245, 158, 11, 0.35);
}

.inv-achievement-upload__fields {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.inv-achievement-upload__row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inv-achievement-input,
.inv-achievement-textarea,
.inv-achievement-select {
    height: 36px;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #f0f4ff;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}

.inv-achievement-textarea {
    height: auto;
    padding: 0.5rem 0.75rem;
    resize: vertical;
    min-height: 60px;
}

.inv-achievement-select {
    max-width: 140px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7494' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 1.75rem;
}

.inv-achievement-input:focus,
.inv-achievement-textarea:focus,
.inv-achievement-select:focus {
    border-color: rgba(245, 158, 11, 0.5);
}

.inv-achievement-input::placeholder,
.inv-achievement-textarea::placeholder {
    color: #3d4560;
}

.inv-achievement-file-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.inv-achievement-file-btn:hover {
    background: rgba(245, 158, 11, 0.1);
}

.inv-achievement-upload__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.inv-achievement-file-name {
    font-size: 0.68rem;
    color: #6b7494;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.inv-achievement-submit-btn {
    height: 36px;
    padding: 0 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: #f59e0b;
    color: #000;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.inv-achievement-submit-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.inv-achievement-submit-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Gallery grid ────────────────────────────────────────────────────────────── */

.inv-achievement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .inv-achievement-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .inv-achievement-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Achievement card ────────────────────────────────────────────────────────── */

.inv-achievement-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}

.inv-achievement-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.inv-achievement-card__img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.inv-achievement-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.inv-achievement-card__img:hover {
    transform: scale(1.03);
}

.inv-achievement-card__cat {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(245, 158, 11, 0.9);
    color: #000;
}

.inv-achievement-card__body {
    padding: 0.75rem 0.875rem;
}

.inv-achievement-card__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f0f4ff;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.inv-achievement-card__desc {
    font-size: 0.72rem;
    color: #6b7494;
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.inv-achievement-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.inv-achievement-card__date {
    font-size: 0.6rem;
    color: #3d4560;
}

.inv-achievement-delete-btn {
    background: none;
    border: none;
    color: #3d4560;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    line-height: 1;
    transition: color 0.15s;
    border-radius: 0.25rem;
}

.inv-achievement-delete-btn:hover {
    color: #ef4444;
}

/* ── Lightbox ────────────────────────────────────────────────────────────────── */

.inv-achievement-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 80px;
}

.inv-achievement-lightbox[hidden] { display: none; }

.inv-achievement-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 26, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.inv-achievement-lightbox__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
}

.inv-achievement-lightbox__img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: block;
}

.inv-achievement-lightbox__meta {
    text-align: center;
}

.inv-achievement-lightbox__title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: #e8c96a;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 4px;
}

.inv-achievement-lightbox__desc {
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: italic;
    margin: 0;
}

.inv-achievement-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    background: rgba(8, 13, 26, 0.7);
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: 50%;
    color: #c9a227;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.inv-achievement-lightbox__nav:hover { background: rgba(201, 162, 39, 0.15); }
.inv-achievement-lightbox__nav:disabled { opacity: 0.2; cursor: default; }
.inv-achievement-lightbox__nav--prev { left: 16px; }
.inv-achievement-lightbox__nav--next { right: 16px; }

/* ── Info toggle + collapsible panel ─────────────────────────────────────────── */

.inv-ach-info-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9a7a3a;
    padding: 6px 12px;
    border-radius: 20px;
    transition: color 0.15s, background 0.15s;
}
.inv-ach-info-toggle:hover {
    color: #e8c96a;
    background: rgba(201, 162, 39, 0.07);
}

.inv-ach-info-toggle__title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.inv-ach-info-toggle__chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.inv-ach-info-toggle[aria-expanded="true"] .inv-ach-info-toggle__chevron {
    transform: rotate(180deg);
}

.inv-ach-info-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 0;
    animation: achPanelOpen 0.2s ease;
}
.inv-ach-info-panel[hidden] { display: none; }

@keyframes achPanelOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Card fade-out animation for delete ──────────────────────────────────────── */

.inv-achievement-card.is-removing {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s, transform 0.3s;
}

/* ── Toggle switch ───────────────────────────────────────────────────────────── */

.inv-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

.inv-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.inv-toggle__slider {
    position: absolute;
    inset: 0;
    background: #2a2d45;
    border-radius: 22px;
    transition: background 0.2s;
}

.inv-toggle__slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    background: #6b7494;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.inv-toggle input:checked + .inv-toggle__slider {
    background: #22c55e33;
}

.inv-toggle input:checked + .inv-toggle__slider::before {
    transform: translateX(18px);
    background: #22c55e;
}

/* ── Profile / Settings Tabs ─────────────────────────────────────────── */
.inv-profile-tab {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 24px;
    color: #6b7494;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.inv-profile-tab:hover {
    color: #c8cce8;
}

.inv-profile-tab.is-active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
}

@media (max-width: 640px) {
    .inv-profile-tab {
        font-size: 0.7rem;
        padding: 12px 16px;
    }
}

/* ── Subscription Management ─────────────────────────────────────────── */

.inv-sub-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 8px;
    vertical-align: middle;
}

.inv-sub-badge--active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.inv-sub-badge--expired {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.inv-sub-badge--none {
    background: rgba(107, 116, 148, 0.15);
    color: #6b7494;
}

.inv-sub-history-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 64px;
    text-align: center;
}

.inv-sub-history--payment {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.inv-sub-history--expired {
    background: rgba(107, 116, 148, 0.12);
    color: #6b7494;
}

.inv-sub-history--cancelled {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.inv-sub-history--extended {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.inv-sub-history--admin {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.inv-sub-history--reactivated {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.inv-sub-history--retention_bonus {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.inv-sub-badge--cancelling {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.inv-sub-badge--expiring {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Cancel flow steps */
.inv-cancel-step {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.inv-cancel-step__inner {
    background: rgba(8, 13, 26, 0.6);
    border-radius: 12px;
    padding: 1.25rem;
}

.inv-cancel-perk {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #c8cce8;
}

.inv-cancel-perk__x {
    color: #ef4444;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.inv-cancel-stay-btn {
    display: inline-flex;
    align-items: center;
    height: 2.5rem;
    padding: 0 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: #f59e0b;
    color: #000;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.inv-cancel-stay-btn:hover {
    opacity: 0.8;
}

.inv-cancel-continue-btn {
    display: inline-flex;
    align-items: center;
    height: 2.5rem;
    padding: 0 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: transparent;
    color: #6b7494;
    border: 1px solid rgba(107, 116, 148, 0.3);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.inv-cancel-continue-btn:hover {
    color: #c8cce8;
    background: rgba(255, 255, 255, 0.05);
}

.inv-cancel-offer {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
}

.inv-cancel-reason__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.8rem;
    color: #c8cce8;
    cursor: pointer;
}

.inv-cancel-reason__option input[type="radio"] {
    accent-color: #f59e0b;
}

.inv-sub-reactivate {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
}

/* =============================================================================
   Profile Activity Feed
   ============================================================================= */

/* ═══ Profile Content Tabs ═══ */

.inv-profile-tabs-wrap {
    position: sticky;
    top: 56px;
    z-index: 100;
    background: var(--inv-bg, #080d1a);
    padding-top: 4px;
    margin-bottom: 16px;
    transition: top 0.3s ease, transform 0.3s ease;
}

.inv-profile-tabs-wrap.inv-nav-hidden {
    top: 0;
    transform: translateY(-100%);
}

.inv-mobile-menu-open .inv-profile-tabs-wrap {
    display: none;
}

.inv-profile-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0;
}

.inv-profile-tabs__btn {
    padding: 10px 20px;
    border: none;
    background: none;
    color: #6b7494;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
}

.inv-profile-tabs__btn:hover {
    color: #94a3b8;
}

.inv-profile-tabs__btn.is-active {
    color: #f59e0b;
}

.inv-profile-tabs__btn.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #f59e0b;
    border-radius: 2px 2px 0 0;
}

.inv-profile-tab-panel {
    display: none;
}

.inv-profile-tab-panel.is-active {
    display: block;
}

/* Lineups grid in tab */
.inv-profile-lineups-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

@media (max-width: 768px) {
    .inv-profile-tabs__btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

/* Profile Post Detail (inline) */
.inv-profile-post-detail {
    max-width: 680px;
}

.inv-profile-post-detail__back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    margin-bottom: 8px;
    border: none;
    background: none;
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inv-profile-post-detail__back:hover {
    color: #fbbf24;
}

.inv-profile-post-detail__comments {
    margin-top: 8px;
}

/* Profile Posts & Activity — tavern-like 2-column layout */
.inv-profile-tavern-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.inv-profile-tavern-layout__main {
    flex: 3;
    min-width: 340px;
    max-width: 680px;
}

.inv-profile-tavern-layout__main .inv-tavern-post {
    max-width: none;
}

.inv-profile-tavern-layout__main .inv-tavern-feed {
    max-width: none;
}

.inv-profile-tavern-layout__aside {
    flex: 2;
    min-width: 200px;
    max-width: 400px;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

@media (max-width: 768px) {
    .inv-profile-tavern-layout {
        flex-direction: column;
    }
    .inv-profile-tavern-layout__aside {
        display: none;
    }
}

/* Profile activity item in sidebar */
.inv-profile-activity-item {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    cursor: pointer;
}

.inv-profile-activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.inv-profile-activity-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.inv-profile-activity-item__action {
    font-size: 0.72rem;
    font-weight: 600;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inv-profile-activity-item__time {
    font-size: 0.65rem;
    color: #6b7494;
}

.inv-profile-activity-item__text {
    font-size: 0.78rem;
    color: #c8cce8;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.inv-profile-activity-item__context {
    font-size: 0.68rem;
    color: #6b7494;
    margin-top: 4px;
}

/* Inline post detail in profile */
.inv-profile-post-detail {
    margin-bottom: 14px;
}

.inv-profile-post-detail__back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    background: none;
    border: none;
    color: #f59e0b;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.03em;
}

.inv-profile-post-detail__back:hover {
    color: #fbbf24;
}

.inv-profile-activity-tabs {
    display: flex;
    gap: 4px;
}

.inv-profile-activity-tab {
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: none;
    color: #6b7494;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.inv-profile-activity-tab.is-active {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.inv-profile-activity-panel {
    display: none;
}

.inv-profile-activity-panel.is-active {
    display: block;
}

/* Post card — tavern-like full card */
.inv-profile-post {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.inv-profile-post__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.inv-profile-post__header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.inv-profile-post__info {
    display: flex;
    flex-direction: column;
}

.inv-profile-post__username {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e5e7eb;
}

.inv-profile-post__time {
    font-size: 0.7rem;
    color: #6b7494;
}

.inv-profile-post__bookmark-icon {
    margin-left: auto;
    font-size: 1.1rem;
    opacity: 0.6;
}

.inv-profile-post__content {
    font-size: 0.85rem;
    color: #e5e7eb;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 8px;
}

/* Quoted post */
.inv-profile-post__quoted {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 8px 0;
}

.inv-profile-post__quoted-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e5e7eb;
}

.inv-profile-post__quoted-header img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Images */
.inv-profile-post__images {
    display: grid;
    gap: 4px;
    margin: 8px 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.inv-profile-post__images--1 { grid-template-columns: 1fr; }
.inv-profile-post__images--2 { grid-template-columns: 1fr 1fr; }
.inv-profile-post__images--3 { grid-template-columns: 1fr 1fr; }

.inv-profile-post__images img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.inv-profile-post__images--1 img { height: 160px; }
.inv-profile-post__images--3 img:first-child { grid-row: 1 / 3; height: 100%; }

.inv-profile-post__images-more {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
}

/* Actions row */
.inv-profile-post__actions {
    display: flex;
    gap: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 8px;
    font-size: 0.78rem;
    color: #6b7494;
}

.inv-profile-post__actions span {
    cursor: default;
}

.inv-profile-post__view {
    margin-left: auto;
    color: #f59e0b;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.78rem;
}

.inv-profile-post__view:hover {
    text-decoration: underline;
}

/* ── Activity items (right column) ───── */
.inv-profile-activity-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: background 0.15s;
}

.inv-profile-activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.inv-profile-activity-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.inv-profile-activity-item__action {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.inv-profile-activity-item__time {
    font-size: 0.68rem;
    color: #6b7494;
}

.inv-profile-activity-item__text {
    font-size: 0.8rem;
    color: #e5e7eb;
    line-height: 1.4;
    margin-bottom: 4px;
}

.inv-profile-activity-item__context {
    font-size: 0.7rem;
    color: #6b7494;
    font-style: italic;
}

/* Load More */
.inv-profile-load-more {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    background: rgba(245, 158, 11, 0.06);
    color: #f59e0b;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.inv-profile-load-more:hover {
    background: rgba(245, 158, 11, 0.12);
}

/* =============================================================================
   WAR CHRONICLE — Medieval Book Achievements Page
   ============================================================================= */

/* ── Atmospheric background ─────────────────────────────────────────────────── */

.inv-ach-tome-bg {
    min-height: 100vh;
    padding-top: 56px;
    padding-bottom: 60px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(15, 10, 2, 0.9) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 80%, rgba(10, 5, 30, 0.6) 0%, transparent 50%),
        #080d1a;
}

.inv-ach-tome-back {
    max-width: 900px;
    margin: 0 auto 6px;
    padding: 0 16px;
}

.inv-ach-tome-back a {
    font-size: 0.8rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s;
}

.inv-ach-tome-back a:hover { color: #fff; }

.inv-ach-tome-upload-wrap {
    max-width: 900px;
    margin: 0 auto 8px;
    padding: 0 16px;
}

/* ── Tome notfound ──────────────────────────────────────────────────────────── */

.inv-ach-tome-notfound {
    text-align: center;
    padding: 80px 16px;
    color: #9ca3af;
}

.inv-ach-tome-notfound__icon { font-size: 3rem; margin-bottom: 12px; }
.inv-ach-tome-notfound h1 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
}

/* ── Chronicle header (above book) ─────────────────────────────────────────── */

.inv-ach-viewer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto 10px;
    max-width: 960px;
    padding: 0 16px;
}

.inv-ach-viewer-header__ornament {
    color: #c9a227;
    font-size: 1rem;
    opacity: 0.7;
}

.inv-ach-viewer-header__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.inv-ach-viewer-header__username {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #e8c96a;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 20px rgba(201,162,39,0.3);
}

.inv-ach-viewer-header__sub {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: #9a7a3a;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

/* ── Filter pills (viewer style) ───────────────────────────────────────────── */

.inv-ach-viewer-filters {
    max-width: 600px;
    margin: 0 auto 14px;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

/* ── THE BOOK VIEWER ────────────────────────────────────────────────────────── */

.inv-ach-viewer {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 0;
    aspect-ratio: 1834 / 1111;
    overflow: hidden;
}

/* Book background image — fills viewer exactly, natural proportions */
.inv-ach-viewer__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
}

/* Nav arrows overlaid on the book */
.inv-ach-nav-btn--prev,
.inv-ach-nav-btn--next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}
.inv-ach-nav-btn--prev { left: 1%; }
.inv-ach-nav-btn--next { right: 1%; }

.inv-ach-nav-indicator {
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #9a7a3a;
    letter-spacing: 0.1em;
    min-width: 60px;
    text-align: center;
}

/* Parchment zones — calibrated via ?calibrate=1 tool */
.inv-ach-viewer__page--left {
    position: absolute;
    top: 7%;
    bottom: 22%;
    left: 14%;
    right: 52%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: opacity 0.25s ease;
}

.inv-ach-viewer__page--right {
    position: absolute;
    top: 7%;
    bottom: 22%;
    left: 52%;
    right: 11%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: opacity 0.25s ease;
}

.inv-ach-viewer.is-turning .inv-ach-viewer__page--left,
.inv-ach-viewer.is-turning .inv-ach-viewer__page--right {
    opacity: 0;
    transition: opacity 0.18s ease;
}

/* Page image area */
.inv-ach-viewer__page-img {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.inv-ach-viewer__page-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    mix-blend-mode: multiply;
    opacity: 0.92;
    filter: saturate(var(--ach-saturate, 1)) brightness(var(--ach-brightness, 1)) sepia(0.08);
    cursor: zoom-in;
    transition: opacity 0.25s;
}
.inv-ach-viewer__page-img img:hover { opacity: 1; }

/* Title + meta strip at page bottom */
.inv-ach-viewer__page-strip {
    flex-shrink: 0;
    padding: 4px 6px 3px;
    background: rgba(235,216,168,0.92);
    border-top: 1px solid rgba(150,100,30,0.25);
}
.inv-ach-viewer__page-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.55rem, 1.1vw, 0.78rem);
    font-weight: 700;
    color: #3a2200;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-bottom: 2px;
}
.inv-ach-viewer__page-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.inv-ach-viewer__page-date {
    font-size: clamp(0.48rem, 0.85vw, 0.62rem);
    color: #7a5220;
    font-style: italic;
}

/* Category badge */
.inv-ach-viewer__cat {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(0.48rem, 0.85vw, 0.62rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a5a1a;
    background: rgba(201,162,39,0.15);
    padding: 1px 5px;
    border-radius: 2px;
}

/* Delete button in page strip */
.inv-ach-viewer__delete {
    background: none;
    border: none;
    color: rgba(100,50,20,0.4);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.inv-ach-viewer__delete:hover { color: #b91c1c; }

/* Wear texture overlay — driven by --ach-wear-opacity set by JS */
.inv-ach-viewer__wear {
    position: absolute;
    top: 7%;
    bottom: 22%;
    left: 14%;
    right: 11%;
    pointer-events: none;
    background-image: url('../images/ach-wear.jpg');
    background-size: cover;
    background-position: center;
    mix-blend-mode: multiply;
    opacity: var(--ach-wear-opacity, 0);
    transition: opacity 1.2s ease;
    border-radius: 2px;
}

.inv-ach-viewer__no-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #c9a227;
    opacity: 0.3;
}

/* ── Nav buttons ────────────────────────────────────────────────────────────── */

.inv-ach-nav-btn {
    width: 44px;
    height: 44px;
    background: rgba(8,13,26,0.6);
    border: 1px solid rgba(201,162,39,0.4);
    border-radius: 50%;
    color: #c9a227;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.inv-ach-nav-btn:hover:not(:disabled) {
    background: rgba(201,162,39,0.18);
    border-color: rgba(201,162,39,0.7);
}
.inv-ach-nav-btn:disabled { opacity: 0.2; cursor: default; }

/* Zone C filter bar */
.inv-ach-filter-bar {
    width: 100%;
    max-width: 900px;
    margin: 8px auto 0;
    padding: 0 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.inv-ach-filter-bar__pills {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.inv-ach-filter-bar__count {
    font-size: 0.7rem;
    color: #6b7494;
}
.inv-ach-filter-bar__count strong {
    color: #c8cce8;
}

@media (max-width: 640px) {
    .inv-ach-nav-btn { width: 36px; height: 36px; }
    .inv-ach-nav-btn--prev { left: 0.5%; }
    .inv-ach-nav-btn--next { right: 0.5%; }
    .inv-ach-nav-indicator { font-size: 0.75rem; bottom: 5%; }
    /* Single page on mobile — hide right, center left */
    .inv-ach-viewer__page--right { display: none; }
    .inv-ach-viewer__page--left { left: 14%; right: 14%; }
}

/* ── Earned Badges in Hero Name Row ─────────────────────────────────────────── */

.inv-profile-earned-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    vertical-align: middle;
    line-height: 1;
    cursor: default;
    overflow: hidden;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.inv-profile-earned-badge:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.6);
}

/* Tooltip on data-tooltip attribute */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e2740;
    color: #e2e8f0;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid rgba(245,158,11,0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: 0;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ── Badge Manage List (Edit Mode) ───────────────────────────────────────────── */

.inv-badge-manage-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 4px;
}

.inv-badge-manage-row__drag {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.inv-badge-manage-move {
    background: none;
    border: none;
    color: #6b7494;
    cursor: pointer;
    font-size: 8px;
    padding: 1px 3px;
    line-height: 1;
    border-radius: 3px;
}

.inv-badge-manage-move:hover {
    color: #f59e0b;
    background: rgba(245,158,11,0.1);
}

.inv-badge-manage-row__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 1;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.inv-badge-manage-row__name {
    flex: 1;
    font-size: 11px;
    color: #c8cce8;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
}

.inv-badge-manage-toggle {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.4;
    padding: 2px 4px;
    border-radius: 4px;
    transition: opacity 0.15s;
}

.inv-badge-manage-toggle.is-visible {
    opacity: 1;
}

.inv-badge-manage-toggle:hover {
    opacity: 1;
    background: rgba(255,255,255,0.06);
}
