/* City detail popup (shared with visual-review) */
:root {
  --g-50: #fafafa;
  --g-100: #f0f0ef;
  --g-200: #e2e2e0;
  --g-300: #c9c9c6;
  --g-400: #a3a39f;
  --g-500: #7a7a76;
  --g-600: #5c5c58;
  --g-700: #403f3c;
  --g-800: #2a2a28;
  --g-900: #181817;
  --accent: #1a3a5c;
  --warn: #8a4b1f;
  --ok: #2f5d3a;
}

html.is-locked { overflow: hidden; }

/* LP固定CTAが前面に出ないよう、モーダル表示中は隠す */
html.is-locked .underbtn {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ID指定でLP側の汎用スタイル衝突を避ける */
#municipalityModal.overlay,
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, 0.9);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 10050; /* LP固定CTA・ヘッダーより上 */
  padding: 0;
  text-align: left;
  color: var(--g-900);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  width: 100%;
  max-width: none;
  height: 100%;
  box-sizing: border-box;
}

.overlay *,
.overlay *::before,
.overlay *::after {
  box-sizing: border-box;
}

.overlay.is-open,
#municipalityModal.overlay.is-open {
  display: flex;
}

#municipalityModal .popup,
.popup {
  background: #fff;
  width: min(100%, 850px);
  max-width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: left;
  margin: 0;
}

#municipalityModal .popup-body,
.popup-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  width: 100%;
  max-width: none;
}

/* LP側 a:hover img の位置ずらしを無効化 */
.overlay a:hover img,
.popup a:hover img,
.photo-lightbox a:hover img {
  position: static;
  bottom: auto;
  opacity: 1;
}

.city-hero,
.migrant-line,
.block,
.block h3,
.block p,
.access-line {
  text-align: left;
}

#municipalityModal .popup-close,
.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(24, 24, 23, 0.55);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  color: #fff;
}

.popup-close .material-icons { font-size: 18px; }

@media (min-width: 768px) {
  #municipalityModal.overlay,
  .overlay {
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 40px);
  }

  #municipalityModal .popup,
  .popup {
    width: min(100%, 850px);
    border-radius: 16px;
    max-height: min(88vh, 900px);
    max-height: min(88dvh, 900px);
    height: auto;
  }

  .popup .thumb-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 10px;
  }

  .popup .all-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* LPのSPブレークポイント(767px): 外側余白の内側にポップアップを収める */
