/* ==========================================================================
   TOKYO DISNEY RESORT COMPREHENSIVE GUIDE
   公式アプリ品質デザインシステム（ロイヤルネイビー × シャンパンゴールド × 上質オフホワイト）
   ========================================================================== */

:root {
  /* コア・パレット */
  --navy-950: #071426;
  --navy-900: #0b1f3a;
  --navy-800: #132e52;
  --navy-700: #1d406e;
  --navy-100: #eaf0f7;
  --navy-50: #f4f7fb;

  --gold-600: #a47e36;
  --gold-500: #c5a059;
  --gold-400: #d6b676;
  --gold-100: #f8f1e1;

  --surface-page: #f6f7f9;
  --surface-card: #ffffff;
  --surface-subtle: #eff2f6;
  --border-hairline: #e2e7ef;
  --border-strong: #c8d2e0;

  --ink-primary: #1a2433;
  --ink-secondary: #4c5a6e;
  --ink-muted: #7b889b;

  /* パーク識別アクセント */
  --tdl-accent: #b81956;
  --tdl-soft: #fdf2f6;
  --tds-accent: #0c6e97;
  --tds-soft: #eef7fb;

  --park-accent: var(--tdl-accent);
  --park-soft: var(--tdl-soft);

  /* サービスバッジ配色 */
  --badge-dpa-bg: #4c2378;
  --badge-sr-bg: #0f6b63;
  --badge-mo-bg: #1b5c96;
  --badge-molimit-bg: #8f3d16;
  --badge-ps-bg: #7c5c1f;
  --badge-res-bg: #9f1239;
  --badge-heart: #cc2966;

  /* 待ち時間・混雑ヒートマップ（数値＋色グラデーション） */
  --hm-0-bg: #eef2f6; --hm-0-fg: #64748b; /* 運営外・休止 */
  --hm-1-bg: #e0f2fe; --hm-1-fg: #075985; /* 空き: 〜15分 / 指数0-25 */
  --hm-2-bg: #dcfce7; --hm-2-fg: #166534; /* 快適: 20-35分 / 指数26-45 */
  --hm-3-bg: #fef9c3; --hm-3-fg: #854d0e; /* 普通: 40-60分 / 指数46-64 */
  --hm-4-bg: #ffedd5; --hm-4-fg: #9a3412; /* やや混雑: 65-90分 / 指数65-79 */
  --hm-5-bg: #fee2e2; --hm-5-fg: #991b1b; /* 混雑: 95-125分 / 指数80-90 */
  --hm-6-bg: #f3e8ff; --hm-6-fg: #6b21a8; /* 超混雑: 130分〜 / 指数91-100 */

  /* 寸法・影・書体 */
  --max-w: 1120px;
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 3px rgba(11, 31, 58, 0.05);
  --shadow-sm: 0 4px 12px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 10px 28px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 22px 54px rgba(7, 20, 38, 0.28);

  --font-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}

body[data-park="tds"] {
  --park-accent: var(--tds-accent);
  --park-soft: var(--tds-soft);
}

/* ==========================================================================
   リセット ＆ プルトゥリフレッシュ完全無効化
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
  scroll-behavior: smooth;
  background: var(--navy-900);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-primary);
  background: var(--surface-page);
  line-height: 1.65;
  overscroll-behavior-y: none;
  touch-action: pan-x pan-y;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--navy-700); text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg.tdr-svg { display: block; flex-shrink: 0; }

/* ==========================================================================
   グローバルヘッダー（スクロール連動スマート縮小仕様）
   ========================================================================== */
.tdr-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hairline);
  box-shadow: 0 4px 16px rgba(11, 31, 58, 0.06);
  transition: box-shadow 0.24s ease;
}

/* 最上段ブランドバー */
.tdr-topbar {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(197, 160, 89, 0.32);
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.tdr-topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  transition: padding 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.tdr-topbar-left {
  display: flex;
  align-items: center;
}

.tdr-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(197, 160, 89, 0.48);
  background: rgba(255, 255, 255, 0.08);
  color: #f8f1e1;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, padding 0.22s ease;
  white-space: nowrap;
}
.tdr-sync-pill:hover { background: rgba(197, 160, 89, 0.22); }
.tdr-sync-pill:active { transform: scale(0.96); }
.tdr-sync-pill.is-syncing .tdr-sync-ico svg { animation: tdr-spin 0.85s linear infinite; }
.tdr-sync-ico { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; }

