/* =========================================================================
   styles.css — Branch Site Selection tool
   ========================================================================= */

:root {
  --navy:      #0d1b2a;
  --navy-2:    #16293d;
  --ink:       #14181d;
  --muted:     #5b6673;
  --line:      #d8dee6;
  --line-soft: #eef1f5;
  --paper:     #ffffff;
  --wash:      #f5f7fa;

  --bank:      #c0392b;
  --own:       #8e44ad;
  --dealer:    #1f6feb;
  --green:     #0a7d3f;
  --amber:     #e08a00;

  --side-w:    392px;
  --radius:    9px;
  --shadow:    0 2px 8px rgba(13, 27, 42, .08);
  --shadow-lg: 0 12px 32px rgba(13, 27, 42, .16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
}
body {
  display: flex; flex-direction: column;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--wash);
  -webkit-font-smoothing: antialiased;
}

/* ---- sign-in gate ---------------------------------------------------- */
.gate {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  overflow-y: auto;
  background: linear-gradient(150deg, #0d1b2a 0%, #16293d 55%, #0a3d28 100%);
}
/* place-items:center clips the card top when it is taller than the viewport;
   margin:auto centring degrades gracefully to scrollable instead. */
.gate__card { margin: auto; }
.gate[hidden] { display: none; }
body.is-gated { overflow: hidden; }

.gate__card {
  width: 100%; max-width: 400px; text-align: center;
  background: var(--paper); border-radius: 16px;
  padding: 40px 34px 30px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .38);
}
.gate__mark {
  width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 14px;
  background: linear-gradient(140deg, #1f6feb, var(--green));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 22px; letter-spacing: .5px;
}
.gate__name    { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -.4px; }
.gate__tagline {
  margin: 5px 0 0; font-size: 13px; font-weight: 600;
  color: var(--green); letter-spacing: .8px; text-transform: uppercase;
}
.gate__blurb   { margin: 16px 0 24px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.gbtn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper);
  font: 600 14px Inter, sans-serif; color: #3c4043; cursor: pointer;
  transition: .14s;
}
.gbtn:hover:not(:disabled) { background: var(--wash); box-shadow: var(--shadow); }
.gbtn:disabled { opacity: .55; cursor: not-allowed; }

.gate__msg {
  margin-top: 16px; padding: 11px 13px; border-radius: var(--radius);
  background: #fdf3f2; border: 1px solid #f0cfcb; color: #8c1d18;
  font-size: 12.5px; line-height: 1.55; text-align: left;
}
.gate__msg[hidden] { display: none; }
.gate__foot {
  margin: 22px 0 0; font-size: 10.5px; color: var(--muted);
  line-height: 1.55; border-top: 1px solid var(--line-soft); padding-top: 14px;
}

/* ---- signed-in identity in the sidebar ------------------------------- */
.brand__text { flex: 1; min-width: 0; }
.brand__out {
  flex: none; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  font: 600 11px Inter, sans-serif; padding: 5px 9px;
  border-radius: 6px; cursor: pointer;
}
.brand__out:hover { background: rgba(255, 255, 255, .22); }
.brand__out[hidden] { display: none; }
.whoami {
  margin-top: 10px; font-size: 11px; color: #9fb3c8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.whoami[hidden] { display: none; }

/* ---- mock-up banner ------------------------------------------------- */
.mock-banner {
  position: relative; z-index: 40;
  background: #fff4e5; border-bottom: 1px solid #f0d3a8;
  color: #7a4b06; font-size: 12.5px;
  padding: 8px 40px 8px 16px; text-align: center;
}
.mock-banner__x {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; font-size: 20px; line-height: 1;
  color: #7a4b06; cursor: pointer; padding: 0 8px; opacity: .6;
}
.mock-banner__x:hover { opacity: 1; }
.mock-banner[hidden] { display: none; }

/* ---- shell ---------------------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  flex: 1;
  min-height: 0;   /* body is a flex column; the banner takes its natural height */
}

