:root {
  --app-bg: #0a1215;
  --panel-bg: rgba(10, 18, 20, 0.8);
  --panel-border: rgba(255, 255, 255, 0.16);
  --text-main: #ecf5f8;
  --text-muted: rgba(236, 245, 248, 0.8);
  --text-faint: rgba(236, 245, 248, 0.56);
  --chip-bg: rgba(255, 255, 255, 0.08);
  --line-river: #68b8ff;
  --line-rowy: #f2ab73;
  --poly-parks: #ff4bd8;
  --poly-reserves: #ff5b3a;
}

html,
body,
.hydro-map-app,
#map {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
}

body {
  background: var(--app-bg);
}

.hydro-map-app {
  position: relative;
  overflow: hidden;
}

.hydro-map-app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  background:
    radial-gradient(circle at 86% 14%, rgba(133, 191, 255, 0.1), transparent 38%),
    radial-gradient(circle at 10% 88%, rgba(255, 112, 169, 0.08), transparent 42%);
}

#map,
.leaflet-container {
  background: radial-gradient(circle at 25% 15%, #24393e 0, #111a1d 58%, #0b1214 100%);
}

.sidebar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1000;
  width: 352px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 52%),
    var(--panel-bg);
  backdrop-filter: blur(10px) saturate(125%);
  color: var(--text-main);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: width 0.22s ease, max-height 0.22s ease, transform 0.22s ease;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.03) 55%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
}

.panel-title-wrap {
  min-width: 0;
}

.panel-kicker {
  margin: 0;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.panel-title-wrap h1 {
  margin: 4px 0 0;
  font-size: 33px;
  font-weight: 750;
  line-height: 1.03;
  letter-spacing: -0.01em;
}

.panel-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.panel-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.45);
}

.panel-toggle-icon {
  display: block;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

.sidebar.is-collapsed .panel-toggle-icon {
  transform: rotate(180deg);
}

.panel-subtitle {
  display: inline-block;
  margin: 0 16px 10px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 13px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 10px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.divider {
  margin: 0 16px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.layer-group {
  padding: 10px 16px 12px;
}

.group-title {
  margin: 0 0 8px;
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
  margin: 10px 0;
  transition: opacity 0.15s ease;
}

.layer-item:hover {
  opacity: 0.92;
}

.layer-item input[type="checkbox"] {
  appearance: none;
  width: 38px;
  height: 22px;
  min-width: 38px;
  min-height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.layer-item input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.layer-item input[type="checkbox"]:checked {
  border-color: #4ca4ff;
  background: #4ca4ff;
  box-shadow: 0 0 0 2px rgba(76, 164, 255, 0.25);
}

.layer-item input[type="checkbox"]:checked::before {
  transform: translate(18px, -50%);
}

.layer-item input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 0 4px rgba(76, 164, 255, 0.4);
}

.swatch {
  width: 19px;
  height: 19px;
  border-radius: 4px;
  border: 2px solid currentColor;
  box-sizing: border-box;
}

.swatch-line {
  width: 28px;
  height: 0;
  border-radius: 2px;
  border-top: 5px solid currentColor;
}

.swatch-parks {
  color: var(--poly-parks);
}

.swatch-reserves {
  color: var(--poly-reserves);
}

.swatch-rivers {
  color: var(--line-river);
}

.swatch-rowy {
  color: var(--line-rowy);
}

.subheading {
  font-size: 28px;
  font-weight: 730;
  margin: 6px 0;
}

.hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.order-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px;
}

.order-list li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 20px;
}

.order-line {
  display: inline-block;
  width: 24px;
  border-radius: 4px;
}

.order-1 {
  border-top: 2px solid #9ad5ff;
}

.order-2 {
  border-top: 3px solid #89ccff;
}

.order-3 {
  border-top: 4px solid #7ec4ff;
}

.order-4 {
  border-top: 5px solid #74bcff;
}

.order-5 {
  border-top: 6px solid #67b2ff;
}

.order-6 {
  border-top: 7px solid #57a6f6;
}

.order-7 {
  border-top: 8px solid #4f9eec;
}

.order-8 {
  border-top: 9px solid #4795e3;
}

.park-label {
  color: #ff8ce7;
  font-size: 12px;
  font-weight: 650;
  text-shadow: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.status {
  padding: 0 16px 14px;
  color: #ffd9b8;
  font-size: 12px;
  display: none;
}

.status.error {
  display: block;
}

.brand-footer {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(8, 12, 12, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
}

.brand-footer img {
  width: 102px;
  height: auto;
  display: block;
  opacity: 0.98;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  padding: 4px 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.brand-footer a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 11px;
  line-height: 1;
}

.brand-footer a:hover {
  text-decoration: underline;
}

.sidebar.is-collapsed {
  width: 76px;
  max-height: 74px;
  overflow: hidden;
}

.sidebar.is-collapsed .panel-title-wrap,
.sidebar.is-collapsed .panel-subtitle,
.sidebar.is-collapsed .meta-row,
.sidebar.is-collapsed .divider,
.sidebar.is-collapsed .layer-group,
.sidebar.is-collapsed .status {
  display: none;
}

.sidebar.is-collapsed .panel-header {
  padding: 18px;
  justify-content: center;
}

@media (max-width: 980px) {
  .sidebar {
    width: min(88vw, 360px);
  }

  .panel-title-wrap h1 {
    font-size: 29px;
  }

  .layer-item {
    font-size: 22px;
  }

  .subheading {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .sidebar {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-height: 54dvh;
    border-radius: 14px;
  }

  .panel-header {
    padding: 12px 14px 6px;
  }

  .panel-title-wrap h1 {
    font-size: 22px;
  }

  .panel-subtitle {
    margin: 0 14px 8px;
    font-size: 12px;
  }

  .meta-row {
    padding: 0 14px 8px;
  }

  .meta-chip {
    min-height: 22px;
    padding: 2px 8px;
    font-size: 10px;
  }

  .divider {
    margin: 0 14px;
  }

  .layer-group {
    padding: 8px 14px 10px;
  }

  .layer-item {
    gap: 8px;
    font-size: 18px;
    margin: 8px 0;
  }

  .layer-item input[type="checkbox"] {
    width: 42px;
    height: 26px;
    min-width: 42px;
    min-height: 26px;
  }

  .layer-item input[type="checkbox"]::before {
    width: 20px;
    height: 20px;
  }

  .layer-item input[type="checkbox"]:checked::before {
    transform: translate(18px, -50%);
  }

  .swatch {
    width: 16px;
    height: 16px;
  }

  .swatch-line {
    width: 22px;
    border-top-width: 4px;
  }

  .subheading {
    font-size: 19px;
    margin: 4px 0;
  }

  .hint {
    font-size: 12px;
    margin-bottom: 7px;
  }

  .order-list li {
    font-size: 16px;
    margin: 3px 0;
  }

  .order-line {
    width: 20px;
  }

  .status {
    padding: 0 14px 12px;
  }

  .brand-footer {
    top: max(8px, env(safe-area-inset-top));
    right: 8px;
    bottom: auto;
    padding: 4px 6px;
  }

  .brand-footer img {
    width: 76px;
  }

  .brand-logo-wrap {
    border-radius: 6px;
    padding: 3px 5px;
  }

  .brand-footer a {
    font-size: 10px;
  }

  .sidebar.is-collapsed {
    width: 64px;
    max-height: 62px;
    left: auto;
    right: 8px;
  }

  .sidebar.is-collapsed .panel-header {
    padding: 14px;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
