.dmz-section-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 4px max(12px, calc((100% - 1360px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.dmz-section-nav > span {
  margin-right: 8px;
  color: var(--muted);
  font: 700 11px/1.4 var(--mono);
  white-space: nowrap;
}
.dmz-section-nav a {
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.dmz-section-nav a:hover { color: var(--ink); }
.dmz-section-nav a[aria-current="page"] {
  border-color: #5e5129;
  color: var(--accent);
  background: #302918;
}

.dmz-map {
  --dmz-map-height: clamp(440px, 69dvh, 720px);
  padding-block: 13px 30px;
}
.dmz-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dmz-map-header h1 { margin: 0; font-size: clamp(20px, 2.25vw, 31px); line-height: 1.2; }
.dmz-map-header h1 span { color: var(--accent); font: 700 .47em/1.2 var(--mono); letter-spacing: .12em; }
.dmz-map-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px 12px; }
.dmz-map-meta button { padding: 2px 0; border: 0; background: transparent; }
.dmz-map-meta > span { padding: 2px 5px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 11px; }
.dmz-map-sources p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.dmz-map-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface);
}
.dmz-search-wrap { position: relative; width: min(100%, 305px); min-width: 0; }
.dmz-map-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 36px;
  padding-inline: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.dmz-map-search:focus-within { border-color: var(--accent); }
.dmz-map-search svg { width: 17px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.dmz-map-search input { width: 100%; min-width: 0; padding: 5px 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 13px; }
.dmz-map-search input::placeholder { color: var(--muted); }
.dmz-map-presets, .dmz-map-tools { display: flex; align-items: center; gap: 4px; }
.dmz-scope {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}
.dmz-scope label:not([hidden]) { display: flex; align-items: center; min-width: 0; gap: 5px; }
.dmz-scope select {
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.dmz-key-kinds:not([hidden]) {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 5px;
  padding-block: 6px 1px;
  border-top: 1px solid var(--line);
}
.dmz-raid-progress:not([hidden]) {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.dmz-raid-progress > span { padding-inline: 4px; }
.dmz-raid-progress strong { color: #b3dfbf; }
.dmz-map-tools { margin-left: auto; }
.dmz-map-tool, .dmz-map-presets button, .dmz-layer-actions button, .dmz-key-kinds button, .dmz-raid-progress button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 35px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.dmz-raid-progress button { min-height: 29px; }
.dmz-raid-progress button:hover { border-color: #667b6a; color: var(--ink); }
.dmz-raid-progress button[aria-pressed="true"] { border-color: #527258; background: #253a2b; color: #c5e8cc; }
.dmz-map-tool svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.dmz-map-tool b { min-width: 18px; padding: 1px 4px; border-radius: 3px; background: #343021; color: var(--accent); font: 700 11px/1.3 var(--mono); text-align: center; }
.dmz-map-presets small, .dmz-key-kinds small { color: var(--accent); font: 700 10px/1.3 var(--mono); }
.dmz-key-kinds button[hidden] { display: none; }
.dmz-map-tool:hover, .dmz-map-presets button:hover, .dmz-layer-actions button:hover, .dmz-key-kinds button:hover { border-color: #6b634d; color: var(--ink); }
.dmz-map-tool[aria-expanded="true"], .dmz-map-tool[aria-pressed="true"], .dmz-map-presets button[aria-pressed="true"], .dmz-key-kinds button[aria-pressed="true"] {
  border-color: #655835;
  background: #302918;
  color: var(--accent);
}
.dmz-search-suggestions, .dmz-layers-panel {
  position: absolute;
  z-index: 2;
  max-width: calc(100vw - 34px);
  border: 1px solid #52534a;
  border-radius: 4px;
  background: #1b2223;
  box-shadow: 0 10px 24px #0008;
}
.dmz-search-suggestions {
  top: calc(100% + 5px);
  left: 0;
  width: max(100%, 350px);
  max-height: min(310px, 42dvh);
  overflow-y: auto;
}
.dmz-search-suggestions > p { margin: 0; padding: 9px 11px; color: var(--muted); font-size: 12px; }
.dmz-search-suggestions [role="option"] {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 42px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid #344041;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.dmz-search-suggestions [role="option"]:last-child { border-bottom: 0; }
.dmz-search-suggestions [role="option"]:hover, .dmz-search-suggestions [aria-selected="true"] { background: #2c3738; color: var(--accent-hi); }
.dmz-search-suggestions [role="option"] > span { flex: 0 1 auto; color: var(--muted); font-size: 11px; text-align: right; }
.dmz-search-suggestions :is([data-dmz-intel-key], [data-dmz-all-results]) strong { color: var(--accent); }
.dmz-layers-panel { right: 7px; top: calc(100% + 5px); width: 323px; padding: 10px; }
.dmz-layers-panel header { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 7px; }
.dmz-layers-panel h2 { margin: 0; font-size: 15px; }
.dmz-layers-panel header span { color: var(--muted); font-size: 11px; }
.dmz-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.dmz-layer-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.dmz-layer-actions button { min-height: 30px; }
.dmz-filter, .dmz-marker, .dmz-result, .dmz-map-detail { --pin: var(--accent); }
.dmz-map [data-category="key"] { --pin: #ffd279; }
.dmz-map [data-category="exfil"] { --pin: #a5e0b8; }
.dmz-map [data-category="mission"] { --pin: #f3a6a2; }
.dmz-map [data-category="supply"] { --pin: #9dd8f1; }
.dmz-map [data-category="service"] { --pin: #b1d6e6; }
.dmz-map [data-category="tower"] { --pin: #a9d3ea; }
.dmz-map [data-category="stronghold"] { --pin: #e9ad84; }
.dmz-map [data-category="landmark"] { --pin: #dddcc9; }
.dmz-map [data-category="minor"] { --pin: #c2c6b8; }
.dmz-map [data-category="x01"] { --pin: #d9bafa; }
.dmz-filter {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.dmz-filter b, .dmz-filter small { margin-left: auto; color: inherit; font: 700 11px/1.2 var(--mono); opacity: .8; }
.dmz-filter-icon { display: grid; place-items: center; width: 16px; height: 16px; flex: 0 0 16px; }
.dmz-filter-icon :is(img, svg) { display: block; width: 16px; height: 16px; }
.dmz-filter[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--pin) 50%, #292929);
  background: color-mix(in srgb, var(--pin) 12%, #1b1e1d);
  color: var(--pin);
}
.dmz-filter:hover { border-color: var(--pin); color: var(--pin); }
.dmz-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(235px, 304px);
  border: 1px solid var(--line);
  background: var(--surface);
}
.dmz-map-canvas { position: relative; min-width: 0; }
.dmz-map-viewport {
  position: relative;
  width: 100%;
  height: var(--dmz-map-height);
  overflow: hidden;
  background: #111b1d;
  touch-action: none;
  cursor: grab;
}
.dmz-map-viewport:focus-visible { z-index: 1; outline-offset: -3px; }
.dmz-map-viewport.is-dragging { cursor: grabbing; }
.dmz-map-stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; user-select: none; }
.dmz-map-basemap, .dmz-map-grid, .dmz-map-markers { position: absolute; inset: 0; pointer-events: none; }
.dmz-map-basemap { overflow: hidden; }
.dmz-map-basemap img { position: absolute; display: block; max-width: none; }
.dmz-map-grid {
  border: 1px solid #eee9d56b;
  background-image: linear-gradient(to right, #eee9d550 1px, transparent 1px), linear-gradient(to bottom, #eee9d550 1px, transparent 1px);
  background-size: 10% 10%;
}
.dmz-map-grid span {
  position: absolute;
  padding: 1px 3px;
  border-radius: 2px;
  background: #111819d6;
  color: #ede9d6;
  font: 700 10px/1.2 var(--mono);
}
.dmz-map-grid .column { top: 2px; transform: translateX(-50%) scale(var(--dmz-inverse-scale, 1)); transform-origin: top; }
.dmz-map-grid .row { left: 2px; transform: translateY(-50%) scale(var(--dmz-inverse-scale, 1)); transform-origin: left; }
.dmz-map-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max-content;
  max-width: 80%;
  transform: translate(-50%, -50%);
  padding: 7px 9px;
  border: 1px solid #526266;
  background: #141c1ee8;
  color: var(--accent);
  font-size: 12px;
  text-align: center;
}
.dmz-map-markers { pointer-events: none; }
.dmz-grid-focus {
  position: absolute;
  width: 10%;
  height: 10%;
  border: calc(2px * var(--dmz-inverse-scale, 1)) dashed #d4ded8b3;
}
.dmz-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  z-index: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pin);
  font: 800 14px/1 var(--sans);
  transform: translate(-50%, -50%) scale(var(--dmz-inverse-scale, 1));
  pointer-events: auto;
}
.dmz-marker-icon { position: relative; display: grid; place-items: center; pointer-events: none; }
.dmz-marker-icon img, .dmz-marker-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px #060a0a) drop-shadow(0 0 1px #060a0a);
}
.dmz-marker-icon svg { width: 19px; height: 19px; }
.dmz-marker[data-dmz-found]:not([data-selected], :focus-visible, :hover) { opacity: .45; }
.dmz-marker[data-lock-kind="password"] { --pin: #b6dbff; }
.dmz-marker[data-lock-kind="mechanism"] { --pin: #f8be83; }
.dmz-marker[data-lock-kind="hidden"] { --pin: #abd8b4; }
.dmz-lock-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 14px;
  padding-inline: 2px;
  border: 1px solid var(--pin);
  border-radius: 8px;
  background: #222322;
  color: var(--pin);
  font: 700 9px/12px var(--mono);
  text-align: center;
  pointer-events: none;
}
.dmz-marker:is([data-category="landmark"], [data-category="minor"]) { z-index: 0; width: max-content; height: 27px; padding-inline: 2px; border-radius: 3px; }
.dmz-landmark-label {
  display: block;
  padding: 2px 4px;
  border-radius: 2px;
  background: #101718c9;
  color: #fffdf2;
  font: 800 11px/1.3 var(--sans);
  letter-spacing: .025em;
  white-space: nowrap;
  text-shadow: 0 1px 2px #101717;
}
.dmz-marker[data-category="minor"] .dmz-landmark-label { color: #e6e9db; font-size: 10px; font-weight: 650; }
.dmz-marker.dmz-cluster {
  z-index: 2;
  border: 1px solid #bbb497;
  background: #252921e8;
  color: #fff0c3;
  font: 750 12px/1 var(--mono);
}
.dmz-marker.dmz-cluster:hover { border-color: var(--accent); background: #413722; }
.dmz-marker.dmz-grid-marker {
  display: flex;
  width: max-content;
  min-width: 29px;
  height: 20px;
  gap: 3px;
  padding-inline: 4px;
  border: 1px dashed #b3bec3;
  border-radius: 3px;
  background: #172327ed;
  color: #e4ebeb;
  font: 700 10px/1 var(--mono);
}
.dmz-grid-marker b { color: #b8c7cc; font-size: 9px; }
.dmz-map-stage:not([data-detail-zoom]) .dmz-marker[data-category="minor"]:not(:hover):not(:focus-visible):not([data-selected]) { width: 18px; height: 18px; }
.dmz-map-stage:not([data-detail-zoom]) .dmz-marker[data-category="minor"]:not(:hover):not(:focus-visible):not([data-selected]) .dmz-landmark-label {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid #17201d;
  border-radius: 50%;
  overflow: hidden;
  background: #d7dacc;
  color: transparent;
  text-shadow: none;
}
.dmz-marker:hover, .dmz-marker:focus-visible, .dmz-marker[aria-pressed="true"] {
  z-index: 4;
}
.dmz-marker:not([data-category="landmark"], [data-category="minor"]):hover,
.dmz-marker:not([data-category="landmark"], [data-category="minor"])[aria-pressed="true"] {
  background: #11171899;
  box-shadow: 0 0 0 1px var(--pin), 0 0 0 3px #10171880;
}
.dmz-marker:hover .dmz-landmark-label,
.dmz-marker:focus-visible .dmz-landmark-label,
.dmz-marker[aria-pressed="true"] .dmz-landmark-label {
  background: #151b1b;
  color: var(--accent-hi);
  box-shadow: inset 0 -1px var(--accent);
}
.dmz-map-stamp {
  position: absolute;
  top: 8px;
  right: 9px;
  padding: 3px 7px;
  border: 1px solid #526266;
  background: #141c1ee8;
  color: #d7e0de;
  font: 700 11px/1.4 var(--mono);
  pointer-events: none;
}
.dmz-map-zoom {
  position: absolute;
  right: 9px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  border: 1px solid #536063;
  border-radius: 4px;
  background: #151d20;
}
.dmz-map-zoom button {
  width: 38px;
  min-height: 37px;
  padding: 0;
  border: 0;
  background: none;
  color: #e3eeeb;
  font-weight: 800;
  font-size: 19px;
}
.dmz-map-zoom button + button { border-top: 1px solid #465355; }
.dmz-map-zoom button:last-child { font-size: 11px; }
.dmz-map-zoom button:hover { background: #283539; color: var(--accent); }
.dmz-map-note {
  margin: 0;
  padding: 6px 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.dmz-map-side {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(var(--dmz-map-height) + 31px);
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #1a1e1f;
}
.dmz-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}
.dmz-list-header h2, .dmz-map-sources h2 { margin: 0; font-size: 15px; }
.dmz-list-header span { color: var(--muted); font-size: 11px; }
.dmz-map-results { min-height: 0; overflow-y: auto; scrollbar-color: #626262 #202424; }
.dmz-map-results > p { padding: 7px 12px; color: var(--muted); font-size: 13px; }
.dmz-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 45px;
  padding: 7px 11px;
  border: 0;
  border-bottom: 1px solid #303839;
  background: none;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}
.dmz-result:hover, .dmz-result[aria-pressed="true"] { background: #263032; color: var(--pin); }
.dmz-result > span:last-child { color: var(--muted); font-size: 11px; white-space: nowrap; }
.dmz-result-name { min-width: 0; }
.dmz-result-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.dmz-result[data-dmz-found] > span { color: #b3cdb9; }
.dmz-map-detail {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  border-top: 2px solid var(--pin);
  background: #1b2123;
  scrollbar-color: #626262 #202424;
}
.dmz-detail-body { padding: 13px 12px 15px; }
.dmz-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dmz-detail-head-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.dmz-detail-body h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.dmz-detail-body h3 { margin: 12px 0 4px; font-size: 13px; }
.dmz-detail-body p { margin: 7px 0; color: #d5ded9; font-size: 13px; }
.dmz-detail-body .dmz-detail-meta { margin: 0 0 4px; color: var(--pin); font: 700 11px/1.5 var(--mono); }
.dmz-detail-body .dmz-detail-english { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.dmz-detail-body .dmz-detail-scope { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.dmz-detail-body .dmz-detail-precision { color: var(--muted); font-size: 11px; }
.dmz-point-comparison { margin-block: 6px; padding: 4px 8px; border-left: 2px solid #8299a0; background: #202a2c; }
.dmz-detail-body .dmz-point-comparison p { margin-block: 3px; font-size: 12px; }
.dmz-point-comparison a { display: inline-block; margin: 2px 9px 2px 0; }
.dmz-detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-block: 9px 11px; }
.dmz-detail-body small, .dmz-detail-body time { color: var(--muted); font-size: 11px; }
.dmz-detail-body dl { margin: 9px 0; font-size: 13px; }
.dmz-detail-body dt { color: var(--pin); font-weight: 700; }
.dmz-detail-body dd { margin: 0 0 7px; color: #d5ded9; }
.dmz-detail-body ul { list-style: none; margin: 4px 0 8px; padding: 0; }
.dmz-detail-body a { color: var(--accent); font-size: 12px; }
.dmz-detail-body a:hover { text-decoration: underline; }
.dmz-detail-body :is([data-dmz-close], [data-dmz-share], [data-dmz-focus], [data-dmz-expand], [data-dmz-mark-found], [data-dmz-add-point], [data-point]) {
  padding: 5px 8px;
  border: 1px solid #4b585b;
  border-radius: 3px;
  background: #222d30;
  color: #edf3f1;
  font-size: 12px;
}
.dmz-detail-body [data-dmz-close] { flex: 0 0 34px; width: 34px; min-height: 34px; font-size: 18px; line-height: 1; }
.dmz-detail-body:not(.dmz-door-detail) [data-dmz-share], .dmz-door-detail [data-dmz-focus] { background: #3b331d; border-color: #6e5c2e; color: var(--accent); }
.dmz-detail-body [data-dmz-mark-found][aria-pressed="true"] { border-color: #527258; background: #253a2b; color: #c5e8cc; }
.dmz-detail-body [data-dmz-expand] { display: none; }
.dmz-detail-body [data-point] { margin: 2px 3px 2px 0; }
.dmz-detail-body button:hover { border-color: var(--accent); }
.dmz-key-pickups {
  margin: 8px 0;
  padding: 7px 9px;
  border: 1px solid #46504b;
  border-radius: 4px;
  background: #20292a;
}
.dmz-key-pickups summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.dmz-key-pickups summary::marker { color: var(--pin); }
.dmz-key-pickups summary .dmz-pickup-type { margin-left: 5px; }
.dmz-key-pickups li:first-child > .dmz-pickup-type { display: none; }
.dmz-pickup-type {
  display: inline-block;
  padding: 1px 4px;
  border: 1px solid #59635c;
  border-radius: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.dmz-pickup-type:is([data-pickup-type="fixed"], [data-pickup-type="reward"], [data-pickup-type="kit"]) {
  border-color: #677750;
  color: #c9dfac;
}
.dmz-pickup-type[data-pickup-type="mission"] { border-color: #766344; color: #f2d49e; }
.dmz-key-pickups ul { margin: 6px 0 0; }
.dmz-key-pickups li { padding-block: 6px 3px; border-top: 1px solid #3b4542; }
.dmz-key-pickups li p { margin: 3px 0 1px; font-size: 12px; overflow-wrap: anywhere; }
.dmz-lock-route {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #46504b;
  border-radius: 4px;
  background: #20292a;
}
.dmz-lock-route h3 { margin: 0; color: var(--pin); }
.dmz-lock-route > p { margin: 2px 0 8px; color: var(--muted); font-size: 11px; }
.dmz-lock-route ol { margin: 0; padding: 0; list-style: none; }
.dmz-lock-route li {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  padding-block: 6px;
}
.dmz-lock-route li:not(:last-child)::after {
  position: absolute;
  top: 26px;
  bottom: -6px;
  left: 9px;
  border-left: 1px solid #59635c;
  content: "";
}
.dmz-lock-step-number {
  display: grid;
  place-items: center;
  height: 20px;
  border: 1px solid #59635c;
  border-radius: 50%;
  color: var(--muted);
  font: 700 11px/1 var(--mono);
}
.dmz-lock-route [aria-current="step"] .dmz-lock-step-number { border-color: var(--pin); color: var(--pin); }
.dmz-lock-route [aria-current="step"] strong { color: var(--pin); font-size: 13px; }
.dmz-lock-route li p { margin: 3px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.dmz-lock-route [data-dmz-route-step] { margin: 0; padding: 1px 4px; text-align: left; }
.dmz-lock-route [data-dmz-route-step] span { margin-left: 4px; color: var(--accent); }
.dmz-detail-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 9px; margin-block: 10px 8px; }
.dmz-map-sources { margin-top: 17px; padding: 11px 12px; border: 1px solid var(--line); background: var(--surface); }
.dmz-map-sources > div { display: flex; gap: 5px 14px; flex-wrap: wrap; margin-top: 7px; }
.dmz-map-sources > [data-dmz-coverage] { display: block; }
.dmz-coverage-table { width: min(100%, 620px); border-collapse: collapse; font-size: 13px; }
.dmz-coverage-table caption { margin-block: 4px; color: var(--muted); text-align: left; font-size: 12px; }
.dmz-coverage-table :is(th, td) { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.dmz-coverage-table th { font-weight: 650; }
[data-category="loot"] { --pin: #c2dcb0; }
[data-category="boss"] { --pin: #ffad99; }
.dmz-map-fullscreen {
  --dmz-map-height: max(320px, calc(100dvh - 127px));
  position: fixed;
  inset: 0;
  z-index: 25;
  width: 100%;
  overflow-y: auto;
  padding: 10px 12px 16px;
  background: var(--bg);
}
body:has(.dmz-map-fullscreen:not([hidden])) { overflow: hidden; }

.dmz-intel-view, .dmz-route-view {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: clamp(10px, 2vw, 18px);
  border: 1px solid var(--line);
  background: var(--surface);
}
.dmz-map-side > :is(.dmz-intel-view, .dmz-route-view) {
  min-height: 0;
  padding: 9px;
  border: 0;
  overflow-y: auto;
  scrollbar-color: #626262 #202424;
}
.dmz-map-side > .dmz-intel-nav {
  flex: none;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.dmz-map-side > .dmz-intel-nav :is(a, button) { flex: 1 0 auto; }
.dmz-intel-head, .dmz-route-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
}
.dmz-intel-head h1, .dmz-intel-head h2, .dmz-route-head h2 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.25;
}
.dmz-intel-head p, .dmz-route-head p, .dmz-intel-meta, .dmz-route-status {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.dmz-intel-nav, .dmz-intel-links, .dmz-route-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dmz-intel-link, .dmz-intel-nav :is(a, button), .dmz-route-actions :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid #4a5450;
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
.dmz-intel-link:hover, .dmz-intel-nav :is(a, button):hover, .dmz-route-actions :is(a, button):not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent-hi);
}
.dmz-intel-nav :is([aria-current="page"], [aria-pressed="true"]), .dmz-route-actions [aria-pressed="true"] {
  border-color: #655835;
  background: #302918;
  color: var(--accent);
}
.dmz-intel-search {
  display: grid;
  gap: 4px;
  width: min(100%, 25rem);
  color: var(--muted);
  font-size: 12px;
}
.dmz-intel-search input, input.dmz-intel-search {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
}
.dmz-intel-search input::placeholder, input.dmz-intel-search::placeholder { color: var(--muted); }
.dmz-intel-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dmz-map-side .dmz-intel-list { grid-template-columns: minmax(0, 1fr); }
.dmz-intel-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #20292a;
  overflow-wrap: anywhere;
}
.dmz-intel-card :is(h2, h3, h4) { margin: 0; font-size: 15px; line-height: 1.35; }
.dmz-intel-card p { margin: 0; font-size: 13px; }
.dmz-intel-card p.dmz-intel-meta { font-size: 12px; }
.dmz-intel-card .dmz-intel-links { margin-top: 2px; }
.dmz-intel-empty, .dmz-route-empty {
  margin: 0;
  padding: 9px 11px;
  border: 1px dashed #4a5450;
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
}
.dmz-route-list { display: grid; gap: 5px; margin: 0; padding-inline-start: 24px; }
.dmz-route-list:has(.dmz-route-step-number) { padding: 0; list-style: none; }
.dmz-route-step {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #20292a;
  overflow-wrap: anywhere;
}
.dmz-route-step::marker { color: var(--accent); font: 700 12px var(--mono); }
.dmz-route-step:has(.dmz-route-step-number) {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 4px 8px;
}
.dmz-route-step:has(.dmz-route-step-number) > .dmz-route-actions { grid-column: 2; }
.dmz-route-step-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #655835;
  border-radius: 50%;
  background: #302918;
  color: var(--accent);
  font: 700 12px/1 var(--mono);
}
.dmz-route-step-main { min-width: 0; }
.dmz-route-step-main h3 { margin: 1px 0 0; font-size: 14px; line-height: 1.35; }
.dmz-route-step[data-done="true"] .dmz-route-step-number { color: #b3cdb9; border-color: #6b8d73; }
.dmz-route-step-number[draggable="true"] { cursor: grab; }
.dmz-intel-card :is(ol, ul) { margin: 0; padding-inline-start: 19px; font-size: 13px; }
.dmz-intel-card li + li { margin-top: 6px; }
.dmz-intel-card li a { color: var(--accent); }
.dmz-intel-card summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.dmz-intel-card[open] > :not(summary) { margin-block: 5px; }
.dmz-update-group { display: grid; gap: 7px; }
.dmz-update-group h3 { margin: 0; color: #e1e7e2; font-size: 13px; }
.dmz-update-meta { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 4px; }
.dmz-update-state { padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--accent); font-size: 11px; }
.dmz-update-state[data-applied] { color: #b3cdb9; }
.dmz-route-status:empty { display: none; }
.dmz-route-step p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.dmz-route-step .dmz-route-actions { margin-top: 3px; }

@media (max-width: 760px) {
  .dmz-map {
    --dmz-map-height: clamp(330px, 105vw, 57dvh);
    padding-block: 8px 22px;
    width: calc(100% - 16px);
  }
  .dmz-map-header { margin-bottom: 7px; }
  .dmz-map-toolbar { gap: 5px; padding: 6px; }
  .dmz-search-wrap { width: auto; flex: 1 1 130px; }
  .dmz-map-tools { flex: 0 0 auto; }
  .dmz-fullscreen-tool [data-dmz-fullscreen-label] { display: none; }
  .dmz-map-presets { order: 2; flex: 1 0 100%; flex-wrap: wrap; }
  .dmz-scope { order: 3; gap: 4px 7px; }
  .dmz-scope label > span { flex-shrink: 0; }
  .dmz-scope label:not([hidden]) { flex: 1 1 130px; }
  .dmz-scope select { width: 100%; }
  .dmz-key-kinds { order: 4; gap: 4px; }
  .dmz-raid-progress { order: 5; }
  .dmz-map-presets button, .dmz-key-kinds button { min-height: 29px; padding-inline: 8px; font-size: 11px; }
  .dmz-key-kinds button { padding-inline: 4px; }
  .dmz-layers-panel { right: 6px; }
  .dmz-map-layout { grid-template-columns: minmax(0, 1fr); }
  .dmz-map-side { max-height: none; border-top: 1px solid var(--line); border-left: 0; }
  .dmz-map-results { max-height: 240px; }
  .dmz-map-detail {
    position: fixed;
    inset: auto 0 0;
    z-index: 6;
    max-height: min(39dvh, 315px);
    border-radius: 9px 9px 0 0;
    box-shadow: 0 -10px 38px #000a;
  }
  .dmz-map-detail[data-expanded="true"] { max-height: min(55dvh, 465px); }
  .dmz-map-detail:not([data-expanded="true"]) .dmz-detail-extra { display: none; }
  .dmz-map-detail:not([data-expanded="true"]) .dmz-lock-route { margin-block: 7px; padding: 7px 9px; }
  .dmz-map-detail:not([data-expanded="true"]) .dmz-lock-route p { display: none; }
  .dmz-map-detail:not([data-expanded="true"]) .dmz-lock-route li { padding-block: 3px; }
  .dmz-map-detail:not([data-expanded="true"]) .dmz-key-pickups li p { line-height: 1.45; }
  .dmz-detail-body { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
  .dmz-detail-body h2 { font-size: 17px; }
  .dmz-detail-actions { margin-block: 7px 3px; }
  .dmz-detail-body [data-dmz-expand] { display: inline-flex; margin-left: auto; }
  .dmz-marker { width: 23px; height: 23px; font-size: 13px; }
  .dmz-marker:is([data-category="landmark"], [data-category="minor"]) { height: 23px; }
  .dmz-landmark-label { padding-inline: 3px; font-size: 10px; }
  .dmz-marker-icon img { width: 21px; height: 21px; }
  .dmz-marker-icon svg { width: 17px; height: 17px; }
  .dmz-map-zoom { top: 39px; right: 7px; bottom: auto; }
  .dmz-map-zoom button { width: 38px; min-height: 38px; }
  .dmz-map-note { font-size: 10px; }
  .dmz-map-fullscreen { --dmz-map-height: max(330px, calc(100dvh - 154px)); width: 100%; padding: 8px; }
  .dmz-intel-view, .dmz-route-view { gap: 8px; }
  .dmz-map-side > .dmz-intel-nav { order: 0; scroll-margin-top: 112px; }
  .dmz-map-side > :is(.dmz-intel-view, .dmz-route-view) { max-height: min(46dvh, 370px); }
  .dmz-intel-list { grid-template-columns: minmax(0, 1fr); }
  .dmz-intel-link, .dmz-intel-nav :is(a, button), .dmz-route-actions :is(a, button) { min-height: 40px; }
  .dmz-intel-search input, input.dmz-intel-search { min-height: 42px; font-size: 16px; }
}

body:has(#dmz-map:not([hidden])) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
body:has(#dmz-map:not([hidden])) > main { min-height: 0; overflow: hidden; }
body:has(#dmz-map:not([hidden])) > .footer,
body:has(#dmz-map:not([hidden])) #dmz-section-nav { display: none; }
body:has(#dmz-map:not([hidden])) .topbar { position: relative; background: #101311; }
body:has(#dmz-map:not([hidden])) .topbar-inner { width: calc(100% - 32px); }

#dmz-map:not([hidden]) {
  --dmz-rail: clamp(184px, 17vw, 255px);
  display: grid;
  grid-template-columns: var(--dmz-rail) minmax(0, 1fr);
  height: 100%;
  width: 100%;
  min-height: 0;
  max-width: none;
  padding: 0;
  background: #101613;
}
#dmz-map[data-rail-collapsed] { --dmz-rail: 56px; }
.dmz-workspace-rail {
  position: relative;
  z-index: 5;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: auto;
  background: #121713;
  border-right: 1px solid #333c34;
  scrollbar-width: thin;
}
.dmz-rail-header { display: flex; align-items: flex-start; gap: 9px; padding: 17px 11px 15px; border-bottom: 1px solid #30392f; }
.dmz-rail-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid #39423a;
  border-radius: 5px;
  background: #1c241d;
  color: #ced9cd;
}
.dmz-rail-header svg, .dmz-rail-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 18px; }
.dmz-rail-heading p, .dmz-rail-nav > p, .dmz-rail-foot { color: #a9b4a7; font: 650 10px/1.45 var(--mono); letter-spacing: .07em; }
.dmz-rail-heading p { margin: 0 0 3px; }
.dmz-rail-heading h1 { margin: 0; color: #f1f2e6; font-size: 24px; line-height: 1.2; }
.dmz-rail-heading h1 span { color: var(--accent); font: 700 11px var(--mono); letter-spacing: .1em; }
.dmz-rail-nav { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 11px 7px; order: 0; }
.dmz-rail-nav > p { margin: 11px 7px 3px; }
.dmz-rail-nav > :is(a, button) {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #bfcabe;
  font: 700 13px/1.25 var(--sans);
  text-align: left;
  white-space: nowrap;
}
.dmz-rail-nav > :is(a, button):hover { color: #fff4ce; background: #242b21; }
.dmz-rail-nav > :is(.dmz-rail-current, [aria-pressed="true"]) { color: var(--accent); border-left-color: var(--accent); background: #312a19; }
.dmz-rail-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: auto; padding: 12px 10px; border-top: 1px solid #30392f; }
.dmz-rail-foot strong { color: #e2ecdf; white-space: nowrap; }
#dmz-map[data-rail-collapsed] :is(.dmz-rail-heading, .dmz-rail-nav > p, .dmz-rail-nav span, .dmz-rail-foot) { display: none; }
#dmz-map[data-rail-collapsed] .dmz-rail-nav > :is(a, button) { justify-content: center; padding-inline: 0; }

#dmz-map .dmz-map-layout { position: relative; display: block; min-width: 0; min-height: 0; border: 0; overflow: hidden; }
#dmz-map .dmz-map-canvas, #dmz-map .dmz-map-viewport { height: 100%; }
#dmz-map .dmz-map-viewport { background: #101b1b; }
#dmz-map .dmz-map-basemap { overflow: visible; }
#dmz-map .dmz-map-grid { visibility: hidden; }
#dmz-map[data-grid] .dmz-map-grid { visibility: visible; }
#dmz-map .dmz-map-toolbar { position: absolute; inset: 0; z-index: 4; padding: 0; border: 0; background: transparent; pointer-events: none; }
#dmz-map .dmz-map-toolbar > * { pointer-events: auto; }
#dmz-map .dmz-search-wrap { position: absolute; top: 12px; left: 12px; width: min(286px, calc(100% - 72px)); }
#dmz-map .dmz-map-search { min-height: 40px; border-radius: 7px; border-color: #58635a; background: #141b17f2; box-shadow: 0 4px 14px #0006; }
#dmz-map .dmz-map-search:focus-within { border-color: var(--accent); }
#dmz-map .dmz-map-tools {
  position: absolute;
  top: 61px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  overflow: visible;
  border: 1px solid #556157;
  border-radius: 7px;
  background: #121914f5;
  box-shadow: 0 4px 14px #0007;
}
#dmz-map .dmz-map-tool { position: relative; display: grid; place-items: center; width: 43px; min-height: 42px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #e3ebe1; }
#dmz-map .dmz-map-tool svg { width: 21px; height: 21px; }
#dmz-map .dmz-map-tool:hover, #dmz-map .dmz-map-tool:is([aria-pressed="true"], [aria-expanded="true"]) { color: var(--accent); background: #292b1c; }
#dmz-map .dmz-map-menu-tool { display: none; }
#dmz-map [data-dmz-plan-count] { position: absolute; top: 2px; right: 2px; min-width: 14px; padding: 0 2px; font-size: 9px; }
#dmz-map .dmz-layers-panel {
  inset: 61px auto auto 63px;
  width: min(344px, calc(100% - 76px));
  max-height: calc(100% - 76px);
  overflow: auto;
  border: 1px solid #556157;
  border-radius: 8px;
  padding: 11px;
  background: #151e19fa;
}
#dmz-map .dmz-layers-panel > :is(.dmz-map-presets, .dmz-scope, .dmz-key-kinds, .dmz-raid-progress, .dmz-filters) { margin-top: 9px; }
#dmz-map .dmz-layers-panel .dmz-map-presets { flex-wrap: wrap; }
#dmz-map .dmz-map-zoom { z-index: 3; inset: 12px 12px auto auto; }
#dmz-map .dmz-map-note { inset: auto auto 10px 12px; z-index: 2; max-width: calc(100% - 24px); }
.dmz-map-note span:not([data-dmz-cluster-hint]) { color: #e7d99f; font-family: var(--mono); }
.dmz-grid-legend { position: absolute; right: 12px; bottom: 10px; z-index: 2; padding: 4px 7px; border: 1px dashed #9dacaa; border-radius: 4px; background: #101818de; color: #e0ebe7; font: 650 10px/1.2 var(--mono); pointer-events: none; }

#dmz-map .dmz-map-side {
  position: absolute;
  z-index: 3;
  inset: 12px 66px 38px auto;
  width: min(364px, calc(100% - 80px));
  max-height: none;
  overflow: hidden;
  border: 1px solid #536058;
  border-radius: 8px;
  box-shadow: 0 8px 30px #0009;
}
#dmz-map .dmz-drawer-close { position: absolute; z-index: 1; top: 8px; right: 7px; }
#dmz-map .dmz-map-side > .dmz-intel-nav { padding-right: 43px; }
#dmz-map .dmz-map-side > :is(.dmz-map-results, .dmz-intel-view, .dmz-route-view) { max-height: none; }
#dmz-map .dmz-map-detail { position: absolute; inset: 0; z-index: 2; max-height: none; border-radius: 0; box-shadow: none; }
#dmz-map .dmz-map-sources { min-height: 0; margin: 0; border: 0; overflow: auto; }
#dmz-map.dmz-map-fullscreen { grid-template-columns: minmax(0, 1fr); }
#dmz-map.dmz-map-fullscreen .dmz-workspace-rail { display: none; }

@media (max-width: 760px) {
  #dmz-map:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  #dmz-map .dmz-workspace-rail { display: none; }
  #dmz-map[data-rail-open] .dmz-workspace-rail { position: absolute; z-index: 7; inset: 0 auto 0 0; display: flex; width: min(225px, 80vw); box-shadow: 0 0 24px #000b; }
  #dmz-map { position: relative; }
  #dmz-map.dmz-map-fullscreen { position: fixed; }
  #dmz-map .dmz-map-menu-tool { display: grid; }
  #dmz-map .dmz-search-wrap { top: 8px; left: 8px; }
  #dmz-map .dmz-map-tools { top: 54px; left: 8px; }
  #dmz-map .dmz-map-tool { width: 39px; min-height: 39px; }
  #dmz-map .dmz-map-zoom { top: 8px; right: 8px; }
  #dmz-map .dmz-map-zoom button { width: 36px; min-height: 35px; }
  #dmz-map .dmz-layers-panel { top: 54px; left: 56px; width: min(344px, calc(100% - 64px)); max-height: calc(100% - 65px); }
  #dmz-map .dmz-map-toolbar:has(.dmz-layers-panel:not([hidden])) { z-index: 6; }
  #dmz-map .dmz-map-side { z-index: 5; inset: auto 5px 5px; width: auto; height: min(58%, 410px); }
  #dmz-map .dmz-map-side:has([data-dmz-detail]:not([hidden])) { height: min(43%, 300px); }
  #dmz-map .dmz-map-side:has([data-dmz-detail][data-category="key"]:not([hidden])) { height: min(48%, 345px); }
  #dmz-map .dmz-map-side:has([data-dmz-detail][data-expanded="true"]:not([hidden])) { height: min(62%, 430px); }
  #dmz-map .dmz-map-note { bottom: 6px; left: 8px; }
  .dmz-grid-legend { display: none; }
}
