:root {
  --bg: #1c1c1c;
  --surface: #242424;
  --surface-2: #2b2b2b;
  --raised: #333333;
  --line: #3a3a3a;
  --line-strong: #4a4a4a;
  --text: #ffffff;
  --muted: #9a9a9a;
  --faint: #6e6e6e;
  --ink: #1c1c1c;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", "Manrope", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body { padding: 16px 16px 104px; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand img { display: block; border-radius: 8px; }
.word {
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 15px;
  line-height: 1;
}
.sub {
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.3em;
  font-weight: 500;
  margin-top: 3px;
}

.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ghost:active { background: var(--surface-2); }

.hero, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.hero { position: relative; overflow: hidden; }

.kicker {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.hero h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
}
.meta { color: var(--muted); font-size: 14px; margin: 0; }

.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--text);
  color: var(--ink);
}
.badge.off {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-top: 12px;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: var(--text);
  color: var(--ink);
}
.btn:active { opacity: 0.85; }
.btn.primary {
  background: #3390ec;
  color: #ffffff;
}
.btn.success {
  background: #31b545;
  color: #ffffff;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  min-height: 76px;
}
.tile:active { background: var(--surface-2); }
.tile.accent {
  border-color: #31b545;
}
.tile.accent span { color: #8ad48f; }
.tile b { display: block; margin-bottom: 4px; font-size: 14px; }
.tile span { color: var(--faint); font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.chip.on {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
  font-weight: 700;
}

.price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 2px;
}
.price-note { color: var(--faint); font-size: 12px; margin: 0 0 4px; }

label {
  display: block;
  color: var(--faint);
  font-size: 12px;
  margin: 12px 0 6px;
  letter-spacing: 0.04em;
}
input[type="number"], input[type="text"] {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}
input:focus { outline: none; border-color: var(--line-strong); }
input[readonly] {
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.row:last-of-type { border-bottom: 0; }
.row.device { align-items: center; }
.row.device span { min-width: 0; }
.device-card {
  padding: 10px 0 4px;
  font-size: 14px;
}
.ghost.kick {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: center;
  color: #ff8a80;
  border-color: #5a2c2c;
  background: #3a1d1d;
}
.muted { color: var(--muted); }
a { color: var(--text); }
.err { color: var(--text); font-size: 13px; opacity: 0.8; }

h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.dock button {
  padding: 11px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.dock button.on { background: var(--raised); color: var(--text); }
