#phone .police-phone {
  display: grid;
  gap: 10px;
  color: var(--b-ink);
}

.police-phone-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r);
  background: var(--b-raise);
}

.police-phone-crest, .police-phone-symbol {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r);
  background: var(--b-well);
  color: var(--b-info);
}

.police-phone-crest { color: var(--b-accent); }
.police-phone-crest .hud-icon, .police-phone-symbol .hud-icon { width: 23px; height: 23px; }
.police-phone-heading { min-width: 0; }
.police-phone-heading h2 { margin: 2px 0 3px; font-size: var(--b-t-l); line-height: 1.16; font-weight: 900; }
.police-phone-duty { margin: 0; color: var(--b-muted); font-size: var(--b-t-xs); line-height: 1.25; }
.police-phone-connection {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--b-muted);
  font-size: var(--b-t-xs);
  line-height: 1.25;
  font-weight: 700;
}
.police-phone-connection[data-live="true"] { color: var(--b-good); }
.police-phone-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }

.police-phone-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r);
  background: var(--b-well);
}

#phone .police-phone-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--b-tap);
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: var(--b-r-s);
  background: transparent;
  color: var(--b-muted);
  font-size: var(--b-t-xs);
  font-weight: 800;
}

#phone .police-phone-tabs button[aria-pressed="true"] {
  border-color: var(--b-line);
  background: var(--b-raise);
  color: var(--b-ink);
}

.police-phone-tabs .hud-icon, .police-phone-reply .hud-icon { width: 16px; height: 16px; flex: none; color: var(--b-info); }
.police-phone-section { min-width: 0; }
.police-phone-section[hidden], .police-phone-reply[hidden], #phone .police-phone-report[hidden] { display: none; }

.police-phone-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.police-phone-section-head h3, .police-phone-unit-group h3 { margin: 0; font-size: var(--b-t-s); font-weight: 900; }

#phone .police-phone-refresh {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--b-tap);
  min-height: var(--b-tap);
  padding: 0;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r-s);
  background: var(--b-well);
  color: var(--b-info);
}

#phone .police-phone-tabs button:not([aria-pressed="true"]):hover,
#phone .police-phone-refresh:not(:disabled):hover { background: var(--b-raise); }
.police-phone-refresh .hud-icon { width: 19px; height: 19px; }

.police-phone-results { display: grid; gap: 8px; }
.police-phone-state, .police-phone-car {
  min-width: 0;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r);
  background: var(--b-well);
}

.police-phone-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 16px 12px;
  text-align: center;
}
.police-phone-state .police-phone-symbol { margin-bottom: 3px; background: var(--b-raise); }
.police-phone-state[data-tone="clear"] .police-phone-symbol { color: var(--b-good); }
.police-phone-state[data-tone="waiting"] .police-phone-symbol { color: var(--b-accent); }
.police-phone-state strong { font-size: var(--b-t-s); font-weight: 900; }
.police-phone-state p, .police-phone-instruction, .police-phone-car-reason {
  margin: 0;
  color: var(--b-muted);
  font-size: var(--b-t-xs);
  line-height: 1.4;
}
.police-phone-state p:empty { display: none; }

.police-phone-instruction { padding: 0 1px 2px; }
.police-phone-car { display: grid; gap: 7px; padding: 10px; }
.police-phone-car-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.police-phone-car-model { display: grid; justify-items: start; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.police-phone-car-model strong { font-size: var(--b-t-s); line-height: 1.25; font-weight: 900; }
.police-phone-plate {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--b-ink);
  color: var(--b-scene);
  font: 700 var(--b-t-xs)/1.2 ui-monospace, monospace;
  letter-spacing: .02em;
}
.police-phone-distance, .police-phone-car-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--b-info);
  font-size: var(--b-t-xs);
  font-weight: 800;
}
.police-phone-distance { flex: none; white-space: nowrap; }
.police-phone-car-progress { margin: 0; padding-top: 7px; border-top: 1px solid var(--b-line); }
.police-phone-distance .hud-icon, .police-phone-car-progress .hud-icon { width: 15px; height: 15px; flex: none; }

#phone .police-phone-report {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: var(--b-tap);
  padding: 6px 8px;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r-s);
  background: var(--b-raise);
  color: var(--b-ink);
  font-size: var(--b-t-xs);
  font-weight: 900;
}
#phone .police-phone-report:not(:disabled):hover { background: var(--b-btn); }
#phone .police-phone-report.primary {
  border-color: var(--b-accent);
  background: var(--b-accent);
  color: var(--b-accent-ink);
}
#phone .police-phone-report.primary:not(:disabled):hover { background: var(--b-ink); }
.police-phone-report .hud-icon { width: 17px; height: 17px; flex: none; }

.police-phone-reply {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 8px;
  padding: 9px 10px;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r-s);
  background: var(--b-raise);
  color: var(--b-ink);
}
.police-phone-reply p { margin: 0; font-size: var(--b-t-xs); line-height: 1.4; }
.police-phone-reply .hud-icon { margin-top: 1px; }

.police-phone-unit-group + .police-phone-unit-group { margin-top: 12px; }
.police-phone-unit-group h3 { margin: 2px 1px 6px; }
.police-phone-units {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r);
  background: var(--b-well);
}
.police-phone-unit {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 5px 8px;
}
.police-phone-unit + .police-phone-unit { border-top: 1px solid var(--b-line); }
.police-phone-unit-number {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 30px;
  border: 1px solid var(--b-line);
  border-radius: var(--b-r-s);
  background: var(--b-raise);
  color: var(--b-info);
  font: 800 var(--b-t-xs)/1 ui-monospace, monospace;
}
.police-phone-unit-text { min-width: 0; overflow-wrap: anywhere; }
.police-phone-unit-text strong { display: block; font-size: var(--b-t-xs); line-height: 1.25; font-weight: 900; }
.police-phone-activity {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 3px;
  color: var(--b-muted);
  font-size: var(--b-t-xs);
  line-height: 1.2;
}
.police-phone-activity::before { content: ''; width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor; }
.police-phone-activity[data-tone="patrol"] { color: var(--b-good); }
.police-phone-activity[data-tone="waiting"] { color: var(--b-accent); }
.police-phone-activity[data-tone="active"] { color: var(--b-info); }


@media (max-height: 500px) and (orientation: landscape) {
  #phone .police-phone { max-width: 560px; margin: 0 auto; gap: 8px; }
  .police-phone-hero { padding-block: 10px; }
  .police-phone-crew-section:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
  }
  .police-phone-crew-section .police-phone-unit-group { margin-top: 0; }
  .police-phone-crew-section > .police-phone-state { grid-column: 1 / -1; }
}
