﻿/* ═══════════════════════════════════════════
   HERO SIEGE BUILD PLANNER — Guide Portal CSS (hsguides.com)
   ═══════════════════════════════════════════ */

/* ─── FONTS ─── */
@font-face { font-family: 'AvQest'; src: url('data/fonts/AvQest.ttf'); font-display: swap; }
@font-face { font-family: 'Fontin'; src: url('data/fonts/Fontin-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fontin'; src: url('data/fonts/Fontin-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Fontin SC'; src: url('data/fonts/Fontin-SmallCaps.ttf'); font-display: swap; }

/* ─── TOKENS ─── */
:root {
    --bg-deep:      #0a0a0e;
    --bg-body:      #111117;
    --bg-surface:   #18181f;
    --bg-card:      #1c1c24;
    --bg-card-alt:  #1f1f28;
    --bg-hover:     #25252f;
    --border:       #2a2a35;
    --border-light: #333340;
    --text:         #d0cfc8;
    --text-dim:     #8a8a95;
    --text-muted:   #5a5a68;
    --accent:       #c3443e;
    --accent-glow:  #e05048;
    --accent-dark:  #8b2e28;
    --fire:         #ff6a35;
    --fire-dim:     #b34520;
    --gold:         #e8c35a;
    --gold-dim:     #a08830;
    --cold:         #5599dd;
    --poison:       #55cc66;
    --lightning:    #ccaa22;
    --legendary:    #ff8844;
    --satanic:      #CB1515;
    --set-color:    #0CD61B;
    --angelic:      #F3F393;
    --heroic:       #00F28D;
    --unholy:       #CD3769;
    --mythic:       #a855f7;
    --panel:        #1c1c24;
    --bg2:          #18181f;
    --font-display: 'AvQest', serif;
    --font-body:    'Fontin', Georgia, serif;
    --font-sc:      'Fontin SC', 'Fontin', Georgia, serif;
    --max-w:        1120px;
    --radius:       4px;
    --radius-lg:    8px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-deep);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/data/images/bg.png') center top / cover no-repeat;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}
ul, ol { padding-left: 1.5em; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dim); text-decoration: underline; }
input, select, textarea, button { font-family: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ─── Form Input Base ─── */
.form-input {
  width: 100%; padding: 8px 12px; border-radius: 6px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: var(--gold-dim); outline: none;
  box-shadow: 0 0 0 2px rgba(232,195,90,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; line-height: 1.5; }

/* ─── LAYOUT ─── */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.content-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ═══════════ HEADER ═══════════ */
.header {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}
.header.header-transparent {
    background: transparent;
    border-bottom-color: transparent;
}
.header.header-transparent.header-scrolled {
    background: var(--bg-deep);
    border-bottom-color: var(--border);
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 2rem;
}
.header-brand {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}
.logo-skull {
    font-size: 1.8rem;
    color: var(--accent);
    position: relative;
    top: 2px;
}
.logo-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logo-sub {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}
.nav-toggle {
    display: none; background: none; border: none; color: var(--text);
    font-size: 1.4rem; cursor: pointer; padding: 0.4rem;
}
.header-nav {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}
.nav-link {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }
.nav-link.active { color: var(--gold); }
.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
}
.btn-act {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-act:hover {
    color: var(--text);
    border-color: var(--border-light);
    background: var(--bg-hover);
}
.btn-save {
    color: var(--bg-deep);
    background: var(--accent);
    border-color: var(--accent);
}
.btn-save:hover {
    background: var(--accent-glow);
    border-color: var(--accent-glow);
    color: #fff;
}

/* ═══════════ DRAFT BANNER ═══════════ */
.draft-banner {
    background: linear-gradient(90deg, rgba(232,195,90,0.12), rgba(195,68,62,0.12));
    border: 1px solid rgba(232,195,90,0.3);
    color: var(--gold);
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 0;
}

/* ═══════════ GUIDE HERO ═══════════ */
.guide-hero {
    background:
        linear-gradient(135deg, rgba(195,68,62,0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}
.guide-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232,195,90,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.guide-hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

/* ─── LEFT: Class Emblem ─── */
.hero-emblem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
}
.hero-emblem-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-deep) 100%);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(232,195,90,0.08), inset 0 0 12px rgba(0,0,0,0.4);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.hero-emblem-ring:hover {
    border-color: var(--gold-dim);
    box-shadow: 0 0 24px rgba(232,195,90,0.15), inset 0 0 12px rgba(0,0,0,0.4);
}
.hero-emblem-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    filter: drop-shadow(0 0 6px rgba(232,195,90,0.25));
}
.hero-emblem-class {
    font-family: var(--font-sc);
    font-size: 0.58rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dim);
    text-align: center;
}

/* ─── CENTER: Title Block ─── */
.hero-center {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.hero-breadcrumb-row {
    margin-bottom: 0.25rem;
}

.breadcrumb {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.bc-sep { margin: 0 0.25rem; }
.bc-active { color: var(--gold-dim); }

.guide-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.title-edit {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--gold);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.6rem;
    width: 100%;
    letter-spacing: 1px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.title-edit:focus {
    outline: none;
    border-color: var(--gold-dim);
    box-shadow: 0 0 8px rgba(232,195,90,0.1);
}
.edit-pen {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}
.guide-subtitle {
    color: var(--text-dim);
    font-size: 0.92rem;
    max-width: 600px;
    line-height: 1.65;
    margin: 0;
}

.guide-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.meta-item { display: flex; flex-direction: column; gap: 0.1rem; }
.meta-label {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.meta-val {
    font-size: 0.9rem;
    color: var(--text);
}
.icon-settings {
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
}
.select-wrap {
    position: relative;
}
.select-wrap select,
#classSelect {
    font-family: var(--font-sc);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--gold);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.3rem 1.8rem 0.3rem 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a8a95'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}
.level-input {
    font-family: var(--font-sc);
    font-size: 0.85rem;
    color: var(--gold);
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 3.5rem;
    text-align: center;
    padding: 0.3rem 0.35rem;
    border-radius: var(--radius);
}
.level-input:focus,
#classSelect:focus {
    outline: none;
    border-color: var(--accent);
}

.tag-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
}
.tag-fire { color: var(--fire); border-color: var(--fire-dim); }
.badge-diff {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    font-weight: 700;
}
.badge-diff.easy { color: #55cc66; background: rgba(85,204,102,0.1); }
.badge-diff.medium { color: var(--gold); background: rgba(232,195,90,0.1); }
.badge-diff.hard { color: var(--accent); background: rgba(195,68,62,0.15); }

/* RATINGS */
.hero-ratings {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
    padding-top: 1.5rem;
}
.rating-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.55rem 1rem;
    min-width: 220px;
}
.rc-label {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    min-width: 80px;
}
.rc-pips {
    display: flex;
    gap: 3px;
}
.pip {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 1px solid var(--border-light);
}
.pip.on {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 4px rgba(195,68,62,0.5);
}
.rc-grade {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--gold);
    margin-left: auto;
    min-width: 1.5rem;
    text-align: center;
}
.s-grade { color: var(--accent-glow); }

/* ═══════════ VARIANT BAR ═══════════ */
.variant-bar {
    background: var(--bg-deep);
    border-bottom: 2px solid var(--gold-dim);
    position: sticky;
    top: var(--header-h, 49px);
    z-index: 98;
}
.variant-bar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 0 2rem;
    flex-wrap: wrap;
}
.variant-tab {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--gold-dim);
    border-radius: 6px 6px 0 0;
    padding: 0.55rem 1.2rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    margin-bottom: -2px;
}
.variant-tab:hover {
    color: var(--text);
    border-color: var(--border-light);
    background: var(--bg-hover);
}
.variant-tab.active {
    color: var(--gold);
    border-color: var(--gold-dim);
    border-bottom-color: var(--bg-card);
    background: var(--bg-card);
    font-weight: 700;
}
.variant-tab .vt-name {
    cursor: pointer;
}
.variant-tab .vt-move {
    font-size: 0.55rem;
    opacity: 0.5;
    cursor: pointer;
    padding: 2px;
    transition: all 0.15s;
    color: var(--text-muted);
}
.variant-tab .vt-move:hover {
    opacity: 1;
    color: var(--gold);
}
.variant-tab .vt-remove {
    font-size: 0.65rem;
    opacity: 0.6;
    cursor: pointer;
    margin-left: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.15s;
    color: var(--text-muted);
}
.variant-tab .vt-remove:hover {
    opacity: 1;
    color: #fff;
    background: var(--accent);
}
.variant-add {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: none;
    border: 1px dashed rgba(255,255,255,0.12);
    border-bottom: 2px solid var(--gold-dim);
    border-radius: 6px 6px 0 0;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: -2px;
}
.variant-add:hover {
    color: var(--gold);
    border-color: var(--gold-dim);
}

/* ═══════════ PHASE BAR (LEVELING) ═══════════ */
.phase-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(42,42,53,0.6);
    flex-wrap: wrap;
}
.phase-pill {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-dim);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.phase-pill:hover {
    color: var(--text);
    border-color: var(--border-light);
    background: rgba(255,255,255,0.04);
}
.phase-pill.active {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(232, 195, 90, 0.12);
    box-shadow: 0 0 8px rgba(232, 195, 90, 0.1);
}
.phase-pill.phase-final .phase-level {
    color: var(--gold);
    font-size: 0.75rem;
}
.phase-level {
    font-weight: 700;
    font-size: 0.65rem;
    color: var(--accent);
}
.phase-name {
    white-space: nowrap;
}
.phase-capture {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: none;
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.15s;
}
.phase-capture:hover {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(232, 195, 90, 0.06);
}
.phase-actions {
    display: inline-flex;
    gap: 0.15rem;
    margin-left: 0.3rem;
}
.pa-btn {
    font-size: 0.6rem;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.15s, color 0.15s;
    padding: 0 0.15rem;
}
.pa-btn:hover { opacity: 1; }
.pa-edit:hover { color: var(--gold); }
.pa-move-left:hover, .pa-move-right:hover { color: var(--accent); }
.pa-delete:hover { color: #ef4444; }

/* ═══════════ GUIDE TABLE OF CONTENTS ═══════════ */
.guide-toc {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    position: sticky;
    top: 52px;
    z-index: 90;
    backdrop-filter: blur(8px);
}
.toc-link {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all 0.15s;
}
.toc-link:hover {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(232, 195, 90, 0.06);
}
.toc-link.active {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(232, 195, 90, 0.1);
}

/* ═══════════ PROS / CONS ═══════════ */
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.pc-col {
    padding: 0.5rem 0;
}
.pc-heading {
    font-family: var(--font-sc);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}
.pc-heading-pro { color: #22c55e; }
.pc-heading-con { color: #ef4444; }
.pc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pc-list li {
    padding: 0.35rem 0;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.55;
}
.pc-pros .pc-list li::before {
    content: '+';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
}
.pc-cons .pc-list li::before {
    content: '−';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: 700;
}
.pc-edit {
    width: 100%;
    min-height: 80px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    padding: 0.6rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    line-height: 1.5;
    resize: vertical;
}

/* ═══════════ VIDEO EMBED ═══════════ */
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-link {
    color: var(--accent);
    font-size: 0.85rem;
    word-break: break-all;
}

/* ═══════════ FAQ ═══════════ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.faq-item {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.85rem 1rem;
}
.faq-q {
    font-family: var(--font-sc);
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    color: var(--gold);
    margin-bottom: 0.4rem;
}
.faq-q::before {
    content: 'Q: ';
    opacity: 0.5;
}
.faq-a {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ═══════════ CUSTOM MODAL ═══════════ */
.hsp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s;
}
.hsp-modal-overlay.show { opacity: 1; }
.hsp-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    min-width: 320px;
    max-width: 440px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.hsp-modal-title {
    font-family: var(--font-sc);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: var(--gold);
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.hsp-modal-field {
    margin-bottom: 0.75rem;
}
.hsp-modal-field label {
    display: block;
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}
.hsp-modal-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.hsp-modal-input:focus {
    border-color: var(--gold-dim);
}
.hsp-modal-info {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}
.hsp-modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
}
.hsp-modal-btn {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.45rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.15s;
}
.hsp-modal-cancel {
    background: none;
    color: var(--text-muted);
}
.hsp-modal-cancel:hover {
    color: var(--text);
    border-color: var(--border-light);
}
.hsp-modal-confirm {
    background: rgba(232, 195, 90, 0.12);
    color: var(--gold);
    border-color: var(--gold-dim);
}
.hsp-modal-confirm:hover {
    background: rgba(232, 195, 90, 0.2);
}
.hsp-modal-danger {
    background: rgba(220, 50, 50, 0.15);
    color: #f87171;
    border-color: rgba(220, 50, 50, 0.3);
}
.hsp-modal-danger:hover {
    background: rgba(220, 50, 50, 0.25);
}

/* ═══════════ TABS ═══════════ */
.tabs {
    background: var(--bg-body);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: calc(var(--header-h, 49px) + var(--variant-bar-h, 42px));
    z-index: 97;
}
.tabs-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0 2rem;
}
.tab-btn {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text-dim); }
.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--accent);
}

/* ═══════════ TAB CONTENT ═══════════ */
.tab-content { display: none; }
.tab-content.active { display: block; }

.main-area {
    background: transparent;
    flex: 1;
    padding: 2rem 0;
}

/* ═══════════ GUIDE SECTIONS ═══════════ */
.guide-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    scroll-margin-top: 140px;
}
.section-heading {
    font-family: var(--font-sc);
    font-size: 0.88rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.9rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.sh-icon {
    font-size: 1rem;
    display: inline-flex;
}
.section-body {
    padding: 1.5rem;
}

/* ─── PROSE ─── */
.prose { font-size: 0.95rem; line-height: 1.7; }
.prose p { margin-bottom: 0.9rem; }
.prose h4 {
    font-family: var(--font-sc);
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--gold);
    margin: 1.5rem 0 0.6rem;
}
.prose h4:first-child { margin-top: 0; }
.prose ul, .prose ol { margin-bottom: 0.9rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; line-height: 1.6; }
.prose strong { color: #e0dfd8; }

/* ─── TWO-COL LAYOUT ─── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    scroll-margin-top: 140px;
}

/* ═══════════ ATTRIBUTES ═══════════ */
.attr-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.attr-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.attr-row:hover { background: var(--bg-hover); }
.attr-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.6));
}
.attr-name {
    font-family: var(--font-sc);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-dim);
    flex: 1;
}
.attribute-value {
    font-family: var(--font-sc);
    font-size: 1rem;
    color: var(--text);
    min-width: 2.5rem;
    text-align: right;
    font-weight: 700;
}
.attribute-value.highlight { color: var(--gold); }
.attr-btn {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
}
.attr-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.points-bar {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
}
.points-bar span { color: var(--gold); font-weight: 700; }
.attr-note {
    font-size: 0.82rem;
    color: var(--text-dim);
    padding-top: 0.75rem;
    line-height: 1.5;
}
.attr-note strong { color: var(--gold-dim); }

/* ═══════════ STATS SUMMARY ═══════════ */
.stat-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(42,42,53,0.5);
    font-size: 0.85rem;
}
.stat-row span { color: var(--text-dim); }
.stat-row strong { color: var(--text); font-weight: 700; }
.stat-big {
    padding: 0.6rem 0;
    font-size: 1rem;
}
.stat-big strong { font-size: 1.3rem; color: var(--gold); }
.text-fire { color: var(--fire) !important; }
.text-legendary { color: var(--legendary); }
.text-set { color: var(--set-color); }

/* RESISTANCES */
.resist-heading {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.resist-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.resist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}
.res-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.fire-dot { background: var(--fire); }
.cold-dot { background: var(--cold); }
.poison-dot { background: var(--poison); }
.lightning-dot { background: var(--lightning); }
.ms-dot { background: var(--text-dim); }
.res-name { min-width: 60px; color: var(--text-dim); }
.res-bar-wrap {
    flex: 1;
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
    overflow: hidden;
}
.res-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}
.fire-bar { background: var(--fire); }
.cold-bar { background: var(--cold); }
.poison-bar { background: var(--poison); }
.lightning-bar { background: var(--lightning); }
.res-val {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    color: var(--text);
    min-width: 2.5rem;
    text-align: right;
}
.ms-row-standalone { margin-top: 0.25rem; }
.ms-val { color: var(--gold) !important; }