@media (max-width: 767px) {
  #municipalityModal.overlay,
  .overlay {
    align-items: stretch;
    justify-content: center;
    padding:
      max(12px, env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  #municipalityModal .popup,
  .popup {
    width: 100%;
    max-width: none;
    /* 余白分を除いた領域いっぱい（height固定+paddingの二重計算を避ける） */
    height: 100%;
    max-height: none;
    border-radius: 16px;
    margin: 0;
  }

  #municipalityModal .popup-body,
  .popup-body {
    flex: 1 1 auto;
    min-height: 0;
  }

  #municipalityModal .popup-close,
  .popup-close {
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
    background: rgba(24, 24, 23, 0.78);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.85);
  }

  .popup-close .material-icons {
    font-size: 26px;
  }

  #municipalityModal .city-hero {
    padding: 20px 20px 14px 20px;
  }

  #municipalityModal .city-name-hero {
    font-size: clamp(42px, 9vw, 48px); /* block h3(40px)より大きく */
  }

  #municipalityModal .migrant-label {
    font-size: 15px;
  }

  #municipalityModal .migrant-num {
    font-size: clamp(28px, 6vw, 34px);
  }

  #municipalityModal .migrant-unit {
    font-size: 16px;
  }

  #municipalityModal .content {
    padding: 18px 18px 22px;
  }

  #municipalityModal .interview-cta-track {
    gap: 12px;
    margin-bottom: 16px;
  }

  #municipalityModal .interview-cta {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
      "thumb title"
      "label label";
    gap: 10px 12px;
    align-items: center;
    padding: 12px;
  }

  #municipalityModal .interview-cta-track.is-scrollable .interview-cta {
    flex-basis: min(86%, 320px);
    width: min(86%, 320px);
  }

  #municipalityModal .interview-cta-thumb {
    grid-area: thumb;
    width: 88px;
    height: 88px;
  }

  #municipalityModal .interview-cta-body {
    display: contents;
  }

  #municipalityModal .interview-cta-title {
    grid-area: title;
    font-size: 15px;
    line-height: 1.5;
    align-self: center;
  }

  #municipalityModal .interview-cta-label {
    grid-area: label;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    justify-content: flex-start;
    gap: 4px;
    padding-top: 2px;
  }

  #municipalityModal .interview-cta-label .material-icons {
    font-size: 18px;
  }

  #municipalityModal .tabs {
    margin-top: 22px;
    margin-bottom: 22px;
  }

  #municipalityModal .tab-btn {
    font-size: 22.5px; /* 15px × 1.5 */
    padding: 21px 6px;
  }

  #municipalityModal .block {
    margin-top: 28px;
    margin-bottom: 43px; /* 28px + 本文1文字分(15px) */
  }

  #municipalityModal .tab-panel > .block:first-child {
    margin-top: 8px;
  }

  #municipalityModal .block h3 {
    font-size: 40px; /* 20px × 2 */
    margin-top: 4px;
    margin-bottom: 12px;
    padding-bottom: 0;
  }

  #municipalityModal .block ul li::before {
    background: #fd0884;
    top: calc((1.9em - 4px) / 2);
  }

  #municipalityModal .block p,
  #municipalityModal .block ul li,
  #municipalityModal .access-line,
  #municipalityModal .access-line-text,
  #municipalityModal .hint-text {
    font-size: 20px;
    line-height: 1.9;
  }

  #municipalityModal .access-line {
    align-items: center;
  }

  #municipalityModal .access-line .material-icons {
    display: block !important;
    font-size: 20px !important;
    line-height: 1 !important;
    width: 20px;
    height: 20px;
    position: relative;
    top: 0.08em;
  }

  #municipalityModal .block ul li {
    margin-bottom: 8px;
    padding-left: 16px;
  }

  #municipalityModal .tile-cap {
    font-size: 13px;
  }

  #municipalityModal .city-switcher {
    padding: 16px 16px max(18px, env(safe-area-inset-bottom, 0px));
  }

  #municipalityModal .city-switch-select,
  #municipalityModal .city-switch-select option {
    font-size: 18px; /* ネイティブ選択肢の可読性 */
  }

  #municipalityModal .city-switch-face {
    width: 100%;
    min-height: 56px;
    padding: 16px 18px;
    font-size: 18px;
    border-radius: 10px;
  }

  #municipalityModal .city-switch-face .material-icons {
    font-size: 22px;
  }

  #municipalityModal .city-switch-face-text {
    font-size: 18px;
  }

  #municipalityModal .caption-overlay {
    font-size: 13px;
    padding: 28px 14px 12px;
  }
}

/* ===== City detail content (shared by popup & page) ===== */
.carousel-wrap { overflow: hidden; position: relative; }

.photo-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
}

.photo-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.photo-carousel::-webkit-scrollbar { display: none; }

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(24, 24, 23, 0.45);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.carousel-wrap:hover .carousel-nav,
.carousel-wrap:focus-within .carousel-nav {
  opacity: 1;
  pointer-events: auto;
}

.carousel-wrap.is-single .carousel-nav {
  display: none;
}

.carousel-nav:hover,
.carousel-nav:focus-visible {
  background: rgba(24, 24, 23, 0.72);
  outline: none;
}

.carousel-nav.is-prev { left: 10px; }
.carousel-nav.is-next { right: 10px; }
.carousel-nav .material-icons { font-size: 22px; }

@media (hover: none) {
  .carousel-nav {
    opacity: 1;
    pointer-events: auto;
  }
}

.photo-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.photo-slide .ph {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--g-300);
  overflow: hidden;
}

