:root {
  --ink: #0c0c09;
  --panel: #16140e;
  --panel-2: #1f1b12;
  --line: #3a341f;
  --gold: #e2b53a;
  --gold-2: #f3d36a;
  --paper: #e7d7b0;
  --stamp: #9b2a22;
  --ok: #7ea34a;
  --warn: #d08a2a;
  --muted: #9a8d6b;
  --safe: 16px;
  --tap: 48px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--paper); }
body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  padding-bottom: 88px;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 40;
  background: repeating-linear-gradient(
    to bottom,
    rgba(226, 181, 58, 0.035) 0px,
    rgba(226, 181, 58, 0.035) 1px,
    transparent 2px,
    transparent 4px
  );
}

.app-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(#120f0a, #0c0c09);
  border-bottom: 3px solid var(--gold);
}
.stripe {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    #111 0 8px,
    var(--gold) 8px 16px
  );
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--safe) 12px;
}
.seal {
  width: 42px; height: 42px; flex: none;
  border: 2px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Black Ops One", sans-serif;
  color: var(--gold); font-size: 11px;
}
.brand h1 {
  margin: 0;
  font-family: "Black Ops One", sans-serif;
  font-size: 18px; line-height: 1.1;
  color: var(--gold-2);
}
.brand .sub {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.meta-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 0 var(--safe) 10px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.wrap { width: min(920px, 100%); margin: 0 auto; padding: 14px var(--safe); }

.banner {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 12px; color: var(--muted);
}
.banner strong { color: var(--gold); }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: #100e0a;
  border-top: 2px solid var(--gold);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.dock button {
  background: transparent; border: 0; color: var(--muted);
  min-height: var(--tap); letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 11px; font-weight: 700;
}
.dock button.active { color: var(--gold-2); }

.toolbar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 0 0 12px;
}
.search {
  flex: 1 1 180px;
  background: var(--panel); border: 1px solid var(--line);
  min-height: var(--tap); padding: 0 12px; color: var(--paper);
}
.chip-row { display: flex; gap: 6px; overflow: auto; padding-bottom: 4px; }
.chip, .btn, .ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  min-height: 40px; padding: 0 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 11px; font-weight: 700;
}
.chip.on, .btn.primary {
  background: var(--gold); color: #1a1406; border-color: var(--gold);
}
.btn.danger { border-color: var(--stamp); color: #f0b4ae; }
.ghost { background: transparent; }

.kit-list { display: grid; gap: 10px; }
.kit-card {
  display: block; width: 100%; text-align: left;
  background: var(--panel); border: 1px solid var(--line);
  padding: 12px; color: inherit;
}
.kit-card:active { border-color: var(--gold); }
.kit-card .k-top {
  display: flex; justify-content: space-between; gap: 8px; align-items: start;
}
.kit-card h3 {
  margin: 0; font-family: "Black Ops One", sans-serif;
  font-size: 16px; color: var(--gold-2); font-weight: 400;
}
.tag {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--gold); color: var(--gold); padding: 3px 6px;
  white-space: nowrap;
}
.slots {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.mini {
  font-size: 11px; color: var(--paper);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 4px 6px;
}
.empty {
  border: 1px dashed var(--line); padding: 28px 16px; text-align: center;
  color: var(--muted);
}

.form-grid { display: grid; gap: 10px; }
.field label {
  display: block; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line);
  min-height: var(--tap); padding: 10px 12px;
}
.field textarea { min-height: 92px; resize: vertical; }
.pick {
  width: 100%; text-align: left;
  background: var(--panel); border: 1px solid var(--line);
  min-height: 58px; padding: 8px 12px;
}
.pick .who { font-family: "Black Ops One", sans-serif; color: var(--gold-2); }
.pick .hint { font-size: 11px; color: var(--muted); }
.strats { display: grid; gap: 8px; }
@media (min-width: 720px) {
  .strats { grid-template-columns: 1fr 1fr; }
  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}

.warn-box {
  border: 1px solid var(--warn); color: #efd3a2;
  background: #2a1d0b; padding: 10px 12px; font-size: 13px;
}

.sheet {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(0,0,0,.72);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet .panel {
  width: min(920px, 100%);
  max-height: 88vh;
  background: #14110c;
  border-top: 3px solid var(--gold);
  padding: 12px var(--safe) 20px;
  overflow: auto;
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-bottom: 10px;
}
.sheet-head h2 {
  margin: 0; font-family: "Black Ops One", sans-serif;
  font-size: 16px; color: var(--gold-2); font-weight: 400;
}
.item {
  width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--panel);
  padding: 10px 12px; margin-bottom: 6px;
}
.item .n { font-weight: 700; }
.item .m { font-size: 12px; color: var(--muted); }

.dossier {
  background: var(--panel);
  border: 1px solid var(--gold);
  padding: 16px;
}
.dossier h2 {
  margin: 0 0 6px;
  font-family: "Black Ops One", sans-serif;
  color: var(--gold-2); font-weight: 400;
}
.row-kv { display: grid; gap: 8px; margin: 12px 0; }
.kv {
  display: grid; grid-template-columns: 110px 1fr; gap: 8px;
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
  font-size: 14px;
}
.kv span { color: var(--muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.code {
  display: inline-flex; gap: 4px; flex-wrap: wrap; margin-top: 4px;
}
.arr {
  width: 22px; height: 22px; display: grid; place-items: center;
  border: 1px solid var(--gold); color: var(--gold);
  font-size: 12px;
}

.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: var(--gold); color: #1a1406;
  padding: 10px 14px; font-weight: 700; z-index: 50;
}

.hidden { display: none !important; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

footer.legal {
  margin: 24px 0 12px;
  font-size: 11px; color: var(--muted); line-height: 1.45;
}
