
:root {
    --bg-root: #08090c;
    --bg-deep: #0d0e13;
    --bg-surface: #12141c;
    --bg-card: #161824;
    --bg-input: #0a0b10;

    --fg: #e2e5f5;
    --fg-soft: rgba(226, 229, 245, 0.70);
    --fg-faint: rgba(226, 229, 245, 0.40);

    --accent: #7aa2f7;
    --accent-soft: rgba(122, 162, 247, 0.14);
    --accent-glow: rgba(122, 162, 247, 0.28);
    --green: #9ece6a;
    --yellow: #e0af68;
    --red: #f7768e;
    --purple: #bb9af7;
    --cyan: #7dcfff;

    --hair: rgba(226, 229, 245, 0.08);
    --hair-strong: rgba(226, 229, 245, 0.18);
    --hair-accent: rgba(122, 162, 247, 0.38);

    --glass-1: rgba(18, 20, 28, 0.68);
    --glass-2: rgba(18, 20, 28, 0.86);
    --glass-3: rgba(22, 24, 36, 0.97);

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-pill: 9999px;
    --card-img-height: 120px;
    --ease-spring: cubic-bezier(0.22, 0.78, 0.18, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-fast: 180ms cubic-bezier(0.22, 0.78, 0.18, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; background: var(--bg-root); }
body {
    font-family: var(--font-sans);
    background: var(--bg-root);
    color: var(--fg);
    min-height: 100vh; min-height: 100dvh;
    line-height: 1.5;
    font-size: 13px;
    letter-spacing: -0.008em;
    overflow-x: hidden;
}
body.modal-open, body.picker-open {
    overflow: hidden !important;
    touch-action: none !important;
}

/* ═══ SUBSTRATE ═══ */
.aurora-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora-orb { position: absolute; border-radius: 50%; filter: blur(100px); will-change: transform; }
.aurora-orb--1 { width: 600px; height: 600px; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); top: -10%; left: -5%; opacity: 0.28; animation: auroraFloat1 20s ease-in-out infinite; }
.aurora-orb--2 { width: 500px; height: 500px; background: radial-gradient(circle, var(--purple) 0%, transparent 70%); bottom: -15%; right: -5%; opacity: 0.16; animation: auroraFloat2 24s ease-in-out infinite; }
@keyframes auroraFloat1 { 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(6%,4%); } }
@keyframes auroraFloat2 { 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(-5%,-5%); } }
.grain-overlay { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.024; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E"); }

/* ═══ LAYOUT ═══ */
.app-container { position: relative; z-index: 2; max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; }

/* ─── Page Header (scrolls) ─── */
.page-header { padding: 12px 16px 8px; }

.glass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--glass-1);
    border: 1px solid var(--hair);
    border-radius: var(--radius);
    gap: 10px;
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--hair-accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent); }
.brand-info { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: -0.015em; }
.brand-version { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-faint); letter-spacing: 0.04em; }
.header-center { display: flex; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 6px; }

/* ─── Sticky Control Zone ─── */
.sticky-control-zone {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 0 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(to bottom, var(--bg-root) 70%, transparent 100%);
}

/* ═══ SEGMENT NAV — 2 rows wrap ═══ */
.segment-nav {
    display: flex;
    flex-wrap: wrap;          /* Wrap to 2 rows — no horizontal scroll */
    gap: 4px;
    background: var(--glass-2);
    border: 1px solid var(--hair);
    border-radius: var(--radius-lg);
    padding: 5px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-faint);
    cursor: pointer;
    transition: all var(--ease-fast);
    border: none;
    white-space: nowrap;
    user-select: none;
}
.nav-tab:hover { color: var(--fg-soft); background: rgba(255,255,255,0.04); }
.nav-tab.active { color: var(--fg); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--hair-accent); }
.nav-tab.active i { color: var(--accent); }
.nav-tab i { font-size: 11px; opacity: 0.75; }
.tab-count {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: var(--radius-pill);
    background: rgba(226, 229, 245, 0.07);
    color: var(--fg-faint);
    line-height: 1.5;
}
.nav-tab.active .tab-count { background: rgba(122, 162, 247, 0.22); color: var(--accent); }