.photo-slide .ph img:not(.ph-blur),
.thumb-item .ph img,
.access-photos .ph img,
.all-grid .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* TOPカルーセル: 余白埋め用のぼかし背景 */
.photo-slide .ph.is-blur-fill img[data-photo-img] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.photo-slide .ph .ph-blur {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: blur(32px) saturate(1.05);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
  display: none;
  -webkit-user-drag: none;
  user-select: none;
}

.photo-slide .ph.is-portrait .ph-blur {
  display: block;
}

.photo-slide .ph.is-portrait img[data-photo-img] {
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.ph img {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ph.is-loaded img {
  opacity: 1;
}

.ph.is-error img,
.ph.is-empty img {
  display: none;
}

.ph-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}

.ph.is-loading .ph-state-loading,
.ph.is-error .ph-state-error,
.ph.is-empty .ph-state-empty {
  display: flex;
}

.ph-state .material-icons {
  font-size: 28px;
}

.ph-state-loading {
  color: var(--g-600);
  background: repeating-linear-gradient(
    -45deg,
    #d9d9d6,
    #d9d9d6 8px,
    #ececeb 8px,
    #ececeb 16px
  );
}

.ph-state-error {
  color: #7a1f1f;
  background: #f6dddd;
}

.ph-state-empty {
  color: var(--g-600);
  background: #e8e8e6;
}

.ph-state strong {
  font-size: 13px;
}

.ph-file {
  font-size: 10px;
  word-break: break-all;
  opacity: 0.85;
  max-width: 90%;
}

.thumb-item .ph,
.access-photos .ph,
.all-grid .ph {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--g-200);
  border-radius: 4px;
  overflow: hidden;
}

.all-grid .ph {
  aspect-ratio: 1;
}

.thumb-item.more {
  position: relative;
}

.thumb-item.more .count {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  height: calc(100% - 1.6em);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: rgba(24, 24, 23, 0.45);
  border-radius: 4px 4px 0 0;
  pointer-events: none;
}

.photo-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--g-600);
  background: var(--g-100);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--g-200);
}

.photo-status.is-none {
  background: #f3f3f1;
  border-color: var(--g-300);
}

.photo-status.is-ok {
  background: #edf5ef;
  border-color: #c7dbc9;
}

.photo-status strong { color: var(--g-800); }

.load-live.is-ok { color: var(--ok); font-weight: 700; }
.load-live.is-error { color: #8b1e1e; font-weight: 700; }
.load-live.is-none { color: var(--g-600); font-weight: 700; }
.load-live.is-loading { color: var(--g-600); }

.status-box {
  font-size: 12px;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

.status-box.is-ok {
  color: var(--ok);
  background: #edf5ef;
  border: 1px solid #c7dbc9;
}

.status-box.is-none {
  color: var(--g-600);
  background: #f3f3f1;
  border: 1px solid var(--g-300);
}

.hint-text {
  font-size: 12px;
  color: var(--g-500);
  margin-bottom: 8px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.legend-item {
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--g-300);
}

.legend-item.is-ok { background: #edf5ef; color: var(--ok); border-color: #c7dbc9; }
.legend-item.is-loading { background: #ececeb; color: var(--g-600); }
.legend-item.is-error { background: #f6dddd; color: #7a1f1f; border-color: #e2b0b0; }
.legend-item.is-none { background: #f3f3f1; color: var(--g-600); }

.focus-chip.is-none .count,
.focus-chip.is-low .count,
.city-count.is-none {
  color: var(--warn);
}

.city-count.is-ok { color: var(--ok); }

.caption-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 28px 14px 10px;
  background: linear-gradient(to top, rgba(24,24,23,0.8), rgba(24,24,23,0));
  color: #fff;
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

.cat-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(24,24,23,0.65);
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}

.photo-slide .ph .empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g-500);
  font-size: 13px;
  gap: 6px;
}

.dot-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}

.dot-nav button {
  width: 18px;
  height: 3px;
  border: none;
  border-radius: 1px;
  background: var(--g-300);
  cursor: pointer;
  padding: 0;
}

.dot-nav button.active { background: var(--g-800); }

.content { padding: 16px; }

.city-hero {
  position: static;
  display: block;
  height: auto;
  width: auto;
  padding: 18px 48px 12px 18px;
  background: linear-gradient(180deg, #f7fafc, #fff);
  border-bottom: 1px solid var(--g-200);
  box-shadow: none;
  z-index: auto;
}

.city-name-hero {
  margin: 0;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--g-900);
}

.migrant-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--g-700);
}

