:root {
  --ax-header-height: 4.5rem;
  --ax-header-top: 0.7rem;
  --ax-header-width: min(66rem, calc(100vw - 2rem));
  --ax-control-top: calc(var(--ax-header-top) + var(--ax-header-height) + 0.7rem);
  --ax-pink: #ff2d95;
  --ax-pink-bright: #ff5fbd;
  --ax-purple: #8b5cf6;
  --ax-blue: #3dd9ff;
  --ax-bg: #090714;
  --ax-panel: rgba(12, 9, 27, 0.88);
  --ax-panel-strong: rgba(8, 6, 20, 0.96);
  --ax-border: rgba(255, 67, 166, 0.32);
  --ax-shadow: 0 1.2rem 4rem rgba(0, 0, 0, 0.45), 0 0 2.4rem rgba(255, 45, 149, 0.12);

  --ui-font: Inter, "Segoe UI", Arial, sans-serif;
  --ui-button-size: 4.8rem;
  --ui-element-spacing: 1rem;
  --ui-border-radius: 1.2rem;
  --ui-border: 1px solid var(--ax-border);
  --ui-outline: solid rgba(61, 217, 255, 0.85) 0.25rem;
  --ui-background: var(--ax-panel);
  --ui-background-disabled: rgba(38, 31, 61, 0.82);
  --ui-background-hover: rgba(255, 45, 149, 0.2);
  --ui-background-active: rgba(255, 45, 149, 0.32);
  --ui-background-selected: #e91e83;
  --ui-text: #f8f5ff;
  --ui-text-hover: #ffffff;
  --ui-text-active: #ffffff;
  --ui-text-selected: #ffffff;
  --ui-text-disabled: rgba(248, 245, 255, 0.45);
  --ui-sidebar-width: 29rem;
}

* {
  scrollbar-color: var(--ax-pink) rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

html,
body {
  background: var(--ax-bg);
  color: #f8f5ff;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  z-index: 700;
  background:
    radial-gradient(circle at 75% 8%, rgba(83, 47, 188, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(4, 3, 12, 0.06), rgba(4, 3, 12, 0.22));
}

.axomc-topbar {
  position: fixed;
  top: var(--ax-header-top);
  left: 50%;
  z-index: 2000;
  width: var(--ax-header-width);
  height: var(--ax-header-height);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.45rem 0.38rem 0.75rem;
  overflow: visible;
  border: 1px solid rgba(255, 76, 170, 0.34);
  border-radius: 1.3rem;
  background:
    linear-gradient(110deg, rgba(93, 17, 63, 0.9), rgba(55, 22, 66, 0.9) 55%, rgba(92, 18, 67, 0.88)),
    rgba(15, 8, 26, 0.9);
  box-shadow:
    0 0.9rem 2.8rem rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 2rem rgba(255, 45, 149, 0.1);
  backdrop-filter: blur(18px) saturate(145%);
}

.axomc-topbar::after {
  position: absolute;
  inset: 0;
  content: "";
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 115, 186, 0.16), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 38%);
  pointer-events: none;
}

.axomc-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  text-decoration: none;
}

.axomc-brand img {
  width: auto;
  height: 2.75rem;
  object-fit: contain;
}

