:root {
  --dark: #171A1C;
  --yellow: #FFD400;
  --paper: #F5F4EF;
  --grey: #73787C;
  --steel: #D4D7D8;
  --green: #168A55;
  --red: #D83A2E;
  --ink: #111314;
  --dock: 76px;
  --safe: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 Arial, Helvetica, sans-serif;
  padding-bottom: calc(var(--dock) + var(--safe));
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.skip {
  position: absolute; left: -999px; top: 8px;
}
.skip:focus { left: 8px; background: var(--yellow); padding: 8px 12px; z-index: 20; }

.top {
  background: var(--dark);
  color: #fff;
  padding: 14px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 8;
}
.brand {
  text-decoration: none;
  font-size: 22px;
  letter-spacing: 1px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.pin { color: var(--yellow); font-size: 28px; line-height: 1; }
.chip {
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  color: #cfd4d6;
  border: 1px solid #3a3f42;
  border-radius: 999px;
  padding: 6px 10px;
}

.app { max-width: 980px; margin: 0 auto; padding: 20px 5% 28px; }
.hero { text-align: center; padding: 8px 0 6px; }
.eyebrow {
  font-weight: 800;
  letter-spacing: 1.4px;
  font-size: 11px;
  color: var(--grey);
  margin: 0;
}
h1 { font-size: clamp(36px, 9vw, 68px); line-height: 0.95; margin: 10px 0 22px; }
h2 { font-size: 26px; margin: 0 0 8px; }
h3 { font-size: 18px; margin: 0 0 8px; }
.lede { color: var(--grey); margin: 0 0 16px; }

.search {
  display: flex;
  max-width: 720px;
  margin: 0 auto;
}
.search input {
  flex: 1;
  min-width: 0;
  padding: 16px;
  border: 2px solid var(--dark);
  border-radius: 10px 0 0 10px;
  background: #fff;
}
.search button, .btn {
  border: 0;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 900;
  padding: 14px 18px;
  border-radius: 10px;
}
.search button { border-radius: 0 10px 10px 0; }
.btn.ghost {
  background: #fff;
  border: 2px solid var(--dark);
}
.btn.block { width: 100%; }
.btn.dark { background: var(--dark); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 8px;
}
.tools button, .mod {
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 12px;
  padding: 14px 8px;
  min-height: 76px;
}
.tools .sym { display: block; font-size: 24px; }
.tools span { display: block; font-size: 12px; font-weight: 800; margin-top: 4px; }

.card {
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 14px;
  overflow: hidden;
  margin: 16px 0;
}
.card-h {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.card-h small { display: block; color: var(--grey); }
.pad { padding: 16px; }

.mapbox {
  height: 52vh;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(35deg, #e8e6df, #d8ddd7);
}
.mapbox.live { background: #dce3dc; }
.road { position: absolute; background: #fff; border: 1px solid #c6c8c5; }
.r1 { width: 120%; height: 44px; left: -10%; top: 46%; transform: rotate(-8deg); }
.r2 { height: 130%; width: 38px; left: 66%; top: -15%; transform: rotate(10deg); }
.shed {
  position: absolute;
  background: #b8bdba;
  border: 2px solid #8f9691;
  padding: 14px;
  font-weight: 900;
  font-size: 11px;
  color: #333;
}
.s1 { left: 16%; top: 16%; width: 28%; height: 96px; }
.s2 { right: 8%; bottom: 14%; width: 24%; height: 108px; }
.marker {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 0;
  background: transparent;
  padding: 0;
}
.marker .head {
  width: 54px;
  height: 54px;
  border-radius: 50% 50% 50% 8px;
  transform: rotate(-45deg);
  background: var(--yellow);
  border: 3px solid var(--dark);
  display: grid;
  place-items: center;
}
.marker .head .glyph { transform: rotate(45deg); font-size: 22px; line-height: 1; }
.m1 { left: 28%; top: 34%; }
.m2 { left: 58%; top: 18%; }
.m3 { left: 70%; top: 60%; }
.mapnote {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(23,26,28,.92);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}
.legend {
  display: flex;
  gap: 14px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 800;
  flex-wrap: wrap;
}
.layers {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 10px;
  -webkit-overflow-scrolling: touch;
}
.layers button {
  flex: 0 0 auto;
  border: 2px solid var(--dark);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  min-height: 44px;
}
.layers button[aria-pressed="true"] {
  background: var(--yellow);
}
.chip-btn {
  flex: 0 0 auto;
  text-decoration: none;
  border: 2px solid var(--dark);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.chip-btn.on { background: var(--yellow); }
.cafe-card { display: block; }
.cafe-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cafe-sym { font-size: 28px; line-height: 1; }
.cafe-stage {
  font-size: 12px;
  font-weight: 800;
  background: var(--paper);
  border: 2px solid var(--dark);
  border-radius: 999px;
  padding: 4px 10px;
}
.btn.slim {
  display: inline-flex;
  margin-top: 10px;
  min-height: 44px;
  padding: 8px 16px;
  width: auto;
}
.mapbox .leaflet-container {
  height: 100%;
  width: 100%;
  font: inherit;
}
.bs-pin { background: transparent; border: 0; }
.bs-pin-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--dark);
  font-size: 20px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 var(--dark);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--steel);
  background: #fff;
}
.badge.ok { color: var(--green); border-color: #b7ddc8; background: #eef8f2; }
.badge.off { color: var(--grey); }
.badge.warn { color: var(--red); border-color: #f0b7b2; background: #fdeeee; }

.owner {
  margin: 18px 0;
  background: var(--dark);
  color: #fff;
  border-radius: 14px;
  padding: 22px;
}
.owner p { color: #d8dbdc; margin: 8px 0 16px; max-width: 640px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

.field { display: grid; gap: 6px; margin: 0 0 12px; }
.field label { font-size: 12px; font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--dark);
  border-radius: 10px;
  background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }

.list { display: grid; gap: 10px; }
.item {
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  width: 100%;
}
.item b { display: block; }
.muted { color: var(--grey); font-size: 13px; }
.empty {
  background: #fff;
  border: 1px dashed var(--steel);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.kvs { display: grid; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--steel); padding: 8px 0; }
.kv span { color: var(--grey); font-size: 13px; }
.steps { display: flex; gap: 6px; overflow: auto; padding: 4px 0 10px; }
.step {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 999px;
  padding: 6px 10px;
}
.step.on { background: var(--yellow); border-color: var(--dark); }
.mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mod { text-align: center; min-height: 88px; }
.mod.hidden { opacity: 0.35; }
.notice {
  background: #fff8d6;
  border: 1px solid #e2c200;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  margin: 0 0 14px;
}
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--dock) + var(--safe));
  padding-bottom: var(--safe);
  background: #fff;
  border-top: 1px solid var(--steel);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 9;
}
.dock a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 18px;
  color: var(--grey);
}
.dock span { font-size: 11px; font-weight: 800; }
.dock a.active { color: var(--dark); }
.hidden { display: none !important; }
footer.note { text-align: center; color: var(--grey); font-size: 12px; padding: 8px 0 0; }

.item.tap { text-decoration: none; display: block; }
.track {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 0;
  margin: 0 0 16px;
}
.track li {
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}
.track li i {
  display: block;
  font-style: normal;
  font-size: 14px;
}
.track li.on { background: var(--yellow); border-color: var(--dark); }
.track li.done { background: #eef8f2; border-color: #b7ddc8; }
.seal {
  background: var(--dark);
  color: #fff;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  margin: 0 0 16px;
}
.seal .cash {
  font-size: 42px;
  font-weight: 900;
  margin: 8px 0;
  color: var(--yellow);
}
.seal.done { background: #0f3d28; }
.stars { display: flex; justify-content: center; gap: 8px; margin: 8px 0 14px; }
.star {
  border: 0;
  background: transparent;
  font-size: 36px;
  color: var(--steel);
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
}
.star.on { color: var(--yellow); }
.shake-pick { margin-top: 10px; }

@media (min-width: 760px) {
  .tools { grid-template-columns: repeat(9, 1fr); }
  .mapbox { height: 420px; }
  .owner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
  .owner .btn { white-space: nowrap; }
}