.migrant-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.migrant-num {
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
}

.migrant-unit {
  font-size: 14px;
  font-weight: 700;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.title-row h2 { font-size: 18px; font-weight: 900; }

.badge {
  font-size: 11px;
  border: 1px solid var(--g-400);
  color: var(--g-700);
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--g-700);
  color: var(--g-800);
  background: var(--g-50);
  font-size: 13px;
  padding: 11px;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 10px;
  cursor: pointer;
}

.cta-btn .material-icons { font-size: 16px; }

.cta-btn.is-primary {
  background: var(--g-900);
  color: #fff;
  border-color: var(--g-900);
  margin-bottom: 14px;
}

.interview-cta-track {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.interview-cta-track::-webkit-scrollbar { display: none; }

.interview-cta-track.is-single .interview-cta {
  flex: 1 1 auto;
  width: 100%;
  min-width: 100%;
}

.interview-cta-track.is-scrollable .interview-cta {
  flex: 0 0 min(78%, 280px);
  width: min(78%, 280px);
  scroll-snap-align: start;
}

.interview-cta {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--g-300);
  border-radius: 8px;
  background: #fff;
  color: var(--g-800);
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.interview-cta:hover,
.interview-cta:focus-visible {
  border-color: var(--g-700);
  background: var(--g-50);
  outline: none;
  transform: translateY(-1px);
}

.interview-cta.is-disabled {
  color: var(--g-500);
  background: var(--g-100, #f3f4f5);
  cursor: default;
  pointer-events: none;
}

.interview-cta.is-disabled .interview-cta-title {
  color: var(--g-500);
}

.interview-cta.is-disabled .interview-cta-label {
  display: none;
}

.interview-cta-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  background: var(--g-100, #f3f4f5);
  display: block;
}

.interview-cta-thumb.is-empty {
  display: grid;
  place-items: center;
  color: var(--g-500);
}

.interview-cta-thumb.is-empty .material-icons {
  font-size: 22px;
}

.interview-cta-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.interview-cta-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--g-900);
}

.interview-cta-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--g-700);
}

.interview-cta-label .material-icons {
  font-size: 14px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--g-300);
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  font-size: 12px;
  color: var(--g-500);
  padding: 10px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--g-900);
  font-weight: 700;
  border-bottom-color: var(--g-900);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.block { margin-bottom: 35px; } /* 22px + 本文1文字分(13px) */
.block:last-child { margin-bottom: 0; }
.block h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--g-900);
  margin: 0 0 12px;
  padding: 0;
  border-bottom: none;
  line-height: 1.35;
}

.block h3::before {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 1.05em;
  background: #fd0884;
  border-radius: 1px;
}

.block.is-secondary h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--g-900);
  border-bottom: none;
}

.block.is-secondary p {
  color: var(--g-600);
}

.block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.block ul li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 6px;
  list-style: none;
  text-align: left;
}

.block ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc((1.75em - 4px) / 2);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fd0884;
}

.block p { font-size: 13px; color: var(--g-700); }

.access-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 0;
  border-top: 1px solid var(--g-200);
  color: var(--g-700);
  line-height: 1.75;
}

.access-line:first-of-type { border-top: none; }

.access-line .material-icons {
  flex: 0 0 auto;
  display: block !important;
  font-size: 1.15em !important;
  line-height: 1 !important;
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.access-line-text {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  line-height: inherit;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 6px;
}

.thumb-item .cap {
  display: block;
  font-size: 10px;
  color: var(--g-600);
  margin-top: 4px;
  line-height: 1.4;
  text-align: center;
}

/* All photos strip for visual judgment */
.all-photos {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--g-300);
}

.all-photos h3 {
  font-size: 12px;
  color: var(--g-600);
  margin-bottom: 8px;
}

.all-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.all-grid figure {
  margin: 0;
  position: relative;
}

.all-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background: var(--g-200);
}

