    :root {
      /* 3D Train Sacle */
      --train-3d-scale-zoom-10: 80;
      --train-3d-scale-zoom-11: 60;
      --train-3d-scale-zoom-12: 45;
      --train-3d-scale-zoom-13: 34;
      --train-3d-scale-zoom-14: 30;
      --train-3d-scale-zoom-15: 24;
      --train-3d-scale-zoom-16: 18;
      --train-3d-scale-zoom-17: 15;
      --train-3d-scale-zoom-18: 14;
      --train-3d-scale-zoom-19: 12;
      --train-3d-scale-zoom-20: 9;

      /* 3D Bus Scale */
      --bus-3d-scale-zoom-10: 80;
      --bus-3d-scale-zoom-11: 60;
      --bus-3d-scale-zoom-12: 45;
      --bus-3d-scale-zoom-13: 32;
      --bus-3d-scale-zoom-14: 30;
      --bus-3d-scale-zoom-15: 23;
      --bus-3d-scale-zoom-16: 16;
      --bus-3d-scale-zoom-17: 14;
      --bus-3d-scale-zoom-18: 14;
      --bus-3d-scale-zoom-19: 12;
      --bus-3d-scale-zoom-20: 9;

      /* 2D Train Sacle (in meters) */
      --train-2d-size-zoom-10: 600;
      --train-2d-size-zoom-11: 450;
      --train-2d-size-zoom-12: 350;
      --train-2d-size-zoom-13: 270;
      --train-2d-size-zoom-14: 230;
      --train-2d-size-zoom-15: 180;
      --train-2d-size-zoom-16: 120;
      --train-2d-size-zoom-17: 100;
      --train-2d-size-zoom-18: 80;
      --train-2d-size-zoom-19: 60;
      --train-2d-size-zoom-20: 45;

      /* 2D Bus Scale (in meters) */
      --bus-2d-size-zoom-10: 580;
      --bus-2d-size-zoom-11: 440;
      --bus-2d-size-zoom-12: 340;
      --bus-2d-size-zoom-13: 260;
      --bus-2d-size-zoom-14: 220;
      --bus-2d-size-zoom-15: 170;
      --bus-2d-size-zoom-16: 110;
      --bus-2d-size-zoom-17: 100;
      --bus-2d-size-zoom-18: 80;
      --bus-2d-size-zoom-19: 60;
      --bus-2d-size-zoom-20: 45;

      /* Railway line width (by zoom level*/
      --railroad-line-width-zoom-10: 1;
      --railroad-line-width-zoom-11: 2;
      --railroad-line-width-zoom-12: 3;
      --railroad-line-width-zoom-13: 4;
      --railroad-line-width-zoom-14: 5;
      --railroad-line-width-zoom-15: 5;
      --railroad-line-width-zoom-16: 5;
      --railroad-line-width-zoom-17: 5;
      --railroad-line-width-zoom-18: 5;
      --railroad-line-width-zoom-19: 5;
      --railroad-line-width-zoom-20: 5;

      /* Bus route width (by zoom level) */
      --bus-route-line-width-zoom-10: 1;
      --bus-route-line-width-zoom-11: 2;
      --bus-route-line-width-zoom-12: 2;
      --bus-route-line-width-zoom-13: 3;
      --bus-route-line-width-zoom-14: 4;
      --bus-route-line-width-zoom-15: 4;
      --bus-route-line-width-zoom-16: 4;
      --bus-route-line-width-zoom-17: 4;
      --bus-route-line-width-zoom-18: 4;
      --bus-route-line-width-zoom-19: 4;
      --bus-route-line-width-zoom-20: 4;

      /* Station circle size (by zoom level) */
      --station-circle-radius-zoom-10: 3;
      --station-circle-radius-zoom-11: 5;
      --station-circle-radius-zoom-12: 8;
      --station-circle-radius-zoom-13: 12;
      --station-circle-radius-zoom-14: 20;
      --station-circle-radius-zoom-15: 30;
      --station-circle-radius-zoom-16: 34;
      --station-circle-radius-zoom-17: 75;
      --station-circle-radius-zoom-18: 95;
      --station-circle-radius-zoom-19: 125;
      --station-circle-radius-zoom-20: 150;

      /* Station circle border width (by zoom level) */
      --station-circle-stroke-zoom-10: 1;
      --station-circle-stroke-zoom-11: 1;
      --station-circle-stroke-zoom-12: 1;
      --station-circle-stroke-zoom-13: 2;
      --station-circle-stroke-zoom-14: 2;
      --station-circle-stroke-zoom-15: 2;
      --station-circle-stroke-zoom-16: 2;
      --station-circle-stroke-zoom-17: 2;
      --station-circle-stroke-zoom-18: 2;
      --station-circle-stroke-zoom-19: 2;
      --station-circle-stroke-zoom-20: 2;

      /* Bus stop circle size (by zoom level) */
      --bus-stop-circle-radius-zoom-10: 3;
      --bus-stop-circle-radius-zoom-11: 5;
      --bus-stop-circle-radius-zoom-12: 8;
      --bus-stop-circle-radius-zoom-13: 12;
      --bus-stop-circle-radius-zoom-14: 20;
      --bus-stop-circle-radius-zoom-15: 30;
      --bus-stop-circle-radius-zoom-16: 34;
      --bus-stop-circle-radius-zoom-17: 75;
      --bus-stop-circle-radius-zoom-18: 95;
      --bus-stop-circle-radius-zoom-19: 125;
      --bus-stop-circle-radius-zoom-20: 150;

      /* Bus stop circle border width (by zoom level) */
      --bus-stop-circle-stroke-zoom-10: 1;
      --bus-stop-circle-stroke-zoom-11: 1;
      --bus-stop-circle-stroke-zoom-12: 1;
      --bus-stop-circle-stroke-zoom-13: 2;
      --bus-stop-circle-stroke-zoom-14: 2;
      --bus-stop-circle-stroke-zoom-15: 2;
      --bus-stop-circle-stroke-zoom-16: 2;
      --bus-stop-circle-stroke-zoom-17: 2;
      --bus-stop-circle-stroke-zoom-18: 2;
      --bus-stop-circle-stroke-zoom-19: 2;
      --bus-stop-circle-stroke-zoom-20: 2;

      /* Portal circle size (by zoom level) */
      --portal-outer-radius-zoom-11: 10;
      --portal-outer-radius-zoom-12: 15;
      --portal-outer-radius-zoom-13: 25;
      --portal-outer-radius-zoom-14: 40;
      --portal-outer-radius-zoom-15: 55;
      --portal-outer-radius-zoom-16: 70;
      --portal-outer-radius-zoom-17: 85;
      --portal-outer-radius-zoom-18: 100;
      --portal-outer-radius-zoom-19: 100;
      --portal-outer-radius-zoom-20: 100;

      --portal-middle-radius-zoom-11: 7;
      --portal-middle-radius-zoom-12: 10;
      --portal-middle-radius-zoom-13: 17;
      --portal-middle-radius-zoom-14: 25;
      --portal-middle-radius-zoom-15: 35;
      --portal-middle-radius-zoom-16: 45;
      --portal-middle-radius-zoom-17: 52;
      --portal-middle-radius-zoom-18: 60;
      --portal-middle-radius-zoom-19: 60;
      --portal-middle-radius-zoom-20: 60;

      --portal-inner-radius-zoom-11: 4;
      --portal-inner-radius-zoom-12: 6;
      --portal-inner-radius-zoom-13: 10;
      --portal-inner-radius-zoom-14: 15;
      --portal-inner-radius-zoom-15: 22;
      --portal-inner-radius-zoom-16: 28;
      --portal-inner-radius-zoom-17: 32;
      --portal-inner-radius-zoom-18: 35;
      --portal-inner-radius-zoom-19: 35;
      --portal-inner-radius-zoom-20: 35;

      --portal-core-radius-zoom-10: 1;
      --portal-core-radius-zoom-11: 2;
      --portal-core-radius-zoom-12: 3;
      --portal-core-radius-zoom-13: 5;
      --portal-core-radius-zoom-14: 8;
      --portal-core-radius-zoom-15: 11;
      --portal-core-radius-zoom-16: 14;
      --portal-core-radius-zoom-17: 16;
      --portal-core-radius-zoom-18: 18;
      --portal-core-radius-zoom-19: 18;
      --portal-core-radius-zoom-20: 18;

      /* Minimum zoom level for train/bus display */
      --min-vehicle-zoom: 10;

      /* Font by language (default: Japanese) */
      --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    html, body {
      margin: 0;
      padding: 0;
      overflow: hidden;
      height: 100%;
      touch-action: manipulation;
      font-family: var(--font-family);
    }

    #map {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 100%;
      touch-action: auto;
    }

    /* ... (existing popup and modal styles) ... */
    .mapboxgl-popup-content {
      font-family: var(--font-family);
      padding: 0;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      max-width: 240px !important;
    }

    .mapboxgl-popup-close-button {
      font-size: 20px;
      padding: 4px;
      margin: 4px;
    }

    .custom-popup {
      color: #333;
    }

    .popup-header {
      background-color: #f7f7f7;
      padding: 12px 16px;
      border-bottom: 1px solid #eee;
      border-top-left-radius: 8px;
      border-top-right-radius: 8px;
    }

    .popup-header h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #000;
    }

    .popup-content {
      padding: 12px 16px;
      font-size: 14px;
    }

    .popup-content p {
      margin: 0 0 4px 0;
      display: flex;
      align-items: flex-start;
    }

    .popup-content p:last-child {
      margin-bottom: 0;
    }

    .color-swatch {
      width: 14px;
      height: 14px;
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      margin-right: 8px;
      flex-shrink: 0;
      margin-top: 3px;
    }

    .label {
      font-weight: 600;
      margin-right: 6px;
      color: #555;
      white-space: nowrap;
    }

    .popup-text-content {
      min-width: 0;
    }

    .popup-value {
      word-wrap: break-word;
      overflow-wrap: break-word;
      white-space: normal;
    }

    .popup-value a {
      color: #007bff;
      text-decoration: none;
    }

    .popup-value a:hover {
      text-decoration: underline;
    }

    .story-button {
      background-color: #007bff;
      color: white;
      border: none;
      padding: 8px 12px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      width: 100%;
      text-align: center;
    }

    .story-button:hover {
      background-color: #0056b3;
    }

    #loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.4);
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 1100;
      color: white;
      font-size: 1.1em;
      gap: 16px;
    }

    .loading-spinner {
      width: 40px;
      height: 40px;
      border: 4px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: loading-spin 0.8s linear infinite;
    }

    @keyframes loading-spin {
      to { transform: rotate(360deg); }
    }

    /* Language change loading overlay */
    #lang-loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.4);
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 1200;
      color: white;
      font-size: 1.1em;
      gap: 16px;
    }

    .lang-loading-spinner {
      width: 40px;
      height: 40px;
      border: 4px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: lang-spin 0.8s linear infinite;
    }

    @keyframes lang-spin {
      to { transform: rotate(360deg); }
    }

    #data-loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 999;
      color: white;
      font-size: 1.2em;
      gap: 16px;
    }

    .data-loading-spinner {
      width: 48px;
      height: 48px;
      border: 4px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: lang-spin 0.8s linear infinite;
    }

    /* Non-blocking mini loading indicator (used when moving screen) */
    #mini-loading-indicator {
      position: fixed;
      bottom: 40px;
      left: 16px;
      display: flex;
      align-items: center;
      gap: 6px;
      z-index: 800;
      font-size: 12px;
      font-weight: 600;
      pointer-events: none;
      /* Default: for day/dusk (black) */
      color: #222;
      text-shadow: 0 0 3px white, 0 0 3px white;
    }

    /* For night/dawn (white) */
    #mini-loading-indicator.dark-mode {
      color: #fff;
      text-shadow: 0 0 3px black, 0 0 3px black;
    }

    .mini-loading-spinner {
      width: 12px;
      height: 12px;
      border: 1.5px solid rgba(0, 0, 0, 0.2);
      border-top-color: #333;
      border-radius: 50%;
      animation: lang-spin 0.8s linear infinite;
    }

    #mini-loading-indicator.dark-mode .mini-loading-spinner {
      border-color: rgba(255, 255, 255, 0.3);
      border-top-color: #fff;
    }

    /* Mobile: smaller */
    @media (max-width: 768px) {
      #mini-loading-indicator {
        bottom: 32px;
        left: 12px;
        gap: 5px;
        font-size: 11px;
      }
      .mini-loading-spinner {
        width: 10px;
        height: 10px;
      }
    }

    #story-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.6);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1001;
      padding: 20px;
      box-sizing: border-box;
      transition: all 0.3s ease-in-out;
    }

    .story-modal-content {
      background-color: #f5f0e6;
      background-image: url('story_bg_tokyo.webp');
      background-size: cover;
      background-position: center bottom;
      background-repeat: no-repeat;
      border-radius: 8px;
      padding: 20px;
      max-width: 500px;
      width: 100%;
      height: 70vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      transition: all 0.3s ease-in-out;
      overflow: hidden;
    }

    #story-modal-title {
      margin: 0 0 15px 0;
      font-size: 1.5em;
      font-weight: 600;
      border-bottom: 1px solid #eee;
      padding-bottom: 10px;
      cursor: pointer;
    }

    #story-modal-body {
      overflow-y: scroll;
      flex-grow: 1;
      white-space: pre-wrap;
      line-height: 1.6;
      background: rgba(255, 255, 255, 0.5);
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
      border-radius: 6px;
      padding: 12px;
      margin: 0 -5px;
    }

    #story-modal-body::-webkit-scrollbar {
      width: 8px;
      -webkit-appearance: none;
    }

    #story-modal-body::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.25);
      border-radius: 4px;
    }

    #story-modal-body::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.05);
      border-radius: 4px;
    }

    .modal-buttons-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 20px;
      position: relative;
    }

    .modal-buttons-right {
      display: flex;
      gap: 10px;
    }

    #share-modal-btn {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
      border: none;
      padding: 10px;
      border-radius: 5px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
    }

    #share-modal-btn:hover {
      background: linear-gradient(135deg, #FF6B6B 0%, #FF9633 100%);
    }

    #share-modal-btn svg {
      flex-shrink: 0;
    }

    #minimize-modal-btn {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 1em;
      font-weight: 500;
    }

    #minimize-modal-btn:hover {
      background: linear-gradient(135deg, #FF6B6B 0%, #FF9633 100%);
    }

    #close-modal-btn {
      background-color: #8e9aaf;
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 1em;
      font-weight: 500;
    }

    #close-modal-btn:hover {
      background-color: #7a8599;
    }

    /* Minimize unavailable warning message */
    .minimize-warning {
      background-color: #ff6b6b;
      color: white;
      padding: 8px 14px;
      border-radius: 4px;
      font-size: 14px;
      white-space: nowrap;
      position: absolute;
      right: 160px;
      top: 50%;
      transform: translateY(-50%);
      animation: warningFadeIn 0.2s ease;
    }

    .minimize-warning.fade-out {
      animation: warningFadeOut 0.3s ease forwards;
    }

    /* Share unavailable warning message */
    .share-warning {
      background-color: #ff6b6b;
      color: white;
      padding: 8px 14px;
      border-radius: 4px;
      font-size: 14px;
      white-space: nowrap;
      position: absolute;
      left: 50px;
      top: 50%;
      transform: translateY(-50%);
      animation: warningFadeIn 0.2s ease;
    }

    .share-warning.fade-out {
      animation: warningFadeOut 0.3s ease forwards;
    }

    @keyframes warningFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes warningFadeOut {
      from { opacity: 1; }
      to { opacity: 0; }
    }

    /* Share success message */
    .share-success-message {
      background-color: #28a745;
      color: white;
      padding: 8px 14px;
      border-radius: 4px;
      font-size: 14px;
      white-space: nowrap;
      position: absolute;
      left: 50px;
      top: 50%;
      transform: translateY(-50%);
      animation: warningFadeIn 0.2s ease;
    }

    .share-success-message.fade-out {
      animation: warningFadeOut 0.3s ease forwards;
    }

    /* Center toast messages on mobile */
    @media (max-width: 768px) {
      .minimize-warning,
      .share-warning,
      .share-success-message {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) translateY(-50%);
      }
    }

    #story-modal.story-modal-minimized {
      top: auto;
      bottom: 10px;
      left: 10px;
      right: auto;
      width: 300px;
      height: auto;
      background-color: transparent;
      padding: 0;
      z-index: 1002;
    }

    .story-modal-content.story-modal-minimized .story-modal-content {
      height: auto;
      max-width: 300px;
      padding: 10px 15px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    #story-modal.story-modal-minimized #story-modal-title {
      margin: 0;
      padding: 0;
      border-bottom: none;
      font-size: 1.1em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #story-modal.story-modal-minimized #story-modal-body,
    #story-modal.story-modal-minimized .modal-buttons-container {
      display: none;
    }

    /* Tutorial Modal */
    #tutorial-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 2000;
      padding: 20px;
      box-sizing: border-box;
    }

    .tutorial-modal-content {
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 20px;
      padding: 28px 24px;
      max-width: 400px;
      width: 100%;
      max-height: 80vh;
      max-height: 80dvh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      position: relative;
      text-align: center;
      box-shadow: 0 10px 40px rgba(255, 123, 123, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
      animation: tutorialFadeIn 0.4s ease-out;
    }

    .tutorial-lang-selector {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 12px;
      flex-shrink: 0;
    }

    .tutorial-lang-selector.hidden {
      display: none;
    }

    .tutorial-lang-btn {
      padding: 4px 10px;
      border-radius: 14px;
      border: 1.5px solid #e0e0e0;
      background: transparent;
      color: #888;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .tutorial-lang-btn:hover {
      border-color: #FFA64D;
      color: #FFA64D;
    }

    .tutorial-lang-btn.active {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
      border-color: transparent;
    }

    .tutorial-modal-body {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
    }

    .tutorial-modal-body::-webkit-scrollbar {
      width: 8px;
      -webkit-appearance: none;
    }

    .tutorial-modal-body::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.25);
      border-radius: 4px;
    }

    .tutorial-modal-body::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.05);
      border-radius: 4px;
    }

    /* Small screen (height 650px or less) - tutorial compact mode */
    @media (max-height: 650px) {
      .tutorial-lang-selector {
        margin-bottom: 8px;
        gap: 4px;
      }
      .tutorial-lang-btn {
        padding: 3px 7px;
        font-size: 10px;
      }
      .tutorial-modal-content {
        padding: 20px 18px;
        border-radius: 16px;
      }
      #tutorial-title {
        font-size: 22px;
        margin-bottom: 4px;
      }
      #tutorial-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
      }
      .tutorial-step-indicators {
        margin-bottom: 14px;
        gap: 6px;
      }
      .step-dot {
        width: 8px;
        height: 8px;
      }
      .tutorial-step-badge {
        font-size: 11px;
        padding: 3px 10px;
        margin-bottom: 6px;
      }
      .tutorial-step-text {
        font-size: 13px;
        margin-bottom: 12px;
      }
      .tutorial-image {
        aspect-ratio: 4 / 3;
      }
      .tutorial-image-item {
        aspect-ratio: 4 / 3;
      }
      .tutorial-image-label {
        padding: 4px 3px;
        font-size: 11px;
      }
      .tutorial-nav {
        margin-top: 14px;
        gap: 8px;
      }
      #tutorial-prev-btn,
      #tutorial-skip-btn,
      #tutorial-next-btn {
        padding: 10px 16px;
        font-size: 14px;
      }
      .tutorial-final-intro {
        font-size: 13px;
        margin-bottom: 10px;
      }
      .tutorial-image.tutorial-image-final img {
        max-height: 100px;
      }
    }

    @keyframes tutorialFadeIn {
      from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
      }
      to {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }

    #tutorial-title {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      font-size: 26px;
      font-weight: 700;
      margin: 0 0 6px 0;
    }

    #tutorial-subtitle {
      color: #888;
      font-size: 15px;
      margin: 0 0 16px 0;
    }

    /* Step indicators (dots) */
    .tutorial-step-indicators {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin-bottom: 20px;
    }

    .step-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #ddd;
      transition: all 0.3s;
      cursor: pointer;
      font-size: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: 700;
      line-height: 1;
    }

    .step-dot.active {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      width: 22px;
      height: 22px;
      font-size: 11px;
      line-height: 1;
    }

    /* Slides container */
    .tutorial-slides {
      position: relative;
      min-height: 280px;
    }

    .tutorial-slides.final-step {
      min-height: auto;
    }

    .tutorial-slide {
      display: none;
      animation: slideIn 0.3s ease-out;
    }

    .tutorial-slide.active {
      display: block;
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateX(20px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .tutorial-step-badge {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
      font-size: 14px;
      font-weight: 700;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 12px auto;
    }

    .tutorial-step-text {
      color: #444;
      font-size: 14px;
      line-height: 1.6;
      margin: 0 0 16px 0;
      text-align: left;
      padding: 0 8px;
    }

    .tutorial-step-text a {
      color: #FF8C64;
      text-decoration: underline;
    }

    .tutorial-step-text a:visited {
      color: #FF8C64;
    }

    .tutorial-final-intro {
      text-align: center;
      font-size: 14px;
      color: #444;
      margin-bottom: 12px;
    }

    .tutorial-final-intro a {
      color: #FF8C64;
      text-decoration: underline;
    }

    .tutorial-final-intro a:visited {
      color: #FF8C64;
    }

    /* Mock button styles in tutorial (same structure as actual UI) */
    .tutorial-btn-mock {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 4px;
      background: #fff;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
      vertical-align: middle;
      margin: 0 2px;
    }

    .tutorial-btn-mock-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 1.5px solid #333;
      font-size: 8px;
      font-weight: 600;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      color: #333;
      line-height: 1;
    }

    .tutorial-final-text {
      text-align: center;
    }

    .tutorial-image {
      width: 100%;
      aspect-ratio: 1 / 1;  /* Square ratio */
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
      border-radius: 12px;
      border: 1px solid rgba(255, 140, 100, 0.3);
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ccc;
      font-size: 13px;
      overflow: hidden;
    }

    .tutorial-image.tutorial-image-final {
      background: transparent;
      border: none;
      aspect-ratio: unset;
      height: auto;
    }

    .tutorial-image.tutorial-image-final img {
      object-fit: contain;
      height: auto;
      max-height: 150px;
    }

    .tutorial-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 12px;
    }

    /* 2x2 image grid for Step 1 */
    .tutorial-image-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
      width: 100%;
    }

    .tutorial-image-item {
      position: relative;
      width: 100%;
      aspect-ratio: 1 / 1;  /* Square ratio */
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
      border-radius: 8px;
      border: 1px solid rgba(255, 140, 100, 0.3);
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow: hidden;
    }

    .tutorial-image-item img {
      height: 100%;
      flex: 1;
      min-height: 0;
      object-fit: cover;
      object-position: 50% 50%;
      order: 2;
    }

    .tutorial-image-label {
      order: 1;
      width: 100%;
      padding: 6px 4px;
      font-size: 13px;
      font-weight: normal;
      color: #666;
      text-align: center;
      border-bottom: 1px solid rgba(255, 140, 100, 0.3);
      box-sizing: border-box;
    }

    /* Navigation buttons */
    .tutorial-nav {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 20px;
      flex-shrink: 0;
      position: relative;
      z-index: 11;
      background-color: #ffffff;
    }

    #tutorial-prev-btn,
    #tutorial-skip-btn,
    #tutorial-next-btn {
      flex: 1;
      padding: 12px 20px;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    #tutorial-prev-btn,
    #tutorial-skip-btn {
      background: #f5f5f5;
      color: #666;
      border: 1px solid #ddd;
    }

    #tutorial-prev-btn:hover,
    #tutorial-skip-btn:hover {
      background: #eee;
    }

    #tutorial-prev-btn.hidden,
    #tutorial-skip-btn.hidden {
      display: none;
    }

    #tutorial-next-btn {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
      border: none;
      box-shadow: 0 4px 15px rgba(255, 140, 100, 0.3);
    }

    #tutorial-next-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(255, 140, 100, 0.4);
    }

    #tutorial-next-btn:active {
      transform: scale(0.98);
    }

    /* Info Popup Modal */
    #info-popup-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 2000;
      padding: 20px;
      box-sizing: border-box;
    }

    #info-popup-modal.active {
      display: flex;
    }

    .info-popup-content {
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 16px;
      padding: 0;
      max-width: 520px;
      width: 100%;
      max-height: 80vh;
      max-height: 80dvh;
      display: flex;
      flex-direction: column;
      position: relative;
      box-shadow: 0 10px 40px rgba(255, 123, 123, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
      animation: infoPopupFadeIn 0.3s ease-out;
      overflow: hidden;
    }

    @keyframes infoPopupFadeIn {
      from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
      }
      to {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }

    .info-popup-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 20px 16px 20px;
      border-bottom: 1px solid rgba(255, 140, 100, 0.15);
    }

    .info-popup-header h3 {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      font-size: 22px;
      font-weight: 700;
      margin: 0;
    }

    .info-popup-close-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: none;
      background: #f5f5f5;
      color: #666;
      font-size: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s, color 0.2s;
    }

    .info-popup-close-btn:hover {
      background: #eee;
      color: #333;
    }

    .info-popup-body {
      padding: 20px;
      flex: 1;
      min-height: 0;
      overflow-y: auto;
    }

    .info-popup-body::-webkit-scrollbar {
      width: 8px;
      -webkit-appearance: none;
    }

    .info-popup-body::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.25);
      border-radius: 4px;
    }

    .info-popup-body::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.05);
      border-radius: 4px;
    }

    /* Scroll indicator - fade gradient + bouncing chevron */
    .scroll-indicator {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 48px;
      background: linear-gradient(to bottom, transparent, #ffffff);
      pointer-events: none;
      z-index: 10;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding-bottom: 6px;
      transition: opacity 0.3s ease;
    }

    .scroll-indicator.hidden {
      opacity: 0;
    }

    .scroll-chevron {
      width: 18px;
      height: 18px;
      color: #aaa;
      animation: chevronBounce 1.5s ease-in-out infinite;
      transition: opacity 0.5s ease;
    }

    .scroll-chevron.fade-out {
      opacity: 0;
      animation: none;
    }

    @keyframes chevronBounce {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(4px); }
    }

    #info-popup-description {
      color: #555;
      font-size: 15px;
      line-height: 1.7;
      margin: 0 0 16px 0;
    }

    .info-link {
      color: #FF8C64;
      text-decoration: none;
      font-weight: 500;
      transition: color 0.2s ease;
    }

    .info-link:hover {
      color: #e67a50;
      text-decoration: underline;
    }

    .info-popup-section {
      background: rgba(255, 140, 100, 0.08);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 12px;
    }

    .info-popup-section h4 {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      font-size: 16px;
      font-weight: 600;
      margin: 0 0 10px 0;
    }

    .info-popup-section p {
      color: #555;
      font-size: 14px;
      line-height: 1.6;
      margin: 0;
    }

    .info-popup-section ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .info-popup-section li {
      color: #555;
      font-size: 14px;
      line-height: 1.6;
      padding: 6px 0;
      padding-left: 16px;
      position: relative;
      border-bottom: 1px solid rgba(255, 140, 100, 0.1);
    }

    .info-popup-section li:last-child {
      border-bottom: none;
    }

    .info-popup-section li::before {
      content: '•';
      color: #FFA64D;
      position: absolute;
      left: 0;
      font-weight: bold;
    }

    .info-popup-section li strong {
      color: #444;
    }

    .info-popup-developer p {
      margin: 4px 0;
      font-size: 14px;
    }

    .info-popup-developer a {
      color: #FF7B7B;
      text-decoration: none;
    }

    .info-popup-developer a:hover {
      text-decoration: underline;
    }

    .info-popup-disclaimer-link {
      margin-top: 12px;
      font-size: 13px;
      color: #666;
      padding-left: 1.2em;
      position: relative;
    }

    .info-popup-disclaimer-link::before {
      content: '※';
      position: absolute;
      left: 0;
      color: #FF7B7B;
    }

    .info-popup-disclaimer-link a {
      color: #FF7B7B;
      text-decoration: none;
    }

    .info-popup-disclaimer-link a:hover {
      text-decoration: underline;
    }

    /* Info & Help Button Icons */
    .info-btn-icon,
    .help-btn-icon {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 22px;
      height: 22px;
      border: 2px solid #333;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: bold;
      color: #333;
      font-family: serif;
      line-height: 1;
    }

    /* Help button question mark only - more natural with sans-serif */
    .help-btn-icon {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-weight: 600;
    }

    /* Story Settings Modal */
    #story-settings-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1100;
      padding: 20px;
      box-sizing: border-box;
    }

    .story-settings-content {
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 12px;
      max-width: 400px;
      width: 100%;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
      overflow: hidden;
    }

    .story-settings-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      border-bottom: 1px solid rgba(255, 140, 100, 0.15);
    }

    .story-settings-header h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .story-settings-close-btn {
      background: none;
      border: none;
      font-size: 24px;
      color: #999;
      cursor: pointer;
      padding: 0;
      line-height: 1;
    }

    .story-settings-close-btn:hover {
      color: #333;
    }

    .story-settings-body {
      padding: 20px;
      overflow-y: auto;
    }

    .story-settings-body::-webkit-scrollbar {
      width: 8px;
      -webkit-appearance: none;
    }

    .story-settings-body::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.25);
      border-radius: 4px;
    }

    .story-settings-body::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.05);
      border-radius: 4px;
    }

    .story-settings-description {
      font-size: 14px;
      color: #555;
      line-height: 1.6;
      margin: 0;
      padding: 12px 16px;
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.08) 0%, rgba(255, 166, 77, 0.08) 100%);
      border-radius: 8px;
      border: 1px solid rgba(255, 140, 100, 0.1);
    }

    .story-mode-section {
      margin-top: 20px;
    }

    .story-mode-label {
      font-size: 14px;
      font-weight: 600;
      color: #333;
      margin: 0 0 12px 0;
    }

    .story-mode-options {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .story-mode-option {
      cursor: pointer;
    }

    .story-mode-option input[type="radio"] {
      display: none;
    }

    .story-mode-card {
      display: flex;
      flex-direction: column;
      padding: 12px 16px;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      transition: all 0.2s ease;
    }

    .story-mode-option input[type="radio"]:checked + .story-mode-card {
      border-color: #FFA64D;
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
    }

    .story-mode-card:hover {
      border-color: rgba(255, 140, 100, 0.5);
    }

    .story-mode-option input[type="radio"]:checked + .story-mode-card:hover {
      border-color: #FF7B7B;
    }

    .story-mode-name {
      font-size: 14px;
      font-weight: 600;
      color: #333;
    }

    .story-mode-desc {
      font-size: 12px;
      color: #666;
      margin-top: 4px;
    }

    /* Radius selector */
    .story-radius-section {
      margin-top: 20px;
    }

    .story-radius-options {
      display: flex;
      gap: 10px;
    }

    .story-radius-option {
      flex: 1;
      cursor: pointer;
    }

    .story-radius-option input[type="radio"] {
      display: none;
    }

    .story-radius-btn {
      display: block;
      text-align: center;
      padding: 10px 0;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      color: #333;
      transition: all 0.2s ease;
    }

    .story-radius-option input[type="radio"]:checked + .story-radius-btn {
      border-color: #FFA64D;
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
      color: #FF7B7B;
    }

    .story-radius-btn:hover {
      border-color: rgba(255, 140, 100, 0.5);
    }

    .story-radius-option input[type="radio"]:checked + .story-radius-btn:hover {
      border-color: #FF7B7B;
    }

    /* Add popup styles */
    .train-popup .mapboxgl-popup-content {
      padding: 0;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }

    .train-popup-inner {
      padding: 10px;
      font-family: var(--font-family);
      font-size: 14px;
      color: #333;
    }

    .train-popup-inner h4 {
      margin: 0 0 8px 0;
      font-size: 16px;
      font-weight: 600;
      color: #000;
    }

    .train-popup-inner p {
      margin: 0 0 4px 0;
    }

    .train-popup-inner p:last-child {
      margin-bottom: 0;
    }

    /* Combined search+clock+language control button styles */
    .mapboxgl-ctrl-search,
    .mapboxgl-ctrl-clock,
    .mapboxgl-ctrl-lang {
      width: 29px;
      height: 29px;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      background: white;
      border: none;
      cursor: pointer;
      padding: 0 !important;
      color: #333 !important;  /* Prevent iOS Safari blue color */
      -webkit-text-fill-color: #333 !important;  /* iOS Safari */
    }

    .mapboxgl-ctrl-search svg {
      width: 20px;
      height: 20px;
      fill: #333 !important;
      display: block;
    }

    .mapboxgl-ctrl-clock svg {
      width: 20px;
      height: 20px;
      stroke: #333;
      display: block;
    }

    .mapboxgl-ctrl-lang {
      font-size: 10px;
      line-height: 1.1;
    }

    .lang-icon {
      font-size: 10px;
      line-height: 1.1;
      color: #333;
    }

    /* Time control popup styles */
    .time-controls-popup {
      position: absolute;
      top: 10px;
      left: 59px;
      z-index: 100;
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 4px;
      border: 1px solid rgba(255, 140, 100, 0.2);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      font-family: var(--font-family);
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      width: auto;
      max-width: 95vw;
      box-sizing: border-box;
    }

    .time-controls-popup.hidden {
      display: none;
    }

    .time-controls-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
    }

    #play-pause-btn {
      font-size: 14px;
      font-weight: normal;
      padding: 8px 12px;
      border: none;
      border-radius: 5px;
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
      cursor: pointer;
      min-width: 60px;
    }

    #play-pause-btn:hover {
      background: linear-gradient(135deg, #FF6B6B 0%, #FF9633 100%);
    }

    #date-holiday-display {
      font-size: 15px;
      font-weight: 600;
      padding: 5px 12px;
      border-radius: 4px;
      background: #f0f0f0;
      white-space: normal;
      word-break: keep-all;
      overflow-wrap: break-word;
      text-align: center;
      margin: 6px 0;
      max-width: 100%;
      box-sizing: border-box;
    }

    #date-holiday-display.holiday {
      background: #ffe0e0;
      color: #c0392b;
    }

    #date-holiday-display.weekday {
      background: #e0f0e0;
      color: #27ae60;
    }

    #time-display {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      background-color: #eee;
      padding: 8px 10px;
      border-radius: 5px;
      min-width: 70px;
      text-align: center;
    }

    /* Analog clock styles */
    .analog-clock-container {
      width: 120px;
      height: 120px;
      margin: 8px auto;
    }

    #analog-clock {
      width: 100%;
      height: 100%;
    }

    /* Scroll time picker styles */
    .time-picker-container {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-top: 8px;
    }

    .time-picker-column {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }

    .time-picker-arrow {
      width: 32px;
      height: 24px;
      border: none;
      background: #f0f0f0;
      cursor: pointer;
      font-size: 12px;
      color: #666;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
    }

    .time-picker-arrow:hover {
      background: #ddd;
    }

    .time-picker-arrow:active {
      background: #ccc;
    }

    .time-picker-value {
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 600;
      color: #333;
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 4px;
    }

    .time-picker-separator {
      font-size: 20px;
      font-weight: 600;
      color: #333;
      margin: 0 2px;
      align-self: center;
    }

    #set-time-btn {
      padding: 8px 12px;
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-weight: normal;
      font-size: 13px;
      margin-left: 8px;
      align-self: center;
    }

    #set-time-btn:hover {
      background: linear-gradient(135deg, #FF6B6B 0%, #FF9633 100%);
    }

    /* Railroad Offset & Zoom Display */
    #railroad-offset-label {
      position: fixed;
      bottom: 10px;
      left: 10px;
      background: rgba(0,0,0,0.7);
      color: #fff;
      padding: 5px 10px;
      border-radius: 4px;
      font-family: monospace;
      font-size: 12px;
      z-index: 1000;
      cursor: pointer;
      display: none; /* Hidden by default - show with L in console */
    }

    #zoom-level-display {
      position: fixed;
      bottom: 10px;
      right: 10px;
      background: rgba(0,0,0,0.7);
      color: #fff;
      padding: 5px 10px;
      border-radius: 4px;
      font-family: monospace;
      font-size: 12px;
      z-index: 1000;
      display: none; /* Hidden by default - show with L in console */
    }

    /* Mobile responsive (480px or less) */
    @media (max-width: 480px) {
      .time-controls-popup {
        top: 10px;
        left: 59px;
        padding: 6px;
        gap: 4px;
        max-width: calc(100vw - 69px);
      }

      .lang-popup {
        top: 10px;
        left: 59px;
      }

      .country-popup {
        top: 10px;
        left: 59px;
      }

      .minimized-stories-popup {
        top: 10px;
        left: 59px;
      }

      .search-popup {
        top: 10px;
        left: 59px;
        width: calc(100vw - 69px);
      }

      .time-controls-row {
        gap: 4px;
      }

      #play-pause-btn {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 45px;
      }

      #time-display {
        font-size: 13px;
        padding: 5px 6px;
        min-width: 55px;
      }

      .analog-clock-container {
        width: 80px;
        height: 80px;
        margin: 4px auto;
      }

      .time-picker-container {
        gap: 2px;
        margin-top: 4px;
      }

      .time-picker-arrow {
        width: 26px;
        height: 20px;
        font-size: 10px;
      }

      .time-picker-value {
        width: 26px;
        height: 26px;
        font-size: 14px;
      }

      .time-picker-separator {
        font-size: 16px;
      }

      #set-time-btn {
        padding: 5px 8px;
        font-size: 11px;
        margin-left: 4px;
      }

      /* Railroad Offset & Zoom stay at bottom (don't overlap with time UI) */
      #railroad-offset-label {
        font-size: 10px;
        padding: 3px 6px;
      }

      #zoom-level-display {
        font-size: 10px;
        padding: 3px 6px;
      }

      /* Info & Help button icons - mobile */
      .info-btn-icon,
      .help-btn-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
        border-width: 1.5px;
        line-height: 1;
      }
    }

    /* Tablet responsive (481px ~ 768px) */
    @media (min-width: 481px) and (max-width: 768px) {
      .time-controls-popup {
        top: 10px;
        left: 59px;
      }

      .lang-popup {
        top: 10px;
        left: 59px;
      }

      .country-popup {
        top: 10px;
        left: 59px;
      }

      .minimized-stories-popup {
        top: 10px;
        left: 59px;
      }

      .search-popup {
        top: 10px;
        left: 59px;
      }
    }

    /* Train Bottom Sheet UI */
    #train-bottom-sheet-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: transparent;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.3s ease, visibility 0.3s ease;
      z-index: 999;
    }

    #train-bottom-sheet-overlay.active {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    #train-bottom-sheet {
      position: fixed;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%) translateY(100%);
      width: 100%;
      max-width: 600px;
      max-height: 70vh;
      display: flex;
      flex-direction: column;
      background-color: white;
      border-top-left-radius: 20px;
      border-top-right-radius: 20px;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
      z-index: 1000;
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      font-family: var(--font-family);
    }

    #train-bottom-sheet.active {
      transform: translateX(-50%) translateY(0);
    }

    .bottom-sheet-handle {
      width: 40px;
      height: 4px;
      background-color: #ddd;
      border-radius: 2px;
      margin: 12px auto 8px auto;
      cursor: pointer;
    }

    .bottom-sheet-content {
      padding: 0 20px 20px 20px;
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    .bus-routes-scroll-container {
      overflow-y: auto;
      min-height: 0;
      -webkit-overflow-scrolling: touch;
    }

    .bus-routes-scroll-container::-webkit-scrollbar {
      width: 8px;
      -webkit-appearance: none;
    }

    .bus-routes-scroll-container::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.25);
      border-radius: 4px;
    }

    .bus-routes-scroll-container::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.05);
      border-radius: 4px;
    }

    .bottom-sheet-close-btn {
      position: absolute;
      top: 0;
      right: 20px;
      background: none;
      border: none;
      font-size: 32px;
      color: #999;
      cursor: pointer;
      padding: 0;
      width: 32px;
      height: 32px;
      line-height: 32px;
      text-align: center;
      transition: color 0.2s;
    }

    .bottom-sheet-close-btn:hover {
      color: #333;
    }

    /* Train schedule notice toast */
    .train-schedule-notice {
      position: fixed;
      top: 10px;
      left: 50%;
      transform: translateX(-50%);
      background: #FFF6F3;
      color: #333;
      padding: 10px;
      border-radius: 8px;
      font-size: 15px;
      z-index: 90;
      pointer-events: none;
      opacity: 0;
      animation: noticeIn 0.4s ease forwards, noticeOut 0.6s ease 3.5s forwards;
      width: calc(100% - 140px);
      max-width: 480px;
      text-align: center;
      line-height: 1.4;
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border: 1px solid rgba(255, 140, 100, 0.5);
      box-shadow: 0 0 10px rgba(255, 123, 123, 0.6), 0 0 25px rgba(255, 166, 77, 0.4), 0 0 50px rgba(255, 140, 100, 0.2);
    }

    @keyframes noticeIn {
      from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
      to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    @keyframes noticeOut {
      from { opacity: 1; transform: translateX(-50%) translateY(0); }
      to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    }

    /* Persistent toast (10th click) - no auto fade-out */
    .train-schedule-notice.train-notice-persistent {
      animation: noticeIn 0.4s ease forwards;
      pointer-events: auto;
    }

    .train-schedule-notice.train-notice-persistent .train-notice-message {
      margin-bottom: 10px;
    }

    .train-notice-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .train-notice-check-label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 15px;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
    }

    .train-notice-checkbox {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      margin: 0;
      cursor: pointer;
      border: 1px solid #FF8C64;
      border-radius: 3px;
      background: transparent;
      position: relative;
      flex-shrink: 0;
    }

    .train-notice-checkbox:checked {
      background: #FF8C64;
    }

    .train-notice-checkbox:checked::after {
      content: '';
      position: absolute;
      left: 50%;
      top: 45%;
      width: 4px;
      height: 8px;
      transform: translate(-50%, -50%) rotate(45deg);
      border: solid #fff;
      border-width: 0 2px 2px 0;
    }

    .train-notice-confirm-btn {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: #fff;
      border: none;
      border-radius: 5px;
      padding: 4px 14px;
      font-size: 14px;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.2s;
    }

    .train-notice-confirm-btn:hover:not(:disabled) {
      background: rgba(255, 140, 100, 0.3);
    }

    .train-notice-confirm-btn:disabled {
      opacity: 0.35;
      cursor: default;
    }

    .train-schedule-notice.train-notice-fadeout {
      animation: noticeOut 0.6s ease forwards;
    }

    /* Tutorial hint toast - 5 second display */
    .train-schedule-notice.tutorial-hint-toast {
      animation: noticeIn 0.4s ease forwards, noticeOut 0.6s ease 4.9s forwards;
    }

    @media (max-width: 768px) {
      .train-schedule-notice {
        font-size: 14px;
      }
      .train-notice-check-label {
        font-size: 13px;
      }
      .train-notice-confirm-btn {
        font-size: 12px;
      }
    }

    /* Inside #bottom-sheet-body follows .train-popup-inner styles */
    #bottom-sheet-body {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
    }

    #bottom-sheet-body .train-popup-inner {
      padding: 0;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
    }

    #bottom-sheet-body .train-popup-inner h4 {
      font-size: 18px;
      font-weight: 600;
      color: #000;
    }

    #bottom-sheet-body .train-popup-inner p {
      margin: 0 0 6px 0;
      font-size: 15px;
      color: #333;
      line-height: 1.6;
    }

    #bottom-sheet-body .train-popup-inner p:last-of-type {
      margin-bottom: 0;
    }

    #bottom-sheet-body .train-popup-inner strong {
      font-weight: 600;
      color: #555;
    }

    /* 2x2 Grid layout for train info */
    .train-info-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      margin: 0 0 10px 0;
    }

    .train-info-grid p {
      margin: 0;
      font-size: 15px;
      color: #333;
      line-height: 1.6;
      display: block;
    }

    .train-info-grid strong {
      font-weight: 600;
      color: #555;
      display: block;
      margin-bottom: 2px;
    }

    /* Route Progress Bar */
    .route-progress {
      padding: 10px 0;
    }

    /* Moving train: vertical layout (time on top, stations on bottom) */
    .route-progress-moving {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    /* Stopping train: vertical layout (time on top, stations on bottom) */
    .route-progress-stopping {
      display: flex;
      flex-direction: column;
    }

    .route-progress-stopping-time-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }

    .route-time-outside {
      font-size: 14px;
      font-weight: 600;
      color: #333;
      white-space: nowrap;
    }

    .time-with-bar {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      flex: 1;
      min-height: 36px;
      gap: 0;
    }

    .route-bar-background {
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 20px;
      border-radius: 10px;
      transform: translateY(-50%);
      z-index: 0;
    }

    .route-progress-stopping-station-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .stopping-current-station {
      position: relative;
      z-index: 2;
      display: inline-block;
      padding: 10px 14px;
      border-radius: 999px;
      white-space: nowrap;
      font-size: 15px;
      font-weight: 500;
    }

    .route-progress-time-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .route-progress-station-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .route-time {
      position: relative;
      z-index: 1;
      font-size: 14px;
      font-weight: 600;
      color: #333;
      white-space: nowrap;
      background-color: white;
      padding: 2px 6px;
      border-radius: 4px;
    }

    .route-time-in-bar {
      position: relative;
      z-index: 1;
      font-size: 14px;
      font-weight: normal;
      white-space: nowrap;
      background-color: transparent;
      padding: 2px 6px;
      border-radius: 4px;
    }

    .route-station {
      font-size: 16px;
      color: #000;
      white-space: nowrap;
    }

    .route-station-left {
      text-align: left;
    }

    .route-station-right {
      text-align: right;
    }

    .route-bar-container {
      flex-grow: 1;
      height: 12px;
      background-color: #e0e0e0;
      border-radius: 6px;
      position: relative;
      overflow: visible;
    }

    .route-bar-fill {
      height: 100%;
      border-radius: 6px;
      transition: width 0.3s ease;
    }

    /* Desktop responsive */
    @media (min-width: 768px) {
      #train-bottom-sheet {
        max-width: 500px;
      }
      .story-modal-content {
        height: 85vh;
      }
    }

    /* Mapbox default control buttons (zoom, compass, 2D/3D) */
    .mapboxgl-ctrl-group button {
      width: 40px !important;
      height: 40px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    .mapboxgl-ctrl-group button .mapboxgl-ctrl-icon {
      width: 36px !important;
      height: 36px !important;
    }

    /* Language toggle button */
    .mapboxgl-ctrl-lang {
      width: 40px !important;
      height: 40px !important;
      min-width: 40px !important;
      min-height: 40px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      background: white;
      border: none;
      cursor: pointer;
      padding: 0 !important;
    }

    .lang-icon {
      font-size: 14px;
      font-weight: 600;
      line-height: 1.2;
      color: #333;
      text-align: center;
      letter-spacing: 1px;
    }

    /* Custom search popup */
    .search-popup {
      position: absolute;
      top: 10px;
      left: 59px;
      z-index: 100;
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 4px;
      border: 1px solid rgba(255, 140, 100, 0.2);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      width: 280px;
      max-width: calc(100vw - 70px);
    }

    .search-popup.hidden {
      display: none;
    }

    .search-popup-header {
      display: flex;
      align-items: center;
      height: 40px;
      padding: 0 4px;
      gap: 4px;
    }

    .search-input {
      flex: 1;
      height: 100%;
      padding: 0 8px;
      border: none;
      font-size: 14px;
      outline: none;
      min-width: 0;
    }

    .search-type-toggle-inline {
      display: flex;
      border-radius: 4px;
      overflow: hidden;
      border: 1px solid #ddd;
      flex-shrink: 0;
      margin-right: 2px;
    }

    .search-type-toggle-inline .search-type-btn {
      padding: 4px 6px;
      border: none;
      background: white;
      color: #333;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .search-type-toggle-inline .search-type-btn:first-child {
      border-right: 1px solid #ddd;
    }

    .search-type-toggle-inline .search-type-btn.active {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
    }

    .search-results {
      max-height: 300px;
      overflow-y: auto;
    }

    .search-result-item {
      padding: 10px 12px;
      cursor: pointer;
      border-bottom: 1px solid #f0f0f0;
      transition: background 0.15s ease;
    }

    .search-result-item:last-child {
      border-bottom: none;
    }

    .search-result-item:hover {
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
    }

    .search-result-name {
      font-size: 14px;
      font-weight: 500;
      color: #333;
    }

    .search-result-sub {
      font-size: 12px;
      color: #888;
      margin-top: 2px;
    }

    .search-no-results {
      padding: 20px;
      text-align: center;
      color: #999;
      font-size: 13px;
    }

    /* Language selection popup */
    .lang-popup {
      position: absolute;
      top: 10px;
      left: 59px;
      z-index: 100;
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 4px;
      border: 1px solid rgba(255, 140, 100, 0.2);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      overflow: hidden;
      min-width: 140px;
    }

    .lang-popup.hidden {
      display: none;
    }

    .lang-popup-btn {
      width: 100%;
      padding: 12px 16px;
      border: none;
      background: transparent;
      color: #333;
      font-size: 14px;
      text-align: left;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .lang-popup-btn:not(:last-child) {
      border-bottom: 1px solid rgba(255, 140, 100, 0.15);
    }

    .lang-popup-btn:hover {
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
    }

    .lang-popup-btn.active {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
    }

    .lang-popup-btn.active:hover {
      background: linear-gradient(135deg, #FF6B6B 0%, #FF9633 100%);
    }

    /* Country selection popup */
    .country-popup {
      position: absolute;
      top: 10px;
      left: 59px;
      z-index: 100;
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 4px;
      border: 1px solid rgba(255, 140, 100, 0.2);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      overflow: hidden;
      min-width: 140px;
    }

    .country-popup.hidden {
      display: none;
    }

    .country-popup-title {
      padding: 12px 16px;
      font-size: 14px;
      font-weight: 600;
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      border-bottom: 1px solid rgba(255, 140, 100, 0.15);
    }

    .country-flag {
      width: 20px;
      height: 14px;
      border-radius: 2px;
      flex-shrink: 0;
      box-shadow: 0 0 1px rgba(0,0,0,0.2);
    }

    .country-popup-btn {
      width: 100%;
      padding: 12px 16px;
      border: none;
      background: transparent;
      color: #333;
      font-size: 14px;
      text-align: left;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .country-popup-btn:not(:last-child) {
      border-bottom: 1px solid rgba(255, 140, 100, 0.15);
    }

    .country-popup-btn:hover {
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
    }

    .country-popup-btn.active {
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      color: white;
    }

    .country-popup-btn.active:hover {
      background: linear-gradient(135deg, #FF6B6B 0%, #FF9633 100%);
    }

    /* Country button style */
    .mapboxgl-ctrl-country {
      display: flex !important;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      cursor: pointer;
      background: none;
      border: none;
    }

    /* Minimized story popup */
    .minimized-stories-popup {
      position: absolute;
      top: 10px;
      left: 59px;
      z-index: 100;
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 4px;
      border: 1px solid rgba(255, 140, 100, 0.2);
      overflow: hidden;
      min-width: 200px;
      max-width: 280px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .minimized-stories-popup.hidden {
      display: none;
    }

    .minimized-stories-header {
      padding: 12px 16px;
      font-size: 14px;
      font-weight: 600;
      background: linear-gradient(135deg, #FF7B7B 0%, #FFA64D 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      border-bottom: 1px solid rgba(255, 140, 100, 0.15);
    }

    .minimized-stories-list {
      max-height: 300px;
      overflow-y: auto;
    }

    .minimized-stories-empty {
      padding: 20px 16px;
      text-align: center;
      color: #999;
      font-size: 14px;
    }

    .minimized-story-item {
      display: flex;
      align-items: center;
      padding: 10px 14px;
      border-bottom: 1px solid rgba(255, 140, 100, 0.1);
      transition: background 0.15s ease;
      cursor: pointer;
    }

    .minimized-story-item:last-child {
      border-bottom: none;
    }

    .minimized-story-item:hover {
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.1) 0%, rgba(255, 166, 77, 0.1) 100%);
    }

    .minimized-story-number {
      font-size: 12px;
      color: #888;
      margin-right: 8px;
      flex-shrink: 0;
    }

    .minimized-story-title {
      flex: 1;
      font-size: 13px;
      color: #333;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-right: 8px;
    }

    .minimized-story-time {
      font-size: 11px;
      color: #999;
      margin-right: 8px;
      flex-shrink: 0;
    }

    .minimized-story-delete {
      width: 22px;
      height: 22px;
      border: none;
      background: #f0f0f0;
      border-radius: 50%;
      color: #666;
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: all 0.15s ease;
    }

    .minimized-story-delete:hover {
      background: #ff6b6b;
      color: white;
    }

    /* Minimize story button icon */
    .minimized-stories-icon {
      font-size: 16px;
      line-height: 1;
    }

    /* Transportation filter popup */
    .transport-filter-popup {
      position: absolute !important;
      top: 10px !important;
      left: 63px !important;
      z-index: 100;
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 4px;
      border: 1px solid rgba(255, 140, 100, 0.2);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .transport-filter-popup.hidden {
      display: none;
    }

    .transport-filter-option {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 16px;
      border: none;
      border-radius: 6px;
      background: #f5f5f5;
      cursor: pointer;
      transition: all 0.15s ease;
      font-family: var(--font-family);
    }

    .transport-filter-option:hover {
      background: #e8e8e8;
    }

    .transport-filter-option.active {
      background: linear-gradient(135deg, rgba(255, 123, 123, 0.2) 0%, rgba(255, 166, 77, 0.2) 100%);
    }

    .transport-icon {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .transport-icon img {
      width: 32px;
      height: 32px;
      object-fit: contain;
    }

    .transport-icon img.train-img {
      transform: rotate(135deg);
    }

    .transport-icon img.bus-img {
      transform: rotate(135deg);
    }

    /* Show both icon (train top-right, bus bottom-left) */
    .transport-icon.both-icon {
      width: 36px;
      height: 36px;
    }

    .transport-icon.both-icon img {
      position: absolute;
      width: 24px;
      height: 24px;
    }

    .transport-icon.both-icon img.train-img {
      top: 0;
      right: 0;
      transform: rotate(135deg);
    }

    .transport-icon.both-icon img.bus-img {
      bottom: 0;
      left: 0;
      transform: rotate(135deg);
    }

    .transport-label {
      font-size: 14px;
      color: #333;
    }

    /* Image styles in toggle button */
    .transport-toggle-btn {
      position: relative;
    }

    .transport-toggle-btn img {
      width: 34px;
      height: 34px;
      object-fit: contain;
    }

    .transport-toggle-btn > img.train-img {
      transform: rotate(135deg);
    }

    .transport-toggle-btn > img.bus-img {
      transform: rotate(135deg);
    }

    .transport-toggle-btn .both-icons {
      position: relative;
      width: 38px;
      height: 38px;
    }

    .transport-toggle-btn .both-icons img {
      position: absolute;
      width: 28px;
      height: 28px;
    }

    .transport-toggle-btn .both-icons img.train-img {
      top: 0;
      right: 0;
      transform: rotate(135deg);
    }

    .transport-toggle-btn .both-icons img.bus-img {
      bottom: 0;
      left: 0;
      transform: rotate(135deg);
    }

    /* PC location permission warning modal */
    .geolocation-warning-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .geolocation-warning-modal.hidden {
      display: none;
    }

    .geolocation-warning-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(2px);
    }

    .geolocation-warning-content {
      position: relative;
      background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
      border-radius: 16px;
      padding: 28px 32px;
      max-width: 360px;
      width: 90%;
      box-shadow: 0 8px 32px rgba(255, 123, 123, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
      border: 1px solid rgba(255, 140, 100, 0.2);
      text-align: center;
      animation: modalFadeIn 0.2s ease-out;
    }

    @keyframes modalFadeIn {
      from {
        opacity: 0;
        transform: scale(0.95);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .geolocation-warning-icon {
      font-size: 48px;
      margin-bottom: 12px;
    }

    .geolocation-warning-title {
      font-size: 18px;
      font-weight: 600;
      color: #333;
      margin-bottom: 12px;
    }

    .geolocation-warning-message {
      font-size: 14px;
      color: #666;
      line-height: 1.6;
      margin-bottom: 24px;
    }

    .geolocation-warning-buttons {
      display: flex;
      gap: 12px;
      justify-content: center;
    }

    .geolocation-warning-btn {
      padding: 12px 24px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
      border: none;
      font-family: var(--font-family);
    }

    .geolocation-warning-btn.cancel {
      background: #f0f0f0;
      color: #666;
    }

    .geolocation-warning-btn.cancel:hover {
      background: #e0e0e0;
    }

    .geolocation-warning-btn.confirm {
      background: linear-gradient(135deg, #ff7b7b 0%, #ffa64d 100%);
      color: white;
      box-shadow: 0 2px 8px rgba(255, 123, 123, 0.3);
    }

    .geolocation-warning-btn.confirm:hover {
      background: linear-gradient(135deg, #ff6b6b 0%, #ff9933 100%);
      box-shadow: 0 4px 12px rgba(255, 123, 123, 0.4);
    }

    /* Mobile: shrink location permission warning modal */
    @media (max-width: 768px) {
      .geolocation-warning-content {
        padding: 20px 24px;
        max-width: 300px;
        border-radius: 12px;
      }

      .geolocation-warning-title {
        font-size: 16px;
        margin-bottom: 8px;
      }

      .geolocation-warning-message {
        font-size: 13px;
        margin-bottom: 18px;
        line-height: 1.5;
      }

      .geolocation-warning-btn {
        padding: 10px 18px;
        font-size: 13px;
      }
    }

    /* PC: enlarge Mapbox control icon size */
    @media (min-width: 769px) {
      .mapboxgl-ctrl-group button {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
      }

      .mapboxgl-ctrl-group button .mapboxgl-ctrl-icon {
        width: 36px !important;
        height: 36px !important;
      }

      .mapboxgl-ctrl-geolocate {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
      }

      /* Combined search+clock+language control PC styles */
      .mapboxgl-ctrl-search,
      .mapboxgl-ctrl-clock,
      .mapboxgl-ctrl-lang {
        width: 44px !important;
        height: 44px !important;
      }

      .mapboxgl-ctrl-search svg {
        width: 28px !important;
        height: 28px !important;
        fill: #333 !important;
      }

      .mapboxgl-ctrl-clock svg {
        width: 28px !important;
        height: 28px !important;
      }

      .lang-icon {
        font-size: 16px !important;
      }

      /* Clock popup PC position */
      .time-controls-popup {
        top: 10px;
        left: 63px;
      }

      /* Language popup PC position */
      .lang-popup {
        top: 10px;
        left: 63px;
      }

      /* Country popup PC position */
      .country-popup {
        top: 10px;
        left: 63px;
      }

      /* Search popup PC position */
      .search-popup {
        top: 10px;
        left: 63px;
        width: 320px;
      }

      .search-popup-header {
        height: 44px !important;
      }

      .search-type-toggle-inline {
        height: auto !important;
        margin-right: 4px;
      }

      .search-type-toggle-inline .search-type-btn {
        padding: 6px 12px !important;
      }

      /* Minimize story button PC size */
      .mapboxgl-ctrl-minimized-stories {
        width: 44px !important;
        height: 44px !important;
      }

      .minimized-stories-icon {
        font-size: 20px !important;
      }

      /* Minimize story popup PC position */
      .minimized-stories-popup {
        top: 10px;
        left: 63px;
      }
    }

/* Landmark link styles (inside story modal) */
.landmark-link {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
}

/* Mobile touch optimization: disable scroll/zoom gestures for immediate response */
.landmark-link,
.restaurant-link {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.restaurant-link {
  color: #e65100;
  text-decoration: none;
  font-weight: 500;
}

/* Restaurant Link Selection Modal */
#restaurant-link-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.restaurant-link-modal-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 300px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#restaurant-link-modal-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: #333;
  word-break: break-word;
}

.restaurant-link-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.restaurant-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
}

.hotpepper-btn {
  background: #CC111B;
  color: white;
}

.hotpepper-btn:hover {
  background: #a00e16;
}

.googlemaps-btn {
  background: #4285F4;
  color: white;
}

.googlemaps-btn:hover {
  background: #3367d6;
}

.restaurant-modal-close {
  background: #8e9aaf;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.restaurant-modal-close:hover {
  background: #7a8599;
}