/* Svendborgs arealpuslespil · webkort */

:root {
  --ink: #1d2621;
  --ink-2: #414a44;
  --muted: #69716b;
  --line: #e3e0d6;
  --line-2: #d4d0c3;
  --bg: #f6f4ee;
  --surface: #fdfcf9;
  --deep: #1f3a2b;
  --deep-2: #2b4c39;
  --accent: #2e6b45;
  --accent-soft: #e5eee0;
  --lime: #a9d18e;
  --warn: #9a3412;
  --warn-soft: #fbe9dd;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 30, 24, .08), 0 8px 28px rgba(20, 30, 24, .14);
  --shadow-sm: 0 1px 2px rgba(20, 30, 24, .1), 0 3px 10px rgba(20, 30, 24, .1);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --panel-w: 400px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 400 14.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.visuelt-skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#kort { position: fixed; inset: 0; }

/* ---------- Indlæser ---------- */
#indlaeser {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: var(--bg); transition: opacity .35s ease;
}
#indlaeser.skjult { opacity: 0; pointer-events: none; }
.indlaeser-boks { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line-2); border-top-color: var(--deep);
  animation: drej 0.9s linear infinite;
}
@keyframes drej { to { transform: rotate(360deg); } }

/* ---------- Panel ---------- */
#panel {
  position: absolute; z-index: 10; top: 16px; left: 16px; bottom: 16px; width: var(--panel-w);
  display: flex; flex-direction: column; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .25s;
}
#panel.lukket { transform: translateX(calc(-100% - 32px)); opacity: 0; pointer-events: none; }

