/* Mapa */
.emap { position: relative; overflow: hidden; background: var(--sea); touch-action: none; user-select: none; -webkit-user-select: none; }
.emap-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.emap-svg:active { cursor: grabbing; }
.emap-sea { fill: var(--sea); }
.emap-c { stroke: var(--land-line); stroke-width: 0.8px; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill 0.2s; }
.emap-co { fill: #e4e2d6; }
[data-theme='space'] .emap-co { fill: #2c3550; }
.emap-ck { fill: var(--land); cursor: pointer; }
.emap[data-style='political'] .emap-ck { fill: var(--pc, var(--land)); }
.emap[data-style='physical'] .emap-ck { fill: #cfe8b9; }
[data-theme='space'] .emap[data-style='physical'] .emap-ck { fill: #3f5a3f; }
[data-theme='space'] .emap[data-style='political'] .emap-ck { filter: brightness(0.75) saturate(0.9); }
.emap-ck.hover { filter: brightness(1.08) saturate(1.2); stroke: var(--accent); stroke-width: 1.6px; }
.emap.quiz .emap-ck.hover { fill: #fff6c4; }
.emap-lake { fill: var(--sea); stroke: var(--sea-d); stroke-width: 0.6px; vector-effect: non-scaling-stroke; pointer-events: none; }
.emap-phys-a { pointer-events: none; }
.emap-river { fill: none; stroke: #3d8fd6; stroke-width: 1.3px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.emap-river.lvl1 { stroke-width: 2px; }
.emap-river-hit { fill: none; stroke: transparent; stroke-width: 14px; vector-effect: non-scaling-stroke; cursor: pointer; pointer-events: stroke; }
.emap-river-hit:hover + .emap-river, .emap-river-hit:hover { stroke: rgba(61, 143, 214, 0.35); }
.emap-area { fill: rgba(255, 255, 255, 0.0); stroke: rgba(0, 0, 0, 0.18); stroke-dasharray: 4 3; stroke-width: 1px; vector-effect: non-scaling-stroke; cursor: pointer; }
.emap-area:hover { fill: rgba(255, 220, 120, 0.3); }
.emap-smallc { fill: var(--land); stroke: var(--ink); stroke-width: 1px; vector-effect: non-scaling-stroke; cursor: pointer; opacity: 0.85; }
.emap-smallc.hl-q, .emap-smallc.hl-ok { fill: var(--gold); }
.emap-smallc.hl-bad { fill: var(--bad); }

/* Podświetlenia krajów */
.emap-ck.hl-q { fill: var(--gold) !important; stroke: #b07800; stroke-width: 2px; animation: hlBlink 1.2s ease-in-out infinite; }
.emap-ck.hl-ok { fill: var(--good) !important; stroke: #13692b; stroke-width: 2px; }
.emap-ck.hl-bad { fill: var(--bad) !important; stroke: #8f1d22; stroke-width: 2px; }
.emap-ck.hl-pick { fill: #ffe066 !important; }
.emap-ck.hl-dim { opacity: 0.35; }
@keyframes hlBlink { 50% { fill-opacity: 0.6; } }

/* Podświetlenia obiektów */
.emap-hl { stroke: none; pointer-events: none; }
.emap-hl.emap-hl-q { fill: rgba(255, 184, 0, 0.55); animation: hlArea 1.3s ease-in-out infinite; }
.emap-hl.emap-hl-ok { fill: rgba(43, 178, 76, 0.55); }
.emap-hl.emap-hl-bad { fill: rgba(229, 72, 77, 0.5); }
.emap-hl.water.emap-hl-q { fill: rgba(255, 210, 60, 0.75); }
.emap-hl.water.emap-hl-ok { fill: rgba(60, 200, 110, 0.7); }
@keyframes hlArea { 50% { opacity: 0.55; } }
.emap-hl-edge { fill: none; stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-dasharray: 5 3; pointer-events: none; }
.emap-hl-edge.emap-hl-q { stroke: #b07800; }
.emap-hl-edge.emap-hl-ok { stroke: #13692b; }
.emap-hl-edge.emap-hl-bad { stroke: #8f1d22; }
.emap-hl-river { fill: none; stroke-width: 4px; vector-effect: non-scaling-stroke; stroke-linecap: round; pointer-events: none; }
.emap-hl-river-glow { fill: none; stroke-width: 12px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: 0.35; pointer-events: none; }
.emap-hl-river.emap-hl-q, .emap-hl-river-glow.emap-hl-q { stroke: #ff9f00; }
.emap-hl-river.emap-hl-ok, .emap-hl-river-glow.emap-hl-ok { stroke: #1f9d45; }
.emap-hl-river.emap-hl-bad, .emap-hl-river-glow.emap-hl-bad { stroke: #d6333a; }
.emap-hl-river.emap-hl-q { animation: hlRiver 1s linear infinite; stroke-dasharray: 10 6; }
@keyframes hlRiver { to { stroke-dashoffset: -32; } }
.emap-pulse { pointer-events: none; }
.emap-pulse .dot { fill: var(--gold); stroke: #fff; stroke-width: 2.5; }
.emap-pulse .ring { fill: none; stroke: var(--gold); stroke-width: 3; animation: pulseRing 1.2s ease-out infinite; transform-origin: 0 0; }
.emap-pulse.emap-hl-ok .dot { fill: var(--good); }
.emap-pulse.emap-hl-ok .ring { stroke: var(--good); }
.emap-pulse.emap-hl-bad .dot { fill: var(--bad); }
.emap-pulse.emap-hl-bad .ring { stroke: var(--bad); }
@keyframes pulseRing { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.emap-clickmark .c { stroke: #fff; stroke-width: 2.5; }
.emap-clickmark.ok .c { fill: var(--good); }
.emap-clickmark.bad .c { fill: var(--bad); }
.emap-clickmark .t { fill: #fff; font-size: 13px; font-weight: 900; font-family: var(--font); }
.emap-fx-line { stroke: var(--bad); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-dasharray: 6 4; }

/* Znaczniki */
.emap-mk { cursor: pointer; }
.emap-mk .hit { fill: transparent; }
.emap-mk .bgc { fill: #fff; stroke: var(--ink); stroke-width: 1.6; }
.emap-mk-city .bgc { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.emap-mk-capital .bgc { fill: #fff; stroke: #c92a2a; stroke-width: 1.6; }
.emap-mk-capital .star { fill: #e03131; }
.emap-mk-lake .bgc { fill: #4dabf7; stroke: #fff; }
.emap-mk-region .bgc { fill: var(--accent2); stroke: #fff; }
.emap-mk-island .bgc, .emap-mk-archipelago .bgc, .emap-mk-peninsula .bgc { fill: #f59f00; stroke: #fff; }
.emap-mk-mountains .bgc, .emap-mk-upland .bgc { fill: #a0522d; stroke: #fff; }
.emap-mk-lowland .bgc, .emap-mk-basin .bgc { fill: #2f9e44; stroke: #fff; }
.emap-mk-sea .bgc, .emap-mk-ocean .bgc, .emap-mk-gulf .bgc, .emap-mk-strait .bgc { fill: #1971c2; stroke: #fff; }
.emap-mk .tri { fill: #5c3d1e; stroke: #fff; stroke-width: 1.5; }
.emap-mk .emo { font-size: 12px; }
.emap-mk:hover .bgc, .emap-mk:hover .tri { stroke: var(--gold); stroke-width: 3; }
.emap-mk.numbered .bgc { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.emap-mk.numbered .num { fill: #fff; font: 900 14px var(--font); }
.emap-mk.numbered:hover .bgc { fill: var(--accent2); }
.emap-mk.picked .bgc { fill: var(--gold); }
.emap-mk.right .bgc { fill: var(--good); }
.emap-mk.wrong .bgc { fill: var(--bad); }
.emap-lbl { font-family: var(--font); font-weight: 800; fill: var(--ink); stroke: rgba(255, 255, 255, 0.85); paint-order: stroke; stroke-linejoin: round; text-anchor: middle; pointer-events: none; }
[data-theme='space'] .emap-lbl { stroke: rgba(15, 21, 48, 0.85); }
.emap-lbl-sea { fill: #1864ab; font-weight: 700; }
.emap-lbl-river { fill: #1c7ed6; font-weight: 700; font-style: italic; }
.emap-lbl-c.lvl1 { font-weight: 900; }

.emap-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; font-weight: 800; color: var(--ink); }
.emap-spin { width: 46px; height: 46px; border-radius: 50%; border: 5px solid rgba(0, 0, 0, 0.1); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.emap-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.emap-zoom button { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--panel); color: var(--ink); font-size: 22px; font-weight: 900; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); cursor: pointer; }
