:root {
  --bg: #101216; --panel: #1a1d24; --panel2: #21252f; --line: #2c303c;
  --text: #e8e6df; --dim: #9a97a3; --gold: #c8a75a; --green: #7fb069; --red: #d1603d;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); margin: 0; padding: 16px 12px 48px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.45; }
header, section, footer { max-width: 1080px; margin: 0 auto; }
h1 { font-size: 24px; margin: 4px 0 4px; }
h2 { font-size: 19px; margin: 28px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
h3 { font-size: 16px; margin: 18px 0 8px; }
.sub, .note { color: var(--dim); font-size: 13px; }
nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
nav a { color: var(--gold); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
img.sheet { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.caption { font-size: 13px; color: var(--dim); }
a.btn, button { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 14px; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block; }
a.btn:hover, button:hover { border-color: var(--gold); }
select, input[type="number"] { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 7px; font-size: 14px; }
label { display: inline-flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); margin: 0 10px 8px 0; }
form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { border: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
th { background: var(--panel2); white-space: nowrap; }
td .lbl { display: block; color: var(--dim); font-size: 11.5px; }
td .ev { font-weight: 600; white-space: nowrap; }
td.bench { background: #241d16; }
td.unpriced .ev { color: var(--dim); font-weight: 400; }

#prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; }
#prices label { flex-direction: row; align-items: center; justify-content: space-between; color: var(--text); font-size: 13.5px; margin: 0; }
#prices input { width: 90px; }

#safehouseev { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.shcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.shcard .v { font-size: 20px; font-weight: 700; }
.shcard .n { color: var(--dim); font-size: 12.5px; }

#boardwrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.divcol { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 90px; }
.divcol.dropok { outline: 2px dashed var(--gold); }
.divhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.divhead .dn { font-weight: 700; }
.divhead .cnt { color: var(--dim); font-size: 12.5px; }
.divhead label { flex-direction: row; align-items: center; margin: 0 0 0 auto; }
.divhead input { width: 58px; }
.chips { display: flex; flex-direction: column; gap: 5px; }
.chip { display: flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 8px; cursor: pointer; font-size: 13.5px; }
.chip.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.chip .nm { font-weight: 600; margin-right: auto; }
.chip select { padding: 2px 4px; font-size: 12.5px; }
.chip .star { background: none; border: none; padding: 0 2px; font-size: 15px; color: var(--dim); }
.chip .star.on { color: var(--gold); }
.poolcol { grid-column: 1 / -1; }
.jailcol { grid-column: 1 / -1; border-color: #4a3428; }

#targets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tgt { background: var(--panel2); border: 1px solid var(--gold); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13.5px; }
.tgt button { border: none; background: none; color: var(--dim); padding: 0 4px; font-size: 14px; }

#verdict { margin-top: 14px; border-radius: 8px; padding: 12px 14px; display: none; }
#verdict.show { display: block; }
#verdict.go { background: #1d2a1a; border: 1px solid var(--green); }
#verdict.no { background: #2c1c15; border: 1px solid var(--red); }
#verdict.mid { background: var(--panel); border: 1px solid var(--line); }
#verdict .big { font-size: 20px; font-weight: 700; }
#verdict p { margin: 4px 0 0; }
footer { margin-top: 36px; }
