:root {
  color-scheme: light;
  --bg: #f2f5fa;
  --card: #ffffff;
  --text: #2a3542;
  --sub: #74839a;
  --line: #e6ebf2;
  --accent: #3a6db8;
  --accent-soft: #eaf1f9;
  --header-from: #2a4a94;
  --header-to: #4a72c4;
  --green: #4a9d5f;
  --lime: #93a850;
  --orange: #d68f4c;
  --amber: #c9993a;
  --red: #c95c5c;
  --gray: #a3aebb;
  --chip-yellow-bg: #fff3cd;
  --chip-yellow-fg: #8a6d00;
  --chip-green-bg: #e2f2e5;
  --chip-green-fg: #217a36;
  --radius: 12px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10192c;
  --card: #1a2540;
  --text: #dde5ef;
  --sub: #93a2b8;
  --line: #2b3a5c;
  --accent: #7fa9e0;
  --accent-soft: #24365a;
  --header-from: #1a3468;
  --header-to: #33549e;
  --green: #6cbc80;
  --lime: #aec26e;
  --orange: #e2a56c;
  --amber: #d9b25e;
  --red: #d97e7e;
  --gray: #66748a;
  --chip-yellow-bg: #4a3d10;
  --chip-yellow-fg: #e8cc6a;
  --chip-green-bg: #17331e;
  --chip-green-fg: #7fd694;
}
html[data-theme="dark"] img.wiki-img { opacity: .92; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* header / nav */
header.site {
  background: linear-gradient(120deg, var(--header-from), var(--header-to));
  color: #fff;
  padding: 14px 20px 0;
  position: relative;
  border-bottom: 2px solid rgba(201, 164, 78, .55);
}
.hdr-row {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 10px; margin-bottom: 8px;
}
.hdr-row h1 { margin: 0; font-size: 20px; font-weight: 700; text-align: center; grid-column: 2; }
.hdr-row h1 .sub { font-size: 12px; font-weight: 400; opacity: .8; margin-left: 8px; }
#menu-btn {
  grid-column: 1; justify-self: start;
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px; padding: 4px 12px; font-size: 18px; line-height: 1; cursor: pointer;
}
#menu-btn:hover { background: rgba(255,255,255,.28); }
.hdr-spacer { grid-column: 3; width: 44px; }  /* 中央タイトルの対称確保 */

