* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333; background: #fff; line-height: 1.7; font-size: 18px; font-weight: 700;
  overflow: hidden;
}

/* ===== Splash screen ===== */
.splash {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(180,130,80,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 25% 30%, rgba(160,80,140,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 65%, rgba(100,40,80,0.4) 0%, transparent 50%),
    linear-gradient(160deg, #1A0E18 0%, #3A1833 20%, #5C2D52 45%, #6B3560 55%, #3A1833 80%, #1A0E18 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; transition: opacity 1.0s ease;
}
.splash.fade-out { opacity: 0; pointer-events: none; }
.splash-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 48px; font-weight: 900; color: #fff; letter-spacing: 0.08em;
  opacity: 0; transition: opacity 0.8s ease;
}
.splash-title .dot { color: #E8C496; }
.splash-title.show { opacity: 1; }
.splash-sub {
  font-size: 18px; color: rgba(255,255,255,0.9); font-weight: 700;
  letter-spacing: 0.05em; opacity: 0; transition: opacity 0.8s ease;
}
.splash-sub.show { opacity: 1; }
.splash-line {
  width: 80px; height: 2px; border: none;
  background: linear-gradient(90deg, transparent, #D4A574, #E8C496, #D4A574, transparent);
  opacity: 0; transition: opacity 0.8s ease 0.2s;
}
.splash-line.show { opacity: 1; }

/* ===== Map: always fullscreen ===== */
#map {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0;
}

/* ===== Overlay panels: all float on map ===== */
/* --- Header --- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background:
    linear-gradient(90deg, rgba(212,165,116,0.0) 0%, rgba(212,165,116,0.12) 50%, rgba(212,165,116,0.0) 100%),
    linear-gradient(135deg, rgba(26,14,24,0.97) 0%, rgba(58,24,51,0.95) 25%, rgba(92,45,82,0.94) 50%, rgba(58,24,51,0.95) 75%, rgba(26,14,24,0.97) 100%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; padding: 14px 28px; text-align: center;
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.site-header.show { transform: translateY(0); }
.site-header::after {
  content: ""; position: absolute; bottom: 0; left: 3%; right: 3%; height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(232,196,150,0.6) 20%, rgba(240,212,168,0.8) 50%, rgba(232,196,150,0.6) 80%, transparent 100%);
}
.site-header .header-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: nowrap;
}
.site-header h1 {
  font-size: 28px; font-weight: 900; letter-spacing: 0.08em;
  word-break: keep-all; overflow-wrap: break-word; white-space: nowrap;
  font-family: "Georgia", "Times New Roman", serif;
}
.site-header h1 .dot { color: #F0D4A8; font-size: 32px; }
.site-header .header-sep { margin: 0 18px; font-size: 22px; color: rgba(255,255,255,0.4); font-weight: 300; }
.site-header .subtitle {
  font-size: 16px; color: #fff; font-weight: 700;
  white-space: nowrap; letter-spacing: 0.05em;
}

/* --- Header dropdowns --- */
.header-filters {
  display: flex; align-items: center; gap: 12px; margin-left: auto; padding-left: 24px;
}
.header-filters select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(232,196,150,0.35); border-radius: 4px;
  padding: 8px 34px 8px 14px; font-size: 15px; font-weight: 700;
  font-family: inherit; cursor: pointer; outline: none;
  letter-spacing: 0.03em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(232,196,150,0.8)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: all 0.2s;
}
.header-filters select:hover { background: rgba(255,255,255,0.18); border-color: rgba(232,196,150,0.6); }
.header-filters select:focus { background: rgba(255,255,255,0.22); border-color: rgba(232,196,150,0.7); }
.header-filters select option { color: #333; background: #fff; font-weight: 700; }
.lang-toggle {
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(232,196,150,0.4);
  border-radius: 4px; padding: 4px 10px; font-size: 13px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.05em; white-space: nowrap; transition: background 0.2s;
}
.lang-toggle:hover { background: rgba(255,255,255,0.22); border-color: rgba(232,196,150,0.7); }

/* --- List panel --- */
.list-panel {
  position: fixed; top: 68px; right: 0; bottom: 56px; z-index: 15;
  width: 38.2vw; max-width: 620px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(200,180,160,0.25);
  border-radius: 12px 0 0 12px;
  overflow-y: auto; display: flex; flex-direction: column;
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.list-panel.show { transform: translateX(0); }
.list-panel.collapsed { transform: translateX(100%); pointer-events: none; }
.list-panel.collapsed.show { transform: translateX(100%); }
.list-count {
  font-size: 14px; font-weight: 900; color: #4A2040; letter-spacing: 0.04em;
  padding: 12px 20px; border-bottom: 1px solid rgba(200,180,160,0.2); flex-shrink: 0;
  text-align: right;
}

/* --- List toggle button --- */
.list-toggle {
  position: fixed; z-index: 16;
  top: 50%; right: 0;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85); color: #666; border: 1px solid #ddd;
  width: 20px; height: 50px; cursor: pointer;
  font-size: 12px; font-weight: 400;
  border-radius: 4px 0 0 4px; border-right: none;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  opacity: 0.6;
}
.list-toggle:hover { opacity: 1; background: #fff; color: #333; }
.mobile-br { display: none; }
.footer-mobile { display: none; }
/* --- Landscape warning (hidden by default) --- */
.landscape-warning {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: linear-gradient(135deg, #1a0e18 0%, #3a1833 50%, #1a0e18 100%);
  color: #fff; justify-content: center; align-items: center; text-align: center;
}
.landscape-inner { padding: 40px; }
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  .landscape-warning { display: flex !important; }
}
/* --- Footer --- */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background:
    linear-gradient(90deg, rgba(212,165,116,0.0) 0%, rgba(212,165,116,0.12) 50%, rgba(212,165,116,0.0) 100%),
    linear-gradient(135deg, rgba(26,14,24,0.97) 0%, rgba(58,24,51,0.95) 25%, rgba(92,45,82,0.94) 50%, rgba(58,24,51,0.95) 75%, rgba(26,14,24,0.97) 100%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; padding: 10px 24px; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 20px;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.site-footer.show { transform: translateY(0); }
.site-footer.scroll-hide { transform: translateY(100%) !important; transition: transform 0.3s ease !important; }
.site-footer.scroll-show { transition: transform 0.4s ease !important; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 3%; right: 3%; height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(232,196,150,0.6) 20%, rgba(240,212,168,0.8) 50%, rgba(232,196,150,0.6) 80%, transparent 100%);
}

/* ===== Intro: hide overlays ===== */
.intro .site-header,
.intro .list-panel,
.intro .list-toggle,
.intro .site-footer { visibility: hidden; }
.intro .maplibregl-ctrl-bottom-left {
  opacity: 0; pointer-events: none;
  transition: none;
}
.maplibregl-ctrl-bottom-left {
  transition: opacity 0.6s ease;
}


/* ===== List items ===== */
.site-list { list-style: none; padding: 0; margin: 0; }
.site-list li {
  padding: 8px 20px; border-bottom: 1px solid rgba(200,180,160,0.15);
  display: flex; align-items: flex-start; gap: 0;
  transition: background 0.2s;
}
.site-list li:nth-child(odd) { background: rgba(74,32,64,0.02); }
.site-list li:nth-child(even) { background: linear-gradient(135deg, rgba(232,196,150,0.04) 0%, rgba(74,32,64,0.03) 100%); }
.site-list li:hover { background: rgba(74,32,64,0.07); }
.site-num { color: #722F60; font-size: 13px; font-weight: 800; min-width: 32px; text-align: right; padding-right: 12px; padding-top: 2px; flex-shrink: 0; }
.site-text { flex: 1; min-width: 0; }
.site-name { font-size: 18px; font-weight: 900; color: #3A1833; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-desc { font-size: 12px; color: #888; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -1px; }
.site-meta { font-size: 15px; color: #555; font-weight: 700; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.site-meta .domain-link { color: #722F60; text-decoration: none; font-weight: 900; font-size: 15px; }
.site-meta .domain-link:hover { text-decoration: underline; }
.site-meta .founder-label {
  display: inline-block; background: linear-gradient(135deg, #B8860B, #DAA520);
  color: #fff; font-size: 12px; font-weight: 900; padding: 2px 8px;
  border-radius: 3px; margin-left: 12px; letter-spacing: 0.06em;
  vertical-align: middle; text-decoration: none; cursor: pointer;
}
.site-meta .founder-label:hover { opacity: 0.8; }
.site-meta .cat-label { color: #4A2040; margin-left: 12px; background: rgba(74,32,64,0.08); padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 800; }
.site-meta .area-label { color: #444; margin-left: 6px; background: rgba(0,0,0,0.06); padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 800; }
.site-actions { display: flex; gap: 6px; flex-shrink: 0; align-self: center; }
.btn-map, .btn-web {
  padding: 0; border-radius: 6px; border: none; cursor: pointer;
  transition: opacity 0.15s;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0; text-decoration: none;
}
.btn-spacer { display: inline-block; width: 30px; height: 30px; flex-shrink: 0; }
.btn-map { background: #4A2040; color: #fff; }
.btn-web { background: #555; color: #fff; }
.btn-map:hover, .btn-web:hover { opacity: 0.7; }

/* ===== Footer text ===== */
.site-footer, .site-footer a, .site-footer .footer-cta, .site-footer .footer-info {
  color: #fff; font-size: 16px; font-weight: 900; line-height: 1.5;
}
.site-footer .footer-cta .dot { color: #F0D4A8; }
.site-footer a { text-decoration: underline; }
.site-footer a:hover { opacity: 0.85; }
.footer-updated { margin-left: 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }

/* ===== MapLibre popup ===== */
.maplibregl-popup-content {
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.6;
  padding: 16px 20px; border-radius: 8px; border: 1px solid rgba(200,180,160,0.2);
}
.popup-name { font-weight: 900; font-size: 18px; color: #3A1833; letter-spacing: 0.01em; }
.popup-desc { color: #555; margin: 6px 0; font-size: 14px; font-weight: 600; }
.popup-domain a { color: #722F60; font-weight: 800; font-size: 14px; }
.popup-domain a:focus, .popup-domain a:active { outline: none; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.maplibregl-popup-content a:focus, .maplibregl-popup-content a:active { outline: none; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.popup-meta { font-size: 12px; color: #888; margin-top: 4px; font-weight: 600; }
.popup-founder {
  display: inline-block; background: linear-gradient(135deg, #B8860B, #DAA520);
  color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px;
  border-radius: 3px; margin-right: 6px; letter-spacing: 0.06em;
}

/* ===== Pin marker ===== */
.pin-marker {
  width: 24px; height: 36px; cursor: pointer;
}

/* ===== Map controls positioning ===== */
.maplibregl-ctrl-bottom-left {
  bottom: 60px;
}
.maplibregl-ctrl-attrib {
  background: rgba(255,255,255,0.7) !important;
  font-size: 11px !important;
}

/* ===== Responsive: tablet (~1100px) ===== */
@media (max-width: 1100px) {
  .splash-title { font-size: 36px; }
  .splash-sub { font-size: 15px; }
  .list-panel { width: 38.2vw; max-width: 480px; }
  .site-header h1 { font-size: 22px; }
  .site-header .subtitle { font-size: 15px; }
  .header-filters select { font-size: 15px; padding: 5px 28px 5px 10px; }
  .site-name { font-size: 17px; }
  .site-meta { font-size: 14px; }
  .site-meta .domain-link { font-size: 14px; }
  .btn-map, .btn-web { width: 28px; height: 28px; border-radius: 6px; }
  .site-footer, .site-footer a, .site-footer .footer-cta, .site-footer .footer-info { font-size: 13px; }
  .list-count { font-size: 13px; }
  .site-list li { padding: 8px 16px; }
}
/* ===== Responsive: mobile ===== */
@media (max-width: 768px) {
  .splash-title { font-size: 28px; }
  .splash-sub { font-size: 13px; }
  /* Header: compact 2 lines */
  .mobile-br { display: inline; }
  .site-header { padding: 0px 12px 8px; }
  .site-header .header-inner {
    flex-direction: column; align-items: center; gap: 5px;
  }
  .site-header h1 { font-size: 18px; letter-spacing: 0.04em; margin: 0; padding: 0; line-height: 1; }
  .site-header .subtitle { display: none; }
  .site-header .header-sep { display: none; }
  .header-filters { margin-left: 0; padding-left: 0; width: 100%; justify-content: center; gap: 6px; }
  .header-filters select { font-size: 11px; padding: 5px 22px 5px 8px; flex: 1; }
  .lang-toggle { font-size: 11px; padding: 4px 8px; flex: 0 0 auto; }

  /* ── List panel: fixed bottom half ── */
  .list-panel {
    position: fixed !important;
    z-index: 19 !important;
    width: 100% !important; max-width: 100vw !important;
    top: 47vh !important; left: 0 !important; right: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    border-left: none !important;
    border-top: 1px solid rgba(200,180,160,0.3) !important;
    border-radius: 0 !important;
    box-shadow: none;
    padding-bottom: 0;
    transform: none !important;
    transition: none !important;
    visibility: inherit;
  }
  .list-panel.show,
  .list-panel.collapsed,
  .list-panel.collapsed.show {
    transform: none !important;
    pointer-events: auto !important;
  }
  .list-panel .list-count {
    display: flex; align-items: center; justify-content: flex-end;
    padding: 6px 14px 4px;
    font-size: 11px;
  }
  .list-panel .list-count::before { display: none; }
  .list-panel .list-count::after { display: none; }
  /* Footer always on top */
  .site-footer { z-index: 20 !important; }

  /* Hide desktop toggle button on mobile */
  .list-toggle { display: none !important; }
  /* Map controls: just above list panel */
  .maplibregl-ctrl-bottom-left { bottom: calc(50vh + 4px); }

  /* List items: smaller font */
  .site-name { font-size: 14px; }
  .site-desc { font-size: 10px; }
  .site-num { font-size: 11px; min-width: 24px; padding-right: 6px; }
  .site-meta { font-size: 11px; }
  .site-meta .domain-link { font-size: 11px; }
  .site-meta .cat-label, .site-meta .area-label { font-size: 10px; padding: 1px 5px; margin-left: 6px; }
  .site-meta .founder-label { margin-left: 6px; }
  .btn-map, .btn-web { width: 36px; height: 36px; border-radius: 8px; }
  .btn-map svg, .btn-web svg { width: 18px; height: 18px; }
  .btn-spacer { width: 36px; height: 36px; }
  .list-count { font-size: 11px; padding: 6px 12px; }
  .site-list li { padding: 6px 12px; }
  .site-actions { flex-direction: row; gap: 8px; }

  /* Footer: fixed at bottom */
  .footer-desktop { display: none !important; }
  .footer-mobile { display: block !important; }
  .site-footer {
    position: fixed !important; bottom: 0; left: 0; right: 0;
    min-height: auto; padding: 10px 16px 6px; flex-direction: column; align-items: center; text-align: center; gap: 1px;
  }
  .site-footer .footer-desc-m { font-size: 11px !important; line-height: 1.35; }
  .site-footer .footer-cta-m, .site-footer .footer-cta-m a { font-size: 13px !important; line-height: 1.35; margin-top: 1px; }
  .site-footer .footer-info-m, .site-footer .footer-info-m a { font-size: 10px !important; line-height: 1.3; opacity: 0.85; }
  .site-footer a {
    display: inline-block; padding: 6px 4px;
    -webkit-tap-highlight-color: transparent;
  }
  /* Give list scroll room above footer */
  .site-list { padding-bottom: 60px !important; }
  /* iOS: always show scrollbar */
  .list-panel { -webkit-overflow-scrolling: touch; }
  .list-panel::-webkit-scrollbar { -webkit-appearance: none; width: 6px; }
  .list-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border-radius: 3px; }
  .list-panel::-webkit-scrollbar-track { background: transparent; }

  .maplibregl-popup-content { font-size: 13px; padding: 8px 12px; max-width: 260px; }
  .popup-name { font-size: 13px; }
  .maplibregl-popup { max-width: 280px !important; }
}