.axomc-brand span {
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.axomc-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.axomc-nav__links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(7, 5, 18, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.axomc-nav a,
.axomc-join {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  box-shadow: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: 160ms ease;
}

.axomc-nav a:hover,
.axomc-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  transform: translateY(-1px);
}

.axomc-join,
.axomc-join:hover,
.axomc-join:focus-visible {
  gap: 0.55rem;
  min-height: 3.35rem;
  padding-inline: 0.9rem;
  border-color: rgba(255, 110, 193, 0.58);
  background: linear-gradient(135deg, #e91e83, #8b5cf6);
  color: #ffffff;
  box-shadow:
    0 0.7rem 2.4rem rgba(233, 30, 131, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.axomc-join:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.axomc-join__status {
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: #78ffae;
  box-shadow: 0 0 1rem rgba(120, 255, 174, 0.9);
}

.axomc-menu-toggle {
  display: none;
  width: 3.6rem;
  height: 3.6rem;
  margin-left: auto;
  padding: 0.82rem;
  border: 1px solid var(--ax-border);
  background: rgba(255, 255, 255, 0.06);
}

.axomc-menu-toggle span {
  display: block;
  height: 2px;
  margin: 0.45rem 0;
  border-radius: 2px;
  background: #fff;
}

.map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #070b19;
}

.leaflet-control-container {
  width: 100%;
  height: 100%;
  padding-top: var(--ax-control-top);
}

.leaflet-control-panel,
#sidebar #sidebar__content,
.leaflet-touch .leaflet-control-layers.leaflet-control-layers-expanded .leaflet-control-layers-list,
.leaflet-control-layers.leaflet-control-layers-expanded .leaflet-control-layers-list,
.leaflet-popup-content-wrapper,
.leaflet-tooltip {
  background: var(--ax-panel);
  border: 1px solid var(--ax-border);
  box-shadow: var(--ax-shadow);
  color: #f8f5ff;
  backdrop-filter: blur(16px) saturate(135%);
}

.leaflet-control-panel {
  min-height: var(--ui-button-size);
  height: auto;
  border-radius: 1.2rem;
}

.leaflet-bar,
.leaflet-touch .leaflet-bar {
  overflow: hidden;
  border: 1px solid var(--ax-border);
  border-radius: 1.2rem;
  box-shadow: var(--ax-shadow);
}

.leaflet-bar a,
.leaflet-touch .leaflet-bar a,
#sidebar #sidebar__buttons button {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--ax-panel-strong);
  color: #ffffff;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

#sidebar #sidebar__buttons {
  grid-gap: 0.35rem;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.55rem;
  background: rgba(8, 6, 20, 0.88);
  box-shadow: var(--ax-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px) saturate(135%);
}

#sidebar #sidebar__buttons button.axomc-tool-button {
  width: 4.4rem;
  height: 4.4rem;
  border: 0;
  border-radius: 1.12rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

#sidebar #sidebar__buttons button.axomc-tool-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateY(-1px);
}

#sidebar #sidebar__buttons button.axomc-tool-button[aria-expanded="true"] {
  background: linear-gradient(145deg, rgba(255, 45, 149, 0.96), rgba(139, 92, 246, 0.96));
  color: #ffffff;
  box-shadow: 0 0.7rem 2rem rgba(233, 30, 131, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#sidebar #sidebar__buttons button > .axomc-tool-icon {
  position: static;
  inset: auto;
  width: 2.55rem;
  height: 2.55rem;
  margin: 0;
  overflow: visible;
  pointer-events: none;
}

.axomc-tool-button--layers .axomc-tool-icon,
.axomc-tool-button--towns .axomc-tool-icon,
.axomc-tool-button--nations .axomc-tool-icon {
  fill: rgba(255, 255, 255, 0.12);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.axomc-tool-button--players .axomc-tool-icon {
  fill: currentColor;
  stroke: none;
}

.leaflet-bar a:hover,
.leaflet-touch .leaflet-bar a:hover,
#sidebar #sidebar__buttons button:hover {
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.92), rgba(139, 92, 246, 0.92));
}

#sidebar #sidebar__buttons button[aria-expanded="true"] {
  background: linear-gradient(135deg, var(--ax-pink), var(--ax-purple));
  color: #fff;
}

#sidebar #sidebar__content {
  top: 0;
  height: auto;
  min-height: 0;
  max-height: calc(100vh - var(--ax-control-top) - var(--ui-element-spacing));
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.55rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(19, 12, 37, 0.96), rgba(8, 6, 20, 0.98)),
    var(--ax-panel-strong);
  box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

#sidebar #sidebar__content h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #ffffff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 1.75rem;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.axomc-panel-intro {
  margin: 0.4rem 0 1.25rem;
  color: rgba(255, 255, 255, 0.52);
  font-size: 1.15rem;
  line-height: 1.45;
}

#sidebar__layers fieldset.menu {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  border: 0;
}

#sidebar__layers fieldset.menu input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

