/* Debug console — styling kept deliberately separate from the game's own UI
   so a change to the 2026 theme cannot quietly break a tool. */
:root {
    --bg:      #0b0e13;
    --bg2:     #10151c;
    --panel:   #141a23;
    --line:    #232c38;
    --line2:   #2e3a49;
    --txt:     #d7dee7;
    --dim:     #7d8896;
    --accent:  #4fa9dd;
    --accent2: #7fd4ff;
    --ok:      #4ade80;
    --warn:    #fbbf24;
    --bad:     #f87171;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--txt);
    font: 13px/1.55 var(--mono);
    overflow: hidden;
}

/* ── shell ─────────────────────────────────────────────────────────────── */
#shell { display: grid; grid-template-columns: 208px 1fr 340px; grid-template-rows: 44px 1fr; height: 100vh; }

#topbar {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 14px; padding: 0 14px;
    background: linear-gradient(180deg, #16202b, #10151c);
    border-bottom: 1px solid var(--line);
}
#topbar .brand { font-weight: 700; letter-spacing: .22em; color: var(--accent2); font-size: 12px; }
#topbar .who   { color: var(--dim); font-size: 11px; }
#topbar .spacer { flex: 1; }
#topbar .stat { color: var(--dim); font-size: 11px; }
#topbar .stat b { color: var(--txt); font-weight: 600; }
#topbar a { color: var(--dim); text-decoration: none; font-size: 11px; }
#topbar a:hover { color: var(--accent2); }

#nav {
    background: var(--bg2); border-right: 1px solid var(--line);
    padding: 10px 8px; overflow-y: auto;
}
#nav .grp { font-size: 10px; letter-spacing: .18em; color: #59636f; margin: 12px 8px 5px; text-transform: uppercase; }
#nav .grp:first-child { margin-top: 2px; }
#nav button {
    display: block; width: 100%; text-align: left;
    background: none; border: 1px solid transparent; border-radius: 5px;
    color: var(--dim); padding: 6px 9px; margin-bottom: 2px;
    cursor: pointer; font: inherit;
}
#nav button:hover { background: #18202a; color: var(--txt); }
#nav button.on { background: #1d3446; border-color: #35617f; color: var(--accent2); }

#stage { position: relative; background: #0d1117; overflow: hidden; }
#stage canvas { display: block; }
#stageInfo {
    position: absolute; left: 12px; bottom: 10px;
    color: var(--dim); font-size: 11px; pointer-events: none;
    text-shadow: 0 1px 3px #000;
}
#stageBusy {
    position: absolute; left: 12px; top: 10px;
    color: var(--warn); font-size: 11px; pointer-events: none;
}
#stageEmpty {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #3d4753; font-size: 13px; letter-spacing: .12em; text-align: center; padding: 30px;
}

#side { background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 12px; }
#side h2 {
    font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--accent2); margin: 0 0 4px;
}
#side .lead { color: var(--dim); font-size: 11px; margin-bottom: 12px; line-height: 1.5; }

/* ── widgets ───────────────────────────────────────────────────────────── */
.sec { margin-bottom: 14px; }
.sec > .t {
    font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #59636f;
    border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 7px;
}
.row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.row > label { color: var(--dim); min-width: 84px; flex: 0 0 auto; }
select, input[type=text], input[type=number] {
    flex: 1; background: #10151c; color: var(--txt);
    border: 1px solid var(--line2); border-radius: 4px; padding: 5px 7px; font: inherit;
}
select:focus, input:focus { outline: 1px solid var(--accent); }
.sl { margin-bottom: 9px; }
.sl .h { display: flex; justify-content: space-between; color: var(--dim); margin-bottom: 2px; }
.sl .h b { color: var(--accent2); font-weight: 600; }
.sl input[type=range] { width: 100%; accent-color: var(--accent); }
.tg { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; cursor: pointer; user-select: none; }
.tg input { accent-color: var(--accent); cursor: pointer; }
button.b {
    background: #1a2632; color: #cfe9ff; border: 1px solid #33506a;
    border-radius: 4px; padding: 6px 11px; cursor: pointer; font: inherit;
    margin: 0 5px 5px 0;
}
button.b:hover { background: #24384a; }
button.b.warn { border-color: #6a5233; color: #ffe3b0; }
button.b.warn:hover { background: #3a2f1c; }
pre.out {
    margin: 0; padding: 8px 9px; background: #0a0e13;
    border: 1px solid var(--line); border-radius: 4px;
    color: #9fd7a8; white-space: pre-wrap; word-break: break-word; font: inherit;
    max-height: 340px; overflow-y: auto;
}
.pill { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 10px;
        border: 1px solid var(--line2); color: var(--dim); margin-right: 4px; }
.pill.ok  { color: var(--ok);   border-color: #2b5c3c; }
.pill.bad { color: var(--bad);  border-color: #6b3030; }
.pill.warn{ color: var(--warn); border-color: #6a5233; }
.dim { color: var(--dim); }
.bad { color: var(--bad); }
.ok  { color: var(--ok); }

/* Item list used by the weapon / map pickers. */
.list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 5px; }
.list button {
    display: block; width: 100%; text-align: left; background: none;
    border: none; border-bottom: 1px solid #1a212a;
    color: var(--dim); padding: 6px 9px; cursor: pointer; font: inherit;
}
.list button:last-child { border-bottom: none; }
.list button:hover { background: #18202a; color: var(--txt); }
.list button.on { background: #1d3446; color: var(--accent2); }
.list button small { float: right; color: #59636f; }

#gate {
    position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
    background: var(--bg); z-index: 100; flex-direction: column; gap: 14px; text-align: center; padding: 30px;
}
#gate h1 { font-size: 14px; letter-spacing: .24em; color: var(--accent2); margin: 0; }
#gate p { color: var(--dim); max-width: 420px; margin: 0; line-height: 1.6; }
#gate a { color: var(--accent); }
