:root {
  color-scheme: dark;

  --bg-0: #0c0a14;
  --bg-1: #0f0c1a;
  --surface: rgba(22, 17, 31, 0.72);
  --surface-solid: #16111f;
  --surface-hi: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f5f0e8;
  --muted: #a89b85;
  --muted-2: #75695a;

  --accent: #ffb84d;
  --accent-2: #f59e0b;
  --accent-glow: rgba(255, 184, 77, 0.28);

  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 6px 18px -8px rgba(0, 0, 0, 0.6);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    system-ui, sans-serif;
  background: var(--bg-0);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(120% 60% at 50% -10%, #2a1c3d 0%, transparent 55%),
    radial-gradient(90% 55% at 100% 0%, #3d2a1c 0%, transparent 60%),
    radial-gradient(80% 60% at 0% 10%, #1c2a3d 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px
  );
  background-size: 3px 3px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
}

.topbar {
  flex: 0 0 auto;
  position: relative;
  z-index: 100;
  padding: 15px 10px 0;
}

.topbar .searchbox {
  width: 100%;
  align-self: stretch;
}

@media (max-width: 380px) {
  .logo svg {
    height: 32px;
  }
}

.searchbox {
  position: relative;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--surface-hi);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.searchbox:focus-within {
  border-color: rgba(255, 184, 77, 0.45);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(255, 184, 77, 0.1),
    inset 0 1px 0 var(--surface-hi);
}

.inputwrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.015)
  );
  cursor: text;
}

.searchicon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--accent);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.searchicon svg {
  width: 100%;
  height: 100%;
  display: block;
}

input {
  width: 100%;
  min-width: 0;
  padding: 15px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  letter-spacing: -0.01em;
  caret-color: var(--accent);
}

input::placeholder {
  color: var(--muted-2);
}

input::-webkit-search-cancel-button {
  display: none;
}

.clear {
  display: none;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  place-items: center;
  transition: transform 0.12s var(--ease), background 0.15s var(--ease),
    color 0.15s var(--ease);
}

.clear:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.clear:active {
  transform: scale(0.9);
}

.history-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.15s var(--ease),
    color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.history-btn svg {
  width: 15px;
  height: 15px;
}

.history-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.history-btn[aria-expanded="true"] {
  color: var(--accent);
  border-color: rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.12);
  transform: rotate(180deg);
}

.history-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 6px;
  right: 6px;
  z-index: 200;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(22, 17, 31, 0.96);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--surface-hi);
  animation: appear 0.18s var(--ease) both;
  transform-origin: top center;
}

.history-panel[hidden] {
  display: none;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.history-clear {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.01em;
  text-transform: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.history-clear:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--line-strong);
}

.history-list {
  display: grid;
  gap: 2px;
  max-height: min(50vh, 320px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  overflow: hidden;
  transition: background 0.12s var(--ease);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.history-item:active {
  background: rgba(255, 255, 255, 0.1);
}

.history-item .h-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  display: grid;
  place-items: center;
}

.history-item .h-icon svg {
  width: 100%;
  height: 100%;
}

.history-item .h-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13.5px;
}

.livebar {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    var(--accent-2),
    transparent
  );
  opacity: 0;
  transition: width 0.3s var(--ease), opacity 0.3s var(--ease);
}

.searchbox.busy .livebar {
  width: 78%;
  opacity: 1;
  animation: pulse 1.1s ease-in-out infinite;
}

main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 4px 14px 8px;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 26px;
  margin: 6px 6px 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: blink 1.1s ease-in-out infinite;
}

.results {
  display: grid;
  gap: 10px;
}

.results[hidden] {
  display: none !important;
}

.result {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0)
    ),
    var(--surface-solid);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--surface-hi);
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  animation: appear 0.28s var(--ease) both;
  transition: border-color 0.2s var(--ease), transform 0.12s var(--ease),
  background 0.2s var(--ease);
}

.result::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.result:hover {
  border-color: var(--line-strong);
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0)
    ),
    #1f1729;
}

.result:hover::after {
  opacity: 1;
  transform: scaleY(1);
}

.result:active {
  transform: scale(0.985);
}

.result:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pin {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(
    180deg,
    rgba(255, 184, 77, 0.16),
    rgba(255, 184, 77, 0.05)
  );
  color: var(--accent);
}

.pin svg {
  width: 19px;
  height: 19px;
}

.address {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.address mark {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(255, 184, 77, 0.18);
  color: var(--accent);
  font-weight: 700;
}

.skeleton {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  overflow: hidden;
}

.sk-pin {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.sk-line {
  height: 12px;
  border-radius: 6px;
}

.sk-pin,
.sk-line {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

.empty {
  padding: 34px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  color: var(--muted);
  text-align: center;
  animation: appear 0.3s var(--ease) both;
}

.empty .glyph {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.empty .glyph svg {
  width: 24px;
  height: 24px;
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: #f0e8d8;
  font-size: 15.5px;
}

.empty span {
  font-size: 13.5px;
  line-height: 1.5;
}

.footer {
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 16px 14px calc(14px + env(safe-area-inset-bottom));
  text-align: center;
  flex: 0 0 auto;
}

.footer-link {
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}

.footer-link:hover {
  opacity: 1;
  color: var(--muted);
}

.footer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

.about-data-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  animation: appear 0.2s var(--ease) both;
}

.about-data-modal[hidden] {
  display: none;
}

.about-data-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 20, 0.72);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

.about-data-card {
  position: relative;
  width: min(100%, 480px);
  max-height: min(80vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 24px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0)
    ),
    var(--surface-solid);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--surface-hi);
  color: var(--text);
  animation: appear 0.22s var(--ease) both;
}