/* ═══ SEARCH TOOLBAR ═══ */
.glass-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 7px 10px;
    background: var(--glass-2);
    border: 1px solid var(--hair);
    border-radius: var(--radius);
}
.toolbar-search { position: relative; flex: 1; min-width: 180px; }
.toolbar-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--fg-faint); font-size: 12px; }
.search-input {
    width: 100%;
    padding: 6px 10px 6px 30px;
    background: var(--bg-input);
    border: 1px solid var(--hair);
    border-radius: var(--radius-sm);
    color: var(--fg);
    font-size: 12px;
    outline: none;
    transition: border-color var(--ease-fast);
    font-family: var(--font-sans);
}
.search-input:focus { border-color: var(--hair-accent); }
.search-input::placeholder { color: var(--fg-faint); font-family: var(--font-mono); font-size: 10.5px; }
.toolbar-controls { display: flex; align-items: center; gap: 6px; }
.select-glass { padding: 6px 10px; background: var(--bg-input); border: 1px solid var(--hair); border-radius: var(--radius-sm); color: var(--fg); font-size: 11.5px; outline: none; cursor: pointer; font-family: var(--font-sans); }
.view-toggle { display: flex; background: var(--bg-input); border: 1px solid var(--hair); border-radius: var(--radius-sm); padding: 2px; }
.view-btn { padding: 4px 8px; border-radius: 4px; color: var(--fg-faint); cursor: pointer; transition: all var(--ease-fast); border: none; background: transparent; font-size: 12px; }
.view-btn.active { background: var(--glass-3); color: var(--fg); }

