/* PredForge — Mobile-first, dark, sober */

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0e0e13;
    --surface: #16161e;
    --surface-2: #1e1e28;
    --surface-3: #26262f;
    --border: #2c2c38;
    --border-light: #3a3a48;
    --text: #dbd8d2;
    --text-bright: #f0ede8;
    --text-muted: #7d7a74;
    --text-dim: #5a5854;
    --gold: #c9943e;
    --gold-dim: #8a6a2e;
    --teal: #4a9e8e;
    --teal-dim: #2d6358;
    --red: #c45;
    --green: #5a9;
    --purple: #8a6abf;
    --blue: #5b8cbf;
    --font: -apple-system, 'Segoe UI', 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    --max-w: 1140px;
    --nav-h: 56px;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--text-bright); }

img { display: block; max-width: 100%; }

/* ============ NAVIGATION ============ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px;
}

.nav-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -.02em;
    margin-right: auto;
    white-space: nowrap;
}
.nav-brand span { color: var(--text-muted); font-weight: 400; }

.nav-links {
    display: flex;
    gap: 2px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--gold); background: var(--surface-3); }

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 640px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 8px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 16px; }
}

/* ============ GOOGLE TRANSLATE ============ */
#google_translate_element { margin-left: 8px; flex-shrink: 0; }
#google_translate_element select {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: .75rem;
    font-family: var(--font);
    cursor: pointer;
    outline: none;
}
#google_translate_element select:hover { color: var(--text); border-color: var(--border-light); }
#google_translate_element .goog-logo-link,
#google_translate_element .goog-te-gadget span,
.goog-te-gadget .goog-te-gadget-simple img { display: none !important; }
#google_translate_element .goog-te-gadget { font-size: 0; }
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.skiptranslate { display: none !important; }
#google_translate_element .skiptranslate { display: block !important; }

@media (max-width: 640px) {
    #google_translate_element {
        position: absolute;
        top: 14px;
        right: 48px;
    }
}

/* ============ LAYOUT ============ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
}

.page { padding: 32px 0 64px; }

.section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 6px;
    letter-spacing: -.01em;
}

.section-subtitle {
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ============ HOME — HERO SECTION ============ */
.hero-section {
    padding: 48px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.hero-portraits-strip {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    opacity: .7;
}
.hero-portraits-strip img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: opacity .2s, transform .2s;
}
.hero-portraits-strip img:hover {
    opacity: 1;
    transform: scale(1.15);
    border-color: var(--gold-dim);
}
@media (max-width: 480px) {
    .hero-portraits-strip img { width: 38px; height: 38px; }
    .hero-portraits-strip { gap: 4px; }
}

.hero-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.15;
    letter-spacing: -.03em;
    margin-bottom: 12px;
}
.hero-section h1 .accent { color: var(--gold); }

.hero-section .tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 28px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero-section h1 { font-size: 1.7rem; }
    .hero-section .tagline { font-size: .95rem; }
}

/* ============ SHOWCASE STRIP ============ */
.showcase-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}
.showcase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 6px;
    transition: background .15s;
    text-decoration: none;
    width: 72px;
}
.showcase-item:hover { background: var(--surface-2); }
.showcase-item img {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.showcase-item span {
    font-size: .6rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: .9rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--font);
}

.btn-primary {
    background: var(--gold);
    color: #0e0e13;
}
.btn-primary:hover { background: #d9a44e; color: #0e0e13; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-light);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ============ FEATURE CARDS ============ */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 520px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 800px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 20px;
    transition: border-color .2s;
}
.feature-card:hover { border-color: var(--gold-dim); }

.feature-card .icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.feature-card .badge-soon {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    color: var(--gold);
    background: rgba(201, 148, 62, .12);
    padding: 2px 8px;
    border-radius: 3px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ============ HERO GRID (Builds page) ============ */
.heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    .heroes-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.hero-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
    background: var(--surface-2);
}

.hero-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.hero-card:hover img { border-color: var(--gold-dim); }

