* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --base: #131619;
  --panel: #191d21;
  --raised: #22272c;
  --line: #30363c;
  --fg: #f2eadd;
  --dim: #a9adaf;
  --accent: #e1b77e;
  --gold: #f5c584;
  --blue: #a5d5ec;
  --green: #afd6aa;
  font: 14px/1.45 system-ui, sans-serif;
  background: var(--base);
  color: var(--fg);
}
body { margin: 0; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, .viewport:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.symbols { position: absolute; width: 0; height: 0; }
[hidden] { display: none !important; }
.app { height: 100dvh; min-height: 240px; display: grid; grid-template: 64px minmax(0, 1fr) / 300px minmax(0, 1fr); }
.topbar { grid-column: 1/-1; display: flex; align-items: center; gap: 23px; padding: 0 22px; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 4; }
.brand { display: flex; align-items: center; gap: 12px; width: 254px; flex: none; font: 24px/1.05 Georgia, serif; }
.brand b { font-weight: normal; color: var(--accent); }
.brand small { display: block; font: 650 8px system-ui, sans-serif; letter-spacing: .24em; color: var(--dim); margin-top: 5px; }
.brand-icon { width: 37px; height: 37px; border: 1px solid #745b3e; color: var(--accent); border-radius: 10px; display: grid; place-items: center; background: #2b251e; }
.brand-icon svg { width: 23px; height: 23px; }
.breadcrumb { min-width: 0; display: flex; gap: 8px; align-items: center; color: var(--dim); overflow: auto; white-space: nowrap; scrollbar-width: thin; }
.breadcrumb svg { width: 13px; height: 13px; color: #70777b; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--fg); }
#location-language { margin-left: auto; max-width: 170px; color: var(--fg); background: var(--raised); border: 1px solid var(--line); border-radius: 5px; padding: 5px 6px; font: inherit; }
#location-language:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.panel-toggle { display: none; }
.sidebar { display: flex; min-height: 0; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.sidebar-head { padding: 21px 18px 0; }
.eyebrow { margin: 0 0 3px; color: var(--accent); font-size: 10px; font-weight: 740; letter-spacing: .18em; }
h1, h2, h3 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
h1 { font-size: 27px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 10px; margin: 18px 0 15px; border: 1px solid var(--line); background: var(--base); border-radius: 7px; color: var(--dim); }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 16px; height: 16px; }
.search input { width: 100%; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); height: 40px; }
.search input:focus-visible { outline: 0; }
kbd { color: var(--dim); background: var(--raised); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; font-size: 11px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; padding: 7px 5px 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--dim); }
.tab:hover, .tab[aria-pressed=true] { color: var(--accent); }
.tab[aria-pressed=true] { border-color: var(--accent); }
.results { flex: 1; overflow: auto; padding: 5px 12px 14px; scrollbar-color: #465057 transparent; }
.flight-planner { display: grid; gap: 9px; padding: 9px 4px; }
.planner-field { display: grid; gap: 4px; color: var(--dim); }
.flight-planner select, .flight-planner input:not([type=checkbox]), .planner-add button {
  min-width: 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--base); color: var(--fg); font: inherit;
}
.planner-check, .planner-add { display: flex; gap: 7px; align-items: center; }
.planner-add input { flex: 1; width: 100%; }
.planner-check input { accent-color: var(--accent); margin: 3px; flex: none; }
.planner-preview { border-top: 1px solid var(--line); padding-top: 8px; }
.planner-preview p, .planner-discovery p { margin: 0; }
.planner-itinerary { margin: 6px 0; padding-left: 24px; }
.planner-itinerary li { padding-block: 2px; }
.planner-hint, .planner-discovery p, .planner-discovery small { color: var(--dim); }
.planner-warning { color: var(--gold); }
.planner-discovery { border-top: 1px solid var(--line); padding-top: 6px; }
.planner-discovery summary { cursor: pointer; }
.planner-discovery input[type=search] { width: 100%; margin: 5px 0; }
.planner-checklist { max-height: 12rem; overflow: auto; margin-top: 3px; }
.live-flights { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.live-flights p { flex-basis: 100%; margin: 0; color: var(--gold); }
.live-flights button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--raised); }
.result-heading { margin: 15px 8px 5px; color: var(--dim); font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.result { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 43px; padding: 6px 9px; text-align: left; border: 1px solid transparent; border-radius: 6px; background: transparent; }
.result:hover { background: var(--raised); }
.result[aria-current=true] { background: #2d281f; border-color: #624d33; }
.result > svg:first-child { color: var(--accent); }
.result > svg:last-child { width: 12px; margin-left: auto; color: #82898e; }
.result span { min-width: 0; }
.result strong, .result small { display: block; overflow-wrap: anywhere; }
.result strong { font-weight: 600; }
.result small { font-size: 11px; color: var(--dim); }
.empty { margin: 17px 10px; color: var(--dim); }
.sidebar-foot { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a0ba85; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.back-map { display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent); white-space: nowrap; }
.back-map:hover { background: var(--panel); }
.mapbar { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 24px; background: var(--base); border-bottom: 1px solid var(--line); }
.map-title { min-width: 0; }
.map-title h2 { font-size: clamp(24px, 3vw, 35px); line-height: 1.1; overflow-wrap: anywhere; }
.map-options { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }
.basemap { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.basemap button { padding: 5px 8px; border: 0; background: var(--panel); white-space: nowrap; color: var(--dim); }
.basemap button + button { border-left: 1px solid var(--line); }
.basemap button[aria-pressed=true] { background: #30281f; color: var(--gold); }
.basemap button:hover:not(:disabled) { color: var(--gold); }
.legend { display: flex; gap: 6px; }
.layer { position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); cursor: pointer; }
.layer:not(:has(:checked)) { color: var(--dim); background: transparent; }
.layer:hover, .layer:focus-within { border-color: currentColor; }
.layer input { position: absolute; opacity: 0; }
.layer svg { width: 14px; height: 14px; }
.landmark { color: var(--gold); }
.flight { color: var(--blue); }
.alliance { color: #a8cfff; }
.horde { color: #ffaaa0; }
.both { color: #ece1b0; }
.cave { color: var(--green); }
.viewport { flex: 1; position: relative; overflow: hidden; min-height: 0; touch-action: none; cursor: grab; isolation: isolate; background-color: #111719; background-image: radial-gradient(#3e423a 1px, transparent 1px); background-size: 22px 22px; }
.viewport.dragging { cursor: grabbing; }
.scene { position: absolute; top: 0; left: 0; width: 0; height: 0; transform-origin: 0 0; user-select: none; }
.image { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.scene.surface .image:not(.exploration) { box-shadow: 0 0 0 1px #5a5243, 0 15px 60px #080b0dcc; border-radius: 2px; }
.image.exploration { position: absolute; inset: 0; }
.pin, .region { position: absolute; display: grid; place-items: center; transform: translate(-50%, -50%) scale(var(--inverse, 1)); background: #191d21; border: 1px solid currentColor; box-shadow: 0 2px 4px #000a; white-space: nowrap; }
.pin { width: 25px; height: 25px; padding: 0; border-radius: 50%; z-index: 2; }
.pin svg { width: 15px; height: 15px; }
.pin-faction { position: absolute; right: -5px; bottom: -4px; padding: 0 2px; border-radius: 4px; border: 1px solid currentColor; background: var(--base); font-size: 9px; font-weight: 750; line-height: 1.2; }
.druid-flight { transform: translate(-50%, -50%) scale(var(--inverse, 1)) translateX(var(--flight-shift)); }
.druid-flight.alliance { --flight-shift: -14px; }
.druid-flight.horde { --flight-shift: 14px; }
.pin:hover, .pin[aria-pressed=true] { z-index: 3; filter: brightness(1.25); box-shadow: 0 0 0 2px currentColor, 0 3px 5px #000c; }
.cave-mask { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cave-geometry { position: absolute; pointer-events: none; opacity: .78; filter: sepia(1) hue-rotate(69deg) saturate(1.5) brightness(1.35) drop-shadow(0 0 2px #101917); }
.route-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.terrain-tiles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.terrain-tiles img { position: absolute; display: block; }
.terrain-detail .region { display: none; }
.flight-route { fill: none; stroke: currentColor; stroke-width: calc(2px * var(--inverse, 1)); opacity: .9; }
.flight-route.route-in { stroke-dasharray: calc(5px * var(--inverse, 1)); }
.live-flight-route { color: var(--gold); stroke-width: calc(3px * var(--inverse, 1)); }
.depth-control { position: absolute; z-index: 5; top: 14px; left: 14px; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: auto; }
.depth-control select { background: var(--raised); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 3px 4px; font: inherit; }
.pin.entrance { z-index: 4; width: 20px; height: 20px; background: #24372f; color: #dbf9c4; font-size: 11px; font-weight: 750; }
.poi-tooltip { position: absolute; z-index: 8; max-width: min(270px, calc(100% - 12px)); padding: 6px 9px; border: 1px solid #74634e; border-radius: 5px; background: #141819; color: var(--fg); box-shadow: 0 3px 10px #0009; pointer-events: none; }
.poi-tooltip strong, .poi-tooltip small { display: block; }
.poi-tooltip small { color: var(--dim); }
.scene.overview .pin:not([aria-pressed=true], .route-stop) { display: none; }
.region { z-index: 1; padding: 3px 7px; font-size: 10px; color: #f9e6c5; border-color: #bc9f75; background: #222521eb; border-radius: 5px; }
.region:hover { background: #42382a; z-index: 4; }
.region.continent { padding: 6px 11px; font-size: 12px; font-weight: 700; }
.controls { position: absolute; z-index: 5; top: 14px; right: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 16px #0006; }
.controls button { width: 39px; height: 38px; display: grid; place-items: center; background: transparent; border: 0; }
.controls button + button { border-top: 1px solid var(--line); }
.controls button:hover { color: var(--accent); }
.map-note { display: flex; justify-content: space-between; gap: 12px; position: absolute; right: 14px; bottom: 12px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--base); color: var(--dim); font-size: 11px; pointer-events: none; }
#zoom { min-width: 36px; text-align: right; }
.loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.details { position: absolute; z-index: 5; bottom: 16px; left: 15px; width: min(305px, calc(100% - 30px)); max-height: 60%; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 14px 16px; box-shadow: 0 5px 24px #0008; cursor: auto; }
.details h3 { font-size: 21px; padding-right: 18px; }
.details p { margin: 6px 0; color: var(--dim); }
.faction-badge { display: inline-block; margin-top: 4px; padding: 2px 5px; border: 1px solid currentColor; border-radius: 4px; font-size: 11px; }
.details .eyebrow { margin: 0; color: var(--accent); }
.details .dismiss { position: absolute; right: 7px; top: 7px; border: 0; background: transparent; padding: 4px; color: var(--dim); }
.details .open-cave { display: flex; align-items: center; gap: 7px; border: 1px solid #70583c; border-radius: 5px; background: #2f271e; padding: 6px 9px; margin-top: 9px; color: var(--gold); }
.flight-heading { margin: 10px 0 4px; font-size: 12px; }
.flight-connections { list-style: none; padding: 0; margin: 0 0 8px; }
.flight-connections li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.flight-connections small { color: var(--dim); white-space: nowrap; }
.details a[href*="point=flight-"] { color: var(--accent); }
.details a[href*="point=flight-"]:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .app { grid-template: 54px minmax(0, 1fr) / 1fr; }
  .topbar { padding: 0 12px; gap: 10px; justify-content: space-between; }
  .brand { width: auto; gap: 8px; font-size: 20px; }
  .brand-icon { width: 32px; height: 32px; }
  .breadcrumb { margin-right: auto; font-size: 11px; }
  .panel-toggle { display: flex; align-items: center; gap: 4px; background: var(--raised); border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; }
  .panel-toggle svg { width: 14px; height: 14px; }
  .sidebar { display: none; position: absolute; left: 0; top: 54px; bottom: 0; width: min(315px, 90vw); box-shadow: 0 4px 42px #0009; z-index: 7; }
  .sidebar.visible { display: flex; }
  .mapbar { padding: 8px 11px; min-height: 66px; }
  .layer { padding: 5px; font-size: 11px; gap: 3px; }
  .basemap button { padding: 4px 6px; font-size: 11px; }
  .map-title h2 { font-size: 23px; }
}
@media (max-width: 425px) {
  .breadcrumb { display: none; }
  #location-language { max-width: 102px; font-size: 12px; }
  .legend .layer span { display: none; }
  .legend .layer { padding: 7px; }
  #hint { display: none; }
}
