/* map: every selector starts with the tool's root class (TOOLS.md).
   The idea: the game's world map window. The zone map is the game's own painting, edge to edge in a dark frame; pins
   are the game's own glyphs (the gossip icons for people, the minimap tracking dots for herbs, ore, chests and pools);
   the legend reads like the minimap's tracking list; the coordinates under the map are in the game's yellow, in the
   "x, y" form players type into chat. Everything below the map is quiet text with tabular figures. */
.kc-t-map { --pin: 18px; --a: #4a86e8; --h: #d23a2f; --b: #ddb45e; }

/* header line under the h1 */
.kc-t-map .kc-t-map-levels { margin: -4px 0 0; font: 600 15px/1.4 var(--sans); color: var(--game-yellow); font-variant-numeric: tabular-nums; }
.kc-t-map .kc-t-map-hint { font: 14px/1.5 var(--sans); color: var(--muted); max-width: 70ch; margin: 10px 0 0; }

/* the map and the legend side by side; on a phone the legend wraps under the map */
.kc-t-map .kc-t-map-app { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; align-items: start; }
@media (max-width: 860px) { .kc-t-map .kc-t-map-app { grid-template-columns: minmax(0, 1fr); } }
.kc-t-map .kc-t-map-fig { margin: 0; }
.kc-t-map .kc-t-map-frame { position: relative; overflow: hidden; aspect-ratio: 1002 / 668; background: #1b1710;
  border: 1px solid #6b5630; box-shadow: 0 0 0 3px #120f0a, 0 0 0 4px rgba(221, 180, 94, 0.35), 0 18px 40px rgba(0, 0, 0, 0.55); }
.kc-t-map .kc-t-map-img { display: block; width: 100%; height: 100%; }
.kc-t-map .kc-t-map-noimg { background: repeating-linear-gradient(45deg, #2a2418 0 12px, #241f15 12px 24px); }
.kc-t-map .kc-t-map-over { position: absolute; inset: 0; }
.kc-t-map .kc-t-map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kc-t-map .kc-t-map-lines line { stroke: rgba(255, 209, 0, 0.85); stroke-width: 2; stroke-dasharray: 7 4; vector-effect: non-scaling-stroke; }
.kc-t-map .kc-t-map-lines .kc-t-map-l-a { stroke: rgba(122, 170, 255, 0.9); }
.kc-t-map .kc-t-map-lines .kc-t-map-l-h { stroke: rgba(255, 110, 96, 0.9); }
.kc-t-map .kc-t-map-cap { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px 0; font: 600 14px/1.4 var(--sans); color: var(--game-yellow); font-variant-numeric: tabular-nums; min-height: 28px; }

/* pins: the game's glyph on a dark disc; a group shows its count in the corner */
.kc-t-map .kc-t-map-pin { position: absolute; width: var(--pin); height: var(--pin); margin: calc(var(--pin) / -2) 0 0 calc(var(--pin) / -2);
  border-radius: 50%; background: #0c0d14 center / 16px 16px no-repeat; box-shadow: 0 0 0 1px rgba(221, 180, 94, 0.85), 0 1px 4px rgba(0, 0, 0, 0.8); text-decoration: none; }
.kc-t-map .kc-t-map-pin:hover, .kc-t-map .kc-t-map-pin:focus-visible { z-index: 3; box-shadow: 0 0 0 2px var(--game-yellow), 0 1px 6px rgba(0, 0, 0, 0.9); }
.kc-t-map .kc-t-map-pin b { position: absolute; inset-inline-start: 11px; top: 9px; min-width: 15px; padding: 0 3px; border-radius: 8px; background: #000;
  color: var(--game-yellow); font: 700 10px/14px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.kc-t-map .kc-t-map-ico { display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: #0c0d14 center / 16px 16px no-repeat; vertical-align: -3px; margin-inline-end: 8px; }
.kc-t-map .kc-t-map-p-flight { background-image: var(--m-taxi); background-color: #1d3a24; }
.kc-t-map .kc-t-map-p-quests { background-image: var(--m-quest); background-color: #3a3110; }
.kc-t-map .kc-t-map-p-inn { background-image: var(--m-inn); background-color: #3b2a14; }
.kc-t-map .kc-t-map-p-services { background-image: var(--m-svc); background-color: #2b2b34; }
.kc-t-map .kc-t-map-p-vendors { background-image: var(--m-vendor); background-color: #2c2416; }
.kc-t-map .kc-t-map-p-trainers { background-image: var(--m-trainer); background-color: #20283a; }
/* the minimap tracking dots (ui/minimap/objecticons.png: 4 x 2 cells of 32 px, drawn at 16 px) */
.kc-t-map .kc-t-map-p-herbs, .kc-t-map .kc-t-map-p-ore, .kc-t-map .kc-t-map-p-chests, .kc-t-map .kc-t-map-p-fishing, .kc-t-map .kc-t-map-p-rares {
  background-image: var(--m-dots); background-size: 64px 64px; background-color: transparent; }
.kc-t-map .kc-t-map-pin.kc-t-map-p-herbs, .kc-t-map .kc-t-map-pin.kc-t-map-p-ore, .kc-t-map .kc-t-map-pin.kc-t-map-p-chests,
.kc-t-map .kc-t-map-pin.kc-t-map-p-fishing, .kc-t-map .kc-t-map-pin.kc-t-map-p-rares { --pin: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.kc-t-map .kc-t-map-p-ore { background-position: 0 0; }
.kc-t-map .kc-t-map-p-rares { background-position: -16px 0; }
.kc-t-map .kc-t-map-p-herbs { background-position: -32px 0; }
.kc-t-map .kc-t-map-p-chests { background-position: -48px 0; }
.kc-t-map .kc-t-map-p-fishing { background-position: 0 -16px; }
.kc-t-map .kc-t-map-ico.kc-t-map-p-herbs, .kc-t-map .kc-t-map-ico.kc-t-map-p-ore, .kc-t-map .kc-t-map-ico.kc-t-map-p-chests,
.kc-t-map .kc-t-map-ico.kc-t-map-p-fishing, .kc-t-map .kc-t-map-ico.kc-t-map-p-rares { width: 16px; height: 16px; margin-inline: 1px 9px; }
/* without the art set the dots stay readable as plain colours */
.kc-t-map:not([style*="--m-dots"]) .kc-t-map-p-ore { background-color: #e0b52c; }
.kc-t-map:not([style*="--m-dots"]) .kc-t-map-p-rares { background-color: #c8322b; }
.kc-t-map:not([style*="--m-dots"]) .kc-t-map-p-herbs { background-color: #3fae3a; }
.kc-t-map:not([style*="--m-dots"]) .kc-t-map-p-chests { background-color: #3a62c8; }
.kc-t-map:not([style*="--m-dots"]) .kc-t-map-p-fishing { background-color: #8fb4d8; }
.kc-t-map .kc-t-map-p-dungeons { background: radial-gradient(circle, #d9b8ff 0 3px, #7a3fc0 4px 6px, #1a0f2a 7px); }
/* quest givers carry their side in the ring */
.kc-t-map .kc-t-map-pin.kc-t-map-s-a { box-shadow: 0 0 0 2px var(--a), 0 1px 4px rgba(0, 0, 0, 0.8); }
.kc-t-map .kc-t-map-pin.kc-t-map-s-h { box-shadow: 0 0 0 2px var(--h), 0 1px 4px rgba(0, 0, 0, 0.8); }
.kc-t-map .kc-t-map-searching .kc-t-map-pin { opacity: 0.22; }
.kc-t-map .kc-t-map-searching .kc-t-map-pin.kc-t-map-hit { opacity: 1; z-index: 2; box-shadow: 0 0 0 2px var(--game-yellow), 0 0 12px rgba(255, 209, 0, 0.8); }

/* zone names on a continent map */
.kc-t-map .kc-t-map-label { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 700 12px/1.1 var(--serif); color: #fff6dc;
  text-decoration: none; text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 6px #000; }
.kc-t-map .kc-t-map-label:hover { color: var(--game-yellow); }
@media (max-width: 600px) { .kc-t-map .kc-t-map-label { font-size: 9px; } .kc-t-map .kc-t-map-cont .kc-t-map-pin { --pin: 12px; background-size: 10px 10px; } }

/* the legend: the minimap tracking list */
.kc-t-map .kc-t-map-legend { background: var(--tip-bg); border: 1px solid var(--tip-edge); border-radius: 5px; box-shadow: inset 0 0 0 2px #1d2030; padding: 8px 6px; font: 14px/1.3 var(--sans); }
.kc-t-map .kc-t-map-lgh { font: 600 13px/1.2 var(--sans); color: var(--game-yellow); margin: 2px 8px 6px; }
.kc-t-map .kc-t-map-legend ul { list-style: none; margin: 0; padding: 0; }
.kc-t-map .kc-t-map-legend a { display: flex; align-items: center; min-height: 36px; padding: 4px 8px; border-radius: 3px; color: #8d8a80; text-decoration: none; }
.kc-t-map .kc-t-map-legend a span { flex: 1 1 auto; }
.kc-t-map .kc-t-map-legend a b { font-weight: 400; font-variant-numeric: tabular-nums; color: #8d8a80; }
.kc-t-map .kc-t-map-legend a .kc-t-map-ico { opacity: 0.4; filter: grayscale(1); }
.kc-t-map .kc-t-map-legend .kc-t-map-on a { color: #fff; }
.kc-t-map .kc-t-map-legend .kc-t-map-on a b { color: var(--game-yellow); }
.kc-t-map .kc-t-map-legend .kc-t-map-on a .kc-t-map-ico { opacity: 1; filter: none; }
.kc-t-map .kc-t-map-legend a:hover { background: rgba(255, 209, 0, 0.08); }
@media (max-width: 860px) {
  .kc-t-map .kc-t-map-legend ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* search in the zone (added by the script) */
.kc-t-map .kc-t-map-find { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font: 14px/1.4 var(--sans); color: var(--muted); }
.kc-t-map .kc-t-map-find input { flex: 1 1 220px; max-width: 360px; font: 16px/1.2 var(--sans); padding: 7px 9px; background: #0a0d16; color: var(--ink); border: 1px solid var(--gold-soft); border-radius: 0; }
.kc-t-map .kc-t-map-findn { color: var(--game-yellow); }

/* a pin's tooltip */
.kc-t-map .kc-t-map-tip { position: absolute; z-index: 5; width: min(280px, 80%); max-height: 70%; overflow: auto; padding: 8px 30px 9px 12px; font-size: 14px; }
.kc-t-map .kc-t-map-tip ul { list-style: none; margin: 4px 0 0; padding: 0; }
.kc-t-map .kc-t-map-tip li { padding: 2px 0; }
.kc-t-map .kc-t-map-tiph { color: var(--game-yellow); font-weight: 600; }
.kc-t-map .kc-t-map-tiph span, .kc-t-map .kc-t-map-tipk { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.kc-t-map .kc-t-map-tipk { font-size: 12px; }
.kc-t-map .kc-t-map-tipx { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border: 0; background: none; color: var(--muted); font: 20px/1 var(--sans); cursor: pointer; }

/* the text below the map */
.kc-t-map .kc-t-map-layer h2, .kc-t-map h2 .kc-t-map-ico { display: flex; align-items: center; }
.kc-t-map .kc-t-map-layer h2 { flex-wrap: wrap; gap: 0 4px; }
.kc-t-map .kc-t-map-n { font: 400 15px/1.3 var(--sans); color: var(--muted); margin-inline-start: 8px; }
.kc-t-map .kc-t-map-about { font: 14px/1.5 var(--sans); color: var(--muted); max-width: 75ch; }
.kc-t-map .kc-t-map-subname { display: block; font-size: 13px; color: var(--muted); }
.kc-t-map .kc-t-map-more { color: var(--muted); }
.kc-t-map .kc-t-map-layer td:last-child { font-variant-numeric: tabular-nums; }
.kc-t-map .kc-t-map-sub { font: 400 14px/1.4 var(--sans); color: var(--muted); }
.kc-t-map .kc-t-map-near, .kc-t-map .kc-t-map-conn { list-style: none; margin: 0; padding: 0; }
.kc-t-map .kc-t-map-near { display: flex; flex-wrap: wrap; gap: 6px 22px; font: 16px/1.5 var(--sans); }
.kc-t-map .kc-t-map-conn li { white-space: nowrap; }
.kc-t-map .kc-t-map-conn { columns: 2 220px; column-gap: 20px; }

/* the world page: the two continents */
.kc-t-map .kc-t-map-worlds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.kc-t-map .kc-t-map-worlds a { display: block; color: var(--ink); text-decoration: none; font: 700 22px/1.3 var(--serif); }
.kc-t-map .kc-t-map-worlds img { display: block; width: 100%; height: auto; margin-bottom: 8px; border: 1px solid #6b5630; box-shadow: 0 0 0 3px #120f0a; }
.kc-t-map .kc-t-map-worlds a:hover span { color: var(--game-yellow); }
.kc-t-map .kc-t-map-sides { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font: 600 14px/1 var(--sans); color: var(--muted); }
.kc-t-map .kc-t-map-sides span { margin-inline-end: 4px; }
.kc-t-map .kc-t-map-sides a { padding: 8px 11px; border: 1px solid rgba(141, 113, 59, 0.6); color: var(--muted); text-decoration: none; }
.kc-t-map .kc-t-map-sides a[aria-current] { color: #171105; background: var(--gold); border-color: var(--gold); }
.kc-t-map .kc-t-map-count { font: 15px/1.4 var(--sans); color: var(--muted); margin: 0; }