/* ═══════════ SKILL TREE ═══════════ */
.tree-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1.5rem;
    background: #0d0b10;
    border-bottom: 1px solid rgba(42,42,53,0.4);
}
.toolbar-title {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.toolbar-btns {
    display: flex;
    gap: 0.25rem;
}
.tool-btn {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    color: var(--text-muted);
    background: #050308;
    border: 1px solid rgba(42,42,53,0.6);
    width: 26px;
    height: 26px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.tool-btn:hover { color: var(--text); border-color: var(--border-light); }
.tool-btn.active { color: var(--accent); border-color: var(--accent-dark); background: rgba(195,68,62,0.1); }
.tree-search-wrap {
    position: relative;
    flex: 1;
    max-width: 200px;
    margin-left: auto;
}
.tree-search {
    font-size: 0.75rem;
    color: var(--text);
    background: #050308;
    border: 1px solid rgba(42,42,53,0.6);
    border-radius: var(--radius);
    padding: 0.35rem 0.6rem 0.35rem 1.8rem;
    width: 100%;
}
.tree-search:focus { outline: none; border-color: var(--accent-dark); }
.search-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}
.points-display {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.points-display span { color: var(--gold); font-weight: 700; }

.tree-canvas-wrap {
    display: flex;
    flex-direction: column;
    background: #050308;
    min-height: 0;
    overflow: hidden;
    position: relative;
}
.tree-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 700px;
    image-rendering: pixelated;
}
.shift-hint {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    padding: 0.5rem;
    background: #050308;
    border-top: 1px solid rgba(42,42,53,0.4);
}
.shift-hint b { color: var(--accent); }

/* ═══════════ GEAR SLOTS ═══════════ */
.gear-slot {
    border-bottom: 1px solid var(--border);
}
.gear-slot:last-child { border-bottom: none; }
.gs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(42,42,53,0.3);
}
.gs-slot-name {
    font-family: var(--font-sc);
    font-size: 0.88rem;
    letter-spacing: 1.5px;
    color: var(--text);
}
.gs-slot-type {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── 3-COLUMN body ── */
.gs-body.gs-3col {
    display: flex;
    gap: 0;
}
.gs-body.gs-body-empty {
    display: block;
}

/* COL 1 — BIS item card */
.gs-col-bis {
    flex: 0 1 360px;
    min-width: 0;
    border-right: 1px solid var(--border);
    position: relative;
}
.gs-editable .gs-col-bis { cursor: pointer; }
.gs-col-bis .gs-remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}
.gs-bis {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    position: relative;
}
.gs-art-frame {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 96px;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.gs-art-frame.legendary-frame {
    border-color: rgba(255,136,68,0.35);
    background: linear-gradient(135deg, rgba(255,136,68,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(255,136,68,0.08);
}
.gs-art-frame.angelic-frame {
    border-color: rgba(243,243,147,0.35);
    background: linear-gradient(135deg, rgba(243,243,147,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(243,243,147,0.08);
}
.gs-art-frame.set-frame {
    border-color: rgba(12,214,27,0.35);
    background: linear-gradient(135deg, rgba(12,214,27,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(12,214,27,0.08);
}
.gs-art-frame.mythic-frame {
    border-color: rgba(168,85,247,0.35);
    background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(168,85,247,0.08);
}
.gs-art-frame.satanic-frame {
    border-color: rgba(203,21,21,0.35);
    background: linear-gradient(135deg, rgba(203,21,21,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(203,21,21,0.08);
}
.gs-art-frame.heroic-frame {
    border-color: rgba(0,242,141,0.35);
    background: linear-gradient(135deg, rgba(0,242,141,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(0,242,141,0.08);
}
.gs-art-frame.unholy-frame {
    border-color: rgba(205,55,105,0.35);
    background: linear-gradient(135deg, rgba(205,55,105,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(205,55,105,0.08);
}
.gs-art-frame.unique-frame {
    border-color: rgba(234,179,8,0.35);
    background: linear-gradient(135deg, rgba(234,179,8,0.06), rgba(0,0,0,0.35));
    box-shadow: 0 0 12px rgba(234,179,8,0.08);
}
.gs-bis-badge {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-sc);
    font-size: 0.5rem;
    letter-spacing: 2px;
    color: var(--bg-deep);
    background: var(--gold);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    font-weight: 700;
    z-index: 1;
    white-space: nowrap;
}
.gs-art {
    max-width: 64px;
    max-height: 80px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.08));
}
.gs-art-placeholder {
    font-size: 1.5rem;
    color: var(--text-muted);
}
.gs-item-info {
    min-width: 0;
    flex: 1;
}
.gs-item-name {
    font-family: var(--font-sc);
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}
.gs-item-name.legendary { color: var(--legendary); }
.gs-item-name.angelic { color: var(--angelic); }
.gs-item-name.set, .gs-item-name.set-item { color: var(--set-color); }
.gs-item-name.mythic { color: var(--mythic); }
.gs-item-name.satanic { color: var(--satanic); }
.gs-item-name.heroic { color: var(--heroic); }
.gs-item-name.unholy { color: var(--unholy); }
.gs-item-name.unique { color: #eab308; }
.gs-item-rarity {
    font-family: var(--font-sc);
    font-size: 0.58rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.gs-item-stats-v {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}
.gs-item-stats-v .mod-fire { color: var(--fire); }
.gs-item-stats-v .mod-crit { color: var(--gold); }

/* ── Editable stats (edit mode) ── */
.gs-stats-editable {
    gap: 0.2rem;
}
.gs-stat-edit-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.gs-stat-move-btns {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
}
.gs-stat-move-up, .gs-stat-move-down {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.45rem;
    padding: 0 0.2rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.15s, color 0.15s;
}
.gs-stat-move-up:hover:not(:disabled), .gs-stat-move-down:hover:not(:disabled) {
    color: var(--accent);
    opacity: 1;
}
.gs-stat-move-up:disabled, .gs-stat-move-down:disabled {
    opacity: 0.15;
    cursor: default;
}
.stat-range {
    color: var(--accent, #a78bfa);
    font-size: 0.65rem;
    opacity: 0.85;
}
.gs-stat-input {
    flex: 1;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    min-width: 0;
    font-family: inherit;
    transition: border-color 0.15s;
}
.gs-stat-input:focus {
    border-color: var(--accent);
    outline: none;
    color: var(--text-main, #ccc);
}
.gs-stat-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}
.gs-stat-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0.15rem 0.3rem;
    opacity: 0.4;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
}
.gs-stat-remove:hover {
    color: #dc2626;
    opacity: 1;
}
.gs-stat-range {
    font-size: 0.6rem;
    color: var(--accent, #a78bfa);
    opacity: 0.7;
    white-space: nowrap;
    flex-shrink: 0;
}
.gs-stat-add {
    background: none;
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    margin-top: 0.25rem;
    width: 100%;
    transition: border-color 0.15s, color 0.15s;
}
.gs-stat-add:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.gs-item-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
}

/* COL 2 — Alternatives */
.gs-col-alts {
    flex: 0 0 160px;
    min-width: 0;
    padding: 1rem 1rem;
    border-right: 1px solid var(--border);
    overflow: visible;
}
.gs-col-label {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.gs-col-empty {
    font-size: 0.78rem;
    display: block;
}
.gs-alt-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow: visible;
}
.gs-alt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.45;
    position: relative;
    cursor: pointer;
}
.gs-alt-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.1));
    flex-shrink: 0;
}
.gs-alt-icon-ph {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border: 1px dashed rgba(100,100,120,0.3);
    border-radius: 2px;
}
.gs-alt-name {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-alt-name.legendary { color: var(--legendary); }
.gs-alt-name.angelic { color: var(--angelic); }
.gs-alt-name.set, .gs-alt-name.set-item { color: var(--set-color); }
.gs-alt-name.mythic { color: var(--mythic); }
.gs-alt-name.satanic { color: var(--satanic); }
.gs-alt-name.heroic { color: var(--heroic); }
.gs-alt-name.unholy { color: var(--unholy); }
.gs-alt-name.unique { color: #eab308; }
.gs-alt .gs-alt-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    padding: 2px 4px;
    opacity: 0.4;
    flex-shrink: 0;
    margin-left: auto;
}
.gs-alt .gs-alt-remove:hover { opacity: 1; color: var(--accent); }
.gs-alt-add-btn {
    background: none;
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    margin-top: 6px;
}
.gs-alt-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── RELIC MULTI-SLOT ── */
.gs-relic-body {
    padding: 0.75rem 1rem;
}
.gs-relic-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.gs-relic-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    position: relative;
    flex: 0 1 calc(50% - 0.3rem);
    min-width: 200px;
}
.gs-relic-art {
    width: 40px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}
.gs-relic-img {
    max-width: 32px;
    max-height: 40px;
    image-rendering: pixelated;
}
.gs-relic-info {
    flex: 1;
    min-width: 0;
}
.gs-relic-name {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}
.gs-relic-name.legendary { color: var(--legendary); }
.gs-relic-name.angelic { color: var(--angelic); }
.gs-relic-name.set { color: var(--set-color); }
.gs-relic-name.satanic { color: var(--satanic); }
.gs-relic-name.heroic { color: var(--heroic); }
.gs-relic-name.unholy { color: var(--unholy); }
.gs-relic-name.unique { color: #eab308; }
.gs-relic-rarity {
    font-family: var(--font-sc);
    font-size: 0.52rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}
.gs-relic-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 0.15rem;
}
.gs-relic-ability {
    font-size: 0.72rem;
    color: #a78bfa;
    margin-top: 0.15rem;
}
.gs-relic-ability-label {
    color: var(--text-muted);
    font-family: var(--font-sc);
    letter-spacing: 0.4px;
}
.gs-relic-ability-desc {
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}
.gs-relic-stats {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}
.gs-relic-remove {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.6rem;
    opacity: 0.4;
}
.gs-relic-remove:hover { opacity: 1; color: var(--accent); }
.gs-relic-add-btn {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    background: none;
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.gs-relic-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── TOOLTIP — rich card on hover ── */
.gs-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    width: 260px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.85rem;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}
.gs-tooltip.legendary-frame { border-color: rgba(255,136,68,0.3); }
.gs-tooltip.angelic-frame { border-color: rgba(243,243,147,0.3); }
.gs-tooltip.set-frame { border-color: rgba(12,214,27,0.3); }
.gs-tooltip.mythic-frame { border-color: rgba(168,85,247,0.3); }
.gs-tooltip.satanic-frame { border-color: rgba(203,21,21,0.3); }
.gs-tooltip.heroic-frame { border-color: rgba(0,242,141,0.3); }
.gs-tooltip.unholy-frame { border-color: rgba(205,55,105,0.3); }
.gs-tooltip.unique-frame { border-color: rgba(234,179,8,0.3); }
.gs-alt.has-tooltip:hover .gs-tooltip {
    display: block;
}
.gs-tt-header {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.gs-tt-art-frame {
    width: 48px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 3px;
}
.gs-tt-art-frame.legendary-frame { border-color: rgba(255,136,68,0.3); }
.gs-tt-art-frame.angelic-frame { border-color: rgba(243,243,147,0.3); }
.gs-tt-art-frame.set-frame { border-color: rgba(12,214,27,0.3); }
.gs-tt-art-frame.satanic-frame { border-color: rgba(203,21,21,0.3); }
.gs-tt-art-frame.heroic-frame { border-color: rgba(0,242,141,0.3); }
.gs-tt-art-frame.unholy-frame { border-color: rgba(205,55,105,0.3); }
.gs-tt-art {
    max-width: 40px;
    max-height: 48px;
    image-rendering: pixelated;
}
.gs-tt-name {
    font-family: var(--font-sc);
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.1rem;
}
.gs-tt-name.legendary { color: var(--legendary); }
.gs-tt-name.angelic { color: var(--angelic); }
.gs-tt-name.set, .gs-tt-name.set-item { color: var(--set-color); }
.gs-tt-name.mythic { color: var(--mythic); }
.gs-tt-name.satanic { color: var(--satanic); }
.gs-tt-name.heroic { color: var(--heroic); }
.gs-tt-name.unholy { color: var(--unholy); }
.gs-tt-name.unique { color: #eab308; }
.gs-tt-type {
    font-family: var(--font-sc);
    font-size: 0.45rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.gs-tt-stats {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}
.gs-tt-stats .mod-fire { color: var(--fire); }
.gs-tt-stats .mod-crit { color: var(--gold); }
.gs-tt-note {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
}

/* COL 3 — Desired Affixes */
.gs-col-affixes {
    flex: 1 1 200px;
    min-width: 0;
    padding: 1rem 1.25rem;
}
.gs-affix-tag {
    font-size: 0.45rem;
    letter-spacing: 1.5px;
    color: var(--mythic);
    background: rgba(168,85,247,0.1);
    border: 1px solid rgba(168,85,247,0.2);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
}
.gs-affix-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.gs-affix {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}
.gs-affix.critical {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(232,195,90,0.05);
}
.gs-affix.fire {
    color: var(--fire);
    border-color: var(--fire-dim);
    background: rgba(255,106,53,0.05);
}
.gs-affix.dim {
    color: var(--text-muted);
    border-color: rgba(42,42,53,0.5);
}

/* ── Augment row (armor slot) ── */
.gs-augment-row {
    padding: 0.6rem 1.25rem;
    border-top: 1px solid var(--border);
}
.gs-augment-row .gs-col-label {
    margin-bottom: 0.35rem;
}
.gs-augment-select {
    width: 100%;
    max-width: 360px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}
.gs-augment-select:focus {
    border-color: var(--accent);
    outline: none;
}
.gs-augment-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.gs-augment-name {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 0.5px;
}
.gs-augment-type {
    font-size: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    border: 1px solid;
}
.gs-augment-type.skill {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(195,68,62,0.1);
}
.gs-augment-type.glyph {
    color: var(--mythic);
    border-color: rgba(168,85,247,0.4);
    background: rgba(168,85,247,0.1);
}
.gs-augment-desc {
    font-size: 0.62rem;
    color: var(--text-dim);
    line-height: 1.3;
}

/* ── Sockets ── */
.gs-socket-row {
    padding: 0.6rem 1.25rem;
    border-top: 1px solid var(--border);
}
.gs-socket-row .gs-col-label {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.gs-socket-count {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}
.gs-socket-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gs-socket {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    border: 1px solid var(--border);
    min-width: 120px;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}
.gs-socket.empty {
    background: var(--bg-deep);
    border-style: dashed;
    color: var(--text-muted);
}
.gs-socket.empty.gs-socket-pick {
    cursor: pointer;
}
.gs-socket.empty.gs-socket-pick:hover {
    border-color: var(--accent);
    background: rgba(195,68,62,0.08);
    color: var(--text);
}
.gs-socket.filled {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.15);
}
.gs-editable .gs-socket.filled {
    cursor: pointer;
}
.gs-editable .gs-socket.filled:hover {
    border-color: var(--accent);
}
.gs-socket-icon {
    font-size: 0.8rem;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    object-fit: contain;
    image-rendering: pixelated;
}
.gs-socket-icon-fallback {
    font-size: 0.8rem;
    flex-shrink: 0;
}
.gs-socket-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-socket-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0 2px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.gs-socket:hover .gs-socket-remove {
    opacity: 1;
}
.gs-socket-remove:hover {
    color: #e74c3c;
}

/* ── Socket Picker Overlay ── */
.socket-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
.socket-picker-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 480px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.socket-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 0;
}
.socket-picker-header h3 {
    font-family: var(--font-sc);
    font-size: 1rem;
    color: var(--gold);
    margin: 0;
}
.socket-picker-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
}
.socket-picker-close:hover { color: #e74c3c; }
.socket-picker-search {
    margin: 12px 20px;
    padding: 8px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.78rem;
    outline: none;
}
.socket-picker-search:focus { border-color: var(--accent); }
.socket-picker-body {
    overflow-y: auto;
    padding: 0 20px 16px;
    flex: 1;
}
.sp-group {
    margin-bottom: 12px;
}
.sp-group-label {
    font-family: var(--font-sc);
    font-size: 0.72rem;
    color: var(--gold);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sp-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.sp-item {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sp-item-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
}
.sp-item:hover {
    border-color: var(--accent);
    background: rgba(195,68,62,0.12);
    color: #fff;
}

/* ── Empty slot ── */
.gs-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    padding: 1.25rem 1.5rem;
}

/* ── Affix add button ── */
.gs-affix-add-btn {
    background: none;
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    margin-top: 6px;
    display: block;
    width: 100%;
}
.gs-affix-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Affix picker dropdown ── */
.gs-affix-picker {
    margin-top: 8px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}
.gs-affix-search {
    width: 100%;
    margin-bottom: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    box-sizing: border-box;
    background: var(--bg-deep);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
}
.gs-affix-search:focus {
    border-color: var(--accent);
}
.gs-affix-picker-cat {
    font-family: var(--font-sc);
    font-size: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 4px 0 2px;
    margin-top: 4px;
}
.gs-affix-picker-cat:first-child { margin-top: 0; }
.gs-affix-picker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}
.gs-affix-pick {
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
}
.gs-affix-pick:hover {
    border-color: var(--accent);
    background: rgba(100,180,255,0.08);
}

@media (max-width: 900px) {
    .gs-body.gs-3col {
        flex-direction: column;
    }
    .gs-col-bis {
        flex: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .gs-col-alts {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .gs-col-affixes {
        flex: auto;
    }
}

/* ═══════════ SHARE ═══════════ */
.share-section {
    background: transparent;
    border: none;
    margin-bottom: 0;
}
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.share-label {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}
.share-url {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-dim);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
}
.share-url:focus { outline: none; }

/* ═══════════ HL TAB ═══════════ */
.hl-wrap {
    display: flex;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-deep);
    min-height: 500px;
}
.hl-wrap canvas { display: block; image-rendering: pixelated; }

/* COMING SOON */
.coming-soon {
    font-family: var(--font-sc);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    padding: 6rem 0;
}

/* ═══════════ BUILD SUMMARY / FOOTER ═══════════ */
.build-summary {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    padding: 0.85rem 0;
}
.summary-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.sum-cell { display: flex; flex-direction: column; gap: 0.1rem; }
.sum-label {
    font-family: var(--font-sc);
    font-size: 0.55rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.sum-val {
    font-size: 0.85rem;
    color: var(--text);
}
.sum-spacer { flex: 1; }
.footer-copy { font-size: 0.7rem; color: var(--text-muted); }

/* ═══════════ MODAL ═══════════ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
}
.modal-content h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}
.modal-close {
    float: right;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-content textarea {
    width: 100%;
    min-height: 120px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--text);
    resize: vertical;
    margin-bottom: 1rem;
}
.modal-content textarea:focus { outline: none; border-color: var(--accent); }

/* ═══════════ BRAND LINK ═══════════ */
.brand-link { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; }
.brand-link:hover { text-decoration: none; color: inherit; }

/* ═══════════ AUTH PAGES ═══════════ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
}
.auth-card h2 {
    font-family: var(--font-display);
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    font-family: var(--font-sc);
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}
.form-group textarea { resize: vertical; }
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(195, 68, 62, 0.15);
}
.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 0.25rem;
}
.form-error {
    color: var(--accent);
    font-size: 0.85rem;
    min-height: 1.2em;
    margin-bottom: 0.5rem;
}
.form-success {
    color: #4caf50;
    font-size: 0.85rem;
    min-height: 1.2em;
    margin-bottom: 0.5rem;
}
.auth-hint {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.auth-card-wide {
    max-width: 480px;
}
.account-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.account-section legend {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0 0.5rem;
}
.account-danger {
    border-color: var(--accent);
}
.account-danger legend {
    color: var(--accent);
}
.btn-full {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ── Registration Premium Styles ── */
.auth-card-register {
    max-width: 460px;
    border-color: rgba(232,195,90,0.15);
    position: relative;
    overflow: hidden;
}
.auth-card-register::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--accent), var(--gold), transparent);
    opacity: 0.6;
}
.auth-header { text-align: center; margin-bottom: 1.8rem; }
.auth-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.auth-header h2 { margin-bottom: 0.3rem; }
.auth-subtitle { color: var(--text-dim); font-size: 0.85rem; margin: 0; }

.input-icon-wrap {
    position: relative; display: flex; align-items: center;
}
.input-icon {
    position: absolute; left: 0.75rem; font-size: 0.85rem; z-index: 1;
    pointer-events: none; opacity: 0.6;
}
.field-icon { padding-left: 2.3rem !important; }
.pwd-toggle {
    position: absolute; right: 0.5rem; background: none; border: none;
    cursor: pointer; font-size: 0.85rem; color: var(--text-dim);
    padding: 0.25rem 0.35rem; opacity: 0.6; transition: opacity 0.15s;
}
.pwd-toggle:hover { opacity: 1; }

.pwd-strength {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: 0.35rem;
}
.pwd-bar {
    flex: 1; height: 4px; border-radius: 2px;
    background: var(--bg-surface); overflow: hidden;
}
.pwd-fill {
    height: 100%; border-radius: 2px; width: 0;
    transition: width 0.3s, background 0.3s;
}
.pwd-label { font-size: 0.65rem; min-width: 50px; }

.checkbox-label {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.8rem; color: var(--text-muted); cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent); width: 16px; height: 16px;
}
.checkbox-label a { color: var(--gold); }

.btn-register {
    background: linear-gradient(135deg, var(--accent), #a82d28) !important;
    font-size: 0.95rem !important; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
    transition: all 0.2s;
}
.btn-register:hover {
    box-shadow: 0 4px 20px rgba(195,68,62,0.4);
    transform: translateY(-1px);
}

/* ═══════════ PROFILE PAGE (v2 – ARPG Premium) ═══════════ */
.pro-page { max-width: 900px; margin: 0 auto; padding-bottom: 3rem; }

/* --- Banner --- */
.pro-banner {
  position: relative; overflow: hidden; border-radius: 12px;
  background: linear-gradient(135deg, #0d0b14 0%, #1a1028 40%, #0d0b14 100%);
  border: 1px solid rgba(232,195,90,0.15);
  margin-bottom: 0;
}
.pro-banner-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 30% 40%, rgba(195,68,62,0.12), transparent),
              radial-gradient(ellipse 40% 60% at 80% 30%, rgba(232,195,90,0.08), transparent);
}
.pro-banner-border {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--accent), var(--gold), transparent);
  opacity: 0.6;
}
.pro-banner-content {
  position: relative; z-index: 1;
  display: flex; gap: 1.8rem; align-items: center;
  padding: 2.5rem 2.5rem 2.2rem;
}

/* --- Avatar --- */
.pro-avatar-frame {
  position: relative; flex-shrink: 0;
  width: 120px; height: 120px;
}
.pro-avatar-img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold); box-shadow: 0 0 20px rgba(232,195,90,0.25);
}
.pro-avatar-placeholder {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1028, #2a1a3d);
  color: var(--gold); font-size: 2.8rem; font-weight: 700;
  border: 3px solid var(--gold); box-shadow: 0 0 20px rgba(232,195,90,0.25);
}
.pro-avatar-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(232,195,90,0.2);
  pointer-events: none;
}

/* --- Identity --- */
.pro-identity { flex: 1; min-width: 0; }
.pro-name {
  font-family: var(--font-display); font-size: 1.8rem; color: var(--text);
  margin: 0 0 0.15rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.pro-handle { color: var(--text-dim); font-size: 0.85rem; margin: 0 0 0.5rem; }
.pro-bio { color: var(--text-muted); margin: 0; line-height: 1.5; white-space: pre-line; max-width: 480px; }

.badge-cc {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px;
  background: linear-gradient(135deg, #6441a5, #b9a3e3); color: #fff;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(100,65,165,0.35);
}
.badge-role {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px;
  color: #fff; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  background: linear-gradient(135deg, #586069, #8b949e);
}
.badge-role-super_admin { background: linear-gradient(135deg, #da3633, #f85149); box-shadow: 0 2px 8px rgba(248,81,73,0.35); }
.badge-role-admin { background: linear-gradient(135deg, #d29922, #e8c35a); color: #1c1e21; box-shadow: 0 2px 8px rgba(232,195,90,0.35); }
.badge-role-moderator { background: linear-gradient(135deg, #1f6feb, #58a6ff); box-shadow: 0 2px 8px rgba(88,166,255,0.35); }
.badge-role-content_creator { background: linear-gradient(135deg, #6441a5, #b9a3e3); box-shadow: 0 2px 8px rgba(100,65,165,0.35); }
.badge-role-betatester { background: linear-gradient(135deg, #238636, #3fb950); box-shadow: 0 2px 8px rgba(63,185,80,0.35); }

/* --- Stats Bar --- */
.pro-stats-bar {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 12px 12px;
  padding: 1rem 2rem;
}
.pro-stat {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0 2rem;
}
.pro-stat-val {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--gold);
  line-height: 1.2; display: inline-flex; align-items: center;
}
.pro-stat-val .class-icon { width: 28px; height: 28px; border-radius: 4px; }
.pro-stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.pro-stat-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

/* --- Socials --- */
.pro-socials {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  margin: 1.5rem 0;
}
.pro-social-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1rem; border-radius: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.8rem; text-decoration: none;
  transition: all 0.2s;
}
.pro-social-btn:hover {
  border-color: var(--social-color, var(--accent));
  color: var(--social-color, var(--text));
  box-shadow: 0 0 12px color-mix(in srgb, var(--social-color, var(--accent)) 25%, transparent);
  text-decoration: none;
}

/* --- Actions --- */
.pro-actions { display: flex; justify-content: center; margin: 1rem 0; }

/* --- Builds Section --- */
.pro-builds-section { margin-top: 2rem; }
.pro-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem; padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.pro-section-title {
  font-family: var(--font-display); font-size: 1.2rem;
  color: var(--text); margin: 0; display: flex; align-items: center; gap: 0.5rem;
}
.pro-title-icon { color: var(--accent); font-size: 1rem; }
.pro-section-count { color: var(--text-dim); font-size: 0.8rem; }
.pro-section-subtitle {
  font-family: var(--font-display); font-size: 1rem; color: var(--text-dim);
  margin: 0 0 0.8rem;
}

.pro-empty { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.pro-empty p:first-child { font-size: 1.05rem; margin-bottom: 0.25rem; }

/* --- Build Cards Grid --- */
.pro-builds-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.pro-build-card {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.1rem 1.2rem 1rem; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); overflow: hidden;
  transition: all 0.2s;
}
.pro-build-card:hover {
  border-color: var(--gold); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 12px rgba(232,195,90,0.1);
  text-decoration: none;
}
.pro-bc-accent {
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0; transition: opacity 0.2s;
}
.pro-build-card:hover .pro-bc-accent { opacity: 1; }

.pro-bc-header { display: flex; align-items: center; gap: 0.6rem; }
.pro-bc-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; overflow: hidden; border-radius: 4px; }
.pro-bc-meta { display: flex; flex-direction: column; }
.pro-bc-class { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.pro-bc-time { font-size: 0.65rem; color: var(--text-dim); opacity: 0.6; }
.pro-bc-title { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.pro-bc-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pro-bc-tag {
  font-size: 0.6rem; padding: 0.15rem 0.5rem; border-radius: 3px;
  background: rgba(232,195,90,0.08); color: var(--gold); border: 1px solid rgba(232,195,90,0.15);
}

/* --- Class Breakdown --- */
.pro-class-label .class-icon { width: 20px; height: 20px; flex-shrink: 0; }
.pro-bc-icon .class-icon { width: 100%; height: 100%; }
.pro-class-breakdown { margin-top: 2rem; }
.pro-class-bars { display: flex; flex-direction: column; gap: 0.6rem; }
.pro-class-row { display: flex; align-items: center; gap: 0.8rem; }
.pro-class-label { width: 160px; font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 4px; }
.pro-class-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-surface); overflow: hidden; }
.pro-class-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 0.4s ease; }
.pro-class-pct { width: 64px; text-align: right; font-size: 0.75rem; color: var(--text-dim); }

/* --- Footer --- */
.pro-footer { text-align: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* --- Mobile --- */
@media (max-width: 600px) {
  .pro-banner-content { flex-direction: column; align-items: center; text-align: center; padding: 2rem 1.2rem 1.5rem; }
  .pro-avatar-frame { width: 96px; height: 96px; }
  .pro-name { justify-content: center; font-size: 1.4rem; }
  .pro-bio { max-width: 100%; }
  .pro-stats-bar { flex-wrap: wrap; padding: 0.8rem 1rem; gap: 0.5rem; }
  .pro-stat { padding: 0.5rem 1rem; }
  .pro-stat-divider { display: none; }
  .pro-builds-grid { grid-template-columns: 1fr; }
  .pro-class-label { width: 100px; }
}

/* Keep legacy classes for other pages */
.profile-avatar-section {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.avatar-actions { display: flex; gap: 0.5rem; }
.btn-small { padding: 0.3rem 0.7rem; font-size: 0.75rem; }
.author-link {
    color: var(--text-muted); text-decoration: none;
    transition: color 0.15s;
}
.author-link:hover { color: var(--accent); text-decoration: underline; }

/* ═══════════ USER MENU ═══════════ */
.user-menu { position: relative; display: inline-block; }
.user-btn { cursor: pointer; }
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 160px;
    z-index: 200;
    margin-top: 0.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.user-dropdown.open { display: block; }
.dd-link {
    display: block;
    padding: 0.65rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.dd-link:hover { background: var(--bg-hover); color: var(--gold); text-decoration: none; }

/* ═══════════ BUILDS BROWSE ═══════════ */
/* ─── Browse Hero ─── */
.browse-hero {
    padding: 2.5rem 0 2rem;
    background: linear-gradient(180deg, rgba(20,18,28,0.95) 0%, var(--bg-body) 100%);
    border-bottom: 1px solid var(--border);
}
.browse-hero .guide-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad);
}
.hero-info {
    max-width: 600px;
}
.guide-title-static {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin: 0 0 0.35rem;
}
.guide-subtitle {
    font-size: 0.92rem;
    color: var(--text-dim);
    margin: 0;
}
.hero-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.builds-page { padding-top: 1.5rem; }
.builds-toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.builds-search {
    flex: 1;
    min-width: 180px;
    padding: 0.55rem 0.9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
    transition: border-color 0.15s;
}
.builds-search:focus { outline: none; border-color: var(--accent); }
.builds-search::placeholder { color: var(--text-muted); }
.builds-filter {
    padding: 0.55rem 0.9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
    min-width: 150px;
    cursor: pointer;
}
.builds-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}
.builds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 0.75rem;
}
.build-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    position: relative;
    overflow: hidden;
}
.build-card:hover {
    border-color: var(--accent-dark);
    background: var(--bg-hover);
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
}
.build-card::after {
    content: '→';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.15s, transform 0.15s;
    opacity: 0;
}
.build-card:hover::after {
    opacity: 1;
    color: var(--gold);
    transform: translateY(-50%) translateX(2px);
}
.my-build-card { flex-wrap: wrap; }
.bc-link {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex: 1;
    text-decoration: none;
    color: inherit;
}
.bc-link:hover { text-decoration: none; color: inherit; }
/* ─── Class icon images (replacing emojis) ─── */
.class-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    image-rendering: pixelated;
}
.bc-class-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-shrink: 0;
    overflow: hidden;
}
.bc-info { flex: 1; min-width: 0; }
.bc-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.bc-meta {
    display: flex;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    flex-wrap: wrap;
    margin-top: 0.15rem;
}
.bc-class { color: var(--accent-glow); font-weight: 600; }
.bc-author .author-link {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.bc-author .author-link:hover { color: var(--gold); }
.bc-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bc-tags { display: flex; gap: 0.3rem; margin-top: 0.3rem; flex-wrap: wrap; }
.bc-items { display: flex; gap: 0.25rem; margin-top: 0.3rem; flex-wrap: wrap; }
.bc-item-tag {
    font-size: 0.62rem;
    padding: 0.08rem 0.35rem;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 3px;
    color: var(--gold-dim);
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bc-item-more {
    font-size: 0.65rem;
    color: var(--text-dim);
    padding: 0.1rem 0.3rem;
}
/* Build card stats row (rating + views) */
.bc-stats-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    align-items: center;
}
.bc-rating { color: var(--gold); font-weight: 500; }
.bc-rating small { color: var(--text-dim); font-weight: 400; }
.bc-views { color: var(--text-dim); }
/* Featured build card */
.build-card.bc-featured {
    border-color: rgba(232,195,90,0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232,195,90,0.03) 100%);
}
.build-card.bc-featured:hover { border-color: var(--gold-dim); }
.bc-featured-badge { color: var(--gold); }
.bc-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.7rem; }
.btn-danger { border-color: var(--accent) !important; color: var(--accent) !important; }
.btn-danger:hover { background: var(--accent) !important; color: #fff !important; }

/* ═══════════ BUILDS PAGINATION ═══════════ */
.builds-pagination {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding-bottom: 2rem;
}
.pag-btn {
    padding: 0.4rem 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.8rem;
}
.pag-btn:hover { border-color: var(--accent-dark); color: var(--text); }
.pag-btn.active { background: var(--accent-dark); color: #fff; border-color: var(--accent); }

@media (max-width: 920px) {
    .builds-grid { grid-template-columns: 1fr; }
    .browse-hero .guide-hero-inner { flex-direction: column; align-items: flex-start; }
    .hero-actions { width: 100%; }
}

/* ═══════════ MY BUILDS ═══════════ */
.my-builds-page { padding-top: 2rem; }
.my-builds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.my-builds-header h2 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.5rem;
}

/* ═══════════ EMPTY STATE ═══════════ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}
.empty-state .btn-act { margin-top: 1rem; display: inline-block; }

.empty-state-hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    grid-column: 1 / -1;
}
.empty-state-hero .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(var(--accent-rgb, 232,195,90), .35));
}
.empty-state-hero h3 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.6rem;
    margin-bottom: .5rem;
}
.empty-state-hero > p {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.empty-state-hero .btn-lg {
    padding: .75rem 2rem;
    font-size: 1rem;
}
.empty-hints {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2.5rem auto 1.5rem;
    max-width: 700px;
    flex-wrap: wrap;
}
.empty-hint {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    text-align: left;
    flex: 1 1 180px;
    max-width: 220px;
    background: var(--surface-2, rgba(255,255,255,.04));
    border: 1px solid var(--border, rgba(255,255,255,.08));
    border-radius: 10px;
    padding: 1rem;
}
.empty-hint .hint-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.empty-hint strong {
    color: var(--text);
    font-size: .85rem;
}
.empty-hint div {
    color: var(--text-dim);
    font-size: .8rem;
    line-height: 1.4;
}
.empty-browse {
    color: var(--text-dim);
    font-size: .9rem;
}
.empty-browse a {
    color: var(--accent);
    text-decoration: underline;
}

/* ═══════════ ERROR PAGE ═══════════ */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}
.error-page h2 {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.error-page .btn-act { margin-top: 1.5rem; display: inline-block; }

/* ═══════════ LOADING ═══════════ */
.loading-spinner {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ═══════════ BUILD EDIT BAR ═══════════ */
.build-edit-bar {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.tag-editor { flex: 1; min-width: 200px; }
.tag-input {
    padding: 0.4rem 0.7rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.82rem;
    width: 200px;
    margin-bottom: 0.5rem;
}
.tag-input:focus { outline: none; border-color: var(--accent); }
.tag-removable { cursor: pointer; }
.tag-removable:hover { background: var(--accent-dark); }
.build-actions-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.vis-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    cursor: pointer;
}
.vis-toggle input { accent-color: var(--accent); }

/* ═══════════ BUILD VIEW ACTIONS ═══════════ */
.build-view-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}
.btn-edit-inline {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);
    color: #fff;
    border: 1px solid var(--accent-glow);
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-edit-inline:hover {
    background: linear-gradient(135deg, var(--accent-glow) 0%, var(--accent) 100%);
    box-shadow: 0 2px 12px rgba(195,68,62,0.3);
}
.copy-share-btn {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}
.copy-share-btn:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
}

/* ═══════════ BUILD INFO GRID ═══════════ */
.build-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.bi-field {
    display: grid;
    grid-template-columns: 1.5rem 6rem 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(42,42,53,0.3);
}
.bi-field:last-child { border-bottom: none; }
.bi-icon { font-size: 0.9rem; text-align: center; }
.bi-label {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.bi-val {
    font-size: 0.9rem;
    color: var(--text);
}
.bi-select,
.bi-input {
    font-family: var(--font-sc);
    font-size: 0.8rem;
    color: var(--gold);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 200px;
}
.bi-select:focus,
.bi-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ═══════════ BUILD VIEW TWEAKS ═══════════ */
.title-static {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
}
.desc-edit {
    width: 100%;
    min-height: 100px;
    max-height: 200px;
    padding: 0.5rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    resize: vertical;
    line-height: 1.6;
}
.desc-edit:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 6px rgba(232,195,90,0.08); }

/* ── Overview / guide text editor ── */
.overview-edit {
    width: 100%;
    min-height: 200px;
    padding: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
    line-height: 1.6;
}
.overview-edit:focus { outline: none; border-color: var(--accent); }
.overview-content {
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* ── Level input ── */
.level-input {
    width: 60px;
    padding: 0.25rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-align: center;
}
.level-input:focus { outline: none; border-color: var(--accent); }

/* ── Gear slot (empty + item) ── */
.gs-empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}
.gs-art-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--bg-surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    font-size: 1.5rem;
}
.empty-frame {
    border: 2px dashed var(--border);
    background: var(--bg-surface);
}
.gs-remove-item {
    margin-left: auto;
    flex-shrink: 0;
}

.attr-minus {
    margin-left: 0.25rem;
}

/* ═══════════ TOAST ═══════════ */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    color: var(--text);
    font-size: 0.85rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { border-color: var(--accent); }
.toast-info { border-color: var(--gold-dim); }

/* ═══════════ SCROLLBAR ═══════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════ */

/* ─── Hero Section ─── */
.landing-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -53px; /* overlap sticky header */
    padding-top: 53px;
}
.landing-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(195,68,62,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(139,46,40,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(232,195,90,0.05) 0%, transparent 50%);
    z-index: 0;
    animation: heroPulse 8s ease-in-out infinite alternate;
}
@keyframes heroPulse {
    0%   { opacity: 0.7; }
    100% { opacity: 1; }
}
.landing-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    padding: 2rem;
}
.landing-hero-badge {
    display: inline-block;
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--accent-glow);
    background: rgba(195,68,62,0.1);
    border: 1px solid rgba(195,68,62,0.25);
    padding: 0.35rem 1.2rem;
    border-radius: 2px;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}