#sidebar__layers fieldset.menu input + label.axomc-layer-row {
  min-height: 6.2rem;
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) 3.5rem;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

#sidebar__layers fieldset.menu input + label.axomc-layer-row:hover {
  border-color: rgba(255, 95, 189, 0.34);
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-1px);
}

#sidebar__layers fieldset.menu input:focus-visible + label.axomc-layer-row {
  outline: var(--ui-outline);
  outline-offset: 2px;
}

#sidebar__layers fieldset.menu input:checked + label.axomc-layer-row {
  border-color: rgba(255, 95, 189, 0.38);
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.12), rgba(139, 92, 246, 0.12));
  color: #ffffff;
}

.axomc-layer-row__icon {
  width: 4.2rem;
  height: 4.2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
}

input:checked + .axomc-layer-row .axomc-layer-row__icon {
  border-color: rgba(255, 95, 189, 0.42);
  background: linear-gradient(145deg, rgba(255, 45, 149, 0.9), rgba(139, 92, 246, 0.9));
  color: #ffffff;
  box-shadow: 0 0.6rem 1.6rem rgba(233, 30, 131, 0.2);
}

.axomc-layer-row__icon svg {
  width: 2.25rem;
  height: 2.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.axomc-layer-row__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.axomc-layer-row__copy strong {
  overflow: hidden;
  font-size: 1.32rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.axomc-layer-row__copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.48);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.axomc-layer-row__switch {
  position: relative;
  width: 3.4rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: 160ms ease;
}

.axomc-layer-row__switch::after {
  position: absolute;
  top: 0.3rem;
  left: 0.3rem;
  width: 1.2rem;
  height: 1.2rem;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transition: 160ms ease;
}

input:checked + .axomc-layer-row .axomc-layer-row__switch {
  border-color: rgba(255, 95, 189, 0.65);
  background: linear-gradient(90deg, var(--ax-pink), var(--ax-purple));
}

input:checked + .axomc-layer-row .axomc-layer-row__switch::after {
  left: 1.8rem;
  background: #ffffff;
  box-shadow: 0 0 0.8rem rgba(255, 255, 255, 0.45);
}

#sidebar__players fieldset.menu {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.axomc-town-list {
  display: grid;
  gap: 0.7rem;
  max-height: min(55vh, 50rem);
  margin-top: 1rem;
  padding-right: 0.25rem;
  overflow-y: auto;
  scrollbar-color: rgba(255, 95, 189, 0.55) transparent;
  scrollbar-width: thin;
}

.axomc-town-list__empty,
.axomc-nation-list__empty {
  margin: 1.2rem 0 0;
  padding: 1.2rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.12rem;
  line-height: 1.45;
  text-align: center;
}

.axomc-town-list__empty[hidden],
.axomc-nation-list__empty[hidden] {
  display: none;
}

.axomc-town-item {
  width: 100%;
  min-height: 5.4rem;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--ax-town-color) 30%, rgba(255, 255, 255, 0.08));
  border-radius: 1.1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ax-town-color) 9%, transparent), transparent 55%),
    rgba(255, 255, 255, 0.04);
  color: #ffffff;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.axomc-town-item:hover,
.axomc-town-item:focus-visible {
  border-color: color-mix(in srgb, var(--ax-town-color) 72%, white 12%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ax-town-color) 18%, transparent), transparent 60%),
    rgba(255, 255, 255, 0.075);
  transform: translateY(-1px);
}

.axomc-town-item:focus-visible {
  outline: var(--ui-outline);
  outline-offset: 2px;
}

.axomc-town-item__marker {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ax-town-color) 55%, white 8%);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--ax-town-color) 18%, rgba(255, 255, 255, 0.04));
  color: var(--ax-town-color);
}

.axomc-town-item__marker svg {
  width: 2.15rem;
  height: 2.15rem;
  fill: color-mix(in srgb, var(--ax-town-color) 22%, transparent);
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.axomc-town-item__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.axomc-town-item__copy strong,
.axomc-town-item__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.axomc-town-item__copy strong {
  font-size: 1.25rem;
}

.axomc-town-item__copy small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 1rem;
}