/* ═══ STATUS PILL ═══ */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 600; background: rgba(158, 206, 106, 0.12); color: var(--green); border: 1px solid rgba(158, 206, 106, 0.25); font-family: var(--font-mono); }
.status-pill.unsaved { background: rgba(224, 175, 104, 0.12); color: var(--yellow); border-color: rgba(224, 175, 104, 0.28); }
.status-pill.loading { background: rgba(122, 162, 247, 0.12); color: var(--accent); border-color: var(--hair-accent); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: statusPulse 2s ease-in-out infinite; }
@keyframes statusPulse { 0%,100%{opacity:0.6} 50%{opacity:1} }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all var(--ease-fast);
    border: 1px solid transparent; outline: none; user-select: none;
    font-family: var(--font-sans); white-space: nowrap;
}
.btn:active { transform: scale(0.95); }
.btn-glass { background: var(--glass-2); border-color: var(--hair); color: var(--fg-soft); }
.btn-glass:hover { background: var(--glass-3); border-color: var(--hair-strong); color: var(--fg); transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #08090c; border-color: var(--accent); font-weight: 700; box-shadow: 0 2px 10px rgba(122, 162, 247, 0.35); }
.btn-primary:hover { background: #8baef8; transform: translateY(-1px); }
.btn-danger { background: rgba(247, 118, 142, 0.12); color: var(--red); border-color: rgba(247, 118, 142, 0.22); }
.btn-danger:hover { background: rgba(247, 118, 142, 0.22); transform: translateY(-1px); }
.btn-sm { padding: 5px 9px; font-size: 11px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; }

/* Card delete button */
.btn-action-delete {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(247, 118, 142, 0.10); color: var(--red);
    border: 1px solid rgba(247, 118, 142, 0.18);
    border-radius: var(--radius-sm); padding: 5px 9px;
    font-size: 11px; cursor: pointer; font-family: var(--font-sans);
    transition: all var(--ease-fast);
}
.btn-action-delete:hover { background: rgba(247, 118, 142, 0.25); border-color: var(--red); transform: translateY(-1px); }
.btn-action-delete:active { transform: scale(0.94); }

/* ═══ CONTENT MAIN ═══ */
.content-main { flex: 1; min-height: 0; padding: 8px 16px 90px; }

/* ═══ CARDS GRID ═══ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* ─── BASE CARD ─── */
.item-card {
    background: var(--glass-1);
    border: 1px solid var(--hair);
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column;
    transition: all 0.22s var(--ease-spring);
    position: relative; overflow: hidden;
    cursor: pointer;
}
.item-card:hover {
    border-color: var(--hair-accent);
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 18px rgba(122,162,247,0.10);
}

/* Standard image area */
.card-img-wrap {
    width: 100%; height: var(--card-img-height);
    min-height: var(--card-img-height); max-height: var(--card-img-height);
    background: rgba(8, 9, 12, 0.6);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
/* Subtle bottom fade — barely visible, just smooths the image/text transition */
.card-img-wrap::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 28px;
    background: linear-gradient(to bottom, transparent, rgba(13,14,19,0.35));
    pointer-events: none; z-index: 1;
}
.card-img {
    max-width: 90%; max-height: 90%; object-fit: contain;
    transition: transform 0.4s var(--ease-spring);
    position: relative; z-index: 0;
}
.item-card:hover .card-img { transform: scale(1.08); }

.card-img-placeholder {
    font-size: 22px; color: var(--fg-faint);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    position: relative; z-index: 1;
}
.card-img-placeholder span { font-size: 9.5px; font-family: var(--font-mono); }

/* SkinIcon badge — top-right of image */
.card-skinicon-badge {
    position: absolute; top: 8px; right: 8px; z-index: 3;
    width: 34px; height: 34px; border-radius: 8px;
    object-fit: contain;
    background: rgba(8, 9, 12, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 2px solid rgba(255,255,255,0.20);
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    transition: transform var(--ease-fast);
}
.card-skinicon-badge:hover { transform: scale(2); z-index: 10; }

/* Standard card info */
.card-info {
    padding: 8px 12px 4px;
    display: flex; flex-direction: column; gap: 2px;
    position: relative; z-index: 2;
    margin-top: -12px;
}
.card-title-row { display: flex; align-items: center; }
.card-title { font-size: 12px; font-weight: 600; color: var(--fg-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; letter-spacing: -0.01em; }
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; max-height: 22px; overflow: hidden; }

.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 9px; font-weight: 600; white-space: nowrap; }
.badge-purple { background: rgba(187,154,247,0.14); color: var(--purple); }
.badge-emerald { background: rgba(158,206,106,0.14); color: var(--green); }
.badge-amber { background: rgba(224,175,104,0.14); color: var(--yellow); }
.badge-blue { background: rgba(122,162,247,0.14); color: var(--accent); }
.badge-pink { background: rgba(247,118,142,0.14); color: var(--red); }
.badge-id { background: rgba(122,162,247,0.18); color: var(--accent); font-size: 9.5px; letter-spacing: 0.02em; }

/* Card action row */
.card-actions {
    display: flex; justify-content: flex-end;
    gap: 6px; padding: 3px 12px 10px;
    position: relative; z-index: 3;
}

/* ─── AMBIENT HERO/KILL CARD — Unified flat layers, no cuts ─── */
.item-card.ambient-card {
    background: transparent;
    border-color: var(--hair-strong);
    display: block;           /* override flex column */
    position: relative;
    min-height: 200px;
    overflow: hidden;
    cursor: pointer;
}

/* Layer 0: Blurred skinIcon background — covers full card */
.ambient-card-bg {
    position: absolute; inset: -8px; z-index: 0;
    background-size: cover; background-position: center 30%;
    filter: blur(5px) brightness(0.42) saturate(1.5);
    border-radius: inherit;
    pointer-events: none;
}

/* Layer 1: Dark overlay — uniform across entire card */
.ambient-card-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to bottom, rgba(8,9,12,0.15) 0%, rgba(8,9,12,0.45) 60%, rgba(8,9,12,0.70) 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* Layer 2: Main image — centered in upper portion */
.ambient-card-main {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    height: 130px;
    padding: 8px 8px 0;
}
/* Glow ellipse beneath the image — reflection effect */
.ambient-card-main::before {
    content: '';
    position: absolute; bottom: 0; left: 12%; right: 12%;
    height: 28px;
    background: radial-gradient(ellipse at center, rgba(122,162,247,0.11) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.ambient-card-img {
    max-width: 92%; max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 22px rgba(0,0,0,0.65)) drop-shadow(0 2px 4px rgba(122,162,247,0.15));
    transition: transform 0.35s var(--ease-spring);
}

/* Layer 3: SkinIcon badge — top-right corner */
.ambient-card-badge {
    position: absolute; top: 10px; right: 10px; z-index: 5;
    width: 36px; height: 36px; border-radius: 9px;
    object-fit: contain;
    background: rgba(8,9,12,0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 2px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    transition: transform var(--ease-fast);
}
.ambient-card-badge:hover { transform: scale(2.2); z-index: 10; }

/* Layer 2b: Text group — bottom portion */
.ambient-card-text {
    position: relative; z-index: 2;
    padding: 4px 12px 10px;
    display: flex; flex-direction: column; gap: 1px;
}

/* Delete button — bottom-right */
.ambient-card-delete {
    position: absolute; bottom: 10px; right: 10px; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    background: rgba(247,118,142,0.18);
    color: var(--red);
    border: 1px solid rgba(247,118,142,0.30);
    border-radius: var(--radius-sm);
    font-size: 12px; cursor: pointer;
    transition: all var(--ease-fast);
}
.ambient-card-delete:hover { background: rgba(247,118,142,0.35); border-color: var(--red); transform: scale(1.1); }
.ambient-card-delete:active { transform: scale(0.92); }

/* ─── Ambient card hover ─── */
.item-card.ambient-card:hover {
    border-color: var(--hair-accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 20px rgba(122,162,247,0.12);
}
.item-card.ambient-card:hover .ambient-card-img { transform: scale(1.04); }
.item-card.ambient-card:hover .ambient-card-bg { filter: blur(3px) brightness(0.50) saturate(1.3); }

/* ─── No skinIcon variant — main image as bg, blurred, gradient overlay ─── */
.item-card.ambient-card.no-badge .ambient-card-bg {
    filter: blur(5px) brightness(0.35) saturate(1.2);
}
.item-card.ambient-card.no-badge .ambient-card-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(8,9,12,0.25) 40%, rgba(8,9,12,0.72) 100%);
}
.item-card.ambient-card.no-badge:hover .ambient-card-bg {
    filter: blur(3px) brightness(0.42) saturate(1.35);
}

/* Hero name (large, bold, white — +20% size) */
.card-hero-name {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* Skin name (smaller, regular, white alpha — +20% size) */
.card-skin-name {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

/* ID tag — +20%, glass badge */
.card-id-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(122,162,247,0.22);
    border: 1px solid rgba(122,162,247,0.32);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
    width: fit-content;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ═══ TABLE VIEW ═══ */
.table-wrap { background: var(--glass-1); border: 1px solid var(--hair); border-radius: var(--radius-lg); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table thead { background: var(--glass-2); }
.data-table th { padding: 9px 12px; text-align: left; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; color: var(--fg-faint); border-bottom: 1px solid var(--hair); white-space: nowrap; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid var(--hair); color: var(--fg-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { cursor: pointer; transition: background var(--ease-fast); }
.data-table tbody tr:hover td { background: rgba(122,162,247,0.05); }
.table-img-thumb { width: 28px; height: 28px; border-radius: 4px; object-fit: contain; background: var(--bg-deep); border: 1px solid var(--hair); }

/* ═══ EXCLUDED SKINS ═══ */
.excluded-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.hero-excluded-card {
    background: var(--glass-1);
    border: 1px solid var(--hair);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--ease-fast);
    cursor: pointer;
}
.hero-excluded-card:hover { border-color: var(--hair-accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

.hero-excluded-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 14px;
    background: var(--glass-2);
}
.hero-excluded-brand { display: flex; align-items: center; gap: 10px; }
.hero-excluded-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--bg-deep); border: 1px solid var(--hair-strong); }
.hero-excluded-meta { display: flex; flex-direction: column; gap: 2px; }
.hero-excluded-title { font-size: 14px; font-weight: 700; color: var(--fg); letter-spacing: -0.01em; }
.hero-excluded-count { font-family: var(--font-mono); font-size: 10px; color: var(--fg-faint); }

/* Add skin inline panel (hidden by default, toggled on click) */
.hero-excluded-add-panel {
    padding: 10px;
    border-top: 1px solid var(--hair);
    background: rgba(122,162,247,0.04);
    display: none;
    animation: panelSlide 0.22s var(--ease-spring);
}
.hero-excluded-add-panel.open { display: block; }
@keyframes panelSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.add-panel-row { display: flex; align-items: center; gap: 8px; }
.add-panel-label { font-family: var(--font-mono); font-size: 10px; color: var(--fg-faint); white-space: nowrap; }

/* Skin tag list inside excluded card */
.skin-tag-list { padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.skin-excluded-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--glass-1); border: 1px solid var(--hair);
    border-radius: var(--radius); padding: 7px 10px;
    transition: all var(--ease-fast);
}
.skin-excluded-item:hover { border-color: var(--hair-strong); background: var(--glass-2); }
.skin-excluded-thumb { width: 34px; height: 34px; border-radius: 7px; object-fit: contain; background: var(--bg-deep); border: 1px solid var(--hair-strong); flex-shrink: 0; }
.skin-excluded-details { display: flex; flex-direction: column; gap: 2px; overflow: hidden; flex: 1; }
.skin-excluded-name { font-size: 12.5px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.remove-tag { margin-left: auto; cursor: pointer; opacity: 0.4; color: var(--fg-faint); padding: 4px; border-radius: 4px; transition: all var(--ease-fast); flex-shrink: 0; }
.remove-tag:hover { opacity: 1; color: var(--red); background: rgba(247,118,142,0.12); }

/* Add hero card (dashed) */
.hero-excluded-add {
    background: transparent;
    border: 1px dashed var(--hair-strong);
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 32px 16px;
    cursor: pointer;
    transition: all var(--ease-fast);
    color: var(--fg-faint); font-weight: 600; font-size: 13px;
}
.hero-excluded-add:hover { border-color: var(--accent); color: var(--accent); background: rgba(122,162,247,0.05); }
.hero-excluded-add i { font-size: 28px; opacity: 0.5; }

/* ═══ FLOATING ACTION BUTTON ═══ */
.fab-add {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 90;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #08090c;
    border: none;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(122,162,247,0.55), 0 2px 6px rgba(0,0,0,0.4);
    transition: all 0.22s var(--ease-spring);
    display: flex; align-items: center; justify-content: center;
}
.fab-add:hover { transform: scale(1.1) rotate(15deg); box-shadow: 0 6px 28px rgba(122,162,247,0.65); }
.fab-add:active { transform: scale(0.94); }

/* ═══ HERO PICKER SHEET ═══ */
.hero-picker-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(5,6,8,0.80);
    backdrop-filter: blur(12px);
    display: none; align-items: flex-end;
    padding: 0;
}
.hero-picker-overlay.open { display: flex; }

.hero-picker-sheet {
    width: 100%; background: var(--bg-surface);
    border-top: 1px solid var(--hair-strong);
    border-radius: 20px 20px 0 0;
    display: flex; flex-direction: column;
    max-height: 82vh;
    animation: sheetRise 0.32s var(--ease-spring);
}
@keyframes sheetRise { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.hero-picker-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 10px;
    border-bottom: 1px solid var(--hair);
}
.hero-picker-header h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hero-picker-header h3 i { color: var(--accent); }

.hero-picker-search {
    position: relative; padding: 10px 14px;
    border-bottom: 1px solid var(--hair);
}
.hero-picker-search i { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); color: var(--fg-faint); font-size: 12px; }
.hero-picker-search .search-input { padding-left: 32px; background: var(--bg-input); }

.hero-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    padding: 12px 14px;
    overflow-y: auto;
    flex: 1;
}

.hero-picker-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: var(--glass-1); border: 1px solid var(--hair);
    border-radius: var(--radius); padding: 10px 6px;
    cursor: pointer; transition: all var(--ease-fast);
    text-align: center;
}
.hero-picker-item:hover { border-color: var(--hair-accent); background: var(--accent-soft); transform: scale(1.04); }
.hero-picker-item:active { transform: scale(0.96); }
.hero-picker-item.already-added { opacity: 0.38; pointer-events: none; }
.hero-picker-icon { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: var(--bg-deep); border: 1px solid var(--hair-strong); }
.hero-picker-name { font-size: 10px; font-weight: 600; color: var(--fg-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* ═══ MODAL ═══ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(5,6,8,0.82);
    backdrop-filter: blur(14px);
    display: none; align-items: center; justify-content: center;
    padding: 20px; pointer-events: auto;
}
.modal-overlay.active { display: flex; }
.modal-card {
    background: var(--glass-3);
    border: 1px solid var(--hair-strong);
    border-radius: 16px; width: 100%; max-width: 520px;
    max-height: 88vh; display: flex; flex-direction: column;
    box-shadow: 0 28px 70px rgba(0,0,0,0.72), 0 0 60px rgba(122,162,247,0.10);
    animation: modalFloat 0.3s var(--ease-spring);
}
@keyframes modalFloat { from { opacity: 0; transform: scale(0.94) translateY(14px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--hair); }
.modal-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.modal-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--hair); }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; color: var(--fg-faint); letter-spacing: 0.03em; }
.form-input { width: 100%; padding: 7px 10px; background: var(--bg-input); border: 1px solid var(--hair); border-radius: var(--radius-sm); color: var(--fg); font-size: 12px; outline: none; font-family: var(--font-sans); }
.form-input:focus { border-color: var(--hair-accent); }
.form-input::placeholder { color: var(--fg-faint); font-family: var(--font-mono); font-size: 10px; }
select.form-input { cursor: pointer; }
.modal-img-preview-wrap { width: 100%; height: 90px; border-radius: var(--radius-sm); background: var(--bg-deep); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--hair); }