.tdr-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #ffffff;
  user-select: none;
  line-height: 1.05;
}
.tdr-logo-eyebrow {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-400);
  margin-bottom: 2px;
  transition: opacity 0.2s ease, max-height 0.2s ease;
  max-height: 14px;
  overflow: hidden;
}
.tdr-logo-main {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.tdr-logo-script {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.02em;
  color: #ffffff;
  transition: font-size 0.22s ease;
}
.tdr-logo-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-400);
}

.tdr-topbar-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.tdr-icon-action {
  position: relative;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: opacity 0.15s ease;
}
.tdr-icon-action:hover { opacity: 0.8; }
.tdr-icon-action .ico-slot { width: 19px; height: 19px; display: grid; place-items: center; }
.tdr-fav-action { color: #f5b4cc; }
.tdr-fav-count {
  position: absolute;
  top: -3px;
  right: -2px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  border-radius: var(--r-pill);
  padding: 0 3px;
}

/* メインナビ（赤枠相当） */
.tdr-nav-primary {
  background: #ffffff;
  border-bottom: 1px solid var(--border-hairline);
}
.tdr-nav-primary-list {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.nav-red-btn {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
  color: var(--ink-secondary);
  transition: color 0.16s ease, background 0.16s ease, padding 0.22s ease;
}
.nav-red-btn:hover { background: var(--navy-50); color: var(--navy-900); }
.nav-red-btn .nav-ico {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  transition: width 0.22s ease, height 0.22s ease;
}
.nav-red-btn .nav-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  transition: font-size 0.22s ease;
}
.nav-red-btn.is-active {
  color: var(--navy-900);
  font-weight: 700;
}
.nav-red-btn.is-active .nav-ico { color: var(--park-accent); }
.nav-red-btn.is-active::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--park-accent), var(--gold-500));
}

/* サブナビ（青枠相当） */
.tdr-nav-secondary {
  background: var(--surface-subtle);
}
.tdr-nav-secondary-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
.tdr-nav-secondary-list {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 5px 10px;
  gap: 6px;
  transition: padding 0.22s ease;
}
.tdr-nav-secondary-list::-webkit-scrollbar { display: none; }
.tdr-nav-secondary-list li { flex: 0 0 auto; }

.nav-blue-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.16s ease;
}
.nav-blue-btn .blue-ico { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; }
.nav-blue-btn:hover { background: rgba(11, 31, 58, 0.06); color: var(--navy-900); }
.nav-blue-btn.is-active {
  background: var(--navy-900);
  color: #ffffff;
  border-color: var(--navy-900);
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.18);
}
.nav-blue-btn.is-active .blue-ico { color: var(--gold-400); }
.tdr-nav-scroll-fade {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(90deg, rgba(239, 242, 246, 0) 0%, var(--surface-subtle) 85%);
  pointer-events: none;
}

/* ★ スマート縮小状態（下スクロール時に滑らかにミニサイズ化・上部残存） */
.tdr-header.is-compact .tdr-topbar-inner { padding: 4px 12px; }
.tdr-header.is-compact .tdr-logo-eyebrow { opacity: 0; max-height: 0; margin-bottom: 0; }
.tdr-header.is-compact .tdr-logo-script { font-size: 16px; }
.tdr-header.is-compact .tdr-sync-pill { padding: 3px 8px; font-size: 10px; }
.tdr-header.is-compact .tdr-icon-action span:not(.ico-slot) { display: none; }
.tdr-header.is-compact .tdr-icon-action .ico-slot { width: 17px; height: 17px; }
.tdr-header.is-compact .nav-red-btn { padding: 5px 2px 4px; gap: 1px; }
.tdr-header.is-compact .nav-red-btn .nav-ico { width: 16px; height: 16px; }
.tdr-header.is-compact .nav-red-btn .nav-label { font-size: 9px; }
.tdr-header.is-compact .tdr-nav-secondary-list { padding: 3px 10px; }
.tdr-header.is-compact .nav-blue-btn { padding: 3px 9px; font-size: 10px; }