/* メニューポップアップ（上から被さる・全画面にはしない） */
.menu-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45);
}
.menu-overlay.open { display: block; }
.menu-panel {
  background: var(--card); color: var(--text);
  max-width: 440px; margin: 0 auto;
  border-radius: 0 0 16px 16px; padding: 14px 18px 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  animation: menuDrop .18s ease;
}
@keyframes menuDrop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.menu-close { text-align: right; }
.menu-close button {
  background: none; border: none; color: var(--sub); font-size: 20px; cursor: pointer; padding: 2px 6px;
}
.menu-sec { margin-top: 10px; }
.menu-sec-ttl { font-size: 12px; color: var(--sub); font-weight: 700; margin-bottom: 8px; }
.menu-parks, .menu-langs, .menu-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-park, .menu-lang, .menu-theme {
  text-decoration: none; cursor: pointer;
  background: var(--bg); color: var(--text); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 16px; font-size: 13.5px; font-weight: 600;
}
.menu-park.active, .menu-lang.active, .menu-theme.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.menu-howto {
  background: var(--accent-soft); color: var(--text); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.menu-howto:hover { border-color: var(--accent); }

/* 初見チュートリアル */
.tut-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55); align-items: center; justify-content: center; padding: 20px;
}
.tut-overlay.open { display: flex; }
.tut-card {
  position: relative; background: var(--card); color: var(--text);
  max-width: 380px; width: 100%; border-radius: 18px; padding: 26px 22px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4); animation: tutIn .2s ease;
}
@keyframes tutIn { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.tut-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--sub); font-size: 18px; cursor: pointer; }
.tut-step { font-size: 11px; color: var(--sub); font-weight: 700; letter-spacing: .5px; }
.tut-title { margin: 4px 0 10px; font-size: 19px; color: var(--accent); }
.tut-body { font-size: 14px; line-height: 1.7; }
.tut-legend { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 8px; }
.tut-chip { color: #fff; font-weight: 700; font-size: 11px; padding: 3px 9px; border-radius: 999px; }
.tut-iconrow { display: flex; gap: 8px; margin-top: 2px; }
.tut-dots { display: flex; gap: 6px; justify-content: center; margin: 16px 0 14px; }
.tut-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tut-dots span.on { background: var(--accent); }
.tut-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tut-nav { display: flex; gap: 8px; }
.tut-skip { background: none; border: none; color: var(--sub); font-size: 13px; cursor: pointer; }
.tut-prev { background: var(--bg); color: var(--text); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tut-next { background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 9px 22px; font-size: 14px; font-weight: 700; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .tut-card { animation: none; } }

html[data-fontsize="s"] body { font-size: 13px; }
html[data-fontsize="l"] body { font-size: 17px; }
nav.tabs { display: flex; gap: 4px; }
nav.tabs a {
  color: #cfe0f5; text-decoration: none; padding: 8px 16px;
  border-radius: 10px 10px 0 0; font-size: 14px; font-weight: 600;
}
nav.tabs a.active { background: var(--bg); color: var(--accent); }
nav.tabs a:not(.active):hover { background: rgba(255,255,255,.12); }

main { max-width: 1080px; margin: 0 auto; padding: 20px 16px 0; }
main > .card:last-of-type { margin-bottom: 12px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--sub); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* wait chip */
.chip {
  display: inline-block; min-width: 58px; text-align: center;
  padding: 3px 10px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px;
  transition: background-color .35s ease;  /* 待ち時間の色変化をなめらかに（WP6） */
}
.chip.na { background: var(--gray); font-weight: 500; font-size: 12px; }

/* dashboard table */
table.waits { width: 100%; border-collapse: collapse; }
table.waits th {
  text-align: left; font-size: 12px; color: var(--sub); font-weight: 600;
  padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap;
  cursor: pointer; user-select: none;
}
table.waits th .arrow { font-size: 10px; }
table.waits td { white-space: nowrap; }
table.waits td.ridename { white-space: normal; }
html[data-theme="dark"] table.waits th { color: #cdd9ea; }
html[data-theme="dark"] table.waits th .arrow { color: #ffffff; }
table.waits td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.waits tr:hover td { background: var(--accent-soft); }
.ridename { font-weight: 600; }
.ridename .en { display: block; font-size: 11px; color: var(--sub); font-weight: 400; }
.badge {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: var(--chip-yellow-bg); color: var(--chip-yellow-fg); margin-left: 6px; vertical-align: middle;
}
.badge.sr { background: var(--chip-green-bg); color: var(--chip-green-fg); }
.ridename { cursor: pointer; display: flex; align-items: center; gap: 10px; }
.ridename .thumb {
  width: 48px; height: 36px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); flex-shrink: 0; background: var(--bg);
}
.thumb-ph { display: inline-block; }
.ridename-text { min-width: 0; }
.name-wrap { min-width: 0; flex: 1; }
/* 長期ランキング（画像付き・線区切り） */
.longrank-col { flex: 1; min-width: 280px; }
.longrank-col h3 {
  font-size: 15px; color: var(--accent);
  margin: 4px 0 6px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px; border-bottom: 1px solid var(--line);
}
.rank-row:last-child { border-bottom: none; }
.rank-row .rank-no {
  width: 24px; text-align: right; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.rank-row .thumb {
  width: 52px; height: 38px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); flex-shrink: 0;
}
.rank-row .rank-name { min-width: 0; font-size: 13.5px; }
.rank-row .rank-avg {
  margin-left: auto; flex-shrink: 0; font-size: 12.5px;
  color: var(--sub); font-variant-numeric: tabular-nums;
}
.pass-pill {
  display: inline-block; background: #7b52c4; color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.5; margin-bottom: 2px; white-space: nowrap;
}
.name-wrap .pass-pill, .pick-name .pass-pill { display: inline-block; margin-left: 0; }
/* 無料の優先入場（TDR 40周年プライオリティパス）— 有料(紫)と区別する緑系 */
.pp-pill {
  display: inline-block; background: #0e8a5f; color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.5; margin-bottom: 2px; white-space: nowrap;
}
.name-wrap .pp-pill, .pick-name .pp-pill { display: inline-block; margin-left: 0; }
/* パーク別テーマ色（ヘッダー・アクセント・下線）。季節テーマが優先 */
/* TDL: パープル×ピンク（夢・城） */
html[data-park="tdl"] { --header-from: #3c2a6e; --header-to: #7a4fb0; --accent: #8b6cc9; --accent-soft: #efe9f9; }
html[data-park="tdl"] header.site { border-bottom-color: rgba(233, 160, 200, .6); }
html[data-park="tdl"][data-theme="dark"] { --accent: #a98fd8; --accent-soft: #2e2450; }
/* TDS: 深いマリンブルー×エメラルド（海） */
html[data-park="tds"] { --header-from: #0d3b52; --header-to: #1a6e84; --accent: #2a8ea6; --accent-soft: #e5f2f5; }
html[data-park="tds"] header.site { border-bottom-color: rgba(80, 200, 190, .55); }
html[data-park="tds"][data-theme="dark"] { --accent: #58b7c9; --accent-soft: #123642; }
/* 富士急: 富士急レッド×ダークグレー */
html[data-park="fjq"] { --header-from: #6e1520; --header-to: #c0273a; --accent: #c14a58; --accent-soft: #f9e9eb; }
html[data-park="fjq"] header.site { border-bottom-color: rgba(255, 255, 255, .35); }
html[data-park="fjq"][data-theme="dark"] { --accent: #d97983; --accent-soft: #3c1a20; }
/* レゴランド: レゴレッド×イエロー */
html[data-park="lego"] { --header-from: #b01f24; --header-to: #e03a30; --accent: #cf4030; --accent-soft: #fdeee8; }
html[data-park="lego"] header.site { border-bottom-color: rgba(255, 205, 3, .75); }
html[data-park="lego"][data-theme="dark"] { --accent: #e8766a; --accent-soft: #421d18; }
/* ピューロランド: ピューロピンク×パープル */
html[data-park="puro"] { --header-from: #b03a78; --header-to: #e06aa8; --accent: #cc5590; --accent-soft: #fbeaf3; }
html[data-park="puro"] header.site { border-bottom-color: rgba(255, 255, 255, .45); }
html[data-park="puro"][data-theme="dark"] { --accent: #e089b5; --accent-soft: #462034; }
/* よみうりランド: フレッシュグリーン×スカイ */
html[data-park="yomi"] { --header-from: #1c6e3c; --header-to: #3ba05e; --accent: #3a9159; --accent-soft: #e9f5ec; }
html[data-park="yomi"] header.site { border-bottom-color: rgba(140, 210, 250, .6); }
html[data-park="yomi"][data-theme="dark"] { --accent: #66bb85; --accent-soft: #1c3a28; }
html[data-park="tdc"] { --header-from: #0369a1; --header-to: #0ea5e9; --accent: #0284c7; --accent-soft: #e6f3f9; }
html[data-park="tdc"][data-theme="dark"] { --accent: #38bdf8; --accent-soft: #183a55; }
html[data-park="naga"] { --header-from: #0369a1; --header-to: #0ea5e9; --accent: #0284c7; --accent-soft: #e6f3f9; }
html[data-park="naga"][data-theme="dark"] { --accent: #38bdf8; --accent-soft: #183a55; }
html[data-park="sea"] { --header-from: #0369a1; --header-to: #0891b2; --accent: #0284c7; --accent-soft: #e6f3f9; }
html[data-park="sea"][data-theme="dark"] { --accent: #38bdf8; --accent-soft: #183a55; }
html[data-park="ghibli"] { --header-from: #3f6b45; --header-to: #6a9c5a; --accent: #4b7f52; --accent-soft: #edf2ee; }
html[data-park="ghibli"][data-theme="dark"] { --accent: #84b98c; --accent-soft: #27393f; }
html[data-park="htb"] { --header-from: #0e3a7a; --header-to: #2563eb; --accent: #1d4ed8; --accent-soft: #e8edfb; }
html[data-park="htb"][data-theme="dark"] { --accent: #60a5fa; --accent-soft: #203555; }
html[data-park="shima"] { --header-from: #E11D2E; --header-to: #F5A524; --accent: #C2410C; --accent-soft: #f9ece7; }
html[data-park="shima"][data-theme="dark"] { --accent: #FB923C; --accent-soft: #3f312f; }
html[data-park="joy"] { --header-from: #4338ca; --header-to: #06b6d4; --accent: #0e7490; --accent-soft: #e7f1f4; }
html[data-park="joy"][data-theme="dark"] { --accent: #22d3ee; --accent-soft: #143e53; }
html[data-park="nasu"] { --header-from: #1f7a45; --header-to: #37a862; --accent: #2e9e5b; --accent-soft: #eaf5ef; }
html[data-park="nasu"][data-theme="dark"] { --accent: #37c274; --accent-soft: #183b3a; }

/* 季節テーマ（自動切替） */
html[data-season="halloween"] { --header-from: #3d1a5b; --header-to: #c75300; }
html[data-season="halloween"] header.site { border-bottom-color: #ff8c00; }
html[data-season="christmas"] { --header-from: #7a1023; --header-to: #0e5c2f; }
html[data-season="christmas"] header.site { border-bottom-color: #e6b84c; }

.sr-pill {
  display: inline-block; background: var(--green); color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.5; margin-bottom: 2px; white-space: nowrap;
}
/* 全遊園地タブ: 遊園地一覧（縦並びカード・画像付き・各サイトへリンク） */
.allparks-lead { font-size: 14px; font-weight: 700; margin: 2px 0 12px; color: var(--accent); }
.allparks-list { display: flex; flex-direction: column; }
/* 囲み線なし（ユーザー指定）。行区切りは薄い下線のみ、クリックは即可能 */
.ap-card {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 9px 4px; border-bottom: 1px solid var(--line); color: inherit; transition: background .15s;
}
.ap-card:last-child { border-bottom: none; }
.ap-card:hover { background: var(--accent-soft); }
.ap-img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; background: rgba(127,127,127,.12); }
.ap-img-ph { display: inline-block; }
.ap-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ap-name { font-size: 15px; font-weight: 700; }
.ap-meta { font-size: 12px; color: var(--sub); }
.ap-avg { margin-left: 8px; }
.ap-arrow { flex: 0 0 auto; font-size: 22px; color: var(--accent); opacity: .7; padding-right: 4px; }
/* AIプランの体験型チュートリアル（コーチマーク: 対象をリング＋周囲を暗転、tipはクリック可） */
.ptut { position: fixed; inset: 0; z-index: 3000; pointer-events: none; transition: opacity .2s; }
.ptut-ring {
  position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.6), 0 0 0 2px var(--accent) inset;
  outline: 2px solid #fff; outline-offset: 1px; transition: left .25s, top .25s, width .25s, height .25s;
}
.ptut-tip {
  position: fixed; pointer-events: auto; background: var(--card); color: var(--text);
  border: 1px solid var(--accent); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: left .25s, top .25s;
}
.ptut-step { font-size: 11px; font-weight: 700; color: var(--accent); }
.ptut-text { font-size: 14px; font-weight: 700; margin: 4px 0 10px; line-height: 1.5; }
.ptut-skip { font-size: 12px; color: var(--sub); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
/* 終了予定バッジ（最終営業日。赤系で強調＝重要情報） */
.closing-pill {
  display: inline-block; background: #dc2626; color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.4; white-space: nowrap;
}
.name-wrap .badge-row .closing-pill { margin: 0; vertical-align: baseline; }
/* 整理券バッジ（エリア入場整理券・アンバー系でパス/SRと区別） */
.seiriken-pill {
  display: inline-block; background: #d97706; color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.5; margin-bottom: 2px; white-space: nowrap;
}
.name-wrap .seiriken-pill, .pick-name .seiriken-pill { display: inline-block; margin-left: 0; }
/* バッジのアイコン（パス=雷/シングル=人）。currentColorで白文字色を継承 */
.pass-pill .pill-ic, .sr-pill .pill-ic { display: inline-block; vertical-align: -1px; margin-right: 2px; opacity: .95; }
.name-wrap .pass-pill, .name-wrap .sr-pill, .pick-name .pass-pill, .pick-name .sr-pill { display: inline-flex; align-items: center; }
.name-wrap .pass-pill .pill-ic, .name-wrap .sr-pill .pill-ic, .pick-name .pass-pill .pill-ic, .pick-name .sr-pill .pill-ic { vertical-align: 0; margin-right: 3px; }
/* イベント/特別版アトラクションのバッジ（例: ジュラシック～イン・ザ・ダーク～） */
/* データ未成熟パーク: 平均比較はデータが溜まるまで「収集中」表示（列自体は常に表示） */
.trend.collecting { color: var(--muted); font-size: .8em; opacity: .8; }

.special-pill {
  display: block; width: fit-content; margin-top: 3px;
  background: linear-gradient(120deg, #e0951a, #f5c243); color: #4a2f00;
  border-radius: 999px; font-size: 9.5px; font-weight: 800;
  padding: 2px 10px; letter-spacing: .2px; white-space: nowrap;
  box-shadow: 0 1px 5px rgba(224,149,26,.4);
}
.pick-name .pass-pill {
  display: inline-block; background: #7b52c4; color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.5; margin-bottom: 2px; white-space: nowrap;
}
.name-wrap .pass-pill, .pick-name .pass-pill { display: inline-block; margin-left: 0; }
/* パーク別テーマ色（ヘッダー・アクセント・下線）。季節テーマが優先 */
/* TDL: パープル×ピンク（夢・城） */
html[data-park="tdl"] { --header-from: #3c2a6e; --header-to: #7a4fb0; --accent: #8b6cc9; --accent-soft: #efe9f9; }
html[data-park="tdl"] header.site { border-bottom-color: rgba(233, 160, 200, .6); }
html[data-park="tdl"][data-theme="dark"] { --accent: #a98fd8; --accent-soft: #2e2450; }
/* TDS: 深いマリンブルー×エメラルド（海） */
html[data-park="tds"] { --header-from: #0d3b52; --header-to: #1a6e84; --accent: #2a8ea6; --accent-soft: #e5f2f5; }
html[data-park="tds"] header.site { border-bottom-color: rgba(80, 200, 190, .55); }
html[data-park="tds"][data-theme="dark"] { --accent: #58b7c9; --accent-soft: #123642; }
/* 富士急: 富士急レッド×ダークグレー */
html[data-park="fjq"] { --header-from: #6e1520; --header-to: #c0273a; --accent: #c14a58; --accent-soft: #f9e9eb; }
html[data-park="fjq"] header.site { border-bottom-color: rgba(255, 255, 255, .35); }
html[data-park="fjq"][data-theme="dark"] { --accent: #d97983; --accent-soft: #3c1a20; }
/* レゴランド: レゴレッド×イエロー */
html[data-park="lego"] { --header-from: #b01f24; --header-to: #e03a30; --accent: #cf4030; --accent-soft: #fdeee8; }
html[data-park="lego"] header.site { border-bottom-color: rgba(255, 205, 3, .75); }
html[data-park="lego"][data-theme="dark"] { --accent: #e8766a; --accent-soft: #421d18; }
/* ピューロランド: ピューロピンク×パープル */
html[data-park="puro"] { --header-from: #b03a78; --header-to: #e06aa8; --accent: #cc5590; --accent-soft: #fbeaf3; }
html[data-park="puro"] header.site { border-bottom-color: rgba(255, 255, 255, .45); }
html[data-park="puro"][data-theme="dark"] { --accent: #e089b5; --accent-soft: #462034; }
/* よみうりランド: フレッシュグリーン×スカイ */
html[data-park="yomi"] { --header-from: #1c6e3c; --header-to: #3ba05e; --accent: #3a9159; --accent-soft: #e9f5ec; }
html[data-park="yomi"] header.site { border-bottom-color: rgba(140, 210, 250, .6); }
html[data-park="yomi"][data-theme="dark"] { --accent: #66bb85; --accent-soft: #1c3a28; }

/* 季節テーマ（自動切替） */
html[data-season="halloween"] { --header-from: #3d1a5b; --header-to: #c75300; }
html[data-season="halloween"] header.site { border-bottom-color: #ff8c00; }
html[data-season="christmas"] { --header-from: #7a1023; --header-to: #0e5c2f; }
html[data-season="christmas"] header.site { border-bottom-color: #e6b84c; }

.sr-pill { display: inline-block; margin-left: 5px; }
.name-wrap .pass-pill {
  display: inline-block; background: #7b52c4; color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.5; margin-bottom: 2px; white-space: nowrap;
}
.name-wrap .pass-pill, .pick-name .pass-pill { display: inline-block; margin-left: 0; }
/* パーク別テーマ色（ヘッダー・アクセント・下線）。季節テーマが優先 */
/* TDL: パープル×ピンク（夢・城） */
html[data-park="tdl"] { --header-from: #3c2a6e; --header-to: #7a4fb0; --accent: #8b6cc9; --accent-soft: #efe9f9; }
html[data-park="tdl"] header.site { border-bottom-color: rgba(233, 160, 200, .6); }
html[data-park="tdl"][data-theme="dark"] { --accent: #a98fd8; --accent-soft: #2e2450; }
/* TDS: 深いマリンブルー×エメラルド（海） */
html[data-park="tds"] { --header-from: #0d3b52; --header-to: #1a6e84; --accent: #2a8ea6; --accent-soft: #e5f2f5; }
html[data-park="tds"] header.site { border-bottom-color: rgba(80, 200, 190, .55); }
html[data-park="tds"][data-theme="dark"] { --accent: #58b7c9; --accent-soft: #123642; }
/* 富士急: 富士急レッド×ダークグレー */
html[data-park="fjq"] { --header-from: #6e1520; --header-to: #c0273a; --accent: #c14a58; --accent-soft: #f9e9eb; }
html[data-park="fjq"] header.site { border-bottom-color: rgba(255, 255, 255, .35); }
html[data-park="fjq"][data-theme="dark"] { --accent: #d97983; --accent-soft: #3c1a20; }
/* レゴランド: レゴレッド×イエロー */
html[data-park="lego"] { --header-from: #b01f24; --header-to: #e03a30; --accent: #cf4030; --accent-soft: #fdeee8; }
html[data-park="lego"] header.site { border-bottom-color: rgba(255, 205, 3, .75); }
html[data-park="lego"][data-theme="dark"] { --accent: #e8766a; --accent-soft: #421d18; }
/* ピューロランド: ピューロピンク×パープル */
html[data-park="puro"] { --header-from: #b03a78; --header-to: #e06aa8; --accent: #cc5590; --accent-soft: #fbeaf3; }
html[data-park="puro"] header.site { border-bottom-color: rgba(255, 255, 255, .45); }
html[data-park="puro"][data-theme="dark"] { --accent: #e089b5; --accent-soft: #462034; }
/* よみうりランド: フレッシュグリーン×スカイ */
html[data-park="yomi"] { --header-from: #1c6e3c; --header-to: #3ba05e; --accent: #3a9159; --accent-soft: #e9f5ec; }
html[data-park="yomi"] header.site { border-bottom-color: rgba(140, 210, 250, .6); }
html[data-park="yomi"][data-theme="dark"] { --accent: #66bb85; --accent-soft: #1c3a28; }

/* 季節テーマ（自動切替） */
html[data-season="halloween"] { --header-from: #3d1a5b; --header-to: #c75300; }
html[data-season="halloween"] header.site { border-bottom-color: #ff8c00; }
html[data-season="christmas"] { --header-from: #7a1023; --header-to: #0e5c2f; }
html[data-season="christmas"] header.site { border-bottom-color: #e6b84c; }

.sr-pill { display: inline-block; margin-left: 5px; }
.cal-cell .wx { font-size: 10px; color: var(--sub); margin-top: 1px; }
.trend-compact { display: none; }
.bn-compact { display: none; }
.ridename:hover { color: var(--accent); text-decoration: underline; }
.areatag { font-size: 12px; color: var(--sub); white-space: nowrap; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head button {
  border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  padding: 6px 14px; cursor: pointer; font-size: 14px;
}
.cal-head .title { font-size: 18px; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: auto; grid-auto-rows: 1fr; gap: 6px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--sub); padding: 2px 0; }
.dow-0 { color: var(--red) !important; }
.dow-6 { color: var(--accent) !important; }
.cal-hours {
  font-size: 10px; color: var(--sub); margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cal-closed {
  display: inline-block; margin-top: 4px; background: var(--gray); color: #fff;
  border-radius: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px;
}
.cal-cell.closed-day { opacity: .75; }
.cal-cell .jogai {
  font-size: 8.5px; color: #fff; background: var(--red);
  border-radius: 6px; padding: 0 4px; margin-top: 2px;
  display: inline-block; white-space: nowrap; letter-spacing: -0.3px;
  max-width: 100%; overflow: hidden; box-sizing: border-box;
}
.cal-cell {
  min-height: 72px; border-radius: 8px; border: 1px solid var(--line);
  padding: 6px 8px; background: var(--card); cursor: default; position: relative;
}
.cal-cell.clickable { cursor: pointer; }
.cal-cell.clickable:hover { outline: 2px solid var(--accent); }
.cal-cell.today { outline: 2px solid var(--accent); }
.cal-cell .d { font-size: 13px; font-weight: 700; }
.cal-cell .v { font-size: 12px; margin-top: 4px; font-weight: 600; }
.cal-cell .lab { font-size: 10px; color: var(--sub); }
.cal-cell.other { visibility: hidden; }
.cal-s { display: none; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--sub); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* plan */
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; }
fieldset legend { font-size: 13px; font-weight: 700; color: var(--accent); padding: 0 6px; }
.ridepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.ridepick label { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.ridepick label .w { margin-left: auto; font-size: 12px; color: var(--sub); }
select, input[type="time"], input[type="date"] {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
  background: var(--card); color: var(--text);
}
button.primary {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 10px 26px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: filter .15s ease, transform .12s cubic-bezier(.34,1.56,.64,1);  /* バネ感（WP6） */
}
button.primary:hover { filter: brightness(1.1); }
button.primary:active { transform: scale(.94); }
button.primary:disabled { background: var(--gray); cursor: wait; transform: none; }

.result-main { display: block; }
.result-sub { display: block; font-weight: 400; font-size: 12.5px; margin-top: 2px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex; gap: 14px; padding: 10px 4px; border-bottom: 1px dashed var(--line);
  align-items: flex-start;
}
.timeline .time {
  font-weight: 700; min-width: 64px; color: var(--accent); font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
.timeline .tl-img {
  width: 64px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line);
}
.skip-warn {
  border: 2px solid var(--red); border-radius: 10px;
  background: color-mix(in srgb, var(--red) 10%, var(--card));
  color: var(--red); font-weight: 600;
  padding: 10px 12px; margin: 10px 0; font-size: 13.5px; line-height: 1.6;
}
.tips { padding-left: 20px; }
.tips li { margin: 5px 0; line-height: 1.65; }
.timeline .body { line-height: 1.55; }
.timeline .body { flex: 1; }
.timeline .walk { font-size: 12px; color: var(--sub); }
.timeline .walk, .timeline .tl-name, .timeline .wait-line { display: block; }
.timeline .tl-name { margin: 1px 0; }
.totals { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0 4px; }
.totals .t { background: var(--accent-soft); border-radius: 10px; padding: 8px 16px; font-size: 14px; }
.totals .t b { font-size: 18px; }
.tips { margin: 8px 0 0; padding-left: 20px; }
.tips li { margin-bottom: 6px; font-size: 14px; }

/* 回り方プラン（ステップUI） */
.step-head {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; margin: 16px 0 8px;
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.step-body { padding-left: 0; margin-bottom: 6px; }
.hm-group { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.hm-colon { font-weight: 700; }
.step-sec {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .5s ease, opacity .45s ease;
}
.step-sec.open { max-height: 3000px; opacity: 1; overflow: visible; }
.pick-list { padding: 0; }
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px;
}
.pick-row:last-child { border-bottom: none; }
.pick-row .thumb {
  width: 52px; height: 38px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); flex-shrink: 0; background: var(--bg);
}
.pick-row .pick-name { min-width: 0; }
.pick-row .w { margin-left: auto; font-size: 12px; color: var(--sub); white-space: nowrap; }
.pick-check {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.pick-row.on { background: var(--accent-soft); }
#ep-box {
  border: 2px solid var(--orange); border-radius: 10px;
  padding: 10px 12px; margin-top: 10px;
  background: color-mix(in srgb, var(--orange) 8%, var(--card));
}
#ep-box > p { color: var(--orange); font-weight: 700; margin-top: 0 !important; }
#ep-list label {
  font-size: 12px; display: flex; align-items: center; gap: 8px;
  min-width: 0; padding: 5px 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
#ep-list label:last-child { border-bottom: none; }
#ep-list .thumb {
  width: 46px; height: 34px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--line); flex-shrink: 0;
}
#ep-list .ep-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-row.on .pick-check { background: var(--accent); border-color: var(--accent); }

/* 回り方プラン（1列レイアウト） */
.plan-row { margin-bottom: 12px; gap: 14px; }
button.ghost {
  border: 1px solid var(--line); background: var(--card); color: var(--accent);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 14px;
}
button.ghost:hover { border-color: var(--accent); }
button.primary.big { width: 100%; padding: 14px; font-size: 16px; margin-top: 14px; }
details.fold {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; margin: 10px 0; background: var(--bg);
}
details.fold summary {
  cursor: pointer; padding: 11px 0; font-size: 14px; font-weight: 600;
  color: var(--accent); list-style-position: inside; user-select: none;
}
details.fold[open] { padding-bottom: 10px; }
.ridelist { display: block; }
.ridelist .ridelist label {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px; border-bottom: 1px solid var(--line);
  font-size: 15px; cursor: pointer;
}
.ridelist label:last-child { border-bottom: none; }
.ridelist label .w { margin-left: auto; font-size: 13px; color: var(--sub); white-space: nowrap; }
.ridelist input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }

footer.site {
  text-align: center; padding: 0 18px 20px; color: var(--sub); font-size: 12px;
}
footer.site a { color: var(--accent); }
/* 流れる横スクロール（無限ループ・ドラッグで手動スライド可） */
.marquee {
  overflow: hidden; cursor: grab;
  overscroll-behavior-x: contain; touch-action: pan-y;   /* 横は自前ドラッグ、縦はページスクロール */
}
.marquee::-webkit-scrollbar { display: none; }
.marquee.dragging { cursor: grabbing; user-select: none; }
/* transformでスクロール（サブピクセル対応・GPU合成でカクつかない） */
.mq-track { display: flex; flex-wrap: nowrap; gap: 10px; width: max-content; will-change: transform; }
.marquee.dragging .mq-track a, .marquee.dragging .mq-track img { pointer-events: none; }

/* 他の遊園地への案内（画像＋名前＋アトラクション数＋平均待ち・無限ループ） */
.footer-parks {
  padding: 16px 0 0; margin: 0;
  border-top: 1px solid var(--line);
}
.footer-park {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 0 0 auto; width: auto; min-width: 92px; padding: 8px 12px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
}
.footer-park:hover { border-color: var(--accent); }
.footer-park .fp-img {
  width: 76px; height: 52px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); display: block;
}
.footer-park .fp-name { font-weight: 700; font-size: 11.5px; text-align: center; line-height: 1.25; white-space: nowrap; }
.footer-park .fp-count { color: var(--sub); font-size: 10.5px; }
.footer-park .fp-avg { color: var(--accent); font-size: 10.5px; font-weight: 600; }

/* 全アトラクションのミニ帯（最上部・地味に一定速で流す・サブ扱いで控えめ） */
.rides-marquee {
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 5px 0; opacity: .9;
}
.rides-marquee .mq-track { padding: 0 6px; }
.mq-ride {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 2px 10px 2px 4px;
}
.mq-ride + .mq-ride { border-left: 1px solid var(--line); }
.mq-ride .mr-img {
  width: 34px; height: 28px; object-fit: cover; border-radius: 5px;
  background: var(--card); flex: 0 0 auto; display: block; opacity: .95;
}
.mq-ride .mr-body { min-width: 0; text-align: left; }
.mq-ride .mr-park { font-size: 9px; color: var(--sub); font-weight: 600; }
.mq-ride .mr-name { font-size: 11px; font-weight: 600; white-space: nowrap; }
.mq-ride .mr-pills { display: inline-flex; gap: 5px; align-items: center; }
.mq-ride .mr-name-line { display: flex; align-items: baseline; gap: 6px; }
.mq-ride .mr-wait { color: #fff; font-weight: 700; font-size: 9.5px; padding: 0 6px; border-radius: 999px; }
.mq-ride .mr-avg { color: var(--sub); font-size: 9.5px; }
/* 最下部の全アトラクション帯（パーク一覧の下）: 下線でなく上線で区切る */
.all-rides-marquee { border-bottom: none; border-top: 1px solid var(--line); margin-top: 12px; }

/* ダッシュボード: 優先/整理券/シングルのバッジをアトラクション名の上に。
   flex+gapで必ず1行・等間隔（斜め上ズレ・くっつき防止。ユーザー指定で縦幅は増やさない） */
.name-wrap .badge-row { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; line-height: 1; margin-bottom: 3px; }
.name-wrap .badge-row:empty { display: none; }
.name-wrap .badge-row .pass-pill,
.name-wrap .badge-row .seiriken-pill,
.name-wrap .badge-row .sr-pill { margin: 0; vertical-align: baseline; }

/* 一番下の自パーク表記（線で区切ってその下） */
.footer-self {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.footer-self-link { color: var(--sub); text-decoration: none; font-size: 12px; }
.footer-self-link:hover { color: var(--accent); }

/* ライド詳細モーダル */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 12px; overflow-y: auto;
}
.modal {
  background: var(--card); color: var(--text); border-radius: 14px;
  max-width: 720px; width: 100%; padding: 20px 22px; position: relative;
  border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.modal .close {
  position: absolute; top: 10px; right: 12px; border: none; background: none;
  font-size: 22px; color: var(--sub); cursor: pointer; line-height: 1;
}
.modal h2 { margin: 0 34px 4px 0; font-size: 18px; }
.modal .meta { font-size: 12px; color: var(--sub); margin-bottom: 10px; }
.modal img.wiki-img {
  float: right; max-width: 42%; height: auto; border-radius: 10px;
  margin: 0 0 10px 14px; border: 1px solid var(--line);
}
.modal .extract { font-size: 14px; line-height: 1.75; }
.modal .vsbadge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: #fff; margin: 4px 0 8px;
}
.modal .src { clear: both; font-size: 11px; color: var(--sub); margin-top: 12px; }
.modal .chartwrap { clear: both; margin-top: 12px; overflow-x: auto; }

/* 通常比バッジ（テーブル内） */
.trend { font-size: 12px; font-weight: 700; white-space: nowrap; }
.trend.low { color: var(--green); }
.trend.high { color: var(--red); }
.trend.same { color: var(--sub); font-weight: 500; }

/* パーク混雑バナー */
.crowd-banner {
  background: var(--accent-soft); border-radius: 10px; padding: 8px 14px;
  font-size: 13px; margin-bottom: 12px;
}

/* 日別ナビ */
.day-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-nav button {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 13px;
}
.day-nav button:hover { border-color: var(--accent); }
.compare-opts { display: flex; gap: 14px; font-size: 13px; margin: 8px 0; flex-wrap: wrap; }

svg.spark { display: block; }
.detail-chart { overflow-x: auto; }

svg.spark { max-width: 100%; height: auto; }
.sort-mobile { display: none; margin: 6px 0 2px; width: 100%; }

@media (max-width: 640px) {
  body { font-size: 14px; }
  main { padding: 12px 8px 0; }

  /* ヘッダー: タイトル・タブを必ず1行に収める */
  header.site { padding: 10px 10px 0; }
  .hdr-row { gap: 6px; }
  .hdr-row h1 {
    font-size: 12.5px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; min-width: 0; max-width: 100%;
  }
  .hdr-row h1 .sub { display: none; }
  .hdr-row button, .hdr-row select { padding: 3px 6px; font-size: 10px; white-space: nowrap; }
  .park-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 6px 4px 0; }
  .park-tabs a { font-size: 10.5px; padding: 2px 9px; flex-shrink: 0; }
  nav.tabs { gap: 2px; flex-wrap: nowrap; overflow: hidden; }
  nav.tabs a {
    padding: 7px 6px; font-size: 11.5px; white-space: nowrap;
    flex: 1; text-align: center;
  }

  /* バナー（天気・混雑）は小さく */
  .crowd-banner { font-size: 11px; padding: 6px 10px; line-height: 1.7; }

  .hide-sm { display: none !important; }
  .card { padding: 12px; }
  .sort-mobile { display: block; }

  /* 待ち時間一覧: 完全1行 [画像][名前(最大2行)][チップ][差] */
  #waits thead { display: none; }
  #waits, #waits tbody { display: block; }
  #waits tr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
  }
  #waits td { display: block; border: none; padding: 0; }
  #waits td.ridename { display: flex; align-items: center; flex: 1; min-width: 0; font-size: 12.5px; gap: 10px; }
  #waits .name-wrap { min-width: 0; flex: 1; }
/* 長期ランキング（画像付き・線区切り） */
.longrank-col { flex: 1; min-width: 280px; }
.longrank-col h3 {
  font-size: 15px; color: var(--accent);
  margin: 4px 0 6px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px; border-bottom: 1px solid var(--line);
}
.rank-row:last-child { border-bottom: none; }
.rank-row .rank-no {
  width: 24px; text-align: right; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.rank-row .thumb {
  width: 52px; height: 38px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); flex-shrink: 0;
}
.rank-row .rank-name { min-width: 0; font-size: 13.5px; }
.rank-row .rank-avg {
  margin-left: auto; flex-shrink: 0; font-size: 12.5px;
  color: var(--sub); font-variant-numeric: tabular-nums;
}
  #waits .ridename-text {
    min-width: 0; flex: 1; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #waits .spark-td { display: none; }
  #waits td:nth-of-type(3) { flex-shrink: 0; width: 64px; text-align: right; }
  .trend-full { display: none; }
  .trend-compact { display: inline; }
  .bn-full { display: none; }
  .bn-compact { display: inline; }
  .crowd-banner { padding: 6px 10px; font-size: 12px; }
  /* ランキング表: 枠内に収める（最大待ち列は非表示・名前は1行省略・数値はnowrap） */
  table.waits { table-layout: fixed; width: 100%; }
  table.waits th, table.waits td { font-size: 11.5px; padding: 7px 2px; }
  #rank-table th:nth-child(4), #rank-table td:nth-child(4) { display: none; }
  #rank-table th:nth-child(1), #rank-table td:nth-child(1) { width: 34px; white-space: nowrap; }
  #rank-table th:nth-child(3), #rank-table td:nth-child(3),
  #rank-table th:nth-child(5), #rank-table td:nth-child(5) { width: 54px; white-space: nowrap; }
  #rank-table td.ridename { font-size: 12px; }
  #rank-table td.ridename .thumb { width: 40px; height: 30px; }
  #rank-table .ridename-text {
    display: block; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .rank-row .thumb { width: 44px; height: 33px; }
  .rank-row .rank-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .trend { font-size: 11px; font-weight: 700; }
  .ridename .thumb { width: 54px; height: 40px; }
  .chip.na { font-size: 9px; min-width: 0; padding: 2px 4px; white-space: normal; line-height: 1.15; word-break: break-word; }
  .special-pill { white-space: normal; word-break: break-word; font-size: 8.5px; padding: 1.5px 7px; }
  #waits td:nth-of-type(2) { flex-shrink: 0; }
  #waits .chip { display: inline-block; width: 62px; text-align: center; box-sizing: border-box; }
    .chip { min-width: 48px; font-size: 13px; padding: 2px 8px; }

  /* カレンダー: スマホは短縮語のみ・補足行なし（詳細はタップ） */
  .cal-grid { gap: 2px; }
  .cal-cell { min-height: 62px; min-width: 0; padding: 5px 0; text-align: center; border-radius: 6px; }
  .cal-cell .d { font-size: 11px; }
  .cal-cell .v {
    font-size: 9.5px; margin-top: 3px; letter-spacing: -0.3px;
    white-space: nowrap; overflow: hidden;
  }
  .cal-cell .lab { display: none; }
  .cal-cell .wx { font-size: 9px; margin-top: 2px; white-space: nowrap; overflow: hidden; }
  .cal-cell .cal-hours { font-size: 8.5px; margin-top: 1px; overflow: hidden; }
  .pass-pill {
  display: inline-block; background: #7b52c4; color: #fff;
  border-radius: 999px; font-size: 8.5px; font-weight: 700;
  padding: 1px 8px; line-height: 1.5; margin-bottom: 2px; white-space: nowrap;
}
.name-wrap .pass-pill, .pick-name .pass-pill { display: inline-block; margin-left: 0; }
/* パーク別テーマ色（ヘッダー・アクセント・下線）。季節テーマが優先 */
/* TDL: パープル×ピンク（夢・城） */
html[data-park="tdl"] { --header-from: #3c2a6e; --header-to: #7a4fb0; --accent: #8b6cc9; --accent-soft: #efe9f9; }
html[data-park="tdl"] header.site { border-bottom-color: rgba(233, 160, 200, .6); }
html[data-park="tdl"][data-theme="dark"] { --accent: #a98fd8; --accent-soft: #2e2450; }
/* TDS: 深いマリンブルー×エメラルド（海） */
html[data-park="tds"] { --header-from: #0d3b52; --header-to: #1a6e84; --accent: #2a8ea6; --accent-soft: #e5f2f5; }
html[data-park="tds"] header.site { border-bottom-color: rgba(80, 200, 190, .55); }
html[data-park="tds"][data-theme="dark"] { --accent: #58b7c9; --accent-soft: #123642; }
/* 富士急: 富士急レッド×ダークグレー */
html[data-park="fjq"] { --header-from: #6e1520; --header-to: #c0273a; --accent: #c14a58; --accent-soft: #f9e9eb; }
html[data-park="fjq"] header.site { border-bottom-color: rgba(255, 255, 255, .35); }
html[data-park="fjq"][data-theme="dark"] { --accent: #d97983; --accent-soft: #3c1a20; }
/* レゴランド: レゴレッド×イエロー */
html[data-park="lego"] { --header-from: #b01f24; --header-to: #e03a30; --accent: #cf4030; --accent-soft: #fdeee8; }
html[data-park="lego"] header.site { border-bottom-color: rgba(255, 205, 3, .75); }
html[data-park="lego"][data-theme="dark"] { --accent: #e8766a; --accent-soft: #421d18; }
/* ピューロランド: ピューロピンク×パープル */
html[data-park="puro"] { --header-from: #b03a78; --header-to: #e06aa8; --accent: #cc5590; --accent-soft: #fbeaf3; }
html[data-park="puro"] header.site { border-bottom-color: rgba(255, 255, 255, .45); }
html[data-park="puro"][data-theme="dark"] { --accent: #e089b5; --accent-soft: #462034; }
/* よみうりランド: フレッシュグリーン×スカイ */
html[data-park="yomi"] { --header-from: #1c6e3c; --header-to: #3ba05e; --accent: #3a9159; --accent-soft: #e9f5ec; }
html[data-park="yomi"] header.site { border-bottom-color: rgba(140, 210, 250, .6); }
html[data-park="yomi"][data-theme="dark"] { --accent: #66bb85; --accent-soft: #1c3a28; }

/* 季節テーマ（自動切替） */
html[data-season="halloween"] { --header-from: #3d1a5b; --header-to: #c75300; }
html[data-season="halloween"] header.site { border-bottom-color: #ff8c00; }
html[data-season="christmas"] { --header-from: #7a1023; --header-to: #0e5c2f; }
html[data-season="christmas"] header.site { border-bottom-color: #e6b84c; }

.sr-pill { font-size: 8px; padding: 1px 6px; }
  .cal-full { display: none; }
  .cal-s { display: inline; }
  .timeline .time { min-width: 52px; font-size: 13px; }
  .timeline .tl-img { width: 52px; height: 38px; }
  .timeline li { gap: 8px; padding: 9px 2px; }
  .timeline .body { min-width: 0; }
  .timeline .walk, .timeline .tl-name, .timeline .wait-line, .result-sub {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .timeline .walk { font-size: 11px; }
  .timeline .wait-line { font-size: 12px; }
    #result h2 { font-size: 15px; }
  /* 合計欄: 2列グリッドで揃える（改行のばらつき防止） */
  .totals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .totals .t {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 12px; text-align: center;
  }
  .totals .t:nth-child(odd):last-child { grid-column: 1 / -1; }
}

/* ===== WP6 モーション（CSS/WAAPI・0KB・transform/opacityのみ・reduced-motion対応） ===== */
/* 待ち時間チップが変化した瞬間のポップ */
@keyframes chipBump { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }
.chip.bump { animation: chipBump .4s cubic-bezier(.34,1.56,.64,1); }
/* カードの初回入場（軽いフェードアップ） */
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card.anim-in { animation: cardIn .35s ease both; }
/* AIプラン結果のスプリング入場 */
@keyframes resultPop { 0% { opacity: 0; transform: translateY(12px) scale(.98); } 60% { transform: translateY(0) scale(1.01); } 100% { opacity: 1; transform: none; } }
#result.pop { animation: resultPop .45s cubic-bezier(.34,1.4,.64,1) both; }
/* 成功チェック（プラン生成完了の合図・SVGパスを描画） */
.plan-check { width: 22px; height: 22px; vertical-align: -5px; margin-right: 6px; }
.plan-check circle { fill: var(--green); }
.plan-check path { stroke: #fff; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 20; stroke-dashoffset: 20; animation: checkDraw .4s .12s ease forwards; }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
/* タイムラインの各行が順に入場 */
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.timeline li.anim-in { animation: rowIn .3s ease both; }

@media (prefers-reduced-motion: reduce) {
  .chip, button.primary { transition: none; }
  .chip.bump, .card.anim-in, #result.pop, .plan-check path, .timeline li.anim-in { animation: none; }
  .plan-check path { stroke-dashoffset: 0; }
  /* マーキーは自動スクロールを止め、手動の横スクロールに */
  .mq-track { animation: none; }
  .marquee { overflow-x: auto; }
}