.hero-card .name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-bright);
}

.hero-card .role-badge {
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.role-carry { background: rgba(90, 170, 153, .15); color: var(--teal); }
.role-support { background: rgba(91, 140, 191, .15); color: var(--blue); }
.role-midlane { background: rgba(138, 106, 191, .15); color: var(--purple); }
.role-offlane { background: rgba(201, 148, 62, .15); color: var(--gold); }
.role-jungle { background: rgba(204, 68, 85, .15); color: var(--red); }

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: .85rem;
    font-family: var(--font);
}
.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: var(--gold-dim);
}

.filter-bar input { flex: 1; min-width: 160px; }

/* ============ BUILD DETAIL (hero_detail) ============ */
.hero-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.hero-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--border);
    object-fit: cover;
}

.hero-header .info h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 2px;
}

.hero-header .info .title {
    font-size: .9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 6px;
}

.hero-header .badges {
    display: flex;
    gap: 6px;
}

.build-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 20px;
    margin-bottom: 24px;
}

.build-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 520px) {
    .build-items { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 800px) {
    .build-items { grid-template-columns: repeat(3, 1fr); }
}

.build-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color .15s;
}
.build-item:hover { border-color: var(--gold-dim); }

.build-item .order {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dim);
    min-width: 20px;
}

.build-item img {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.build-item .details { flex: 1; }
.build-item .details .name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-bright);
}
.build-item .details .price {
    font-size: .8rem;
    color: var(--gold);
    font-family: var(--mono);
}
.build-item .details .score {
    font-size: .75rem;
    color: var(--text-muted);
}

.crest-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--surface-2);
    border: 1px solid var(--gold-dim);
    border-radius: 6px;
    margin-bottom: 16px;
    max-width: 360px;
}
.crest-card img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
}
.crest-card .name {
    font-weight: 600;
    color: var(--gold);
    font-size: .95rem;
}

.gold-total {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--mono);
    margin-top: 16px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.stats-summary .stat {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--surface-2);
    border-radius: 4px;
    font-size: .82rem;
}
.stats-summary .stat .label { color: var(--text-muted); }
.stats-summary .stat .value { color: var(--teal); font-family: var(--mono); font-weight: 600; }

/* ============ STATS TABLE ============ */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.stats-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 5;
}

.stats-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.stats-table tr:hover { background: var(--surface-2); }

.stats-table .num {
    text-align: right;
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--teal);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* ============ ITEMS TABLE (compact) ============ */
.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}
.items-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
    cursor: pointer;
}
.items-table th:hover { color: var(--text); }
.items-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.items-table tr { transition: background .1s; }
.items-table tr:hover { background: var(--surface-2); }
.items-table tr.clickable { cursor: pointer; }
.items-table .icon-cell img {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    vertical-align: middle;
}

/* ============ TUTORIAL ============ */
.tuto-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 20px;
    margin-bottom: 20px;
}

.tuto-block h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 10px;
}

.tuto-block p {
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.6;
}

.tuto-block code {
    background: var(--surface-3);
    color: var(--teal);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: .84rem;
}

.tuto-block pre {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--teal);
    line-height: 1.6;
    margin: 10px 0;
}

.tuto-block h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
}

.guide-lanes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 16px 0;
}
@media (min-width: 640px) {
    .guide-lanes { grid-template-columns: 1fr 1fr; }
}

.lane-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
}
.lane-card h3 {
    font-size: .9rem;
    color: var(--teal);
    margin-bottom: 8px;
}
.lane-card p {
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.weight-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    margin: 12px 0;
}
.weight-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: .72rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.weight-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
}
.weight-table .high { color: var(--gold); font-weight: 700; }
.weight-table .mid { color: var(--teal); }
.weight-table .low { color: var(--text-dim); }

/* ============ COMMUNITY ============ */
.suggestion-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 20px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: .88rem;
    font-family: var(--font);
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold-dim);
}