.about-data-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.about-data-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.about-data-card p:last-child {
  margin-bottom: 0;
}

.about-data-card strong {
  color: var(--text);
}

.about-data-card a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 184, 77, 0.35);
  transition: border-color 0.15s var(--ease);
}

.about-data-card a:hover {
  border-bottom-color: var(--accent);
}

.about-data-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.15s var(--ease),
    color 0.15s var(--ease);
}

.about-data-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.about-data-close:active {
  transform: scale(0.9);
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (min-width: 520px) {
  html,
  body {
    overflow: auto;
    height: auto;
  }

  body {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .topbar {
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 15px;
    position: static;
    z-index: auto;
  }

  .searchbox {
    position: sticky;
    top: 8px;
    z-index: 100;
  }

  main {
    flex: 1 0 auto;
    min-height: auto;
    overflow: visible;
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: auto;
    padding-left: 24px;
    padding-right: 24px;
  }

  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- map sheet ---------- */

.map-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  align-items: end;
}

.map-sheet[hidden] {
  display: none;
}

.map-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 20, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: appear 0.2s var(--ease) both;
}

.map-sheet-panel {
  position: relative;
  width: 100%;
  max-height: 80dvh;
  display: flex;
  flex-direction: column;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  border-radius: 22px 22px 0 0;
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0)
    ),
    var(--surface-solid);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--surface-hi);
  animation: sheetUp 0.28s var(--ease) both;
}

.map-sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.map-sheet-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.map-sheet-headtext {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-sheet-coords {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease), transform 0.12s var(--ease);
}

.map-sheet-coords:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--line-strong);
}

.map-sheet-coords:active {
  transform: scale(0.97);
}

.map-sheet-coords:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-sheet-coords.copied {
  color: #ffb84d;
  border-color: rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.08);
}

.map-sheet-coords-icon {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.map-sheet-coords-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-sheet-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.map-sheet-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.map-sheet-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f0c1a;
}

#mapContainer {
  width: 100%;
  height: 100%;
  min-height: 46dvh;
}

.leaflet-container {
  background: #0f0c1a;
  font-family: inherit;
}

.leaflet-control-attribution {
  background: rgba(11, 18, 32, 0.78) !important;
  color: var(--muted-2) !important;
  font-size: 10px !important;
  backdrop-filter: blur(6px);
}

.leaflet-control-attribution a {
  color: var(--muted) !important;
}

.leaflet-bar a {
  background: rgba(19, 29, 46, 0.95) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}

.leaflet-bar a:hover {
  background: rgba(30, 45, 70, 0.95) !important;
}

/* ---------- actions ---------- */

.map-sheet-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.map-sheet-actions .btn-primary {
  flex: 1;
}

.btn-primary {
  position: relative;
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 184, 77, 0.45);
  border-radius: var(--radius-md);
  background: linear-gradient(
      180deg,
      rgba(76, 196, 255, 0.22),
      rgba(59, 130, 246, 0.12)
    ),
    rgba(22, 17, 31, 0.9);
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 12px 30px -14px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-primary::after {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M3 11l19-9-9 19-2-8-8-2z'/></svg>")
    center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M3 11l19-9-9 19-2-8-8-2z'/></svg>")
    center/contain no-repeat;
  color: var(--accent);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 184, 77, 0.45);
  border-radius: var(--radius-md);
  background: linear-gradient(
      180deg,
      rgba(76, 196, 255, 0.22),
      rgba(59, 130, 246, 0.12)
    ),
    rgba(22, 17, 31, 0.9);
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 12px 30px -14px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.btn-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes sheetUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

body:has(#mapSheet:not([hidden])) .topbar {
  filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: filter 0.2s var(--ease), opacity 0.2s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .result {
    user-select: text;
    -webkit-user-select: text;
  }
}
/* ---------- HISTORICAL RESULTS ---------- */
.result.result-historical {
  border-color: rgba(255, 212, 121, 0.35);
  background: linear-gradient(
      180deg,
      rgba(255, 212, 121, 0.08),
      rgba(255, 255, 255, 0)
    ),
    var(--surface-solid);
}

.result.result-historical::after {
  background: linear-gradient(180deg, #ffd479, #f59e0b);
}

.result.result-historical .pin {
  background: linear-gradient(
    180deg,
    rgba(255, 212, 121, 0.16),
    rgba(255, 212, 121, 0.05)
  );
  color: #ffd479;
  border-color: rgba(255, 212, 121, 0.3);
}

.result.result-historical .address mark {
  background: rgba(255, 212, 121, 0.18);
  color: #ffd479;
}

.badge-historical {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffd479;
  border: 1px solid rgba(255, 212, 121, 0.4);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 6px;
  vertical-align: middle;
  background: rgba(255, 212, 121, 0.1);
}