* { box-sizing: border-box; }

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --panel: rgba(18, 25, 31, 0.91);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f7f8f9;
  --muted: #c3cbd0;
}

html, body, #app, #map {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body { background: #d8e0e2; }
#app { position: relative; isolation: isolate; }
#map { position: absolute; inset: 0; }

.brand-panel {
  position: absolute;
  z-index: 10;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 17px 13px 13px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  flex: 0 0 51px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 11px;
  font-weight: 800;
  letter-spacing: -.06em;
  font-size: 18px;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(14px, 1.7vw, 18px);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.brand-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.map-actions {
  position: absolute;
  z-index: 10;
  top: max(104px, calc(env(safe-area-inset-top) + 88px));
  left: max(16px, env(safe-area-inset-left));
}
button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(20, 29, 35, .16);
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  color: #182127;
  font: 600 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 3px 12px rgba(0,0,0,.14);
  cursor: pointer;
}
button:hover { background: white; }
button:focus-visible { outline: 3px solid #1677ff; outline-offset: 2px; }
button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(88vw, 460px);
  padding: 12px 16px;
  border-radius: 10px;
  color: white;
  background: rgba(18,25,31,.88);
  font-size: 13px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.status.hidden { display: none; }
.status.error { background: rgba(112, 30, 28, .94); }

.map-footer {
  position: absolute;
  z-index: 10;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-shadow: 0 1px 5px rgba(0,0,0,.9);
  pointer-events: none;
}
.map-footer span:last-child {
  font-weight: 500;
  letter-spacing: .02em;
  text-align: right;
}

@media (max-width: 520px) {
  .brand-panel { gap: 10px; padding: 10px 12px 10px 10px; }
  .brand-mark { width: 43px; height: 43px; flex-basis: 43px; font-size: 16px; }
  .brand-copy p { max-width: 250px; font-size: 11px; }
  .map-actions { top: max(93px, calc(env(safe-area-inset-top) + 78px)); }
  .map-footer { font-size: 9px; letter-spacing: .06em; }
}