/* ==========================================================================
   メインレイアウト・ページ見出し・パーク切替ピル・エレガント区切り線
   ========================================================================== */
.tdr-main {
  min-height: 72dvh;
  padding-bottom: 72px;
}
.tdr-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 14px;
}

.tdr-page-head {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 14px 8px;
}
.tdr-breadcrumb {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-600);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.tdr-title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-bottom: 14px;
}
.tdr-page-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0 40px;
}
.tdr-title-heart {
  position: absolute;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.16s ease;
}
.tdr-title-heart.is-fav {
  border-color: var(--badge-heart);
  color: var(--badge-heart);
  background: #fdf2f6;
}

/* 公式アプリ風 TDL / TDS セグメントスイッチ */
.tdr-park-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 520px;
  margin: 0 auto 14px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border-hairline);
}
.park-switch-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.park-switch-btn[data-park-btn="tdl"].is-active {
  background: var(--tdl-accent);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(184, 25, 86, 0.28);
}
.park-switch-btn[data-park-btn="tds"].is-active {
  background: var(--tds-accent);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(12, 110, 151, 0.28);
}

/* シャンパンゴールドの繊細ディバイダー */
.tdr-gold-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}
.tdr-gold-divider::before,
.tdr-gold-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.55), transparent);
}
.tdr-gold-divider-crest {
  width: 24px;
  height: 16px;
  color: var(--gold-500);
  display: grid;
  place-items: center;
}

/* セクション見出し */
.tdr-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 24px 0 12px;
}
.tdr-sec-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tdr-sec-title::before {
  content: "";
  width: 3.5px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-500), var(--park-accent));
  display: inline-block;
}
.tdr-sec-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-700);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
}

/* ==========================================================================
   4:3 統一メディア枠 ＆ 画像差し替えオーバーレイ
   ========================================================================== */
.tdr-media-43 {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--navy-900);
}
.tdr-media-43 > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.tdr-media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
}
.tdr-media-fallback-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-400);
  margin-bottom: 4px;
}
.tdr-media-fallback-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 画像差し替えボタン（4:3枠の右上角に上品に配置） */
.tdr-img-edit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(11, 31, 58, 0.72);
  backdrop-filter: blur(6px);
  color: #f8f1e1;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.86;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.tdr-img-edit-btn:hover {
  opacity: 1;
  background: var(--navy-900);
  transform: scale(1.06);
}

/* ==========================================================================
   HOME 4:3 手動スワイプ対応カルーセル ＆ ステータスカード
   ========================================================================== */
.tdr-hero-shell {
  max-width: var(--max-w);
  margin: 14px auto 0;
  padding: 0 14px;
}
.tdr-hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--navy-950);
  touch-action: pan-y;
}
.tdr-hero-track {
  display: flex;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.tdr-hero-slide {
  min-width: 100%;
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 460px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  user-select: none;
}
.tdr-hero-slide-bg {
  position: absolute;
  inset: 0;
}
.tdr-hero-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tdr-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 20, 38, 0.08) 20%, rgba(7, 20, 38, 0.86) 100%);
  z-index: 2;
  pointer-events: none;
}
.tdr-hero-content {
  position: relative;
  z-index: 3;
  padding: 20px 18px 34px;
  color: #ffffff;
  width: 100%;
}
.tdr-hero-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(197, 160, 89, 0.92);
  color: var(--navy-950);
  margin-bottom: 6px;
}
.tdr-hero-title {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
}
.tdr-hero-period {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
}

.tdr-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(11, 31, 58, 0.56);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tdr-hero-prev { left: 10px; }
.tdr-hero-next { right: 10px; }

.tdr-hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}
.tdr-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  border: none;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  padding: 0;
  transition: all 0.22s ease;
}
.tdr-hero-dot.is-active {
  width: 22px;
  background: var(--gold-400);
}

/* ステータスグリッド */
.tdr-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tdr-stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
}
.tdr-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.tdr-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.25;
}
.tdr-stat-sub {
  font-size: 11px;
  color: var(--ink-secondary);
  margin-top: 3px;
}

/* ==========================================================================
   カード・リスト・タグ・ボタン共通コンポーネント
   ========================================================================== */
.tdr-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 12px;
}

.tdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.tdr-btn:active { transform: scale(0.97); }
.tdr-btn-navy { background: var(--navy-900); color: #ffffff; }
.tdr-btn-primary { background: var(--park-accent); color: #ffffff; }
.tdr-btn-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: #ffffff; }
.tdr-btn-outline { background: #ffffff; color: var(--navy-900); border-color: var(--border-strong); }
.tdr-btn-outline:hover { background: var(--navy-50); border-color: var(--navy-800); }
.tdr-btn-sm { padding: 6px 12px; font-size: 11px; }

.tdr-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.tdr-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  white-space: nowrap;
}
.tdr-tag-dpa { background: var(--badge-dpa-bg); border-color: var(--badge-dpa-bg); color: #ffffff; }
.tdr-tag-sr { background: var(--badge-sr-bg); border-color: var(--badge-sr-bg); color: #ffffff; }
.tdr-tag-mo { background: var(--badge-mo-bg); border-color: var(--badge-mo-bg); color: #ffffff; }
.tdr-tag-molimit { background: var(--badge-molimit-bg); border-color: var(--badge-molimit-bg); color: #ffffff; }
.tdr-tag-ps { background: var(--badge-ps-bg); border-color: var(--badge-ps-bg); color: #ffffff; }
.tdr-tag-res { background: var(--badge-res-bg); border-color: var(--badge-res-bg); color: #ffffff; }
.tdr-tag-warn { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.tdr-tag-tdl { background: var(--tdl-soft); border-color: rgba(184, 25, 86, 0.25); color: var(--tdl-accent); }
.tdr-tag-tds { background: var(--tds-soft); border-color: rgba(12, 110, 151, 0.25); color: var(--tds-accent); }
.tdr-tag-both { background: var(--navy-100); border-color: rgba(11, 31, 58, 0.2); color: var(--navy-800); }

/* 絞り込みフォーム */
.tdr-filter-box {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}
.tdr-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.tdr-select, .tdr-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  background: #ffffff;
  font-size: 13px;
  color: var(--ink-primary);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.tdr-select:focus, .tdr-input:focus {
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px rgba(19, 46, 82, 0.12);
}

/* 横スクロールカード列 */
.tdr-hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tdr-hscroll::-webkit-scrollbar { display: none; }

/* 施設一覧カード（4:3サムネ固定） */
.tdr-facility-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.tdr-facility-row {
  display: grid;
  grid-template-columns: 124px 1fr 18px;
  gap: 12px;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  padding: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, transform 0.14s ease;
}
.tdr-facility-row:hover {
  border-color: var(--gold-500);
  transform: translateY(-1px);
}
.tdr-facility-thumb {
  width: 124px;
  border-radius: var(--r-xs);
  overflow: hidden;
}

/* チップ群 */
.tdr-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tdr-chip-scroll {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin-bottom: 12px;
}
.tdr-chip-scroll::-webkit-scrollbar { display: none; }

.tdr-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tdr-chip:hover { border-color: var(--navy-800); color: var(--navy-900); }
.tdr-chip.is-active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #ffffff;
}

/* ==========================================================================
   15分刻み待ち時間表（左端「アトラクション名」列 完全横スクロール固定）
   ========================================================================== */
.tdr-matrix-wrap {
  position: relative;
  overflow: auto;
  max-height: 70dvh;
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.tdr-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.tdr-matrix th,
.tdr-matrix td {
  border-right: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
}

/* 上部時間ヘッダー行（縦スクロール固定） */
.tdr-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--navy-50);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 11px;
  min-width: 52px;
  border-bottom: 2px solid var(--border-strong);
}

/* ★ 左端「アトラクション名」列（横スクロール完全固定・文字重なり防止シャドウ付） */
.tdr-matrix tbody th,
.tdr-matrix thead th:first-child {
  position: sticky;
  left: 0;
  text-align: left;
  min-width: 138px;
  max-width: 162px;
  white-space: normal;
  line-height: 1.28;
  padding: 8px 10px;
  border-right: 1px solid var(--border-strong);
  box-shadow: 3px 0 8px rgba(11, 31, 58, 0.08);
}
.tdr-matrix tbody th {
  z-index: 6;
  background: #ffffff;
}
.tdr-matrix thead th:first-child {
  z-index: 10;
  background: var(--navy-900);
  color: #f8f1e1;
  border-bottom: 2px solid var(--gold-500);
}

.matrix-attr-link {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: block;
  width: 100%;
}
.matrix-attr-link:hover { color: var(--park-accent); text-decoration: underline; }
.matrix-attr-sub {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* ヒートマップ配色クラス */
.hm-0 { background: var(--hm-0-bg); color: var(--hm-0-fg); font-size: 10px; }
.hm-1 { background: var(--hm-1-bg); color: var(--hm-1-fg); font-weight: 700; }
.hm-2 { background: var(--hm-2-bg); color: var(--hm-2-fg); font-weight: 700; }
.hm-3 { background: var(--hm-3-bg); color: var(--hm-3-fg); font-weight: 700; }
.hm-4 { background: var(--hm-4-bg); color: var(--hm-4-fg); font-weight: 700; }
.hm-5 { background: var(--hm-5-bg); color: var(--hm-5-fg); font-weight: 700; }
.hm-6 { background: var(--hm-6-bg); color: var(--hm-6-fg); font-weight: 700; }

/* ==========================================================================
   過去混雑・予想カレンダー（数値＋色ヒートマップ・スマホ崩れ完全防止）
   ========================================================================== */
.tdr-cal-shell {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  padding: 12px 10px;
  box-shadow: var(--shadow-xs);
}
.tdr-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.tdr-cal-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 0 6px;
  color: var(--ink-muted);
}
.tdr-cal-dow.is-sun { color: #be123c; }
.tdr-cal-dow.is-sat { color: #1d4ed8; }

.tdr-cal-cell {
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 5px 2px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tdr-cal-cell:hover { transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.tdr-cal-cell.is-selected {
  outline: 2px solid var(--navy-900);
  outline-offset: -1px;
}
.tdr-cal-cell.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.cal-day-num {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.cal-index-num {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.cal-sub-meta {
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.85;
}

/* ==========================================================================
   ディズニー風カスタムSVGマップ（ズーム・パン対応）
   ========================================================================== */
.tdr-map-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 560px;
  background: #dceef5;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  touch-action: none;
}
.tdr-map-viewport.is-mini {
  aspect-ratio: 4 / 3;
  max-height: 260px;
}
.tdr-map-canvas {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 0.18s ease-out;
  cursor: grab;
}
.tdr-map-canvas:active { cursor: grabbing; }
.tdr-map-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tdr-map-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-900);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   BGS 人物図鑑（横2〜3列カードグリッド）＆ タイムライン ＆ リンク
   ========================================================================== */
.bgs-char-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.bgs-char-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.bgs-char-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-500);
}
.bgs-char-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bgs-char-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
}
.bgs-char-role {
  font-size: 10px;
  color: var(--ink-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bgs-char-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--gold-100);
  color: #6d4c11;
  border: 1px solid rgba(197, 160, 89, 0.55);
  border-radius: 4px;
  padding: 0 6px;
  font-weight: 700;
  font-size: 0.93em;
  cursor: pointer;
  margin: 0 2px;
}
.bgs-char-link:hover { background: #f2e4c4; }

.bgs-timeline {
  position: relative;
  padding-left: 22px;
}
.bgs-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-500), var(--navy-800));
}
.bgs-tl-item {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.bgs-tl-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--gold-500);
}
.bgs-tl-year {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #f8f1e1;
  background: var(--navy-900);
  padding: 2px 10px;
  border-radius: var(--r-pill);
}

/* ==========================================================================
   スペックテーブル ＆ 詳細レイアウト
   ========================================================================== */
.tdr-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tdr-spec-table th,
.tdr-spec-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-hairline);
  text-align: left;
  vertical-align: top;
}
.tdr-spec-table th {
  width: 34%;
  background: var(--navy-50);
  color: var(--ink-secondary);
  font-weight: 600;
}

/* ==========================================================================
   モーダル群 ＆ 固定検索バー（フォーカス飛び・押し出し完全防止）
   ========================================================================== */
.tdr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 38, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
}
.tdr-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 600px);
  max-height: 86dvh;
  background: #ffffff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1010;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tdr-modal-lg { width: min(95vw, 780px); }
.tdr-modal-search {
  top: 6dvh;
  transform: translateX(-50%);
  height: 86dvh;
  max-height: 86dvh;
}
.tdr-modal[hidden],
.tdr-modal-backdrop[hidden] { display: none !important; }

.tdr-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--navy-900);
  color: #ffffff;
  border-bottom: 1px solid rgba(197, 160, 89, 0.35);
}
.tdr-modal-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f8f1e1;
}
.tdr-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tdr-modal-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ★ 検索モーダル専用：上部入力バー完全固定 ＋ 下部結果のみ独立スクロール */
.tdr-search-sticky {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #ffffff;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-hairline);
  box-shadow: 0 4px 10px rgba(11, 31, 58, 0.05);
}
.tdr-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.tdr-search-input-ico {
  position: absolute;
  left: 12px;
  color: var(--ink-muted);
  width: 17px;
  height: 17px;
  pointer-events: none;
}
.tdr-search-field {
  width: 100%;
  padding: 10px 38px 10px 38px;
  border: 1.5px solid var(--navy-800);
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--ink-primary);
  background: var(--navy-50);
  outline: none;
}
.tdr-search-field:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
}
.tdr-search-clear {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--border-hairline);
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tdr-search-filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 8px;
  scrollbar-width: none;
}
.tdr-search-filter-row::-webkit-scrollbar { display: none; }
.tdr-scope-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
}
.tdr-scope-chip.is-active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #f8f1e1;
}
.tdr-search-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 20px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   一番上に戻るボタン ＆ 洗練フローティング通知トースト
   ========================================================================== */