.landing-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--gold);
    letter-spacing: 3px;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    text-shadow:
        0 0 40px rgba(232,195,90,0.15),
        0 2px 8px rgba(0,0,0,0.6);
}
.lh-skull {
    display: block;
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: var(--accent);
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 0 20px rgba(195,68,62,0.3));
    animation: skullGlow 4s ease-in-out infinite alternate;
}
@keyframes skullGlow {
    0%   { filter: drop-shadow(0 0 15px rgba(195,68,62,0.2)); }
    100% { filter: drop-shadow(0 0 30px rgba(195,68,62,0.45)); }
}
.landing-hero-tagline {
    font-size: clamp(0.9rem, 1.5vw, 1.15rem);
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 540px;
    margin: 0 auto 2.5rem;
}
.landing-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.lh-btn {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 1px solid transparent;
}
.lh-btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(195,68,62,0.3);
}
.lh-btn-primary:hover {
    background: var(--accent-glow);
    border-color: var(--accent-glow);
    box-shadow: 0 6px 30px rgba(195,68,62,0.45);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.lh-btn-secondary {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold-dim);
}
.lh-btn-secondary:hover {
    background: rgba(232,195,90,0.08);
    border-color: var(--gold);
    color: var(--gold);
    text-decoration: none;
    transform: translateY(-1px);
}
.lh-btn-icon {
    font-size: 1rem;
}
.landing-hero-scroll {
    margin-top: 3rem;
    animation: scrollBounce 2s ease-in-out infinite;
}
.lh-scroll-arrow {
    font-size: 2rem;
    color: var(--text-muted);
    opacity: 0.4;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* ─── Stats Bar ─── */
.landing-stats {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.landing-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(195,68,62,0.04), transparent);
    pointer-events: none;
}
.landing-stats-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 1.75rem 2rem;
}
.ls-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}
.ls-num {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold);
    letter-spacing: 1px;
}
.ls-label {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ls-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ─── Section shared ─── */
.landing-section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}
.landing-section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 0.5rem;
}
.landing-section-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    max-width: 550px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}
.landing-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.landing-section-header .landing-section-title {
    text-align: left;
    margin-bottom: 0;
}
.landing-see-all {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: var(--accent-glow);
    text-decoration: none;
    transition: color 0.15s;
}
.landing-see-all:hover { color: var(--gold); text-decoration: none; }

