/* Gxth G!rls LLC · map.gxthgirls.tech
   The house look laid over BlueMap's own UI: the world is the content, the controls float on it as the
   gxthgirls.tech brand bar (glass pills, Inter, house blues for what is selected). Loaded by BlueMap
   through webapp.conf `styles`, after its own stylesheet, so equal-specificity rules here win.
   Class names come from BlueMap 5.29; check them after a BlueMap upgrade. */

@font-face { font-family: "Inter"; src: url("/gxth/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/gxth/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

/* One theme: the house is dark-only, so BlueMap's light/dark/contrast classes all get it (map.js hides
   the picker). Increase Contrast comes from the system setting below. */
:root, :root .theme-light, :root .theme-dark, :root .theme-contrast {
  --bg: #080b12;
  --card: #0a0e1a;
  --well: #06080f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ff;            /* 17.2:1 on --card */
  --muted: #98a3c0;           /* 7.6:1 on --card */
  --blue: #008cff;
  --blue-2: #4db5ff;
  --blue-3: #9ed8ff;
  --blue-rgb: 0, 140, 255;
  --grad: linear-gradient(120deg, #0052cc 0%, #006ae6 100%);
  --glass: rgba(8, 11, 18, 0.84); /* dark enough that --muted stays readable over snow and sand */
  --glass-blur: blur(18px) saturate(160%);
  --shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --selected: rgba(var(--blue-rgb), 0.22);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --edge: 12px;               /* gap between the floating controls and the window edge */
  --hit: 44px;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --theme-bg: var(--card);
  --theme-bg-hover: rgba(255, 255, 255, 0.07);
  --theme-bg-light: #26314a;
  --theme-fg: var(--text);
  --theme-fg-light: var(--muted);
  --theme-switch-button-on: #006ae6;
  --theme-stars-day: var(--muted);
  --theme-moon-day: var(--text);
  --theme-stars-night: var(--muted);
  --theme-moon-night: var(--text);

  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
body { background: var(--bg); color: var(--text); }
::selection { background: rgba(var(--blue-rgb), 0.45); color: #fff; }
#app { font-size: 1rem; }
#app [tabindex]:focus-visible, #gxth-home:focus-visible { outline: 2px solid var(--blue-2); outline-offset: -2px; }
#app [tabindex]:focus:not(:focus-visible) { outline: none; }

/* ---------- Floating controls: the brand bar ---------- */
/* No filter on the containers: a filter would stop the glass below from seeing the map. */
.control-bar, #zoom-buttons, .side-menu { filter: none; }

#gxth-home {
  position: fixed; z-index: 9999; top: var(--edge); left: var(--edge);
  display: grid; place-items: center; width: var(--hit); height: var(--hit); border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
#gxth-home:hover { border-color: rgba(var(--blue-rgb), 0.5); }
#gxth-home img { width: 26px; height: 26px; border-radius: 7px; }

.control-bar {
  top: var(--edge); left: calc(var(--edge) + var(--hit) + 8px);
  height: var(--hit); margin: 0; width: calc(100% - 2 * var(--edge) - var(--hit) - 8px);
}
/* Every control is a segment of a pill; BlueMap's .space elements split the pills. */
.control-bar > :not(.space) {
  background: var(--glass); border-block: 1px solid var(--line);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--shadow);
}
.control-bar > :not(:first-child), .control-bar .controls-switch > :not(:first-child) { border-left: 1px solid var(--line); }
.control-bar > :first-child, .control-bar > .space + * { border-left: 1px solid var(--line); border-radius: 999px 0 0 999px; }
.control-bar > :last-child, .control-bar > :has(+ .space) { border-right: 1px solid var(--line); border-radius: 0 999px 999px 0; }
.control-bar > :first-child:has(+ .space), .control-bar > .space + :has(+ .space) { border-radius: 999px; }
.control-bar > * { box-sizing: border-box; }
.control-bar .space { width: 8px; }
.control-bar .pos-input { max-width: 280px; }
.control-bar .controls-switch { display: flex; overflow: hidden; }
.control-bar .controls-switch > .svg-button { box-sizing: border-box; min-height: 0; background-color: transparent; }
.control-bar .svg-button { min-height: 0; }

.svg-button { min-width: var(--hit); min-height: var(--hit); background-color: transparent; transition: background-color 0.2s; }
#zoom-buttons .svg-button { background-color: var(--glass); }
.svg-button svg { height: 26px; fill: var(--muted); transition: fill 0.2s; }
.control-bar > .svg-button:first-child { padding-left: 4px; }
.control-bar > .svg-button:last-child { padding-right: 4px; }
#app .svg-button:hover { background-color: rgba(255, 255, 255, 0.07); }
#app .svg-button:hover svg { fill: var(--text); }
/* Selected view mode / open list: the one place the blue shows on the bar. The tint sits on the glass. */
#app .svg-button.active { background-image: linear-gradient(var(--selected), var(--selected)); }
#app .svg-button.active svg { fill: var(--blue-3); }
#app .svg-button:active { background-color: rgba(255, 255, 255, 0.12); color: inherit; }
#app .svg-button:active svg { fill: var(--text); }
.compass svg .north { fill: var(--blue-2); }
.compass svg .south, .compass:active svg .south { fill: var(--muted); }
.compass:active svg .north { fill: var(--blue-3); }

/* Coordinates: data, so the mono face with fixed-width digits */
.position-input { height: 100%; min-width: 0; }
.position-input > * { min-width: 0; }
.number-input { display: flex; align-items: center; min-height: 0; height: 100%; background-color: transparent; font: 500 0.9375rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.position-input > :first-child { padding-left: 6px; }
.position-input > * + * { border-left: 1px solid var(--line); }
.number-input label { display: flex; align-items: center; width: 100%; height: 100%; cursor: text; }
.number-input .label { width: auto; padding: 0 6px 0 12px; color: var(--muted); }
.number-input input { flex: 1; min-width: 0; width: 0; height: 100%; line-height: normal; }

#zoom-buttons { width: var(--hit); margin: var(--edge); bottom: max(0px, env(safe-area-inset-bottom)); right: max(0px, env(safe-area-inset-right)); border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--shadow); }
#zoom-buttons .svg-button + .svg-button { border-top: 1px solid var(--line); }

/* ---------- Side menu: a floating card on wide screens, full screen on phones ---------- */
.side-menu {
  top: var(--edge); left: var(--edge); height: calc(100% - 2 * var(--edge)); width: calc(100% - 2 * var(--edge)); max-width: 340px;
  border-radius: 24px; border: 1px solid var(--line-strong); background-color: rgba(10, 14, 26, 0.94);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
/* The house accent line, as on every card across the sites */
.side-menu::before { content: ""; position: absolute; z-index: 1; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--grad); }
.side-menu > .menu-button { margin: 8px; border-radius: 999px; }
.side-menu > .title { line-height: var(--hit); padding: 8px 60px; border-bottom: 1px solid var(--line); background: none; font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-menu > .content { height: calc(100% - var(--hit) - 17px); padding: 8px 10px 16px; }
.side-menu > .content hr { border-bottom: 1px solid var(--line); margin: 8px 4px; }

.side-menu .simple-button, .side-menu .switch-button, .side-menu .map-button {
  align-items: center; min-height: var(--hit); line-height: 1.3; padding: 0 12px; border-radius: 12px; transition: background-color 0.2s;
}
.side-menu .map-button { display: flex; height: auto; }
.side-menu .simple-button:hover, .side-menu .switch-button:hover, .side-menu .map-button:hover, .side-menu .slider:hover,
.side-menu .marker-item .marker-button:hover, .side-menu .marker-set > .info:hover, .side-menu .marker-set > .open-menu-button.active:hover { background-color: rgba(255, 255, 255, 0.07); }
.side-menu .simple-button.active, .side-menu .map-button.selected { background-color: var(--selected); }
.side-menu .simple-button:active, .side-menu .marker-set > .open-menu-button.active:active, .side-menu .marker-item > .follow-player-button:active { background-color: rgba(255, 255, 255, 0.12); color: inherit; }
.side-menu .simple-button:active > .submenu-icon > svg, .side-menu .marker-set > .open-menu-button.active:active > svg { fill: var(--text); }
.side-menu .simple-button > .submenu-icon { display: grid; place-items: center; width: 28px; height: 28px; margin-right: -6px; }
.side-menu .simple-button > .submenu-icon > svg { width: 28px; height: 28px; fill: var(--muted); }
.side-menu .map-button .sky { flex: none; width: 10px; height: 10px; margin: 0 10px 0 0; box-shadow: 0 0 0 1px var(--line-strong); }
.side-menu .map-button .id { margin: 0 0 0 auto; padding-left: 10px; font: 400 0.8125rem/1 var(--mono); font-style: normal; color: var(--muted); }

/* Settings groups: an inset list with its heading above, not a box with the title on the border */
.side-menu .group { margin: 36px 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
.side-menu .group:first-child { margin-top: 32px; }
.side-menu .group > .title { top: -25px; left: 10px; right: auto; padding: 0; background: none; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.side-menu .group > .content { max-height: 18em; }

.side-menu .slider { padding: 8px 12px 10px; line-height: 1.6; border-radius: 12px; }
.side-menu .slider > .label > .value { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.side-menu .slider > label > input { display: block; height: 6px; margin: 10px 0 4px; overflow: visible; background-color: var(--theme-bg-light); cursor: pointer; }
.side-menu .slider > label > input::-webkit-slider-thumb { width: 22px; height: 22px; border: none; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); cursor: grab; }
.side-menu .slider > label > input::-moz-range-thumb { width: 22px; height: 22px; border: none; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); cursor: grab; }
.side-menu .slider > label > input:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 6px; }

.side-menu .switch { flex: none; width: 40px; height: 24px; border-radius: 999px; background-color: var(--theme-bg-light); }
.side-menu .switch::after { width: 20px; height: 20px; top: 2px; left: 2px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); transition: left 0.25s var(--ease); }
.side-menu .switch.on { background: var(--grad); }
.side-menu .switch.on::after { left: 18px; }
.side-menu .switch-button > .switch { margin: 0 0 0 12px; }
.side-menu .switch-button > .label, .side-menu .simple-button > .label { padding: 10px 0; }

.choice-box { font-size: 0.8125rem; border: 1px solid var(--line); border-radius: 12px; }
.choice-box .title, .choice-box .choice { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 10px; }
.choice-box .title { background-color: rgba(255, 255, 255, 0.05); color: var(--muted); }
.choice-box .choices .choice { background-color: transparent; }
.choice-box .choices .choice:hover { background-color: rgba(255, 255, 255, 0.07); }
.choice-box .choices .choice.selected { background-color: var(--selected); color: #fff; font-weight: 600; }

.side-menu .marker-item, .side-menu .marker-set { margin: 2px 0; border-radius: 12px; }
.side-menu .marker-item .marker-button, .side-menu .marker-set > .info { border-radius: 12px; }
.side-menu .marker-item .marker-button > .info, .side-menu .marker-set > .info { padding: 10px 12px; }
.side-menu .marker-item .marker-button > .info .stats, .side-menu .marker-set > .info > .stats { margin-top: 4px; font-size: 0.8125rem; }
.side-menu .marker-item .marker-button > .info .stats > div:not(:first-child), .side-menu .marker-set > .info > .stats > div:not(:first-child) { border-left-color: var(--line-strong); }
.side-menu .marker-item .marker-button > .icon { height: 32px; margin: 6px 0 6px 10px; align-self: center; }
.side-menu .marker-item .marker-button > .icon img { border-radius: 4px; }
.side-menu .marker-item > .follow-player-button { width: var(--hit); flex: none; border-radius: 12px; background-color: transparent; }
.side-menu .marker-item > .follow-player-button:hover, .side-menu .marker-item > .follow-player-button.active { background-color: var(--selected); }
.side-menu .marker-item > .follow-player-button.active > svg { fill: var(--blue-3); stroke: var(--blue-3); }
.side-menu .marker-set > .info > .marker-set-switch .label { display: block; line-height: 24px; }
.side-menu .marker-set > .info > .marker-set-switch > .switch { top: 0; }
.side-menu .marker-set > .open-menu-button { width: var(--hit); flex: none; border-radius: 12px; }
.side-menu .text-input { box-sizing: border-box; width: 100%; min-height: var(--hit); margin-bottom: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background-color: var(--well); }
.side-menu .text-input:focus { border-color: rgba(var(--blue-rgb), 0.6); }
.side-menu .text-input::placeholder { color: var(--muted); opacity: 1; }

/* Info page */
#app h1, #app h2 { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; padding-left: 4px; }
#app h1:after, #app h2:after { background-color: var(--line); }
#app h1 { padding-left: 0; }
#app p { margin: 8px 4px; line-height: 1.5; }
#app a { color: var(--blue-2); text-underline-offset: 2px; }
#app kbd { padding: 1px 6px; border-radius: 6px; background-color: var(--theme-bg-light); font: 500 0.8125rem var(--mono); }
.info-content { font-size: 0.875rem; }
.info-content table tr th, .info-content table tr td { padding: 6px 8px; border-color: var(--line-strong); }
.info-content table tr td:last-child { font-family: var(--mono); font-size: 0.8125rem; }

::-webkit-scrollbar-thumb { background: var(--theme-bg-light); }
html { scrollbar-color: var(--theme-bg-light) transparent; }

/* ---------- On the map ---------- */
#map-container .bm-marker-html .bm-marker-poi-label, #map-container .bm-marker-labelpopup, #map-container .bm-marker-popup {
  padding: 8px 12px; border-radius: 12px; font-family: var(--sans); line-height: 1.35; box-shadow: inset 0 0 0 1px var(--line-strong);
}
#map-container .bm-marker-popup .group > .label, #map-container .bm-marker-popup .group > .content > .entry > .label, #map-container .bm-marker-popup .files { color: var(--muted); font-size: 0.8125rem; }
#map-container .bm-marker-popup .group > .content > .entry { font-family: var(--mono); font-variant-numeric: tabular-nums; }
#map-container .bm-marker-popup .group[data-tooltip]:hover:before { border-radius: 8px; font-size: 0.8125rem; line-height: 1.2; color: var(--text); }
#map-container .bm-marker-player .bm-player-name { padding: 3px 8px; border-radius: 999px; background-color: rgba(8, 11, 18, 0.84); font: 600 0.8125rem/1.2 var(--sans); }
#app .map-state-message { color: var(--muted); font-size: 1.0625rem; line-height: 1.4; }
#bm-app-err { background-color: var(--bg); font-family: var(--sans); }
#bm-app-err > div .bm-app-err-hint { color: var(--muted); }

/* ---------- Phones: BlueMap scales its UI 1.5x and docks the bar edge to edge; keep the floating pills ---------- */
@media (max-width: 575.98px) {
  :root { --edge: 8px; }
  #app { font-size: 1.0625rem; }
  #gxth-home { top: max(var(--edge), env(safe-area-inset-top)); }
  .control-bar { top: max(var(--edge), env(safe-area-inset-top)); margin: 0; width: calc(100% - 2 * var(--edge) - var(--hit) - 8px); background: none; }
  .control-bar .space { width: 8px; }
  .control-bar .thin-hide { display: none; }
  .side-menu { top: 0; left: 0; width: 100%; height: 100%; max-width: none; border: none; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .side-menu::before { display: none; }
  .side-menu > .menu-button { margin: 8px; top: env(safe-area-inset-top); }
  .side-menu > .title { padding-block: 8px; }
  .side-menu > .content { height: calc(100% - var(--hit) - 17px - env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}

/* ---------- Accessibility settings ---------- */
@media (prefers-contrast: more) {
  :root, :root .theme-light, :root .theme-dark, :root .theme-contrast {
    --muted: #c3cbe0; --line: rgba(255, 255, 255, 0.24); --line-strong: rgba(255, 255, 255, 0.4); --glass: #0b1020; --theme-bg-light: #3a4766;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root, :root .theme-light, :root .theme-dark, :root .theme-contrast { --glass: #0b1020; }
  #gxth-home, .control-bar > *, #zoom-buttons, .side-menu { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .side-menu { background-color: var(--card); }
}
@media (prefers-reduced-motion: reduce) {
  #app *, #app *::before, #app *::after { transition: none !important; animation: none !important; }
}
