<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Kyoto Local Guide</title>

  <style>

    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 0; padding: 20px; background: #f8f9fa; color: #333; }

    .container { max-width: 600px; margin: 0 auto; }

    header { text-align: center; padding-bottom: 20px; border-bottom: 2px solid #e9ecef; }

    h1 { margin: 0; color: #1a252f; font-size: 1.8rem; }

    .subtitle { color: #6c757d; font-size: 0.95rem; margin-top: 5px; }

    .card { background: white; border-radius: 12px; padding: 20px; margin-top: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

    .spot-card { border-left: 4px solid #3498db; background: #fdfdfd; padding: 15px; margin: 15px 0; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }

    .badge { display: inline-block; background: #e8f4fd; color: #2980b9; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }

    .btn-map { display: inline-block; margin-top: 10px; padding: 8px 14px; background: #27ae60; color: white; text-decoration: none; border-radius: 6px; font-size: 0.85rem; font-weight: bold; }

    .tips { font-style: italic; color: #7f8c8d; font-size: 0.85rem; margin-top: 8px; }

  </style>

</head>

<body>

  <div class="container">

    <header>

      <h1>Kyoto Travel Guide</h1>

      <p class="subtitle">Handpicked places & routes from your local host</p>

    </header>

    <div id="content">Loading...</div>

  </div>

  <script>

    const routesData = [

      {

        id: "route-1",

        title: "Classic Eastern Kyoto Tour",

        description: "Experience historic temples, traditional streets, and lively markets.",

        spots: [

          {

            name: "Kiyomizu-dera Temple",

            name_ja: "清水寺",

            category: "Sightseeing",

            description: "Famous wooden stage with panoramic views of Kyoto.",

            search_query: "Kiyomizu-dera",

            tips: "Great in the early morning to avoid crowds."

          },

          {

            name: "Ninenzaka & Sannenzaka",

            name_ja: "二寧坂・産寧坂",

            category: "Walking / Shopping",

            description: "Preserved historical stone-paved lanes with traditional shops.",

            search_query: "Ninenzaka",

            tips: "Try traditional Japanese sweets along the street."

          },

          {

            name: "Yasaka Shrine & Gion",

            name_ja: "八坂神社・祇園",

            category: "Culture / Night Walk",

            description: "The heart of Kyoto's geisha district with lantern-lit atmosphere.",

            search_query: "Yasaka Shrine",

            tips: "Beautiful lanterns are lit up at night."

          }

        ]

      }

    ];

    function renderApp() {

      const container = document.getElementById('content');

      container.innerHTML = '';

      routesData.forEach(route => {

        const routeEl = document.createElement('div');

        routeEl.className = 'card';

        routeEl.innerHTML = `

          <h2>${route.title}</h2>

          <p>${route.description}</p>

          <hr style="border:none; border-top:1px solid #eee; margin:15px 0;">

          <h3>Spots:</h3>

        `;

        route.spots.forEach((spot, idx) => {

          const mapUrl = `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(spot.search_query)}`;

          const spotEl = document.createElement('div');

          spotEl.className = 'spot-card';

          spotEl.innerHTML = `

            <div><span class="badge">${spot.category}</span></div>

            <h4 style="margin: 8px 0 4px 0;">${idx + 1}. ${spot.name} <small style="color:#888;">(${spot.name_ja})</small></h4>

            <p style="margin:0 0 8px 0; font-size:0.9rem; color:#444;">${spot.description}</p>

            ${spot.tips ? `<div class="tips">💡 <b>Local Tip:</b> ${spot.tips}</div>` : ''}

            <a href="${mapUrl}" target="_blank" class="btn-map">📍 Open in Google Maps</a>

          `;

          routeEl.appendChild(spotEl);

        });

        container.appendChild(routeEl);

      });

    }

    renderApp();

  </script>

</body>

</html>