:root {
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --bg-table: #0f3460;
    --surface-2: #1e1b2e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-muted: #6b7a99;
    --accent: #e94560;
    --accent-gold: #f5c542;
    --border: #2a2a4a;

    --wow-poor: #9d9d9d;
    --wow-common: #ffffff;
    --wow-uncommon: #1eff00;
    --wow-rare: #0070dd;
    --wow-epic: #a335ee;
    --wow-legendary: #ff8000;
    --wow-artifact: #e6cc80;
    --wcl-rank-one: #e268a8;

    --status-success: #2ecc71;
    --status-warning: #f5c542;
    --status-caution: #e67e22;
    --status-danger: #e74c3c;
    --status-info: #74b9ff;
    --status-neutral: #a0a0b0;

    --difficulty-normal: var(--status-success);
    --difficulty-heroic: var(--wow-epic);
    --difficulty-mythic: var(--accent);

    --track-champion: var(--status-success);
    --track-hero: #74b9ff;
    --track-myth: #c47dff;

    --role-tank: #4a9eff;
    --role-healer: var(--status-success);
    --role-dps: #e87070;

    --priority-bis: var(--accent-gold);
    --priority-upgrade: var(--status-info);
    --priority-catalyst: #a29bfe;
    --priority-offspec: var(--text-secondary);

    --class-death-knight: #c41e3a;
    --class-demon-hunter: #a330c9;
    --class-druid: #ff7c0a;
    --class-evoker: #33937f;
    --class-hunter: #aad372;
    --class-mage: #3fc7eb;
    --class-monk: #00ff98;
    --class-paladin: #f48cba;
    --class-priest: #ffffff;
    --class-rogue: #fff468;
    --class-shaman: #0070dd;
    --class-warlock: #8788ee;
    --class-warrior: #c69b3a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ── Site Header ── */
.site-header {
    background: #0d1420;
    background-image:
        radial-gradient(ellipse at 15% 50%, rgba(233,69,96,0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 50%, rgba(245,197,66,0.06) 0%, transparent 55%);
    border-bottom: 1px solid rgba(245,197,66,0.18);
    padding: 18px 32px;
    position: relative;
    overflow: hidden;
}
.site-header::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.site-header-inner {
    max-width: 1800px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: relative; z-index: 1; gap: 24px;
}
.site-header-inner > .header-stats {
    grid-column: 2;
    justify-self: center;
}
.site-header-inner > .site-brand {
    grid-column: 1;
    justify-self: start;
}
.site-header-inner > .header-affixes {
    grid-column: 3;
    justify-self: end;
}
.site-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; cursor: pointer; }
.site-brand > div { height: 56px; display: flex; flex-direction: column; }
.brand-badge {
    width: 56px; height: 56px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center 40%;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(120,60,200,0.35), 0 2px 8px rgba(0,0,0,0.6);
    border: 1px solid rgba(160,100,255,0.25);
}
.brand-name {
    font-size: 20px; font-weight: 800; color: #fff;
    letter-spacing: 0; line-height: 1.1;
}
.brand-sub {
    font-size: 10px; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 2px; margin-top: 3px;
}

/* ── Header Stats Strip ── */
.header-stats { display: flex; align-items: center; }

/* ── Brand Online count ── */
.brand-online {
    display: flex; align-items: center; gap: 4px;
    margin-top: auto;
    font-size: 8px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 1.5px;
    white-space: nowrap;
}
.online-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 5px #4ade80;
    animation: online-pulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes online-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ── Header Affixes ── */
.header-affixes { display: flex; align-items: center; gap: 8px; }
.header-affixes-label {
    font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--text-secondary); white-space: nowrap; margin-right: 2px;
}
.header-affix-icon {
    width: 30px; height: 30px; border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.12);
    cursor: default; display: block;
    transition: transform 0.12s, border-color 0.12s;
}
.header-affix-icon:hover { transform: scale(1.12); border-color: rgba(255,255,255,0.4); }