/* ─── Features Grid ─── */
.landing-features {
    padding: 5rem 0;
    background:
        linear-gradient(180deg, var(--bg-body) 0%, var(--bg-surface) 50%, var(--bg-body) 100%);
}
.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}
.lf-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.lf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-dark), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.lf-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.lf-card:hover::before { opacity: 1; }
.lf-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}
.lf-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold);
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.lf-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ─── Recent Builds ─── */
.landing-recent {
    padding: 4rem 0 5rem;
}
.landing-builds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}
.lb-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.lb-card:hover {
    border-color: var(--accent-dark);
    background: var(--bg-hover);
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
}
.lb-card.lb-featured {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232,195,90,0.05) 100%);
}
.lb-card.lb-featured:hover { border-color: var(--gold); }
.lb-rating { color: var(--gold); font-weight: 600; font-size: 0.75rem; }
.lb-class-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-radius: var(--radius);
    flex-shrink: 0;
    overflow: hidden;
}
.lb-info { flex: 1; min-width: 0; }
.lb-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-meta {
    display: flex;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}
.lb-class { color: var(--accent-glow); font-weight: 600; }
.lb-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-tags { display: flex; gap: 0.3rem; margin-top: 0.3rem; }
.lb-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}
.lb-card:hover .lb-arrow {
    color: var(--gold);
    transform: translateX(3px);
}

/* ─── Class Showcase ─── */
.landing-classes {
    padding: 4rem 0 5rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.lc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.65rem;
    margin-top: 0.5rem;
}
.lc-class {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.lc-class::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(195,68,62,0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}
.lc-class:hover {
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.lc-class:hover::after { opacity: 1; }
.lc-icon {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    vertical-align: middle;
}
.lc-name {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    text-align: center;
    transition: color 0.15s;
}
.lc-class:hover .lc-name { color: var(--gold); }

/* ─── CTA Section ─── */
.landing-cta {
    padding: 5rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.landing-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
}
.landing-cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(195,68,62,0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.landing-cta-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}
.landing-cta-desc {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
    .guide-hero-inner { flex-direction: column; gap: 1.5rem; }
    .hero-ratings { flex-direction: row; flex-wrap: wrap; }
    .two-col { grid-template-columns: 1fr; }
    .items-strip { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .nav-toggle { display: block; }
    .header-nav {
      display: none; position: absolute; top: 100%; left: 0; right: 0;
      flex-direction: column; background: var(--bg-card); border-bottom: 1px solid var(--border);
      padding: 0.5rem 0; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }
    .header-nav.open { display: flex; }
    .header-nav .nav-link { padding: 0.75rem 1.5rem; }
    .header-inner { padding: 0.75rem 1rem; position: relative; }
    .content-wrap { padding: 0 1rem; }
    .guide-hero-inner { padding: 0 1rem; }
    .builds-toolbar { flex-direction: column; }
    /* Landing responsive */
    .landing-features-grid { grid-template-columns: repeat(2, 1fr); }
    .landing-builds-grid { grid-template-columns: 1fr; }
    .landing-stats-inner { gap: 1.5rem; }
    .lc-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
    .landing-section-inner { padding: 0 1rem; }
}
@media (max-width: 1200px) {
    .logo-sub { display: none; }
}
@media (max-width: 1100px) {
    .logo-title { font-size: 1.1rem; }
    .header-inner { gap: 0.75rem; }
    .nav-link { padding: 0.5rem 0.5rem; font-size: 0.7rem; letter-spacing: 1px; }
    .btn-act { padding: 0.4rem 0.6rem; font-size: 0.65rem; }
}
@media (max-width: 600px) {
    .guide-meta { gap: 1rem; }
    .rating-card { min-width: auto; flex: 1; }
    .summary-inner { flex-wrap: wrap; gap: 1rem; }
    .items-strip { grid-template-columns: 1fr 1fr; }
    .header-actions { gap: 0.25rem; }
    .btn-act { padding: 0.35rem 0.5rem; font-size: 0.6rem; }
    .auth-card { padding: 1.5rem; }
    .build-card { padding: 0.75rem; }
    /* Landing responsive */
    .landing-features-grid { grid-template-columns: 1fr; }
    .landing-hero { min-height: 80vh; }
    .landing-stats-inner { flex-direction: column; gap: 1rem; }
    .ls-divider { width: 40px; height: 1px; }
    .landing-features { padding: 3rem 0; }
    .landing-recent { padding: 3rem 0; }
    .landing-classes { padding: 3rem 0; }
    .landing-cta { padding: 3rem 0 4rem; }
    .lc-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .lc-class { padding: 0.75rem 0.25rem; }
    .lc-icon { width: 24px; height: 24px; }
    .lc-name { font-size: 0.5rem; }
}

/* ═══════════ FLOATING SAVE BUTTON ═══════════ */
.floating-save-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9000;
    font-family: var(--font-sc);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);
    border: 2px solid var(--accent-glow);
    border-radius: 10px;
    padding: 1rem 2rem;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(195,68,62,0.5), 0 0 40px rgba(195,68,62,0.2);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.15s, box-shadow 0.15s;
    pointer-events: none;
}
.floating-save-btn.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    animation: floatSaveBreathe 2s ease-in-out infinite;
}
.floating-save-btn:hover {
    background: linear-gradient(135deg, var(--accent-glow) 0%, var(--accent) 100%);
    box-shadow: 0 6px 32px rgba(195,68,62,0.6), 0 0 50px rgba(195,68,62,0.25);
    animation: none;
}
.floating-save-btn:active {
    transform: translateY(1px);
}
.floating-save-btn.dirty::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-deep);
    animation: floatSavePulse 1.5s ease-in-out infinite;
}
@keyframes floatSaveBreathe {
    0%, 100% { box-shadow: 0 4px 24px rgba(195,68,62,0.5), 0 0 40px rgba(195,68,62,0.2); }
    50% { box-shadow: 0 4px 30px rgba(195,68,62,0.65), 0 0 50px rgba(195,68,62,0.3); }
}
@keyframes floatSavePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* ═══════════ ITEM PICKER MODAL ═══════════ */
.item-picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}
.item-picker-overlay.open { display: flex; }

.item-picker {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border, #333);
    border-radius: 8px;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8);
}