.panel-hoved {
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 20px 18px 18px 22px; background: var(--deep); color: #f4f2ea;
  background-image: radial-gradient(120% 140% at 100% 0%, rgba(169, 209, 142, .16), transparent 55%);
}
.panel-titel { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.overlinje {
  margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.panel-hoved .overlinje { color: var(--lime); }
.panel-hoved h1 {
  margin: 0; font: 600 27px/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance;
}
.undertitel { margin: 0; font-size: 14px; line-height: 1.4; color: #c5d4c9; text-wrap: pretty; }
.panel-knapper { display: flex; gap: 4px; flex: none; margin-top: -4px; }

.ikonknap {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  border: 0; border-radius: 10px; background: transparent; color: inherit;
  transition: background .15s;
}
.ikonknap svg { width: 19px; height: 19px; }
.ikonknap:hover { background: rgba(127, 127, 127, .16); }

#panel-krop { display: flex; flex-direction: column; min-height: 0; flex: 1; }

.faner {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 14px 16px 2px;
  padding: 4px; background: #ecebe3; border-radius: 12px;
}
.faner [role="tab"] {
  border: 0; background: transparent; padding: 8px 6px; border-radius: 9px;
  font-weight: 600; font-size: 13.5px; color: var(--ink-2); transition: background .15s, color .15s;
}
.faner [role="tab"]:hover { color: var(--ink); }
.faner [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.ruder { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.rude { padding: 16px 18px 28px 22px; display: flex; flex-direction: column; gap: 22px; }

#panel-vis {
  position: absolute; z-index: 9; top: 16px; left: 16px;
  display: none; align-items: center; gap: 10px; padding: 10px 16px 10px 12px;
  border: 0; border-radius: 12px; background: var(--deep); color: #f4f2ea;
  font-weight: 600; box-shadow: var(--shadow);
}
#panel-vis svg { width: 20px; height: 20px; }
#panel.lukket ~ #panel-vis { display: flex; }

/* ---------- Blokke og fælles ---------- */
.blok { display: flex; flex-direction: column; gap: 10px; }
.blok-titel {
  margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.hjaelp { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.fejl { color: var(--warn); }

.felt { display: inline-block; flex: none; border-radius: 4px; background-size: auto; }
.felt-tom { box-shadow: inset 0 0 0 1px var(--line-2); background: repeating-linear-gradient(-45deg, #ddd 0 1px, transparent 1px 4px); }

/* Signaturer for linjelag */
.sig { display: inline-block; flex: none; width: 24px; height: 14px; border-radius: 3px; }
.sig-kandidat { border: 3px solid #111; box-shadow: 0 0 0 1.5px #fff inset, 0 0 0 1px #fff; background: transparent; }
.sig-kandidat-tynd { border: 1.5px solid #111; background: transparent; }
.sig-mars { border: 2.5px dashed #c2185b; background: transparent; }
.sig-mark { height: 2px; width: 22px; margin: 6px 1px; background: rgba(75, 82, 77, .6); border-radius: 1px; }
.sig-graense { height: 2.5px; width: 22px; margin: 6px 1px; background: #3b403c; border-radius: 1px; }

.knap {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 600; font-size: 13.5px; color: var(--ink); transition: background .15s, border-color .15s;
}
.knap:hover { background: #f1efe7; border-color: #bdb8a8; }
.knap svg { width: 16px; height: 16px; }
.knap-kort { color: var(--accent); border-color: #c9d9c3; background: var(--accent-soft); }
.knap-kort:hover { background: #d8e6d1; border-color: #aec7a4; }
.knap-sekundaer { align-self: flex-start; }

/* ---------- Fanen Kort ---------- */
.temaer { display: flex; flex-direction: column; gap: 8px; }
.tema {
  border: 1px solid var(--line); border-radius: 13px; background: #faf9f5;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.tema:hover { border-color: var(--line-2); }
.tema.aktiv { background: #fff; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tema-hoved { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; cursor: pointer; }
.tema-hoved input {
  appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border-radius: 50%;
  border: 1.5px solid #9b9a92; background: #fff; display: grid; place-items: center; cursor: pointer;
}
.tema-hoved input:checked { border-color: var(--ink); }
.tema-hoved input:checked::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.tema-tekst { display: flex; flex-direction: column; gap: 2px; }
.tema-navn { font-weight: 600; font-size: 14.5px; }
.tema-besk { font-size: 13px; color: var(--muted); line-height: 1.4; }
.tema-krop { display: none; padding: 0 14px 14px 44px; }
.tema.aktiv .tema-krop { display: flex; flex-direction: column; gap: 8px; }

.tegnforklaring { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.tf-knap, .tf-linje {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 5px 8px; margin-left: -8px;
  border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 13.5px;
}
.tf-knap { transition: background .12s, opacity .15s; }
.tf-knap:hover { background: #f1efe7; }
.tf-knap[aria-pressed="true"] { background: var(--accent-soft); font-weight: 600; }
.tf-knap.daempet { opacity: .45; }
.tf-knap .felt, .tf-linje .felt { width: 16px; height: 16px; }
.tf-navn { flex: 1; }
.tf-navn em, .lag-navn em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.tf-tal { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; white-space: nowrap; }

.vaelger select {
  width: 100%; padding: 8px 32px 8px 10px; border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%231d2621' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  appearance: none; font-size: 13.5px;
}

.skyder { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 4px 2px 0; font-size: 13px; color: var(--ink-2); }
.skyder input { width: 100%; accent-color: var(--deep); }

.lagliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lag { display: flex; align-items: center; gap: 12px; padding: 7px 4px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.lag:hover { background: #f1efe7; }
.lag input { width: 17px; height: 17px; margin: 0; accent-color: var(--deep); flex: none; }
.lag-sig { width: 26px; display: flex; justify-content: center; }

/* ---------- Fanen Besvarelse ---------- */
.opgaven { border-radius: 13px; background: var(--accent-soft); border: 1px solid #cfdec8; }
.opgaven summary {
  list-style: none; cursor: pointer; padding: 12px 14px; display: flex; flex-direction: column; gap: 1px; position: relative;
}
.opgaven summary::-webkit-details-marker { display: none; }
.opgaven summary::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s;
}
.opgaven[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.opgaven-titel { font-weight: 700; color: var(--deep); }
.opgaven-hint { font-size: 13px; color: var(--accent); }
.opgaven .md { padding: 0 14px 14px; }

.punkt { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.opgaven + .punkt { border-top: 0; padding-top: 0; }
.punkt-hoved { display: flex; align-items: center; gap: 12px; }
.punkt-hoved h2 { margin: 0; flex: 1; font: 600 18px/1.2 var(--serif); letter-spacing: -.005em; }
.punkt-nr {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--deep); color: #f4f2ea; font-weight: 700; font-size: 13.5px;
}
.punkt-nr-tom { background: #ecebe3; color: var(--ink-2); }
.ordtaeller {
  flex: none; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: #ecebe3; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.ordtaeller.over { background: var(--warn-soft); color: var(--warn); }
.ordtaeller.over::before { content: '⚠ '; }
.knapper { display: flex; flex-wrap: wrap; gap: 8px; }

.md { font-size: 14.5px; line-height: 1.58; color: var(--ink-2); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .75em; text-wrap: pretty; }
.md ul, .md ol { margin: 0 0 .75em; padding-left: 1.2em; }
.md li { margin: .25em 0; }
.md li::marker { color: var(--muted); }
.md strong { color: var(--ink); font-weight: 600; }
.md h2 { font: 600 17px/1.25 var(--serif); color: var(--ink); margin: 1.2em 0 .4em; }
.md a { color: var(--accent); }

/* ---------- Fanen Nøgletal ---------- */
.helte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.helt {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 12px;
  background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 12px;
}
.helt b { font: 600 21px/1.1 var(--serif); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.helt span { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.helt small { font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 4px; }

.soejler { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.soejler li { display: grid; grid-template-columns: 156px 1fr 66px; align-items: center; gap: 10px; font-size: 13px; }
.soejle-navn { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soejle-spor { height: 12px; }
.soejle { display: block; height: 100%; min-width: 2px; background: var(--deep-2); border-radius: 0 4px 4px 0; }
.soejle-tal { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.tabel-ramme { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.tabel { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabel th, .tabel td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabel thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #faf9f5; }
.tabel tbody tr:last-child > * { border-bottom: 0; }
.tabel tbody tr { cursor: pointer; transition: background .12s; }
.tabel tbody tr:hover, .tabel tbody tr:focus-visible { background: var(--accent-soft); outline: none; }
.tabel tbody th { font-weight: 600; }
.tabel tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 34px; }
.tabel .t { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.k-maerke {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 7px;
  background: #111; color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #111;
}
.k-maerke.lille { min-width: 26px; height: 20px; font-size: 11.5px; margin-right: 6px; box-shadow: none; }

.fakta-blok { display: flex; flex-direction: column; gap: 10px; }
.fakta-blok > div { display: grid; grid-template-columns: 94px 1fr; gap: 12px; align-items: baseline; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.fakta-blok b { font: 600 20px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.fakta-blok span { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.kildenote { margin: -6px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Søg og baggrund ---------- */
.top-hoejre { position: absolute; z-index: 12; top: 16px; right: 16px; display: flex; gap: 10px; align-items: flex-start; }
.soeg { position: relative; width: 330px; }
.soeg-ikon { position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
#soeg-felt {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border: 0; border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14.5px;
}
#soeg-felt::placeholder { color: #8a908a; }
#soeg-felt:focus { outline: 2px solid var(--accent); outline-offset: 0; }
#soeg-liste {
  position: absolute; top: 48px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto;
}
#soeg-liste li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
#soeg-liste li[aria-selected="true"], #soeg-liste li:hover { background: var(--accent-soft); }
.soeg-tekst { font-size: 14px; }
.soeg-type { font-size: 12px; color: var(--muted); white-space: nowrap; }

.baggrund { display: flex; padding: 4px; gap: 2px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-sm); }
.baggrund button {
  border: 0; background: transparent; padding: 0 14px; height: 34px; border-radius: 9px;
  font-weight: 600; font-size: 13.5px; color: var(--ink-2);
}
.baggrund button:hover { color: var(--ink); background: #f1efe7; }
.baggrund button[aria-pressed="true"] { background: var(--deep); color: #f4f2ea; }

/* ---------- Infokort ---------- */
#info {
  position: absolute; z-index: 11; top: 70px; right: 16px; width: 384px;
  max-height: calc(100dvh - 70px - 196px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: glid-ind .22s cubic-bezier(.2, .7, .2, 1);
}
@keyframes glid-ind { from { opacity: 0; transform: translateY(-6px); } }
#info-luk { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; background: var(--surface); color: var(--ink-2); }
#info-indhold { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.info-titel { margin: -4px 0 0; display: flex; align-items: center; gap: 10px; font: 600 21px/1.2 var(--serif); letter-spacing: -.005em; padding-right: 30px; }
.info-meta { margin: -6px 0 0; font-size: 13.5px; color: var(--muted); }
.info-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.regel { margin: 0; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: #f3f1ea; border-radius: 10px; font-size: 13.5px; line-height: 1.4; }
.regel-kode { flex: none; padding: 1px 7px; border-radius: 6px; background: var(--deep); color: #f4f2ea; font-weight: 700; font-size: 12.5px; }

.tilknytning {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13.5px; line-height: 1.35;
}
.tilknytning > span:nth-child(2) { flex: 1; }
button.tilknytning:hover { border-color: var(--ink); }
.tilknytning.statisk { cursor: default; }

.gruppe { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.gruppe header { display: flex; justify-content: space-between; align-items: center; }
.gruppe h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.score { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prikker { display: inline-flex; gap: 3px; }
.prikker i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #8b918b; }
.prikker i.fuld { background: var(--ink); border-color: var(--ink); }
.gruppe-note { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

.svarliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.svarliste li { display: grid; grid-template-columns: 20px 26px 1fr auto; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; }
.svar-ikon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ja .svar-ikon { background: var(--ink); color: #fff; }
.nej .svar-ikon { border: 1.5px solid #a3a8a2; color: #7c827c; }
.svar-kode { font-size: 12px; font-weight: 700; color: var(--muted); }
.nej .svar-tekst { color: var(--muted); }
.svar-ord { font-size: 12.5px; font-weight: 600; }
.nej .svar-ord { font-weight: 400; color: var(--muted); }
.svarliste li.deaktiv { opacity: .5; }

.fakta { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fakta div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fakta .bred { grid-column: 1 / -1; }
.fakta dt { font-size: 12px; color: var(--muted); }
.fakta dd { margin: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }

.status-chip { margin: -4px 0 0; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.tal3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tal3 div { display: flex; flex-direction: column; padding: 10px 12px; background: #f3f1ea; border-radius: 10px; }
.tal3 b { font: 600 19px/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.tal3 span { font-size: 12px; color: var(--muted); }
.afsnit { margin: 4px 0 0; font-size: 13px; font-weight: 700; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-raekke { display: grid; grid-template-columns: 82px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar-spor { height: 10px; background: #ecebe3; border-radius: 4px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--deep-2); border-radius: 0 4px 4px 0; }
.bar-vaerdi { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---------- Tooltip, besked, dialog ---------- */
#tooltip {
  position: absolute; z-index: 13; top: 0; left: 0; pointer-events: none;
  padding: 5px 9px; border-radius: 7px; background: rgba(22, 30, 25, .92); color: #fff;
  font-size: 12.5px; font-weight: 500; white-space: nowrap; box-shadow: var(--shadow-sm);
}
#besked {
  position: absolute; z-index: 30; left: 50%; bottom: 28px; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: var(--shadow);
}
dialog#om {
  width: min(580px, calc(100vw - 32px)); max-height: min(80dvh, 720px); padding: 0; border: 0;
  border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
dialog#om::backdrop { background: rgba(20, 30, 24, .35); backdrop-filter: blur(3px); }
.om-hoved { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 8px 26px; background: var(--surface); }
.om-hoved h2 { margin: 0; font: 600 24px/1.2 var(--serif); }
#om-indhold { padding: 0 26px 26px; }

/* ---------- MapLibre-kontroller ---------- */
.maplibregl-ctrl-group { border-radius: 10px !important; box-shadow: var(--shadow-sm) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 34px !important; height: 34px !important; }
.maplibregl-ctrl-group button svg { display: block; margin: auto; color: var(--ink); }
.maplibregl-ctrl-bottom-right { right: 6px; bottom: 6px; }
.maplibregl-ctrl-scale {
  border-color: var(--ink-2) !important; background: rgba(253, 252, 249, .85) !important; color: var(--ink-2) !important;
  font: 500 11px var(--sans) !important;
}
.maplibregl-ctrl-attrib { font: 11px var(--sans); }
body[data-baggrund="luftfoto"] .maplibregl-ctrl-scale { background: rgba(253, 252, 249, .95) !important; }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  #panel {
    top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 64dvh;
    border-radius: 18px;
  }
  #panel.lukket { transform: none; opacity: 1; pointer-events: auto; }
  #panel.lukket #panel-krop { display: none; }
  #panel.lukket .undertitel { display: none; }
  #panel.lukket .panel-hoved { cursor: pointer; }
  #panel.lukket ~ #panel-vis { display: none; }
  #panel-skjul svg { transform: rotate(-90deg); transition: transform .2s; }
  #panel.lukket #panel-skjul svg { transform: rotate(90deg); }
  .panel-hoved { padding: 14px 12px 14px 18px; }
  .panel-hoved h1 { font-size: 22px; }
  .rude { padding: 14px 16px 22px; }

  .top-hoejre { top: 8px; left: 8px; right: 8px; flex-direction: column; align-items: stretch; gap: 8px; }
  .soeg { width: 100%; }
  .baggrund { align-self: flex-end; }

  #info { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 62dvh; z-index: 14; }
  body.info-aaben #panel { visibility: hidden; }
  .maplibregl-ctrl-bottom-right { bottom: 96px; }
  .soejler li { grid-template-columns: 120px 1fr 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