.side {
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  min-height: 0;
}
.side__scroll { overflow-y: auto; padding: 4px 0 0; flex: 1; }
.side__scroll::-webkit-scrollbar { width: 9px; }
.side__scroll::-webkit-scrollbar-thumb { background: #cfd6de; border-radius: 5px; }

.side__head {
  background: var(--navy); color: #fff;
  padding: 16px 20px; flex: none;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, #1f6feb, var(--green));
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; letter-spacing: .5px;
}
.brand__name { font-weight: 700; font-size: 15px; }
.brand__sub  { font-size: 12px; color: #9fb3c8; margin-top: 1px; }

.side__foot {
  padding: 16px 20px 24px;
  font-size: 11px; color: var(--muted); line-height: 1.5;
  border-top: 1px solid var(--line-soft);
}

/* ---- steps ---------------------------------------------------------- */
.step { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.step__title {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 12px;
}
.step__n {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex: none;
}
.hint { font-size: 11.5px; color: var(--muted); margin: 9px 0 0; line-height: 1.5; }

/* ---- buttons -------------------------------------------------------- */
.btn {
  font: 600 13px/1 Inter, sans-serif;
  padding: 9px 13px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  cursor: pointer; transition: .13s;
}
.btn:hover:not(:disabled) { background: var(--wash); border-color: #b9c3ce; }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn--block { width: 100%; margin-bottom: 8px; padding: 11px 13px; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--navy-2); border-color: var(--navy-2); }
.btn--accent { background: var(--green); border-color: var(--green); color: #fff; }
.btn--accent:hover:not(:disabled) { filter: brightness(1.12); }
.btn--ghost { background: var(--paper); }
.btn--danger { color: var(--bank); border-color: #f0cfcb; }
.btn--danger:hover:not(:disabled) { background: #fdf3f2; }
.btn--tool { flex: 1; }
.btn--tool.is-active {
  background: var(--green); border-color: var(--green); color: #fff;
}
.btn--icon { padding: 9px 12px; flex: none; }
.btn--tiny { padding: 4px 9px; font-size: 11px; margin-left: 10px; }
.btn-row { display: flex; gap: 7px; margin-bottom: 8px; }

.select {
  font: 500 13px Inter, sans-serif; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); width: 100%; cursor: pointer;
}
.select--sm { width: 108px; flex: none; }
.field { margin-top: 14px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 6px;
}

/* ---- search --------------------------------------------------------- */
.search { display: flex; gap: 7px; position: relative; }
.search input {
  flex: 1; font: 400 13.5px Inter, sans-serif; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); min-width: 0;
}
.search input:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13, 27, 42, .09);
}
.suggest {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 30;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 260px; overflow-y: auto;
}
.suggest__item {
  padding: 9px 12px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
}
.suggest__item:last-child { border-bottom: 0; }
.suggest__item:hover { background: var(--wash); }
.suggest__item small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* ---- zone stat ------------------------------------------------------ */
.zone-stat {
  margin-top: 11px; padding: 11px 13px;
  background: var(--wash); border: 1px solid var(--line-soft);
  border-radius: var(--radius); font-size: 12.5px; line-height: 1.65;
}
.zone-stat__empty { color: var(--muted); }
.zone-stat b { font-variant-numeric: tabular-nums; }

/* ---- progress + counts ---------------------------------------------- */
.progress { margin-top: 12px; }
.progress__bar {
  height: 6px; background: var(--line-soft);
  border-radius: 3px; overflow: hidden;
}
.progress__bar i {
  display: block; height: 100%; width: 0%;
  background: var(--green); transition: width .25s;
}
.progress__label { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.count {
  padding: 10px 8px; border-radius: var(--radius);
  border: 1px solid var(--line-soft); background: var(--wash); text-align: center;
}
.count b { display: block; font-size: 19px; font-weight: 800; line-height: 1.15; }
.count span { font-size: 10.5px; color: var(--muted); display: block; margin-top: 3px; }
.count--bank b   { color: var(--bank); }
.count--own b    { color: var(--own); }
.count--dealer b { color: var(--dealer); }

/* ---- sliders -------------------------------------------------------- */
.slider { margin-bottom: 15px; }
.slider label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 600; margin-bottom: 5px;
}
.slider label b {
  font-variant-numeric: tabular-nums; color: var(--green);
  font-size: 13px; background: #eaf6ef; padding: 1px 7px; border-radius: 5px;
}
.slider input[type=range] { width: 100%; accent-color: var(--green); margin: 0; }
.slider__note { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---- site cards ----------------------------------------------------- */
.cards { margin-top: 4px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden; background: var(--paper);
  cursor: pointer; transition: .13s;
}
.card:hover { box-shadow: var(--shadow); border-color: #b9c3ce; }
.card--best { border-color: var(--green); border-width: 1.5px; }

.card__top {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px; background: var(--wash);
}
.card--best .card__top { background: #f0f9f3; }
.card__badge {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff; background: var(--amber);
}
.card--best .card__badge { background: var(--green); }
.card__lead { flex: 1; min-width: 0; }
.card__rank { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; color: var(--muted); }
.card--best .card__rank { color: var(--green); }
.card__addr {
  font-size: 12.5px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__score { text-align: right; flex: none; }
.card__score b { font-size: 21px; font-weight: 800; line-height: 1; }
.card__score span { font-size: 10px; color: var(--muted); display: block; }

.card__bars { padding: 11px 13px 4px; }
.bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; }
.bar__label { width: 96px; color: var(--muted); flex: none; }
.bar__track { flex: 1; height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.bar__fill { height: 100%; background: var(--navy); border-radius: 3px; }
.bar__val { width: 30px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }

.card__reason { padding: 4px 13px 13px; }
.reason { font-size: 12px; line-height: 1.6; margin-bottom: 8px; color: #2c3540; }
.reason b {
  display: inline-block; font-size: 10px; letter-spacing: .5px;
  text-transform: uppercase; color: var(--green);
  background: #eaf6ef; padding: 2px 6px; border-radius: 4px; margin-right: 6px;
}
.card--alt .reason b { color: #8a5600; background: #fdf3e3; }

/* ---- AI ------------------------------------------------------------- */
.ai { margin-top: 12px; }
.ai__out {
  margin-top: 10px; padding: 14px;
  background: var(--wash); border: 1px solid var(--line-soft);
  border-radius: var(--radius); font-size: 12.5px; line-height: 1.65;
  max-height: 460px; overflow-y: auto;
}
.ai__out h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--green); margin: 14px 0 6px;
}
.ai__out h3:first-child { margin-top: 0; }
.ai__out ul { margin: 6px 0; padding-left: 18px; }
.ai__out li { margin-bottom: 5px; }
.ai__out p { margin: 0 0 8px; }

/* ---- map ------------------------------------------------------------ */
.main { position: relative; min-width: 0; }
.map { position: absolute; inset: 0; }

.map-overlay {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 5; background: var(--navy); color: #fff;
  padding: 9px 14px; border-radius: var(--radius);
  font-size: 12.5px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center;
}
.map-overlay .btn--tiny {
  background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff;
}
.demo-flag {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  background: #fff4e5; border: 1px solid #f0d3a8; color: #7a4b06;
  padding: 7px 12px; border-radius: var(--radius);
  font-size: 11.5px; font-weight: 600; box-shadow: var(--shadow);
}

/* ---- map pins ------------------------------------------------------- */
.gm-pin {
  display: flex; align-items: center; gap: 5px;
  transform: translate(0, 0); cursor: pointer; white-space: nowrap;
}
.gm-pin--faded { opacity: .55; }
.gm-pin__dot {
  width: 25px; height: 25px; border-radius: 50%; flex: none;
  background: var(--pin); color: #fff;
  display: grid; place-items: center;
  font: 700 10.5px Inter, sans-serif;
  border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.32);
}
.gm-pin__name {
  font: 600 10.5px Inter, sans-serif; color: #1a2129;
  background: rgba(255,255,255,.93);
  padding: 2px 6px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,.09);
  box-shadow: 0 1px 3px rgba(0,0,0,.13);
}
/* While a draw tool is armed, nothing on the map may intercept the pointer —
   otherwise pins and their labels swallow the clicks that place vertices. */
.is-drawing .gm-pin,
.is-drawing .gm-site { pointer-events: none !important; }

.gm-pin:hover { z-index: 500; }
.gm-pin:hover .gm-pin__dot { transform: scale(1.14); }

.gm-site { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.gm-site__badge {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--pin); color: #fff;
  display: grid; place-items: center;
  font: 800 17px Inter, sans-serif;
  border: 3.5px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.34);
}
.gm-site--best .gm-site__badge {
  width: 46px; height: 46px; font-size: 21px;
  animation: pulse 2.1s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 3px 12px rgba(0,0,0,.34), 0 0 0 0 rgba(10,125,63,.42); }
  70%  { box-shadow: 0 3px 12px rgba(0,0,0,.34), 0 0 0 20px rgba(10,125,63,0); }
  100% { box-shadow: 0 3px 12px rgba(0,0,0,.34), 0 0 0 0 rgba(10,125,63,0); }
}
.gm-site__meta {
  margin-top: 4px; font: 700 10px Inter, sans-serif;
  background: var(--pin); color: #fff;
  padding: 3px 8px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
}

/* ---- drawer --------------------------------------------------------- */
.drawer {
  position: absolute; left: 14px; bottom: 14px; z-index: 6;
  width: 420px; max-width: calc(100% - 28px);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.drawer__grip {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; background: var(--paper); border: 0;
  font: 700 13px Inter, sans-serif; color: var(--ink); cursor: pointer;
}
.drawer__grip:hover { background: var(--wash); }
.drawer__chev { color: var(--muted); transition: .2s; }
.drawer.is-open .drawer__chev { transform: rotate(180deg); }
.drawer__body { display: none; border-top: 1px solid var(--line-soft); }
.drawer.is-open .drawer__body { display: block; }

.tabs { display: flex; border-bottom: 1px solid var(--line-soft); }
.tab {
  flex: 1; padding: 10px; background: none; border: 0;
  border-bottom: 2px solid transparent;
  font: 600 12.5px Inter, sans-serif; color: var(--muted); cursor: pointer;
}
.tab.is-active { color: var(--ink); border-bottom-color: var(--navy); }
.tab b {
  margin-left: 5px; background: var(--wash); color: var(--muted);
  padding: 1px 6px; border-radius: 9px; font-size: 11px;
}

.list { max-height: 300px; overflow-y: auto; }
.row {
  display: flex; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft); cursor: pointer;
}
.row:hover { background: var(--wash); }
.row--faded { opacity: .6; }
.row__idx {
  width: 30px; height: 19px; border-radius: 9px; flex: none;
  display: grid; place-items: center; margin-top: 1px;
  font: 700 10px Inter, sans-serif; color: #fff;
}
.row__body { min-width: 0; flex: 1; }
.row__name {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row__addr { font-size: 11px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.row__meta {
  font-size: 10px; color: var(--muted); flex: none; text-align: right;
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.list__empty { padding: 20px 14px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---- toast ---------------------------------------------------------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 100; max-width: 620px;
  background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: var(--radius);
  font-size: 13px; line-height: 1.5; box-shadow: var(--shadow-lg);
}
.toast--error { background: #8c1d18; }
.toast--ok    { background: var(--green); }
.toast[hidden] { display: none; }


/* ---- drawing aids ----------------------------------------------------- */
.gm-vertex {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.draw-count {
  background: rgba(255,255,255,.16); border-radius: 6px;
  padding: 3px 8px; font: 700 11.5px Inter, sans-serif;
  margin-left: 8px; white-space: nowrap;
}
.draw-count[hidden] { display: none; }

/* The Finish button is the way out of drawing mode — make it unmissable. */
.btn--finish {
  background: var(--green); border-color: var(--green); color: #fff;
  font: 700 13px Inter, sans-serif; padding: 8px 16px; margin-left: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.btn--finish:hover:not(:disabled) { filter: brightness(1.15); }
.btn--finish:disabled { opacity: .45; }
.btn--finish[hidden] { display: none; }

/* ---- export layer choices --------------------------------------------- */
.layers {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  margin-bottom: 10px; font-size: 12px;
}
.layers__label { color: var(--muted); font-weight: 600; width: 100%; margin-bottom: 2px; }
.layers__opt { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.layers__opt input { accent-color: var(--green); }

/* ---- list checkboxes + agent sub-rows ---------------------------------- */
.row__check {
  flex: none; margin: 2px 6px 0 0; accent-color: var(--green);
  width: 15px; height: 15px; cursor: pointer;
}
.row--off { opacity: .48; }
.row--off .row__name { text-decoration: line-through; text-decoration-thickness: 1px; }
.row__seg {
  display: inline-block; font-size: 9.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px; margin-left: 6px;
  background: var(--wash); color: var(--muted); border: 1px solid var(--line-soft);
  vertical-align: 1px; white-space: nowrap;
}
.row__seg--warn { background: #fdf3e3; color: #8a5600; border-color: #f0d3a8; }
.row__phone { color: var(--dealer); font-variant-numeric: tabular-nums; }
.row--sub {
  padding-left: 46px; background: #fafbfc;
  border-left: 3px solid var(--line);
}
.row--sub .row__name { font-weight: 500; font-size: 11.5px; }

/* =========================================================================
   MOBILE — map on top, controls below, smaller type. Fonts shrink ONLY here.
   ========================================================================= */
@media (max-width: 768px) {
  .app { display: flex; flex-direction: column; height: 100%; }
  .main { order: -1; height: 47vh; min-height: 300px; flex: none; }
  .side {
    flex: 1; min-height: 0; border-right: 0;
    border-top: 1px solid var(--line);
  }

  /* type scale down */
  body { font-size: 12px; }
  .btn { font-size: 12px; padding: 8px 10px; }
  .btn--block { padding: 10px 10px; }
  .select, .search input { font-size: 12px; padding: 8px 9px; }
  .step { padding: 12px 14px; }
  .step__title { font-size: 11.5px; margin-bottom: 9px; }
  .step__n { width: 17px; height: 17px; font-size: 10px; }
  .hint { font-size: 10.5px; }
  .zone-stat { font-size: 11px; padding: 9px 10px; }
  .slider label { font-size: 11.5px; }
  .slider__note { font-size: 10px; }
  .field label { font-size: 11px; }
  .layers { font-size: 11px; }

  .side__head { padding: 10px 14px; }
  .brand__mark { width: 32px; height: 32px; font-size: 12px; border-radius: 7px; }
  .brand__name { font-size: 13px; }
  .brand__sub { font-size: 10.5px; }
  .whoami { font-size: 10px; margin-top: 6px; }

  .counts { gap: 5px; }
  .count { padding: 8px 5px; }
  .count b { font-size: 16px; }
  .count span { font-size: 9px; }

  .card__badge { width: 28px; height: 28px; font-size: 13px; }
  .card__score b { font-size: 17px; }
  .card__addr { font-size: 11px; }
  .reason { font-size: 11px; }
  .bar { font-size: 10px; }
  .bar__label { width: 82px; }

  /* results drawer: full-width sheet over the map's lower half */
  .drawer { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .drawer__grip { padding: 9px 12px; font-size: 12px; }
  .tab { font-size: 11.5px; padding: 8px; }
  .list { max-height: 24vh; }   /* the open drawer must not bury the map */
  .row { padding: 8px 10px; }
  .row__name { font-size: 11.5px; }
  .row__addr { font-size: 10px; }
  .row--sub { padding-left: 36px; }
  .row__check { width: 20px; height: 20px; }   /* finger-sized */
  .layers__opt { padding: 6px 0; }
  .layers__opt input { width: 18px; height: 18px; }

  .map-overlay {
    top: 8px; left: 8px; right: 8px; transform: none;
    font-size: 11px; padding: 8px 10px;
    flex-wrap: wrap; gap: 6px; justify-content: center;
  }
  .btn--finish { font-size: 12px; padding: 7px 13px; margin-left: 0; }
  .demo-flag { top: 8px; right: 8px; bottom: auto; font-size: 10px; padding: 5px 8px; }

  .toast { font-size: 12px; max-width: calc(100% - 24px); bottom: 12px; }

  .gate__card { padding: 30px 22px 22px; }
  .gate__name { font-size: 23px; }
  .gate__blurb { font-size: 12px; }

  .side__foot { font-size: 10px; padding: 12px 14px 18px; }
}
