﻿:root {
      color-scheme: light;
      --border: #d8dde3;
      --text: #15202b;
      --muted: #5b6775;
      --surface: #ffffff;
      --surface-soft: #f4f6f8;
      --accent: #0b7fab;
      --accent-dark: #075f80;
      --selected: #fff4c2;
      --focus: #ffbf47;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      width: 100%;
      height: 100%;
      margin: 0;
      color: var(--text);
      font-family: Arial, Helvetica, sans-serif;
      background: var(--surface);
    }

    button,
    input {
      font: inherit;
    }

    .app {
      display: flex;
      width: 100%;
      height: 100dvh;
      min-height: 480px;
    }

    #map {
      width: 66.666%;
      height: 100%;
      min-width: 0;
    }

    #menu {
      display: flex;
      flex-direction: column;
      width: 33.333%;
      height: 100%;
      min-width: 320px;
      overflow: visible;
      border-left: 1px solid var(--border);
      background: var(--surface);
    }

    .menu-header {
      padding: 5px;
    }

    .menu-actions,
    .feature-info {
      padding: 16px;
    }

    .menu-header {
      display: grid;
      gap: 10px;
      border-bottom: 1px solid #cfd9df;
      background:#ffffff;
      box-shadow: 0 1px 0 rgba(21, 32, 43, 0.04);
      background-image: 
        linear-gradient(1deg, rgb(0, 0, 0), rgba(0, 0, 0, 14%) 14%),
        url("icons/skyline.jpg"); 
        
        /* background-image: linear-gradient(1deg, rgb(0, 0, 0), rgba(0, 0, 0, 14%) 14%), url(icons/skyline.jpg);
        background-position-x: left;
        background-position-y: bottom; */


        /* url("clouds.png"); background-position: left; */ 
        
        /* linear-gradient(135deg, rgb(0 0 0), rgb(64 115 78 / 26%) 52%),
        url("lightpole.png");  
        background-position: top; 
        background-size: cover; 
         */
      background-position-x: right;
      background-position-y: center;
      background-size: cover;
      border: 4px solid;
      border-radius: 6px;
      border-color: #ffffff;
    }

    .menu-title {
      margin: 0;
      font-size: 2rem;
      line-height: 1.2;
      display: grid;
      grid-row: 1;
      grid-column: 2;
      color: #f3f3f3;
      text-shadow: 2px 4px 4px #004f02;  /* 2px 2px 4px #5cad6c; */
    }

    .menu-subtitle {
      display: flex;
      align-items: center;
      min-height: 48px;
      margin: 0;
    }

    .menu-logo {
      display: block;
      width: min(230px, 100%);
      max-height: 75px;
      object-fit: contain;
    }

    .menu-tabs {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      padding: 10px 16px;
      border-bottom: 1px solid var(--border);
      background: #f3f3f3;
    }

    .menu-tab {
      min-height: 38px;
      border: 1px solid #cad5d0;
      border-radius: 8px;
      color: var(--text);
      background: #ffffff;
      cursor: pointer;
      font-weight: 700;
      box-shadow: 0 1px 2px rgba(21, 32, 43, 0.08);
      transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
    }

    .menu-tab:hover {
      border-color: #8fb5a4;
      background: #f4fbf7;
      box-shadow: 0 3px 8px rgba(21, 32, 43, 0.12);
      transform: translateY(-1px);
    }

    .menu-tab[aria-selected="true"] {
      border-color: #1f6f11;
      color: #ffffff;
      background: linear-gradient(180deg, #00572b, #1f6f11);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 3px 8px rgba(31, 111, 17, 0.22);
      transform: none;
    }

    .menu-page {
      display: none;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .menu-page.is-active {
      display: flex;
      flex-direction: column;
    }

    .menu-page-content {
      flex: 1;
      padding: 16px;
      overflow-y: auto;
      line-height: 1.5;
      background: 
        linear-gradient(rgb(255 255 255 / 91%), rgba(255, 255, 255, 0.9)), 
        url("icons/shaded_relief.png");
      background-position: right;
      border: 2px solid;
      border-radius: 6px;
      border-color: #ffffff;
    }

    .menu-page-content h2 {
      margin: 0 0 8px;
      font-size: 1.1rem;
    }

    .about-controls {
      display: grid;
      gap: 8px;
      margin-top: 20px;
      padding: 12px 0 12px 14px;
      border-left: 4px solid #249e61;
    }

    .about-controls h3,
    .about-controls p {
      margin: 0;
    }

    .about-controls h3 {
      color: #1f6f11;
      font-size: 0.95rem;
      line-height: 1.3;
    }

    .about-controls p {
      max-width: 60ch;
      color: var(--text);
      font-size: 0.92rem;
      line-height: 1.6;
    }

    .about-controls strong {
      color: #000000;
      font-weight: 700;
    }

    .menu-image-placeholder {
      display: grid;
      place-items: center;
      min-height: 120px;
      margin-top: 12px;
      border: 1px dashed var(--border);
      border-radius: 8px;
      color: var(--muted);
      background: var(--surface-soft);
      font-size: 0.9rem;
    }

    .section-button.has-alternate-route {
      border-style: dashed;
      border-color: #c98b00;
      box-shadow: inset 0 -3px 0 rgba(255, 191, 0, 0.55), 0 1px 2px rgba(21, 32, 43, 0.08);
    }

    .book-gallery {
      display: grid;
      gap: 10px;
      margin-top: 12px;
      user-select: none;
    }

    .book-gallery-stage {
      display: grid;
      place-items: center;
      min-height: 160px;
      border: 3px solid var(--border);
      border-radius: 8px;
      background: var(--surface-soft);
      overflow: hidden;
    }

    .book-gallery-image {
      display: block;
      width: auto;
      max-width: 100%;
      max-height: 35dvh;
      height: auto;
      user-select: none;
      -webkit-user-drag: none;
    }

    .book-gallery-slider {
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr) 36px;
      gap: 6px;
      align-items: stretch;
    }

    .book-gallery-nav {
      min-height: 58px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: var(--surface-soft);
      cursor: pointer;
      font-weight: 700;
    }

    .book-gallery-actions {
      display: flex;
      gap: 6px;
      min-width: 0;
      overflow-x: auto;
      scroll-behavior: smooth;
      padding-bottom: 2px;
    }

    .book-gallery-button {
      flex: 0 0 72px;
      height: 58px;
      padding: 2px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: var(--surface-soft);
      cursor: pointer;
      font-size: 0.84rem;
      overflow: hidden;
    }

    .book-gallery-button:hover {
      transform: translate(1px, 1px);
      box-shadow: inset 0 2px 5px rgba(21, 32, 43, 0.14);
    }

    .book-gallery-button[aria-current="true"] {
      border-color: #00ff18;
      border-width: 2px;
      box-shadow: 0 0 0 2px rgba(11, 127, 171, 0.22);
    }

    .book-gallery-thumb {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 6px;
      object-fit: cover;
      user-select: none;
      -webkit-user-drag: none;
    }

    .book-purchase-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      margin-top: 8px;
      padding: 8px 12px;
      border: 1px solid var(--accent);
      border-radius: 8px;
      color: #ffffff;
      background: #F2C712 linear-gradient(-180deg, #F2C712 0%, #ED9B21 100%);
      text-decoration: none;
      font-weight: 700;
      line-height: 1.2;
    }

    .book-purchase-button:hover,
    .book-purchase-button:focus-visible {
      background: #f3e62b linear-gradient(-180deg, #e3f212 0%, #ED9B21 100%);
    }

    .menu-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      position: relative;
      z-index: 10;
      font-size: 15px;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      background: #e1e1e1;
    }

    .menu-button,
    .basemap-button,
    .layers-button,
    .section-menu-button,
    .section-button,
    .section-mode-button {
      min-height: 44px;
      border: 1px solid #c7d3cd;
      border-radius: 8px;
      color: var(--text);
      background: linear-gradient(180deg, #ffffff, #edf4f1);
      cursor: pointer;
      touch-action: manipulation;
      box-shadow: 0 1px 2px rgba(21, 32, 43, 0.08);
      transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
    }

    .menu-button,
    .basemap-button,
    .layers-button,
    .section-menu-button {
      padding: 10px 12px;
      text-align: left;
    }

    .map-view-control,
    .basemap-control,
    .section-nav {
      position: relative;
      min-width: 0;
    }

    .map-view-button,
    .basemap-button,
    .section-menu-button {
      width: 100%;
    }

    .map-view-panel {
      position: absolute;
      z-index: 20;
      bottom: calc(100% + 6px);
      left: 0;
      right: 0;
      display: none;
      gap: 6px;
      padding: 8px;
      border: 1px solid #c7d3cd;
      border-radius: 8px;
      background: var(--surface);
      box-shadow: 0 14px 28px rgba(21, 32, 43, 0.18);
    }

    .basemap-panel {
      position: absolute;
      z-index: 20;
      bottom: calc(100% + 6px);
      left: -50%;
      right: 0;
      display: none;
      gap: 6px;
      padding: 8px;
      border: 1px solid #c7d3cd;
      border-radius: 8px;
      background: var(--surface);
      box-shadow: 0 14px 28px rgba(21, 32, 43, 0.18);
    }

    .section-panel {
      position: absolute;
      z-index: 20;
      bottom: calc(100% + 6px);
      left: calc(-50% - 6px);
      right: 0;
      display: none;
      gap: 6px;
      padding: 8px;
      border: 1px solid #c7d3cd;
      border-radius: 8px;
      background: var(--surface);
      box-shadow: 0 14px 28px rgba(21, 32, 43, 0.18);
    }

    .map-view-panel.is-open,
    .basemap-panel.is-open,
    .section-panel.is-open {
      display: grid;
    }

    .map-view-option,
    .basemap-option,
    .section-option {
      min-height: 34px;
      padding: 7px 9px;
      border: 1px solid transparent;
      border-radius: 6px;
      color: var(--text);
      background: transparent;
      cursor: pointer;
      text-align: left;
      font-size: 0.88rem;
      transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
    }

    .basemap-option {
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
    }

    .basemap-option-icon {
      display: block;
      width: 32px;
      height: 32px;
      border: 1px solid rgba(21, 32, 43, 0.12);
      border-radius: 6px;
      object-fit: cover;
      background: #f7faf8;
    }

    .basemap-option-label {
      min-width: 0;
      overflow-wrap: anywhere;
      margin-left: 15px;
    }

    .map-view-option:hover,
    .map-view-option:focus-visible,
    .basemap-option:hover,
    .basemap-option:focus-visible,
    .section-option:hover,
    .section-option:focus-visible {
      border-color: #9ecab8;
      background: #f3fbf7;
      box-shadow: inset 3px 0 0 #22d398;
    }

    .basemap-option[aria-pressed="true"],
    .section-option[aria-current="true"] {
      border-color: #656565;
      color: #ffffff;
      background: #1f6f11;
    }

    .section-option:disabled,
    .section-button:disabled,
    .feature-picker-button:disabled {
      cursor: not-allowed;
      opacity: 0.5;
    }

    .section-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(38px, 1fr));
      gap: 6px;
    }

    .section-mode-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      margin-top: 6px;
    }

    .section-button,
    .section-mode-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px;
      font-weight: 700;
    }

    .menu-button:hover,
    .basemap-button:hover,
    .layers-button:hover,
    .section-menu-button:hover,
    .section-button:hover,
    .section-mode-button:hover {
      border-color: #8fb5a4;
      background: linear-gradient(180deg, #f9fffc, #dcefe7);
      box-shadow: 0 4px 10px rgba(21, 32, 43, 0.14);
      transform: translateY(-1px);
    }

    .menu-button:active,
    .basemap-button:active,
    .layers-button:active,
    .section-menu-button:active,
    .section-button:active,
    .section-mode-button:active {
      transform: translateY(0);
      box-shadow: inset 0 2px 5px rgba(21, 32, 43, 0.14);
    }

    .basemap-button[aria-expanded="true"],
    .layers-button[aria-expanded="true"],
    .map-view-button[aria-expanded="true"],
    .section-menu-button[aria-expanded="true"] {
      border-color: #1f6f11;
      color: #ffffff;
      background: linear-gradient(180deg, #249e61, #1f6f11);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px rgba(31, 111, 17, 0.2);
    }

    .menu-button:focus-visible,
    .basemap-button:focus-visible,
    .layers-button:focus-visible,
    .section-menu-button:focus-visible,
    .section-button:focus-visible,
    .section-mode-button:focus-visible {
      outline: 3px solid var(--focus);
      outline-offset: 2px;
    }

    .layers-control {
      position: relative;
      min-width: 0;
    }

    .layers-button {
      width: 100%;
    }

    .layers-panel {
      position: absolute;
      z-index: 25;
      right: 0;
      bottom: calc(100% + 6px);
      display: none;
      width: min(520px, calc(100vw - 32px));
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      max-height: min(58dvh, 480px);
      overflow-y: auto;
      box-shadow: 0 8px 20px rgba(21, 32, 43, 0.16);
    }

    .layers-panel.is-open {
      display: block;
    }

    .layer-columns,
    .layer-column {
      display: grid;
      gap: 4px;
      padding: 6px;
    }

    .layer-columns {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      background: #fafbfc;
    }

    .layer-column {
      align-content: start;
      padding: 0;
    }

    .layer-group-button {
      min-height: 34px;
      padding: 6px 8px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: var(--surface-soft);
      cursor: pointer;
      text-align: left;
      touch-action: manipulation;
      font-size: 0.86rem;
    }

    .layer-group-button[aria-pressed="true"] {
      border-color: #656565;
      color: #ffffff;
      background: #1f6f11;
    }

    .layer-dropdown-group {
      display: grid;
      gap: 4px;
      position: relative;
    }

    .layer-dropdown-panel {
      position: absolute;
      z-index: 30;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      display: none;
      gap: 4px;
      min-width: min(220px, 82vw);
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: 0 8px 20px rgba(21, 32, 43, 0.16);
    }

    .layer-dropdown-panel.is-open {
      display: grid;
    }

    .layer-dropdown-panel .layer-toggle {
      border-color: transparent;
      background: transparent;
    }

    .layer-dropdown-panel .layer-toggle:hover,
    .layer-dropdown-panel .layer-toggle:focus-within {
      background: var(--surface-soft);
    }

    .layer-subgroup {
      display: grid;
      gap: 4px;
      margin-left: 10px;
      padding-left: 8px;
      border-left: 2px solid var(--border);
    }

    .layer-subgroup-button {
      min-height: 30px;
      padding: 5px 8px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: #eef3f6;
      cursor: pointer;
      text-align: left;
      touch-action: manipulation;
      font-size: 0.8rem;
      font-weight: 700;
    }

    .layer-subgroup-button[aria-pressed="true"] {
      border-color: var(--accent);
      color: #ffffff;
      background: var(--accent);
    }

    .layer-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      min-height: 34px;
      padding: 6px 8px;
      border: 1px solid var(--border);
      border-radius: 8px;
      cursor: pointer;
    }

    .layer-symbol {
      display: inline-block;
      flex: 0 0 auto;
      width: var(--legend-symbol-width, 24px);
      height: var(--legend-symbol-height, 16px);
      position: relative;
    }

    .layer-symbol.line::before {
      content: "";
      position: absolute;
      top: 50%;
      left: 0;
      width: 100%;
      height: var(--symbol-stroke-width, 3px);
      border-radius: 999px;
      background: var(--symbol-color, var(--accent));
      transform: translateY(-50%);
    }

    .layer-symbol.line.double-line {
      display: inline-grid;
      grid-template-rows: auto auto;
      align-content: center;
      gap: var(--legend-symbol-gap, 2px);
    }

    .layer-symbol.line.double-line::before,
    .layer-symbol.line.double-line::after {
      position: static;
      width: 100%;
      transform: none;
    }

    .layer-symbol.line.double-line::after {
      content: "";
      height: var(--symbol-stroke-width2, 3px);
      border-radius: 999px;
      background: var(--symbol-color2, var(--accent-dark));
    }

    .layer-symbol.line.dashed::before {
      background: repeating-linear-gradient(
        to right,
        var(--symbol-color, var(--accent)) 0 var(--symbol-dash-length, 6px),
        transparent var(--symbol-dash-length, 6px)
          calc(var(--symbol-dash-length, 6px) + var(--symbol-dash-gap, 4px))
      );
    }

    .layer-symbol.line.dashed2::after {
      background: repeating-linear-gradient(
        to right,
        var(--symbol-color2, var(--accent-dark)) 0 var(--symbol-dash-length2, 6px),
        transparent var(--symbol-dash-length2, 6px)
          calc(var(--symbol-dash-length2, 6px) + var(--symbol-dash-gap2, 4px))
      );
    }

    .layer-symbol.point::before,
    .layer-symbol.symbol::before {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: var(--legend-mark-size, 10px);
      height: var(--legend-mark-size, 10px);
      border: var(--symbol-stroke-width, 2px) solid var(--symbol-stroke, #ffffff);
      border-radius: var(--legend-mark-radius, 999px);
      background: var(--symbol-color, var(--accent));
      box-shadow: 0 0 0 1px rgba(21, 32, 43, 0.35);
      transform: translate(-50%, -50%);
    }

    .layer-symbol.point.double-color,
    .layer-symbol.symbol.double-color {
      display: inline-grid;
      grid-template-columns: auto auto;
      place-content: center;
      align-items: center;
      gap: var(--legend-symbol-gap, 2px);
    }

    .layer-symbol.point.double-color::before,
    .layer-symbol.symbol.double-color::before,
    .layer-symbol.point.double-color::after,
    .layer-symbol.symbol.double-color::after {
      position: static;
      transform: none;
      box-sizing: border-box;
    }

    .layer-symbol.point.double-color::before,
    .layer-symbol.symbol.double-color::before {
      width: var(--legend-mark-size, 8px);
      height: var(--legend-mark-size, 8px);
      z-index: 2;
    }

    .layer-symbol.point.double-color::after,
    .layer-symbol.symbol.double-color::after {
      content: "";
      width: var(--legend-mark-size2, var(--legend-mark-size, 8px));
      height: var(--legend-mark-size2, var(--legend-mark-size, 8px));
      border: var(--symbol-stroke-width2, 2px) solid var(--symbol-stroke2, #ffffff);
      border-radius: var(--legend-mark-radius2, 999px);
      background: var(--symbol-color2, var(--accent-dark));
      box-shadow: 0 0 0 1px rgba(21, 32, 43, 0.35);
    }

    .layer-symbol.icon::before {
      content: "";
      position: absolute;
      top: 2px;
      left: 6px;
      width: 12px;
      height: 12px;
      border-radius: 3px 3px 8px 8px;
      background: var(--symbol-color, var(--accent));
      transform: rotate(45deg);
    }

    .layer-symbol.has-icon::before {
      display: none;
    }

    .layer-symbol-icon {
      display: block;
      width: var(--legend-icon-width, 18px);
      height: var(--legend-icon-height, 18px);
      margin: auto;
      object-fit: contain;
    }

    .layer-symbol.fill::before {
      content: "";
      position: absolute;
      inset: 2px;
      border: 2px solid var(--symbol-color, var(--accent));
      border-radius: 3px;
      background: color-mix(in srgb, var(--symbol-color, var(--accent)) 22%, transparent);
    }

    .layer-toggle:hover {
      background: var(--surface-soft);
    }

    .layer-toggle input {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      order: 3;
      margin-left: auto;
      accent-color: #82868d;
    }

    .layer-toggle .layer-symbol {
      order: 1;
    }

    .layer-toggle span {
      min-width: 0;
      overflow-wrap: anywhere;
      font-size: 0.84rem;
      line-height: 1.25;
    }

    .layer-label {
      display: grid;
      gap: 1px;
      flex: 1 1 auto;
      min-width: 0;
      order: 2;
    }

    #layersPanel .layer-credit {
      color: var(--muted);
      font-size: 0.65rem;
      line-height: 1.15;
    }

    .section-button[aria-current="true"] {
      border-color: #1f6f11;
      color: #ffffff;
      background: linear-gradient(180deg, #249e61, #1f6f11);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px rgba(31, 111, 17, 0.2);
    }

    .section-mode-button[aria-pressed="true"] {
      border-color: #1f6f11;
      color: #ffffff;
      background: linear-gradient(180deg, #249e61, #1f6f11);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }

    .feature-info {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      background: 
        linear-gradient(rgb(255 255 255), rgba(255, 255, 255, 0.82)),
        url("icons/shaded_relief.png");
      background-size: auto;
      background-repeat: no-repeat;
      background-position: top;
      border: 2px solid;
      border-radius: 6px;
      border-color: #ffffff;
    }

    .empty-state {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .menu-feature h2,
    .popup-content h3 {
      margin: 0 0 10px;
      line-height: 1.25;
      margin-bottom: 20px;
      background: #ffffff;
      border: #f7f7f7;
      text-align: center;
      border-style: double;
    }

    .menu-feature h2 {
      font-size: 1.2rem;
    }

    .popup-content h3 {
      font-size: 1rem;
    }

    .details-list .feature-category {
      display: inline-block;
      margin: 0;
      padding: 4px 8px;
      border-radius: 999px;
      color: var(--accent-dark);
      background: #dff3f8;
      font-size: 0.82rem;
      font-weight: 700;
    }

    .waypoint-photo {
      margin: 0 0 14px;
    }

    .waypoint-photo img {
      display: block;
      width: 100%;
      max-height: min(320px, 36dvh);
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface-soft);
      object-fit: contain;
    }

    .details-list {
      display: grid;
      grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
      gap: 8px 12px;
      margin: 0;
      font-size: 0.94rem;
      line-height: 1.45;
    }

    .details-list dt {
      color: var(--muted);
      font-weight: 700;
    }

    .details-list dd {
      min-width: 0;
      margin: 0;
      overflow-wrap: anywhere;
    }

    .details-list .temporary-closure-status {
      color: #9b1c1c;
      font-weight: 700;
    }

    .details-list a {
      color: var(--accent-dark);
      font-weight: 700;
    }

    .details-list .website-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      padding: 7px 10px;
      border: 1px solid #456b30;
      border-radius: 8px;
      color: #ffffff;
      background: #0a9522;
      text-decoration: none;
      font-size: 0.88rem;
      line-height: 1.2;
    }

    .details-list .website-button:hover,
    .details-list .website-button:focus-visible {
      background: #107100;
    }

    .raw-properties {
      margin-top: 16px;
    }

    .raw-properties summary {
      cursor: pointer;
      color: var(--muted);
      font-weight: 700;
    }

    .raw-properties pre {
      max-height: 260px;
      overflow: auto;
      margin: 10px 0 0;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface-soft);
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      font-size: 0.78rem;
    }

    .mapboxgl-popup-content {
      max-width: min(320px, 82vw);
      padding: 14px;
      border-radius: 8px;
      max-height: 40vh;
      overflow: auto;
    }

    .mapboxgl-popup-content .details-list {
      grid-template-columns: minmax(86px, 36%) minmax(0, 1fr);
      font-size: 0.86rem;
    }

    .feature-picker {
      display: grid;
      gap: 6px;
      min-width: 180px;
      max-width: min(260px, 78vw);
    }

    .feature-picker-title {
      margin: 0;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 700;
      line-height: 1.25;
    }

    .feature-picker-button {
      width: 100%;
      min-height: 36px;
      padding: 7px 9px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: var(--surface-soft);
      cursor: pointer;
      text-align: left;
      font-size: 0.86rem;
      line-height: 1.25;
    }

    .feature-picker-button:hover,
    .feature-picker-button:focus-visible {
      background: #e8edf1;
    }

    .elevation-panel {
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
    }

    .elevation-panel h3 {
      margin: 0 0 8px;
      font-size: 1rem;
    }

    .elevation-chart-wrap {
      position: relative;
      height: 190px;
      min-height: 190px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fbfcfd;
      overflow: hidden;
    }

    .elevation-chart-wrap canvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    .elevation-note {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 0.84rem;
      line-height: 1.4;
    }

    .elevation-loading {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .elevation-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 999px;
      animation: spin 0.8s linear infinite;
    }

    .interaction-lock {
      position: fixed;
      z-index: 10000;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 20px;
      cursor: wait;
      background: rgba(21, 32, 43, 0.36);
      backdrop-filter: blur(1px);
    }

    .interaction-lock[hidden] {
      display: none;
    }

    .interaction-lock-message {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      max-width: min(420px, 90vw);
      padding: 14px 18px;
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      background: var(--surface);
      box-shadow: 0 8px 28px rgba(21, 32, 43, 0.24);
      font-weight: 700;
      line-height: 1.35;
    }

    .map-status {
      position: fixed;
      z-index: 9000;
      top: 12px;
      left: 12px;
      max-width: min(420px, calc(100vw - 24px));
      padding: 10px 12px;
      border: 1px solid #8fb5a4;
      border-radius: 8px;
      color: var(--text);
      background: var(--surface);
      box-shadow: 0 6px 18px rgba(21, 32, 43, 0.2);
      font-size: 0.9rem;
      font-weight: 700;
      line-height: 1.35;
    }

    .map-status.is-error {
      border-color: #b42318;
      color: #7a271a;
      background: #fff4f2;
    }

    .map-status[hidden] {
      display: none;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    @media (max-width: 1100px) {
      .layer-columns {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 900px) {
      .app {
        flex-direction: column;
      }

      #map {
        width: 100%;
        height: 52dvh;
      }

      #menu {
        width: 100%;
        min-width: 0;
        height: 48dvh;
        overflow: visible;
        border-top: 1px solid var(--border);
        border-left: 0;
      }

      .menu-tabs,
      .menu-actions,
      .feature-info {
        padding: 8px 10px;
      }

      .menu-header {
        display: none;
      }

      .menu-tabs {
        gap: 4px;
        padding: 6px 10px;
      }

      .menu-tab {
        min-height: 30px;
        font-size: 0.82rem;
        overflow-x: hidden;
      }

      .menu-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
      }

      .menu-button,
      .basemap-button,
      .layers-button,
      .section-menu-button {
        min-height: 36px;
        padding: 5px 4px;
        text-align: center;
        font-size: 0.8rem;
        line-height: 1.15;
      }

      .feature-info {
        padding-top: 10px;
      }

      .map-view-panel,
      .section-panel,
      .basemap-panel,
      .layers-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(44px + env(safe-area-inset-bottom));
        width: auto;
        min-width: 0;
        max-height: min(42dvh, 360px);
        overflow-y: auto;
      }

      .layer-columns {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 420px) {
      .layer-columns {
        grid-template-columns: 1fr;
      }

      .section-grid {
        grid-template-columns: repeat(4, minmax(44px, 1fr));
      }

      .menu-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 3px;
        padding: 3px 4px calc(3px + env(safe-area-inset-bottom));
      }

      .menu-button,
      .basemap-button,
      .layers-button,
      .section-menu-button {
        min-height: 34px;
        padding: 4px 2px;
        font-size: 0.75rem;
        overflow-x: hidden;
      }

      .details-list {
        grid-template-columns: 1fr;
        gap: 3px;
      }
    }

