:root {
  color-scheme: dark;
  --bg: #14110e;
  --bg-2: #1e1914;
  --ink: #f4efe6;
  --muted: #b7ab9c;
  --line: #3a3128;
  --diesel: #e39b12;
  --diesel-ink: #2a1c04;
  --stop: #c2412d;
  --ok: #8fbf7a;
  --bad: #e07a68;
  --chip: #2a241d;
  font-family: "Segoe UI", "Avenir Next", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 10% -10%, #3a2a16 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
button, input, select {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; letter-spacing: 0.08em; font-weight: 700; }
h2 { font-size: 20px; font-weight: 650; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 18px 16px 8px;
  max-width: 980px;
  margin: 0 auto;
}
.eyebrow {
  color: var(--diesel);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
}
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
#logout, .ghost, .choice {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px 140px;
}
button, input, select { scroll-margin-bottom: 130px; }
.card, .panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-top: 12px;
}
.stack { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input, select {
  background: #100e0c;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.primary, .danger {
  border: 0;
  border-radius: 14px;
  min-height: 56px;
  font-size: 18px;
  font-weight: 700;
}
.primary { background: var(--diesel); color: var(--diesel-ink); }
.danger { background: var(--stop); color: white; }
.primary:disabled, .danger:disabled { opacity: 0.45; cursor: not-allowed; }
.banner {
  background: #3a221c;
  color: #ffd2c8;
  border-radius: 12px;
  padding: 10px 12px;
}
.banner.ok { background: #1d3324; color: #d5efcc; }
.tanks { display: grid; gap: 10px; }
.tank { display: grid; gap: 6px; }
.meter {
  height: 14px;
  background: #100e0c;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a5a09, var(--diesel));
  width: 0%;
}
.meta { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.choice[aria-pressed="true"] {
  background: var(--diesel);
  color: var(--diesel-ink);
  border-color: var(--diesel);
}
video, .finder {
  width: 100%;
  border-radius: 16px;
  background: black;
  min-height: 220px;
  object-fit: cover;
}
.op {
  font-size: 22px;
  font-weight: 700;
}
.op em { font-style: normal; color: var(--diesel); }
#nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: #100e0c;
  border-top: 1px solid var(--line);
}
#nav[hidden] { display: none; }
#nav button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  min-height: 44px;
  font-size: 12px;
  padding: 4px 2px;
}
#nav button[aria-current="page"] { background: var(--chip); color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.bar i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--diesel);
}
.qr svg { width: 220px; height: 220px; background: white; border-radius: 12px; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.totals strong { display: block; font-size: 22px; }
.totals span { color: var(--muted); font-size: 12px; }
.scroll { overflow-x: auto; }
.tag {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--muted);
}
.split { display: grid; gap: 12px; }
@media (min-width: 800px) {
  .split { grid-template-columns: 280px 1fr; }
  .tanks { grid-template-columns: 1fr 1fr; }
}
@media print {
  body { background: white; color: black; }
  .top, #nav, .no-print { display: none !important; }
  .qr svg { width: 320px; height: 320px; }
}
