:root {
  --bg: #16120e; --surface: #201a15; --raised: #2a231c; --line: #3a3027;
  --text: #f2e8da; --muted: #a89683; --dim: #8a7a69;
  --accent: #c9872e; --accent-text: #e8c98a; --on-accent: #1a1208;
  --bad: #e09080; --bad-bg: #2c1d19; --bad-line: #5c3a33;
  --good: #a5c495; --good-bg: #1f2a1b; --good-line: #44593a;
  --display: Cinzel, Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent-text); }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.brand { font-family: var(--display); font-weight: 700; letter-spacing: .08em;
  color: var(--accent-text); text-decoration: none; font-size: 15px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-family: var(--display); font-size: 12px; letter-spacing: .12em;
  color: var(--accent-text); margin: 22px 0 9px; text-transform: uppercase; }
.sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card { background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; }
.card + .card { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1 1 0; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: 12px; } .dim { color: var(--dim); }
form.inline { display: inline; margin: 0; }
button, .btn {
  font: inherit; cursor: pointer; min-height: 44px; min-width: 44px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--raised);
  color: var(--text); padding: 0 14px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
button:disabled { opacity: .35; cursor: not-allowed; }
.primary { background: var(--accent); border-color: #e0a04a; color: var(--on-accent);
  font-weight: 700; }
.minus { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad);
  font-size: 20px; }
.plus { background: var(--good-bg); border-color: var(--good-line); color: var(--good);
  font-size: 20px; }
.big { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; }
.bar { height: 8px; border-radius: 4px; background: #2e261e; overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; background: #b9543f; }
.bar.res > span { background: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--raised); border-radius: 10px; padding: 10px 4px; text-align: center; }
.tile b { display: block; font-family: var(--display); font-size: 17px; }
.tile span { font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.attr { display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-top: 1px solid #2e261e; }
.attr:first-child { border-top: 0; }
.attr .abbr { width: 44px; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.attr .val { font-family: var(--display); font-size: 20px; font-weight: 700; min-width: 54px; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; border-radius: 999px;
  padding: 3px 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.bonus { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.tag.cap { color: var(--accent-text); border-color: #6b4e1f; background: #332817; }
.alert { background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.note { background: #1d1a22; border: 1px solid #4a3a55; color: #d6ccde;
  border-radius: 10px; padding: 10px 12px; }
input, select, textarea {
  font: inherit; width: 100%; min-height: 44px; border-radius: 10px; padding: 0 12px;
  border: 1px solid var(--line); background: #1b1612; color: var(--text);
}
input.amount { width: 84px; text-align: center; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
.item { padding: 10px 0; border-top: 1px solid #2e261e; }
.item:first-child { border-top: 0; }
.locked { opacity: .5; }
ul.errorlist { color: var(--bad); padding-left: 18px; margin: 4px 0; font-size: 12px; }
details summary { cursor: pointer; color: var(--muted); min-height: 44px;
  display: flex; align-items: center; }