/* JS-driven affix tooltip */
.affix-tooltip {
    display: none; position: fixed; z-index: 9999;
    background: #1a1a2e; border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px; padding: 9px 12px; max-width: 280px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.7); pointer-events: none;
}
.affix-tooltip-name { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.affix-tooltip-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.hstat {
    display: flex; flex-direction: column; align-items: center;
    padding: 4px 22px;
    border-right: 1px solid rgba(255,255,255,0.07);
}
.hstat:last-child { border-right: none; padding-right: 0; }
.hstat:first-child { padding-left: 0; }
.hstat-val {
    font-size: 21px; font-weight: 800; color: var(--accent-gold);
    line-height: 1; font-variant-numeric: tabular-nums;
}
.hstat-label {
    font-size: 9px; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 1.2px; margin-top: 4px; white-space: nowrap;
}

/* ── Site Nav ── */
.site-nav {
    background: rgba(11,18,30,0.97);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex; gap: 0;
    overflow: visible;
    justify-content: center;
    position: sticky; top: 0; z-index: 10;
}
.loot-sub-nav {
    background: rgba(9,15,27,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    position: sticky;
    top: 44px;
    z-index: 9;
}
.loot-sub-nav[hidden] { display: none; }
.loot-sub-nav-left { grid-column: 1; }
.loot-sub-nav-tabs {
    grid-column: 2;
    position: relative;
    display: flex;
    align-items: stretch;
}
.loot-sub-nav-context {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-right: 4px;
    min-width: 0;
    overflow: hidden;
}
.loot-sub-nav-ctx-sep {
    color: var(--text-muted, #4a5568);
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.loot-sub-nav-ctx-name {
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.loot-sub-nav-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 22px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
}
.loot-sub-nav-btn:hover { color: var(--text-primary); }
.loot-sub-nav-btn.active { color: var(--accent-gold); }
.loot-sub-nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 2px 2px 0 0;
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.site-nav a {
    padding: 13px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: var(--text-primary); border-bottom-color: rgba(233,69,96,0.45); }
.site-nav a.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }
.season-picker {
    display: flex;
    align-items: center;
    gap: 7px;
    position: absolute;
    top: 50%;
    right: 32px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.season-picker select {
    width: 92px;
    padding: 5px 24px 5px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}

/* Dropdown nav item */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}
.nav-dropdown-trigger {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 13px 18px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger { color: var(--text-primary); border-bottom-color: rgba(233,69,96,0.45); }
.nav-dropdown-trigger.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }
.nav-dropdown-caret { width: 10px; height: 6px; flex-shrink: 0; opacity: 0.7; transition: transform 0.2s; }
.nav-dropdown.open .nav-dropdown-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: rgba(11,18,30,0.98);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
    padding: 11px 18px;
    border-bottom: none;
    border-left: 2px solid transparent;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); border-left-color: rgba(233,69,96,0.45); }
.nav-dropdown-menu a.active { color: var(--accent-gold); border-left-color: var(--accent-gold); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.container { max-width: 1800px; margin: 0 auto; padding: 24px; }

.section-title {
    font-size: 18px; font-weight: 600; color: var(--text-primary);
    margin: 28px 0 12px; display: flex; align-items: center; gap: 8px;
}
.section-title::before { content: ''; width: 4px; height: 20px; background: var(--accent); border-radius: 2px; }
.tab-bar {
    display: flex; gap: 4px; margin-bottom: 20px;
    border-bottom: 2px solid var(--border); padding-bottom: 0;
}
.tab {
    padding: 10px 20px; font-size: 14px; font-weight: 500; text-decoration: none;
    color: var(--text-secondary); border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all 0.2s; display: inline-block;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }
.is-loading { opacity: 0.35; pointer-events: none; transition: opacity 0.1s; }

/* ── Consumable compliance (boss filter) ── */
.compliance-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 16px;
}
.compliance-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.compliance-label { font-weight: 700; font-size: 15px; }
.compliance-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.compliance-badge {
    font-size: 13px; font-weight: 600; padding: 3px 10px;
    border-radius: 12px; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}
.compliance-miss {
    font-size: 11px; font-weight: 700; color: #e74c3c;
    background: rgba(231,76,60,0.1); border: 1px solid rgba(231,76,60,0.3);
    padding: 1px 6px; border-radius: 4px; margin-left: 4px;
}
.compliance-player {
    padding: 5px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
    border-bottom: 1px solid var(--border);
}
.compliance-player:last-child { border-bottom: none; }
.compliance-ok { color: #2ecc71; font-size: 13px; padding: 4px 0; }
.tab-content { display: none; }
.tab-content.active {
    display: block;
    animation: tab-page-enter 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tab-page-enter {
    from { opacity: 0; transform: translateY(10px) scale(0.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .tab-content.active { animation: none; }
}
.table-wrapper {
    overflow-x: auto; border-radius: 8px;
    border: 1px solid var(--border); margin-bottom: 24px;
    background: rgba(255,255,255,0.015);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    background: var(--bg-table); color: var(--text-secondary); font-weight: 600;
    text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px;
    padding: 10px 12px; text-align: center; cursor: pointer; user-select: none;
    white-space: nowrap; border-bottom: 2px solid var(--accent);
    position: sticky; top: 0; z-index: 2;
}
thead th:hover { color: var(--text-primary); background: #1a4a7a; }
thead th:first-child { text-align: left; }
thead th::after {
    content: ' ▲';
    color: var(--accent-gold);
    display: inline-block;
    width: 1em;
    margin-left: 2px;
    opacity: 0;
}
thead th.sorted-asc::after {
    content: ' ▲';
    opacity: 1;
}
thead th.sorted-desc::after {
    content: ' ▼';
    opacity: 1;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:hover { background: rgba(233, 69, 96, 0.08); }
td { padding: 8px 12px; text-align: center; white-space: nowrap; }
td:first-child { text-align: left; font-weight: 600; }
.bar-row { display: flex; align-items: center; margin-bottom: 4px; gap: 8px; }
.bar-label { width: 150px; font-size: 13px; font-weight: 500; text-align: right; flex-shrink: 0; }
.bar-track {
    flex: 1; height: 24px; background: rgba(255,255,255,0.05);
    border-radius: 4px; overflow: hidden; position: relative;
}
.bar-fill {
    height: 100%; border-radius: 4px; transition: width 0.6s ease;
    display: flex; align-items: center; padding-left: 8px;
    font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.encounter-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.encounter-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; padding: 16px; position: relative;
}
.encounter-card.has-kill { border-color: rgba(46,204,113,0.5); }
.enc-kill-badge {
    position: absolute; top: 10px; right: 12px;
    font-size: 11px; font-weight: 700; color: #2ecc71;
    background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.3);
    border-radius: 4px; padding: 2px 7px;
}
.diff-filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.diff-btn {
    padding: 5px 16px; border-radius: 20px; border: 1px solid var(--border);
    background: transparent; cursor: pointer; font-size: 12px; font-weight: 600;
    color: var(--text-secondary); transition: all 0.2s;
}
.diff-btn.active, .diff-btn:hover { background: var(--bg-table); border-color: var(--accent-gold); color: var(--text-primary); }
.diff-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.diff-mythic  { background: rgba(233,69,96,0.15); color: var(--difficulty-mythic); border: 1px solid rgba(233,69,96,0.35); }
.diff-heroic  { background: rgba(163,53,238,0.15); color: var(--difficulty-heroic); border: 1px solid rgba(163,53,238,0.35); }
.diff-normal  { background: rgba(46,204,113,0.12); color: var(--difficulty-normal); border: 1px solid rgba(46,204,113,0.28); }
.encounter-card .enc-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.encounter-card .enc-diff { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.encounter-card .enc-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); }
.encounter-card .enc-stats strong { color: var(--text-primary); }
.zero-val { color: #e74c3c; font-weight: 700; }
.cell-red     { color: #e74c3c; font-weight: 700; }
.cell-yellow  { color: #f5c542; font-weight: 600; }
.cell-green   { color: #2ecc71; font-weight: 600; }
.cell-neutral { color: #a0a0b0; }
.guild-member td:first-child { color: #2ecc71; font-weight: 700; }
.guild-member { border-left: 3px solid #2ecc71; }
.player-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.player-cell .player-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 100px; }
.guild-tag {
    display: inline-flex; align-items: center; flex-shrink: 0;
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 1px 5px; border-radius: 3px;
    background: rgba(46,204,113,0.2); color: #2ecc71;
}
.controls {
    display: flex; justify-content: flex-start; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.controls-left  { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.controls-right { display: flex; gap: 12px; align-items: center; flex-shrink: 0; margin-left: auto; }
.controls input, .controls select {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-primary); padding: 6px 12px; border-radius: 6px; font-size: 13px;
    min-height: 31px;
}
.controls input:focus, .controls select:focus { outline: none; border-color: var(--accent); }
.controls input:focus-visible, .controls select:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}
.empty-state {
    padding: 22px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}
.empty-state strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

/* Mythic tab */
.mythic-banner {
    background: linear-gradient(135deg, #1a0a0e 0%, #2a0a14 50%, #1a1a2e 100%);
    border: 1px solid #6a1428; border-radius: 12px;
    padding: 24px 28px; margin-bottom: 28px; position: relative; overflow: hidden;
}
.mythic-banner::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(233,69,96,0.08) 0%, transparent 70%);
}
.mythic-banner-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.mythic-title-text { font-size: 22px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.mythic-score { font-size: 42px; font-weight: 900; color: var(--accent-gold); line-height: 1; }
.mythic-score span { font-size: 22px; color: var(--text-secondary); font-weight: 400; margin-left: 4px; }
.mythic-prog-track {
    height: 12px; background: rgba(255,255,255,0.07); border-radius: 6px; overflow: hidden; margin-bottom: 12px;
}
.mythic-meta-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.mythic-meta-item { font-size: 13px; color: var(--text-secondary); }
.mythic-meta-item strong { color: var(--text-primary); }

/* Affixes card */
.affixes-card {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 20px; margin-bottom: 16px;
}
.affixes-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-secondary); white-space: nowrap;
}
.affixes-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.affix-item {
    display: flex; align-items: center; gap: 8px;
}
.affix-icon { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--border); }
.affix-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.affix-name:hover { color: var(--accent); }

/* Guild rankings in mythic banner */
.mythic-rankings-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 6px 14px; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
    font-size: 13px;
}
.rank-label { color: var(--text-secondary); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; margin-right: 2px; }
.rank-sep   { color: var(--text-secondary); opacity: 0.4; }
.rank-item strong { color: var(--accent-gold); }
.boss-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.boss-card {
    background: var(--bg-card); border-radius: 10px;
    border: 1px solid var(--border); overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}
.boss-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.boss-card.killed { border-color: rgba(46,204,113,0.35); }
.boss-card.prog   { border-color: rgba(245,197,66,0.35); }
.boss-card-header {
    padding: 14px 16px 12px; display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 1px solid var(--border);
}
.boss-card.killed .boss-card-header { background: linear-gradient(135deg, rgba(46,204,113,0.08), transparent); }
.boss-card.prog   .boss-card-header { background: linear-gradient(135deg, rgba(245,197,66,0.08), transparent); }
.boss-name   { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.boss-status {
    font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}
.boss-status.killed { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.boss-status.prog   { background: rgba(245,197,66,0.12); color: #f5c542; border: 1px solid rgba(245,197,66,0.3); }
.boss-stats-row { display: flex; padding: 12px 16px; gap: 8px; border-bottom: 1px solid var(--border); }
.boss-stat { flex: 1; text-align: center; }
.boss-stat .val { display: block; font-size: 20px; font-weight: 700; line-height: 1.1; }
.boss-stat .lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-top: 2px; }
.boss-stat.kills .val  { color: #2ecc71; }
.boss-stat.best-pct .val { color: #f5c542; }
.boss-stat.time .val   { color: #74b9ff; }
.boss-chart    { padding: 10px 12px 4px; }
.boss-kill-info { padding: 4px 16px 8px; font-size: 12px; color: var(--text-secondary); }
.boss-sessions { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); }
.boss-session-row  { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.boss-session-date { color: var(--text-secondary); }
.boss-session-pulls { color: var(--text-primary); }
.boss-session-kill { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: rgba(46,204,113,0.15); color: #2ecc71; margin-left: 6px; }

/* Deaths tab */
.death-stat-strip { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.death-stat-chip {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 16px; text-align: center; min-width: 90px;
}
.death-stat-chip .val { font-size: 22px; font-weight: 800; color: var(--accent); display: block; line-height: 1; }
.death-stat-chip .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-top: 3px; }
.death-heatmap { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; overflow-x: auto; }
.death-heatmap-row { display: flex; align-items: center; gap: 0; min-width: max-content; }
.death-heatmap-name { width: 160px; font-size: 12px; font-weight: 600; text-align: right; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.death-heatmap-cells { display: flex; gap: 0; }
.death-heat-cell {
    width: 34px; height: 28px; display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; cursor: default; border-right: 1px solid rgba(255,255,255,0.03);
}
.death-heat-0   { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.2); }
.death-heat-1   { background: rgba(233,69,96,0.18); color: #e94560; }
.death-heat-2   { background: rgba(233,69,96,0.38); color: #fff; }
.death-heat-3   { background: rgba(233,69,96,0.62); color: #fff; }
.death-heat-hi  { background: #e94560; color: #fff; }
.death-heat-sep { width: 8px; flex-shrink: 0; background: transparent; border-right: 2px solid var(--border); }
.death-heat-total { width: 44px; font-size: 12px; font-weight: 700; color: #e74c3c; text-align: center; flex-shrink: 0; padding-left: 6px; }
.death-heat-footer .death-heat-cell { color: var(--accent-gold); font-size: 10px; height: 24px; background: rgba(255,255,255,0.03); }
.death-boss-label { font-size: 10px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px; }

/* Loot class filter pills */
.loot-class-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.loot-class-pill {
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.loot-class-pill:hover { border-color: currentColor; background: rgba(255,255,255,0.08); }
.loot-class-pill.active {
    border-color: currentColor; background: rgba(255,255,255,0.10);
    color: var(--text-primary);
}
/* WoW class colours */
.cls-DeathKnight { color: var(--class-death-knight); }
.cls-DemonHunter { color: var(--class-demon-hunter); }
.cls-Druid       { color: var(--class-druid); }
.cls-Evoker      { color: var(--class-evoker); }
.cls-Hunter      { color: var(--class-hunter); }
.cls-Mage        { color: var(--class-mage); }
.cls-Monk        { color: var(--class-monk); }
.cls-Paladin     { color: var(--class-paladin); }
.cls-Priest      { color: var(--class-priest); }
.cls-Rogue       { color: var(--class-rogue); }
.cls-Shaman      { color: var(--class-shaman); }
.cls-Warlock     { color: var(--class-warlock); }
.cls-Warrior     { color: var(--class-warrior); }

/* Killing blow section */
.kb-grid { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.kb-raid-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.kb-raid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kb-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.kb-card-title { font-size: 13px; font-weight: 700; color: var(--accent-gold); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kb-name { font-size: 11px; color: var(--text-secondary); width: 140px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-bar-track { flex: 1; height: 14px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.kb-bar-fill  { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s; }
.kb-count { font-size: 11px; color: var(--text-secondary); width: 28px; text-align: right; flex-shrink: 0; }

/* Members tab */
.members-status { padding: 24px; text-align: center; color: var(--text-secondary); font-size: 14px; }
.members-progress { margin: 12px auto 0; max-width: 360px; }
.members-progress-bar  { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.members-progress-fill { height: 100%; background: var(--accent-gold); border-radius: 2px; transition: width 0.3s; }

/* ── Loading hero (phase 1 — no data yet) ── */
.loading-hero {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 380px; padding: 48px 24px; text-align: center; gap: 0;
}
@keyframes loadingSpin { to { transform: rotate(360deg); } }
.loading-spinner-ring {
    width: 76px; height: 76px;
    border: 5px solid rgba(245,197,66,0.15);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: loadingSpin 0.75s linear infinite;
    margin-bottom: 24px;
}
.loading-title {
    font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px;
}
.loading-sub {
    font-size: 14px; color: var(--text-secondary); margin-bottom: 22px; min-height: 20px;
}
.loading-bar-wrap {
    width: 100%; max-width: 420px; height: 7px;
    background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden;
    margin-bottom: 16px;
}
.loading-bar-fill {
    height: 100%; background: var(--accent-gold); border-radius: 4px;
    transition: width 0.4s ease;
}
.loading-note {
    font-size: 12px; color: rgba(255,255,255,0.28); letter-spacing: 0.01em;
}
.season-switch-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(9,14,22,0.94); text-align: center;
}
.season-switch-overlay[hidden] { display: none; }
.season-switch-overlay .loading-hero { width: min(520px, 100%); min-height: 0; }
.season-switch-overlay .loading-spinner-ring { width: 58px; height: 58px; margin-bottom: 18px; }
.members-attribution { text-align: center; padding: 16px 0 8px; font-size: 12px; color: var(--text-secondary); }
.members-attribution a { color: var(--accent); text-decoration: none; }
.members-attribution a:hover { text-decoration: underline; }
.members-refresh-btn {
    background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
    padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.members-refresh-btn:hover  { border-color: var(--accent); color: var(--text-primary); }
.members-refresh-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.mplus-score { font-weight: 700; }
.slot-pip { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 1px 4px; border-radius: 3px; white-space: nowrap; line-height: 1.4; }
.slot-pip-ok    { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.slot-pip-bad   { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.slot-pip-empty { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.08); }
.slot-pip-myth  { background: rgba(163,53,238,0.18); color: var(--track-myth); border: 1px solid rgba(163,53,238,0.4); font-weight: 800; }
.slot-pip-hero  { background: rgba(0,112,221,0.15); color: var(--track-hero); border: 1px solid rgba(0,112,221,0.4); }
.slot-pip-champ { background: rgba(46,204,113,0.12); color: var(--track-champion); border: 1px solid rgba(46,204,113,0.3); }
.enchant-ok   { color: #2ecc71; font-weight: 600; }
.enchant-warn { color: #f5c542; font-weight: 600; }
.enchant-bad  { color: #e74c3c; font-weight: 700; }
.enchant-na {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: rgba(220, 225, 235, 0.85);
    background: rgba(220, 225, 235, 0.08);
    border: 1px solid rgba(220, 225, 235, 0.2);
}
.prog-mythic  { color: var(--difficulty-mythic); font-weight: 700; }
.prog-heroic  { color: var(--difficulty-heroic); font-weight: 600; }
.prog-normal  { color: var(--difficulty-normal); }

/* Members column groups */
.grp-stats-head { background: rgba(255,255,255,0.03) !important; }
.grp-tier-head  { background: rgba(245,197,66,0.07) !important; }
.grp-enc-head   { background: rgba(116,185,255,0.06) !important; }
.slot-th        { vertical-align: bottom !important; padding: 6px 8px !important; height: auto !important; cursor: default !important; user-select: none; white-space: nowrap; }
.slot-th span   { font-size: 11px; font-weight: 600; display: block; text-transform: none; letter-spacing: 0; }
.grp-tier-head.slot-th span { color: rgba(245,197,66,0.9); }
.grp-enc-head.slot-th span  { color: rgba(116,185,255,0.85); }
.grp-tier-cell  { background: rgba(245,197,66,0.03); }
.grp-enc-cell   { background: rgba(116,185,255,0.03); }
tbody tr:hover .grp-tier-cell { background: rgba(245,197,66,0.09) !important; }
tbody tr:hover .grp-enc-cell  { background: rgba(116,185,255,0.09) !important; }
.grp-first-tier { border-left: 2px solid rgba(245,197,66,0.35) !important; }
.grp-first-enc  { border-left: 2px solid rgba(116,185,255,0.3) !important; }

/* ── Performance (Parse) tab ── */
.parse-cell-grey   { background: rgba(157,157,157,0.1); color: var(--wow-poor); font-weight: 600; }
.parse-cell-green  { background: rgba(30,255,0,0.1); color: var(--wow-uncommon); font-weight: 600; }
.parse-cell-blue   { background: rgba(0,112,221,0.15); color: var(--wow-rare); font-weight: 600; }
.parse-cell-purple { background: rgba(163,53,238,0.15); color: var(--wow-epic); font-weight: 700; }
.parse-cell-orange { background: rgba(255,128,0,0.15); color: var(--wow-legendary); font-weight: 700; }
.parse-cell-gold   { background: rgba(230,204,128,0.18); color: var(--wow-artifact); font-weight: 800; }
.parse-cell-pink   { background: rgba(226,104,168,0.18); color: var(--wcl-rank-one); font-weight: 800; }
.parse-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.parse-pip {
    display: inline-block; padding: 2px 9px; border-radius: 4px;
    font-size: 11px; font-weight: 700; white-space: nowrap;
}

/* Weekly M+ tab */
.weekly-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.weekly-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 108px;
    text-align: center;
}
.weekly-chip .val {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
}
.weekly-chip .val.long {
    font-size: 12px;
    line-height: 1.2;
}
.weekly-chip .lbl {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.vault-slots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.vault-slot {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    gap: 1px;
}
.vault-slot small {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.85;
}
.vault-slot.ok {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.14);
    border: 1px solid rgba(46, 204, 113, 0.32);
}
.vault-slot.incomplete {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.14);
    border: 1px solid rgba(241, 196, 15, 0.32);
}
.vault-slot.raid-normal {
    color: #6cd46c;
    background: rgba(108, 212, 108, 0.14);
    border: 1px solid rgba(108, 212, 108, 0.32);
}
.vault-slot.raid-heroic {
    color: #c67cff;
    background: rgba(166, 84, 255, 0.16);
    border: 1px solid rgba(166, 84, 255, 0.3);
}
.vault-slot.raid-mythic {
    color: #ff7a91;
    background: rgba(233, 69, 96, 0.14);
    border: 1px solid rgba(233, 69, 96, 0.3);
}
.vault-slot.empty {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}
.vault-matrix {
    display: grid;
    grid-template-columns: 56px repeat(3, minmax(34px, 1fr));
    gap: 5px;
    align-items: center;
    min-width: 176px;
}
.vault-row-label {
    font-size: 9px;
    text-transform: none;
    letter-spacing: 0.2px;
    color: var(--text-secondary);
    text-align: right;
    padding-right: 2px;
}

/* ── Attendance tab ── */
.att-present { background: rgba(46,204,113,0.2);  color: #2ecc71; font-weight: 700; font-size: 13px; }
.att-absent  { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.18); font-size: 12px; }

/* Sticky fixed columns — Player, Nights, Rate, Pulls */
#attTable th:nth-child(1), #attTable td:nth-child(1) { position: sticky; left: 0;     min-width: 200px; z-index: 3; }
#attTable th:nth-child(2), #attTable td:nth-child(2) { position: sticky; left: 200px; min-width: 80px;  z-index: 3; }
#attTable th:nth-child(3), #attTable td:nth-child(3) { position: sticky; left: 280px; min-width: 62px;  z-index: 3; }
#attTable th:nth-child(4), #attTable td:nth-child(4) { position: sticky; left: 342px; min-width: 58px;  z-index: 3; }
/* Sticky header row — always visible while scrolling down */
#attTable thead th { position: sticky; top: 0; background: var(--bg-table); z-index: 3; }
/* Header corners need highest z-index (sticky top + sticky left) */
#attTable thead th:nth-child(-n+4) { z-index: 5; background: var(--bg-table); }
/* Body sticky cells need opaque background so scrolling content hides behind them */
#attTable tbody td:nth-child(-n+4) { background: var(--bg-dark); }
#attTable tbody tr:hover td:nth-child(-n+4) { background: #1e1d33; }

/* Sticky strip — sticks below the navbar as a compact horizontal scroll handle */
.att-strip-wrap {
    position: sticky;
    top: 44px;
    z-index: 6;
}
/* Top scroll strip — synced scrollbar aligned to date columns only */
#attDateStripOuter {
    margin-left: 400px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}
#attDateStripOuter::-webkit-scrollbar         { height: 6px; }
#attDateStripOuter::-webkit-scrollbar-track   { background: transparent; }
#attDateStripOuter::-webkit-scrollbar-thumb   { background: rgba(255,255,255,0.2); border-radius: 3px; }
#attDateStripOuter::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); border-radius: 3px; }
#attDateStripOuter::-webkit-scrollbar-button  { display: none; }
#attDateStrip {
    display: flex;
    white-space: nowrap;
    height: 1px;  /* width spacer only — scrollbar track is the visible part */
}
/* Hide the native bottom scrollbar — mirror scrollbar replaces it */
#attTableWrapper { overflow-x: scroll; overflow-y: auto; max-height: calc(100vh - 250px); scrollbar-width: none; -ms-overflow-style: none; }
#attTableWrapper::-webkit-scrollbar { display: none; }

/* ── Loot Planning tab ── */

/* Tab switcher — segmented control */
.loot-view-tabs {
    display: flex;
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}
.loot-tab-btn {
    flex: 1;
    padding: 7px 20px;
    border-radius: 7px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.loot-tab-btn:hover:not(.active) {
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
}
.loot-tab-btn.active {
    background: linear-gradient(135deg, #f0a830 0%, #c87820 100%);
    color: #110d0a;
    box-shadow: 0 2px 12px rgba(240, 168, 48, 0.3);
    font-weight: 800;
}

/* By Boss boss selector */
#lootBossSelect {
    appearance: none;
    background: var(--surface-2, #1e1b2e)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c59a2d' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat right 12px center;
    background-size: 10px 7px;
    border: 1px solid var(--border, #3a3650);
    border-radius: 8px;
    color: var(--text-primary, #e0e0e0);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    min-width: 220px;
    padding: 7px 36px 7px 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
#lootBossSelect:focus {
    outline: none;
    border-color: var(--accent-gold, #c59a2d);
    box-shadow: 0 0 0 2px rgba(197, 154, 45, 0.2);
}
#lootBossSelect option {
    background: #1e1b2e;
    color: var(--text-primary, #e0e0e0);
}

/* "or" divider between Load and Open Raidbots */
.loot-controls-or {
    color: var(--text-secondary, #888);
    font-size: 11px;
    padding: 0 2px;
    white-space: nowrap;
    user-select: none;
}

/* Generate Droptimizer button */
.loot-generate-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(240, 168, 48, 0.45);
    background: rgba(240, 168, 48, 0.1);
    color: #f0a830;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s, opacity 0.18s;
}
.loot-generate-btn:hover:not(:disabled) {
    background: rgba(240, 168, 48, 0.22);
    border-color: rgba(240, 168, 48, 0.75);
}
.loot-generate-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

/* Help tooltip badge */
.loot-help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: default;
    position: relative;
    flex-shrink: 0;
    user-select: none;
}
.loot-help-tip:hover,
.loot-help-tip:focus { color: var(--text-primary); outline: none; border-color: rgba(255,255,255,0.35); }
.loot-help-tip-body {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    min-width: 220px;
    background: #1e1b17;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    pointer-events: none;
    white-space: normal;
    z-index: 200;
}
.loot-help-tip-body::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(255,255,255,0.12);
}
.loot-help-tip-body::before {
    content: '';
    position: absolute;
    bottom: calc(100% - 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #1e1b17;
    z-index: 1;
}
.loot-help-tip:hover .loot-help-tip-body,
.loot-help-tip:focus .loot-help-tip-body { display: block; }

.loot-boss-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}
.loot-boss-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}
.loot-boss-name  { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.loot-raid-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; }
.loot-boss-meta  { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.loot-tier-badge {
    font-size: 10px; font-weight: 700;
    background: rgba(245,197,66,0.12); color: var(--accent-gold);
    border: 1px solid rgba(245,197,66,0.30); border-radius: 4px; padding: 2px 7px;
    white-space: nowrap;
}
.loot-gear-strip {
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    min-height: 34px;
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.loot-gear-items { display: flex; flex-wrap: wrap; gap: 4px; }
.loot-gear-pip {
    font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: 4px; padding: 2px 6px; white-space: nowrap; cursor: default;
}
.loot-gear-pip.slot-pip-myth  { color: var(--track-myth); }
.loot-gear-pip.slot-pip-hero  { color: var(--track-hero); }
.loot-gear-pip.slot-pip-champ { color: var(--track-champion); }
.loot-gear-empty { color: var(--text-secondary); font-size: 12px; }
.loot-picks-section { padding: 12px 16px; }
.loot-picks-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 22px; }
.loot-no-picks { color: var(--text-secondary); font-size: 12px; }
.loot-add-btn { font-size: 11px; }
.loot-pick-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.07); border: 1px solid var(--border);
    border-radius: 6px; padding: 3px 8px;
    font-size: 12px; font-weight: 500; white-space: nowrap; cursor: default;
}
.loot-pri-label { font-size: 10px; font-weight: 700; }
.loot-chip-del {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 15px; line-height: 1;
    padding: 0 0 0 2px; margin-left: 1px; transition: color 0.15s;
}
.loot-chip-del:hover { color: var(--accent); }
.loot-add-form {
    padding: 0 16px 12px;
    border-top: 1px solid var(--border);
}
/* Available loot items section */
.loot-available-section {
    border-bottom: 1px solid var(--border);
    padding: 10px 0 0;
}
.loot-section-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-secondary);
    padding: 0 16px 6px;
    display: flex; align-items: center; gap: 6px;
}
.loot-class-badge {
    font-size: 9px; font-weight: 700;
    background: rgba(245,197,66,0.1); color: var(--accent-gold);
    border: 1px solid rgba(245,197,66,0.2);
    border-radius: 3px; padding: 1px 5px;
    text-transform: none; letter-spacing: 0;
}
.loot-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 6px;
    padding: 0 16px 12px;
}
.loot-item-card {
    display: flex; align-items: flex-start; gap: 7px;
    padding: 7px 10px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 6px; text-decoration: none; cursor: pointer; color: inherit;
    transition: background 0.15s, border-color 0.15s;
    min-width: 0; position: relative;
}
.loot-item-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.18); }
/* Suppress Wowhead's injected icon if it ever attaches to a child element */
.loot-item-card > .iconsmall { display: none !important; }
.loot-item-icon { width: 28px; height: 28px; border-radius: 4px; flex-shrink: 0; }
.loot-item-icon-link { display: inline-flex; flex-shrink: 0; line-height: 0; }
.loot-item-wh-link {
    position: absolute; top: 5px; right: 8px;
    font-size: 11px; line-height: 1;
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    transition: color 0.15s;
}
.loot-item-wh-link:hover { color: var(--accent-gold); }
.loot-item-card--picked {
    border-color: var(--border) !important;
    background: rgba(255,255,255,0.03) !important;
    box-shadow: inset 3px 0 var(--pick-color);
}
.loot-item-card--picked::after {
    content: '✓';
    position: absolute;
    top: 4px; right: 24px;
    font-size: 11px;
    color: var(--pick-color);
    font-weight: 700;
    line-height: 1;
}
.loot-item-card--suggested {
    border-color: rgba(245,197,66,0.56);
    background: linear-gradient(90deg, rgba(245,197,66,0.11), rgba(255,255,255,0.035) 55%);
}
.loot-item-card--suggested:hover { border-color: var(--accent-gold); }
.loot-suggested-bis-badge {
    align-self: flex-start;
    margin-top: 2px;
    padding: 2px 5px;
    border: 1px solid rgba(245,197,66,0.45);
    border-radius: 4px;
    color: var(--accent-gold);
    background: rgba(245,197,66,0.1);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
/* Droptimizer upgrade badge */
.loot-drop-badge {
    display: inline-block;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 100, 0.3);
    background: rgba(0, 255, 100, 0.1);
    color: #00e676;
    line-height: 1.4;
    align-self: flex-start;
}
/* Priority badge on picked item card */
.loot-item-prio-badge {
    display: inline-block;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid;
    line-height: 1.4;
    align-self: flex-start;
}
/* Floating priority picker */
.loot-priority-picker {
    display: none;
    position: absolute;
    z-index: 1000;
    background: #1a1d2e;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 10px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.loot-priority-btns { display: flex; flex-direction: column; }
.loot-picker-note {
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    padding: 5px 8px;
    resize: none;
}
.loot-picker-note:focus { outline: none; border-color: var(--accent); }
.loot-chip-note {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    width: 100%;
    margin-left: 0;
    opacity: 0.85;
}
.loot-priority-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.loot-priority-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pcolor, var(--text));
    cursor: pointer;
    margin-bottom: 3px;
    transition: background 0.12s, border-color 0.12s;
}
.loot-priority-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: var(--pcolor, var(--border));
}
.loot-priority-sep { border: none; border-top: 1px solid var(--border); margin: 6px 0; }
.loot-priority-btn--remove { color: #ff6b6b !important; font-weight: 500; font-size: 12px; }
.loot-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loot-item-name {
    font-size: 12px; font-weight: 600; color: #a335ee;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.loot-item-slot-badge { font-size: 10px; color: #74b9ff; }
.loot-item-pick-note {
    font-size: 10px; color: var(--text-primary); font-style: italic;
}
/* Wowhead links inside pick chips */
.loot-chip-item-link {
    color: inherit; text-decoration: none;
    display: inline-flex; align-items: center; gap: 3px;
}
.loot-chip-item-link:hover { text-decoration: underline; }
.loot-pick-chip img { width: 13px; height: 13px; border-radius: 2px; }
.loot-add-form input, .loot-add-form select {
    background: var(--bg-dark); border: 1px solid var(--border);
    color: var(--text-primary); padding: 5px 10px; border-radius: 6px;
    font-size: 12px; min-height: 29px;
}
.loot-add-form input:focus, .loot-add-form select:focus {
    outline: none; border-color: var(--accent-gold);
}
/* Searchable raider dropdown */
.loot-raider-dropdown {
    position: relative;
    flex-shrink: 0;
    width: 288px;
}
.loot-raider-dropdown input {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    min-height: 31px;
}
.loot-raider-dropdown input:focus {
    outline: none;
    border-color: var(--accent);
}
.loot-raider-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #1a1d2e;
    border: 1px solid var(--accent);
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 200;
    list-style: none;
    margin: 0;
    padding: 4px 0;
}
.loot-raider-list li {
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text);
    white-space: nowrap;
}
.loot-raider-list li:hover,
.loot-raider-list li.hl {
    background: rgba(255, 255, 255, 0.08);
}

/* Mine view — two-column layout */
.loot-mine-outer {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 1600px;
}
.loot-mine-left-col {
    flex: 3;
    min-width: 0;
    max-width: 940px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.loot-mine-right-col {
    flex: 2;
    min-width: 0;
    max-width: 620px;
    view-transition-name: loot-plan-content;
}
.loot-mine-outer--gear-hidden {
    display: block;
    width: 100%;
}
.loot-mine-outer--gear-hidden .loot-mine-left-col,
.loot-mine-outer--gear-hidden .loot-mine-right-col {
    width: 100%;
    max-width: none;
}
.loot-mine-outer--gear-hidden .loot-mine-left-col { margin-bottom: 12px; }
.loot-mine-outer--gear-hidden .loot-player-context { justify-content: flex-start; }
.loot-mine-outer--gear-hidden .loot-player-context::before { display: none; }
.loot-player-context {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
    view-transition-name: loot-player-controls;
}
.loot-player-context::before {
    content: '';
    flex: 0 0 34px;
}
.loot-gear-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    width: 34px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255,255,255,0.025);
    color: var(--text-secondary);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.loot-gear-toggle:hover {
    border-color: rgba(245,197,66,0.45);
    color: var(--text-primary);
}
.loot-gear-toggle-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    color: var(--accent-gold);
}
.loot-gear-toggle-icon svg {
    width: 18px;
    height: 18px;
}
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-group(loot-player-controls),
::view-transition-group(loot-plan-content) {
    animation-duration: 360ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
::view-transition-group(loot-armory) {
    animation-duration: 300ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
html.loot-gear-collapsing::view-transition-old(loot-armory) {
    animation: loot-armory-collapse 220ms cubic-bezier(0.4, 0, 1, 1) both;
    transform-origin: right center;
}
html.loot-gear-expanding::view-transition-new(loot-armory) {
    animation: loot-armory-expand 300ms 60ms cubic-bezier(0.22, 1, 0.36, 1) both;
    transform-origin: left center;
}
@keyframes loot-armory-collapse {
    to { opacity: 0; transform: translateX(-20px) scale(0.985); }
}
@keyframes loot-armory-expand {
    from { opacity: 0; transform: translateX(-20px) scale(0.985); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
.loot-plan-header {
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(15,24,43,0.72);
    overflow: hidden;
}
.loot-plan-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
}
.loot-plan-control-group {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}
.loot-plan-control-label {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.loot-bis-source {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 0;
}
.loot-bis-guide {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.loot-bis-guide:hover { text-decoration: underline; }
.loot-bis-guide[aria-disabled="true"] {
    color: var(--text-muted);
    pointer-events: none;
}
.loot-bis-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
}
.loot-bis-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255,255,255,0.16);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: loot-bis-spin 700ms linear infinite;
}
@keyframes loot-bis-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .loot-bis-spinner { animation: none; }
}
.loot-mine-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 400px;
    color: var(--text-muted, #6b7a99);
    text-align: center;
    padding: 40px;
}
.loot-mine-empty-icon {
    font-size: 48px;
    opacity: 0.4;
}
.loot-mine-empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary, #8899bb);
}
.loot-mine-empty-sub {
    font-size: 0.9rem;
    max-width: 360px;
    line-height: 1.6;
    opacity: 0.7;
}
.loot-mine-filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.loot-mine-armory {
    /* width and sticky handled by parent .loot-mine-left-col */
    view-transition-name: loot-armory;
}

/* Profile component embedded in loot planner left panel */
.loot-mine-profile-page {
    padding: 0;
    margin: 0;
    max-width: none;
}
.loot-mine-armory .profile-page {
    zoom: 0.94; /* scale down — loot context only, overrides .profile-page zoom:1.2 */
}
/* ── CSS Subgrid: align weapons with bottom 2 gear rows of side columns ── */
/* Add 8 explicit rows (one per gear slot) to the profile layout grid */
.loot-mine-armory .profile-layout {
    grid-template-rows: repeat(8, auto);
    row-gap: 4px; /* matches .profile-armory-left gap:4px */
}
/* Side columns: subgrid containers spanning all 8 rows */
.loot-mine-armory .profile-armory-left,
.loot-mine-armory .profile-armory-right {
    display: grid;
    grid-row: 1 / 9;
    grid-template-rows: subgrid;
    gap: 0; /* replaced by parent row-gap */
}
/* Push left-column slots to the right edge so they sit flush against the model */
.loot-mine-armory .profile-armory-left {
    grid-template-columns: max-content;
    justify-content: end;
}
/* Side slots: same width as weapons */
.loot-mine-armory .profile-armory-left .profile-slot,
.loot-mine-armory .profile-armory-right .profile-slot {
    width: 280px;
}
/* Center column: subgrid spanning all 8 rows */
.loot-mine-armory .profile-center-col {
    display: grid;
    grid-row: 1 / 9;
    grid-template-rows: subgrid;
    min-width: 0;
    padding: 0;
    align-items: unset;
}
/* Content wrapper div inside center col: also subgrid */
.loot-mine-armory .profile-center-col > div {
    display: grid;
    grid-row: 1 / 9;
    grid-template-rows: subgrid;
    min-width: 0;           /* allow shrinking below model width so centering works */
    justify-items: center;  /* centre model and weapons — equal overflow on both sides */
}
/* Character model spans rows 1–6, sized to fill them */
.loot-mine-armory .profile-char-model {
    grid-row: 1 / 7;
    width: 100%;
    height: auto;
    flex: none;
    align-self: stretch;
    overflow: visible;
    margin-bottom: 0;
}
/* Weapons container spans rows 7–8 */
.loot-mine-armory .profile-armory-weapons {
    grid-row: 7 / 9;
    display: grid;
    grid-template-rows: subgrid;
    justify-content: unset;
    align-items: unset;
    width: auto;
    padding-top: 0;
    margin-top: 0;
}
/* Weapon slots: centered horizontally within the center column */
.loot-mine-armory .profile-armory-weapons .profile-slot {
    width: 280px;
    justify-self: center;
}
/* Slot name truncation in compact loot context */
.loot-mine-armory .profile-slot-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}
.loot-mine-char-info {
    padding: 8px 0 4px;
    text-align: center;
}
.loot-mine-char-info .profile-char-name { font-size: 1.3rem; font-weight: 700; }
.loot-mine-char-info .profile-char-sub  { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.loot-mine-char-info .profile-char-ilvl { font-size: 1rem; font-weight: 600; margin-top: 4px; display: inline-block; }

/* ── Shared utilities ── */
.log-analyze-btn { background: none; border: none; padding: 0; cursor: pointer; color: var(--accent); font-size: inherit; font-family: inherit; }
.log-analyze-btn:hover { text-decoration: underline; }
.link-inherit  { color: inherit; text-decoration: none; }
.link-plain    { text-decoration: none; }
.cell-faint    { color: rgba(255, 255, 255, 0.2); }
.cell-left     { text-align: left !important; }
.text-error    { color: #e74c3c; }
.text-muted-sm { color: var(--text-secondary); font-size: 12px; }

/* ── Data load error banner ── */
.data-load-error {
    padding: 60px 24px;
    text-align: center;
}
.data-load-error-title {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 8px;
}
.data-load-error-body {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
}
.data-load-error-hint {
    color: var(--text-secondary);
    font-size: 12px;
}
.data-load-error-hint code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── Roster group header row ── */
.grp-filler-th              { border-bottom: none !important; background: transparent; }
.grp-label-th               { text-align: center; font-size: 10px; letter-spacing: 2.5px; border-bottom: none !important; padding: 7px 4px 3px; }
.grp-stats-head.grp-label-th { color: rgba(255, 255, 255, 0.35); text-align: center; }
.grp-tier-head.grp-label-th  { color: rgba(245, 197, 66, 0.95); }
.grp-enc-head.grp-label-th   { color: rgba(116, 185, 255, 0.9); }
.non-sortable-th             { cursor: default !important; }
.non-sortable-th::after      { display: none !important; }
.non-sortable-th:hover       { color: inherit; }

/* ── Roster rows & cells ── */
.player-realm-label     { font-size: 10px; color: var(--text-secondary); font-weight: 400; }
.grp-vault-head         { background: rgba(24, 79, 128, 0.34) !important; color: #8fc8f7; }
.members-vault-cell     { min-width: 132px; padding: 5px 7px !important; background: rgba(24, 79, 128, 0.08); }
.members-vault-link     { display: grid; grid-template-columns: repeat(3, minmax(34px, 1fr)); gap: 5px; color: inherit; text-decoration: none; }
.members-vault-link:hover .vault-slot { filter: brightness(1.25); }
.members-row-prev-exp    { opacity: 0.45; }
.members-prev-ilvl-cell  { color: rgba(255,255,255,0.3); font-size: 11px; font-style: italic; }
.members-err-cell        { color: var(--text-secondary); }
.members-ilvl-cell       { font-weight: 700; }
.members-perf-cell       { font-weight: 700; }
.members-tier-count-cell { font-weight: 700; }

/* ── Deaths ── */
.kb-tag           { font-size: 11px; background: rgba(255,255,255,0.07); border-radius: 3px; padding: 1px 5px; margin-right: 3px; }
.death-bar-cell   { min-width: 120px; }
.death-bar-track  { height: 14px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.death-bar-fill   { height: 100%; border-radius: 3px; }
.deaths-no-killers { color: var(--text-secondary); font-size: 11px; }
.death-heatmap-row--header  { align-items: flex-end; margin-bottom: 2px; }
.death-heatmap-row--footer  { margin-top: 3px; }
.death-heat-header-cell     { height: 160px; align-items: flex-end; padding-bottom: 4px; background: transparent; border: none; }
.death-heat-footer-cell     { height: 26px; color: var(--accent-gold); font-size: 11px; background: rgba(255,255,255,0.04); border-top: 1px solid var(--border); }
.heat-header-name           { color: var(--text-secondary); font-size: 10px; padding-bottom: 4px; }
.heat-total-header          { color: var(--text-secondary); font-size: 10px; font-weight: 600; }
.death-boss-name-vert       { color: var(--text-secondary); font-size: 9px; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; overflow: hidden; max-height: 155px; line-height: 1.2; }
.heat-footer-label          { color: var(--text-secondary); font-size: 10px; font-style: italic; }
.heat-footer-total          { color: var(--accent-gold); font-size: 11px; }
.death-stat-chip .val-accent { color: var(--accent-gold); font-size: 14px; }
.heat-legend       { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 11px; color: var(--text-secondary); }
.heat-legend-item  { display: inline-flex; align-items: center; gap: 4px; }
.heat-legend-swatch { width: 22px; height: 16px; border-radius: 2px; display: inline-block; }

/* ── Encounters ── */
.enc-diff-row   { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid var(--border); }
.enc-diff-badge { min-width: 52px; }
.enc-diff-stats { font-size: 12px; color: var(--text-secondary); }
.enc-stat-kills { color: #2ecc71; }
.enc-stat-wipes { color: #e74c3c; }
.encounter-card .enc-stats { margin-bottom: 4px; }
.report-kills-cell { font-weight: 600; }

/* ── Mythic ── */
.mythic-subtitle        { color: var(--text-secondary); font-size: 12px; letter-spacing: 1px; margin-top: 4px; }
.mythic-legend          { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 10px; margin-bottom: 4px; }
.mythic-legend-item     { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.mythic-legend-dot      { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; display: inline-block; border: 1px solid rgba(255,255,255,0.1); }
.mythic-legend-dim      { font-size: 9px; opacity: 0.5; }
.boss-card-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.boss-prog-info         { color: #f5c542; }
.boss-session-wipes     { color: #a0a0b0; font-size: 11px; }
.trend-positive         { color: #2ecc71; font-size: 11px; font-weight: 700; }
.trend-negative         { color: #e74c3c; font-size: 11px; font-weight: 700; }

/* ── Performance ── */
.perf-absent-cell   { color: rgba(255, 255, 255, 0.15); }
.parse-legend-label { font-size: 11px; color: var(--text-secondary); margin-right: 8px; }

/* ── Attendance ── */
.att-rate-cell { font-weight: 700; }

/* ── Consumables ── */
.cons-zero-label  { font-size: 11px; color: #e74c3c; padding-left: 6px; }
.cons-loading-msg { color: var(--text-secondary); padding: 12px; }
.cons-error-msg   { color: #e74c3c; padding: 12px; }
.compliance-cell  { font-weight: 700; }

/* ── Loot ── */
.loot-pri-inline  { font-size: 10px; }
.loot-no-picks    { padding: 16px; }
.loot-mine-cards {
    min-width: 0;
}
.loot-wishlist {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid rgba(245,197,66,0.28);
    border-radius: 8px;
    background: rgba(15,24,43,0.72);
}
.loot-wishlist-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.loot-wishlist-header::-webkit-details-marker { display: none; }
.loot-wishlist-header::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s;
}
.loot-wishlist:not([open]) .loot-wishlist-header::before { transform: rotate(-45deg); }
.loot-wishlist-count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.loot-wishlist-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1px;
    border-top: 1px solid var(--border);
    background: #111b30;
}
.loot-wishlist-item {
    display: flex;
    align-items: stretch;
    min-width: 0;
    background: #111b30;
    box-shadow: inset 3px 0 var(--pick-color);
}
.loot-wishlist-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    padding: 9px 8px 9px 11px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.loot-wishlist-main:hover { background: rgba(255,255,255,0.035); }
.loot-wishlist-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 4px;
}
.loot-wishlist-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}
.loot-wishlist-item-name {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loot-wishlist-meta,
.loot-wishlist-note {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loot-wishlist-priority { color: var(--pick-color); font-weight: 800; }
.loot-wishlist-note { color: var(--text-secondary); }
.loot-wishlist-remove {
    width: 32px;
    flex: 0 0 32px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
}
.loot-wishlist-remove:hover { color: var(--accent); background: rgba(233,69,96,0.08); }
.loot-wishlist-remove:disabled { opacity: 0.4; cursor: wait; }
.loot-wishlist-empty {
    grid-column: 1 / -1;
    padding: 12px 14px;
    background: #111b30;
    color: var(--text-muted);
    font-size: 11px;
}
.loot-mine-pri-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.loot-mine-pri-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 4px; flex-shrink: 0; }
.loot-mine-pri-btn { display: inline-flex; align-items: center; }
@media (max-width: 1180px) {
    .loot-mine-outer { flex-direction: column; }
    .loot-mine-left-col,
    .loot-mine-right-col { width: 100%; max-width: none; }
}
@media (max-width: 600px) {
    .loot-player-context { align-items: stretch; }
    .loot-raider-dropdown { width: auto; flex: 1; }
    .loot-plan-controls { align-items: stretch; flex-direction: column; gap: 10px; }
    .loot-plan-control-group { grid-template-columns: 1fr; gap: 6px; }
    .loot-bis-source { align-items: flex-start; }
    .loot-wishlist-items { grid-template-columns: 1fr; }
    .loot-mine-armory .profile-layout {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .loot-mine-armory .profile-armory-left,
    .loot-mine-armory .profile-armory-right {
        display: flex;
        width: 100%;
    }
    .loot-mine-armory .profile-center-col {
        display: block;
        order: -1;
        width: 100%;
        padding: 0;
    }
    .loot-mine-armory .profile-center-col > div {
        display: flex;
        flex-direction: column;
    }
    .loot-mine-armory .profile-char-model { width: min(100%, 360px); }
    .loot-mine-armory .profile-armory-left .profile-slot,
    .loot-mine-armory .profile-armory-right .profile-slot,
    .loot-mine-armory .profile-armory-weapons .profile-slot { width: 100%; }
    .loot-mine-armory .profile-armory-weapons { display: flex; width: 100%; }
}

/* ── Attendance: character groups panel ── */
.att-groups-panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.att-groups-panel[hidden] { display: none; }
.att-groups-title { font-size: 12px; color: var(--text-secondary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.att-groups-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.att-group-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.att-group-members { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.att-group-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.08); border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.att-group-chip--primary { background: rgba(245,197,66,0.15); color: var(--accent-gold); }
.att-group-chip-realm { font-size: 10px; color: var(--text-secondary); font-weight: 400; }
.att-group-remove { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 14px; padding: 0 4px; line-height: 1; margin-left: auto; }
.att-group-remove:hover { color: #e74c3c; }
.att-group-add-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.att-group-add-row input { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-page); color: var(--text-primary); font-size: 13px; font-family: inherit; width: 180px; }
.att-group-sep { color: var(--text-secondary); font-size: 16px; }
.att-groups-empty { color: var(--text-secondary); font-size: 12px; font-style: italic; }
.att-alias-tag { width: 100%; font-size: 10px; color: var(--text-secondary); line-height: 1.2; }

/* Armory panel */
.loot-armory-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.loot-armory-loading .loot-armory-header { opacity: 0.5; }
.loot-armory-header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}
.loot-armory-avatar {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    object-fit: cover;
}
.loot-armory-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}
.loot-armory-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.loot-armory-sub  { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.loot-armory-ilvl {
    font-size: 13px; font-weight: 700;
    display: inline-block;
    padding: 1px 7px; border-radius: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
}
.loot-armory-ilvl.slot-pip-myth  { color: var(--track-myth); }
.loot-armory-ilvl.slot-pip-hero  { color: var(--track-hero); }
.loot-armory-ilvl.slot-pip-champ { color: var(--track-champion); }
.loot-armory-section-title {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 8px 16px 4px;
}
.loot-armory-gear {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    padding: 0 8px 8px;
}
.loot-armory-gear td { padding: 3px 8px; vertical-align: middle; }
.loot-armory-slot-label {
    color: var(--text-secondary);
    white-space: nowrap;
    width: 66px;
    font-size: 11px;
}
.loot-armory-slot-link {
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    display: inline-block;
}
.loot-armory-slot-link:hover { text-decoration: underline; }
/* WoW item quality colours — also force-inherit into Wowhead's injected inner spans */
.loot-armory-slot-link.q0 { color: var(--wow-poor); }
.loot-armory-slot-link.q1 { color: var(--wow-common); }
.loot-armory-slot-link.q2 { color: var(--wow-uncommon); }
.loot-armory-slot-link.q3 { color: var(--wow-rare); }
.loot-armory-slot-link.q4 { color: var(--wow-epic); }
.loot-armory-slot-link.q5 { color: var(--wow-legendary); }
.loot-armory-slot-link > span { color: inherit !important; }
.loot-armory-tier-dot {
    display: inline-block;
    margin-left: 4px;
    font-size: 9px; font-weight: 700;
    background: rgba(245,197,66,0.15); color: var(--accent-gold);
    border: 1px solid rgba(245,197,66,0.3);
    border-radius: 3px; padding: 0 4px;
    vertical-align: middle;
}
.loot-armory-slot-ilvl {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
}
.loot-armory-slot-ilvl.slot-pip-myth  { color: var(--track-myth); }
.loot-armory-slot-ilvl.slot-pip-hero  { color: var(--track-hero); }
.loot-armory-slot-ilvl.slot-pip-champ { color: var(--track-champion); }
.loot-armory-profile-link {
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    padding: 8px;
    border-top: 1px solid var(--border);
    text-decoration: none;
    transition: color 0.15s;
}
.loot-armory-profile-link:hover { color: var(--accent-gold); }

/* Enchants & Gems section — always visible, separated from gear table */
.loot-armory-section-title--enchants {
    margin-top: 2px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.loot-audit-list { padding: 0 8px 10px; }

/* Enchant / gem audit rows */
.loot-audit-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.loot-audit-row:last-child { border-bottom: none; }
.loot-audit-slot {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.loot-audit-tags { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.loot-audit-tag {
    font-size: 10px;
    border-radius: 3px;
    padding: 1px 5px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}
a.loot-audit-tag:hover { filter: brightness(1.25); text-decoration: underline; }

/* Wowhead tooltip — force spell/use text to wrap instead of clipping */
.wowhead-tooltip a { white-space: normal !important; }
.loot-audit-ok   { background: rgba(46,204,113,0.1);  color: #2ecc71; border: 1px solid rgba(46,204,113,0.25); }
.loot-audit-miss { background: rgba(231,76,60,0.1);   color: #e74c3c; border: 1px solid rgba(231,76,60,0.25); }
.loot-audit-gem  { background: rgba(116,185,255,0.1); color: #74b9ff; border: 1px solid rgba(116,185,255,0.25); }

/* By Boss view — item cards */
.loot-by-boss-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    padding: 14px 16px;
}
.loot-by-boss-item-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s;
}
.loot-by-boss-item-card--picked {
    border-color: rgba(197,154,45,0.5);
    background: rgba(197,154,45,0.04);
}
.loot-by-boss-item-anchor {
    display: flex; align-items: flex-start; gap: 8px;
    text-decoration: none; color: inherit; min-width: 0;
}
.loot-by-boss-item-anchor:hover .loot-item-name { color: var(--accent-gold); }
.loot-by-boss-item-anchor > .iconsmall { display: none !important; }
.loot-item-icon--lg { width: 36px; height: 36px; border-radius: 5px; flex-shrink: 0; }
.loot-item-icon--placeholder { background: rgba(255,255,255,0.06); border-radius: 4px; flex-shrink: 0; }
.loot-by-boss-raiders { display: flex; flex-wrap: wrap; gap: 6px; }
.loot-by-boss-raider {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600;
    cursor: default;
}
.loot-by-boss-unclaimed {
    font-size: 11px; color: var(--text-secondary); font-style: italic; padding-left: 2px;
}
/* Grid view — table with icon chips */
.loot-grid-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.loot-grid-pri-btn {
    display: inline-flex; align-items: center; gap: 5px;
}
.loot-grid-pri-btn .loot-grid-chip-prio { width: 8px; height: 8px; flex-shrink: 0; }
.loot-grid-table { border-collapse: collapse; font-size: 12px; width: 100%; }
.loot-grid-table thead th {
    background: var(--bg-table); color: var(--text-secondary);
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px;
    padding: 8px 10px; border: 1px solid var(--border);
    position: sticky; top: 0; z-index: 2; text-align: center; white-space: nowrap;
    cursor: default;
}
.loot-grid-table thead th::after { display: none; }
.loot-grid-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.loot-grid-table td { border: 1px solid var(--border); padding: 5px 7px; vertical-align: top; }
.loot-grid-raider-cell { font-weight: 600; white-space: nowrap; text-align: left; min-width: 100px; color: var(--text-primary, #e8eaf6); }

/* Clickable raider name + hover card */
.loot-grid-raider-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.loot-grid-raider-link {
    background: none; border: none; padding: 0;
    font: inherit; font-weight: 600;
    cursor: pointer;
    text-decoration: underline dotted transparent;
    transition: text-decoration-color 0.15s, color 0.15s;
}
.loot-grid-raider-link:hover { text-decoration: underline dotted currentColor; }
.loot-grid-exclude-btn {
    display: none;
    background: none; border: none; padding: 0 2px;
    font-size: 11px; line-height: 1;
    cursor: pointer;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: opacity 0.15s, color 0.15s;
}
.loot-grid-exclude-btn:hover { opacity: 1; color: #f66; }
.loot-grid-raider-wrap:hover .loot-grid-exclude-btn { display: inline; }
.loot-raider-hover-card {
    display: none;
    position: fixed;
    z-index: 2000;
    background: var(--surface-2, #1e1b2e);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    pointer-events: none;
    min-width: 140px;
}
.loot-raider-hover-specline { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.loot-raider-hover-role {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
    font-weight: 600; padding: 2px 7px; border-radius: 4px;
    display: inline-block; margin-bottom: 5px;
}
.loot-hover-role--tank    { background: rgba(100,149,237,0.2); color: #6495ed; }
.loot-hover-role--healer  { background: rgba(46,204,113,0.2);  color: #2ecc71; }
.loot-hover-role--dps     { background: rgba(231,76,60,0.2);   color: #e74c3c; }
.loot-raider-hover-hint { font-size: 11px; color: var(--text-secondary); }
.loot-grid-cell { min-width: 80px; }
.loot-grid-cell-empty { color: var(--text-secondary); font-size: 11px; text-align: center; opacity: 0.35; }
/* Compact pick chip inside the table cell */
.loot-grid-cell-chip {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
    padding: 4px 6px; margin-bottom: 3px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: 5px; text-decoration: none; color: inherit; cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    min-width: 0;
}
.loot-grid-cell-chip:last-child { margin-bottom: 0; }
.loot-grid-cell-chip:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.22); }
.loot-grid-cell-chip > .iconsmall { display: none !important; }
.loot-grid-chip-icon { width: 20px; height: 20px; border-radius: 3px; flex-shrink: 0; }
.loot-grid-chip-icon--empty { background: rgba(255,255,255,0.06); }
.loot-grid-chip-name {
    font-size: 11px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}
.loot-grid-chip-prio {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}

/* ── Toast notification ─────────────────────────────────────────────── */
.loot-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    pointer-events: none;
}
.loot-toast {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #232b3e;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent-gold);
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text-primary);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    pointer-events: all;
    min-width: 260px;
    animation: lootToastIn 0.18s ease;
}
@keyframes lootToastIn {
    from { transform: translateY(-12px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.loot-toast-msg { flex: 1; }
.loot-toast-undo {
    background: none;
    border: 1px solid var(--accent-gold);
    border-radius: 5px;
    color: var(--accent-gold);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s;
    letter-spacing: 0.04em;
}
.loot-toast-undo:hover { background: rgba(245,197,66,0.12); }

/* ── Chip editor popover ─────────────────────────────────────────────── */
.loot-chip-editor {
    display: none;
    position: absolute;
    z-index: 1001;
    background: #1a1d2e;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.loot-chip-editor-pris {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}
.loot-chip-editor-pris .loot-priority-btn.active {
    background: rgba(255,255,255,0.1);
    border-color: var(--pcolor, var(--border));
}
.loot-chip-editor-note {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    padding: 6px 8px;
    resize: vertical;
    min-height: 52px;
    margin-bottom: 8px;
}
.loot-chip-editor-note:focus { outline: none; border-color: var(--accent-gold); }
.loot-chip-editor-actions {
    display: flex;
    gap: 6px;
}
.loot-chip-editor-save  { flex: 1; }
.loot-chip-editor-cancel { flex: 1; opacity: 0.7; }


/* ── "Also wanted by" footer on item cards ───────────────────────────── */
.loot-item-also-wanted {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Class-aware filter notice ───────────────────────────────────────── */
.loot-class-filter-notice {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 4px 16px 2px;
    font-style: italic;
}

/* ── Select-your-character empty state ───────────────────────────────── */
.loot-select-prompt {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
    border: 2px dashed var(--border);
    border-radius: 10px;
    margin: 0;
}
.loot-select-prompt strong { color: var(--text-primary); font-size: 15px; display: block; margin-bottom: 8px; }
.loot-select-prompt p { margin: 0; font-size: 13px; }

/* ── Raider view — member quick-select chips ─────────────────────────── */
.loot-raider-selector { display: flex; justify-content: center; }
.loot-raider-selector .loot-raider-dropdown { width: 100%; max-width: 300px; margin: 0; }
.loot-member-chips {
    display: flex; flex-wrap: wrap; gap: 7px;
    margin-top: 12px; padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.loot-member-chip {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 4px 14px;
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s;
}
.loot-member-chip:hover, .loot-member-chip.active {
    background: rgba(197,154,45,0.12);
    border-color: rgba(197,154,45,0.4);
    color: var(--accent-gold);
}

/* ── Player picker (no player selected) ──────────────────────────── */
.loot-player-picker {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.loot-player-picker-intro {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.loot-player-picker-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}
.loot-player-picker-sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.loot-player-search-wrap {
    position: relative;
}
.loot-player-search-wrap--compact {
    flex-shrink: 0;
    width: 288px;
}
.loot-player-search-wrap--empty {
    align-self: center;
}
.loot-player-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--text-muted, #4a5568);
    pointer-events: none;
}
.loot-player-search-wrap input {
    width: 100%;
    padding: 11px 16px 11px 40px;
    background: var(--bg-card, rgba(255,255,255,0.04));
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.loot-player-search-wrap input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(197,154,45,0.12);
}
.loot-player-picker .loot-member-chips {
    margin-top: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.loot-player-picker .loot-member-chip {
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.loot-player-picker .loot-member-chip.is-mythic {
    border-color: rgba(255, 128, 0, 0.28);
}
.loot-player-picker .loot-member-chip.is-mythic:hover {
    background: rgba(255, 128, 0, 0.1);
    border-color: rgba(255, 128, 0, 0.55);
    color: #ff9a30;
}
.loot-chip-mythic-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff8000;
    flex-shrink: 0;
}
/* Mythic-only filter toggle */
.loot-picker-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.loot-picker-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.loot-picker-filter-btn:hover {
    border-color: rgba(255, 128, 0, 0.4);
    color: #ff9a30;
}
.loot-picker-filter-btn.active {
    border-color: rgba(255, 128, 0, 0.5);
    background: rgba(255, 128, 0, 0.1);
    color: #ff9a30;
}
.loot-picker-filter-count {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}
.loot-picker-filter-btn.active .loot-picker-filter-count {
    background: rgba(255, 128, 0, 0.2);
}

/* ── Armory panel — droptimizer action button ────────────────────────── */
#lootArmoryDtWrap:not(:empty) {
    border-top: 1px solid var(--border);
    padding: 8px 0;
    text-align: center;
}
.loot-armory-dt-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: 1px solid rgba(197,154,45,0.35);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 12px; font-weight: 600;
    color: var(--accent-gold);
    cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.loot-armory-dt-btn:hover { background: rgba(197,154,45,0.08); border-color: rgba(197,154,45,0.6); }
.loot-armory-dt-btn--loaded { color: var(--text-secondary); font-weight: 400; }
.loot-armory-dt-btn--loaded:hover { color: var(--accent-gold); }

/* ── Droptimizer modal ───────────────────────────────────────────────── */
.loot-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.65);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; transition: opacity 0.2s;
}
.loot-modal-overlay--open { opacity: 1; }
.loot-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%; max-width: 480px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    transform: translateY(-10px); transition: transform 0.2s;
}
.loot-modal-overlay--open .loot-modal { transform: translateY(0); }
.loot-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--border);
}
.loot-modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.loot-modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 15px;
    padding: 4px 8px; border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.loot-modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.loot-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.loot-modal-desc { margin: 0; font-size: 13px; color: var(--text-secondary); }
.loot-modal-step { display: flex; gap: 14px; align-items: flex-start; }
.loot-modal-step-num {
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
    background: rgba(197,154,45,0.15); border: 1px solid rgba(197,154,45,0.35);
    color: var(--accent-gold); font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.loot-modal-step-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.loot-modal-step-title { font-size: 13px; color: var(--text-primary); line-height: 1.4; }
.loot-modal-step-title strong { color: var(--accent-gold); }
.loot-modal-url-input {
    width: 100%; box-sizing: border-box;
    background: var(--bg-dark); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px;
    color: var(--text-primary); font-size: 13px;
    transition: border-color 0.15s;
}
.loot-modal-url-input:focus { outline: none; border-color: var(--accent-gold); }
.loot-modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 14px 20px; border-top: 1px solid var(--border);
}
.loot-modal-cancel-btn {
    background: none; border: 1px solid var(--border); border-radius: 20px;
    padding: 5px 16px; font-size: 12px; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.loot-modal-cancel-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.25); }

/* ── Grid: missing-raider rows ───────────────────────────────────────── */
.loot-grid-row--missing td { opacity: 0.55; }
.loot-grid-row--missing .loot-grid-raider-cell { opacity: 1; }
.loot-grid-missing-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(233,69,96,0.15);
    color: var(--accent);
    border: 1px solid rgba(233,69,96,0.3);
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 5px;
}
.loot-grid-footer {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
}

/* ── Grid: sticky first column (mobile) ─────────────────────────────── */
.loot-grid-table th:first-child,
.loot-grid-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg-table);
}
.loot-grid-table tbody tr td:first-child {
    background: var(--bg-card);
}
.loot-grid-table tbody tr:hover td:first-child { background: rgba(255,255,255,0.05); }

/* ── By Boss: conflict badge ─────────────────────────────────────────── */
.loot-by-boss-item-card--conflict {
    border-color: rgba(233,69,96,0.6) !important;
    background: rgba(233,69,96,0.05) !important;
}
.loot-conflict-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(233,69,96,0.5);
    background: rgba(233,69,96,0.15);
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.loot-by-boss-item-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.loot-by-boss-item-title .loot-by-boss-item-anchor { flex: 1; min-width: 0; }

/* ── By Boss: slot demand summary bar ───────────────────────────────── */
.loot-slot-demand {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.loot-slot-demand span strong { color: var(--text-primary); }


@media (max-width: 768px) {
    .container { padding: 12px; }
    .site-header { padding: 14px 16px; }
    .site-header-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
    .header-stats { flex-wrap: wrap; gap: 8px; }
    .header-affixes { display: none; }
    .hstat { border-right: none; padding: 0 12px 0 0; }
    .brand-name { font-size: 17px; }
    .site-nav { justify-content: flex-start; padding: 0 12px; overflow-x: auto; overflow-y: visible; }
    .season-picker {
        position: static;
        margin-left: 18px;
        transform: none;
    }
    /* overflow-x: auto creates a scroll container that clips absolute children;
       use fixed positioning so the dropdown renders outside the clipped area */
    .nav-dropdown-menu {
        position: fixed;
        left: 0;
        right: 0;
        min-width: 100%;
        border-radius: 0 0 8px 8px;
    }
    .site-nav a:first-child { margin-left: 0; }
}

/* ── Profile Page ─────────────────────────────────────────────────────── */
.profile-page { max-width: 1400px; margin: 0 auto; padding: 12px 16px; zoom: 1.2; }
.profile-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
}
.profile-center-col { display: flex; flex-direction: column; align-items: center; padding: 0 8px; min-width: 336px; }
.profile-picker-inner { position: relative; width: 260px; flex-shrink: 0; }
.profile-search-input {
    width: 100%; padding: 10px 16px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary);
    font-size: 14px; outline: none; transition: border-color 0.2s;
}
.profile-search-input:focus { border-color: var(--accent-gold); }
.member-search-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    background: var(--bg-card); border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 8px 8px; max-height: 240px; overflow-y: auto;
    box-shadow: 0 14px 30px rgba(0,0,0,0.42);
}
.member-search-suggestion {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 16px; cursor: pointer; font-size: 13px; color: var(--text-primary);
    transition: background 0.15s;
}
.member-search-suggestion:hover, .member-search-suggestion.active { background: rgba(245,197,66,0.1); }
.member-search-character { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-search-realm { font-size: 11px; color: var(--text-secondary); margin-left: 2px; }
.member-search-ilvl { flex-shrink: 0; font-size: 11px; font-weight: 700; }
.loot-raider-realm        { font-size: 11px; color: var(--text-secondary); margin-left: 4px; }
.loot-chip-realm          { font-size: 11px; font-weight: 400; color: var(--text-secondary); margin-left: 1px; }
.profile-loading, .profile-empty {
    text-align: center; padding: 60px 20px; color: var(--text-secondary); font-size: 14px;
}

/* Armory grid: left slots – center col – right slots */
.profile-armory-left, .profile-armory-right {
    display: flex; flex-direction: column; gap: 8px;
}
.profile-armory-left { align-items: flex-end; }
.profile-armory-right { align-items: flex-start; }

/* ── Character model container ── */
#profileContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 0;
}
.profile-char-model {
    position: relative;
    width: 400px;
    flex: 1;
    min-height: 150px;
    overflow: visible;
    margin-bottom: 8px;
}
.profile-char-model--empty {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
}
.profile-avatar {
    position: absolute;
    /* Default offset for height:162% avatar — JS (profileFixAvatarFeet) recalculates precisely per character. */
    bottom: -28.51%;
    left: 50%;
    transform: translateX(-50%);
    height: 162%;
    width: auto;
    display: block;
    pointer-events: none;
}
.profile-model-shadow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    z-index: 2;
}
.profile-avatar-placeholder {
    width: 200px; height: 260px; border-radius: 12px;
    background: var(--bg-table); border: 2px solid var(--border); margin-bottom: 14px;
}
/* ── Character info bar — sits above the left armory column ── */
.profile-char-info-center {
    text-align: center;
    margin-top: 10px;
    line-height: 1.4;
}
.profile-char-info-center:empty { display: none; }
.profile-char-info-center .profile-char-name { font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.profile-char-info-center .profile-char-sub { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 2px; }
.profile-char-info-center .profile-char-ilvl { font-size: 14px; font-weight: 700; background: none; border: none; padding: 0; display: block; }
.profile-info-bar:empty { display: none; }
.profile-char-name { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.profile-info-bar .profile-char-name {
    font-size: 18px; font-weight: 800; margin-bottom: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    letter-spacing: 0.3px;
    color: #fff;
}
.profile-char-sub { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.profile-info-bar .profile-char-sub {
    font-size: 13px; margin-bottom: 0;
    color: rgba(255,255,255,0.65);
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.profile-char-ilvl {
    font-size: 14px; font-weight: 600; padding: 3px 10px; border-radius: 6px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border); margin-bottom: 4px;
}
.profile-info-bar .profile-char-ilvl {
    margin-bottom: 0; font-size: 15px; padding: 0;
    font-weight: 700; background: none; border: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.profile-char-ilvl.slot-pip-myth  { color: var(--track-myth); }
.profile-char-ilvl.slot-pip-hero  { color: var(--track-hero); }
.profile-char-ilvl.slot-pip-champ { color: var(--track-champion); }
.profile-info-bar .profile-char-ilvl.slot-pip-myth,
.profile-info-bar .profile-char-ilvl.slot-pip-hero,
.profile-info-bar .profile-char-ilvl.slot-pip-champ { background: none; border: none; }
.profile-char-info-center .profile-char-ilvl.slot-pip-myth,
.profile-char-info-center .profile-char-ilvl.slot-pip-hero,
.profile-char-info-center .profile-char-ilvl.slot-pip-champ { background: none; border: none; color: var(--text-primary); }
.profile-char-realm { font-size: 11px; color: var(--text-secondary); text-transform: capitalize; }
.profile-armory-link {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 8px; padding: 5px 14px;
    font-size: 11px; font-weight: 600; text-decoration: none;
    color: #c4a8ff;
    background: rgba(130,70,220,0.15);
    border: 1px solid rgba(130,70,220,0.4);
    border-radius: 6px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.profile-armory-link:hover {
    background: rgba(130,70,220,0.28);
    border-color: rgba(180,120,255,0.7);
    color: #e0ccff;
}

/* Full-page armory background — body-level so it fills edge-to-edge beneath the navbar */
body.profile-bg-active {
    background-image: var(--profile-bg-url);
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* Weapons row – pushed to bottom of center column */
.profile-armory-weapons {
    display: flex; gap: 8px; justify-content: center;
    margin-top: auto; padding-top: 10px; width: 100%;
}
.profile-armory-weapons .profile-slot {
    flex: 0 1 270px; min-width: 0;
    justify-content: flex-start;
}

/* ── Gear slot cards ── */
.profile-slot {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    width: 310px; position: relative;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.profile-slot:hover {
    transform: scale(1.03);
    box-shadow: 0 0 16px rgba(163,53,238,0.25);
    border-color: rgba(163,53,238,0.4);
}
.profile-slot--empty { opacity: 0.4; }
.profile-slot--empty:hover { transform: none; box-shadow: none; }

/* Icon wrap with quality border */
.profile-slot-icon-wrap {
    position: relative; flex-shrink: 0;
    width: 44px; height: 44px; border-radius: 6px; overflow: visible;
    display: flex; align-items: center; justify-content: center;
}
.profile-slot-icon {
    width: 44px; height: 44px; border-radius: 6px; display: block;
    border: 2px solid rgba(255,255,255,0.15);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-slot-icon-empty {
    width: 44px; height: 44px; border-radius: 6px;
    background: var(--bg-table); border: 2px solid var(--border);
}
/* Quality-colored icon borders */
.profile-slot-icon-q0 .profile-slot-icon { border-color: var(--wow-poor); }
.profile-slot-icon-q1 .profile-slot-icon { border-color: var(--wow-common); }
.profile-slot-icon-q2 .profile-slot-icon { border-color: var(--wow-uncommon); box-shadow: 0 0 6px rgba(30,255,0,0.3); }
.profile-slot-icon-q3 .profile-slot-icon { border-color: var(--wow-rare); box-shadow: 0 0 6px rgba(0,112,221,0.3); }
.profile-slot-icon-q4 .profile-slot-icon { border-color: var(--wow-epic); box-shadow: 0 0 8px rgba(163,53,238,0.4); }
.profile-slot-icon-q5 .profile-slot-icon { border-color: var(--wow-legendary); box-shadow: 0 0 8px rgba(255,128,0,0.4); }
.profile-slot:hover .profile-slot-icon-q4 .profile-slot-icon { box-shadow: 0 0 14px rgba(163,53,238,0.6); }
.profile-slot:hover .profile-slot-icon-q5 .profile-slot-icon { box-shadow: 0 0 14px rgba(255,128,0,0.6); }

/* Gem icons (positioned below icon) */
.profile-slot-gems {
    position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
    display: flex; gap: 2px;
}
.profile-gem-icon { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.6); display: block; }
.profile-gem-link { display: inline-block; border-radius: 50%; line-height: 0; }
.profile-gem-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: #0070dd; border: 1px solid rgba(0,0,0,0.5);
}

/* Slot info */
.profile-slot-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.profile-slot-ilvl-row { display: flex; align-items: center; justify-content: space-between; }
.profile-slot-badges { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.profile-slot-name {
    font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; text-decoration: none; transition: color 0.15s;
    cursor: pointer; display: block;
}
.profile-slot-name:hover { text-decoration: underline; }
.profile-slot-name.q0 { color: var(--wow-poor); }
.profile-slot-name.q1 { color: var(--wow-common); }
.profile-slot-name.q2 { color: var(--wow-uncommon); }
.profile-slot-name.q3 { color: var(--wow-rare); }
.profile-slot-name.q4 { color: var(--wow-epic); }
.profile-slot-name.q5 { color: var(--wow-legendary); }
.profile-slot-label { font-size: 12px; color: var(--text-secondary); }
.profile-slot-ilvl { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.profile-tier-badge {
    font-size: 8px; font-weight: 800; padding: 1px 3px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.3px; line-height: 1.2;
    white-space: nowrap; flex-shrink: 0;
}
.profile-tier-badge--slot-pip-myth  { background: rgba(163,53,238,0.2); color: var(--track-myth); }
.profile-tier-badge--slot-pip-hero  { background: rgba(0,112,221,0.18); color: var(--track-hero); }
.profile-tier-badge--slot-pip-champ { background: rgba(46,204,113,0.15); color: var(--track-champion); }
.profile-tier-badge--set { background: rgba(245,197,66,0.16); color: #f5c542; }
.profile-tier-badge--crafted { background: rgba(46,204,113,0.15); color: var(--track-champion); }
.profile-tier-badge--voidforged { background: rgba(196,125,255,0.18); color: #c47dff; }
.profile-set-badge {
    display: inline-block; font-size: 9px; font-weight: 800; color: var(--accent-gold);
    background: rgba(245,197,66,0.15); border-radius: 3px; padding: 0 4px; margin-left: 4px;
    vertical-align: middle;
}
.profile-slot-enchant {
    font-size: 11px; color: #2ecc71; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 200px;
    text-decoration: none; display: block; cursor: pointer;
}
.profile-slot-enchant:hover { text-decoration: underline; }

/* ── Profile responsive ── */
@media (max-width: 900px) {
    .profile-armory {
        grid-template-rows: auto auto auto;
        gap: 16px;
    }
    .loot-player-search-wrap--compact { width: auto; max-width: 360px; flex: 1; }
    .profile-armory-center { order: -1; }
    .profile-armory-left, .profile-armory-right { align-items: stretch; }
    .profile-slot { max-width: 100%; min-width: 0; }
}
@media (max-width: 768px) {
    .controls { align-items: stretch; flex-direction: column; }
    .controls-left, .controls-right { width: 100%; }
    .controls input, .controls select { width: 100%; }
    table { font-size: 11px; }
    .bar-label { width: 100px; font-size: 11px; }
    .boss-grid { grid-template-columns: 1fr; }
    .encounter-grid { grid-template-columns: 1fr; }
    .death-heatmap-name { width: 90px; font-size: 10px; }
    .diff-filter-bar { gap: 4px; }
    .diff-btn { padding: 4px 10px; font-size: 11px; }
    .mythic-prog-track { height: 16px; }

    /* Prevent iOS from auto-zooming on input focus (requires font-size >= 16px) */
    input, select, textarea { font-size: 16px !important; }

    /* Ensure minimum 44px touch targets on interactive controls */
    .diff-btn, .loot-priority-btn, select, .controls input { min-height: 44px; }
    .loot-modal-close { min-width: 44px; min-height: 44px; font-size: 18px; }
    .site-nav a, .nav-dropdown-trigger { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 480px) {
    .site-nav a { font-size: 11px; padding: 11px 12px; }
    .nav-dropdown-trigger { font-size: 11px; padding: 11px 12px; }
    .tab { padding: 8px 12px; font-size: 12px; }
    .boss-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile bottom-sheet for priority picker & chip editor ── */
@media (max-width: 600px) {
    .loot-priority-picker,
    .loot-chip-editor {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        border-radius: 16px 16px 0 0 !important;
        padding: 20px 16px !important;
        padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)) !important;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.6) !important;
    }
    .loot-priority-btns,
    .loot-chip-editor-pris { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .loot-priority-btn { width: auto; flex: 1; min-width: 80px; text-align: center; min-height: 44px; }
    .loot-chip-editor-actions { gap: 10px; }
    .loot-chip-editor-save,
    .loot-chip-editor-cancel { min-height: 44px; }
    .loot-modal { border-radius: 16px; }
}

/* ── Live Log Analysis ──────────────────────────────────────────────────── */
.live-header { padding: 16px 0 12px; display: flex; flex-direction: column; align-items: center; }
.live-input-row { display: flex; flex-direction: row; align-items: center; gap: 8px; width: 100%; max-width: 660px; }
.live-input-top { display: contents; }
.live-input-bottom { display: contents; }
.live-report-input {
    flex: 1; min-width: 0; width: 100%; padding: 9px 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text-primary); font-size: 13px; font-family: monospace;
    transition: border-color .15s; overflow: hidden; text-overflow: clip; white-space: nowrap;
}
.live-report-input:focus { outline: none; border-color: var(--accent); }
.live-report-input:disabled {
    opacity: 0.5; cursor: not-allowed;
}
.live-report-input.loading {
    opacity: 0.7; cursor: not-allowed; border-color: rgba(255,255,255,0.2);
    background: repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 8px,
        rgba(255,255,255,0.02) 8px, rgba(255,255,255,0.02) 16px
    );
    background-size: 200% 100%;
    animation: live-input-scan 1s linear infinite;
}
@keyframes live-input-scan {
    from { background-position: 100% 0; }
    to   { background-position: -100% 0; }
}
.live-guild-btn {
    padding: 9px 14px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px; color: var(--text-primary); font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap; font-family: inherit; flex-shrink: 0;
    transition: background .15s, border-color .15s;
}
.live-guild-btn:hover { background: rgba(255,255,255,0.13); border-color: rgba(255,255,255,0.32); }
.live-guild-btn:disabled { opacity: 0.5; cursor: default; }
.live-guild-wrap { position: relative; flex-shrink: 0; }
.live-guild-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 200;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; min-width: 320px; max-width: 420px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45); overflow: hidden;
    max-height: 70vh; overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.live-guild-dropdown::-webkit-scrollbar { width: 4px; }
.live-guild-dropdown::-webkit-scrollbar-track { background: transparent; }
.live-guild-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.live-guild-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
.live-guild-dd-item {
    padding: 10px 14px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background .12s;
}
.live-guild-dd-item:last-child { border-bottom: none; }
.live-guild-dd-item:hover { background: rgba(255,255,255,0.05); }
.live-guild-dd-item.is-live { background: rgba(231,76,60,0.07); }
.live-guild-dd-item.is-live:hover { background: rgba(231,76,60,0.13); }
.live-guild-dd-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; flex-wrap: wrap; }
.live-guild-dd-badge {
    font-size: 11px; font-weight: 700; color: #e74c3c;
    background: rgba(231,76,60,0.18); border-radius: 4px; padding: 1px 6px;
    white-space: nowrap; flex-shrink: 0;
    animation: live-pulse 1.8s ease-in-out infinite;
}
.live-guild-dd-meta { font-size: 11px; color: var(--text-secondary); margin-left: auto; }
/* Difficulty badge in dropdown */
.live-dd-diff-badge {
    font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 4px;
    border: 1px solid currentColor; white-space: nowrap; flex-shrink: 0;
}
.live-dd-diff-badge.diff-mythic  { color: var(--difficulty-mythic); }
.live-dd-diff-badge.diff-heroic  { color: var(--difficulty-heroic); }
.live-dd-diff-badge.diff-normal  { color: var(--difficulty-normal); }
/* Source (Guild log / Personal log) badge — bottom-right of each item */
.live-dd-bottom-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 2px; }
.live-dd-source-badge {
    font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px;
    white-space: nowrap; flex-shrink: 0; letter-spacing: 0.02em;
}
.live-dd-source-badge.guild   { color: rgba(74,158,255,0.8);  background: rgba(74,158,255,0.08);  }
.live-dd-source-badge.personal { color: rgba(160,160,180,0.7); background: rgba(255,255,255,0.05); }
/* Encounter chips row */
.live-dd-enc-row { display: flex; flex-direction: column; gap: 2px; }
.live-dd-enc-unknown { font-size: 11px; color: rgba(255,255,255,0.25); font-style: italic; }
.live-dd-enc-chip {
    font-size: 12px; white-space: nowrap;
}
.live-dd-enc-chip.kill { color: #2ecc71; font-weight: 600; }
.live-dd-enc-chip.wipe { color: var(--text-secondary); font-weight: 400; }
.live-guild-dd-empty { padding: 12px 14px; font-size: 13px; color: var(--text-secondary); }
.live-guild-dd-error { color: #e74c3c; }

/* ── Character external links dropdown ──────────────────────────────────── */
.char-links-wrap {
    position: relative; display: inline-flex; align-items: center;
    vertical-align: middle; margin-left: 6px;
}
.char-links-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.45); padding: 2px 5px; border-radius: 4px;
    transition: color .15s, background .15s; line-height: 1;
}
.char-links-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.char-links-name-btn {
    background: none; border: none; cursor: pointer; padding: 0;
    color: inherit; font: inherit; font-weight: inherit;
    border-radius: 4px; transition: opacity .15s;
}
.char-links-name-btn:hover { opacity: 0.75; }
.char-links-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 350;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; min-width: 190px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5); overflow: hidden;
}
.char-links-item {
    display: block; padding: 9px 14px; font-size: 13px;
    color: var(--text-primary); text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background .12s; white-space: nowrap;
}
.char-links-item:last-child { border-bottom: none; }
.char-links-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.live-guild-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; min-height: 16px; text-align: center; }
.live-guild-hint-live { color: #e74c3c; font-weight: 600; }
.live-guild-hint-warn { color: #f5c542; }
.live-notif-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #e74c3c; margin-right: 2px; vertical-align: middle;
    animation: live-pulse 1.8s ease-in-out infinite;
}
.live-analyze-btn {
    flex: none; padding: 10px 26px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18);
    color: var(--text-primary); border-radius: 10px;
    font-weight: 600; font-size: 13px; letter-spacing: 0.02em;
    cursor: pointer; white-space: nowrap; font-family: inherit;
    transition: background .15s, border-color .15s;
}
.live-analyze-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.32);
}
.live-analyze-btn:active { transform: translateY(0); filter: brightness(0.96); }
.live-refresh-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    white-space: nowrap; font-family: inherit; flex-shrink: 0;
}
.live-refresh-btn:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.22); }
.live-refresh-btn.on {
    background: rgba(233,69,96,0.12); border-color: rgba(233,69,96,0.45);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px rgba(233,69,96,0.18), 0 2px 10px rgba(233,69,96,0.18);
}
.live-refresh-dot.hidden { display: none; }
.live-refresh-btn:disabled {
    background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.08);
    color: var(--text-secondary); opacity: 0.5; cursor: not-allowed;
    box-shadow: none;
}
.live-refresh-btn.stale,
.live-refresh-btn.stale:hover,
.live-refresh-btn:disabled:hover { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.08); }
.live-refresh-btn.stale { cursor: default; }
.live-refresh-btn-label { font-size: 12px; }
.live-refresh-cd {
    font-family: monospace; font-size: 12px; font-weight: 600;
    color: #e74c3c; min-width: 26px; text-align: right;
}
/* Toast */
.live-toast {
    position: fixed; top: 72px; left: 50%; transform: translateX(-50%) translateY(-12px);
    background: #1e1e2e; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px;
    padding: 10px 20px; font-size: 13px; font-weight: 600; color: var(--text-primary);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5); z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.live-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.live-refresh-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.2); flex-shrink: 0; transition: background .2s;
}
.live-refresh-dot.active {
    background: #e74c3c;
    box-shadow: 0 0 0 0 rgba(231,76,60,0.6);
    animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(231,76,60,0.6); }
    70%  { box-shadow: 0 0 0 7px rgba(231,76,60,0); }
    100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
}
.live-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 20px 80px; text-align: center;
}
.live-empty-icon { font-size: 40px; margin-bottom: 16px; opacity: 0.35; }
.live-empty-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.live-empty-sub { font-size: 13px; color: var(--text-secondary); max-width: 420px; line-height: 1.6; }
.live-loading {
    text-align: center; padding: 60px 20px; color: var(--text-secondary); font-size: 14px;
}
.live-error { text-align: center; padding: 40px 20px; color: #e74c3c; font-size: 14px; }
/* Refresh progress bar (sibling of #liveRoot, shown during any fetch) */
.live-refresh-bar {
    height: 2px; background: transparent; overflow: hidden;
    margin-bottom: 2px; border-radius: 2px;
}
.live-refresh-bar.active { background: rgba(255,255,255,0.07); }
.live-refresh-bar.active::after {
    content: ''; display: block; height: 100%; width: 35%;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-gold), transparent);
    animation: live-bar-scan 1.2s ease-in-out infinite;
}
@keyframes live-bar-scan {
    0%   { margin-left: -35%; }
    100% { margin-left: 110%; }
}

/* Header */
.live-report-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
    padding-bottom: 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.live-boss-name { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.live-diff-badge {
    font-size: 11px; font-weight: 700; padding: 2px 9px;
    border-radius: 10px; border: 1px solid currentColor; opacity: 0.85;
}
.live-report-header-meta { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.live-report-date { font-size: 12px; color: var(--text-secondary); }
.live-wcl-link { font-size: 12px; color: var(--text-secondary); text-decoration: none; }
.live-wcl-link:hover { color: var(--accent-gold); }

/* Boss dropdown — triggered from the boss name, styled like nav dropdowns */
.live-boss-name-wrap { position: relative; display: inline-flex; align-items: center; }
.live-boss-name-wrap.has-picker { cursor: pointer; }
.live-boss-name-wrap.has-picker .live-boss-name { display: flex; align-items: center; gap: 7px; }
.live-boss-name-wrap.has-picker .live-boss-name:hover { color: var(--accent-gold); }
.live-boss-name-wrap.open .live-boss-name { color: var(--accent-gold); }
.live-boss-pick-caret {
    color: var(--text-secondary); opacity: 0.7; flex-shrink: 0;
    transition: transform 0.2s; margin-top: 1px;
}
.live-boss-name-wrap.open .live-boss-pick-caret { transform: rotate(180deg); }

.live-boss-dropdown {
    display: none;
    position: absolute; top: calc(100% + 2px); left: 0; z-index: 200;
    min-width: 220px;
    background: rgba(11,18,30,0.98);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.55);
    flex-direction: column;
}
.live-boss-name-wrap.open .live-boss-dropdown { display: flex; }
.live-boss-pick-btn {
    position: relative;
    display: flex; flex-direction: column; gap: 3px;
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    padding: 11px 16px 11px 14px;
    cursor: pointer; font-family: inherit;
    text-align: left; transition: color .15s, border-color .15s, background .15s; width: 100%;
}
.live-boss-pick-btn:hover { background: rgba(255,255,255,0.04); border-left-color: rgba(233,69,96,0.45); }
.live-boss-pick-btn.active { border-left-color: var(--accent-gold); background: rgba(255,255,255,0.03); }
.live-boss-pick-btn.active .live-boss-pick-name { color: var(--accent-gold); }
.live-boss-pick-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.live-boss-pick-meta { font-size: 11px; color: var(--text-secondary); }
.live-boss-pick-kill-badge {
    position: absolute; top: 9px; right: 12px;
}

/* Summary stats */
.live-summary-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Consumable check */
.live-consump-section {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 16px; margin-bottom: 18px;
}

/* Summary stats */
.live-summary-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Consumable check */
.live-consump-section {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 16px; margin-bottom: 18px;
}
.live-consump-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.live-consump-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.live-consump-summary { font-size: 12px; color: var(--text-secondary); }

/* Sub-nav pills */
.live-consump-nav { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.live-consump-nav-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); border-radius: 14px;
    padding: 4px 13px; font-size: 12px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.live-consump-nav-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.live-consump-nav-btn.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: var(--text-primary); }

/* Consumable row filter */
.live-consump-filter-row { display: flex; gap: 5px; margin-bottom: 10px; }
.live-consump-filter-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); border-radius: 14px;
    padding: 3px 13px; font-size: 12px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.live-consump-filter-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.live-consump-filter-btn.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: var(--text-primary); }
.live-consump-filter-btn.active[data-filter="missing"] { background: rgba(231,76,60,0.15); border-color: rgba(231,76,60,0.4); color: #e74c3c; }
.live-consump-filter-btn.active[data-filter="ok"]      { background: rgba(46,204,113,0.12); border-color: rgba(46,204,113,0.35); color: #2ecc71; }
.live-consump-filter-empty { font-size: 13px; color: var(--text-secondary); padding: 6px 0; }

.live-consump-filter-row-dps { margin-top: -2px; margin-bottom: 8px; }
.live-consump-dps-filter-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    border-radius: 14px;
    padding: 3px 13px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.live-consump-dps-filter-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.live-consump-dps-filter-btn.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: var(--text-primary); }
.live-consump-dps-filter-btn.active[data-dps-filter="true"]  { background: rgba(46,204,113,0.12); border-color: rgba(46,204,113,0.35); color: #2ecc71; }
.live-consump-dps-filter-btn.active[data-dps-filter="false"] { background: rgba(231,76,60,0.15); border-color: rgba(231,76,60,0.4); color: #e74c3c; }

/* General table */
.live-consump-table-wrap { overflow-x: auto; }
.live-consump-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.live-consump-table thead th { color: var(--text-secondary); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; text-align: center; border-bottom: 1px solid var(--border); }
.live-consump-table thead th:first-child { text-align: left; }
.live-consump-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.live-consump-name { padding: 5px 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.live-consump-cell { padding: 5px 10px; text-align: center; font-weight: 700; font-size: 13px; }
.live-consump-ok   { color: #2ecc71; }
.live-consump-miss-cell { color: #e74c3c; }
.live-consump-clickable { cursor: pointer; }
.live-consump-clickable:hover { background: rgba(255,255,255,0.08); }
.live-consump-hint { font-size: 11px; color: var(--text-secondary); margin: -2px 0 8px; }

.live-consump-inspect {
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    padding: 8px 10px;
}
.live-consump-inspect-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.live-consump-inspect-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0 6px;
    height: 22px;
    cursor: pointer;
}
.live-consump-inspect-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.live-consump-inspect-list { display: flex; flex-direction: column; gap: 4px; }
.live-consump-inspect-row {
    display: grid;
    grid-template-columns: 56px minmax(160px, 1fr) minmax(120px, 1fr);
    gap: 10px;
    font-size: 12px;
    align-items: center;
}
.live-consump-inspect-time { color: #9bc8ff; font-weight: 700; }
.live-consump-inspect-qual { color: var(--text-secondary); }
.live-consump-inspect-empty { font-size: 12px; color: var(--text-secondary); }

/* Category detail view */
.live-consump-body { min-height: 20px; }
.live-consump-sub-section { margin-bottom: 10px; }
.live-consump-sub-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 6px; }
.live-consump-sub-label.miss { color: #e74c3c; }
.live-consump-sub-label.ok   { color: #2ecc71; }
.live-consump-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.live-consump-chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; }
.live-consump-chip.miss { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.3); }
.live-consump-chip.ok   { background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.25); }
.live-consump-all-ok { color: #2ecc71; font-size: 13px; font-weight: 600; padding: 4px 0; }

.live-stat {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 18px; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 90px;
}
.live-stat-val { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.live-stat-lbl { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }

/* Section nav */
.live-section-nav { display: flex; gap: 6px; margin-bottom: 18px; align-items: center; }
.live-section-nav-view-sep { flex: 1; }
.live-section-nav-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); border-radius: 8px;
    padding: 7px 18px; font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.live-section-nav-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.live-section-nav-btn.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: var(--text-primary); }

/* ── Pull Panel (merged pull selector + boss HP chart) ───────────────────── */
.live-pull-panel {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 16px; margin-bottom: 18px;
}
.live-pull-panel-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.live-pull-panel-label {
    font-size: 12px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .05em; margin-right: auto;
}
/* Collapsible body: chips + chart side by side */
.live-pull-panel-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, padding-top 0.3s, margin-top 0.3s, border-color 0.3s;
    opacity: 1;
    max-height: 9999px;
}
.live-pull-panel-body.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    margin-top: 0;
    border-color: transparent;
    pointer-events: none;
}
/* Chips inside the panel */
.live-pull-panel .live-chips {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; align-content: start;
    overflow-y: auto; overflow-x: hidden;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.live-pull-panel .live-chip {
    padding: 5px 6px 9px;
}
.live-pull-panel .live-chip-num { font-size: 11px; }
.live-pull-panel .live-chip-dur { font-size: 11px; }
.live-pull-panel .live-chip-time { font-size: 9px; }
/* Fade-out gradient wrapper — hints there are more chips below (::after) or above (::before) */
.live-chips-scroll-hint {
    position: relative;
    display: flex; flex-direction: column;
}
.live-chips-scroll-hint::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 36px;
    background: linear-gradient(to bottom, var(--bg-card), transparent);
    pointer-events: none;
    border-radius: 4px 4px 0 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s;
}
.live-chips-scroll-hint.scrolled-top::before {
    opacity: 1;
}
.live-chips-scroll-hint::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    pointer-events: none;
    border-radius: 0 0 4px 4px;
    transition: opacity 0.2s;
}
.live-chips-scroll-hint.no-fade::after {
    opacity: 0;
}
/* Chart inside the panel — height auto so SVG scales via viewBox aspect ratio */
.live-pull-panel .live-chart-wrap {
    background: none; border: none; border-radius: 0; padding: 0; margin-bottom: 0;
}
.live-pull-panel .live-prog-chart {
    width: 100%; height: auto; display: block;
}
/* Pull chips (Wipefest-style) */
.live-chip-primaries { display: flex; gap: 8px; margin-bottom: 0; }
.live-chips-toggle {
    padding: 4px 10px; border-radius: 6px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); cursor: pointer; font-size: 11px; font-family: inherit;
    transition: background .15s, color .15s, transform 0.35s cubic-bezier(0.4,0,0.2,1);
    transform-origin: center;
}
.live-chips-toggle:hover { background: rgba(255,255,255,0.10); color: var(--text-primary); }
.live-chips-toggle.collapsed { transform: rotate(-90deg); }
.live-chips {
    display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px;
    overflow: hidden;
    max-height: 600px;
    transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease;
    opacity: 1;
}
.live-chips.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}
.live-chip {
    position: relative; padding: 6px 10px 10px; min-width: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 6px; cursor: pointer; user-select: none;
    transition: border-color .15s, background .15s;
    display: flex; flex-direction: column; gap: 1px;
}
.live-chip:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }
.live-chip.selected { border-color: var(--accent-gold); background: rgba(245,197,66,0.07); }
.live-chip-num { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.live-chip-dur { font-size: 12px; color: var(--text-primary); }
.live-chip-time { font-size: 10px; color: var(--text-secondary); }
.live-chip-bar {
    position: absolute; bottom: 0; right: 0; height: 3px;
    border-radius: 0 0 5px 0; min-width: 3px; max-width: 100%;
    transition: width .3s;
}

/* Selected pull detail */
.live-pull-detail {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 18px 20px; margin-top: 4px;
}
.live-detail-header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.live-detail-title { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.live-detail-meta { font-size: 13px; color: var(--text-secondary); }
.live-detail-pct { font-size: 14px; font-weight: 700; }
.live-detail-wcl { font-size: 12px; color: var(--text-secondary); text-decoration: none; margin-left: auto; }
.live-detail-wcl:hover { color: var(--accent-gold); }
.live-detail-section-label {
    font-size: 11px; color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: .05em; margin-bottom: 10px; border-top: 1px solid var(--border); padding-top: 12px;
    display: flex; align-items: center; gap: 10px;
}
.live-deaths-header {
    font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: .05em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
    border-top: 1px solid var(--border); padding-top: 14px;
}
.live-deaths-count {
    background: rgba(231,76,60,0.18); color: #e74c3c;
    border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700;
}
.live-death-view-toggle { margin-left: auto; display: flex; gap: 6px; }
.live-death-view-btn, .live-ap-view-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); border-radius: 8px;
    padding: 7px 18px; font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.live-death-view-btn:hover, .live-ap-view-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.live-death-view-btn.active, .live-ap-view-btn.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: var(--text-primary); }
.live-deaths-grid {
    display: flex; flex-direction: column; gap: 2px;
}
/* By Cause view */
.live-cause-row {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px; border-radius: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.live-cause-row:last-child { border-bottom: none; }
.live-cause-count {
    font-size: 12px; font-weight: 700; color: #e74c3c;
    background: rgba(231,76,60,0.15); border-radius: 10px;
    padding: 1px 8px; flex-shrink: 0; min-width: 26px; text-align: center;
}
.live-cause-name { font-size: 13px; color: var(--text-primary); min-width: 160px; flex-shrink: 0; }
.live-cause-players { display: flex; flex-wrap: wrap; gap: 4px; }
.live-cause-chip {
    font-size: 11px; padding: 1px 7px; border-radius: 10px;
    background: rgba(255,255,255,0.08);
    white-space: nowrap; cursor: default;
}
.live-death-row {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 8px; border-radius: 4px;
    border-left: 2px solid transparent;
}
.live-death-row:hover { background: rgba(255,255,255,0.04); }
.live-death-row--cluster { border-left-color: rgba(231,76,60,0.45); background: rgba(231,76,60,0.06); }
.live-death-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; color: var(--text-secondary);
    flex-shrink: 0;
}
.live-death-time { font-size: 12px; color: var(--text-secondary); font-family: monospace; min-width: 40px; text-align: right; flex-shrink: 0; }
.live-death-name { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 90px; max-width: 140px; flex-shrink: 0; }
.live-death-kb   { flex: 1; font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.live-death-dmg  { font-size: 11px; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; min-width: 80px; text-align: right; }
.live-death-oneshot { font-size: 10px; font-weight: 700; color: #e74c3c; background: rgba(231,76,60,0.18); border-radius: 3px; padding: 1px 4px; letter-spacing: .03em; }
.live-death-rel { font-size: 11px; color: var(--accent-gold); font-family: monospace; flex-shrink: 0; }
.live-no-deaths { font-size: 13px; color: var(--text-secondary); padding: 4px 0; }

/* Primary view buttons (All Pulls / Latest Pull) */
.live-chip-primaries .live-chip {
    flex: 1; max-width: 280px; flex-direction: row; align-items: center;
    padding: 10px 14px 12px 12px; gap: 10px; min-width: 0 !important;
}
.live-primary-icon {
    font-size: 17px; line-height: 1; flex-shrink: 0;
    color: var(--text-secondary); transition: color .15s;
}
.live-chip-primaries .live-chip.selected .live-primary-icon { color: var(--accent-gold); }
.live-primary-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.live-primary-label { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.live-primary-meta { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Section content fade-in */
@keyframes liveSectionFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.live-section-content {
    animation: liveSectionFadeIn 0.35s cubic-bezier(0.4,0,0.2,1);
}

.live-ap-controls {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 10px; flex-wrap: wrap;
}
.live-ap-hint { flex: 1; text-align: center; font-size: 12px; color: var(--text-secondary); }
.live-ap-filter-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-secondary);
}
.live-ap-filter-input {
    width: 56px; padding: 3px 6px; border-radius: 6px;
    border: 1px solid var(--border); background: var(--bg-input, rgba(255,255,255,0.06));
    color: var(--text-primary); font-size: 12px; text-align: center;
}
.live-ap-player-search {
    width: 120px; padding: 3px 6px; border-radius: 6px;
    border: 1px solid var(--border); background: var(--bg-input, rgba(255,255,255,0.06));
    color: var(--text-primary); font-size: 12px;
}
.live-ap-filter-note {
    font-size: 11px; color: var(--text-secondary); font-style: italic;
}
/* All-pulls aggregate — WCL-style survival % table */
.live-ap-wrap { overflow-x: auto; overflow-y: auto; max-height: 540px; margin-top: 8px; }
.live-ap-table { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.live-ap-table th, .live-ap-table td { padding: 4px 8px; white-space: nowrap; }
.live-ap-table tbody td { border-bottom: 1px solid rgba(255,255,255,0.04); }
.live-ap-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-card); border-bottom: 1px solid var(--border); font-size: 11px; color: var(--text-secondary); text-align: center; }
.live-ap-nhdr { text-align: left !important; min-width: 120px; }
.live-ap-ahdr { min-width: 44px; }
.live-ap-phdr { min-width: 40px; font-family: monospace; }
.live-ap-name { position: sticky; left: 0; z-index: 1; background: var(--bg-card); font-size: 12px; min-width: 120px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.live-ap-avg  { font-weight: 600; text-align: center; font-size: 12px; font-family: monospace; min-width: 44px; }
.live-ap-cell { text-align: center; font-size: 11px; font-family: monospace; min-width: 40px; cursor: pointer; }
.live-ap-none { color: rgba(255,255,255,0.2); text-align: center; cursor: default; }
.live-ap-table tbody tr:hover td { filter: brightness(1.2); }
.live-ap-cause-hdr { max-width: 100px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }
.live-ap-cause-hdr .live-ability-link { color: inherit; text-decoration: none; pointer-events: auto; }
.live-ap-cause-hdr .live-ability-link:hover { text-decoration: underline; }
.live-ap-cause-cell { text-align: center; font-size: 12px; font-weight: 600; font-family: monospace; min-width: 36px; }
.live-ap-cause-total { font-weight: 700; text-align: center; font-size: 12px; font-family: monospace; color: var(--text-primary); }

/* Death breakdown popover */
.live-ap-popover {
    position: fixed; z-index: 9999;
    background: var(--bg-card, #1e2027); border: 1px solid var(--border, rgba(255,255,255,0.12));
    border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.55);
    padding: 12px 14px; min-width: 220px; max-width: 340px;
    font-size: 12px; color: var(--text-primary);
    animation: liveFadeIn .12s ease;
}
.live-ap-popover-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-secondary); margin-bottom: 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.1));
    display: flex; align-items: center; gap: 6px;
}
.live-ap-popover-row {
    display: flex; align-items: center; gap: 8px;
    padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.live-ap-popover-row:last-child { border-bottom: none; }
.live-ap-popover-count {
    font-size: 11px; font-weight: 700; color: #e74c3c;
    background: rgba(231,76,60,0.15); border-radius: 10px;
    padding: 0 6px; min-width: 20px; text-align: center; flex-shrink: 0;
}
.live-ap-popover-kb { flex: 1; color: var(--text-primary); }
.live-ap-popover-time { font-family: monospace; font-size: 11px; color: var(--text-secondary); flex-shrink: 0; }
.live-ap-popover-pct  { font-family: monospace; font-size: 11px; color: var(--text-secondary); flex-shrink: 0; min-width: 36px; text-align: right; }

/* ── Progress Chart ──────────────────────────────────────────────────────── */
.live-chart-wrap {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 16px; margin-bottom: 18px;
}
.live-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.live-chart-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.live-chart-trend-badge {
    font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 12px;
    border: 1px solid transparent;
}
.live-chart-trend-badge.improving { color: #2ecc71; background: rgba(46,204,113,0.12); border-color: rgba(46,204,113,0.3); }
.live-chart-trend-badge.declining { color: #e74c3c; background: rgba(231,76,60,0.12); border-color: rgba(231,76,60,0.3); }
.live-chart-trend-badge.stable    { color: var(--text-secondary); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.live-chart-svg-wrap { overflow: hidden; border-radius: 4px; }
.live-prog-chart { width: 100%; height: auto; display: block; }
.live-chart-grid { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.live-chart-kill-grid { stroke: rgba(46,204,113,0.22); stroke-width: 1; stroke-dasharray: 3 3; }
.live-chart-axis-label { font-size: 9px; fill: rgba(255,255,255,0.35); font-family: var(--font, sans-serif); }
.live-chart-line { stroke: rgba(255,255,255,0.18); stroke-width: 1.5; }
.live-chart-dot { cursor: default; }
.live-chart-dot.kill { stroke: rgba(46,204,113,0.5); stroke-width: 1.5; }
.live-chart-trend-line { stroke-width: 1.5; opacity: 0.65; }
.live-chart-sel-line { stroke: rgba(255,255,255,0.35); stroke-width: 1; stroke-dasharray: 3 3; }
.live-chart-trend-line.improving { stroke: #2ecc71; }
.live-chart-trend-line.declining { stroke: #e74c3c; }
.live-chart-trend-line.stable    { stroke: rgba(255,255,255,0.3); }

/* ── Wipe Window ─────────────────────────────────────────────────────────── */
.live-wipe-window {
    display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
    margin-top: 10px; padding: 8px 10px;
    background: rgba(231,76,60,0.07); border: 1px solid rgba(231,76,60,0.22);
    border-radius: 8px;
}
.live-wipe-window-label {
    font-size: 11px; font-weight: 700; color: #e74c3c;
    text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
    padding-top: 2px; flex-shrink: 0;
}
.live-wipe-window-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.live-wipe-chip {
    font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12); white-space: nowrap;
}

/* ── Insights Panel ──────────────────────────────────────────────────────── */
.live-insights-panel { display: flex; flex-direction: column; gap: 16px; }
.live-insights-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-wipe-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05); color: var(--text-secondary);
    font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.live-wipe-toggle:hover { border-color: rgba(255,255,255,0.3); color: var(--text-primary); background: rgba(255,255,255,0.09); }
.live-wipe-toggle.active { background: rgba(231,76,60,0.18); border-color: #e74c3c; color: #e74c3c; }
.live-wipe-filter-badge {
    font-size: 11px; color: #e74c3c; background: rgba(231,76,60,0.12);
    border: 1px solid rgba(231,76,60,0.3); border-radius: 20px; padding: 4px 10px;
}
.live-insights-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .live-insights-two-col { grid-template-columns: 1fr; } }
.live-insight-block {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 16px;
}
.live-insight-block-title {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}
.live-insight-block-sub {
    font-size: 11px; color: var(--text-secondary); opacity: .65; margin-bottom: 12px;
}
/* Key Takeaways block */
.live-insight-takeaways { border-left: 3px solid #f39c12; }
.live-takeaway-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.live-takeaway-item { font-size: 13px; color: var(--text-primary); line-height: 1.5; padding: 10px 12px; background: rgba(255,255,255,0.03); border-radius: 7px; }
.live-takeaway-item b { color: #f8f8f8; }
.live-takeaway-warn { color: #e74c3c; font-weight: 600; }
/* Player risk header */
.live-player-risk-header {
    display: flex; align-items: center; gap: 8px;
    padding: 3px 0 6px; border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 4px;
    font-size: 10px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .05em;
}
.live-player-risk-header span:nth-child(1) { min-width: 16px; flex-shrink: 0; }
.live-player-risk-header span:nth-child(2) { flex: 1.5; }
.live-player-risk-header span:nth-child(3) { min-width: 28px; text-align: right; flex-shrink: 0; }
.live-player-risk-header span:nth-child(4) { min-width: 52px; flex-shrink: 0; }
.live-player-risk-header span:nth-child(5) { flex: 2; }
.live-player-risk-header span:nth-child(6) { min-width: 60px; flex-shrink: 0; }
/* Session overview stats */
.live-insight-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.live-insight-stat {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-width: 80px; padding: 8px 12px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
}
.live-insight-stat-val { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.live-insight-stat-lbl { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; text-align: center; }
/* Top mechanics */
.live-mech-list { display: flex; flex-direction: column; gap: 7px; }
.live-mech-row { display: flex; align-items: center; gap: 7px; }
.live-mech-rank { font-size: 11px; font-weight: 700; color: var(--text-secondary); min-width: 14px; text-align: right; flex-shrink: 0; }
.live-mech-name { font-size: 12px; font-weight: 600; color: var(--text-primary); flex: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-ability-link { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.3); cursor: pointer; }
.live-ability-link:hover { border-bottom-color: var(--text-primary); color: #fff; }
.live-takeaway-item .live-ability-link { font-weight: 700; color: #f8f8f8; }
/* Wowhead's universal.css sets white-space:nowrap on .q which clips description text — override it */
.wowhead-tooltip .q,
.wowhead-tooltip .q1,
.wowhead-tooltip .q2,
.wowhead-tooltip .q3,
.wowhead-tooltip .q4 { white-space: normal !important; }
.live-mech-bar-wrap { flex: 1; background: rgba(255,255,255,0.06); border-radius: 3px; height: 6px; min-width: 40px; }
.live-mech-bar { height: 6px; border-radius: 3px; background: rgba(231,76,60,0.7); }
.live-mech-count { font-size: 13px; font-weight: 700; color: var(--text-primary); min-width: 24px; text-align: right; flex-shrink: 0; }
.live-mech-meta { font-size: 11px; color: var(--text-secondary); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-mech-os { color: #f39c12; font-weight: 700; }
/* Phase distribution */
.live-phase-list { display: flex; flex-direction: column; gap: 9px; }
.live-phase-row { display: flex; align-items: center; gap: 8px; }
.live-phase-label { font-size: 11px; color: var(--text-secondary); min-width: 108px; white-space: nowrap; flex-shrink: 0; }
.live-phase-bar-wrap { flex: 1; background: rgba(255,255,255,0.06); border-radius: 3px; height: 8px; }
.live-phase-bar { height: 8px; border-radius: 3px; }
.live-phase-count { font-size: 12px; color: var(--text-primary); font-weight: 600; min-width: 60px; text-align: right; white-space: nowrap; flex-shrink: 0; }
/* Player risk */
.live-player-risk-list { display: flex; flex-direction: column; gap: 4px; }
.live-player-risk-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.live-player-risk-row:last-child { border-bottom: none; }
.live-player-risk-rank { font-size: 11px; font-weight: 700; color: var(--text-secondary); min-width: 16px; text-align: right; flex-shrink: 0; }
.live-player-risk-name { font-size: 13px; font-weight: 600; flex: 1.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.live-player-risk-total { font-size: 14px; font-weight: 800; color: var(--text-primary); min-width: 28px; text-align: right; flex-shrink: 0; }
.live-player-risk-avg { font-size: 11px; color: var(--text-secondary); min-width: 52px; flex-shrink: 0; }
.live-player-risk-cause { font-size: 11px; color: var(--text-secondary); flex: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Pull chip improvements ──────────────────────────────────────────────── */
.live-chip-row2 { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.live-chip-deaths { font-size: 9px; color: rgba(231,76,60,0.75); font-weight: 700; white-space: nowrap; }
.live-chip-badge {
    position: absolute; top: -4px; right: -4px;
    font-size: 9px; font-weight: 900; line-height: 1;
    height: 16px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid; padding: 0 4px;
}
.live-chip { position: relative; }
.live-chip-badge.kill      { background: rgba(46,204,113,0.9);  border-color: #2ecc71; color: #000; }
.live-chip-badge.closecall { background: rgba(243,156,18,0.9); border-color: #f39c12; color: #000; width: 16px; padding: 0; border-radius: 50%; }
.live-chip.chip-kill      { border-color: rgba(46,204,113,0.5)  !important; }
.live-chip.chip-closecall { border-color: rgba(243,156,18,0.55) !important; }
.live-chip.chip-best      { border-color: rgba(52,152,219,0.45) !important; }
.live-chip.compare        { border-color: rgba(155,89,182,0.65) !important; background: rgba(155,89,182,0.08); }

/* Kill indicator — replaces the skull icon everywhere */
.live-kill-badge {
    display: inline-block;
    font-size: 10px; font-weight: 900; letter-spacing: .03em;
    color: #000; background: #2ecc71;
    border-radius: 3px; padding: 1px 4px; line-height: 1.4;
    vertical-align: middle;
}
.live-chip.chip-kill      { border-color: rgba(46,204,113,0.5)  !important; }
.live-chip.chip-closecall { border-color: rgba(243,156,18,0.55) !important; }
.live-chip.chip-best      { border-color: rgba(52,152,219,0.45) !important; }
.live-chip.compare        { border-color: rgba(155,89,182,0.65) !important; background: rgba(155,89,182,0.08); }

/* ── Death Timeline (single pull) ────────────────────────────────────────── */
.live-dtl-wrap {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 12px; margin-bottom: 14px;
}
.live-dtl-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; justify-content: space-between; }
.live-dtl-header-right { display: flex; align-items: center; gap: 8px; }
.live-dtl-role-filters { display: flex; gap: 4px; }
.live-dtl-role-btn {
    font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 10px;
    border: 1px solid var(--rc, rgba(255,255,255,0.2));
    background: transparent; color: rgba(255,255,255,0.35);
    cursor: pointer; font-family: inherit; transition: background .12s, color .12s;
}
.live-dtl-role-btn.active {
    background: color-mix(in srgb, var(--rc) 18%, transparent);
    color: var(--rc);
}
.live-dtl-role-btn:hover { background: color-mix(in srgb, var(--rc) 10%, transparent); color: var(--rc); }
.live-dtl-role-legend { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text-secondary); }
.live-dtl-role-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 4px; flex-shrink: 0; }
.live-dtl-title  { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.live-dtl-svg-wrap { position: relative; overflow: hidden; }
.live-dtl-svg { width: 100%; height: 160px; display: block; }
.live-dtl-names { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.live-dtl-name {
    position: absolute;
    bottom: 4px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1;
    color: rgba(255,255,255,0.55);
    transform: translateX(-50%) rotate(-45deg);
    transform-origin: bottom center;
    opacity: 0.95;
}
/* Name color matches role color */
.live-dtl-name[data-role="Tank"]   { color: #4a9eff; }
.live-dtl-name[data-role="Healer"] { color: #2ecc71; }
.live-dtl-name[data-role="DPS"]    { color: #e87070; }
.live-avalanche-badge {
    font-size: 11px; font-weight: 700; color: #e74c3c;
    background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.35);
    border-radius: 10px; padding: 1px 9px;
}

/* ── Compare pull feature ─────────────────────────────────────────────────── */
.live-compare-btn {
    font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
    color: var(--text-secondary); cursor: pointer; font-family: inherit;
    transition: background .12s, color .12s, border-color .12s;
}
.live-compare-btn:hover { background: rgba(155,89,182,0.15); color: #9b59b6; border-color: rgba(155,89,182,0.4); }
.live-compare-btn.active { background: rgba(155,89,182,0.15); color: #9b59b6; border-color: rgba(155,89,182,0.4); }
.live-compare-panel {
    margin-top: 12px; padding: 12px 14px;
    background: rgba(155,89,182,0.07); border: 1px solid rgba(155,89,182,0.3);
    border-radius: 8px;
}
.live-compare-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.live-compare-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.live-compare-pct   { font-size: 12px; font-weight: 700; }
.live-compare-dur   { font-size: 12px; color: var(--text-secondary); }
.live-compare-clear { margin-left: auto; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 14px; padding: 0 4px; }
.live-compare-clear:hover { color: var(--text-primary); }
.live-compare-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.live-compare-row:last-child { margin-bottom: 0; }
.live-compare-lbl { font-size: 11px; font-weight: 700; white-space: nowrap; padding-top: 3px; min-width: 120px; }
.live-compare-lbl.red   { color: #e74c3c; }
.live-compare-lbl.green { color: #2ecc71; }
.live-compare-lbl.dim   { color: var(--text-secondary); }
.live-compare-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.live-cmp-chip {
    font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 9px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: var(--text-primary);
}

/* ── Mechanic sparklines ─────────────────────────────────────────────────── */
.live-mech-row { flex-wrap: wrap; row-gap: 2px; }
.live-spark-row { display: flex; gap: 2px; flex-wrap: nowrap; width: 100%; margin-top: 3px; flex-basis: 100%; overflow: hidden; }
.live-spark-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.live-spark-lbl { font-size: 9px; color: var(--text-secondary); margin-left: 4px; padding-top: 1px; flex-shrink: 0; }