.ip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, #333);
}
.ip-title { margin: 0; font-size: 1.1rem; }
.ip-close {
    background: none;
    border: 1px solid var(--border, #444);
    color: var(--text-dim, #aaa);
    width: 32px; height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.ip-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.ip-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border, #222);
    flex-wrap: wrap;
}
.ip-search, .ip-affix-search {
    flex: 1;
    min-width: 180px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border, #444);
    color: var(--text, #eee);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}
.ip-affix-search {
    border-color: rgba(200,176,107,0.3);
}
.ip-affix-search::placeholder {
    color: rgba(200,176,107,0.4);
}

/* Rarity pill bar */
.ip-rarity-bar {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border, #222);
    flex-wrap: wrap;
}
.ip-rarity-pill {
    font-family: var(--font-sc);
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border, #444);
    background: rgba(0,0,0,0.2);
    color: var(--text-muted, #888);
    transition: all 0.15s;
}
.ip-rarity-pill:hover {
    border-color: var(--border-light);
    color: var(--text);
}
.ip-rarity-pill.active {
    border-color: var(--gold-dim);
    color: var(--gold);
    background: rgba(232,195,90,0.1);
}
.ip-rarity-pill.rarity-satanic.active { border-color: #CB1515; color: #e03030; background: rgba(203,21,21,0.12); }
.ip-rarity-pill.rarity-angelic.active { border-color: #F3F393; color: #f5f5a5; background: rgba(243,243,147,0.12); }
.ip-rarity-pill.rarity-heroic.active { border-color: #00F28D; color: #33f5a5; background: rgba(0,242,141,0.12); }
.ip-rarity-pill.rarity-set.active { border-color: #0CD61B; color: #30e040; background: rgba(12,214,27,0.12); }
.ip-rarity-pill.rarity-unique.active { border-color: #eab308; color: #facc15; background: rgba(234,179,8,0.12); }
.ip-rarity-pill.rarity-normal.active { border-color: #888; color: #aaa; background: rgba(128,128,128,0.12); }
.ip-rarity-pill.rarity-unholy.active { border-color: #CD3769; color: #d8507e; background: rgba(205,55,105,0.12); }

.ip-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 200px;
    max-height: 55vh;
}

.ip-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s;
}
.ip-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--border, #444);
}

.ip-item-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    border: 1px solid var(--border, #333);
    overflow: hidden;
}
.ip-item-icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    image-rendering: pixelated;
}
.ip-item-placeholder { color: var(--text-dim, #666); font-size: 1.2rem; }

.ip-item-info { flex: 1; min-width: 0; }
.ip-item-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ip-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 2px;
}
.ip-tag {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    color: var(--text-dim, #aaa);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ip-item-stats {
    font-size: 0.72rem;
    color: var(--text-dim, #999);
    white-space: normal;
    padding-top: 2px;
}
.ip-stat-line {
    padding: 1px 0;
    line-height: 1.3;
}
.ip-item-ability {
    font-size: 0.72rem;
    color: #7bb8ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ip-item-desc {
    font-size: 0.68rem;
    color: var(--text-dim);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ip-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim, #888);
}

.ip-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 0.75rem;
    border-top: 1px solid var(--border, #222);
}
.ip-pagination:empty { display: none; }
.pag-dots { color: var(--text-dim, #666); padding: 0 4px; }

/* ── Rarity colors ── */
.rarity-satanic, .ip-item-name.rarity-satanic { color: #CB1515; }
.rarity-angelic, .ip-item-name.rarity-angelic { color: #F3F393; }
.rarity-heroic, .ip-item-name.rarity-heroic { color: #00F28D; }
.rarity-set, .ip-item-name.rarity-set { color: #0CD61B; }
.rarity-unique, .ip-item-name.rarity-unique { color: #eab308; }
.rarity-normal, .ip-item-name.rarity-normal { color: var(--text-dim, #ccc); }
.rarity-unholy, .ip-item-name.rarity-unholy { color: #CD3769; }

.ip-tag.rarity-satanic { background: rgba(203,21,21,0.15); color: #e03030; }
.ip-tag.rarity-angelic { background: rgba(243,243,147,0.15); color: #F3F393; }
.ip-tag.rarity-heroic { background: rgba(0,242,141,0.15); color: #33f5a5; }
.ip-tag.rarity-set { background: rgba(12,214,27,0.15); color: #30e040; }
.ip-tag.rarity-unique { background: rgba(234,179,8,0.15); color: #facc15; }
.ip-tag.rarity-unholy { background: rgba(205,55,105,0.15); color: #d8507e; }

.ip-item-icon.rarity-satanic { border-color: #CB1515; }
.ip-item-icon.rarity-angelic { border-color: #F3F393; }
.ip-item-icon.rarity-heroic { border-color: #00F28D; }
.ip-item-icon.rarity-set { border-color: #0CD61B; }
.ip-item-icon.rarity-unique { border-color: #eab308; }
.ip-item-icon.rarity-unholy { border-color: #CD3769; }

/* ── Gear slot rarity frames ── */
.unholy-frame { border-color: #CD3769 !important; }
.satanic-frame { border-color: #CB1515 !important; }
.angelic-frame { border-color: #F3F393 !important; }
.heroic-frame  { border-color: #00F28D !important; }
.set-frame     { border-color: #0CD61B !important; }
.unique-frame  { border-color: #eab308 !important; }

/* ── Gear slot item details ── */
.gs-item-set { font-size: 0.72rem; color: #0CD61B; margin-top: 2px; }
.gs-item-ability { font-size: 0.72rem; color: #7bb8ff; margin-top: 2px; }
.gs-item-name.satanic { color: #CB1515; }
.gs-item-name.angelic { color: #F3F393; }
.gs-item-name.heroic { color: #00F28D; }
.gs-item-name.set { color: #0CD61B; }
.gs-item-name.unique { color: #eab308; }
.gs-item-name.unholy { color: #CD3769; }
.gs-alt-name.satanic { color: #CB1515; }
.gs-alt-name.angelic { color: #F3F393; }
.gs-alt-name.heroic { color: #00F28D; }
.gs-alt-name.set { color: #0CD61B; }
.gs-alt-name.unique { color: #eab308; }
.gs-alt-name.unholy { color: #CD3769; }

/* ── Editable gear slots ── */
.gs-editable .gs-primary-body { cursor: pointer; }
.gs-editable .gs-primary-body:hover { background: rgba(255,255,255,0.04); }
.gs-editable .gs-empty .gs-art-placeholder {
    font-size: 1.5rem;
    color: var(--text-dim, #666);
}

/* ── Item picker images ── */
.ip-item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* ── Splash art in gear slots ── */
.gs-art {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* ── Alt items ── */
.gs-alts, .gs-alts-view {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}
.gs-alts-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted, #888);
    white-space: nowrap;
}
.gs-alt-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
}
.gs-alt-art {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.gs-alt-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}
.gs-alt-placeholder {
    font-size: 0.65rem;
    color: var(--text-dim, #666);
}
.gs-alt-name {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.gs-alt-remove {
    background: none;
    border: none;
    color: #ff6666;
    font-size: 0.6rem;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.5;
}
.gs-alt-remove:hover { opacity: 1; }
.gs-alt-add {
    background: none;
    border: 1px dashed rgba(255,255,255,0.15);
    color: var(--text-muted, #888);
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}
.gs-alt-add:hover {
    border-color: var(--accent, #cc9944);
    color: var(--accent, #cc9944);
}

/* ── Attribute buttons speed fix ── */
.attr-btn { user-select: none; -webkit-user-select: none; }
.attr-btn:active {
    transform: scale(0.9);
    color: var(--accent);
    border-color: var(--accent);
}

/* ═══════════ INCARNATION TREE ═══════════ */
.incarnation-section { padding: 0 !important; }

.incarnation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.incarnation-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.incarnation-search {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 180px;
}
.incarnation-search:focus { outline: none; border-color: var(--accent); }

.incarnation-pts {
    font-family: var(--font-sc);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-dim);
}
.incarnation-pts span {
    color: var(--gold);
    font-weight: 700;
}

.incarnation-wrap {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #0d0d12;
    overflow: hidden;
}
.incarnation-wrap canvas {
    display: block;
    width: 100%;
    height: 600px;
    image-rendering: pixelated;
    cursor: grab;
}

.incarnation-stats-summary {
    padding: 12px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.stats-summary-title {
    font-family: var(--font-sc);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.incarnation-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 16px;
}
.inc-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.inc-stat-name { color: var(--text-dim); }
.inc-stat-val { color: var(--gold); font-size: 0.8rem; }


/* ═══════════════════════════════════════════
   NEW BUILD LAYOUT — Hero, Sidebar, Formatting
   ═══════════════════════════════════════════ */

/* ─── HERO AUTHOR ROW ─── */
.hero-author-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}
.hero-author-name {
    color: var(--gold-dim);
    font-family: var(--font-sc);
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.hero-author-sep {
    color: var(--text-muted);
}
.hero-author-time {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.hero-views {
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* ─── BUILD RATING ROW ─── */
.hero-rating-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.rating-stars {
    display: inline-flex;
    gap: 0.1rem;
}
.rate-star {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.15s, transform 0.1s;
    user-select: none;
}
.rate-star.filled { color: var(--gold); }
.rate-star.mine { text-shadow: 0 0 6px rgba(232,195,90,0.5); }
.rate-star.clickable { cursor: pointer; }
.rate-star.clickable:hover { transform: scale(1.2); }
.rate-star.hover { color: var(--gold) !important; }
.rating-avg {
    font-weight: 700;
    color: var(--gold);
    font-size: 1rem;
}
.rating-count {
    color: var(--text-dim);
    font-size: 0.78rem;
}
.rating-mine {
    color: var(--accent-glow);
    font-size: 0.78rem;
    font-weight: 500;
}
.rating-note {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-style: italic;
}

/* ─── HERO TITLE BLOCK ─── */
.hero-title-block {
    margin-bottom: 0.15rem;
}
.title-static {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
}

/* ─── HERO TAGS ROW ─── */
.hero-tags-row {
    margin-top: 0.3rem;
}

/* ─── RIGHT: Sidebar Meta Card ─── */
.hero-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* Actions strip at top of card */
.hsc-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}
.hsc-actions-btns {
    display: flex;
    gap: 0.35rem;
    margin-left: auto;
}
.btn-sm {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.55rem !important;
}
.vis-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-sc);
    font-size: 0.62rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
}
.vis-toggle input {
    accent-color: var(--gold);
    width: 14px;
    height: 14px;
}

/* Meta fields grid */
.hsc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.hsc-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transition: background 0.15s;
}
.hsc-field:hover {
    background: rgba(232,195,90,0.02);
}
.hsc-field:nth-child(2n) {
    border-right: none;
}
.hsc-field:nth-last-child(-n+2) {
    border-bottom: none;
}
.hsc-field:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: none;
}
.hsc-label {
    font-family: var(--font-sc);
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1;
}
.hsc-val {
    color: var(--text);
    font-size: 0.85rem;
}
.hsc-val-gold {
    color: var(--gold);
    font-weight: 700;
}
.hsc-select {
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.2rem 0.35rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    cursor: pointer;
    width: 100%;
}
.hsc-select:focus {
    outline: none;
    border-color: var(--gold-dim);
}
.hsc-input-num {
    width: 60px;
    background: var(--bg-surface);
    color: var(--gold);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.2rem 0.35rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    text-align: center;
}
.hsc-input-num:focus {
    outline: none;
    border-color: var(--gold-dim);
}
.hsc-input {
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.2rem 0.35rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    width: 100%;
}
.hsc-input:focus {
    outline: none;
    border-color: var(--gold-dim);
}

/* Responsive: stack on narrow */
@media (max-width: 860px) {
    .guide-hero-inner {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .hero-emblem {
        flex-direction: row;
        gap: 0.75rem;
    }
    .hero-emblem-ring {
        width: 48px;
        height: 48px;
    }
    .hero-emblem-icon {
        width: 32px;
        height: 32px;
    }
    .hero-sidebar-card {
        max-width: 100%;
    }
}

/* ─── BUILD LAYOUT — Sidebar + Main Column ─── */
.build-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}
.build-main-col {
    flex: 1;
    min-width: 0;
}

/* ─── SIDEBAR TOC ─── */
.guide-sidebar {
    width: 180px;
    flex-shrink: 0;
    position: sticky;
    top: 110px;
    z-index: 80;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}
.sidebar-toc {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.5rem;
}
.sidebar-toc-title {
    font-family: var(--font-sc);
    font-size: 0.68rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 0.5rem 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.35rem;
}
.stoc-link {
    display: block;
    font-family: var(--font-sc);
    font-size: 0.74rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius);
    border-left: 2px solid transparent;
    transition: all 0.15s;
}
.stoc-link:hover {
    color: var(--gold);
    background: rgba(232,195,90,0.06);
}
.stoc-link.active {
    color: var(--gold);
    background: rgba(232,195,90,0.1);
    border-left-color: var(--gold);
}

/* ─── FORMATTING TOOLBAR ─── */
.fmt-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0.3rem 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    flex-wrap: wrap;
}
.fmt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: var(--font-body);
    transition: all 0.1s;
}
.fmt-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--border);
}
.fmt-i {
    font-style: normal;
    pointer-events: none;
}
.fmt-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 3px;
    flex-shrink: 0;
}

/* paired toolbar + textarea */
.fmt-toolbar + .overview-edit {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ─── FORMATTED TEXT COLOR CLASSES ─── */
.fc-gold   { color: var(--gold); }
.fc-red    { color: var(--accent-glow); }
.fc-green  { color: var(--poison); }
.fc-blue   { color: var(--cold); }
.fc-white  { color: #f0efe8; }
.fc-orange { color: var(--fire); }
.fc-purple { color: var(--mythic); }

/* ─── PROSE HR ─── */
.prose-hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 1rem 0;
}

/* ─── ITEM REFERENCE INLINE + TOOLTIP ─── */
.item-ref {
    font-weight: 600;
    transition: opacity 0.15s;
    position: relative;
    border-bottom: 1px dotted currentColor;
    cursor: pointer;
}
.item-ref:hover {
    opacity: 0.85;
}

/* ─── Item Picker (toolbar modal) ─── */
.item-picker-results {
    max-height: 280px; overflow-y: auto;
    margin: 0.5rem 0; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--bg-deep);
}
.item-picker-row {
    display: flex; gap: 0.5rem; align-items: center;
    padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.85rem;
    color: var(--text); transition: background 0.15s;
}
.item-picker-row:hover { background: var(--bg-hover); }
.fmt-item-btn { font-size: 0.75rem !important; }

.item-ref-tooltip {
    position: fixed;
    z-index: 9999;
    display: none;
    background: rgba(8, 6, 12, 0.97);
    border: 1px solid #5a3a2a;
    border-radius: 6px;
    padding: 12px 16px;
    max-width: 360px;
    min-width: 220px;
    font-size: 0.8rem;
    color: #d0ccc4;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.irt-name {
    font-family: var(--font-sc);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.irt-meta {
    display: flex;
    gap: 8px;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 6px;
}
.irt-dmg, .irt-def {
    font-size: 0.75rem;
    color: #ccc;
    margin-bottom: 4px;
}
.irt-stats {
    border-top: 1px solid rgba(90,58,42,0.5);
    padding-top: 6px;
    margin-top: 4px;
}
.irt-stat {
    font-size: 0.72rem;
    color: #8899cc;
    line-height: 1.5;
}
.irt-set {
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}
.irt-ability {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #c8a060;
}

/* ─── RESPONSIVE: hide sidebar on small screens ─── */
@media (max-width: 860px) {
    .build-layout {
        flex-direction: column;
    }
    .guide-sidebar {
        display: none;
    }
}

/* ═══════════ SITE FOOTER ═══════════ */
/* ─── COOKIE CONSENT BANNER ─── */
.cookie-consent {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 99999;
  background: rgba(10,10,14,0.97); border-top: 1px solid var(--border-light, #333);
  padding: 16px 20px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.cookie-consent-inner {
  max-width: 900px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  justify-content: center;
}
.cookie-consent-inner p {
  color: var(--text-muted, #8b8b9a); font-size: 13px; line-height: 1.5; margin: 0; flex: 1; min-width: 280px;
}
.cookie-consent-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cookie-link { color: var(--accent, #f0b232); font-size: 13px; text-decoration: underline; white-space: nowrap; }
.cookie-accept-btn {
  background: var(--accent, #f0b232); color: #000; border: none; padding: 8px 24px;
  border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.cookie-accept-btn:hover { filter: brightness(1.1); }

.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: 2rem;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold-dim);
    letter-spacing: 1px;
}
.footer-copy {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.footer-links {
    display: flex;
    gap: 1.2rem;
}
.footer-links a {
    font-family: var(--font-sc);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-links a:hover {
    color: var(--gold);
}

/* ═══════════ STATIC PAGES ═══════════ */
.static-page {
    max-width: 780px;
    margin: 2rem auto;
    padding: 0 2rem;
}
.static-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.static-body {
    line-height: 1.7;
}
.static-body h4 {
    font-family: var(--font-sc);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.static-body a {
    color: var(--cold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}
.static-body a:hover {
    border-bottom-color: var(--cold);
}

/* ─── MERCENARY TAB ─── */
.merc-container { padding: 16px 0; }

/* Slot tabs (3 merc slots) */
.merc-slot-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.merc-slot-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px 8px 0 0; cursor: pointer;
  background: var(--panel); border: 2px solid var(--border); border-bottom: none;
  color: var(--text-muted); transition: all 0.2s; font-size: 13px; font-weight: 600;
}
.merc-slot-tab:hover { color: var(--text); background: color-mix(in srgb, var(--merc-tab-color, var(--cold)) 8%, var(--panel)); }
.merc-slot-tab.active { color: var(--text); border-color: var(--merc-tab-color, var(--accent)); background: color-mix(in srgb, var(--merc-tab-color, var(--accent)) 15%, var(--panel)); }
.merc-slot-icon { font-size: 16px; }
.merc-slot-label { white-space: nowrap; }

.merc-type-selector { margin-bottom: 20px; }
.merc-type-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.merc-type-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 20px; border-radius: 8px; cursor: pointer;
  background: var(--panel); border: 2px solid var(--border);
  color: var(--text-muted); transition: all 0.2s; min-width: 110px;
}
.merc-type-card:hover { border-color: var(--merc-color, var(--cold)); color: var(--text); }
.merc-type-card.active { border-color: var(--merc-color, var(--fire)); color: var(--text); background: color-mix(in srgb, var(--merc-color, var(--fire)) 12%, var(--panel)); }
.merc-type-card.merc-clear { border-style: dashed; font-size: 12px; min-width: 50px; padding: 12px; }
.merc-type-icon { font-size: 24px; }
.merc-type-name { font-weight: 700; font-size: 13px; }
.merc-type-role { font-size: 10px; color: var(--text-muted); }

.merc-detail { display: grid; grid-template-columns: 1fr; gap: 20px; }

.merc-skills-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.merc-skills-title { font-weight: 700; font-size: 14px; color: var(--text); }
.merc-skills-pts-total { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* Icon grid - 6 columns matching game layout */
.merc-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  background: var(--bg2);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border);
}

.merc-icon-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative; cursor: default;
  padding: 6px 2px; border-radius: 6px;
  transition: all 0.15s;
}
.merc-icon-cell:hover { background: rgba(255,255,255,0.04); }

.merc-icon-frame {
  position: relative; width: 44px; height: 44px;
  border-radius: 6px; overflow: hidden;
  border: 2px solid var(--border);
  background: rgba(0,0,0,0.3);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.merc-icon-cell.allocated .merc-icon-frame {
  border-color: var(--fire);
  box-shadow: 0 0 8px rgba(216,57,49,0.3);
}
.merc-icon-cell.maxed .merc-icon-frame {
  border-color: #f1c40f;
  box-shadow: 0 0 10px rgba(241,196,15,0.4);
}
.merc-icon-cell:not(.allocated) .merc-icon-frame { opacity: 0.5; }
.merc-icon-cell:not(.allocated):hover .merc-icon-frame { opacity: 0.8; }

.merc-icon-img {
  width: 100%; height: 100%; object-fit: contain;
  image-rendering: pixelated;
  display: block;
}

.merc-icon-active-badge {
  position: absolute; top: 1px; right: 1px;
  width: 12px; height: 12px; border-radius: 2px;
  background: var(--fire); color: #fff;
  font-size: 8px; font-weight: 700; line-height: 12px; text-align: center;
}

.merc-icon-pts {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  line-height: 1;
}
.merc-icon-cell.allocated .merc-icon-pts { color: var(--fire); }
.merc-icon-cell.maxed .merc-icon-pts { color: #f1c40f; }

.merc-icon-controls {
  display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s;
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
}
.merc-icon-cell:hover .merc-icon-controls { opacity: 1; }

.merc-ic-btn {
  width: 18px; height: 18px; border-radius: 3px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  padding: 0;
}
.merc-ic-btn:hover { border-color: var(--fire); color: var(--fire); background: var(--panel); }

/* Tooltip */
.merc-tooltip {
  position: fixed; z-index: 9999; pointer-events: none;
  background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
  max-width: 260px; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.merc-tip-name { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.merc-tip-type { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.merc-tip-type.active { color: var(--fire); }
.merc-tip-type.passive { color: var(--cold); }
.merc-tip-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; margin-bottom: 6px; }
.merc-tip-pts { font-size: 11px; font-weight: 600; color: var(--text); }

.merc-equip-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg2));
    padding: 14px;
}
.merc-equip-title { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 10px; }
.merc-equip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}
.merc-equip-slot.empty {
  display: flex; justify-content: space-between; align-items: center;
    min-height: 62px;
    padding: 10px 12px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--border);
  cursor: pointer; transition: border-color 0.15s;
}
.merc-equip-slot.empty:hover { border-color: var(--cold); }
.merc-equip-slot.has-item {
  border-radius: 8px; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; transition: border-color 0.2s;
}
.merc-equip-slot.has-item:hover { border-color: var(--gold-dim); }
.merc-equip-slot.has-item.legendary { border-left: 3px solid var(--legendary); }
.merc-equip-slot.has-item.angelic { border-left: 3px solid var(--angelic); }
.merc-equip-slot.has-item.set, .merc-equip-slot.has-item.set-item { border-left: 3px solid var(--set-color); }
.merc-equip-slot.has-item.mythic { border-left: 3px solid var(--mythic); }
.merc-equip-slot.has-item.satanic { border-left: 3px solid var(--satanic); }
.merc-equip-slot.has-item.heroic { border-left: 3px solid var(--heroic); }
.merc-equip-slot.has-item.unholy { border-left: 3px solid var(--unholy); }
.merc-equip-slot.has-item.unique { border-left: 3px solid #eab308; }

.merc-item-card {
    display: flex; align-items: center; gap: 10px; padding: 10px; position: relative;
    min-height: 62px;
}
.merc-item-art {
  width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-deep); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.merc-item-art.legendary-frame { border-color: var(--legendary); }
.merc-item-art.angelic-frame { border-color: var(--angelic); }
.merc-item-art.set-frame { border-color: var(--set-color); }
.merc-item-art.mythic-frame { border-color: var(--mythic); }
.merc-item-art.satanic-frame { border-color: var(--satanic); }
.merc-item-art.heroic-frame { border-color: var(--heroic); }
.merc-item-art.unholy-frame { border-color: var(--unholy); }
.merc-item-art.unique-frame { border-color: #eab308; }
.merc-item-img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.merc-item-info { flex: 1; min-width: 0; }
.merc-item-name {
  font-family: var(--font-sc); font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.merc-item-name.legendary { color: var(--legendary); }
.merc-item-name.angelic { color: var(--angelic); }
.merc-item-name.set, .merc-item-name.set-item { color: var(--set-color); }
.merc-item-name.mythic { color: var(--mythic); }
.merc-item-name.satanic { color: var(--satanic); }
.merc-item-name.heroic { color: var(--heroic); }
.merc-item-name.unholy { color: var(--unholy); }
.merc-item-name.unique { color: #eab308; }
.merc-item-rarity {
  font-family: var(--font-sc); font-size: 9px; letter-spacing: 1.5px;
  color: var(--text-muted); text-transform: uppercase;
}
.merc-item-stats {
  margin-top: 4px; display: flex; flex-direction: column; gap: 1px;
}
.merc-stat-line { font-size: 10px; color: var(--text-dim); line-height: 1.3; }
.merc-item-clear {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-deep); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.merc-item-card:hover .merc-item-clear { opacity: 1; }
.merc-item-clear:hover { color: var(--accent); border-color: var(--accent); }

.merc-slot-label { font-weight: 600; font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
.merc-slot-item { font-size: 12px; color: var(--text-dim); }

.merc-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }

/* ═══════════════════════════════════════════
   WIKI SECTION — Complete Redesign
   ═══════════════════════════════════════════ */

/* ─── Wiki Landing ─── */
/* ═══════════ WIKI ═══════════ */

/* ─── Landing ─── */
.wiki-landing { padding: 48px 0 40px; }
.wiki-landing-header { text-align: center; margin-bottom: 36px; }
.wiki-title {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800; margin-bottom: 6px;
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(232,195,90,0.25);
  letter-spacing: 1px;
}
.wiki-subtitle { color: var(--text-dim); font-size: 14px; font-style: italic; }
.wiki-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; max-width: 1000px; margin: 0 auto;
}
.wiki-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 20px; border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: all 0.25s;
  position: relative; overflow: hidden;
}
.wiki-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  opacity: 0; transition: opacity 0.25s;
}
.wiki-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,195,90,0.1);
  text-decoration: none; color: var(--text);
}
.wiki-card:hover::before { opacity: 1; }
.wiki-card-top { display: flex; align-items: center; gap: 12px; }
.wiki-card-icon { font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.wiki-card-label { font-weight: 700; font-size: 17px; font-family: var(--font-sc); letter-spacing: 0.3px; }
.wiki-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.wiki-card-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--text-muted); opacity: 0; transition: all 0.25s;
}
.wiki-card:hover .wiki-card-arrow { opacity: 1; right: 14px; color: var(--gold); }

/* ─── Wiki Changelog ─── */
.wiki-changelog { max-width: 1000px; margin: 40px auto 0; }
.wiki-changelog-title {
  font-size: 16px; font-family: var(--font-sc); font-weight: 700;
  color: var(--text); letter-spacing: 0.5px; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.wiki-changelog-list { display: flex; flex-direction: column; gap: 4px; }
.wiki-changelog-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; transition: border-color 0.15s;
}
.wiki-changelog-row:hover { border-color: var(--border-light); }
.wcl-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.wcl-body { flex: 1; min-width: 0; }
.wcl-title { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.wcl-meta { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.wcl-meta strong { color: var(--text-dim); }
.wcl-status { font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; flex-shrink: 0; }

/* ─── Wiki Layout (sidebar + content) ─── */
.wiki-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  min-height: calc(100vh - 160px);
}
.wiki-sidebar {
  position: sticky; top: 72px; align-self: start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 0; max-height: calc(100vh - 90px); overflow-y: auto;
}
.wiki-sidebar-header {
  padding: 0 16px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.wiki-sidebar-back {
  font-size: 12px; color: var(--gold-dim); text-decoration: none;
  font-family: var(--font-sc); letter-spacing: 0.5px; text-transform: uppercase;
}
.wiki-sidebar-back:hover { color: var(--gold); text-decoration: none; }
.wiki-sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.wiki-sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 6px;
  font-size: 13px; color: var(--text-dim); text-decoration: none;
  transition: all 0.15s;
}
.wiki-sidebar-link:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.wiki-sidebar-link.active {
  background: rgba(232,195,90,0.1); color: var(--gold);
  font-weight: 600;
}
.wsl-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.wsl-label { white-space: nowrap; }

.wiki-main { min-width: 0; }
.wiki-page-header { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wiki-propose-btn {
  font-size: 12px; padding: 5px 12px; border-radius: 6px;
  background: var(--bg-surface); border: 1px solid var(--gold-dim); color: var(--gold-dim);
  cursor: pointer; transition: all .15s;
}
.wiki-propose-btn:hover { background: var(--gold-dim); color: var(--bg); }
.wiki-breadcrumb {
  font-size: 12px; color: var(--text-muted);
  padding: 8px 14px; background: var(--bg-surface); border-radius: 6px;
  border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px;
}
.wiki-bc-sep { color: var(--text-muted); font-size: 10px; }
.wiki-breadcrumb a { color: var(--gold-dim); text-decoration: none; }
.wiki-breadcrumb a:hover { color: var(--gold); text-decoration: underline; }

/* ─── Shared Wiki Elements ─── */
.wiki-section-title {
  font-family: var(--font-display); font-size: 22px; color: var(--gold);
  margin-bottom: 16px; letter-spacing: 0.5px;
  text-shadow: 0 1px 8px rgba(232,195,90,0.15);
  display: flex; align-items: center; gap: 10px;
}
.wiki-title-count {
  font-size: 13px; font-weight: 400; font-family: var(--font-sc);
  color: var(--text-muted); background: var(--bg-surface);
  padding: 2px 10px; border-radius: 12px; border: 1px solid var(--border);
}
.wiki-cat-count {
  font-size: 11px; font-weight: 400; font-family: var(--font-sc);
  color: var(--text-muted); background: var(--bg-surface);
  padding: 1px 8px; border-radius: 10px; margin-left: 6px;
}

.wiki-filters {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--bg-surface); border-radius: 8px;
  border: 1px solid var(--border);
}
.wiki-search {
  flex: 1; min-width: 200px; padding: 9px 14px; border-radius: 6px;
  background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text); font-size: 13px;
  transition: border-color 0.2s;
}
.wiki-search:focus { border-color: var(--gold-dim); outline: none; box-shadow: 0 0 0 2px rgba(232,195,90,0.1); }
.wiki-filter {
  padding: 9px 14px; border-radius: 6px;
  background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text); font-size: 12px;
  cursor: pointer;
}
.wiki-filter:focus { border-color: var(--gold-dim); outline: none; }

.wiki-results-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding: 0 2px;
}
.wiki-count { font-size: 12px; color: var(--text-muted); }
.wiki-page-info { font-size: 12px; color: var(--text-muted); }

.wiki-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 20px; padding: 12px; background: var(--bg-surface); border-radius: 8px;
  border: 1px solid var(--border);
}
.wiki-pager-pages { display: flex; gap: 4px; }
.wiki-pager-btn {
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-dim); font-size: 12px; cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.wiki-pager-btn:hover { border-color: var(--gold-dim); color: var(--text); }
.wiki-pager-btn.active { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); font-weight: 700; }

/* ═══════════════════════════════════════════
   WIKI: ITEMS LIST
   ═══════════════════════════════════════════ */

/* Wiki buttons — self-contained .btn-sm for wiki context */
.wiki-main .btn-sm,
.wiki-item-notfound .btn-sm,
.wip-edit-btn,
.wiki-pager .btn-sm,
.wie-modal .btn-sm,
.wie-actions .btn-sm {
  font-family: var(--font-sc); font-size: 12px; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-dim); background: var(--bg-card);
  border: 1px solid var(--border); padding: 7px 14px; border-radius: 6px;
  cursor: pointer; transition: all 0.15s; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px;
}
.wiki-main .btn-sm:hover,
.wiki-item-notfound .btn-sm:hover,
.wip-edit-btn:hover,
.wiki-pager .btn-sm:hover,
.wie-modal .btn-sm:hover,
.wie-actions .btn-sm:hover {
  color: var(--text); border-color: var(--border-light); background: var(--bg-hover);
  text-decoration: none;
}
.wiki-main .btn-save,
.wie-modal .btn-save,
.wie-actions .btn-save {
  color: #fff; background: var(--accent); border-color: var(--accent);
}
.wiki-main .btn-save:hover,
.wie-modal .btn-save:hover,
.wie-actions .btn-save:hover {
  background: var(--accent-glow); border-color: var(--accent-glow); color: #fff;
}

.wiki-items-list { display: flex; flex-direction: column; gap: 4px; }
.wiki-item-row {
  display: flex; gap: 14px; align-items: center; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  text-decoration: none; color: inherit; transition: all 0.2s; cursor: pointer;
}
.wiki-item-row:hover {
  border-color: var(--border-light); background: var(--bg-card-alt);
  text-decoration: none; color: inherit;
}
.rarity-border-satanic { border-left: 3px solid var(--satanic); }
.rarity-border-angelic { border-left: 3px solid var(--angelic); }
.rarity-border-heroic { border-left: 3px solid var(--heroic); }
.rarity-border-unholy { border-left: 3px solid var(--unholy); }
.rarity-border-set { border-left: 3px solid var(--set-color); }
.rarity-border-unique { border-left: 3px solid var(--legendary); }
.rarity-border-legendary { border-left: 3px solid var(--legendary); }
.rarity-border-normal { border-left: 3px solid var(--border); }
.rarity-border-mythic { border-left: 3px solid var(--heroic); }
.rarity-border-rare { border-left: 3px solid var(--gold-dim); }
.wir-img-wrap { flex-shrink: 0; }
.wir-img {
  width: 48px; height: 48px; object-fit: contain; border-radius: 6px;
  image-rendering: pixelated; background: var(--bg-deep); border: 1px solid var(--border); padding: 2px;
}
.wir-img-ph {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep); border-radius: 6px; color: var(--text-muted); font-size: 18px;
  border: 1px solid var(--border);
}
.wir-info { flex: 1; min-width: 0; }
.wir-name { display: block; font-weight: 700; font-size: 14px; line-height: 1.2; margin-bottom: 4px; }
.wir-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.wir-rarity, .wir-slot, .wir-handed, .wir-set, .wir-lvl {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--bg-surface);
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  border: 1px solid var(--border);
}
.wir-set { color: var(--set-color); border-color: var(--set-color); }
.rarity-tag-satanic { color: var(--satanic); border-color: var(--satanic); }
.rarity-tag-angelic { color: var(--angelic); border-color: var(--angelic); }
.rarity-tag-heroic { color: var(--heroic); border-color: var(--heroic); }
.rarity-tag-unholy { color: var(--unholy); border-color: var(--unholy); }
.rarity-tag-set { color: var(--set-color); border-color: var(--set-color); }
.rarity-tag-unique { color: var(--legendary); border-color: var(--legendary); }
.rarity-tag-legendary { color: var(--legendary); border-color: var(--legendary); }
.rarity-tag-mythic { color: var(--heroic); border-color: var(--heroic); }
.rarity-tag-rare { color: var(--gold-dim); border-color: var(--gold-dim); }
.wir-stats { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; text-align: right; max-width: 260px; }
.wir-stat { font-size: 11px; color: var(--gold); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wir-stat-more { font-size: 10px; color: var(--text-muted); font-style: italic; }
.wir-arrow { color: var(--text-muted); font-size: 14px; flex-shrink: 0; opacity: 0.4; transition: opacity 0.2s; }
.wiki-item-row:hover .wir-arrow { opacity: 1; }

/* ─── Wiki Results Bar ─── */
.wiki-results-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 12px; color: var(--text-muted);
}
.wiki-count { font-weight: 600; }
.wiki-page-info { color: var(--text2); }

/* ─── Wiki Pager ─── */
.wiki-pager {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; padding: 12px 0;
}
.wiki-pager-pages { display: flex; gap: 4px; align-items: center; }
.wiki-pager-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card);
  color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.wiki-pager-btn:hover { border-color: var(--gold-dim); color: var(--text); }
.wiki-pager-btn.active {
  background: var(--gold-dim); color: var(--bg-deep); border-color: var(--gold-dim); font-weight: 700;
}
.wiki-pager-dots { color: var(--text-muted); font-size: 14px; padding: 0 4px; }

/* ═══════════════════════════════════════════
   WIKI: ITEM DETAIL PAGE
   ═══════════════════════════════════════════ */
.wip-hero {
  display: flex; gap: 24px; padding: 24px; margin-bottom: 24px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  position: relative; overflow: hidden;
}
.wip-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: 12px; opacity: 0.08;
}
.rarity-glow-satanic { box-shadow: 0 0 30px rgba(180,30,30,0.15); border-color: var(--satanic); }
.rarity-glow-satanic::before { background: linear-gradient(135deg, var(--satanic), transparent 60%); }
.rarity-glow-angelic { box-shadow: 0 0 30px rgba(255,215,0,0.12); border-color: var(--angelic); }
.rarity-glow-angelic::before { background: linear-gradient(135deg, var(--angelic), transparent 60%); }
.rarity-glow-heroic { box-shadow: 0 0 30px rgba(100,180,255,0.12); border-color: var(--heroic); }
.rarity-glow-heroic::before { background: linear-gradient(135deg, var(--heroic), transparent 60%); }
.rarity-glow-unholy { box-shadow: 0 0 30px rgba(160,50,200,0.12); border-color: var(--unholy); }
.rarity-glow-unholy::before { background: linear-gradient(135deg, var(--unholy), transparent 60%); }
.rarity-glow-set { box-shadow: 0 0 30px rgba(50,200,50,0.12); border-color: var(--set-color); }
.rarity-glow-set::before { background: linear-gradient(135deg, var(--set-color), transparent 60%); }
.rarity-glow-unique { box-shadow: 0 0 30px rgba(232,195,90,0.12); border-color: var(--legendary); }
.rarity-glow-unique::before { background: linear-gradient(135deg, var(--legendary), transparent 60%); }
.rarity-glow-legendary { box-shadow: 0 0 30px rgba(232,195,90,0.12); border-color: var(--legendary); }
.rarity-glow-legendary::before { background: linear-gradient(135deg, var(--legendary), transparent 60%); }
.rarity-glow-normal { }
.wip-hero-img-wrap { flex-shrink: 0; }
.wip-hero-img {
  width: 160px; height: 160px; object-fit: contain; image-rendering: pixelated;
  border-radius: 10px; background: var(--bg-deep); border: 2px solid var(--border); padding: 8px;
}
.wip-hero-img-ph {
  width: 160px; height: 160px; display: flex; align-items: center; justify-content: center;
  font-size: 48px; border-radius: 10px; background: var(--bg-deep); border: 2px solid var(--border);
}
.wip-hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wip-name { font-size: 28px; font-weight: 800; font-family: var(--font-sc); margin: 0; line-height: 1.2; }
.wip-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.wip-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--bg-surface);
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  border: 1px solid var(--border);
}
.wip-tier { color: var(--gold); border-color: var(--gold-dim); }
.wip-sockets { color: var(--cold); border-color: rgba(100,180,255,0.3); }
.wip-restrict { font-size: 12px; color: var(--gold); margin-top: 4px; }
.wip-set-name { font-size: 13px; margin-top: 2px; }
.wip-dmg { display: inline-flex; gap: 6px; align-items: baseline; font-size: 13px; margin-top: 2px; }
.wip-dmg-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.wip-dmg-val { font-weight: 700; color: var(--text); font-size: 16px; }
.wip-edit-btn { margin-top: auto; align-self: flex-start; }

.wip-section {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px; margin-bottom: 16px;
}
.wip-section-title {
  font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 12px;
  font-family: var(--font-sc); text-transform: uppercase; letter-spacing: 0.5px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
/* ── Item Stats (in-game tooltip style) ── */
.wis-section { overflow: visible; }
.wis-list { display: flex; flex-direction: column; }
.wis-line {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; position: relative;
}
.wis-line + .wis-line { border-top: 1px solid rgba(255,255,255,0.04); }
.wis-line:hover { background: rgba(232,195,90,0.04); border-radius: 4px; }
.wis-text {
  font-size: 14px; color: var(--gold); flex: 1;
  line-height: 1.5; letter-spacing: 0.1px;
}
.wis-v { color: #fff; font-weight: 700; }
.wis-has-info { cursor: pointer; }
.wis-info-dot {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; font-style: italic;
  color: var(--text-muted); border: 1px solid var(--border);
  opacity: 0.25; transition: all 0.2s;
}
.wis-line:hover .wis-info-dot { opacity: 1; color: var(--gold); border-color: var(--gold-dim); background: rgba(232,195,90,0.08); }
.wis-desc-popup {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--bg-deep); color: var(--text-dim); font-size: 12px; line-height: 1.6;
  padding: 10px 14px; border-radius: 6px; border: 1px solid var(--gold-dim);
  box-shadow: 0 6px 24px rgba(0,0,0,0.6); margin-top: 2px;
  animation: wisPopIn 0.15s ease;
}
@keyframes wisPopIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
/* Flag stats divider */
.wis-flags { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; }
/* Flag stats */
.wis-flag {
  cursor: pointer; border-left: 3px solid var(--unholy);
  background: rgba(205,55,105,0.04); margin: 2px 0; border-radius: 0 4px 4px 0;
}
.wis-flag:hover { background: rgba(205,55,105,0.08); }
.wis-flag-icon { font-size: 14px; flex-shrink: 0; }
.wis-flag-text { font-size: 14px; flex: 1; }
.wis-flag-info {
  font-size: 12px; color: var(--text-muted); flex-shrink: 0;
  opacity: 0.4; transition: opacity 0.2s;
}
.wis-flag:hover .wis-flag-info { opacity: 1; }
.wis-flag-popup {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: wisPopIn 0.2s ease;
}
.wis-flag-popup-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.wis-flag-popup-desc { font-size: 12px; color: var(--text-dim); margin: 0 0 8px; line-height: 1.5; }
.wis-flag-popup-list {
  margin: 0; padding: 0 0 0 16px; font-size: 11px; color: var(--gold);
  columns: 2; column-gap: 16px; line-height: 1.8;
}
.wis-flag-popup-note {
  font-size: 11px; color: var(--text-muted); font-style: italic;
  margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--border);
}

/* Note bar */
.wip-note {
  font-size: 12px; color: var(--gold); padding: 4px 10px;
  background: rgba(232,195,90,0.08); border-radius: 4px; margin-top: 4px;
}

/* Base stats row (damage/defense/aps) */
.wip-base-stats-row {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px;
}
.wip-base-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 14px; background: var(--bg-surface); border-radius: 6px;
  border: 1px solid var(--border);
}
.wip-base-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted);
}
.wip-base-val { font-size: 18px; font-weight: 800; color: var(--text); }

/* Meta bar (version, drop rate, source) */
.wip-meta-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.wip-meta-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 4px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── Special Effects (cast procs, granted auras) ── */
.wip-effects-section { }
.wip-effect-cast, .wip-effect-grant {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; background: rgba(232,195,90,0.06);
  border-left: 3px solid var(--gold-dim); border-radius: 6px;
}
.wip-effect-chance {
  font-weight: 800; font-size: 15px; color: var(--gold);
  background: rgba(232,195,90,0.12); padding: 2px 8px; border-radius: 4px;
}
.wip-effect-trigger {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); background: var(--bg-deep); padding: 2px 8px; border-radius: 4px;
}
.wip-effect-spell { font-size: 13px; color: var(--text-dim); }
.wip-effect-spell strong { color: var(--cold); font-weight: 700; }
.wip-effect-level {
  font-size: 11px; color: var(--text-muted); margin-left: auto;
  background: var(--bg-deep); padding: 2px 8px; border-radius: 4px;
}
.wip-effect-grant-type {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); background: rgba(100,180,255,0.1); padding: 2px 8px; border-radius: 4px;
}

/* ── Patch History ── */
.wip-history { display: flex; flex-direction: column; gap: 12px; }
.wip-history-entry {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.wip-history-header {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 14px; background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.wip-history-ver {
  font-weight: 800; font-size: 13px; color: var(--cold);
  background: rgba(100,180,255,0.1); padding: 2px 10px; border-radius: 4px;
}
.wip-history-from { font-size: 11px; color: var(--text-muted); }
.wip-history-changes { padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; }
.wip-hc {
  display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.5;
  padding: 3px 6px; border-radius: 4px;
}
.wip-hc-icon { font-weight: 800; font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }
.wip-hc-add { color: #4caf50; background: rgba(76,175,80,0.06); }
.wip-hc-add .wip-hc-icon { color: #4caf50; }
.wip-hc-rem { color: #ef5350; background: rgba(239,83,80,0.06); text-decoration: line-through; opacity: 0.7; }
.wip-hc-rem .wip-hc-icon { color: #ef5350; }
.wip-hc-chg { color: var(--gold); background: rgba(232,195,90,0.04); }
.wip-hc-chg .wip-hc-icon { color: var(--gold); }
.wip-hc-new { color: var(--gold); }
.wip-hc-was {
  font-size: 10px; color: var(--text-muted); font-style: italic;
  margin-left: auto; flex-shrink: 0;
}

.wip-abilities { display: flex; flex-direction: column; gap: 10px; }
.wip-ability {
  padding: 12px; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 8px; border-left: 3px solid var(--cold);
}
.wip-ability-header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.wip-ability-chance {
  font-weight: 800; font-size: 14px; color: var(--gold);
  background: rgba(232,195,90,0.1); padding: 2px 8px; border-radius: 4px;
}
.wip-ability-trigger {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); background: var(--bg-deep); padding: 2px 6px; border-radius: 4px;
}
.wip-ability-name { font-weight: 700; font-size: 14px; color: var(--cold); }
.wip-ability-level { font-size: 11px; color: var(--text-muted); }
.wip-ability-stats { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-dim); }
.wip-ability-stats span { padding-left: 12px; }

.wip-effects { display: flex; flex-direction: column; gap: 4px; }
.wip-effect {
  font-size: 13px; color: var(--gold); padding: 8px 12px;
  background: rgba(232,195,90,0.05); border-radius: 6px;
  border-left: 2px solid var(--gold-dim);
}

.wip-lore-section { border-left: 3px solid var(--text-muted); }
.wip-lore { font-size: 13px; color: var(--text-muted); font-style: italic; line-height: 1.6; margin: 0; }

.wip-detail-row { display: flex; gap: 12px; align-items: center; font-size: 13px; padding: 4px 0; }
.wip-detail-label {
  color: var(--text-muted); min-width: 120px; text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.5px;
}

.wip-trans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.wip-trans-row {
  display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-dim);
  padding: 4px 8px; background: var(--bg-surface); border-radius: 4px;
}
.wip-trans-flag { font-size: 16px; }

.wip-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.wip-related-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px;
  text-decoration: none; color: inherit; transition: all 0.2s; text-align: center;
}
.wip-related-card:hover {
  border-color: var(--border-light); transform: translateY(-2px);
  text-decoration: none; color: inherit;
}
.wip-related-img {
  width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; border-radius: 6px;
}
.wip-related-ph {
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--bg-deep); border-radius: 6px;
}
.wip-related-name { font-weight: 600; font-size: 12px; line-height: 1.3; }
.wip-related-slot { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }

.wiki-item-notfound { text-align: center; padding: 60px 20px; }
.wiki-item-notfound h2 { color: var(--text); margin-bottom: 12px; }
.wiki-item-notfound p { color: var(--text-muted); margin-bottom: 20px; }

/* ═══════════════════════════════════════════
   WIKI: ITEM EDIT FORM
   ═══════════════════════════════════════════ */
.wie-modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  width: 700px; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.wie-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.wie-header h2 { margin: 0; font-size: 16px; font-weight: 700; }
.wie-header-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; display: block; }
.wie-body { padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; }
.wie-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  padding: 0 20px; background: var(--bg-surface);
}
.wie-tab {
  padding: 10px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; background: none; color: var(--text-muted);
  border-bottom: 2px solid transparent; transition: all .2s;
}
.wie-tab:hover { color: var(--text); }
.wie-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.wie-tab-count {
  font-size: 10px; background: var(--accent); color: var(--bg);
  padding: 1px 6px; border-radius: 8px; margin-left: 4px; font-weight: 700;
}
.wie-tab-content { display: none; padding: 20px; }
.wie-tab-content.active { display: block; }
.wie-footer-section {
  padding: 16px 20px; border-top: 1px solid var(--border);
  background: var(--bg-surface); margin-top: auto;
}
.wie-info {
  font-size: 12px; color: var(--text-muted); margin-bottom: 16px; padding: 10px;
  background: rgba(232,195,90,0.06); border-radius: 6px; border: 1px solid rgba(232,195,90,0.12);
}
.wie-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.wie-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.wie-field { display: flex; flex-direction: column; gap: 4px; }
.wie-field label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.wie-section { margin-bottom: 14px; }
.wie-section label {
  display: block; font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.wie-hint { font-weight: 400; color: var(--text2); text-transform: none; letter-spacing: 0; }
.wie-textarea {
  width: 100%; resize: vertical; min-height: 60px; box-sizing: border-box;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); padding: 10px 12px; font-size: 13px; line-height: 1.5;
  font-family: inherit; transition: border-color 0.2s;
}
.wie-textarea:focus {
  border-color: var(--gold-dim); outline: none;
  box-shadow: 0 0 0 2px rgba(232,195,90,0.1);
}
.wie-textarea::placeholder { color: var(--text-muted); }
.wie-stats-list { display: flex; flex-direction: column; gap: 6px; }
.wie-stat-row {
  display: flex; gap: 6px; align-items: center;
}
.wie-stat-num {
  font-size: 10px; color: var(--text-muted); width: 18px; text-align: center;
  font-weight: 600; flex-shrink: 0;
}
.wie-stat-text { flex: 1; }
.wie-stat-remove {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 14px; padding: 4px 6px; border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.wie-stat-remove:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }
.wie-stat-help {
  background: rgba(100,180,255,0.05); border: 1px solid rgba(100,180,255,0.1);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 12px;
  color: var(--text-dim); line-height: 1.6;
}
.wie-stat-help p { margin: 0 0 6px; }
.wie-stat-help strong { color: var(--text); }
.wie-stat-examples {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0;
}
.wie-stat-examples code {
  background: var(--bg-surface); padding: 3px 8px; border-radius: 4px;
  font-size: 11px; color: #2ecc71; border: 1px solid var(--border);
}
.wie-add-stat-btn {
  margin-top: 8px; width: 100%; text-align: center; padding: 8px;
  border: 1px dashed var(--border); background: none; color: var(--text-muted);
  border-radius: 6px; cursor: pointer; transition: all .2s;
}
.wie-add-stat-btn:hover {
  border-color: var(--gold-dim); color: var(--gold); background: rgba(232,195,90,0.04);
}
.wie-error {
  color: #e74c3c; font-size: 12px; padding: 8px 12px;
  background: rgba(231,76,60,0.1); border-radius: 6px; margin-bottom: 12px;
}
.wie-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 12px;
}

/* ═══════════════════════════════════════════
   WIKI: CLASSES
   ═══════════════════════════════════════════ */
.wiki-classes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.wiki-class-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; transition: all 0.2s;
}
.wiki-class-card:hover { border-color: var(--border-light); }
.wiki-class-card.expanded { border-color: var(--cold); box-shadow: 0 0 0 1px rgba(100,180,255,0.15); }
.wiki-class-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; cursor: pointer; transition: background 0.15s;
}
.wiki-class-header:hover { background: var(--bg-surface); }
.wcc-left { display: flex; flex-direction: column; gap: 6px; }
.wcc-right { display: flex; align-items: center; gap: 12px; }
.wiki-class-name { font-weight: 700; font-size: 16px; font-family: var(--font-sc); color: var(--text); }
.wiki-class-specs { display: flex; gap: 6px; flex-wrap: wrap; }
.wiki-spec-badge {
  padding: 2px 10px; border-radius: 12px; font-size: 10px; font-weight: 600;
  border: 1px solid; background: rgba(0,0,0,0.2);
}
.wiki-class-counts { display: flex; gap: 6px; }
.wcc-count-active {
  font-size: 11px; color: #4ade80; background: rgba(74,222,128,0.1);
  padding: 2px 8px; border-radius: 10px;
}
.wcc-count-passive {
  font-size: 11px; color: #60a5fa; background: rgba(96,165,250,0.1);
  padding: 2px 8px; border-radius: 10px;
}
.wcc-count-total {
  font-size: 11px; color: var(--text-muted); background: var(--bg-surface);
  padding: 2px 8px; border-radius: 10px;
}
.wcc-toggle { color: var(--text-muted); font-size: 12px; transition: transform 0.2s; }

.wiki-class-talents-full { padding: 0 18px 18px; }
.wct-group { margin-bottom: 16px; }
.wct-group:last-child { margin-bottom: 0; }
.wct-group-title {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.wct-group-count { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.wct-talent-list { display: flex; flex-direction: column; gap: 2px; }
.wct-talent {
  padding: 8px 12px; background: var(--bg-surface); border-radius: 6px;
  border: 1px solid transparent; transition: all 0.15s;
}
.wct-talent:hover { border-color: var(--border); background: var(--bg-card-alt); }
.wct-talent-head { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.wct-talent-name { font-weight: 600; font-size: 13px; color: var(--text); }
.wct-talent-type {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
.wct-active { color: #4ade80; background: rgba(74,222,128,0.1); }
.wct-passive { color: #60a5fa; background: rgba(96,165,250,0.1); }
.wct-talent-maxlvl { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.wct-talent-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.wiki-class-preview { padding: 0 18px 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.wcp-talent {
  font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--bg-surface);
  color: var(--text-dim); border: 1px solid var(--border);
}
.wcp-more { font-size: 10px; color: var(--gold-dim); font-style: italic; padding: 2px 4px; }

/* ─── Wiki Proposals ─── */
.proposals-list { display: flex; flex-direction: column; gap: 12px; }
.proposal-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; transition: border-color .15s;
}
.proposal-card:hover { border-color: var(--gold-dim); }
.proposal-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.proposal-status { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.proposal-date { font-size: 11px; color: var(--text-muted); }
.proposal-card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.proposal-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.proposal-card-meta span {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: var(--bg-deeper); color: var(--text2); border: 1px solid var(--border);
}
.proposal-card-desc { font-size: 13px; color: var(--text2); line-height: 1.5; margin-top: 4px; }
.proposal-admin-note {
  font-size: 12px; color: var(--gold-dim); margin-top: 8px; padding: 8px 10px;
  background: rgba(232,195,90,.06); border-radius: 6px; border: 1px solid rgba(232,195,90,.15);
}

/* ═══════════════════════════════════════════
   FLOATING FEEDBACK BUTTON + PANEL
   ═══════════════════════════════════════════ */
.fb-fab {
  position: fixed; bottom: 24px; left: 24px; z-index: 9001;
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, #8b5cf6) 100%);
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 4px 20px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06) inset;
  transition: transform .2s, box-shadow .2s, border-radius .2s;
}
.fb-fab:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08) inset; border-radius: 16px; }
.fb-fab:active { transform: translateY(0) scale(.96); }
.fb-fab .fb-fab-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  box-shadow: 0 2px 6px rgba(239,68,68,.4);
  animation: fb-badge-pop .3s ease;
}
@keyframes fb-badge-pop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

.fb-panel {
  position: fixed; bottom: 84px; left: 24px; z-index: 9001;
  width: 360px; max-height: 500px; background: var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--border) 80%, var(--accent) 20%);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03) inset;
  display: none; flex-direction: column; overflow: hidden;
  animation: fb-panel-slide .25s ease;
}
@keyframes fb-panel-slide { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fb-panel.open { display: flex; }
.fb-panel-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--bg-surface)) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
}
.fb-panel-header h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.fb-panel-close {
  background: none; border: none; color: var(--text2); cursor: pointer; font-size: 16px; padding: 4px;
  border-radius: 6px; transition: background .15s, color .15s; line-height: 1;
}
.fb-panel-close:hover { background: var(--bg-hover); color: var(--text); }
.fb-panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.fb-panel-footer { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg-surface); }

.fb-menu-btn {
  width: 100%; padding: 12px 14px; margin-bottom: 8px; border-radius: 10px;
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; font-size: 13px; font-weight: 600; text-align: left;
  display: flex; align-items: center; gap: 10px;
  transition: border-color .15s, background .15s, transform .1s;
}
.fb-menu-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface)); }
.fb-menu-btn:active { transform: scale(.98); }
.fb-menu-btn .fb-menu-icon {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.fb-menu-btn .fb-menu-icon.new { background: linear-gradient(135deg, rgba(52,152,219,.15), rgba(52,152,219,.05)); }
.fb-menu-btn .fb-menu-icon.list { background: linear-gradient(135deg, rgba(241,196,15,.15), rgba(241,196,15,.05)); }
.fb-menu-btn .fb-menu-text { display: flex; flex-direction: column; gap: 1px; }
.fb-menu-btn .fb-menu-text span:first-child { font-weight: 600; font-size: 13px; }
.fb-menu-btn .fb-menu-text span:last-child { font-weight: 400; font-size: 11px; color: var(--text2); }

.fb-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.fb-tab {
  flex: 1; padding: 8px; text-align: center; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text2); background: none; border: none; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.fb-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.fb-thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.fb-msg { padding: 10px 12px; border-radius: 10px; font-size: 13px; max-width: 85%; word-break: break-word; line-height: 1.45; }
.fb-msg.user { background: var(--bg-hover); align-self: flex-start; border: 1px solid var(--border); }
.fb-msg.admin { background: rgba(61,188,90,.08); align-self: flex-end; border: 1px solid rgba(61,188,90,.15); }
.fb-msg-meta { font-size: 10px; color: var(--text2); margin-top: 4px; }
.fb-msg-input { display: flex; gap: 6px; }
.fb-msg-input input {
  flex: 1; padding: 9px 12px; border-radius: 8px; background: var(--panel);
  border: 1px solid var(--border); color: var(--text); font-size: 13px;
  transition: border-color .15s;
}
.fb-msg-input input:focus { border-color: var(--accent); outline: none; }
.fb-msg-input button {
  padding: 9px 16px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 80%, #8b5cf6) 100%);
  color: #fff; border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: opacity .15s;
}
.fb-msg-input button:hover { opacity: .9; }

.fb-item {
  padding: 10px 12px; border-radius: 10px; background: var(--bg-surface); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 6px;
}
.fb-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface)); }
.fb-item-subject { font-weight: 600; font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.fb-item-meta { font-size: 11px; color: var(--text2); display: flex; gap: 8px; }
.fb-item-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.fb-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 50%, transparent); }

@media (max-width: 480px) {
  .fb-panel { right: 8px; left: 8px; width: auto; bottom: 76px; border-radius: 14px; }
  .fb-fab { bottom: 16px; left: 16px; width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
}

/* ═══════════════════════════════════════════
   WIKI: SETS
   ═══════════════════════════════════════════ */
.wiki-sets-list { display: flex; flex-direction: column; gap: 8px; }
.wiki-set-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; transition: border-color 0.15s;
}
.wiki-set-card:hover { border-color: var(--set-color); }
.wiki-set-card.wsc-expanded { border-color: var(--set-color); }
.wiki-set-header { cursor: pointer; }
.wiki-set-header:hover { background: rgba(255,255,255,0.02); }

/* ═══════════════════════════════════════════
   WIKI: RELICS
   ═══════════════════════════════════════════ */
.wiki-relic-group { margin-bottom: 28px; }
.wiki-relic-cat {
  font-size: 15px; margin-bottom: 12px; color: var(--gold);
  font-weight: 700; font-family: var(--font-sc);
  border-bottom: 2px solid var(--border); padding-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.wiki-relic-cat::before { content: '\25C6'; font-size: 10px; color: var(--gold-dim); }
.wiki-cat-count { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.wiki-relic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.wiki-relic-card {
  display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  transition: all 0.2s;
}
.wiki-relic-card:hover { border-color: var(--gold-dim); background: var(--bg-card-alt); }
.wrc-icon-wrap { flex-shrink: 0; }
.wrc-icon {
  width: 44px; height: 44px; object-fit: contain;
  image-rendering: pixelated; border-radius: 6px;
  background: var(--bg-deep); border: 1px solid var(--border); padding: 3px;
}
.wrc-icon-ph {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; border-radius: 6px; background: var(--bg-deep); border: 1px solid var(--border);
}
.wrc-body { min-width: 0; flex: 1; }
.wrc-name { display: block; font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 3px; }
.wrc-desc { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ═══════════════════════════════════════════
   WIKI: AUGMENTS
   ═══════════════════════════════════════════ */
.wiki-aug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.wiki-aug-card {
  display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; transition: all 0.2s;
}
.wiki-aug-card:hover { border-color: var(--cold); background: var(--bg-card-alt); }
.wac-icon {
  font-size: 22px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--bg-deep); border-radius: 8px; border: 1px solid var(--border);
}
.wac-body { min-width: 0; flex: 1; }
.wac-name { display: block; font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 3px; }
.wac-desc { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ═══════════════════════════════════════════
   WIKI: AFFIXES
   ═══════════════════════════════════════════ */
.wiki-affix-group { margin-bottom: 24px; }
.wiki-affix-cat {
  font-size: 14px; color: var(--gold); font-weight: 700; font-family: var(--font-sc);
  margin-bottom: 10px; border-bottom: 2px solid var(--border); padding-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.wiki-affix-table { display: flex; flex-direction: column; gap: 2px; }
.wiki-affix-row {
  display: flex; gap: 10px; align-items: center;
  padding: 7px 14px; font-size: 12px; color: var(--text-dim);
  background: var(--bg-card); border-radius: 4px; border: 1px solid transparent;
  transition: all 0.15s;
}
.wiki-affix-row:hover { background: var(--bg-card-alt); color: var(--text); border-color: var(--border); }
.waf-num {
  font-size: 10px; color: var(--text2); min-width: 24px; text-align: right;
  font-weight: 600; flex-shrink: 0;
}
.waf-text { line-height: 1.4; flex: 1; }

/* ═══════════════════════════════════════════
   WIKI: MERCENARIES
   ═══════════════════════════════════════════ */
.wiki-mercs-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.wiki-merc-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; transition: all 0.2s; overflow: hidden;
}
.wiki-merc-card:hover { border-color: var(--border-light); }
.wmc-header { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.wmc-icon { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.wmc-title { display: flex; flex-direction: column; }
.wmc-name { font-weight: 700; font-size: 18px; font-family: var(--font-sc); color: var(--merc-color, var(--text)); }
.wmc-role { font-size: 12px; color: var(--text-muted); }
.wmc-stats-bar { display: flex; gap: 16px; margin-bottom: 14px; }
.wmc-stat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.wmc-stat-num { font-weight: 700; color: var(--merc-color, var(--gold)); font-size: 14px; margin-right: 4px; }
.wmc-equip {
  font-size: 12px; color: var(--text-dim); margin-bottom: 14px;
  padding: 8px 12px; background: var(--bg-surface); border-radius: 6px;
  border: 1px solid var(--border);
}
.wmc-section { margin-bottom: 16px; }
.wmc-section:last-child { margin-bottom: 0; }
.wmc-section-title {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px;
  font-family: var(--font-sc); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.wmc-talent-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px;
}
.wmc-talent {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.wmc-talent-icon {
  width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated;
  border-radius: 6px; border: 2px solid var(--border);
  background: var(--bg-deep); padding: 2px; transition: all 0.2s;
}
.wmc-talent:hover .wmc-talent-icon {
  border-color: var(--merc-color, var(--gold-dim)); box-shadow: 0 0 8px rgba(232,195,90,0.25);
}
.wmc-talent-name {
  font-size: 9px; color: var(--text-muted); line-height: 1.2;
  max-width: 65px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wmc-talent-details { display: flex; flex-direction: column; gap: 4px; }
.wmc-td-row {
  display: flex; gap: 10px; align-items: center; padding: 8px 12px;
  background: var(--bg-surface); border-radius: 6px; border: 1px solid var(--border);
  transition: all 0.15s;
}
.wmc-td-row:hover { border-color: var(--border-light); }
.wmc-td-icon {
  width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated;
  border-radius: 4px; flex-shrink: 0; background: var(--bg-deep); border: 1px solid var(--border);
}
.wmc-td-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.wmc-td-head { display: flex; gap: 8px; align-items: center; }
.wmc-td-name { font-weight: 700; font-size: 12px; color: var(--text); }
.wmc-td-type {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 1px 6px; border-radius: 4px; width: fit-content;
}
.wmc-td-active { color: #4ade80; background: rgba(74,222,128,0.1); }
.wmc-td-passive { color: #60a5fa; background: rgba(96,165,250,0.1); }
.wmc-td-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ─── GENERIC MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--bg-card, #1a1a2e); border: 1px solid var(--border, #333);
  border-radius: 12px; padding: 0; max-width: 90vw; width: 480px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border, #333);
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close {
  background: none; border: none; color: var(--text-muted, #888);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.modal-close:hover { color: var(--text, #fff); background: rgba(255,255,255,0.1); }
.modal-body { padding: 20px; }

/* ─── Wiki Responsive ─── */
@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: 1fr; gap: 0; }
  .wiki-sidebar {
    position: static; border-radius: 0;
    border-left: none; border-right: none; border-top: none;
    padding: 8px 0; margin-bottom: 16px;
  }
  .wiki-sidebar-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding: 0 12px; }
  .wiki-sidebar-link { white-space: nowrap; padding: 6px 10px; font-size: 12px; }
  .wiki-sidebar-header { display: none; }
  .wiki-grid { grid-template-columns: 1fr; }
  .wiki-relic-grid { grid-template-columns: 1fr; }
  .wiki-classes-grid { grid-template-columns: 1fr; }
  .wiki-aug-grid { grid-template-columns: 1fr; }
  .wiki-merc-talent-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .wip-hero { flex-direction: column; align-items: center; text-align: center; }
  .wip-hero-info { align-items: center; }
  .wip-badges { justify-content: center; }
  .wip-edit-btn { align-self: center; }
  .wip-related-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .wie-grid { grid-template-columns: 1fr; }
  .wir-stats { display: none; }
  .wsk-grid { grid-template-columns: 1fr !important; }
  .wiki-dice-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════
   WIKI: SKILLS
   ═══════════════════════════════════════════════════════════ */
.wsk-summary {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px;
}
.wsk-sum-chip {
  background: var(--bg-card-alt); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 10px; font-size: 12px; color: var(--text-dim);
}
.wsk-sum-chip strong { color: var(--gold); }
.wsk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.wsk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.wsk-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(52,152,219,0.12);
}
.wsk-header {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.wsk-type-icon { font-size: 14px; }
.wsk-name { font-weight: 600; color: var(--text); font-size: 14px; }
.wsk-sub { font-size: 12px; cursor: help; }
.wsk-class {
  margin-left: auto; font-size: 11px; color: var(--text-dim);
  background: var(--bg-card-alt); padding: 1px 6px; border-radius: 4px;
}
.wsk-elems {
  margin-top: 3px; font-size: 12px; font-weight: 600;
}
.wsk-elem { margin-right: 4px; }
.wsk-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  margin-top: 4px; font-size: 11px; color: var(--text-dim);
}
.wsk-meta-item { white-space: nowrap; }
.wsk-meta-val { color: #8ba4d0; font-weight: 600; }
.wsk-meta-sep { color: var(--border); margin: 0 3px; }
.wsk-desc {
  margin-top: 6px; font-size: 12px; color: var(--gold-dim);
  line-height: 1.4; font-style: italic;
}
.wsk-tags {
  display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px;
}
.wsk-tag {
  background: var(--bg-card-alt); color: var(--text-dim);
  padding: 1px 6px; border-radius: 3px; font-size: 10px;
  border: 1px solid var(--border);
}
.wsk-bonuses {
  margin-top: 6px; padding-left: 4px;
  border-left: 2px solid rgba(110,241,126,0.25);
}
.wsk-bonus {
  font-size: 11px; color: #6ef17e; font-weight: 600;
  padding: 1px 0 1px 6px; line-height: 1.4;
}
.wsk-bonus-per { color: #8ba4d0; font-weight: 400; font-size: 10px; }
.wsk-synergy {
  margin-top: 5px; font-size: 11px; color: var(--text-dim); line-height: 1.4;
}
.wsk-syn-label { color: var(--gold-dim); font-weight: 600; }
.wsk-syn-item {
  display: inline-block; margin-right: 6px;
  background: var(--bg-card-alt); padding: 0 4px; border-radius: 3px;
  font-size: 10px; color: #a8c4e0;
}
.wsk-items {
  margin-top: 5px; font-size: 11px; color: var(--text-dim); line-height: 1.4;
}
.wsk-items-label { color: var(--gold-dim); font-weight: 600; margin-right: 4px; }
.wsk-item-name { color: var(--legendary); }
.wiki-result-count {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   WIKI: STAT REFERENCE (redesigned)
   ═══════════════════════════════════════════════════════════ */
.wsr-summary {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.wsr-sum-chip {
  font-size: 12px; padding: 5px 12px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim);
}
.wsr-sum-chip strong { color: var(--gold); font-weight: 700; }
.wsr-sum-src { color: var(--text-muted); font-style: italic; }
.wsr-list { display: flex; flex-direction: column; gap: 24px; }
.wsr-group { }
.wsr-cat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 2px solid var(--accent); margin-bottom: 12px;
}
.wsr-cat-name {
  font-size: 16px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.wsr-cat-count {
  font-size: 11px; background: var(--accent); color: var(--bg);
  padding: 2px 8px; border-radius: 10px; font-weight: 700;
}
.wsr-entries {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px;
}
.wsr-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.wsr-card:hover { border-color: var(--accent); box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.wsr-card.wsr-has-desc { border-left: 3px solid var(--gold-dim); }
.wsr-card-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
}
.wsr-name { font-weight: 700; color: var(--text); font-size: 14px; }
.wsr-label {
  font-size: 11px; color: var(--text-muted); background: var(--bg-surface);
  padding: 1px 6px; border-radius: 3px;
}
.wsr-id {
  font-size: 10px; color: var(--text-dim); font-family: monospace;
  background: var(--bg-surface); padding: 1px 6px; border-radius: 3px; margin-left: auto;
}
.wsr-desc {
  font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-top: 6px;
  padding: 8px 10px; background: rgba(232,195,90,0.04); border-radius: 6px;
  border-left: 2px solid var(--gold-dim);
}
.wsr-affixes {
  margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.wsr-aff-label {
  font-size: 11px; color: var(--text-muted); font-weight: 600; margin-right: 2px;
}
.wsr-aff-tag {
  display: inline-block; background: rgba(46,204,113,0.1); color: #2ecc71;
  font-size: 11px; padding: 2px 8px; border-radius: 4px; font-family: monospace;
  border: 1px solid rgba(46,204,113,0.15);
}

/* ═══════════════════════════════════════════════════════════
   WIKI: BASE ITEMS
   ═══════════════════════════════════════════════════════════ */
.wiki-base-group { margin-bottom: 16px; }
.wiki-base-type-header {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.wiki-base-header-row {
  display: grid;
  grid-template-columns: 160px 60px 50px 1fr;
  gap: 8px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wiki-base-row {
  display: grid;
  grid-template-columns: 160px 60px 50px 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 3px;
  font-size: 13px;
  background: var(--bg-card);
  transition: border-color .15s;
}
.wiki-base-row:hover { border-color: var(--accent); }
.wb-name { font-weight: 600; color: var(--text); }
.wb-aps { color: var(--gold-dim); font-weight: 500; text-align: center; }
.wb-hand { color: var(--text-dim); text-align: center; font-size: 12px; }
.wb-tiers { display: flex; flex-wrap: wrap; gap: 4px; }
.wb-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  background: var(--bg-card-alt);
}
.wb-tier-letter { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   WIKI: SATANIC CRYSTAL
   ═══════════════════════════════════════════════════════════ */
.wiki-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: -4px 0 12px 0;
  font-style: italic;
}
.wiki-crystal-group { margin-bottom: 14px; }
.wiki-crystal-cat {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.wiki-crystal-entries { display: flex; flex-direction: column; gap: 3px; }
.wiki-crystal-row {
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  color: var(--text);
  transition: border-color .15s;
}
.wiki-crystal-row:hover { border-color: var(--accent); }
.wiki-crystal-range {
  color: var(--gold-dim);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   WIKI: DICE EFFECTS
   ═══════════════════════════════════════════════════════════ */
.wiki-dice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
}
.wiki-dice-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.wiki-dice-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.wiki-dice-table { display: flex; flex-direction: column; gap: 6px; }
.wiki-dice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.wiki-dice-row:hover { border-color: var(--accent); }
.wiki-dice-negative {
  border-color: #e74c3c44;
  background: rgba(231,76,60,0.05);
}
.wiki-dice-negative:hover { border-color: #e74c3c; }
.wiki-dice-roll {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.wiki-dice-negative .wiki-dice-roll {
  border-color: #e74c3c;
  color: #e74c3c;
}
.wiki-dice-effect {
  font-size: 13px;
  color: var(--gold-dim);
  line-height: 1.3;
}
.wiki-dice-negative .wiki-dice-effect { color: #e74c3c; }

/* ═══════════════════════════════════════════════════════════
   WIKI — Game Data Categories (Runewords, Blood Pact, etc.)
   ═══════════════════════════════════════════════════════════ */

.wiki-filter-input {
  width: 100%; max-width: 400px; padding: 8px 12px; margin-bottom: 16px;
  background: var(--bg-light, #1e1e2e); border: 1px solid var(--border, #333);
  border-radius: 6px; color: var(--text, #ccc); font-size: 14px;
}
.wiki-filter-input:focus { border-color: var(--accent, #f0b232); outline: none; }

/* Runewords */
.wiki-rw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.wiki-rw-card {
  background: var(--bg-light, #1e1e2e); border: 1px solid var(--border, #333);
  border-radius: 8px; padding: 14px; transition: border-color 0.2s;
}
.wiki-rw-card:hover { border-color: var(--accent, #f0b232); }
.wiki-rw-name { font-weight: bold; color: #f0b232; margin-bottom: 6px; font-size: 15px; }
.wiki-rw-lore { color: #999; font-size: 13px; font-style: italic; line-height: 1.4; }

/* Blood Pact */
.wiki-bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wiki-bp-section { background: var(--bg-light, #1e1e2e); border-radius: 8px; padding: 14px; }
.wiki-bp-header { font-size: 16px; margin-bottom: 10px; }
.wiki-bp-bonus { color: #2ecc71; }
.wiki-bp-penalty { color: #e74c3c; }
.wiki-bp-item {
  padding: 8px 10px; margin-bottom: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.03); font-size: 14px; color: var(--text, #ccc);
}
.wiki-bp-item-bonus { border-left: 3px solid #2ecc71; }
.wiki-bp-item-penalty { border-left: 3px solid #e74c3c; }
.wiki-bp-label { flex: 1; }

/* Chaos Tower */
.wiki-ct-sections { display: flex; flex-direction: column; gap: 16px; }
.wiki-ct-section-wrap { background: var(--bg-light, #1e1e2e); border-radius: 8px; border: 1px solid var(--border, #333); }
.wiki-ct-section-title {
  padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 16px; user-select: none;
}
.wiki-ct-section-title:hover { opacity: 0.8; }
.wiki-ct-debuff { color: #e74c3c; }
.wiki-ct-buff { color: #2ecc71; }
.wiki-ct-list { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 14px; }
.wiki-ct-row {
  padding: 10px 12px; border-radius: 6px; background: rgba(255,255,255,0.03);
}
.wiki-ct-row-debuff { border-left: 3px solid #e74c3c; }
.wiki-ct-row-buff { border-left: 3px solid #2ecc71; }
.wiki-ct-top { display: flex; align-items: center; gap: 8px; }
.wiki-ct-name { font-weight: 600; color: var(--text, #ccc); font-size: 14px; }
.wiki-ct-desc { color: #aaa; font-size: 13px; line-height: 1.4; margin-top: 4px; }
.wiki-ct-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wiki-ct-stat {
  display: inline-block; background: rgba(231,76,60,0.15); color: #e74c3c;
  font-size: 12px; padding: 3px 8px; border-radius: 3px; font-weight: 500;
}

/* Enemies */
.wiki-en-cats { display: flex; flex-direction: column; gap: 12px; }
.wiki-en-cat { background: var(--bg-light, #1e1e2e); border-radius: 8px; border: 1px solid var(--border, #333); }
.wiki-en-cat-header {
  padding: 12px 14px; cursor: pointer; font-weight: 600; color: var(--text, #ccc);
  font-size: 15px; user-select: none;
}
.wiki-en-cat-header:hover { color: var(--accent, #f0b232); }
.wiki-en-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px; padding: 0 14px 14px;
}
.wiki-en-item {
  padding: 6px 8px; font-size: 13px; color: #bbb; background: rgba(255,255,255,0.02);
  border-radius: 4px;
}

/* Potions & Shrines */
.wiki-ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wiki-ps-section { background: var(--bg-light, #1e1e2e); border-radius: 8px; padding: 14px; }
.wiki-ps-header { font-size: 16px; margin-bottom: 10px; color: var(--accent, #f0b232); }
.wiki-ps-list { display: flex; flex-direction: column; gap: 8px; }
.wiki-ps-card {
  padding: 10px 12px; background: rgba(255,255,255,0.03); border-radius: 6px;
  border-left: 3px solid var(--accent, #f0b232); text-decoration: none; display: block;
}
.wiki-ps-card--potion { transition: background 0.15s; cursor: pointer; }
.wiki-ps-card--potion:hover { background: rgba(255,255,255,0.07); }
.wiki-ps-card-top { display: flex; align-items: center; gap: 10px; }
.wiki-ps-img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; flex-shrink: 0; }
.wiki-ps-name { font-weight: 600; color: var(--text, #ccc); font-size: 14px; }
.wiki-ps-desc { color: #aaa; font-size: 13px; line-height: 1.4; margin-top: 4px; }
.wiki-ps-effect { margin-top: 6px; padding: 5px 8px; background: rgba(155,89,182,0.1); border-radius: 4px; border: 1px solid rgba(155,89,182,0.2); }
.wiki-ps-effect-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #9b59b6; font-weight: 600; margin-bottom: 2px; }
.wiki-ps-effect-text { font-size: 13px; color: #c39bd3; }
.wiki-ps-stats { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.wiki-ps-stat { font-size: 12px; color: #7eb87e; line-height: 1.3; }
.wiki-ps-affixes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wiki-ps-affix {
  display: inline-block; background: rgba(46,204,113,0.12); color: #2ecc71;
  font-size: 12px; padding: 3px 8px; border-radius: 3px; font-weight: 500;
}

/* Ether Activities */
.wiki-eth-cats { display: flex; flex-direction: column; gap: 10px; }
.wiki-eth-cat { background: var(--bg-light, #1e1e2e); border-radius: 8px; border: 1px solid var(--border, #333); }
.wiki-eth-cat-header {
  padding: 12px 14px; cursor: pointer; font-weight: 600; color: var(--text, #ccc);
  font-size: 15px; user-select: none;
}
.wiki-eth-cat-header:hover { color: #9b59b6; }
.wiki-eth-list { display: flex; flex-direction: column; gap: 4px; padding: 0 14px 14px; }
.wiki-eth-item {
  display: flex; justify-content: space-between; padding: 8px 10px;
  background: rgba(255,255,255,0.03); border-radius: 4px;
}
.wiki-eth-name { font-weight: 600; color: var(--text, #ccc); font-size: 14px; }
.wiki-eth-desc { color: #888; font-size: 13px; }

/* Guild Perks */
.wiki-gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.wiki-gp-card {
  background: var(--bg-light, #1e1e2e); border: 1px solid var(--border, #333);
  border-radius: 8px; padding: 14px; transition: border-color 0.2s;
}
.wiki-gp-card:hover { border-color: var(--accent, #f0b232); }
.wiki-gp-name { font-weight: bold; color: #3498db; font-size: 15px; margin-bottom: 6px; }
.wiki-gp-desc { color: #999; font-size: 13px; line-height: 1.4; }

/* Mercenary Talents (Full) */
.wiki-mf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.wiki-mf-section { background: var(--bg-light, #1e1e2e); border-radius: 8px; padding: 14px; }
.wiki-mf-header { font-size: 16px; margin-bottom: 10px; color: var(--accent, #f0b232); }
.wiki-mf-list { display: flex; flex-direction: column; gap: 6px; }
.wiki-mf-item {
  padding: 10px; background: rgba(255,255,255,0.03); border-radius: 6px;
  border-left: 3px solid var(--accent, #f0b232);
}
.wiki-mf-name { font-weight: bold; color: var(--text, #ccc); font-size: 14px; margin-bottom: 4px; }
.wiki-mf-desc { color: #888; font-size: 13px; line-height: 1.4; }

/* Materials */
.wiki-mat-cats { display: flex; flex-direction: column; gap: 10px; }
.wiki-mat-cat { background: var(--bg-light, #1e1e2e); border-radius: 8px; border: 1px solid var(--border, #333); }
.wiki-mat-cat-header {
  padding: 12px 14px; cursor: pointer; font-weight: 600; color: var(--text, #ccc);
  font-size: 15px; user-select: none;
}
.wiki-mat-cat-header:hover { color: var(--accent, #f0b232); }
.wiki-mat-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px; padding: 0 14px 14px;
}
.wiki-mat-item {
  padding: 6px 8px; font-size: 13px; color: #bbb; background: rgba(255,255,255,0.02);
  border-radius: 4px; display: flex; flex-direction: column; gap: 2px;
}
.wiki-mat-desc { color: #777; font-size: 12px; }

/* Satanic Effects */
.wiki-sat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wiki-sat-section { background: var(--bg-light, #1e1e2e); border-radius: 8px; padding: 14px; }
.wiki-sat-header { font-size: 16px; margin-bottom: 10px; }
.wiki-sat-buff-h { color: #2ecc71; }
.wiki-sat-debuff-h { color: #e74c3c; }
.wiki-sat-list { display: flex; flex-direction: column; gap: 4px; }
.wiki-sat-item {
  display: flex; justify-content: space-between; padding: 8px 10px;
  background: rgba(255,255,255,0.03); border-radius: 4px;
}
.wiki-sat-item-buff { border-left: 3px solid #2ecc71; }
.wiki-sat-item-debuff { border-left: 3px solid #e74c3c; }
.wiki-sat-name { font-weight: 600; color: var(--text, #ccc); font-size: 14px; }
.wiki-sat-desc { color: #888; font-size: 13px; }

/* Zones */
.wiki-zone-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.wiki-zone-act { background: var(--bg-light, #1e1e2e); border-radius: 8px; padding: 14px; }
.wiki-zone-act-header { font-size: 16px; margin-bottom: 10px; color: var(--accent, #f0b232); }
.wiki-zone-list { display: flex; flex-direction: column; gap: 4px; }
.wiki-zone-item {
  padding: 6px 10px; font-size: 13px; color: #bbb; background: rgba(255,255,255,0.02);
  border-radius: 4px; border-left: 3px solid #3498db;
}

/* Affixes (prefix/suffix) */
.wiki-afx-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.wiki-afx-tab {
  padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border, #333);
  background: var(--bg-light, #1e1e2e); color: var(--text, #ccc); cursor: pointer;
  font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.wiki-afx-tab.active { background: var(--accent, #f0b232); color: #111; border-color: var(--accent, #f0b232); }
.wiki-afx-wrap { display: flex; flex-direction: column; gap: 16px; }
.wiki-afx-section-h { font-size: 18px; color: var(--accent, #f0b232); margin-bottom: 10px; }
.wiki-afx-group { background: var(--bg-light, #1e1e2e); border-radius: 8px; border: 1px solid var(--border, #333); margin-bottom: 6px; }
.wiki-afx-group-h { padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--text, #ccc); font-size: 14px; }
.wiki-afx-group-h:hover { color: var(--accent, #f0b232); }
.wiki-afx-tiers { padding: 0 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.wiki-afx-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-radius: 4px; background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--tier-color, #3498db);
}
.wiki-afx-name { font-weight: 600; color: var(--text, #ccc); font-size: 13px; min-width: 120px; }
.wiki-afx-effect { color: #2ecc71; font-size: 13px; font-family: monospace; }

/* (stat-label/aff-badge moved to .wsr-* rules above) */

/* Responsive */
@media (max-width: 768px) {
  .wiki-bp-grid, .wiki-sat-grid, .wiki-ps-grid { grid-template-columns: 1fr; }
  .wiki-rw-grid, .wiki-gp-grid, .wiki-zone-acts { grid-template-columns: 1fr; }
  .wiki-mf-grid { grid-template-columns: 1fr; }
  .wsr-entries { grid-template-columns: 1fr; }
  .wie-grid, .wie-grid-3 { grid-template-columns: 1fr; }
  .wie-tabs { overflow-x: auto; }
}
