/* =============================================================================
   DASHBOARD STYLES
   ============================================================================= */

/* =============================================================================
   LOG LIST & ACTIVITY FEED
   ============================================================================= */

.log-list { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.log-item { padding: 10px 0; border-bottom: 1px solid var(--border-dark); display: flex; align-items: center; gap: 12px; }
.log-item:last-child { border-bottom: none; }
.log-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: 1; text-align: center; }
.log-text { font-size: 0.9rem; color: #ddd; line-height: 1.4; text-align: center; }
.log-text-highlight { color: var(--gold); font-weight: 700; text-shadow: 0 0 8px rgba(255,215,0,0.2); }
.log-text-levelup { color: #4fc3f7; font-weight: 600; }
.log-text-levelup .log-skill-name { color: #fff; font-weight: 700; }
.log-text-quest { color: #a855f7; font-weight: 600; }
.log-text-quest .log-quest-name { color: #c084fc; font-weight: 700; }
.log-text-boss { color: #ef4444; font-weight: 600; }
.log-text-xp { color: #22c55e; font-weight: 600; }
.log-text-music { color: #f59e0b; font-weight: 600; }
.log-text-join { color: #4caf50; font-weight: 600; }
.log-text-leave { color: #f44336; font-weight: 600; }
.log-text-rank { color: #ff9800; font-weight: 600; }
.log-clan-name { color: #4fc3f7; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color 0.2s; }
.log-clan-name:hover { text-decoration-color: #4fc3f7; }
.log-rank { color: var(--gold); font-weight: 700; }
.log-rank-promoted { color: #4caf50; }
.log-rank-demoted { color: #f44336; }
.clan-history-icon { width: 28px; height: 28px; background: transparent; border: none; padding: 0; }
.log-level-badge { background: linear-gradient(135deg, #2196f3, #1976d2); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 12px; border-radius: 4px; white-space: nowrap; display: inline-block; }
.log-levelup-container { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.log-levelup-container .log-text-levelup { font-size: 0.9rem; }
.log-levelup-container .log-skill-name { color: #fff; font-weight: 700; }
.log-levelup-wrapper { flex: 1; display: flex; justify-content: center; }
.log-item > .log-date { font-size: 0.7rem; color: #666; white-space: nowrap; flex-shrink: 0; }
.log-placeholder { color: #555; font-style: italic; text-align: center; padding: 20px 0; font-size: 0.9rem; }

/* Reusable inline loading row with a small spinner — used in any container
   that's awaiting async data (quest list, activity log, clan info, XP tracker, etc.) */
.loading-with-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 0;
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
}
.loading-with-spinner::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 152, 0, 0.18);
    border-top-color: var(--accent, #ff9800);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
/* Inline (single line) variant for header text like "Loading clan info..." */
.loading-inline-spinner::before {
    content: '';
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(255, 152, 0, 0.2);
    border-top-color: var(--accent, #ff9800);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 7px;
    vertical-align: -1px;
}

/* =============================================================================
   HIGHLIGHTS & CAPE GOALS
   ============================================================================= */

.highlights-container { display: flex; flex-direction: column; gap: 12px; }
.highlight-card { background: var(--bg-dropdown); border: 1px solid var(--border-dark); border-radius: 8px; padding: 15px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.highlight-label { font-size: 0.7rem; color: #888; text-transform: uppercase; font-weight: 700; margin-bottom: 5px; }
.highlight-content { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.highlight-sub { font-size: 0.75rem; color: var(--accent); }
.cape-goals-wrapper { display: flex; flex-direction: column; gap: 12px; animation: fadeInUp 0.4s ease-out; }
.cape-progress-card { display: flex; flex-direction: column; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; text-decoration: none; transition: 0.2s; cursor: pointer; }
.cape-progress-card:hover { background: var(--bg-dropdown); border-color: var(--border-light); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.rtm-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: #fff; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.rtm-pct { color: #888; font-feature-settings: "tnum"; }
.rtm-progress-track { width: 100%; height: 6px; background: #000; border-radius: 3px; overflow: hidden; border: 1px solid var(--border-dark); margin-bottom: 6px; }
.rtm-progress-fill { height: 100%; background: #4fc3f7; width: 0%; transition: width 1s ease-out; box-shadow: 0 0 8px rgba(79,195,247,0.4); }
.rtm-sub-text { font-size: 0.65rem; color: #666; font-style: italic; }

/* =============================================================================
   SKILLS GRID & CARDS
   ============================================================================= */

.skills-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 8px; 
    padding: 12px; 
    justify-items: center;
    align-content: flex-start; 
    flex: 1; 
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}
.skills-grid .skill-card-detailed {
    width: 100%;
    max-width: 130px;
}
.skill-card-detailed { 
    background: var(--bg-dropdown); 
    border: 1px solid var(--border-dark); 
    padding: 10px; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    transition: 0.2s; 
    min-height: 105px; 
    position: relative;
    box-sizing: border-box;
    gap: 4px;
}
.skill-card-detailed:hover { background: var(--border-dark); border-color: var(--border-light); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.skill-card-detailed.maxed { border-color: var(--accent); background: linear-gradient(135deg, var(--bg-dropdown) 0%, var(--bg-card) 100%); box-shadow: 0 0 15px color-mix(in srgb, var(--accent) 15%, transparent); }
.skill-card-detailed.maxed:hover { border-color: var(--accent-hover); box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 30%, transparent); background: var(--bar-bg); }
.skill-card-detailed.maxed .skill-lvl { color: var(--accent-hover); text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 40%, transparent); }
.skill-card-detailed.maxed .skill-progress-fill { background: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.skill-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2px; flex-shrink: 0; }
.skill-values { text-align: right; }
.skill-lvl { font-size: 1.2rem; font-weight: 700; color: #fff; line-height: 1; }
.skill-lvl.virtual { color: #bb86fc; text-shadow: 0 0 10px rgba(187,134,252,0.3); }
.skill-rank { font-size: 0.68rem; color: #666; margin-top: 2px; }
.skill-progress-track { width: 100%; height: 4px; background: #000; border-radius: 4px; margin-bottom: 2px; overflow: hidden; flex-shrink: 0; }
.skill-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.skill-icon-lg { width: 24px; height: 24px; flex-shrink: 0; }
/* Hide inline tooltip - using JS popup instead */
.skill-tooltip {
    display: none !important;
}
.skill-card-detailed .skill-card-bot { display: flex; flex-direction: column; gap: 1px; margin-top: auto; flex-shrink: 0; }
.skill-card-detailed .skill-xp-text { font-size: 0.72rem; color: #aaa; white-space: nowrap; line-height: 1.2; }
.skill-card-detailed .skill-next-text { color: #888; font-size: 0.65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }

/* =============================================================================
   SKILL POPUP TOOLTIP
   ============================================================================= */

/* Floating skill popup tooltip - follows mouse diagonally to the right */
.skill-popup-tooltip {
    position: fixed;
    display: none;
    background: rgba(10, 10, 15, 0.97);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 16px;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7), 0 0 20px rgba(102, 126, 234, 0.15);
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    animation: tooltipFadeIn 0.15s ease;
}
.skill-popup-tooltip.visible {
    display: flex;
}
.skill-popup-tooltip .st-name {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 2px;
}
.skill-popup-tooltip .st-row {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    font-size: 0.9rem;
    color: #aaa;
}
.skill-popup-tooltip .st-val {
    color: #fff;
    font-weight: 700;
}
@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   CLAN TABLE
   ============================================================================= */

.clan-table-wrapper { overflow-x: auto; }
.clan-table { width: 100%; border-collapse: collapse; min-width: 800px; table-layout: fixed; }
.clan-table th { 
    text-align: left; 
    padding: 10px 8px; 
    color: #666; 
    font-size: 0.75rem; 
    border-bottom: 1px solid var(--border-color); 
    text-transform: uppercase;
    position: relative;
    user-select: none;
    border-right: 1px solid var(--border-dark);
}
.clan-table th:last-child { border-right: none; }
.clan-table th.xp-col { text-align: center; color: var(--green); }
.clan-table td { 
    padding: 10px 8px; 
    color: #ccc; 
    border-bottom: 1px solid var(--border-dark); 
    font-size: 0.85rem;
    border-right: 1px solid var(--bg-dropdown);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.clan-table td:last-child { border-right: none; }
.clan-table tr { cursor: pointer; transition: 0.2s; }
.clan-table tr:hover { background: rgba(255,255,255,0.05); }
.clan-table tr:last-child td { border-bottom: none; }

/* =============================================================================
   CLAN TABLE DRAG & RESIZE
   ============================================================================= */

/* Draggable column headers */
.clan-table th.draggable {
    cursor: grab;
}
.clan-table th.draggable:active {
    cursor: grabbing;
}
.clan-table th.dragging {
    opacity: 0.5;
    background: rgba(255, 200, 87, 0.1);
}
.clan-table th.drag-over {
    background: rgba(255, 200, 87, 0.2);
    border-left: 2px solid var(--accent);
}

/* Column resize handle */
.col-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
    z-index: 10;
}
.col-resize-handle:hover,
.col-resize-handle.resizing {
    background: var(--accent);
}

/* =============================================================================
   TABLE CONFIG BAR
   ============================================================================= */

.table-config-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    margin: 0 12px 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    font-size: 0.68rem;
}
.config-hint {
    color: #555;
}
.reset-columns-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: 0.2s;
}
.reset-columns-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.xp-gain-cell { text-align: center; font-size: 0.8rem; font-weight: 600; }
.loading-xp { color: #444; font-style: italic; }
.clan-info-line { font-size: 0.9rem; color: #aaa; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.03); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.clan-link { color: var(--blue); text-decoration: none; font-weight: 600; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.clan-link:hover { color: #fff; text-decoration: underline; }
.clan-rank { color: #666; font-size: 0.8rem; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; text-transform: capitalize; }
.rank-loading { color: #555; font-style: italic; font-size: 0.75rem; }

/* =============================================================================
   CLAN PODIUMS
   ============================================================================= */

.clan-podiums-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 10px 0 30px; }
.podium-group { background: var(--bg-input); border: 1px solid var(--border-dark); border-radius: 12px; padding: 15px; display: flex; flex-direction: column; }
.podium-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; font-size: 1rem; font-weight: 700; color: #888; text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid var(--border-dark); }
.podium-grid { display: flex; gap: 10px; justify-content: center; align-items: flex-end; flex: 1; }
.podium-card { flex: 1; display: flex; flex-direction: column; align-items: center; background: var(--bg-dropdown); padding: 10px; border-radius: 8px; text-align: center; position: relative; border: 1px solid var(--border-color); transition: 0.2s; cursor: pointer; }
.podium-card.rank-1 { order: 2; border-color: var(--gold); background: linear-gradient(to bottom,#252210,#1a1a1a); height: 100%; min-height: 140px; }
.podium-card.rank-2 { order: 1; border-color: #c0c0c0; background: linear-gradient(to bottom,#1f1f1f,#1a1a1a); height: 90%; margin-top: 10px; }
.podium-card.rank-3 { order: 3; border-color: #cd7f32; background: linear-gradient(to bottom,#241c15,#1a1a1a); height: 85%; margin-top: 15px; }
.medal-icon { font-size: 1.5rem; margin-bottom: 5px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.podium-avatar { width: 40px; height: 40px; border-radius: 50%; margin-bottom: 8px; border: 2px solid transparent; }
.rank-1 .podium-avatar { border-color: var(--gold); width: 50px; height: 50px; }
.rank-2 .podium-avatar { border-color: #c0c0c0; }
.rank-3 .podium-avatar { border-color: #cd7f32; }
.podium-name { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.podium-val { font-size: 0.75rem; color: #bbb; font-variant-numeric: tabular-nums; }
.rank-1 .podium-val { color: var(--gold); font-weight: 600; }

/* =============================================================================
   CLAN CONTROLS & HEADER BANNER
   ============================================================================= */

.clan-controls { display: flex; gap: 15px; margin-bottom: 15px; }
#clan-filter-input { background: var(--bg-input); border: 1px solid var(--border-color); padding: 8px 12px; color: #fff; border-radius: 6px; font-size: 0.9rem; width: 250px; transition: 0.2s; }
#clan-filter-input:focus { border-color: var(--accent); outline: none; }
.sortable-header { cursor: pointer; user-select: none; transition: 0.2s; }
.sortable-header:hover { color: #fff; }
.sort-icon { font-size: 0.7rem; margin-left: 4px; color: var(--accent); }

.clan-header-banner { background: linear-gradient(135deg,#1a1a1a 0%,#0f0f0f 100%); border-bottom: 1px solid var(--border-color); padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 25px; position: relative; overflow: hidden; width: 100%; }
.clan-name-title { font-size: 3.2rem; font-weight: 900; text-transform: uppercase; letter-spacing: 4px; margin: 0; text-align: center; background: linear-gradient(90deg,#bb86fc 0%,#4fc3f7 25%,#fff 50%,#4fc3f7 75%,#bb86fc 100%); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: mythicPulse 4s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(79,195,247,0.6)) drop-shadow(0 0 20px rgba(187,134,252,0.4)); will-change: filter, background-position; }
.clan-stats-pills { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; width: 100%; }
.stat-pill-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50px; padding: 10px 24px; display: flex; align-items: center; gap: 12px; transition: 0.2s; backdrop-filter: blur(5px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.stat-pill-box:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.stat-pill-box.xp { border-left: 3px solid var(--purple); }
.stat-pill-box.members { border-left: 3px solid var(--blue); }
.stat-pill-box.avg { border-left: 3px solid var(--green); }
.stat-pill-box.kills { border-left: 3px solid var(--urgent-red); }
.pill-label { font-size: 0.7rem; color: #888; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.pill-val { font-size: 1.1rem; color: #fff; font-weight: 700; font-feature-settings: "tnum"; }

/* =============================================================================
   PANEL HEADERS
   ============================================================================= */

.panel-header { padding: 18px 20px; background: linear-gradient(180deg,#161616 0%,#111 100%); border-bottom: 1px solid var(--border-color); font-size: 0.85rem; font-weight: 800; color: #888; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 5; border-radius: 12px 12px 0 0; }
.panel-header::before { content: ''; width: 4px; height: 14px; background: var(--accent); border-radius: 2px; display: block; }

/* =============================================================================
   ACHIEVEMENTS
   ============================================================================= */

.achievement-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 15px; }
.ach-item { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 8px; padding: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; transition: 0.3s; position: relative; overflow: hidden; }
.ach-item img { filter: grayscale(100%) contrast(0.8); opacity: 0.4; transition: 0.4s cubic-bezier(0.175,0.885,0.32,1.275); transform: scale(1); padding-bottom: 10px; }
.ach-item.unlocked { border-color: var(--accent); background: radial-gradient(circle at center,#222 0%,#111 100%); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.ach-item.unlocked img { filter: none; opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(255,152,0,0.5)); }
.ach-label { position: absolute; bottom: 0; font-size: 0.55rem; font-weight: 700; color: #ccc; text-transform: uppercase; width: 100%; text-align: center; background: rgba(0,0,0,0.8); padding: 2px 0; border-radius: 0 0 6px 6px; letter-spacing: 0.5px; }
.ach-item.unlocked .ach-label { color: var(--accent); background: rgba(0,0,0,0.6); }

/* =============================================================================
   MODALS & AUTH
   ============================================================================= */

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 2000; display: flex; justify-content: center; align-items: center; animation: popIn 0.3s; }
.modal-content { background: var(--bg-card); border: 1px solid var(--border-color); width: 100%; border-radius: 12px; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
/* Compact popups only — wide tool modals set their own size in new-features.css */
.modal-content:not(.drop-calc-content):not(.arch-calc-content):not(.mqc-tracker-content):not(.cc-tracker-content):not(.skill-calc-content):not(.heatmap-modal-content):not(.suggestions-modal-content):not(.boss-log-content):not(.clog-content):not(.achievements-content):not(.forum-compose-modal) {
    max-width: 380px;
    padding: 25px;
}
.modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; color: #666; font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: #fff; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.auth-tab { flex: 1; background: none; border: none; padding: 10px; color: #888; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: 0.2s; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.input-group { margin-bottom: 15px; display: flex; flex-direction: column; gap: 5px; }
.input-group label { font-size: 0.8rem; color: #888; font-weight: 600; text-transform: uppercase; }
.input-group input { background: var(--bg-input); border: 1px solid var(--border-color); padding: 10px; border-radius: 6px; color: #fff; outline: none; transition: 0.2s; }
.input-group input:focus { border-color: var(--accent); }
.submit-btn { width: 100%; background: var(--accent); color: #000; font-weight: 700; padding: 12px; border: none; border-radius: 6px; cursor: pointer; margin-top: 10px; transition: 0.2s; }
.submit-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.error-text { color: var(--urgent-red); font-size: 0.85rem; margin-bottom: 10px; min-height: 1rem; text-align: center; }

/* =============================================================================
   LOGIN & USER BUTTONS
   ============================================================================= */

.login-btn { background: var(--border-dark); border: 1px solid var(--border-color); color: #ddd; padding: 6px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; transition: 0.2s; }
.login-btn:hover { border-color: var(--accent); color: #fff; }
.user-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; color: #ddd; font-weight: 600; transition: 0.2s; }
.user-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--border-light); }
.user-menu-container { position: relative; }

/* =============================================================================
   USER PROFILE MODAL
   ============================================================================= */

.profile-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-dark);
    background: var(--bg-dropdown);
}

.profile-modal-title {
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-sub);
}

.profile-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-header-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-main);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.profile-header-btn:hover {
    border-color: var(--border-light);
    background: rgba(255,255,255,0.08);
}

/* Override base modal close positioning for profile header */
.profile-modal-content .modal-close {
    position: static;
    top: auto;
    right: auto;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0 6px;
}

.profile-banner {
    height: 160px;
    background: var(--bg-dropdown);
    border-bottom: 1px solid var(--border-dark);
    background-size: cover;
    background-position: center;
}

.profile-banner.has-image {
    background-color: var(--bg-dropdown);
}

.profile-top {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    padding: 0 18px 14px;
    margin-top: -44px;
}

.profile-avatar-wrap {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    border: 3px solid var(--bg-card);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    background: transparent;
}

.profile-identity {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.profile-name {
    font-size: 1.05rem;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-meta {
    color: var(--text-sub);
    font-size: 0.85rem;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-display-name {
    font-weight: 800;
    color: var(--text-main);
}

.profile-meta-dim {
    color: var(--text-muted);
}

.profile-statusline {
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 6px;
    word-break: break-word;
}

.profile-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-sub);
    font-weight: 800;
    font-size: 0.75rem;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    background: rgba(255,255,255,0.02);
}

.profile-tab-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dark);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 800;
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.profile-tab-btn:hover {
    border-color: var(--border-light);
}

.profile-tab-btn.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.profile-body {
    padding: 14px 18px 18px;
    overflow: auto;
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.active {
    display: block;
}

.profile-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
}

.profile-section-title {
    color: var(--text-sub);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.profile-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.profile-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.profile-k {
    color: var(--text-sub);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 0 0 auto;
}

.profile-v {
    color: var(--text-main);
    text-align: right;
    flex: 1 1 auto;
}

.profile-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-main);
    font-weight: 900;
    font-size: 0.75rem;
}

.profile-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    padding: 8px 10px;
    border-radius: var(--radius-full);
}

.profile-link:hover {
    color: var(--accent-hover);
    border-color: rgba(255,255,255,0.12);
}

.profile-link-muted {
    color: var(--text-sub);
    border-color: rgba(255,255,255,0.04);
}

.profile-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 900;
    font-size: 0.75rem;
}

.profile-status-pill.status-active {
    border-color: rgba(76,175,80,0.35);
}

.profile-status-pill.status-idle {
    border-color: rgba(255,152,0,0.35);
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.profile-showcase-card {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: var(--transition-fast);
    min-height: 76px;
}

.profile-showcase-card:hover {
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
}

.profile-showcase-title {
    font-weight: 900;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-showcase-url {
    color: var(--text-sub);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-showcase-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-showcase-edit-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px;
}

.profile-form-grid textarea.style-input {
    min-height: 110px;
    resize: vertical;
}

.profile-char {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 6px;
}

.profile-form-actions {
    margin-top: 12px;
}

.profile-privacy-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-privacy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.profile-privacy-label {
    font-weight: 900;
    color: var(--text-main);
}

.profile-privacy-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Reusable: makes names/avatars clickable without button chrome */
.profile-link-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    margin: -2px -4px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    overflow: visible;
    border-radius: 4px;
}

.profile-link-btn:hover {
    filter: brightness(1.08);
}

/* =============================================================================
   PROFILE RESPONSIVE
   ============================================================================= */

@media (max-width: 700px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    .profile-top {
        align-items: center;
        margin-top: -36px;
    }
    .profile-showcase-grid {
        grid-template-columns: 1fr;
    }
    .profile-showcase-edit-row {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   ROTATIONS CARD � keep size stable when hiding rows
   ============================================================================= */

#rotations-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
    min-height: 0;
    overflow: visible;
}

#rotations-card {
    --rot-card-height: 590px;
    align-items: stretch;
    overflow: hidden;
    height: var(--rot-card-height);
    min-height: var(--rot-card-height);
    background:
        linear-gradient(135deg, rgba(255,152,0,0.055), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.035), transparent 38%),
        var(--bg-card);
}

#rotations-card .card-title {
    align-self: center;
    justify-content: center;
    margin-bottom: 12px;
    letter-spacing: 0.12em;
    text-shadow: 0 0 16px rgba(255,152,0,0.16);
}

#rotations-card .rot-row {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 58px;
    gap: 14px;
    isolation: isolate;
    min-height: 0;
    min-height: 58px;
    padding: 8px 14px 8px 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.065);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
        rgba(0,0,0,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

#rotations-card .rot-row:nth-last-child(-n + 2) {
    flex-basis: 80px;
    min-height: 80px;
}

#rotations-card .rot-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: transparent;
    transition: background var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

#rotations-card .rot-row::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255,152,0,0.06), transparent 38%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

#rotations-card .rot-row:hover {
    border-color: rgba(255,152,0,0.18);
    background:
        linear-gradient(90deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)),
        rgba(0,0,0,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 0 16px rgba(255,152,0,0.07);
    transform: translateY(-1px);
}

#rotations-card .rot-row:hover::after {
    opacity: 1;
}

#rotations-card .rot-row--active {
    border-color: rgba(76,175,80,0.32);
    background: linear-gradient(90deg, rgba(76,175,80,0.18), rgba(76,175,80,0.07) 54%, rgba(255,255,255,0.025));
    box-shadow: inset 0 0 0 1px rgba(76,175,80,0.18), 0 0 18px rgba(76,175,80,0.1);
}

#rotations-card .rot-row--active::before {
    background: var(--green);
    box-shadow: 0 0 14px rgba(76,175,80,0.75);
    animation: rot-active-rail 1.8s ease-in-out infinite;
}

#rotations-card .rot-row--urgent {
    border-color: rgba(255,51,51,0.34);
    background: linear-gradient(90deg, rgba(255,51,51,0.15), rgba(255,51,51,0.06) 54%, rgba(255,255,255,0.025));
    box-shadow: inset 0 0 0 1px rgba(255,51,51,0.16), 0 0 18px rgba(255,51,51,0.1);
}

#rotations-card .rot-row--urgent::before {
    background: var(--urgent-red);
    box-shadow: 0 0 14px rgba(255,51,51,0.7);
}

#rotations-card .rot-row--near-active::before {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(255,152,0,0.55);
    opacity: 0.85;
}

#rotations-card .rot-label {
    flex: 0 0 122px;
    min-width: 0;
    color: var(--text-sub);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
}

#rotations-card .rot-row--active .rot-label,
#rotations-card .rot-row--urgent .rot-label {
    color: var(--text-main);
}

#rotations-card .rot-val {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    color: #f0f0f0;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: right;
}

#rotations-card .rot-val.highlight {
    color: #c99dff;
}

#rotations-card .rot-value-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    max-width: 100%;
    min-width: 0;
    line-height: 1.2;
}

#rotations-card .event-link {
    max-width: 100%;
    color: #f4f4f4;
    border-bottom-color: rgba(255,255,255,0.22);
    overflow-wrap: anywhere;
}

#rotations-card .event-link.green {
    color: #8ee794;
    border-bottom-color: rgba(76,175,80,0.55);
    text-shadow: 0 0 10px rgba(76,175,80,0.35);
}

#rotations-card .rot-timer,
#rotations-card .merchant-rot-timer {
    margin-top: 0;
    color: var(--text-sub);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: right;
    white-space: nowrap;
}

#rotations-card .vos-wrapper {
    justify-content: flex-end;
    flex-wrap: wrap;
    column-gap: 6px;
    row-gap: 4px;
    font-size: 1rem;
}

#rotations-card .vos-img {
    width: 23px;
    height: 23px;
}

#rotations-card .merchant-rot-wrapper {
    align-items: flex-end;
    gap: 6px;
}

#rotations-card .merchant-rot-icons {
    justify-content: flex-end;
    gap: 5px;
}

#rotations-card .merchant-rot-icon {
    width: 31px;
    height: 31px;
    padding: 2px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: rgba(0,0,0,0.24);
}

#rotations-card .merchant-rot-item.high-value .merchant-rot-icon {
    border-color: rgba(255,215,0,0.45);
    background: rgba(255,215,0,0.08);
}

#rotations-card .tracker-val {
    min-width: 178px;
}

#rotations-card .tracker-display {
    align-items: flex-end;
    width: 100%;
}

#rotations-card .tracker-display--active {
    justify-content: flex-end;
    flex-wrap: wrap;
}

#rotations-card .tracker-charge-row {
    justify-content: flex-end;
}

#rotations-card .tracker-bar {
    width: 94px;
    height: 8px;
    background: rgba(255,255,255,0.1);
}

#rotations-card .tracker-bar-fill {
    background: linear-gradient(90deg, var(--accent), var(--gold));
}

#rotations-card .tracker-quick-actions {
    flex-wrap: wrap;
    row-gap: 2px;
}

#rotations-card .tracker-quick-btn {
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.74rem;
}

#rotations-card .tracker-pct-display {
    font-size: 1rem;
}

#rotations-card .tracker-info-row {
    font-size: 0.72rem;
}

#rotations-card .tracker-badge--active {
    box-shadow: 0 0 14px rgba(76,175,80,0.22);
}

@keyframes rot-active-rail {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

/* =============================================================================
   XP RECAP CARD
   ============================================================================= */

#xp-recap-card {
    align-items: stretch;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), transparent 38%),
        var(--bg-card);
}

@media (min-width: 769px) {
    #xp-recap-card {
        height: 590px;
        min-height: 590px;
        overflow: hidden;
    }
}

#xp-recap-card > .card-title {
    align-self: center;
    justify-content: center;
    margin-bottom: 12px;
    width: 100%;
}

.xp-recap-title-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.recap-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, #888);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

#xp-recap-card .recap-header .recap-refresh-btn {
    margin-left: auto;
    align-self: center;
    width: 28px;
    height: 28px;
}

.recap-refresh-btn:hover:not(:disabled) {
    background: rgba(33, 150, 243, 0.12);
    border-color: rgba(33, 150, 243, 0.4);
    color: #42a5f5;
}

.recap-refresh-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.recap-refresh-btn.is-refreshing svg {
    animation: profile-refresh-spin 0.8s linear infinite;
}

#xp-recap-card > .card-content,
#xp-recap-content {
    align-items: stretch;
}

@media (min-width: 769px) {
    #xp-recap-card > .card-content,
    #xp-recap-content {
        min-height: 0;
        overflow: hidden;
    }

    #recap-body {
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
    }
}

#recap-body {
    gap: 8px;
}

#xp-recap-card .recap-header,
#xp-recap-card .recap-gains,
#xp-recap-card .recap-tasks {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.12));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#xp-recap-card .recap-header {
    gap: 14px;
    padding: 12px 13px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

#xp-recap-card .recap-avatar {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    border-color: rgba(255,152,0,0.42);
    box-shadow: 0 0 22px rgba(255,152,0,0.12);
    image-rendering: auto;
}

#xp-recap-card .recap-header-info {
    gap: 7px;
}

#xp-recap-card .recap-header-info .recap-player,
#xp-recap-card .recap-header-info .recap-player:visited,
#xp-recap-card .recap-header-info .recap-player:link {
    font-size: 1.14rem;
    line-height: 1.15;
    padding: 0;
}

#xp-recap-card .recap-goal-row {
    gap: 6px;
    min-height: 22px;
    font-size: 0.78rem;
    overflow: hidden;
}

#xp-recap-card .recap-goal-icon {
    width: 20px;
    height: 20px;
}

