﻿:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1a2230;
  --accent: #164092;
  --accent-strong: #092458;
  --border: #d8e1ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.map-page {
  padding: 24px 24px 0;
}

.map-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.academy-form {
  margin: 0;
  position: static;
  width: 100%;
  margin-bottom: 8px;
  pointer-events: auto;
}

.academy-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.academy-select-wrap {
  flex: 1 1 auto;
  max-width: 360px;
}

.svg-block {
  margin: 0;
  margin-bottom: -8px;
  line-height: 0;
}

#academy-select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.95);
}

.link-mode-toggle {
  --toggle-padding: 4px;
  margin: 0 0 0 auto;
  width: min(390px, 100%);
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  padding: var(--toggle-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.link-mode-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.link-mode-toggle label {
  z-index: 2;
  text-align: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  color: #16315f;
  transition: color 0.2s ease;
}

.link-mode-slider {
  position: absolute;
  top: var(--toggle-padding);
  bottom: var(--toggle-padding);
  left: var(--toggle-padding);
  width: calc((100% - (var(--toggle-padding) * 2)) / 2);
  border-radius: 999px;
  background: linear-gradient(135deg, #2158bd, #163d85);
  transition: transform 0.2s ease;
  z-index: 1;
}

#link-mode-site:checked + label,
#link-mode-amenagement:checked + label {
  color: #fff;
}

#link-mode-amenagement:checked ~ .link-mode-slider {
  transform: translateX(100%);
}

.svg-block svg {
  display: block;
  width: 100%;
  height: auto;
}

.svg-block .js-svg-click {
  cursor: pointer;
  transition: fill 0.2s ease;
}

.svg-block .js-svg-click:focus,
.svg-block .js-svg-click:hover {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .map-page {
    padding: 12px 12px 0;
  }

  .academy-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .academy-select-wrap {
    max-width: none;
  }

  .link-mode-toggle {
    margin-left: 0;
    width: 100%;
  }
}
