:root {
  --bg: #12110e;
  --panel: #1c1a16;
  --panel-edge: #3a3428;
  --ink: #efe6d4;
  --muted: #9d927d;
  --amber: #e2a53a;
  --amber-dim: #8a6720;
  --good: #7cdb8a;
  --warn: #e2a53a;
  --bad: #d96a4a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(226, 165, 58, 0.08), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

body {
  display: grid;
  place-items: center;
  padding: 24px;
}

#app {
  width: min(920px, 100%);
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.brand h1 {
  margin: 0;
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand p,
.meta,
.status-copy,
.hint,
.error {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, #221f1a, var(--panel));
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid #4a4335;
  background: #0e0d0b;
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
}

input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1408;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 18px;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--panel-edge);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.home-actions {
  margin-top: 24px;
}

.camper-stage {
  position: relative;
  height: 300px;
  margin: 20px 0 8px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(226, 165, 58, 0.08), transparent 55%),
    #100f0c;
  border: 1px solid #3d362b;
  border-radius: 14px;
  perspective: 900px;
}

.camper-horizon {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 78px;
  border-top: 1px dashed #3d362b;
}

.camper-ground {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1814;
  box-shadow: 0 0 0 1px #2a261d;
}

.camper-rig {
  position: absolute;
  inset: 8px 12px 46px;
  display: grid;
  place-items: center;
  transform-origin: 56% 72%;
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

.camper-svg {
  width: min(100%, 640px);
  height: auto;
  overflow: visible;
}

.camper-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.gauges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.gauge {
  background: #100f0c;
  border: 1px solid #3d362b;
  border-radius: 14px;
  padding: 16px;
}

.gauge .label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gauge .value {
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.1;
  margin: 8px 0 14px;
}

.tube {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: #2a261d;
  overflow: hidden;
}

.bubble {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 28px;
  height: 14px;
  border-radius: 999px;
  background: #f3d27a;
  transform: translateX(-50%);
  transition: left 180ms ease;
}

.pill {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.pill.level {
  background: rgba(124, 219, 138, 0.16);
  color: var(--good);
}

.pill.adjust {
  background: rgba(226, 165, 58, 0.16);
  color: var(--warn);
}

.status-block {
  border-top: 1px dashed #3d362b;
  padding-top: 16px;
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  white-space: pre-wrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bad);
}

.dot.on {
  background: var(--good);
}

.error {
  color: var(--bad);
  margin-top: 12px;
}

@media (max-width: 720px) {
  .gauges {
    grid-template-columns: 1fr;
  }

  .brand {
    flex-direction: column;
  }
}