.axomc-town-item__arrow {
  color: var(--ax-town-color);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

#sidebar__players fieldset.menu input.players {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

#sidebar__players fieldset.menu input.players + label {
  position: relative;
  min-height: 5rem;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.8rem 3.2rem 0.8rem 5.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  background-color: rgba(255, 255, 255, 0.045);
  background-position: 0.8rem center;
  background-repeat: no-repeat;
  background-size: 3.6rem 3.6rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.25rem;
  font-weight: 700;
  transition: 160ms ease;
}

#sidebar__players fieldset.menu input.players + label::after {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: 0.75rem;
  height: 0.75rem;
  content: "";
  transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: #72f5a4;
  box-shadow: 0 0 0.9rem rgba(114, 245, 164, 0.55);
}

#sidebar__players fieldset.menu input.players + label:hover {
  border-color: rgba(255, 95, 189, 0.28);
  background-color: rgba(255, 255, 255, 0.075);
  color: #ffffff;
}

#sidebar__players fieldset.menu input.players:checked + label {
  border-color: rgba(255, 95, 189, 0.42);
  background-color: rgba(255, 45, 149, 0.13);
  color: #ffffff;
}

.menu input + label {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.menu input + label:hover {
  border-color: var(--ax-border);
  background: rgba(255, 45, 149, 0.12);
}

.menu input:checked + label {
  border-color: rgba(255, 110, 193, 0.62);
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.92), rgba(139, 92, 246, 0.92));
  color: #fff;
}

.leaflet-control-attribution {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
  background: rgba(7, 5, 17, 0.78);
  color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
}

.leaflet-control-attribution a {
  color: var(--ax-pink-bright);
}

.leaflet-control-coordinates,
.leaflet-control-blockinfo {
  font-family: ui-monospace, "Cascadia Mono", monospace;
}

.leaflet-control-coordinates::before {
  color: var(--ax-pink-bright);
  font-weight: 700;
  text-transform: uppercase;
}

.leaflet-tooltip::before {
  border-top-color: var(--ax-panel-strong);
}

.leaflet-tooltip.axomc-town-label {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.48rem 0.82rem 0.48rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(24, 22, 36, 0.88), rgba(9, 8, 18, 0.9)),
    rgba(9, 8, 18, 0.88);
  box-shadow:
    0 0.45rem 1.25rem rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  font-family: "Segoe UI Variable", Inter, "Segoe UI", Arial, sans-serif;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms ease;
  backdrop-filter: blur(10px) saturate(125%);
}

.leaflet-tooltip.axomc-town-label::before {
  display: none;
}

.axomc-town-label__dot {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: var(--ax-town-color);
  box-shadow: 0 0 0.8rem color-mix(in srgb, var(--ax-town-color) 65%, transparent);
}

.axomc-town-label__name {
  display: block;
  transform: translateY(-0.02rem);
}

.leaflet-tooltip.axomc-town-label--hidden {
  visibility: hidden;
  opacity: 0 !important;
}

.axomc-panel-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  display: none;
  width: 3.6rem;
  height: 3.6rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 2.4rem;
  line-height: 1;
}

.axomc-loader {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background:
    radial-gradient(circle at center, rgba(101, 40, 151, 0.28), transparent 34%),
    rgba(6, 5, 16, 0.9);
  text-align: center;
  transition: opacity 220ms ease, visibility 220ms ease;
  backdrop-filter: blur(9px);
}

.axomc-loader[hidden] {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#axomc-loader-retry[hidden],
.axomc-tile-status[hidden] {
  display: none !important;
}

.axomc-loader__mascot {
  width: 15rem;
  height: 15rem;
  object-fit: contain;
  filter: drop-shadow(0 0 3rem rgba(255, 45, 149, 0.34));
}

.axomc-loader strong {
  margin-top: 0.4rem;
  font-size: 2rem;
}

.axomc-loader span {
  color: rgba(255, 255, 255, 0.66);
}

.axomc-loader__spinner {
  width: 4rem;
  height: 4rem;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--ax-pink);
  border-right-color: var(--ax-purple);
  border-radius: 50%;
  animation: axomc-spin 800ms linear infinite;
}