/* Picker skin cards in modal */
.picker-skin-card { transition: all var(--ease-fast); cursor: pointer; }
.picker-skin-card:hover:not(.already-excluded) { border-color: var(--hair-strong) !important; background: var(--glass-2) !important; }
.already-excluded { opacity: 0.55; }
.picker-skin-img { width: 34px; height: 34px; border-radius: 6px; object-fit: contain; background: var(--bg-deep); border: 1px solid var(--hair); }

/* Skinicon preview in modal */
.skinicon-preview { border-radius: var(--radius-sm); background: var(--bg-deep); padding: 7px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--hair); }

/* Scan panel */
.scan-panel h3 { font-size: 13px; font-weight: 700; }
.scan-panel .btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }

/* ═══ TOAST ═══ */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 6px; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--glass-3); border: 1px solid var(--hair-strong); border-radius: var(--radius-sm); font-size: 12px; color: var(--fg); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

#rawJsonTextarea { width: 100%; height: 480px; background: var(--bg-deep); color: var(--fg); font-family: var(--font-mono); font-size: 11px; padding: 12px; border: 1px solid var(--hair); border-radius: var(--radius-sm); outline: none; resize: vertical; }

/* ═══ EMPTY STATE ═══ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 20px; color: var(--fg-faint); text-align: center; font-size: 13px; grid-column: 1 / -1; }
.empty-state i { font-size: 32px; opacity: 0.22; }

/* ═══ STAGGERED CARD ANIMATION ═══ */
@keyframes cardRise { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.item-card { animation: cardRise 0.38s var(--ease-spring) backwards; }
.item-card:nth-child(1)  { animation-delay: 0.03s; }
.item-card:nth-child(2)  { animation-delay: 0.07s; }
.item-card:nth-child(3)  { animation-delay: 0.11s; }
.item-card:nth-child(4)  { animation-delay: 0.15s; }
.item-card:nth-child(5)  { animation-delay: 0.19s; }
.item-card:nth-child(6)  { animation-delay: 0.23s; }
.item-card:nth-child(7)  { animation-delay: 0.27s; }
.item-card:nth-child(8)  { animation-delay: 0.31s; }
.item-card:nth-child(n+9) { animation-delay: 0.35s; }

/* ═══ RESPONSIVE (< 768px) ═══ */
@media (max-width: 768px) {
    .page-header { padding: 10px 10px 6px; }
    .sticky-control-zone { padding: 0 10px 6px; }
    .content-main { padding: 8px 10px 90px; }

    .segment-nav { padding: 4px; }
    .nav-tab { padding: 5px 10px; font-size: 11.5px; }

    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card-img-wrap { height: 96px; min-height: 96px; max-height: 96px; }
    .card-hero-name { font-size: 13px; }
    .card-skin-name { font-size: 10px; }

    .excluded-container { grid-template-columns: 1fr; }

    .glass-toolbar { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; }
    .toolbar-search { min-width: 100%; }
    .toolbar-controls { width: 100%; justify-content: space-between; }

    .hero-picker-grid { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); }
    .hero-picker-icon { width: 44px; height: 44px; }

    .fab-add { width: 50px; height: 50px; font-size: 18px; bottom: 20px; right: 16px; }

    .modal-overlay { padding: 10px; }
    .modal-card { max-height: 90vh; border-radius: 16px; }

    .toast-container { bottom: 16px; right: 8px; left: 8px; }
    .toast { max-width: 100%; }
}