.tdr-fab-top {
  position: fixed;
  right: 16px;
  bottom: 22px;
  z-index: 880;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(197, 160, 89, 0.65);
  background: rgba(11, 31, 58, 0.92);
  backdrop-filter: blur(8px);
  color: var(--gold-400);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 20, 38, 0.28);
  transition: transform 0.18s ease, opacity 0.2s ease;
}
.tdr-fab-top[hidden] { display: none; }
.tdr-fab-top:active { transform: scale(0.92); }

/* ★ 洗練フローティング通知（ダークガラス調・ゴールド縁取り・SVG付） */
.tdr-toast-host {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;
  pointer-events: none;
  width: max-content;
  max-width: min(90vw, 400px);
}
.tdr-toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(11, 31, 58, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 160, 89, 0.65);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px rgba(7, 20, 38, 0.30);
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.tdr-toast.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.tdr-toast-ico {
  width: 16px;
  height: 16px;
  color: var(--gold-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   フッター ＆ ローディング
   ========================================================================== */
.tdr-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
  padding: 32px 16px 44px;
  font-size: 11px;
  border-top: 2px solid var(--gold-500);
}
.tdr-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.tdr-footer-brand {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--gold-400);
  margin-bottom: 6px;
}
.tdr-footer-status {
  display: inline-block;
  font-size: 11px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(197, 160, 89, 0.32);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
}
.tdr-footer-notice {
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.56);
  margin-bottom: 18px;
}
.tdr-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.footer-link-btn {
  background: none;
  border: none;
  padding: 3px 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}
.footer-link-btn:hover { color: var(--gold-400); text-decoration: underline; }
.footer-admin-link { color: var(--gold-400); }
.tdr-footer-copy { color: rgba(255, 255, 255, 0.42); font-size: 10px; }

.tdr-loading-box {
  padding: 64px 16px;
  text-align: center;
  color: var(--ink-secondary);
  font-size: 13px;
}
.tdr-spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--border-hairline);
  border-top-color: var(--gold-500);
  border-right-color: var(--navy-900);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: tdr-spin 0.85s linear infinite;
}
@keyframes tdr-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   タブレット・PCレスポンシブ最適化
   ========================================================================== */
@media (min-width: 720px) {
  .tdr-logo-script { font-size: 25px; }
  .tdr-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tdr-facility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bgs-char-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .tdr-cal-cell { min-height: 70px; padding: 8px 4px; }
  .cal-day-num { font-size: 12px; }
  .cal-index-num { font-size: 17px; }
  .nav-red-btn .nav-label { font-size: 11px; }
  .tdr-hero-title { font-size: 26px; }
}