#xp-recap-card .recap-goal-track {
    height: 7px;
    margin-top: 6px;
    background: rgba(255,255,255,0.09);
}

#xp-recap-card .recap-gains {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

#xp-recap-card .recap-gain-row {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,0.055);
    border-radius: 7px;
    background: rgba(0,0,0,0.16);
    text-align: center;
}

#xp-recap-card .recap-gain-label {
    max-width: 100%;
    width: 100%;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
}

#xp-recap-card .recap-gain-value {
    max-width: 100%;
    width: 100%;
    color: #8ee794;
    font-size: 1rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 10px rgba(76,175,80,0.2);
    text-align: center;
}

#xp-recap-card .recap-tasks {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

#xp-recap-card .recap-task-row {
    padding: 0;
}

#xp-recap-card .recap-task-row-inline {
    justify-content: space-between;
    gap: 5px;
}

#xp-recap-card .recap-task-pill {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 4px 5px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    background: rgba(0,0,0,0.14);
    font-size: 0.7rem;
    white-space: nowrap;
}

#xp-recap-card .recap-task-pill.recap-complete {
    border-color: rgba(76,175,80,0.28);
    background: rgba(76,175,80,0.08);
}

#xp-recap-card .recap-chart-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-align: left;
}

#xp-recap-card .recap-chart-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(79,195,247,0.32), transparent);
}

