:root {
  --bg: #1a1814;
  --panel: #241f1a;
  --panel-2: #2c261f;
  --line: #3d362c;
  --text: #f6f1e8;
  --muted: #b7aa96;
  --yellow: #e6c200;
  --green: #3c8f45;
  --green-press: #2f7336;
  --danger: #c4564a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  min-height: 100%;
}

button, input {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100vh;
  height: 100dvh;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 20px 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: auto;
}

.eyebrow {
  margin: 0;
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow a {
  color: inherit;
  text-decoration: none;
}

.eyebrow a:hover { text-decoration: underline; }

h1 {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.search {
  display: flex;
  gap: 8px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
}

.search input:focus {
  outline: 2px solid var(--yellow);
  border-color: transparent;
}

.actions, .downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  color: var(--text);
  background: var(--panel-2);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.primary {
  background: var(--green);
  color: #f7fff4;
  font-weight: 650;
}

button.primary:hover:not(:disabled) { background: var(--green-press); }

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.acres {
  padding: 14px;
  border-radius: 14px;
  background: #1c1814;
  border: 1px solid var(--line);
}

.acres b {
  display: block;
  margin-top: 2px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.acres span, .status {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.status.warn { color: #e7b3a4; }
.status.ok { color: #b7d7ae; }

.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.map-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
}

#map {
  position: absolute;
  inset: 0;
  background: #14110e;
}

.key-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 15, 12, 0.72);
  z-index: 5;
}

.key-card {
  width: min(440px, 100%);
  padding: 22px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.key-card label {
  display: block;
  margin: 14px 0 8px;
  color: var(--muted);
}

.key-card input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
}

.fine {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hidden { display: none !important; }

@media (max-width: 800px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .map-wrap { order: 0; min-height: 52vh; }

  .panel {
    order: 1;
    max-height: 48vh;
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: var(--shadow);
  }
}