.axomc-loader--error .axomc-loader__spinner {
  display: none;
}

#axomc-loader-retry {
  margin-top: 0.8rem;
  border-color: rgba(255, 110, 193, 0.6);
  background: linear-gradient(135deg, var(--ax-pink), var(--ax-purple));
  color: #fff;
}

.axomc-tile-status,
.axomc-toast {
  position: fixed;
  left: 50%;
  z-index: 1600;
  transform: translateX(-50%);
  border: 1px solid var(--ax-border);
  border-radius: 999px;
  background: var(--ax-panel-strong);
  box-shadow: var(--ax-shadow);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.axomc-tile-status {
  top: var(--ax-control-top);
  padding: 0.8rem 1.3rem;
}

.axomc-toast {
  bottom: 2rem;
  padding: 1rem 1.6rem;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.axomc-toast--visible {
  opacity: 1;
  transform: translate(-50%, -0.5rem);
}

.axomc-tile--failed {
  opacity: 0 !important;
}

noscript {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--ax-bg);
  color: #fff;
  text-align: center;
}

@keyframes axomc-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 860px) {
  :root {
    --ax-header-height: 4.4rem;
    --ax-header-top: 0.4rem;
    --ax-header-width: calc(100vw - 1rem);
    --ax-control-top: calc(var(--ax-header-top) + var(--ax-header-height) + 0.6rem);
    --ui-button-size: 4.4rem;
    --ui-element-spacing: 0.8rem;
    --ui-sidebar-width: min(78vw, 26rem);
  }

  .axomc-topbar {
    padding: 0.35rem 0.45rem 0.35rem 0.7rem;
    border-radius: 1.15rem;
  }

  .axomc-brand img {
    height: 2.7rem;
  }

  .axomc-menu-toggle {
    display: block;
  }

  .axomc-nav {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.8rem;
    border: 1px solid var(--ax-border);
    border-radius: 1.4rem;
    background:
      linear-gradient(150deg, rgba(54, 14, 52, 0.97), rgba(9, 7, 23, 0.98)),
      var(--ax-panel-strong);
    box-shadow: var(--ax-shadow);
    backdrop-filter: blur(18px);
  }

  .axomc-nav--open {
    display: flex;
  }

  .axomc-nav a,
  .axomc-join {
    width: 100%;
    justify-content: flex-start;
    min-height: 4.4rem;
    padding: 1rem 1.2rem;
  }

  .axomc-nav__links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.35rem;
    border-radius: 1rem;
  }

  .axomc-join {
    justify-content: center;
  }

  #sidebar #sidebar__content {
    padding: 1.15rem;
    padding-top: 1.25rem;
  }

  #sidebar #sidebar__content h2 {
    padding-right: 4rem;
    font-size: 2rem;
  }

  #sidebar__layers fieldset.menu input + label.axomc-layer-row {
    min-height: 5.8rem;
    grid-template-columns: 3.8rem minmax(0, 1fr) 3.4rem;
    gap: 0.8rem;
    padding: 0.7rem;
  }

  .axomc-layer-row__icon {
    width: 3.8rem;
    height: 3.8rem;
  }

  .axomc-panel-close {
    display: grid;
    place-items: center;
  }

  .menu input.players + label {
    min-height: 4.2rem;
    display: flex;
    align-items: center;
  }

  .leaflet-control-coordinates {
    min-width: 14rem;
    max-width: 48vw;
    overflow: hidden;
    font-size: 1.45rem;
    text-overflow: ellipsis;
  }

  .leaflet-control-blockinfo {
    max-width: 35vw;
    overflow: hidden;
    font-size: 1.25rem;
    text-overflow: ellipsis;
  }

  .leaflet-control-attribution {
    display: none;
  }

  .axomc-loader__mascot {
    width: 11rem;
    height: 11rem;
  }

  .axomc-toast {
    max-width: calc(100vw - 2rem);
    bottom: 1.2rem;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .leaflet-control-blockinfo {
    display: none;
  }

  .leaflet-bottom.leaflet-center {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