#xp-recap-card .recap-chart {
    flex: 1 1 0;
    min-height: 0;
    justify-content: flex-start;
    gap: 4px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#xp-recap-card .recap-chart::-webkit-scrollbar {
    display: none;
}

#xp-recap-card .recap-bar-row {
    position: relative;
    flex-shrink: 0;
    min-height: 26px;
    gap: 8px;
}

#xp-recap-card .recap-skill-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 7px;
    background: rgba(0,0,0,0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    outline: none;
}

#xp-recap-card .recap-skill-tooltip::before,
#xp-recap-card .recap-skill-tooltip::after {
    position: absolute;
    top: 50%;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

#xp-recap-card .recap-skill-tooltip::before {
    content: '';
    left: calc(100% + 4px);
    width: 8px;
    height: 8px;
    border-left: 1px solid rgba(255,152,0,0.24);
    border-bottom: 1px solid rgba(255,152,0,0.24);
    border-right: 1px solid rgba(255,152,0,0.24);
    background: rgba(11,14,22,0.98);
    transform: translate(-4px, -50%) rotate(45deg);
}

#xp-recap-card .recap-skill-tooltip::after {
    content: attr(data-skill);
    left: calc(100% + 8px);
    padding: 5px 8px;
    border: 1px solid rgba(255,152,0,0.24);
    border-radius: 7px;
    background: rgba(11,14,22,0.98);
    color: var(--text-main);
    box-shadow: 0 10px 26px rgba(0,0,0,0.45);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    transform: translate(-4px, -50%);
}

