/* /kart/ — "Kveldskamp": the hall with the lights down. Dark floor, one bright dot per club. */
.kart {
  --k-bg: #0b1a2c; --k-panel: #0f2238; --k-raise: #17314f; --k-line: #24364d; --k-text: #e8eef5; --k-muted: #a9b8c9; --k-yellow: #ffd23f;
  background: var(--k-bg); color: var(--k-text);
  display: grid; grid-template-columns: 1fr;
}
.kart a { color: var(--k-yellow); }
.kart h2 { font-size: 0.95rem; font-weight: 600; color: var(--k-muted); letter-spacing: 0; }
.k-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.k-filter, .k-result { background: var(--k-panel); padding: 1rem 1.1rem; min-width: 0; }
.k-filter summary { font-weight: 700; font-size: 1.05rem; min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; }
.k-areas { border: 0; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.k-areas legend { padding: 0; margin-bottom: 0.5rem; font-size: 0.95rem; font-weight: 600; color: var(--k-muted); }
.k-area { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0 0.85rem; background: #132a45; border: 2px solid var(--k-line); border-radius: 8px; font-weight: 600; cursor: pointer; }
.k-area:has(input:checked) { background: var(--k-raise); border-color: var(--k-yellow); }
.k-area input { width: 1.25rem; height: 1.25rem; accent-color: var(--k-yellow); margin: 0; }
.k-area span:nth-of-type(1) { flex: 1; }
.k-n { color: var(--k-muted); font-weight: 400; font-variant-numeric: tabular-nums; }

.k-acts { margin-top: 1.25rem; }
.k-acts-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; color: var(--k-muted); font-size: 0.95rem; }
.k-link { font: inherit; color: var(--k-yellow); background: none; border: 0; padding: 0.5rem 0.1rem; text-decoration: underline; cursor: pointer; }
.k-act { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; cursor: pointer; }
.k-act input { width: 1.25rem; height: 1.25rem; accent-color: var(--k-yellow); margin: 0; flex-shrink: 0; }
.k-swatch { width: 4px; height: 1.4rem; border-radius: 2px; flex-shrink: 0; }
.k-act-name { flex: 1; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.k-btn { margin-top: 0.6rem; min-height: 2.75rem; padding: 0 1rem; font: inherit; font-weight: 600; color: var(--k-text); background: none; border: 2px solid #5b6f87; border-radius: 8px; cursor: pointer; }
.k-btn:hover { border-color: var(--k-yellow); }
.k-note, .k-empty { margin-top: 1rem; font-size: 0.9rem; color: var(--k-muted); }

.k-map-wrap { position: relative; min-width: 0; }
.k-map { height: 62vh; min-height: 22rem; background: #0d1d31; }
.k-near { position: absolute; z-index: 500; top: 0.75rem; right: 0.75rem; min-height: 2.75rem; padding: 0 1rem; font: inherit; font-weight: 600; color: var(--k-text); background: #132a45; border: 1px solid #2c4463; border-radius: 8px; cursor: pointer; }
.k-near:hover { border-color: var(--k-yellow); }
.k-noscript { position: absolute; inset: 0; display: grid; place-content: center; padding: 2rem; max-width: none; }

.k-count { display: flex; flex-direction: column; }
.k-count-label { font-size: 0.95rem; font-weight: 600; color: var(--k-muted); }
.k-count-n { font-size: clamp(2.75rem, 9vw, 4rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--k-yellow); margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.k-count-what { margin-top: 0.4rem; font-size: 1.1rem; font-weight: 600; }
.k-bars { margin-top: 1.25rem; display: grid; grid-template-columns: minmax(5.5rem, auto) 1fr auto; align-items: center; gap: 0.6rem 0.75rem; font-size: 0.95rem; }
.k-bars:empty { display: none; }
.k-bar-name { overflow-wrap: anywhere; }
.k-track { display: block; }
.k-bar { display: block; height: 12px; border-radius: 6px; }
.k-bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.k-hint { margin-top: 1rem; font-size: 0.9rem; color: var(--k-muted); }
.k-hint:empty { display: none; }
.k-rows { margin-top: 1rem; border-top: 1px solid var(--k-line); }
.k-rows:empty { display: none; }
.kart .k-row { display: flex; flex-direction: column; padding: 0.7rem 0; border-bottom: 1px solid var(--k-line); text-decoration: none; color: var(--k-text); }
.k-row:hover .k-row-name { text-decoration: underline; text-decoration-color: var(--k-yellow); }
.k-row-name { font-weight: 600; }
.k-row-sub { font-size: 0.9rem; color: var(--k-muted); }
.k-row-sub:empty { display: none; }

@media (min-width: 60rem) {
  .kart { grid-template-columns: 18.5rem minmax(0, 1fr) 21rem; height: calc(100vh - 3.75rem); min-height: 34rem; }
  .k-filter { border-right: 1px solid var(--k-line); overflow-y: auto; }
  .k-result { border-left: 1px solid var(--k-line); overflow-y: auto; padding: 1.5rem 1.25rem; }
  .k-filter summary { display: none; }
  .k-map { height: 100%; }
}

/* Leaflet, dimmed to match. The grey base map is inverted and let through at reduced strength over navy. */
.kart .leaflet-container { background: #0d1d31; font: inherit; }
.kart .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9); opacity: 0.55; }
.kart .leaflet-bar { border: 1px solid #2c4463; border-radius: 8px; overflow: hidden; box-shadow: none; }
.kart .leaflet-bar a { background: #132a45; color: var(--k-text); border-bottom-color: #2c4463; width: 2.75rem; height: 2.75rem; line-height: 2.75rem; font-size: 1.4rem; }
.kart .leaflet-bar a:hover { background: var(--k-raise); color: var(--k-yellow); }
.kart .leaflet-control-attribution { background: rgba(11, 26, 44, 0.85); color: var(--k-muted); font-size: 0.75rem; }
.kart .leaflet-control-attribution a { color: var(--k-muted); }
.kart .leaflet-tooltip { background: #132a45; color: var(--k-text); border: 1px solid #2c4463; box-shadow: none; font-weight: 600; }
.kart .leaflet-tooltip-top::before { border-top-color: #2c4463; }
.kart .leaflet-popup-content-wrapper, .kart .leaflet-popup-tip { background: #132a45; color: var(--k-text); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.kart .leaflet-popup-content { margin: 0.8rem 1rem; }
.kart .leaflet-container a.leaflet-popup-close-button { color: var(--k-muted); width: 2rem; height: 2rem; font-size: 1.3rem; }
.k-pop { display: flex; flex-direction: column; gap: 0.2rem; font-size: 1rem; }
.k-pop a { font-weight: 700; }
.k-pop span { color: var(--k-muted); font-size: 0.9rem; }
.kart :focus-visible { outline: 3px solid var(--k-yellow); outline-offset: 2px; box-shadow: none; }

/* Road cameras */
.k-veg { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--k-line); }
.k-veg .k-note { margin-top: 0.4rem; }
.k-cam-mini { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--k-yellow); flex-shrink: 0; position: relative; }
.k-cam-mini::after { content: ""; position: absolute; inset: 0.42rem; border-radius: 50%; border: 2px solid #10233b; }
.k-cam { background: var(--k-yellow); border: 2px solid #0b1a2c; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); cursor: pointer; }
.k-cam svg { width: 20px; height: 20px; fill: none; stroke: #10233b; stroke-width: 2; stroke-linejoin: round; }
.k-cam:hover, .k-cam:focus-visible { background: #fff; }
.k-campop { display: flex; flex-direction: column; gap: 0.5rem; max-height: 62vh; overflow-y: auto; font-size: 0.95rem; }
.k-campop h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.k-campop h4 { font-size: 0.9rem; font-weight: 600; color: var(--k-muted); margin: 0.4rem 0 0.2rem; }
.k-campop img { width: 100%; height: auto; border-radius: 6px; background: #0b1a2c; display: block; }
.k-pop-muted { margin: 0; font-size: 0.85rem; color: var(--k-muted); max-width: none; }
.k-pop-facts { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; }
.k-pop-facts dt { color: var(--k-text); }
.k-pop-facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.k-pop-list { margin: 0; padding-left: 1.1rem; list-style: disc; display: grid; gap: 0.35rem; }
.k-kamknapp { position: absolute; z-index: 500; top: 4rem; right: 0.75rem; min-height: 2.75rem; padding: 0 1rem; font: inherit; font-weight: 600; color: var(--k-muted); background: #132a45; border: 1px solid #2c4463; border-radius: 8px; cursor: pointer; }
.k-kamknapp[aria-pressed="true"] { color: #10233b; background: var(--k-yellow); border-color: var(--k-yellow); }
@media (min-width: 60rem) { .k-kamknapp { display: none; } }
.kart .k-campop-wrap .leaflet-popup-content { margin: 0.8rem 0.9rem; }
.k-lukk { flex-shrink: 0; min-height: 2.75rem; padding: 0 1rem; font: inherit; font-weight: 600; color: var(--k-text); background: #132a45; border: 1px solid #2c4463; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.k-lukk:hover, .k-lukk:focus-visible { border-color: var(--k-yellow); }
.k-cam-rute { background: #5ad1ff; }
.k-cam-av { background: #8a97a8; }
.k-pop-warn { margin: 0; max-width: none; font-size: 0.9rem; font-weight: 600; color: var(--k-yellow); }
.k-pop .k-pop-rute, .k-rute .btn { min-height: 2.5rem; padding: 0 0.9rem; font: inherit; font-weight: 700; color: #10233b; background: var(--k-yellow); border: 1px solid var(--k-yellow); border-radius: 8px; cursor: pointer; }
.k-pop .k-pop-rute { display: block; margin-top: 0.6rem; }
.k-pop .k-pop-rute:hover, .k-rute .btn:hover { background: #fff; border-color: #fff; }
.k-rute .btn.quiet { color: var(--k-text); background: transparent; border-color: #2c4463; }
.k-rute .btn.quiet:hover { background: transparent; border-color: var(--k-yellow); }
.k-rute .btn:disabled { opacity: 0.6; cursor: default; }
.k-rute { background: var(--k-panel); border-top: 1px solid var(--k-line); padding: 0.9rem 1.1rem 1.1rem; font-size: 0.95rem; }
.k-rute[hidden] { display: none; }
.k-rute-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.k-rute-head h3 { margin: 0.45rem 0 0; font-size: 1.1rem; font-weight: 700; outline: none; overflow-wrap: anywhere; }
.k-rute-body { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.6rem; }
.k-rute-body p { margin: 0; max-width: none; }
.k-rute-valg { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.k-rute-status { font-weight: 700; }
.k-rute-status:empty { display: none; }
.k-rute-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.k-rute-kam { display: flex; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 2.75rem; padding: 0.4rem 0.7rem; text-align: left; font: inherit; color: var(--k-text); background: #132a45; border: 1px solid #2c4463; border-radius: 8px; cursor: pointer; }
.k-rute-kam:hover, .k-rute-kam:focus-visible { border-color: var(--k-yellow); }
.k-rute-kam .k-pop-muted { white-space: nowrap; }
.kart .k-velg { cursor: crosshair; }
@media (min-width: 60rem) {
  .k-rute { position: absolute; z-index: 600; left: 0.75rem; bottom: 1.5rem; width: 23rem; max-height: calc(100% - 9rem); overflow-y: auto; border: 1px solid #2c4463; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
}
.k-fore { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.6rem 0.8rem; border-left: 4px solid #3ecf8e; background: #132a45; border-radius: 0 8px 8px 0; }
.k-fore strong { font-size: 1.05rem; }
.k-fore-warn { border-left-color: var(--k-yellow); }
.k-fore-warn strong { color: var(--k-yellow); }
.k-fore-bad { border-left-color: #ff6b5e; }
.k-fore-bad strong { color: #ff8a80; }
.k-rute a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.k-rute a { color: var(--k-yellow); }
.k-rute a.btn.quiet { color: var(--k-text); }
.k-maal { display: flex; flex-direction: column; gap: 0.35rem; }
.k-maal-kart { position: relative; height: 10.5rem; overflow: hidden; border-radius: 8px; background: #d9dde2; }
.k-maal-fliser { position: absolute; width: 768px; height: 768px; display: grid; grid-template-columns: repeat(3, 256px); }
.k-maal-fliser img { display: block; width: 256px; height: 256px; max-width: none; }
.k-maal-prikk { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #e5342a; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.k-rute-head h3:focus, .k-rute-head h3:focus-visible { outline: none; }
.k-campop img { aspect-ratio: 4 / 3; object-fit: contain; }
.k-campop-mer { min-height: 2.5rem; padding: 0 0.9rem; font: inherit; font-weight: 700; color: #10233b; background: var(--k-yellow); border: 1px solid var(--k-yellow); border-radius: 8px; cursor: pointer; }
.k-kaminfo { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--k-line); font-size: 0.95rem; }
.k-kaminfo[hidden] { display: none; }
.k-kaminfo-body { display: flex; flex-direction: column; gap: 0.5rem; }
.k-kaminfo-body p { margin: 0; max-width: none; }
.k-kaminfo .k-pop-sec h4 { font-size: 0.9rem; font-weight: 600; color: var(--k-muted); margin: 0.5rem 0 0.25rem; }
.k-kaminfo .k-rute-head h3 { margin: 0.45rem 0 0; font-size: 1.15rem; }
/* On a phone the panel is moved to sit right under the map. */
.k-map-wrap > .k-kaminfo { margin: 0; padding: 0.9rem 1.1rem 1.1rem; background: var(--k-panel); border-top: 1px solid var(--k-line); scroll-margin-top: 0.5rem; }
