/* Plansza VIII — Mapa znaczeń: 167 tys. orzeczeń jako kropki na płótnie, nazwy wysp i wędrówki przepisów w nakładce SVG. */

#map { cursor: grab; display: block; }
#map.dragging { cursor: grabbing; }
#map:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brass); }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

.loading {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%);
  font-family: var(--serif); font-style: italic; color: var(--ink-muted); font-size: var(--t-lg);
  pointer-events: none; transition: opacity 0.4s;
}
.loading.off { opacity: 0; }

/* nazwy kontynentów (daleko) i wysp (blisko) */
.cont text {
  font-family: var(--serif); font-style: italic; letter-spacing: 0.02em; text-anchor: middle;
  fill: var(--paper); opacity: 0.55; pointer-events: none;
  paint-order: stroke; stroke: var(--ground); stroke-width: 5px; stroke-linejoin: round;
}
.isles text {
  font-family: var(--serif); text-anchor: middle; fill: var(--paper); cursor: pointer; pointer-events: auto;
  paint-order: stroke; stroke: var(--ground); stroke-width: 3.5px; stroke-linejoin: round;
}
.isles text:hover { fill: var(--brass); }
.isles text.sel { fill: var(--brass); font-weight: 600; }
.isles text.dim { opacity: 0.35; }

/* zaznaczony punkt (dymek) */
.pick circle { fill: none; stroke: var(--brass); stroke-width: 1.5px; }

/* wędrówka przepisu */
.walk path { fill: none; stroke: var(--brass); stroke-width: 2px; stroke-linecap: round; stroke-linejoin: round; }
.walk .halo { fill: none; stroke: var(--brass); opacity: 0.22; stroke-width: 10px; }
.walk circle.step { fill: var(--brass); stroke: var(--ground); stroke-width: 1.5px; }
.walk circle.step.cur { stroke: var(--paper); }
.walk text { font-family: var(--sans); font-size: 11px; fill: var(--paper); paint-order: stroke; stroke: var(--ground); stroke-width: 3px; stroke-linejoin: round; }
.walk text.per { font-weight: 700; fill: var(--brass); }
.walk .arrow { fill: var(--brass); }

/* przyciski przybliżenia u góry płótna */
.zoom-btns { position: absolute; right: 20px; top: 16px; z-index: 6; display: flex; gap: 4px; }
.zoom-btns button { min-width: 34px; padding: 5px 9px; }
button.ghost { background: transparent; color: var(--ink-muted); }
button.ghost:hover { color: var(--paper); }

.controls { flex-direction: column; align-items: flex-start; gap: 10px; }
.controls .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.controls .small { font-size: var(--t-xs); }
.year-scrub .year { font-size: var(--t-xl); }
.year-scrub input[type="range"] { width: min(260px, 26vw); }
.year-scrub .faint.small { margin-left: 4px; }
.controls .legend { background: rgba(8, 11, 17, 0.6); padding: 4px 8px; border-radius: 3px; }
.controls .legend span { cursor: pointer; }
.controls .legend span.on { color: var(--paper); }
.legend .ramp { display: inline-flex; align-items: center; gap: 8px; }
.legend .ramp i { width: 120px; height: 8px; border-radius: 2px; }

/* ---------- panel ---------- */
.panel .hint { color: var(--ink-muted); font-size: var(--t-sm); }
.panel .hero { font-family: var(--serif); font-size: var(--t-2xl); line-height: 1; margin: 14px 0 2px; color: var(--paper); }
.panel .hero small { display: block; font-family: var(--sans); font-size: var(--t-sm); color: var(--ink-muted); margin-top: 4px; }
.panel .sub { color: var(--ink-muted); font-size: var(--t-sm); margin: 0 0 6px; }
.panel .tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--ink-muted); margin-right: 12px; }
.panel .tag i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.panel svg.spark { display: block; width: 100%; height: 96px; overflow: visible; }
.panel .note { font-size: var(--t-xs); color: var(--ink-faint); margin-top: 8px; line-height: 1.45; }
.panel .src-bar { display: flex; height: 8px; border-radius: 2px; overflow: hidden; margin: 6px 0 10px; }
.panel .src-bar i { display: block; height: 100%; }
.panel .rows li .k { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.panel .rows li .k b { font-weight: 500; }
.panel .rows li .k small { color: var(--ink-faint); font-size: var(--t-xs); white-space: nowrap; }
.panel .rows li .v em { font-style: normal; color: var(--brass); }
.panel .rows li .v.down em { color: var(--ink-muted); }
.panel .rows li .trend { font-variant-numeric: tabular-nums; color: var(--ink-faint); font-size: var(--t-xs); }
.panel .examples li { display: block; font-size: var(--t-sm); line-height: 1.4; padding: 7px 0; }
.panel .examples li small { display: block; color: var(--ink-faint); font-size: var(--t-xs); margin-top: 2px; }
.panel .back { margin-top: 24px; font-size: var(--t-sm); color: var(--ink-muted); }
.panel .back button, .panel button.link { background: none; border: 0; padding: 0; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.panel .back button:hover, .panel button.link:hover { color: var(--brass); }
.panel .sub-h { font-family: var(--serif); font-weight: 500; font-size: var(--t-md); margin: 14px 0 2px; color: var(--ink-muted); }
.panel .rows li .k.col { flex-direction: column; gap: 0; }

/* wędrówki: presety + wyszukiwarka */
.panel .presets { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.panel .presets button {
  text-align: left; background: var(--ground-lift); border-color: var(--rule); padding: 8px 12px; line-height: 1.35;
}
.panel .presets button b { font-family: var(--serif); font-weight: 500; display: block; }
.panel .presets button small { color: var(--ink-muted); font-size: var(--t-xs); }
.panel .presets button:hover b, .panel .presets button[aria-pressed="true"] b { color: var(--brass); }
.panel .presets button[aria-pressed="true"] { background: var(--ground-lift); color: var(--paper); border-color: var(--brass); }
.panel .search { position: relative; }
.panel .search input { width: 100%; }
.panel .hits { position: absolute; left: 0; right: 0; top: 100%; z-index: 7; margin: 4px 0 0; padding: 4px 0; max-height: 280px; overflow-y: auto; background: var(--ground-deep); border: 1px solid var(--rule); border-radius: 3px; }
.panel .hits li { padding: 6px 12px; cursor: pointer; border: 0; }
.panel .hits li b { white-space: nowrap; }
.panel .hits li .v { overflow: hidden; text-overflow: ellipsis; }
.panel .hits li[aria-selected="true"], .panel .hits li:hover { background: var(--ground-lift); }
.panel .hits li[aria-selected="true"] b { color: var(--brass); }
.panel .steps li { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: baseline; }
.panel .steps li .p { font-family: var(--serif); color: var(--brass); white-space: nowrap; }
.panel .steps li .cl { min-width: 0; }
.panel .steps li.cur .cl { color: var(--paper); }
.panel .steps li.click:hover .cl { color: var(--brass); }

@media (max-width: 900px) {
  .cont text { font-size: 14px; }
  .year-scrub input[type="range"] { width: 150px; }
  .zoom-btns { top: 12px; right: 12px; }
}

/* znak Lexedit: prawy górny róg zajmuje zoom — w lewy górny */
.atlas-mark { right: auto; left: 16px; }