#xp-recap-card .recap-skill-tooltip:hover,
#xp-recap-card .recap-skill-tooltip:focus-visible {
    border-color: rgba(255,152,0,0.28);
    background: rgba(255,152,0,0.08);
}

#xp-recap-card .recap-skill-tooltip:hover::before,
#xp-recap-card .recap-skill-tooltip:hover::after,
#xp-recap-card .recap-skill-tooltip:focus-visible::before,
#xp-recap-card .recap-skill-tooltip:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%) rotate(45deg);
}

#xp-recap-card .recap-skill-tooltip:hover::after,
#xp-recap-card .recap-skill-tooltip:focus-visible::after {
    transform: translate(0, -50%);
}

#xp-recap-card .recap-skill-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    margin-right: 0;
    object-fit: contain;
    image-rendering: auto;
}

#xp-recap-card .recap-bar-track {
    height: 10px;
    border-radius: 5px;
    margin: 0 5px 0 0;
    background: rgba(255,255,255,0.07);
}

#xp-recap-card .recap-bar-fill {
    border-radius: 5px;
    box-shadow: 0 0 9px color-mix(in srgb, currentColor 25%, transparent);
}

#xp-recap-card .recap-bar-val {
    flex-basis: 64px;
    font-size: 0.74rem;
}

#xp-recap-card .recap-chart-empty,
#xp-recap-card .recap-chart-loading,
#xp-recap-card .recap-loading,
#xp-recap-card .recap-empty {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    background: rgba(0,0,0,0.12);
}

#xp-recap-card .recap-chart-loading.loading-with-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1 1 0;
    min-height: 120px;
    padding: 28px 16px;
    font-style: italic;
    color: var(--text-sub, #888);
    font-size: 0.85rem;
    text-align: center;
}

#xp-recap-card .recap-chart-loading.loading-with-spinner::before {
    width: 28px;
    height: 28px;
    border-width: 3px;
}

