
  #controls {
    line-height: 1.2;
  }
  #tooltip {
    position: fixed;
    display: none;
    pointer-events: none;
    z-index: 20;
    background: #fff;
    color: #111;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 200px;
    white-space: pre-line;
  }
  #tooltip b {
    font-size: 1.2em;
  }
  #dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 30;
  }
  #dialog {
    background: #fff;
    border-radius: 12px;
    max-width: 400px;
    padding: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
    position: relative;
    animation: pop 0.25s ease;
  }

  #dialog a {
    text-align: center;
    flex-grow: 1;
  }
  #dialog h2 {
    margin: 0 0 8px 0;
    color: #222;
  }
  #dialog .desc {
    margin-top: 10px;
    color: #333;
  }
  #dialog .images {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    margin-top: 10px;
  }
  #dialog .images img {
    border-radius: 6px;
    height: 120px;
    flex: 0 0 auto;
    cursor: grab;
  }
  #dialog button.close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
  }
  #dialog .actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  #dialog a {
    background: #0b57d0;
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s;
  }
  #dialog a:hover {
    background: #0847b0;
  }
  @keyframes pop {
    from {
      transform: scale(0.9);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }
  #map {
    height: calc(100vh - 100px);
    padding: 10px;
    overflow: visible;
    max-width: 100vw;
  }
  #map-wrapper {
    overflow: visible;
    max-width: fit-content;
  }
  .country-boundary {
    fill: #fff;
    stroke: #333;
    stroke-width: 0.3;
    vector-effect: non-scaling-stroke;
    filter: url(#shadow);
  }
  .rail {
    stroke: #d0021b;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    transition: stroke-opacity 0.25s ease;
  }
  .link-line {
    stroke: #333;
    stroke-dasharray: 3, 6;
    stroke-width: 2;
    opacity: 0.5;
    vector-effect: non-scaling-stroke;
  }
  .stop-rect {
    fill: #008000;
    stroke: #fff;
    stroke-width: 0.04;
    shape-rendering: crispEdges;
    vector-effect: non-scaling-stroke;
  }
  .pousada-circle {
    fill: #000;
    stroke: #fff;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
    filter: url(#shadow);
    cursor: pointer;
  }