.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
}

.suggestion-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.suggestion-card .author {
    font-weight: 600;
    font-size: .88rem;
    color: var(--text-bright);
}

.suggestion-card .date {
    font-size: .78rem;
    color: var(--text-dim);
}

.suggestion-card .category {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 8px;
}

.cat-feature { background: rgba(90, 170, 153, .15); color: var(--teal); }
.cat-bug { background: rgba(204, 68, 85, .15); color: var(--red); }
.cat-build { background: rgba(201, 148, 62, .15); color: var(--gold); }
.cat-other { background: rgba(138, 106, 191, .15); color: var(--purple); }

.suggestion-card .message {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--font);
    margin-top: 8px;
}
.vote-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.vote-btn.voted,
.vote-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    border-color: var(--border);
    color: var(--text-dim);
}
.vote-btn.voted:hover { border-color: var(--border); color: var(--text-dim); }

/* ============ FOOTER ============ */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 64px;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer .disclaimer {
    font-size: .78rem;
    color: var(--text-dim);
    max-width: 500px;
    line-height: 1.5;
}

.footer .links {
    display: flex;
    gap: 16px;
}

.footer .links a {
    font-size: .82rem;
    color: var(--text-muted);
}
.footer .links a:hover { color: var(--gold); }

/* ============ RARITY BADGES ============ */
.badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.badge-common { background: rgba(120,120,120,.2); color: #999; }
.badge-uncommon { background: rgba(90,170,90,.15); color: var(--green); }
.badge-rare { background: rgba(91,140,191,.15); color: var(--blue); }
.badge-epic { background: rgba(138,106,191,.15); color: var(--purple); }
.badge-legendary { background: rgba(201,148,62,.15); color: var(--gold); }

/* ============ ALERT / MESSAGES ============ */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: .88rem;
    margin-bottom: 16px;
}
.alert-success {
    background: rgba(90,170,153,.1);
    border: 1px solid var(--teal-dim);
    color: var(--teal);
}
.alert-error {
    background: rgba(204,68,85,.1);
    border: 1px solid rgba(204,68,85,.3);
    color: var(--red);
}

/* ============ UTILITIES ============ */
.text-gold { color: var(--gold); }
.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mono { font-family: var(--mono); }

/* ============ PAGE HEADER ============ */
.page-header {
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
}
.page-header .count {
    font-size: .88rem;
    color: var(--text-muted);
}

/* ============ ITEM DETAIL ============ */
.item-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.item-header img {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    border: 2px solid var(--border);
}
.item-header .info h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-bright);
}
.item-header .info .en-name {
    font-size: .85rem;
    color: var(--text-muted);
}

.price-box {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}
.price-box .price-item {
    text-align: center;
}
.price-box .price-item .label {
    font-size: .75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.price-box .price-item .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--mono);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 6px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--surface-2);
    border-radius: 4px;
    font-size: .82rem;
}
.stat-row .stat-name { color: var(--text-muted); }
.stat-row .stat-val { color: var(--teal); font-family: var(--mono); font-weight: 600; }

/* Build tree */
.tree-node {
    padding: 4px 0;
}
.tree-node .node-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 4px;
}
.tree-node .node-item:hover { background: var(--surface-2); }
.tree-node .node-item img {
    width: 24px;
    height: 24px;
    border-radius: 3px;
}
.tree-node .node-item .cost {
    margin-left: auto;
    color: var(--gold);
    font-size: .8rem;
    font-family: var(--mono);
}
.tree-children {
    margin-left: 20px;
    border-left: 1px solid var(--border);
    padding-left: 8px;
}

/* Builds into grid */
.builds-into {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.builds-into a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .82rem;
    color: var(--text);
    transition: border-color .15s;
}
.builds-into a:hover { border-color: var(--gold-dim); color: var(--gold); }
.builds-into a img {
    width: 24px;
    height: 24px;
    border-radius: 3px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.back-link:hover { color: var(--gold); }