@media (max-width: 768px) {
    /* Stop paint/layout containment from clipping dashboard cards on phones */
    .dashboard {
        contain: none;
    }

    .dashboard > .card {
        content-visibility: visible;
        contain-intrinsic-size: unset;
        flex-shrink: 0;
        width: 100%;
    }

    /* Let cards grow with content instead of clipping at a fixed desktop height */
    #rotations-card {
        --rot-card-height: auto;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }

    #rotations-card .card-content {
        overflow: visible;
        justify-content: flex-start;
        gap: 7px;
    }

    #rotations-card .rot-row {
        flex: 0 1 auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        min-height: 0;
        height: auto;
        padding: 8px 10px 8px 12px;
        overflow: visible;
    }

    #rotations-card .rot-row:nth-last-child(-n + 2) {
        flex-basis: auto;
        min-height: 0;
    }

    #rotations-card .rot-label,
    #rotations-card .rot-val,
    #rotations-card .rot-timer,
    #rotations-card .merchant-rot-timer,
    #rotations-card .event-link {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    #rotations-card .rot-timer,
    #rotations-card .merchant-rot-timer {
        white-space: normal;
    }

    #rotations-card .vos-wrapper,
    #rotations-card .merchant-rot-icons,
    #rotations-card .tracker-charge-row,
    #rotations-card .tracker-display--active,
    #rotations-card .tracker-quick-actions {
        flex-wrap: wrap;
    }

    /* XP recap: grow with content — flex children must not collapse when card height is auto */
    #xp-recap-card {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }

    #xp-recap-card > .card-content,
    #xp-recap-content {
        flex: 0 1 auto;
        min-height: auto;
        overflow: visible;
    }

    #recap-body {
        flex: 0 1 auto;
        min-height: auto;
        overflow: visible;
    }

    /* World broadcasts: fixed viewport-sized card with scrollable feed */
    #broadcasts-card {
        display: flex;
        flex-direction: column;
        height: clamp(360px, 48vh, 440px);
        min-height: 360px;
        max-height: 440px;
        overflow: hidden;
    }

    #broadcasts-card .card-content {
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
    }

    #broadcasts-card .broadcast-feed {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    #rotations-card .card-content {
        gap: 7px;
    }

    #rotations-card .rot-row {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        min-height: 0;
        padding: 6px 10px 6px 12px;
    }

    #rotations-card .rot-row:nth-last-child(-n + 2) {
        min-height: 0;
    }

    #rotations-card .rot-label {
        flex: 0 1 auto;
        min-width: 0;
        width: 100%;
        font-size: 0.72rem;
    }

    #rotations-card .rot-val {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    #rotations-card .rot-timer,
    #rotations-card .merchant-rot-timer {
        text-align: left;
    }

    #rotations-card .rot-value-stack,
    #rotations-card .merchant-rot-wrapper,
    #rotations-card .tracker-display {
        align-items: flex-start;
    }

    #rotations-card .vos-wrapper,
    #rotations-card .merchant-rot-icons,
    #rotations-card .tracker-charge-row,
    #rotations-card .tracker-display--active,
    #rotations-card .tracker-quick-actions {
        justify-content: flex-start;
    }

    #rotations-card .tracker-val {
        min-width: 0;
    }

    #rotations-card .tracker-info-row {
        justify-content: flex-start;
    }

    #xp-recap-card .recap-gains {
        gap: 5px;
    }

    #xp-recap-card .recap-gain-row {
        padding: 6px;
    }

    #xp-recap-card .recap-gain-label {
        font-size: 0.56rem;
    }

    #xp-recap-card .recap-gain-value {
        font-size: 0.78rem;
    }

    #xp-recap-card .recap-bar-name {
        flex-basis: 68px;
    }

    #xp-recap-card .recap-bar-val {
        flex-basis: 56px;
    }
}

@media (max-width: 320px) {
    #rotations-card .rot-row {
        padding: 6px 8px 6px 10px !important;
    }

    #rotations-card .rot-label {
        font-size: 0.68rem;
    }

    #rotations-card .rot-val {
        font-size: 0.82rem;
    }

    #xp-recap-card .recap-task-row-inline {
        justify-content: center;
    }

    #xp-recap-card .recap-task-pill {
        flex-basis: 31%;
        font-size: 0.62rem;
    }
}

/* =============================================================================
   WORLD BROADCASTS CARD
   ============================================================================= */

#broadcasts-card {
    overflow: hidden;
    position: relative;
    align-items: stretch;
    padding: 0;
    border-color: var(--border-color);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), transparent 38%),
        var(--bg-card);
}

@media (min-width: 769px) {
    #broadcasts-card {
        height: 590px;
        min-height: 590px;
    }
}

#broadcasts-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.13), transparent);
    pointer-events: none;
}

#broadcasts-card .card-content {
    justify-content: flex-start;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 100%;
    overflow: hidden;
    background: transparent;
}

#broadcasts-card .card-title {
    align-self: stretch;
    justify-content: center;
    min-height: 54px;
    padding: 10px 14px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.075));
}

.broadcast-card-title {
    flex-direction: column;
    gap: 3px;
    text-align: center;
}

.broadcast-title-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    color: var(--text-main);
    -webkit-text-fill-color: currentColor;
}

.broadcast-title-emoji {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: initial;
    -webkit-text-fill-color: initial;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    font-size: 1rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.16));
}

.broadcast-title-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
    -webkit-text-fill-color: currentColor;
    text-shadow: 0 0 14px rgba(255,255,255,0.08);
}

.broadcast-title-subtext {
    display: block;
    color: var(--text-dim);
    -webkit-text-fill-color: currentColor;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

/* Broadcast Feed Container */
.broadcast-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
    padding: 10px 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    width: 100%;
    background: transparent;
}

.broadcast-feed::-webkit-scrollbar { width: 3px; }
.broadcast-feed::-webkit-scrollbar-track { background: transparent; }
.broadcast-feed::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }

/* --- Broadcast Item --- */
.bc-item {
    --bc-accent: var(--accent);
    --bc-accent-rgb: 255, 152, 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: 96px;
    min-height: 96px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.065);
    border-left: 3px solid rgba(var(--bc-accent-rgb), 0.82);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(var(--bc-accent-rgb), 0.07), rgba(255,255,255,0.012) 46%, rgba(0,0,0,0.08)),
        rgba(0,0,0,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.bc-levelup { --bc-accent: #ffd54f; --bc-accent-rgb: 255, 213, 79; }
.bc-quest { --bc-accent: #4fc3f7; --bc-accent-rgb: 79, 195, 247; }
.bc-drop { --bc-accent: #bb86fc; --bc-accent-rgb: 187, 134, 252; }
.bc-xp { --bc-accent: #69f0ae; --bc-accent-rgb: 105, 240, 174; }

.bc-item:last-child { margin-bottom: 0; }
.bc-item:hover {
    border-color: rgba(var(--bc-accent-rgb), 0.26);
    border-left-color: var(--bc-accent);
    background:
        linear-gradient(90deg, rgba(var(--bc-accent-rgb), 0.105), rgba(255,255,255,0.015) 48%, rgba(0,0,0,0.07)),
        rgba(0,0,0,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 8px 18px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}

/* --- Icon --- */
.bc-icon-wrap {
    flex-shrink: 0;
    justify-self: center;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 45% 35%, rgba(var(--bc-accent-rgb), 0.18), transparent 64%),
        rgba(0,0,0,0.22);
    border-radius: 10px;
    border: 1px solid rgba(var(--bc-accent-rgb), 0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
    overflow: hidden;
}
/* Larger container for wiki detail images (drops/pets) */
.bc-icon-wiki-wrap {
    width: 54px;
    height: 54px;
    background:
        radial-gradient(circle at 50% 40%, rgba(var(--bc-accent-rgb), 0.15), transparent 66%),
        radial-gradient(circle, #1a1a1a 0%, #111 100%);
}

.bc-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 0 5px rgba(var(--bc-accent-rgb), 0.22));
}

/* Wiki images: smooth rendering, fill the container */
.bc-icon-wiki {
    width: 48px;
    height: 48px;
    image-rendering: auto;
}

.bc-icon-fb {
    font-size: 18px;
}

/* --- Content --- */
.bc-body {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bc-head {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    width: 100%;
}

.bc-player-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 0 1 auto;
    justify-content: center;
    max-width: 100%;
}

.bc-player-identity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    line-height: 1;
}

.bc-player {
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: color var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.2;
    min-width: 0;
    max-width: clamp(76px, 36vw, 150px);
}

.bc-player:hover {
    color: var(--accent-hover);
}

/* Account Type Badge (Ironman/HCIM/GIM/CGIM) - in broadcasts only */
.bc-acct-icon {
    flex-shrink: 0;
    display: block;
    width: auto;
    height: 0.78em;
    max-height: 12px;
    max-width: 14px;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
    image-rendering: -webkit-optimize-contrast;
    align-self: center;
    margin: 0;
    opacity: 0.92;
}

/* Type Tag */
.bc-tag {
    flex: 0 0 auto;
    font-size: 0.56rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1;
    min-width: 62px;
    text-align: center;
}

.bc-tag-levelup { background: rgba(255,215,0,0.08); color: var(--gold-dim); border: 1px solid rgba(255,215,0,0.12); }
.bc-tag-quest   { background: rgba(79,195,247,0.08); color: #4fc3f7; border: 1px solid rgba(79,195,247,0.12); }
.bc-tag-drop    { background: rgba(187,134,252,0.08); color: #9a7acc; border: 1px solid rgba(187,134,252,0.12); }
.bc-tag-xp      { background: rgba(76,175,80,0.08); color: #6dbb6f; border: 1px solid rgba(76,175,80,0.12); }

.bc-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

/* Message */
.bc-message {
    color: var(--text-sub);
    display: block;
    flex: 0 1 auto;
    font-size: 0.8rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 16px;
    max-width: min(245px, 72%);
    text-align: center;
}

.bc-message strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Level Badge */
.broadcast-level-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    background: var(--bg-dropdown);
    color: var(--text-muted);
    border: 1px solid var(--border-dark);
}

.broadcast-level-99 {
    background: rgba(255,215,0,0.08);
    color: var(--gold);
    border: 1px solid rgba(255,215,0,0.2);
}

.broadcast-level-120 {
    background: rgba(187,134,252,0.08);
    color: var(--purple);
    border: 1px solid rgba(187,134,252,0.2);
}

/* --- Timestamp (now inside top-row) --- */
.bc-time {
    flex-shrink: 0;
    color: var(--text-dim);
    font-size: 0.62rem;
    white-space: nowrap;
    margin-left: 0;
    padding-top: 1px;
    font-variant-numeric: tabular-nums;
}

/* --- Linked Site Profile Button --- */
.bc-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.055);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-dim);
    opacity: 0.82;
    transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
    vertical-align: middle;
}
.bc-profile-btn:hover {
    opacity: 1;
    color: var(--accent);
    border-color: rgba(255,152,0,0.16);
    background: rgba(255,152,0,0.055);
}
.bc-profile-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.72;
}
.bc-profile-btn:hover .bc-profile-icon {
    opacity: 1;
}

/* --- Reactions (vertical column on the right) --- */
.bc-reactions-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    align-self: stretch;
    min-width: 32px;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 0 2px 0 0;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.bc-reactions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.bc-reactions::-webkit-scrollbar {
    display: none;
}

.bc-reaction-picker-wrap {
    position: static;
    flex-shrink: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    width: 100%;
}

.bc-reaction-trigger {
    width: 28px;
    height: 28px;
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
    position: relative;
    z-index: 4;
    flex-shrink: 0;
    touch-action: manipulation;
}

.bc-reaction-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-sub);
}

