:root {
  --bg: #0b0c0d; --panel: rgba(20,21,22,.94); --line: #303132; --line-soft: #242526;
  --text: #e9e4d9; --muted: #8f8d87; --gold: #c99a52; --gold-bright: #e3ba74;
  --gold-dark: #725025; --green: #62b784; --red: #c7655a; --blue: #6f9dd0; --purple: #a383cb;
}
* { box-sizing: border-box; }
html { min-height: 100%; font-size: 15px; }
body {
  min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--text);
  background: linear-gradient(rgba(11,12,13,.96),rgba(11,12,13,.99)),
    repeating-linear-gradient(90deg,transparent 0,transparent 59px,rgba(255,255,255,.018) 60px),#0b0c0d;
  font-family: Inter,"Segoe UI",system-ui,sans-serif;
}
.ambient { position: fixed; z-index: -1; width: 520px; height: 520px; border-radius: 50%; filter: blur(130px); opacity: .08; pointer-events: none; }
.ambient-one { top: -230px; left: -180px; background: var(--gold); }
.ambient-two { right: -260px; bottom: -200px; background: #693d26; }
.app-shell { max-width: 1460px; padding: 32px 28px 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.brand-wrap { display: flex; align-items: center; gap: 16px; }
.brand-mark { display: grid; place-items: center; width: 50px; height: 50px; color: var(--gold-bright); border: 1px solid var(--gold-dark); background: linear-gradient(145deg,#2a2117,#141310); font-family: Georgia,serif; font-size: 20px; letter-spacing: 3px; box-shadow: inset 0 0 20px rgba(201,154,82,.08); transform: rotate(45deg); }
.brand-mark span { transform: rotate(-45deg); }
.brand-wrap h1 { margin: 1px 0 0; font-family: Georgia,serif; font-size: 25px; letter-spacing: .16em; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; min-width: 138px; padding: 9px 13px; border: 1px solid var(--line); background: #131414; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #777; box-shadow: 0 0 8px #777; }
.status-pill.online { color: #a6d8b7; border-color: rgba(98,183,132,.34); }
.status-pill.online .status-dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.status-pill.offline { color: #e2a29b; border-color: rgba(199,101,90,.38); }
.status-pill.offline .status-dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
.status-pill.checking .status-dot { animation: pulse 1.3s ease-in-out infinite; }
.panel { border: 1px solid var(--line); background: linear-gradient(145deg,rgba(25,26,27,.96),rgba(17,18,19,.96)); box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.mcp-settings-panel { display: grid; grid-template-columns: auto minmax(320px,1fr); align-items: center; gap: 28px; margin-bottom: 14px; padding: 15px 18px; }
.mcp-settings-copy { display: flex; align-items: center; gap: 11px; }
.mcp-settings-copy h2 { margin: 0; font-family: Georgia,serif; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.mcp-settings-copy p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.mcp-settings-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.mcp-settings-form input { min-width: 0; height: 39px; padding: 0 12px; color: #d8d5ce; background: #0f1011; border: 1px solid #353637; border-radius: 2px; outline: none; font-family: Consolas,monospace; font-size: 11px; }
.mcp-settings-form input:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(201,154,82,.08); }
.mcp-settings-form .btn-action { min-height: 39px; padding: 0 14px; font-size: 9px; }
.import-panel { padding: 22px 24px 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 18px; }
.section-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.section-heading h2 { margin: 0; font-family: Georgia,serif; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.section-index { color: var(--gold); font-family: Georgia,serif; font-size: 12px; }
.load-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.path-field { position: relative; }
.path-field input { width: 100%; height: 47px; padding: 0 16px 0 45px; color: #d8d5ce; background: #0f1011; border: 1px solid #353637; border-radius: 2px; outline: none; font-family: Consolas,monospace; font-size: 12px; transition: border-color .18s,box-shadow .18s; }
.path-field input:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(201,154,82,.08); }
.path-icon { position: absolute; top: 50%; left: 15px; width: 18px; color: var(--gold); transform: translateY(-50%); }
.path-icon svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 47px; padding: 0 22px; border-radius: 2px; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; transition: transform .16s,border-color .16s,background .16s,color .16s; }
.btn-action:hover:not(:disabled) { transform: translateY(-1px); }
.btn-action:disabled { opacity: .38; cursor: not-allowed; }
.btn-action svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary-action { color: #16120d; background: linear-gradient(180deg,var(--gold-bright),#b98642); border: 1px solid #dbad68; }
.btn-primary-action:hover:not(:disabled) { color: #080706; background: #ebc681; }
.btn-secondary-action { color: #c9c5bc; background: #171819; border: 1px solid #3b3c3d; }
.btn-secondary-action:hover:not(:disabled) { color: var(--gold-bright); border-color: var(--gold-dark); background: #1c1b19; }
#alertArea { margin-top: 16px; }
.lab-alert { display: flex; justify-content: space-between; gap: 18px; padding: 13px 16px; border: 1px solid; background: #161718; font-size: 13px; }
.lab-alert.error { color: #e4aaa4; border-color: rgba(199,101,90,.4); }
.lab-alert.success { color: #a9d9b9; border-color: rgba(98,183,132,.35); }
.lab-alert button { border: 0; background: none; color: inherit; opacity: .75; }
.build-section { padding-top: 34px; transition: opacity .2s; }
.build-section.is-empty { opacity: .55; }
.build-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.build-title-row h2 { margin: 5px 0 0; color: #eee7da; font-family: Georgia,serif; font-size: clamp(25px,3vw,38px); letter-spacing: .04em; }
.build-path { max-width: 50%; overflow: hidden; color: #73736f; font-family: Consolas,monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat-card { min-width: 0; padding: 20px 19px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(21,22,23,.82); }
.stat-card:hover { background: #191a1b; }
.stat-card strong { display: block; margin: 8px 0 3px; color: #e8e3da; font-family: Georgia,serif; font-size: clamp(23px,2.15vw,34px); font-weight: 500; line-height: 1; overflow: hidden; text-overflow: ellipsis; }
.stat-card small { color: #6f706d; font-size: 10px; }
.stat-label { color: #a09d96; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.stat-featured { background: linear-gradient(145deg,rgba(51,39,24,.76),rgba(24,23,21,.9)); }
.stat-featured strong { color: var(--gold-bright); }
.stat-energy strong { color: var(--blue); } .stat-life strong { color: #cb7770; } .stat-mana strong { color: var(--purple); } .stat-ehp strong { color: #8cc09e; }
.caveats-panel { margin-top: 16px; padding: 14px 17px; border: 1px solid #5d4829; background: rgba(90,62,27,.13); color: #cdbb9e; }
.caveats-title { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; color: var(--gold-bright); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.caveats-title span { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--gold-dark); border-radius: 50%; }
.caveats-panel ul { margin: 0; padding-left: 22px; font-size: 12px; }
.caveats-panel li + li { margin-top: 4px; }
.action-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.upgrades-panel { margin-top: 32px; overflow: hidden; }
.upgrades-heading { margin: 0; padding: 21px 22px 18px; border-bottom: 1px solid var(--line); }
.ranking-meta { display: flex; gap: 7px; }
.ranking-meta span { padding: 5px 8px; color: #8d8980; border: 1px solid var(--line); background: #121313; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.snapshot-check { padding: 10px 22px; color: #9ed1af; border-bottom: 1px solid var(--line-soft); background: rgba(47,102,68,.08); font-size: 11px; }
.snapshot-check.failed { color: #e0a29c; background: rgba(150,50,42,.08); }
.upgrade-table { color: #ccc8c0; font-size: 12px; --bs-table-bg: transparent; --bs-table-color: #ccc8c0; --bs-table-border-color: #28292a; }
.upgrade-table thead th { padding: 11px 13px; color: #777873; background: #111213; border-bottom-color: #343536; font-size: 8px; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
.upgrade-table tbody td { padding: 13px; vertical-align: top; }
.upgrade-table tbody tr:hover td { background: rgba(255,255,255,.018); }
.upgrade-table td:first-child { color: #62635f; font-family: Georgia,serif; }
.slot-name { color: #eee8dc; font-weight: 700; white-space: nowrap; }
.delta-positive { color: #79c293 !important; font-weight: 700; }
.affix-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 260px; }
.affix-chip { padding: 3px 6px; color: #bbb6aa; border: 1px solid #3b3934; background: #191816; font-size: 9px; }
.warning-text { min-width: 150px; color: #c39a67 !important; font-size: 10px; }
.ranking-note { padding: 12px 22px; color: #777771; border-top: 1px solid var(--line); font-size: 10px; }
.empty-row { padding: 35px !important; color: var(--muted) !important; text-align: center; }
.app-footer { display: flex; justify-content: space-between; margin-top: 32px; padding-top: 16px; color: #555652; border-top: 1px solid #222324; font-size: 8px; font-weight: 700; letter-spacing: .14em; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 1000px) { .stats-grid { grid-template-columns: repeat(3,1fr); } .section-heading p { display: none; } }
@media (max-width: 680px) {
  .app-shell { padding: 20px 14px; } .topbar { align-items: flex-start; } .brand-mark { width: 42px; height: 42px; }
  .brand-wrap h1 { font-size: 19px; } .status-pill { min-width: auto; padding: 8px 9px; } .status-label { display: none; }
  .mcp-settings-panel { grid-template-columns: 1fr; gap: 12px; } .mcp-settings-form { grid-template-columns: 1fr; }
  .load-form { grid-template-columns: 1fr; } .section-heading { align-items: center; } .stats-grid { grid-template-columns: repeat(2,1fr); }
  .build-title-row { align-items: flex-start; flex-direction: column; } .build-path { max-width: 100%; }
  .action-row { display: grid; grid-template-columns: 1fr; } .ranking-meta { display: none; }
}
