body, html {
    height: 100%;
    margin: 0;
  }
  body {
    font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  }
  #map {
    height: 100%;
  }
  .page-title {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 1000;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  .custom-popup .maplibregl-popup-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 7px;
    padding-right: 9px;
    padding-left: 9px;
    padding-top: 3px;
    padding-bottom: 3px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
  }
  .control-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    padding: 7px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
  }
  .control-section + .control-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(38, 50, 56, 0.18);
  }
  .control-section-title {
    margin: 0 0 8px;
    padding: 0 4px;
    color: #31424a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
  }
  .control-button-group {
    position: relative;
    margin-bottom: 5px;
  }
  .menu-help-bubble {
    position: absolute;
    top: 0;
    right: calc(100% + 14px);
    width: 280px;
    padding: 14px 16px;
    background: rgba(38, 50, 56, 0.94);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    line-height: 1.6;
  }
  .menu-help-bubble::after {
    content: "";
    position: absolute;
    top: 22px;
    left: 100%;
    border-width: 10px 0 10px 12px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(38, 50, 56, 0.94);
  }
  .menu-help-bubble {
    font-size: 13px;
  }
  .control-button-group:hover .menu-help-bubble,
  .control-button-group:focus-within .menu-help-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
  .control-panel button {
    display: block;
    width: 100%;
    background: transparent;
    border: 2px solid transparent;
    padding: 10px;
    cursor: pointer;
    transition: border 0.3s;
  }
  .control-panel button.selected {
    border: 2px solid blue; /* ここを赤から青に変更 */
    border-radius: 5px;
  }
  .control-panel button:disabled {
    background: #ccc;
    cursor: not-allowed;
  }
  .help-guide {
    position: absolute;
    left: 12px;
    right: 190px;
    bottom: 12px;
    z-index: 1000;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    backdrop-filter: blur(3px);
  }
  .help-guide p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
  }
  .help-guide p + p {
    margin-top: 8px;
  }
  .osm-credit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
  }
  @media (max-width: 900px) {
    .page-title {
      max-width: calc(100% - 220px);
      font-size: 20px;
    }
    .help-guide {
      right: 12px;
      bottom: 52px;
    }
    .menu-help-bubble {
      width: 240px;
    }
  }

  @media (max-width: 640px) {
    .page-title {
      top: 8px;
      left: 8px;
      right: 8px;
      max-width: none;
      padding: 10px 14px;
      font-size: 18px;
      text-align: center;
    }
    .control-panel {
      top: 62px;
      right: 8px;
      left: 8px;
    }
    .menu-help-bubble {
      top: calc(100% + 10px);
      right: 0;
      width: auto;
    }
    .menu-help-bubble::after {
      top: -12px;
      left: auto;
      right: 22px;
      border-width: 0 10px 12px 10px;
      border-color: transparent transparent rgba(38, 50, 56, 0.94) transparent;
    }
    .help-guide {
      left: 8px;
      right: 8px;
      bottom: 56px;
      padding: 12px 14px;
    }
    .help-guide p {
      font-size: 13px;
    }
    .osm-credit {
      left: 8px;
      right: 8px;
      bottom: 8px;
      text-align: center;
    }
  }
  