.bc-reaction-trigger svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.bc-reaction-picker {
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    width: max-content;
    max-width: min(260px, calc(100vw - 16px));
}

.bc-reaction-picker.is-open {
    display: inline-flex;
    animation: bcPickerPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bcPickerPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.bc-reaction-option {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    padding: 0;
    font-family: inherit;
    touch-action: manipulation;
}

.bc-reaction-option:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255, 152, 0, 0.2);
}

.bc-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 22px;
    min-width: 24px;
    min-height: 22px;
    padding: 0 5px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.18);
    cursor: pointer;
    font-family: inherit;
    color: var(--text-sub);
    transition: all 0.18s ease;
    line-height: 1;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    justify-content: center;
}

.bc-react-btn:not(.bc-react-empty) {
    min-width: 36px;
}

.bc-react-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.bc-react-btn:active {
    transform: translateY(0) scale(0.95);
    transition-duration: 0.06s;
}

/* Per-reaction pill colours — always visible on every pill */
.bc-react-btn[data-reaction="fire"]   { border-color: rgba(255,94,14,0.5);    background: rgba(255,94,14,0.16);    color: #ff8c42; } /* orange */
.bc-react-btn[data-reaction="trophy"] { border-color: rgba(255,196,0,0.5);    background: rgba(255,196,0,0.16);    color: #ffd633; } /* gold */
.bc-react-btn[data-reaction="party"]  { border-color: rgba(170,210,0,0.55);   background: rgba(170,210,0,0.16);    color: #c4e64d; } /* lime */
.bc-react-btn[data-reaction="clap"]   { border-color: rgba(56,182,72,0.5);    background: rgba(56,182,72,0.16);    color: #74d98a; } /* green */
.bc-react-btn[data-reaction="clover"] { border-color: rgba(0,184,148,0.5);    background: rgba(0,184,148,0.16);    color: #3fe0bf; } /* teal */
.bc-react-btn[data-reaction="goat"]   { border-color: rgba(51,110,255,0.5);   background: rgba(51,110,255,0.16);   color: #88b0ff; } /* blue */
.bc-react-btn[data-reaction="skull"]  { border-color: rgba(160,96,255,0.5);   background: rgba(160,96,255,0.16);   color: #c2a3ff; } /* purple */
.bc-react-btn[data-reaction="salt"]   { border-color: rgba(240,60,140,0.5);   background: rgba(240,60,140,0.16);   color: #ff8ac0; } /* pink */
.bc-react-btn[data-reaction="heart"]  { border-color: rgba(244,67,54,0.5);    background: rgba(244,67,54,0.16);    color: #ff6b5e; } /* red */
.bc-react-btn[data-reaction="spoon"]  { border-color: rgba(176,190,197,0.55); background: rgba(176,190,197,0.16);  color: #cfd8dc; } /* silver */
.bc-react-btn[data-reaction="beer"]   { border-color: rgba(165,120,90,0.55);  background: rgba(165,120,90,0.18);   color: #d8b48c; } /* brown */

.bc-react-btn[data-reaction="fire"]:hover   { background: rgba(255,94,14,0.24);   border-color: rgba(255,94,14,0.65); }
.bc-react-btn[data-reaction="trophy"]:hover { background: rgba(255,196,0,0.24);   border-color: rgba(255,196,0,0.65); }
.bc-react-btn[data-reaction="party"]:hover  { background: rgba(170,210,0,0.24);   border-color: rgba(170,210,0,0.65); }
.bc-react-btn[data-reaction="clap"]:hover   { background: rgba(56,182,72,0.24);   border-color: rgba(56,182,72,0.65); }
.bc-react-btn[data-reaction="clover"]:hover { background: rgba(0,184,148,0.24);   border-color: rgba(0,184,148,0.65); }
.bc-react-btn[data-reaction="goat"]:hover   { background: rgba(51,110,255,0.24);  border-color: rgba(51,110,255,0.65); }
.bc-react-btn[data-reaction="skull"]:hover  { background: rgba(160,96,255,0.24);  border-color: rgba(160,96,255,0.65); }
.bc-react-btn[data-reaction="salt"]:hover   { background: rgba(240,60,140,0.24);  border-color: rgba(240,60,140,0.65); }
.bc-react-btn[data-reaction="heart"]:hover  { background: rgba(244,67,54,0.24);   border-color: rgba(244,67,54,0.65); }
.bc-react-btn[data-reaction="spoon"]:hover  { background: rgba(176,190,197,0.26); border-color: rgba(176,190,197,0.7); }
.bc-react-btn[data-reaction="beer"]:hover   { background: rgba(165,120,90,0.26);  border-color: rgba(165,120,90,0.7); }

/* Stronger highlight when the current user has reacted */
.bc-react-btn.bc-react-active {
    opacity: 1;
}
.bc-react-btn.bc-react-active[data-reaction="fire"]   { border-color: rgba(255,94,14,0.8);   background: rgba(255,94,14,0.28);   box-shadow: 0 0 8px rgba(255,94,14,0.2); }
.bc-react-btn.bc-react-active[data-reaction="trophy"] { border-color: rgba(255,196,0,0.8);   background: rgba(255,196,0,0.28);   box-shadow: 0 0 8px rgba(255,196,0,0.2); }
.bc-react-btn.bc-react-active[data-reaction="party"]  { border-color: rgba(170,210,0,0.8);   background: rgba(170,210,0,0.28);   box-shadow: 0 0 8px rgba(170,210,0,0.2); }
.bc-react-btn.bc-react-active[data-reaction="clap"]   { border-color: rgba(56,182,72,0.8);   background: rgba(56,182,72,0.28);   box-shadow: 0 0 8px rgba(56,182,72,0.2); }
.bc-react-btn.bc-react-active[data-reaction="clover"] { border-color: rgba(0,184,148,0.8);   background: rgba(0,184,148,0.28);   box-shadow: 0 0 8px rgba(0,184,148,0.2); }
.bc-react-btn.bc-react-active[data-reaction="goat"]   { border-color: rgba(51,110,255,0.8);  background: rgba(51,110,255,0.28);  box-shadow: 0 0 8px rgba(51,110,255,0.2); }
.bc-react-btn.bc-react-active[data-reaction="skull"]  { border-color: rgba(160,96,255,0.8);  background: rgba(160,96,255,0.28);  box-shadow: 0 0 8px rgba(160,96,255,0.2); }
.bc-react-btn.bc-react-active[data-reaction="salt"]   { border-color: rgba(240,60,140,0.8);  background: rgba(240,60,140,0.28);  box-shadow: 0 0 8px rgba(240,60,140,0.2); }
.bc-react-btn.bc-react-active[data-reaction="heart"]  { border-color: rgba(244,67,54,0.8);   background: rgba(244,67,54,0.28);   box-shadow: 0 0 8px rgba(244,67,54,0.2); }
.bc-react-btn.bc-react-active[data-reaction="spoon"]  { border-color: rgba(176,190,197,0.85); background: rgba(176,190,197,0.3);  box-shadow: 0 0 8px rgba(176,190,197,0.22); }
.bc-react-btn.bc-react-active[data-reaction="beer"]   { border-color: rgba(165,120,90,0.85); background: rgba(165,120,90,0.3);   box-shadow: 0 0 8px rgba(165,120,90,0.22); }

/* Emoji inside pill */
.bc-react-emoji {
    font-size: 0.74rem;
    line-height: 1;
    filter: none;
    transition: filter 0.15s;
}
.bc-react-btn:hover .bc-react-emoji {
    filter: none;
}

/* Image glyph (e.g. blue party hat) shown in place of an emoji */
.bc-react-emoji .bc-react-img {
    width: 15px;
    height: 15px;
    object-fit: contain;
    vertical-align: middle;
    display: block;
}
.bc-reaction-option .bc-react-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* Count badge inside pill */
.bc-react-count {
    font-size: 0.61rem;
    font-weight: 700;
    min-width: 8px;
    text-align: center;
    opacity: 0.85;
    letter-spacing: -0.02em;
}
.bc-react-btn.bc-react-active .bc-react-count {
    opacity: 1;
}

/* "+" add reaction pill */
.bc-react-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.08);
    background: transparent;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 0.82rem;
    transition: all 0.15s;
    opacity: 0;
    padding: 0;
}
.bc-item:hover .bc-react-add {
    opacity: 0.5;
}
.bc-react-add:hover {
    opacity: 1 !important;
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    color: var(--text-sub);
}

/* Empty pills (no count) - always visible, slightly muted */
.bc-react-btn.bc-react-empty {
    opacity: 0.42;
    background: rgba(0,0,0,0.12);
    border-color: rgba(255,255,255,0.055);
    transition: all 0.2s ease;
}
.bc-item:hover .bc-react-btn.bc-react-empty {
    opacity: 0.64;
}
.bc-react-btn.bc-react-empty:hover {
    opacity: 1;
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.16);
}

/* Pill pop-in animation */
@keyframes bcPillPop {
    0%   { transform: scale(0.7); opacity: 0; }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}
.bc-react-btn.bc-react-pop {
    animation: bcPillPop 0.25s ease-out;
}

/* Shake animation for non-logged-in users */
@keyframes bcReactShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}
.bc-react-shake {
    animation: bcReactShake 0.4s ease;
}

/* Loading / Empty States */
.broadcast-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.82rem;
    padding: 50px 20px;
    min-height: 180px;
}

.bc-load-more {
    display: flex;
    justify-content: center;
    padding: 10px 8px 4px;
}

.bc-load-more-btn {
    background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bc-load-more-btn:hover:not(:disabled) {
    background: var(--accent-soft, rgba(102, 126, 234, 0.12));
    color: var(--text-bright, #fff);
    border-color: var(--accent, #667eea);
}

.bc-load-more-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.broadcast-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.82rem;
    padding: 50px 20px;
    margin: 10px 12px 12px;
    min-height: 180px;
    border: 1px dashed rgba(255,255,255,0.09);
    border-radius: 8px;
    background: rgba(0,0,0,0.12);
    text-align: center;
}

@media (max-width: 560px) {
    #broadcasts-card {
        height: clamp(320px, 45vh, 400px);
        min-height: 320px;
        max-height: 400px;
    }
}

.final-week-divider {
    color: rgba(255, 215, 0, 0.6);
    font-weight: 300;
}

.final-week-star {
    color: var(--gold);
    font-size: 0.7rem;
    animation: starTwinkle 1s ease-in-out infinite;
    text-shadow: 0 0 8px #ffd700;
}

.final-week-star:last-child {
    animation-delay: 0.5s;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes bannerShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes textShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes bannerGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

@keyframes luckPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.6; transform: scale(0.8) rotate(180deg); }
}

/* =============================================================================
   PVM / BOSS DASHBOARD
   ============================================================================= */

/* Summary stat cards � 2�2 grid */
/* -------------------------------------------------------------------
   PVM TAB � Stat Strip
   ------------------------------------------------------------------- */
.pvm-stat-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a1015 0%, #181818 100%);
    border: 1px solid #2a2020;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    gap: 4px;
}
.pvm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.pvm-stat-num {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    font-feature-settings: "tnum";
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}
.pvm-stat-lbl {
    font-size: 0.55rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.pvm-stat-sep {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

.pvm-insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.pvm-insight-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 8px 9px;
    min-width: 0;
}
.pvm-insight-wide {
    grid-column: 1 / -1;
}
.pvm-insight-label {
    display: block;
    color: #777;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 3px;
}
.pvm-insight-card strong {
    display: block;
    color: #f5f5f5;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pvm-insight-card span:last-child {
    display: block;
    color: #8a8a8a;
    font-size: 0.64rem;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -------------------------------------------------------------------
   PVM TAB � Sub-tabs (Boss Kills / Collection Log)
   ------------------------------------------------------------------- */
.pvm-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    background: #0e0e0e;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--border-dark);
}
.pvm-subtab {
    flex: 1;
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 7px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pvm-subtab:hover { color: #bbb; background: rgba(255,255,255,0.03); }
.pvm-subtab.active { color: #fff; background: #ef4444; }
.pvm-subtab-content { display: none; }
.pvm-subtab-content.active { display: block; }

/* -------------------------------------------------------------------
   PVM TAB � Controls (Search + Sort)
   ------------------------------------------------------------------- */
.pvm-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    align-items: stretch;
}
.pvm-search {
    background: #0e0e0e;
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    padding: 8px 10px;
    color: #ccc;
    font-size: 0.72rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
.pvm-search:focus { border-color: #ef4444; }
.pvm-search::placeholder { color: #444; }
.pvm-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}
.pvm-filter-btn {
    background: #0e0e0e;
    border: 1px solid var(--border-dark);
    border-radius: 5px;
    color: #666;
    font-size: 0.64rem;
    font-weight: 700;
    padding: 6px 5px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}
.pvm-filter-btn span {
    color: #999;
    font-size: 0.58rem;
    font-feature-settings: "tnum";
}
.pvm-filter-btn:hover { color: #ccc; border-color: var(--border-light); }
.pvm-filter-btn.active { color: #fff; border-color: #ef4444; background: rgba(239,68,68,0.15); }
.pvm-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
}
.pvm-sort-select {
    flex: 1;
    min-width: 0;
    background: #0e0e0e;
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    color: #ddd;
    font-size: 0.7rem;
    padding: 7px 8px;
    outline: none;
}
.pvm-sort-select:focus { border-color: #ef4444; }
.pvm-result-count {
    color: #686868;
    font-size: 0.62rem;
    text-align: right;
}

/* -------------------------------------------------------------------
   PVM TAB � Boss Tile Grid
   ------------------------------------------------------------------- */
.pvm-boss-list { display: flex; flex-direction: column; gap: 8px; }
.pvm-boss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
}
.pvm-boss-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px 8px;
    background: var(--bg-input);
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;
    color: inherit;
    font: inherit;
    min-height: 126px;
    width: 100%;
}
.pvm-boss-tile:hover {
    border-color: #ef4444;
    background: #181215;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}
.pvm-boss-tile.has-kills {
    border-color: #2a2020;
    background: linear-gradient(180deg, #1a1015 0%, #111 100%);
}
.pvm-boss-tile.has-drops {
    border-color: rgba(74, 222, 128, 0.34);
}
.pvm-boss-tile.is-orphan .pvm-boss-tile-drops {
    color: #fbbf24;
}
.pvm-boss-tile-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-dark);
}
.pvm-boss-tile-kc {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.55rem;
    font-weight: 800;
    color: #ef4444;
    background: rgba(0,0,0,0.7);
    padding: 1px 5px;
    border-radius: 4px;
    font-feature-settings: "tnum";
    line-height: 1.4;
}
.pvm-boss-tile-name {
    font-size: 0.62rem;
    font-weight: 700;
    color: #ccc;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 100%;
}
.pvm-boss-tile-drops {
    font-size: 0.52rem;
    color: #4ade80;
    font-weight: 600;
    font-feature-settings: "tnum";
}
.pvm-boss-tile-progress {
    width: min(74px, 80%);
    height: 3px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}
.pvm-boss-tile-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #fbbf24);
    border-radius: inherit;
}
.pvm-empty-state {
    color: #777;
    border: 1px dashed var(--border-dark);
    border-radius: 8px;
    padding: 18px 12px;
    text-align: center;
    font-size: 0.72rem;
}

/* -------------------------------------------------------------------
   PVM TAB � Boss Drop Modal
   ------------------------------------------------------------------- */
.pvm-boss-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
}
.pvm-boss-modal-overlay.visible { opacity: 1; }

.pvm-boss-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: pvmModalIn 0.25s ease-out;
}
@keyframes pvmModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.pvm-boss-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04);
    color: #888;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
    line-height: 1;
}
.pvm-boss-modal-close:hover {
    background: rgba(239,68,68,0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.pvm-boss-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 12px;
}
.pvm-boss-modal-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(0,0,0,0.4);
    border: 2px solid #2a2020;
    flex-shrink: 0;
}
.pvm-boss-modal-title {
    flex: 1;
    min-width: 0;
}
.pvm-boss-modal-title h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.pvm-boss-wiki-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}
.pvm-boss-wiki-link:hover {
    color: var(--accent, #00d4ff);
    text-decoration: underline;
}
.pvm-boss-modal-stats {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.pvm-boss-modal-kc {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ef4444;
    font-feature-settings: "tnum";
}
.pvm-boss-modal-date {
    font-size: 0.65rem;
    color: #555;
}

.pvm-boss-modal-progress {
    padding: 0 18px 12px;
}
.pvm-boss-modal-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-dropdown);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.pvm-boss-modal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.pvm-boss-modal-progress-text {
    font-size: 0.62rem;
    color: #666;
}

.pvm-boss-modal-items {
    padding: 0 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pvm-modal-empty {
    color: #888;
    background: rgba(255,255,255,0.03);
    border: 1px dashed var(--border-dark);
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.4;
}
.pvm-modal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.15s;
    opacity: 0.4;
}
.pvm-modal-item.obtained {
    opacity: 1;
    background: rgba(34, 197, 94, 0.05);
}
.pvm-modal-item:hover {
    background: rgba(255,255,255,0.03);
    opacity: 1;
}
.pvm-modal-item-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid #1e1e1e;
    background: var(--bg-body);
}
.pvm-modal-item.obtained .pvm-modal-item-img {
    border-color: #22c55e;
}
.pvm-modal-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pvm-modal-item-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pvm-modal-item.obtained .pvm-modal-item-name {
    color: #fff;
}
.pvm-modal-item-price {
    font-size: 0.58rem;
    color: #fbbf24;
    font-feature-settings: "tnum";
}
.pvm-modal-item-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: #555;
    font-feature-settings: "tnum";
    flex-shrink: 0;
}
.pvm-modal-item.obtained .pvm-modal-item-count {
    color: #4ade80;
}

/* =============================================================================
   MOBILE DASHBOARD CARDS — must stay last so desktop rules above cannot override
   ============================================================================= */
@media (max-width: 768px) {
    .dashboard {
        display: flex !important;
        flex-direction: column !important;
    }

    #xp-recap-card { order: 1; }
    #rotations-card { order: 2; }
    #broadcasts-card { order: 3; }

    #xp-recap-card {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    #xp-recap-card > .card-content,
    #xp-recap-content {
        flex: 0 1 auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    #recap-body {
        flex: 0 1 auto !important;
        min-height: auto !important;
        overflow: visible !important;
        display: flex;
        flex-direction: column;
    }

    #broadcasts-card {
        display: flex !important;
        flex-direction: column !important;
        height: clamp(360px, 48vh, 440px) !important;
        min-height: 360px !important;
        max-height: 440px !important;
        overflow: hidden !important;
    }

    #broadcasts-card .card-content {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    #broadcasts-card .broadcast-feed {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Skill chart collapses when flex:1 + min-height:0 on an auto-height card */
    #xp-recap-card .recap-chart-label {
        flex-shrink: 0;
        margin-top: 8px;
    }

    #xp-recap-card .recap-chart {
        flex: 0 1 auto !important;
        min-height: auto !important;
        max-height: 260px;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    #xp-recap-card .recap-bar-row {
        flex-shrink: 0;
        min-height: 28px;
        display: flex;
        align-items: center;
    }

    #xp-recap-card .recap-bar-track {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* ===== World Broadcasts — mobile compact rows (original 96px) ===== */
    #broadcasts-card .broadcast-feed {
        gap: 8px;
        padding: 10px 12px 12px;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    #broadcasts-card .bc-item {
        display: grid !important;
        grid-template-columns: 58px minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 8px !important;
        height: 96px !important;
        min-height: 96px !important;
        max-height: 96px !important;
        padding: 8px 10px !important;
        border-radius: 8px !important;
        border-left-width: 3px !important;
        overflow: hidden !important;
    }

    #broadcasts-card .bc-item.bc-item-expanded {
        height: auto !important;
        min-height: 96px !important;
        max-height: none !important;
        align-items: start !important;
        overflow: visible !important;
    }

    #broadcasts-card .bc-item:hover {
        transform: none;
    }

    #broadcasts-card .bc-icon-wrap {
        width: 54px !important;
        height: 54px !important;
        flex: unset !important;
        border-radius: 10px !important;
        justify-self: center !important;
        align-self: center !important;
    }

    #broadcasts-card .bc-item.bc-item-expanded .bc-icon-wrap {
        align-self: start !important;
        margin-top: 2px !important;
    }

    #broadcasts-card .bc-icon {
        width: 34px !important;
        height: 34px !important;
    }

    #broadcasts-card .bc-icon-wiki {
        width: 48px !important;
        height: 48px !important;
    }

    #broadcasts-card .bc-body {
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;
        width: 100% !important;
        height: 100% !important;
        gap: 2px !important;
        align-items: stretch !important;
        justify-content: center !important;
        text-align: left !important;
        overflow: hidden !important;
    }

    #broadcasts-card .bc-item.bc-item-expanded .bc-body {
        height: auto !important;
        justify-content: flex-start !important;
        overflow: visible !important;
        gap: 4px !important;
        padding-top: 2px !important;
    }

    #broadcasts-card .bc-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        width: 100% !important;
        min-width: 0 !important;
        flex-wrap: nowrap !important;
    }

    #broadcasts-card .bc-player-line {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    #broadcasts-card .bc-player-identity {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    #broadcasts-card .bc-acct-icon {
        height: 0.78em !important;
        max-height: 11px !important;
        max-width: 12px !important;
    }

    #broadcasts-card .bc-player {
        font-size: 0.86rem !important;
        font-weight: 800 !important;
        max-width: 100% !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }

    #broadcasts-card .bc-profile-btn {
        width: 22px !important;
        height: 22px !important;
        flex: 0 0 22px !important;
        min-height: unset !important;
        min-width: unset !important;
    }

    #broadcasts-card .bc-profile-icon {
        width: 13px !important;
        height: 13px !important;
    }

    #broadcasts-card .bc-tag {
        flex-shrink: 0 !important;
        min-width: 62px !important;
        font-size: 0.56rem !important;
        padding: 2px 7px !important;
    }

    #broadcasts-card .bc-message {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0.8rem !important;
        line-height: 1.25 !important;
        color: var(--text-sub) !important;
        text-align: left !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-height: 16px !important;
    }

    #broadcasts-card .bc-message strong {
        color: var(--text-main) !important;
        font-weight: 600 !important;
    }

    #broadcasts-card .broadcast-level-badge {
        display: inline-block !important;
        margin-left: 4px !important;
        vertical-align: middle !important;
    }

    #broadcasts-card .bc-meta {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-top: none !important;
        flex-wrap: nowrap !important;
    }

    #broadcasts-card .bc-time {
        font-size: 0.62rem !important;
        color: var(--text-dim) !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #broadcasts-card .bc-reactions-wrap {
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 0 !important;
        align-self: stretch !important;
        justify-content: flex-end !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        padding: 0 2px 0 0 !important;
        gap: 4px !important;
    }

    #broadcasts-card .bc-reactions {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 2px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-bottom: 2px !important;
    }

    #broadcasts-card .bc-reaction-picker-wrap {
        position: static !important;
        flex-shrink: 0 !important;
        width: 100% !important;
    }

    #broadcasts-card .bc-reaction-trigger {
        width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
        min-width: 28px !important;
    }

    #broadcasts-card .bc-reaction-option {
        width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        min-width: 32px !important;
    }

    #broadcasts-card .bc-react-btn {
        height: 22px !important;
        min-width: 24px !important;
        min-height: 22px !important;
        padding: 0 5px !important;
        font-size: 0.7rem !important;
    }
}

