
:root {
  --bg: #11151d;
  --panel: #1b2230;
  --panel-2: #232d40;
  --text: #f3f4f6;
  --muted: #b8c0cc;
  --accent: #d4a64f;
  --accent-2: #8db4ff;
  --danger: #b65b5b;
  --line: rgba(255,255,255,0.09);
  --shadow: 0 12px 40px rgba(0,0,0,0.25);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: linear-gradient(180deg, #0d1017 0%, var(--bg) 100%); color: var(--text); }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; padding: 0.8rem 1rem; background: var(--accent); color: #21170a; font-weight: 700; }
button.secondary, .upload-btn { background: #2c3750; color: var(--text); }
button.danger { background: var(--danger); color: #fff; }
input, select { width: 100%; margin-top: 0.35rem; padding: 0.8rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); background: #101723; color: var(--text); }
label { display: block; color: var(--muted); }
.shell { max-width: 1440px; margin: 0 auto; padding: 1.25rem; }
.topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); font-size: 0.78rem; margin: 0 0 0.4rem; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); }
.subtitle { max-width: 70ch; color: var(--muted); }
.topbar-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tabs { display: flex; gap: 0.75rem; margin: 1rem 0; }
.tab { background: #273149; color: var(--muted); }
.tab.active { background: var(--accent); color: #201606; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.grid { display: grid; gap: 1rem; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.player-grid { grid-template-columns: 2fr 1fr; }
.card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid var(--line); border-radius: 22px; padding: 1rem; box-shadow: var(--shadow); }
.card-head, .row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.stack { display: grid; }
.gap-sm { gap: 0.75rem; }
.gap-xs { gap: 0.45rem; }
.row { display: flex; }
.align-center { align-items: center; }
.form-row { display: grid; gap: 0.9rem; margin-bottom: 0.9rem; }
.form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat, .mini-card, .summary-box, .inventory-card, .shop-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem; }
.shop-card { margin-top: 0.9rem; }
.summary-box { display: grid; gap: 0.55rem; margin: 0.9rem 0; }
.summary-box > div { display:flex; justify-content: space-between; }
.muted { color: var(--muted); }
.top-gap { margin-top: 1rem; }
.top-gap-sm { margin-top: 0.6rem; }
.helper { color: var(--muted); font-size: 0.92rem; margin-top: 0.6rem; }
.inventory-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.item-name, .shop-card-name, h2, h3 { margin: 0; }
.item-notes { color: var(--muted); min-height: 3.5rem; }
.pill { display: inline-flex; border-radius: 999px; padding: 0.35rem 0.65rem; background: rgba(212,166,79,0.16); color: var(--accent); }
.sticky-cart { position: sticky; top: 1rem; height: fit-content; }
.cart-items { max-height: 430px; overflow: auto; }
.json-view { background: #0f1520; border-radius: 16px; padding: 1rem; overflow: auto; max-height: 520px; }
.deploy-list { color: var(--muted); padding-left: 1.2rem; }
.upload-btn { display: inline-flex; align-items: center; }
@media (max-width: 980px) {
  .two-col, .player-grid, .form-row.two, .stats-grid, .stats-grid.compact { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .sticky-cart { position: static; }
}
code { background: rgba(255,255,255,0.08); padding: 0.15rem 0.35rem; border-radius: 8px; }
.pill.neutral { background: rgba(141,180,255,0.15); color: var(--accent-2); }
.pill.good { background: rgba(83, 206, 118, 0.16); color: #7ee6a0; }
.pill.bad { background: rgba(182,91,91,0.18); color: #ffb0b0; }
.hidden { display:none; }
#connection-message.error, #gm-message.error, #checkout-message.error { color: #ffb0b0; }
#connection-message.ok, #gm-message.ok, #checkout-message.ok { color: #7ee6a0; }
pre { white-space: pre-wrap; }