.all-grid figcaption {
  font-size: 9px;
  color: var(--g-500);
  margin-top: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.all-grid .slot {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(24,24,23,0.7);
  color: #fff;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
}

.access-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.access-photos figure {
  margin: 0;
}

.access-photos img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 6px;
  background: var(--g-200);
}

.access-photos figcaption {
  font-size: 11px;
  color: var(--g-600);
  margin-top: 4px;
}

.note-box {
  font-size: 12px;
  color: var(--g-600);
  background: #f7f1e8;
  border: 1px solid #e6d5bc;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
}

/* ===== Full page mode ===== */
.page-view[hidden] { display: none !important; }

.page-view {
  background: #fff;
  border: 1px solid var(--g-200);
  border-radius: 14px;
  overflow: hidden;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 12px 14px 0;
  border: 1px solid var(--g-300);
  background: var(--g-50);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--g-800);
}

.back-btn .material-icons { font-size: 18px; }

.page-shell {
  max-width: 720px;
  margin: 0 auto;
}

.page-shell .carousel-wrap {
  border-radius: 0;
}

.page-shell .content {
  padding: 20px 18px 40px;
}

.page-shell .title-row h2 {
  font-size: 24px;
}

.page-shell .all-grid {
  grid-template-columns: repeat(4, 1fr);
}

.page-shell .thumb-row {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

html.is-locked {
  overflow: hidden;
}

html.is-lightbox-open {
  overflow: hidden;
}

/* ===== Unified photo grid ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.photo-grid > .ph.is-empty {
  grid-column: 1 / -1;
  position: relative;
  min-height: 160px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--g-200);
}

.photo-tile {
  margin: 0;
  min-width: 0;
}

.photo-tile .ph {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--g-200);
}

.photo-tile .ph img,
.photo-tile .ph [data-photo-img] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.photo-tile figcaption {
  margin-top: 6px;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tile-cat {
  font-size: 10px;
  color: var(--g-500);
}

.tile-cap {
  font-size: 11px;
  color: var(--g-700);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-tile .ph.is-zoomable {
  cursor: zoom-in;
}

.photo-tile .ph.is-zoomable .zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(24, 24, 23, 0.55);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ph.is-zoomable {
  cursor: zoom-in;
}

.ph.is-zoomable .zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(24, 24, 23, 0.55);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ===== Lightbox ===== */
.photo-lightbox[hidden] {
  display: none !important;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10100; /* 市町村ポップアップ(10050)より上 */
  display: grid;
  place-items: center;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
}

.photo-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(100% - 24px, 960px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.photo-lightbox-image {
  max-width: 100%;
  max-height: calc(92vh - 64px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #111;
}

.photo-lightbox-caption {
  color: #fff;
  font-size: 13px;
  text-align: center;
  margin: 0;
  max-width: 90%;
}

.photo-lightbox-close,
.photo-lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-lightbox-close {
  top: -6px;
  right: -6px;
}

.photo-lightbox-nav.is-prev {
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
}

.photo-lightbox-nav.is-next {
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
}

@media (min-width: 720px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .photo-lightbox-nav.is-prev { left: -48px; }
  .photo-lightbox-nav.is-next { right: -48px; }
}

@media (max-width: 860px) {
  .main-panel {
    grid-template-columns: 1fr;
  }

  .city-list {
    max-height: 360px;
  }
}


/* ===== City switcher ===== */
.city-switcher {
  padding: 14px 16px 18px;
  background: #fff;
  border-top: 1px solid var(--g-200);
}

.city-switch-control {
  position: relative;
  display: block;
}

.city-switch-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 16px; /* iOS zoom prevention（下限） */
}

.city-switch-select option {
  font-size: 16px;
}

.city-switch-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--g-800);
  border-radius: 8px;
  background: var(--g-900);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  box-sizing: border-box;
}

.city-switch-face .material-icons {
  font-size: 18px;
}

.city-switch-face-text {
  line-height: 1.3;
}

.city-switch-control:focus-within .city-switch-face {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.city-switch-control:hover .city-switch-face {
  background: var(--g-700);
  border-color: var(--g-700);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
