/* ===== 基本 ===== */
html {
  scroll-behavior: smooth;
}
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 固定ナビの高さぶん、ページ内リンクの着地位置を下げる */
section[id] {
  scroll-margin-top: 5rem;
}

/* ===== ヒーロー：見どころ写真がゆっくり移り変わる背景 ===== */
.hero {
  background: #0b1120; /* 画像読み込み前・読み込み失敗時の下地 */
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(3px) brightness(0.78) saturate(1.05);
  opacity: 0;
  transform: scale(1.06);
  animation: hero-slide-fade 18s ease-in-out infinite;
}
.hero-slide--1 { animation-delay: 0s; }
.hero-slide--2 { animation-delay: 6s; }
.hero-slide--3 { animation-delay: 12s; }
@keyframes hero-slide-fade {
  0%   { opacity: 0; transform: scale(1.06); }
  8%   { opacity: 1; }
  30%  { opacity: 1; transform: scale(1.14); }
  38%  { opacity: 0; transform: scale(1.14); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
    opacity: 0;
    transform: none;
  }
  .hero-slide--1 {
    opacity: 1;
  }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(230, 0, 18, 0.15), transparent 55%),
    linear-gradient(180deg, rgba(8, 11, 20, 0.72) 0%, rgba(8, 11, 20, 0.5) 45%, rgba(8, 11, 20, 0.82) 100%);
}
.hero-copy {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.8);
}
/* 画面幅が狭く2行になる場合でも、1文字だけが孤立して改行されないようにする。
   break-allは念のための保険（環境によっては極太フォント＋大きい文字サイズの
   組み合わせで折り返し自体が起きず画面からはみ出すケースがあったため、
   確実に折り返せるようにしている）。balanceで2行になった時の分量を揃える。 */
.hero-title {
  text-wrap: balance;
  word-break: break-all;
}

/* ===== カウントダウン（黒すりガラスパネル） ===== */
.cd-panel {
  display: inline-block;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #374151;
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  backdrop-filter: blur(8px);
}
.cd-num {
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  color: #fff;
}
.cd-sep {
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  padding-bottom: 1.1rem;
}
.cd-label {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.4rem;
}
.cd-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.2rem;
}

/* ===== 下へのスクロール誘導 ===== */
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue {
    animation: cue-bob 2s ease-in-out infinite;
  }
}
@keyframes cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ===== スケジュール：中央線のタイムライン（md以上で左右交互） ===== */
.gtl {
  position: relative;
}
.gtl::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #4b5563 15%, #4b5563 85%, transparent);
}
.tl-day {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
}
.tl-day:last-child {
  margin-bottom: 0;
}
.tl-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 4px solid #0F172A;
  background: #E60012;
  color: #fff;
  font-weight: 900;
  display: grid;
  place-items: center;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.tl-day:nth-child(even) .tl-dot {
  background: #D4AF37;
  color: #0F172A;
}
.tl-card {
  background: #1e293b;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}
.tl-day-head {
  font-weight: 700;
  font-size: 1.1rem;
  color: #D4AF37;
  margin-bottom: 0.6rem;
}
@media (min-width: 768px) {
  .gtl::before {
    left: 50%;
    margin-left: -1px;
  }
  .tl-day {
    width: calc(50% - 2.5rem);
    padding-left: 0;
  }
  .tl-day:nth-child(odd) {
    margin-left: auto;
  }
  .tl-day:nth-child(odd) .tl-dot {
    left: -4.5rem;
  }
  .tl-day:nth-child(even) {
    margin-right: auto;
  }
  .tl-day:nth-child(even) .tl-dot {
    left: auto;
    right: -4.5rem;
  }
}

/* ===== マップの凡例：地図中の表記ボックスの見本（ぼんち村・こども縁日） ===== */
.map-badge {
  flex-shrink: 0;
  display: inline-block;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 0.3rem;
}

/* ===== スクロールで現れる ===== */
.reveal, .reveal-fade {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal { transform: translateY(20px); }
.reveal.is-visible, .reveal-fade.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-fade { opacity: 1; transform: none; transition: none; }
}

/* ===== FAQ アコーディオン ===== */
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary {
  list-style: none;
  position: relative;
  padding-right: 1.8rem;
  cursor: pointer;
}
details.faq-item summary::after {
  content: '';
  position: absolute;
  right: 0.2rem;
  top: 0.55rem;
  width: 9px;
  height: 9px;
  border-right: 2px solid #E60012;
  border-bottom: 2px solid #E60012;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
details.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

/* ===== AI案内ボタン ===== */
.chat-fab {
  position: fixed;
  bottom: 1.1rem;
  right: 1.1rem;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 9999px;
  background: #E60012;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(230, 0, 18, 0.4);
  z-index: 1000;
  transition: background 0.2s ease, transform 0.2s ease;
}
.chat-fab:hover {
  background: #b91c1c;
  transform: translateY(-2px);
}

/* ===== キーボード操作時のフォーカス ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #E60012;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 交通規制の凡例（線の見本） ===== */
.reg-line {
  flex-shrink: 0;
  display: inline-block;
  width: 1.6rem;
  height: 3px;
  border-radius: 2px;
  margin-top: 0.45rem;
}
/* 通行止めマークの見本（地図中の⊘アイコンと対応） */
.regmark-sample {
  flex-shrink: 0;
  display: inline-block;
  position: relative;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 9999px;
  background: #334155;
}
.regmark-sample::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: linear-gradient(135deg, transparent 44%, #fff 47%, #fff 53%, transparent 56%);
}

/* ===== マップ拡大モーダル ===== */
.map-modal-btn {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.map-modal-btn:hover {
  background: rgba(15, 23, 42, 0.85);
}
#map-modal-content {
  transition: none;
}
/* PCでのドラッグ移動を滑らかにする（画像・要素の標準ドラッグ選択を無効化） */
#map-modal-stage {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
#map-modal-stage img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
