/* bedstnet.dk kort-app – selvstændigt stylesheet (tokens kan overskrives udefra via --bn-*). */

.bn-app {
  --_font: var(--bn-font, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --_radius: var(--bn-radius, 20px);
  --_header: var(--bn-header-h, 64px);
  --_panel-w: 400px;
  --_mini: 112px;
  --_inset: var(--bn-inset-top, 0px);
  position: relative;
  height: calc(100vh - var(--_header) - var(--wp-admin--admin-bar--height, 0px));
  height: calc(100dvh - var(--_header) - var(--wp-admin--admin-bar--height, 0px));
  min-height: 560px;
  overflow: hidden;
  font-family: var(--_font);
  color: var(--bn-text, #0f172a);
  background: var(--bn-bg, #f6f7f9);
  line-height: 1.5;
  isolation: isolate;
}
.bn-app *, .bn-app *::before, .bn-app *::after { box-sizing: border-box; }
.bn-app :where(button) { font: inherit; color: inherit; }
.bn-app [hidden] { display: none !important; }
.bn-app :where(a) { color: var(--bn-accent-strong, #1747cc); }
.bn-app :where(h1, h2, h3, h4, p, ul, ol, dl, dd) { margin: 0; padding: 0; }
.bn-app svg { width: 20px; height: 20px; flex: none; }
.bn-app .bn-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.bn-app :focus-visible { outline: 3px solid var(--bn-focus, #1f5bff); outline-offset: 2px; }

/* ---------- Kort ---------- */
.bn-map {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 600px at 60% 40%, color-mix(in srgb, var(--bn-accent, #1f5bff) 6%, transparent), transparent 70%),
    var(--bn-bg, #f6f7f9);
}
.bn-map-note {
  position: absolute; z-index: 6; left: 50%; bottom: 24px; transform: translateX(-50%);
  max-width: min(92%, 460px); padding: 10px 14px; border-radius: 12px;
  background: var(--bn-surface, #fff); box-shadow: var(--bn-shadow); font-size: .875rem; text-align: center;
}

/* ---------- Søgekort ---------- */
.bn-top {
  position: absolute; z-index: 5; inset: 0 0 auto 0;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(clamp(24px, 14vh, 140px) + var(--_inset)) 16px 0;
  pointer-events: none;
  transition: padding .35s ease;
}
.bn-top > * { pointer-events: auto; }
.bn-card {
  width: 100%; max-width: 560px;
  padding: 28px;
  border-radius: 24px;
  background: var(--bn-glass, rgba(255,255,255,.8));
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--bn-border, #e2e6ec) 70%, transparent);
  box-shadow: var(--bn-shadow-lg, 0 24px 48px rgba(15,23,42,.14));
}
.bn-title { font-size: clamp(1.625rem, 4.2vw, 2.25rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.022em; }
.bn-lead { margin-top: 8px; color: var(--bn-muted, #556070); font-size: 1.0625rem; }
.bn-search { position: relative; margin-top: 20px; }
.bn-field {
  display: flex; align-items: center; gap: 4px;
  height: 58px; padding: 0 8px 0 16px;
  border-radius: 16px;
  background: var(--bn-surface, #fff);
  border: 1.5px solid var(--bn-border, #e2e6ec);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bn-field:focus-within { border-color: var(--bn-accent, #1f5bff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bn-accent, #1f5bff) 18%, transparent); }
.bn-field-icon { display: flex; color: var(--bn-muted, #556070); }
.bn-input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1.0625rem; color: var(--bn-text, #0f172a);
  padding: 0 8px;
}
.bn-input::placeholder { color: var(--bn-muted, #556070); opacity: 1; }
.bn-app .bn-input:focus-visible { outline: none; }
.bn-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 0; background: transparent; cursor: pointer;
  color: var(--bn-muted, #556070);
}
.bn-icon-btn:hover { background: var(--bn-surface-2, #f0f2f5); color: var(--bn-text, #0f172a); }
.bn-suggest {
  list-style: none; margin-top: 8px; max-height: 296px; overflow: auto;
  border-radius: 16px; background: var(--bn-surface, #fff);
  border: 1px solid var(--bn-border, #e2e6ec); box-shadow: var(--bn-shadow);
}
.bn-option { padding: 12px 16px; min-height: 44px; cursor: pointer; border-bottom: 1px solid var(--bn-border, #e2e6ec); }
.bn-option:last-child { border-bottom: 0; }
.bn-option[aria-selected="true"], .bn-option:hover { background: var(--bn-accent-soft, #e8efff); }
.bn-option--empty { cursor: default; color: var(--bn-muted, #556070); }
.bn-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; }
.bn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 0; cursor: pointer; font-weight: 600; font-size: .9375rem; text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}
.bn-btn:active { transform: scale(.98); }
.bn-btn[disabled] { opacity: .6; cursor: progress; }
.bn-btn--soft { background: var(--bn-accent-soft, #e8efff); color: var(--bn-accent-strong, #1747cc); }
.bn-btn--soft:hover { background: color-mix(in srgb, var(--bn-accent, #1f5bff) 18%, var(--bn-surface, #fff)); }
.bn-btn--outline {
  background: var(--bn-surface, #fff); color: var(--bn-accent-strong, #1747cc);
  border: 1.5px solid color-mix(in srgb, var(--bn-accent, #1f5bff) 55%, transparent); border-radius: 12px;
}
.bn-btn--outline:hover { background: var(--bn-accent-soft, #e8efff); }
.bn-btn--block { width: 100%; justify-content: space-between; padding: 10px 14px; text-align: left; }
.bn-hint { color: var(--bn-muted, #556070); font-size: .9375rem; }
.bn-status { margin-top: 10px; font-size: .9375rem; color: var(--bn-text, #0f172a); }
.bn-status:empty { display: none; }
.bn-intro-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: .875rem; }
.bn-app .bn-intro-links a { color: var(--bn-muted, #556070); text-underline-offset: 3px; }
.bn-app .bn-intro-links a:hover { color: var(--bn-text, #0f172a); }

/* Filterchips */
.bn-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; width: 100%; max-width: 560px; }
.bn-chips[hidden] { display: none; }
.bn-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font-size: .875rem; font-weight: 600;
  background: var(--bn-glass, rgba(255,255,255,.8));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--bn-border, #e2e6ec); box-shadow: var(--bn-shadow);
}
.bn-chip[aria-pressed="false"] { color: var(--bn-muted, #556070); text-decoration: line-through; box-shadow: none; }
.bn-chip[aria-pressed="false"] .bn-dot { opacity: .35; }
.bn-zoom-hint { font-size: .8125rem; padding: 6px 12px; border-radius: 999px; background: var(--bn-surface, #fff); box-shadow: var(--bn-shadow); }
.bn-zoom-hint[hidden] { display: none; }
.bn-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--bn-surface, #fff); }
.bn-dot--5gp { background: var(--bn-5gp, #7c3aed); }
.bn-dot--5g { background: var(--bn-5g, #1f5bff); }
.bn-dot--4g { background: var(--bn-4g, #0f8a7d); }
.bn-dot--old { background: var(--bn-old, #7b8494); }

/* Aktiv tilstand: søgekortet bliver kompakt */
.bn-app--active .bn-top { padding-top: calc(12px + var(--_inset)); align-items: stretch; }
.bn-app--active .bn-card { padding: 10px; border-radius: 20px; max-width: none; }
.bn-app--active .bn-intro, .bn-app--active .bn-intro-links { display: none; }
.bn-app--active .bn-search { margin-top: 0; }
.bn-app--active .bn-field { height: 52px; }
.bn-app--active .bn-actions { margin-top: 8px; }
.bn-app--active .bn-hint { display: none; }
.bn-app--active .bn-chips { max-width: none; }

/* ---------- Resultatpanel ---------- */
.bn-panel {
  position: absolute; z-index: 7; left: 0; right: 0; bottom: 0;
  height: 88%;
  display: flex; flex-direction: column;
  background: var(--bn-surface, #fff);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, .18);
  transform: translateY(calc(50% + var(--bn-drag, 0px)));
  transition: transform .34s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.bn-panel[hidden] { display: none; }
.bn-panel[data-state="full"] { transform: translateY(max(0px, var(--bn-drag, 0px))); }
.bn-panel[data-state="mini"] { transform: translateY(calc(100% - var(--_mini) + var(--bn-drag, 0px))); }
.bn-panel.bn-dragging { transition: none; }
.bn-handle {
  display: flex; justify-content: center; align-items: center;
  width: 100%; height: 28px; flex: none;
  border: 0; background: transparent; cursor: grab; touch-action: none;
}
.bn-handle span { width: 44px; height: 5px; border-radius: 999px; background: var(--bn-border, #e2e6ec); }
.bn-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 16px 10px 20px; flex: none; }
.bn-eyebrow { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--bn-muted, #556070); }
.bn-panel-title { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.bn-panel-title:focus { outline: none; }
.bn-panel-actions { display: flex; gap: 2px; margin-top: -4px; }
.bn-panel-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 4px 20px 28px; -webkit-overflow-scrolling: touch; }
.bn-reopen {
  position: absolute; z-index: 6; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--bn-text, #0f172a); color: var(--bn-surface, #fff); box-shadow: var(--bn-shadow-lg);
}
.bn-reopen[hidden] { display: none; }

.bn-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bn-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: var(--bn-surface-2, #f0f2f5); }
.bn-stat-v { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.bn-stat-l { font-size: .8125rem; color: var(--bn-muted, #556070); }
.bn-h3, .bn-callout h3 { font-size: 1rem; font-weight: 700; }
.bn-h3 { margin: 20px 0 10px; }
.bn-techs { display: grid; gap: 10px; }
.bn-tech { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--bn-border, #e2e6ec); }
.bn-tech-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bn-tech-name { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; }
.bn-level { font-size: .8125rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bn-surface-2, #f0f2f5); }
.bn-level--god { color: var(--bn-good, #15803d); background: color-mix(in srgb, var(--bn-good, #15803d) 13%, transparent); }
.bn-level--middel { color: var(--bn-mid, #b45309); background: color-mix(in srgb, var(--bn-mid, #b45309) 13%, transparent); }
.bn-level--svag, .bn-level--ingen { color: var(--bn-weak, #b91c1c); background: color-mix(in srgb, var(--bn-weak, #b91c1c) 12%, transparent); }
.bn-bar { height: 8px; margin: 12px 0; border-radius: 999px; background: var(--bn-surface-2, #f0f2f5); overflow: hidden; }
.bn-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--bn-5g, #1f5bff); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bn-tech--4g .bn-bar span { background: var(--bn-4g, #0f8a7d); }
.bn-ready .bn-bar span { width: var(--v); }
.bn-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.bn-facts dt { font-size: .75rem; color: var(--bn-muted, #556070); }
.bn-facts dd { font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bn-muted { color: var(--bn-muted, #556070); }
.bn-small { font-size: .8125rem; }
.bn-disclaimer {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  font-size: .875rem; line-height: 1.5;
  background: var(--bn-surface-2, #f0f2f5); border-left: 3px solid var(--bn-accent, #1f5bff);
}
.bn-callout { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--bn-accent-soft, #e8efff); }
.bn-callout p { margin-top: 6px; font-size: .9375rem; }
.bn-cov-links { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.bn-details { border-top: 1px solid var(--bn-border, #e2e6ec); margin-top: 16px; padding-top: 12px; }
.bn-details summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; list-style: none; }
.bn-details summary::-webkit-details-marker { display: none; }
.bn-details summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; }
.bn-details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.bn-details p { margin-top: 8px; font-size: .9375rem; }
.bn-nets { list-style: none; display: grid; gap: 10px; margin-top: 8px; }
.bn-nets p { margin-top: 2px; }
.bn-nearest { list-style: none; margin-top: 4px; }
.bn-link-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 44px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--bn-border, #e2e6ec);
  background: transparent; cursor: pointer; text-align: left;
}
.bn-link-btn:hover { background: var(--bn-surface-2, #f0f2f5); }
.bn-nearest-dist { font-weight: 700; font-variant-numeric: tabular-nums; }
.bn-nearest-tech { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bn-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; font-weight: 700; }
.bn-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bn-old, #7b8494); }
.bn-tag--5g::before { background: var(--bn-5g, #1f5bff); }
.bn-tag--4g::before { background: var(--bn-4g, #0f8a7d); }
.bn-source { margin-top: 18px; font-size: .8125rem; color: var(--bn-muted, #556070); }
.bn-notice { padding: 14px; border-radius: 12px; background: var(--bn-surface-2, #f0f2f5); display: grid; gap: 10px; justify-items: start; }
.bn-notice--error { border-left: 3px solid var(--bn-weak, #b91c1c); }
.bn-skeleton { display: grid; gap: 10px; }
.bn-skeleton span { height: 72px; border-radius: 16px; background: linear-gradient(90deg, var(--bn-surface-2, #f0f2f5) 0%, var(--bn-border, #e2e6ec) 50%, var(--bn-surface-2, #f0f2f5) 100%); background-size: 200% 100%; animation: bn-shimmer 1.2s linear infinite; }
.bn-skeleton span:nth-child(2) { height: 120px; }
@keyframes bn-shimmer { to { background-position: -200% 0; } }

/* ---------- Markør, popup og toast ---------- */
.bn-pin { position: relative; width: 24px; height: 24px; }
.bn-pin-dot { position: absolute; inset: 0; border-radius: 50%; background: var(--bn-accent, #1f5bff); border: 4px solid #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .35); }
.bn-pin-pulse { position: absolute; inset: -12px; border-radius: 50%; background: color-mix(in srgb, var(--bn-accent, #1f5bff) 30%, transparent); animation: bn-pulse 2s ease-out infinite; }
@keyframes bn-pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

.bn-app .maplibregl-popup-content {
  padding: 14px 16px; border-radius: 16px; font-family: var(--_font);
  background: var(--bn-surface, #fff); color: var(--bn-text, #0f172a); box-shadow: var(--bn-shadow-lg);
}
.bn-app .maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--bn-surface, #fff); }
.bn-app .maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--bn-surface, #fff); }
.bn-app .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--bn-surface, #fff); }
.bn-app .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--bn-surface, #fff); }
.bn-app .maplibregl-popup-close-button { width: 36px; height: 36px; font-size: 22px; border-radius: 10px; color: var(--bn-muted, #556070); }
.bn-pop-title { font-weight: 700; margin-right: 28px; }
.bn-pop-list { list-style: none; display: grid; gap: 4px; margin-top: 8px; font-size: .875rem; }
.bn-pop-list li { display: flex; gap: 8px; align-items: baseline; }
.bn-pop-list .bn-tag { min-width: 34px; }
.bn-pop-facts { display: grid; gap: 4px; margin-top: 10px; font-size: .8125rem; }
.bn-pop-facts div { display: flex; justify-content: space-between; gap: 12px; }
.bn-pop-facts dt { color: var(--bn-muted, #556070); }
.bn-pop-facts dd { font-weight: 600; text-align: right; }

.bn-toast {
  position: absolute; z-index: 9; left: 50%; top: calc(16px + var(--_inset)); transform: translate(-50%, -20px);
  padding: 10px 16px; border-radius: 999px; font-size: .9375rem; font-weight: 600;
  background: var(--bn-text, #0f172a); color: var(--bn-surface, #fff); box-shadow: var(--bn-shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.bn-toast--on { opacity: 1; transform: translate(-50%, 0); }

/* Kortkontroller og påkrævet kildeangivelse holdes synlige over panelet */
.bn-app .maplibregl-ctrl-attrib { font-size: 11px; background: color-mix(in srgb, var(--bn-surface, #fff) 85%, transparent); }
.bn-app .maplibregl-ctrl-attrib a { color: var(--bn-text, #0f172a); }
.bn-app .maplibregl-ctrl-bottom-right { transition: bottom .34s cubic-bezier(.2, .8, .2, 1); }
.bn-app[data-sheet="mini"] .maplibregl-ctrl-bottom-right { bottom: var(--_mini); }
.bn-app[data-sheet="peek"] .maplibregl-ctrl-bottom-right,
.bn-app[data-sheet="full"] .maplibregl-ctrl-bottom-right { bottom: 44%; }
.bn-app .maplibregl-ctrl-group { border-radius: 12px; overflow: hidden; }
.bn-app .maplibregl-ctrl-group button { width: 40px; height: 40px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bn-app .maplibregl-ctrl-group { background: var(--bn-surface, #161b22); }
  :root:not([data-theme="light"]) .bn-app .maplibregl-ctrl-group button + button { border-top-color: var(--bn-border, #2a313c); }
  :root:not([data-theme="light"]) .bn-app .maplibregl-ctrl-icon { filter: invert(1); }
  :root:not([data-theme="light"]) .bn-pin-dot { border-color: #0d1117; }
}
:root[data-theme="dark"] .bn-app .maplibregl-ctrl-group { background: var(--bn-surface, #161b22); }
:root[data-theme="dark"] .bn-app .maplibregl-ctrl-group button + button { border-top-color: var(--bn-border, #2a313c); }
:root[data-theme="dark"] .bn-app .maplibregl-ctrl-icon { filter: invert(1); }
:root[data-theme="dark"] .bn-pin-dot { border-color: #0d1117; }

/* ---------- Mobil ---------- */
/* Forside før søgning: enklere og mere kompakt på mobil. */
@media (max-width: 899px) {
  .bn-app:not(.bn-app--active) .bn-top { padding-top: calc(20px + var(--_inset)); }
  .bn-app:not(.bn-app--active) .bn-card { padding: 16px 16px 14px; border-radius: 20px; }
  .bn-app .bn-title { font-size: 1.375rem; line-height: 1.2; }
  .bn-app .bn-lead, .bn-app .bn-intro-links { display: none; }
  .bn-app:not(.bn-app--active) .bn-search { margin-top: 12px; }
  .bn-app:not(.bn-app--active) .bn-field { height: 52px; }
  .bn-app:not(.bn-app--active) .bn-actions { margin-top: 10px; }
  .bn-app .bn-hint { font-size: .8125rem; }
}
@media (max-width: 899px) {
  .bn-app .maplibregl-ctrl-group { display: none; }
  .bn-card { padding: 22px 18px; }
  .bn-app--active .bn-actions .bn-locate span { display: none; }
  .bn-app--active .bn-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .bn-app--active .bn-field { flex: 1; min-width: 0; }
  .bn-app--active .bn-actions { margin-top: 0; }
  .bn-app--active .bn-actions .bn-locate { width: 52px; height: 52px; padding: 0; border-radius: 16px; }
  .bn-app--active .bn-suggest, .bn-app--active .bn-status { flex-basis: 100%; }
  .bn-app--active .bn-status { margin-top: 2px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .bn-app--active .bn-top { right: auto; width: calc(var(--_panel-w) + 32px); padding: calc(16px + var(--_inset)) 16px 16px; }
  .bn-panel {
    left: auto; right: 16px; top: calc(16px + var(--_inset)); bottom: 16px; height: auto; width: var(--_panel-w);
    border-radius: 24px; box-shadow: var(--bn-shadow-lg);
    transform: none; transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
    animation: bn-slide-in .35s cubic-bezier(.2, .8, .2, 1);
  }
  .bn-panel[data-state] { transform: none; }
  .bn-handle { display: none; }
  .bn-panel-head { padding: 20px 16px 12px 22px; }
  .bn-panel-body { padding: 4px 22px 28px; }
  .bn-app[data-sheet] .maplibregl-ctrl-bottom-right { bottom: 0; }
  .bn-app[data-sheet="peek"] .maplibregl-ctrl-bottom-right,
  .bn-app[data-sheet="full"] .maplibregl-ctrl-bottom-right,
  .bn-app[data-sheet="mini"] .maplibregl-ctrl-bottom-right { right: calc(var(--_panel-w) + 24px); }
  .bn-reopen { left: auto; right: 24px; transform: none; top: calc(24px + var(--_inset)); bottom: auto; }
}
/* Desktop før søgning: søgekortet står til venstre, og Danmark vises til højre for det. */
@media (min-width: 900px) {
  .bn-app:not(.bn-app--active) .bn-top { align-items: flex-start; padding: calc(clamp(24px, 9vh, 96px) + var(--_inset)) 32px 0; }
  .bn-app:not(.bn-app--active) .bn-card, .bn-app:not(.bn-app--active) .bn-chips { max-width: 480px; }
}
@keyframes bn-slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .bn-app *, .bn-app *::before, .bn-app *::after { animation: none !important; transition: none !important; }
  .bn-ready .bn-bar span { width: var(--v); }
}
.bn-noscript { padding: 24px; }

/* Mobil: kildeangivelsen (OpenFreeMap, Mastedatabasen m.fl.) står fast i bunden af kortet, bag resultatpanelet.
   Når panelet dækker den, står de samme kilder nederst i panelet (.bn-source). */
@media (max-width: 899px) {
  .bn-app { --_mini: 150px; }
  .bn-app .bn-map { z-index: auto; }
  .bn-app .maplibregl-ctrl-bottom-right {
    left: 0; right: 0; bottom: 0 !important; z-index: 6;
    display: flex; justify-content: center;
  }
  .bn-app .maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib {
    width: 100%; margin: 0; padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px));
    border-radius: 0; text-align: center; line-height: 1.35;
    background: color-mix(in srgb, var(--bn-surface, #fff) 94%, transparent);
    border-top: 1px solid var(--bn-border, #e2e6ec);
  }
  .bn-app .bn-panel-body { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  /* Lettere at trække: større greb, og hele toppen af panelet kan trækkes/trykkes. */
  .bn-app .bn-handle { height: 34px; }
  .bn-app .bn-handle span { width: 52px; height: 6px; background: color-mix(in srgb, var(--bn-muted, #556070) 45%, transparent); }
  .bn-app .bn-panel-head { touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
  .bn-app .bn-panel.bn-dragging .bn-panel-head, .bn-app .bn-panel.bn-dragging .bn-handle { cursor: grabbing; }
  .bn-app .bn-panel { transition-duration: .28s; }
  .bn-app .bn-reopen { bottom: 64px; }
  .bn-app .bn-map-note { bottom: 64px; }
}

/* ---------- Din position, rækkevidde og legende ---------- */
.bn-app .bn-pin { width: 32px; height: 42px; filter: drop-shadow(0 3px 6px rgba(15, 23, 42, .35)); }
.bn-app .bn-pin svg { position: relative; z-index: 1; width: 32px; height: 42px; display: block; }
.bn-app .bn-you-pulse {
  position: absolute; left: 50%; top: 100%; z-index: 0;
  width: var(--bn-reach, 120px); height: var(--bn-reach, 120px);
  margin: calc(var(--bn-reach, 120px) / -2) 0 0 calc(var(--bn-reach, 120px) / -2);
  border-radius: 50%; pointer-events: none;
  background: color-mix(in srgb, var(--bn-you, #e5484d) 14%, transparent);
  border: 2px solid color-mix(in srgb, var(--bn-you, #e5484d) 70%, transparent);
  transform: scale(0); opacity: 0;
  animation: bn-you-pulse 2.8s cubic-bezier(.2, .6, .3, 1) infinite;
  will-change: transform, opacity;
}
.bn-app .bn-you-pulse--b { animation-delay: 1.4s; }
@keyframes bn-you-pulse { 0% { transform: scale(0); opacity: .95; } 100% { transform: scale(1); opacity: 0; } }
.bn-app .bn-pin-shape { fill: var(--bn-you, #e5484d); stroke: #ffffff; stroke-width: 2.5; }
.bn-app .bn-pin-core { fill: #ffffff; }
.bn-dot--you { background: var(--bn-you, #e5484d); }
.bn-legend-you {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  font-size: .875rem; font-weight: 600;
  background: var(--bn-glass, rgba(255,255,255,.8));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--bn-border, #e2e6ec); box-shadow: var(--bn-shadow);
}
.bn-ring-ico { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px dashed var(--bn-5g, #1f5bff); }
.bn-chip--range[aria-pressed="false"] .bn-ring-ico { opacity: .35; }
.bn-pop-sub { margin-top: 10px; font-size: .8125rem; font-weight: 700; }
.bn-pop-range { list-style: none; display: grid; gap: 3px; margin-top: 4px; font-size: .8125rem; }
.bn-pop-range li { display: flex; justify-content: space-between; gap: 12px; }
.bn-pop-range span { color: var(--bn-muted, #556070); }
.bn-pop-note { margin-top: 8px; font-size: .75rem; line-height: 1.4; color: var(--bn-muted, #556070); }

/* ---------- Filtre og lag (popup) ---------- */
/* ---------- Menu (erstatter sidehovedet på forsiden, på alle skærmstørrelser) ---------- */
.bn-menu-btn { display: inline-flex; gap: 8px; }
.bn-app .bn-menu-btn svg { width: 18px; height: 18px; }
.bn-menu-btn[aria-expanded="true"] { border-color: var(--bn-accent, #1f5bff); background: var(--bn-surface, #fff); }
.bn-menu { gap: 2px; }
.bn-menu-link { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: 1rem; font-weight: 600; color: var(--bn-text, #0f172a); text-decoration: none; }
.bn-menu-link:hover, .bn-menu-link:focus-visible { background: var(--bn-surface-2, #f0f2f5); }
.bn-menu-small { display: grid; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--bn-border, #e2e6ec); }
.bn-menu-link--small { min-height: 38px; font-size: .875rem; font-weight: 500; color: var(--bn-muted, #556070); }
.bn-menu-theme {
  display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 6px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--bn-border, #e2e6ec); background: var(--bn-surface-2, #f0f2f5);
  font: inherit; font-size: .9375rem; font-weight: 600; color: var(--bn-text, #0f172a); cursor: pointer;
}
.bn-menu-theme-ico { display: inline-flex; }
.bn-menu-theme-ico svg { width: 18px; height: 18px; }

.bn-settings-btn { gap: 8px; }
.bn-app .bn-settings-btn svg { width: 18px; height: 18px; }
.bn-settings-btn[aria-expanded="true"] { border-color: var(--bn-accent, #1f5bff); background: var(--bn-surface, #fff); }
.bn-settings-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
  background: var(--bn-accent, #1f5bff); color: var(--bn-on-accent, #fff);
}
.bn-settings-count[hidden] { display: none; }
.bn-settings {
  flex-basis: 100%; display: grid; gap: 8px; max-width: 420px;
  padding: 14px; border-radius: 18px;
  background: var(--bn-surface, #fff); border: 1px solid var(--bn-border, #e2e6ec); box-shadow: var(--bn-shadow-lg);
  animation: bn-pop-in .18s ease-out;
}
.bn-settings[hidden] { display: none; }
@keyframes bn-pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bn-settings-h { margin-top: 4px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bn-muted, #556070); }
.bn-settings-h:first-child { margin-top: 0; }
.bn-settings-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bn-app .bn-settings .bn-chip { box-shadow: none; background: var(--bn-surface-2, #f0f2f5); -webkit-backdrop-filter: none; backdrop-filter: none; }
.bn-legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; font-size: .8125rem; font-weight: 600; }
.bn-app--active .bn-settings { max-width: none; }
/* Åben popup ligger over resultatpanelet og kan scrolles, hvis den er højere end skærmen. */
.bn-settings-open .bn-top { z-index: 8; }
.bn-settings { max-height: calc(100vh - var(--_header) - 200px); max-height: calc(100dvh - var(--_header) - 200px); overflow-y: auto; overscroll-behavior: contain; }
/* Før søgning: når popuppen åbnes, skjules overskriften midlertidigt, så der er plads. */
.bn-settings-open:not(.bn-app--active) .bn-top { padding-top: calc(16px + var(--_inset)); }
.bn-settings-open:not(.bn-app--active) .bn-intro,
.bn-settings-open:not(.bn-app--active) .bn-intro-links { display: none; }
.bn-settings-open:not(.bn-app--active) .bn-search { margin-top: 0; }
.bn-app--active .bn-settings {
  max-height: calc(100% - 150px); max-height: calc(100dvh - var(--_header) - 170px);
  overflow-y: auto; overscroll-behavior: contain;
}

/* ---------- Officielt dækningslag ---------- */
.bn-cov-chip { gap: 6px; padding: 0 6px 0 12px; }
.bn-cov-select { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; min-height: 38px; padding: 0 4px; cursor: pointer; }
.bn-cov-select:focus-visible { outline: none; }
.bn-cov-chip:focus-within { outline: 3px solid var(--bn-focus, #1f5bff); outline-offset: 2px; }
.bn-cov-select option { color: #0f172a; background: #ffffff; }
.bn-cov-ico { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 3px; background: linear-gradient(135deg, rgb(22, 150, 90) 50%, rgb(240, 150, 20) 50%); }
.bn-cov-legend {
  flex-basis: 100%; margin-top: 2px; padding: 10px 12px; border-radius: 14px; font-size: .8125rem;
  background: var(--bn-glass, rgba(255,255,255,.8)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--bn-border, #e2e6ec); box-shadow: var(--bn-shadow);
}
.bn-cov-legend[hidden] { display: none; }
.bn-app .bn-settings .bn-cov-legend {
  margin-top: 0; padding: 10px 12px; border: 0; border-radius: 12px; box-shadow: none;
  background: var(--bn-surface-2, #f0f2f5); -webkit-backdrop-filter: none; backdrop-filter: none;
}
.bn-cov-legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-weight: 600; }
.bn-cov-sw { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 4px; }
.bn-cov-legend p { margin-top: 6px; line-height: 1.45; color: var(--bn-muted, #556070); }
.bn-area, .bn-addr { margin-top: 18px; }
.bn-area .bn-h3, .bn-addr .bn-h3 { margin-top: 0; }
.bn-addr-lead { margin: -4px 0 8px; }
.bn-area-list { display: grid; gap: 6px; }
.bn-area-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: .875rem; background: var(--bn-surface-2, #f0f2f5); }
.bn-area-list dt { color: var(--bn-muted, #556070); }
.bn-area-list dd { font-weight: 700; text-align: right; }
.bn-area-sub { margin-top: 10px; font-size: .8125rem; font-weight: 700; }
.bn-dk { display: block; margin-top: 1px; font-size: .75rem; font-weight: 500; color: var(--bn-muted, #556070); }
.bn-area-bands { list-style: none; display: grid; gap: 4px; margin-top: 4px; font-size: .875rem; }
.bn-area-bands li { display: flex; align-items: baseline; gap: 8px; }
.bn-area-bands .bn-tag { min-width: 34px; }
.bn-tips { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.bn-tips li { position: relative; padding: 9px 12px 9px 34px; border-radius: 10px; font-size: .875rem; background: var(--bn-accent-soft, #e8efff); }
.bn-tips li::before { content: "i"; position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: .6875rem; font-weight: 700; color: var(--bn-on-accent, #fff); background: var(--bn-accent, #1f5bff); }
.bn-covsum { margin-top: 18px; }
.bn-covsum .bn-h3 { margin-top: 0; }
.bn-covsum-list { list-style: none; display: grid; gap: 6px; margin-bottom: 8px; }
.bn-covsum-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: .875rem; background: var(--bn-surface-2, #f0f2f5); }
.bn-cov-lvl { font-weight: 700; text-align: right; }
.bn-cov-lvl--alle { color: var(--bn-good, #15803d); }
.bn-cov-lvl--nogle { color: var(--bn-mid, #b45309); }
.bn-cov-lvl--ingen { color: var(--bn-weak, #b91c1c); }
@media (prefers-reduced-motion: reduce) {
  .bn-app .bn-you-pulse { transform: scale(1); opacity: .55; }
  .bn-app .bn-you-pulse--b { display: none; }
}
