/* 旅跡（たびあと）— アイコン配色に合わせたテラコッタ×クリーム */
:root {
  --bg: #FBF3E9;
  --surface: #FFFFFF;
  --ink: #3A2E28;
  --muted: #8A7B70;
  --terracotta: #E2714B;
  --terracotta-d: #C85A39;
  --coral: #F08A5D;
  --green: #2E5D4E;
  --line: #EADFD2;
  --shadow: 0 2px 10px rgba(58, 46, 40, .08);
  --radius: 16px;
  --nav-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overscroll-behavior-y: none;
}

/* ---- ヘッダ ---- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.app-header img { width: 32px; height: 32px; border-radius: 8px; }
.app-header h1 { font-size: 18px; margin: 0; letter-spacing: .04em; }
.app-header .sub { font-size: 11px; color: var(--muted); margin-left: auto; }
.app-home { display: flex; align-items: center; gap: 10px; background: none; border: none; padding: 0; margin: 0; cursor: pointer; color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
.app-home:active { opacity: .6; }

/* ---- ビュー ---- */
main { padding: 16px 16px calc(var(--nav-h) + 24px); max-width: 720px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h2.section { font-size: 15px; color: var(--muted); margin: 4px 0 12px; font-weight: 600; }

/* ---- カード ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card a { color: var(--terracotta-d); text-decoration: underline; text-underline-offset: 2px; }
.ikyu-link { display: inline-block; font-size: 11px; font-weight: 700; color: #fff !important; background: var(--terracotta); border-radius: 999px; padding: 1px 8px; text-decoration: none !important; vertical-align: middle; white-space: nowrap; }
.card .meta { font-size: 12px; color: var(--muted); }

/* ---- ボタン ---- */
button { font-family: inherit; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; background: var(--terracotta); color: #fff;
}
.btn:active { background: var(--terracotta-d); }
.btn.ghost { background: transparent; color: var(--terracotta); border: 1.5px solid var(--terracotta); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 16px); z-index: 15;
  width: 60px; height: 60px; border-radius: 50%; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--terracotta); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.1;
  box-shadow: 0 6px 18px rgba(226, 113, 75, .45);
}
.fab:active { background: var(--terracotta-d); }
/* 2つ目の FAB（チェックイン）はカメラ FAB の左隣に */
.fab.fab-left { right: 90px; }
/* 旅行開始前：不可の見た目（タップは可能＝ガイドのトーストを出す） */
.fab.fab-disabled { background: #C9BDB4; box-shadow: none; opacity: .85; }
.fab.fab-disabled:active { background: #C9BDB4; }

/* ---- フォーム ---- */
label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
input, textarea, select {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
}
textarea { resize: vertical; min-height: 56px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---- イマ・フォーカス ---- */
.now-focus {
  background: linear-gradient(135deg, var(--terracotta), var(--coral));
  color: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.now-focus .kicker { font-size: 12px; opacity: .9; letter-spacing: .08em; }
.now-focus .title { font-size: 22px; font-weight: 700; margin: 4px 0; }
.now-focus .when { font-size: 13px; opacity: .95; }
.now-focus.idle { background: #fff; color: var(--muted); border: 1px dashed var(--line); box-shadow: none; }
/* 予定なし日：白囲みをやめたプレーンテキスト表示 */
.now-focus.plain { background: transparent; color: var(--ink); border: none; box-shadow: none; padding: 2px 2px 12px; }
.now-focus.plain .idle-lead { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.now-focus.plain .idle-next { font-size: 14px; color: var(--ink); margin: 0 0 8px; line-height: 1.55; }
.now-focus.plain .idle-next b { color: var(--terracotta); }
.now-focus.plain .idle-trip { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.45; }

.timeline-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.timeline-item .t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--terracotta); min-width: 48px; }
.timeline-item.done { opacity: .45; }
.timeline-item.current { background: #FFF4ED; border-radius: 10px; padding: 8px; }

/* ---- マイルストン（場所・ビジュアル付き） ---- */
.milestone { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
/* フォーカス中（現在の項目）は枠・文字を少し大きく強調 */
.milestone.current { border-color: var(--terracotta); border-width: 2px; background: #FFF6F1; padding: 14px; box-shadow: 0 3px 12px rgba(226, 113, 75, .20); }
.milestone.current .ms-visual { width: 66px; height: 66px; }
.milestone.current .ms-visual .ms-emoji { font-size: 36px; }
.milestone.current .ms-time { font-size: 14px; }
.milestone.current .ms-place { font-size: 19px; }
.milestone.current .ms-memo { font-size: 13px; }
.milestone.done { opacity: .5; }
.ms-visual { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line); }
.ms-visual .ms-img { width: 100%; height: 100%; object-fit: cover; }
.ms-visual .ms-emoji { font-size: 30px; line-height: 1; }
.ms-body { min-width: 0; }
.ms-time { font-size: 12px; font-weight: 700; color: var(--terracotta); font-variant-numeric: tabular-nums; }
.ms-place { font-size: 16px; font-weight: 700; }
.ms-memo { font-size: 12px; color: var(--muted); }

/* ---- なう！のマイルストン一覧の見出し・日区切り ---- */
.tl-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 4px 0 10px; }
.tl-day { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 800; color: var(--terracotta); background: #FFF1EA; border: 1px solid #F3D8CC; border-radius: 999px; padding: 3px 12px; margin: 14px 0 8px; }
.tl-day:first-of-type { margin-top: 2px; }
.tl-day small { font-size: 11px; font-weight: 600; color: var(--muted); }

/* Day 切替タブ（複数日のとき） */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 2px 0 12px; padding-bottom: 2px; }
.day-tab { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; font-family: inherit; font-size: 13px; font-weight: 800; color: var(--muted); background: #F4EEEA; border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; cursor: pointer; line-height: 1.2; }
.day-tab small { font-size: 10px; font-weight: 600; color: var(--muted); }
.day-tab.is-today { box-shadow: 0 0 0 1px var(--coral) inset; }
.day-tab.active { color: #fff; background: linear-gradient(135deg, var(--terracotta), var(--coral)); border-color: transparent; }
.day-tab.active small { color: rgba(255,255,255,.9); }

/* ---- 移動セグメント（マイルストンとは区別） ---- */
.move-seg { display: flex; align-items: center; gap: 8px; margin: 0 0 0 28px; padding: 8px 0; color: var(--green); position: relative; }
.move-seg::before { content: ''; position: absolute; left: 0; top: -2px; bottom: -2px; width: 0; border-left: 2px dashed var(--green); opacity: .45; }
.move-ic { font-size: 18px; padding-left: 12px; }
.move-label { font-size: 12px; font-weight: 600; }

/* ---- マイルストン枠内の発着番線・経由（発を強調） ---- */
.ms-rail { font-size: 12px; color: var(--ink); margin-top: 4px; line-height: 1.4; }
.ms-rail .rail-dep { font-weight: 600; }
.ms-rail .rail-dep b { color: var(--terracotta); font-size: 14px; font-weight: 800; background: rgba(226,113,75,.12); padding: 1px 6px; border-radius: 6px; margin: 0 1px; }
.ms-rail .rail-arr { color: var(--muted); margin-left: 5px; }
.ms-rail .rail-arr-solo { color: var(--ink); font-weight: 600; }
.ms-via { font-size: 10px; color: var(--muted); opacity: .9; margin-top: 2px; line-height: 1.35; }

/* ---- 旅行プランカード（一覧） ---- */
.trip-card .trip-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.trip-icon { flex: 0 0 auto; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
/* 旅行プランのアイキャッチ（ChatGPT イラスト） */
/* 一覧カード：上部の小さめバナー（高さ固定でコンパクト） */
.trip-cover { margin: -14px -14px 12px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; cursor: pointer; height: 110px; background: #f1e7e0; }
.trip-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-cover:active { opacity: .85; }
/* 詳細（スケジュール）：上部に大きく表示するヒーローバナー */
.plan-cover { margin: 12px 0 6px; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: #f1e7e0; box-shadow: var(--shadow); }
.plan-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-card .chev { margin-left: auto; color: var(--muted); font-size: 24px; line-height: 1; padding-left: 6px; }
.trip-total { margin-top: 4px; font-size: 20px; font-weight: 800; color: var(--terracotta); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; }
.trip-total .tt-ic { font-size: 18px; }
.trip-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.trip-tag { font-size: 11px; background: #fdeee7; color: var(--terracotta-d); border: 1px solid #f0d3c6; border-radius: 999px; padding: 1px 8px; }

/* ---- タグ編集（追加・削除） ---- */
.tag-edit-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.tag-edit { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; background: var(--terracotta); color: #fff; border-radius: 999px; padding: 3px 6px 3px 12px; }
.tag-edit .tag-x { width: 18px; height: 18px; border: none; background: rgba(255,255,255,.25); color: #fff; border-radius: 50%; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.tag-suggest-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.tag-suggest { font-size: 12px; background: #fff; color: var(--terracotta-d); border: 1px dashed #e3b6ac; border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.tag-suggest:active { background: #fdeee7; }

/* ---- 一覧フィルタ（年度・エリア・タグ） ---- */
.trip-filters { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.filter-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 2px 0; }
.filter-row::-webkit-scrollbar { height: 0; }
.filter-row .f-ic { flex: 0 0 auto; font-size: 13px; color: var(--muted); width: 18px; text-align: center; }
.filter-chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.filter-chip.active { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.trip-card .trip-head:active { opacity: .7; }

/* ---- 日タブ（スケジュール詳細） ---- */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.day-tabs::-webkit-scrollbar { height: 0; }
.day-tab { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 12px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; line-height: 1.2; }
.day-tab small { font-size: 10px; font-weight: 400; }
.day-tab.active { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }

/* ---- 旅程付帯情報（宿・料金・持ち物） ---- */
.cost-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cost-table td { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.cost-table td.amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.cost-table .note-row td { border-bottom: none; padding: 0 0 5px; font-size: 11px; color: var(--muted); }
.cost-table .total-row td { border-bottom: none; padding-top: 8px; font-weight: 800; color: var(--terracotta); font-size: 15px; }
.pack-item { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.pack-item input { width: auto; margin-top: 2px; flex: 0 0 auto; accent-color: var(--terracotta); }

/* ---- なう! 地図下のピン一覧 ---- */
.pin-list { padding: 4px 6px; }
.pin-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pin-row:last-child { border-bottom: none; }
.pin-row:active { background: #fdf3ee; }
.pin-no { flex: 0 0 auto; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.pin-dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #fff; border: 2px solid var(--terracotta); }
.pin-dot.gps { border-radius: 50%; background: var(--terracotta); transform: none; }
.pin-body { min-width: 0; flex: 1; }
.pin-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-meta { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- プランカードのサムネ ---- */
.card-emoji { flex: 0 0 auto; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.card-thumb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }

/* ---- 地図 ---- */
.map { width: 100%; height: 320px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map.tall { height: 60vh; }
.maplibregl-popup-content { font-family: inherit; font-size: 13px; border-radius: 10px; }

.photo-marker { width: 40px; height: 40px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); object-fit: cover; }
.pin-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--terracotta); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
/* 旅程マイルストン（計画地点）ピン：写真/GPS チェックインと見分ける雫形ピン */
.ms-pin { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: #fff; border: 2px solid var(--terracotta); box-shadow: 0 2px 6px rgba(0,0,0,.35); transform: translateY(-6px) rotate(-45deg); }
.ms-pin { font-size: 13px; }

/* ---- 47マップ ---- */
.progress-47 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.progress-47 .big { font-size: 34px; font-weight: 800; color: var(--terracotta); font-variant-numeric: tabular-nums; }
.progress-47 .bar { flex: 1; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-47 .bar > span { display: block; height: 100%; background: var(--terracotta); }
.pref-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ---- 訪問サマリーバー（思い出マップ上部） ---- */
.visit-summary { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid #b8e0d2; background: linear-gradient(135deg, #e8f7f0, #e3f3ee); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.visit-summary .vs-emoji { font-size: 22px; }
.visit-summary .vs-text { font-size: 15px; color: #2e5d4e; }
.visit-summary .vs-text b { font-size: 20px; font-variant-numeric: tabular-nums; }
.visit-summary .vs-muted { color: #6b9a89; font-size: 13px; }
.visit-summary .vs-go { margin-left: auto; font-size: 12px; color: #2e7d63; white-space: nowrap; }
.visit-summary:active { opacity: .8; }

/* ---- 訪問都道府県 詳細リスト（全画面オーバーレイ） ---- */
.pref-list { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: none; flex-direction: column; }
.pref-list.open { display: flex; }
.pl-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; }
.pl-header h2 { font-size: 16px; margin: 0; }
.pl-back { background: none; border: none; font-size: 22px; color: var(--ink); cursor: pointer; }
.pl-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; width: 100%; }
.pl-top { text-align: center; background: linear-gradient(135deg, #e8f7f0, #e3f3ee); border: 1px solid #b8e0d2; border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.pl-top .num { font-size: 32px; font-weight: 800; color: #2e5d4e; font-variant-numeric: tabular-nums; }
.pl-top .bar { height: 8px; background: #fff; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.pl-top .bar > span { display: block; height: 100%; background: #2e9e7a; }
.pl-region { font-size: 13px; font-weight: 700; color: #2e7d63; margin: 16px 0 8px; }
.pl-card { background: #fff; border: 1px solid #cfe9df; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.pl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pl-head b { font-size: 16px; color: #2e5d4e; }
.pl-spots { list-style: none; margin: 0; padding: 0; }
.pl-spots li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.pl-spots li:first-child { border-top: none; }
.pl-spots a { color: var(--terracotta); text-decoration: none; }
.pl-unvisited { margin-bottom: 8px; }
.pl-unvisited .rgn { font-size: 11px; color: var(--muted); margin-right: 4px; }
.pl-unvisited .chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #ececec; color: #8a8a8a; font-size: 11px; margin: 2px; }

/* ---- 写真ストリップ ---- */
.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.photo-strip img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); flex: 0 0 auto; }

.empty { text-align: center; color: var(--muted); padding: 32px 12px; font-size: 14px; }
.empty .em { font-size: 40px; display: block; margin-bottom: 8px; }

/* ---- ボトムナビ ---- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--nav-h);
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav button {
  flex: 1; border: none; background: none; color: var(--muted);
  font-size: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.bottom-nav button .ic { font-size: 20px; line-height: 1; }
.bottom-nav button.active { color: var(--terracotta); font-weight: 700; }

/* ---- モーダル ---- */
.modal { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.35); }
.modal.open { display: flex; }
.modal .sheet { background: #fff; width: 100%; max-width: 720px; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; }
.modal .sheet h3 { margin: 0 0 10px; }
.sheet .close { float: right; background: none; border: none; font-size: 22px; color: var(--muted); }

/* ---- 旅行スイッチャ（思い出地図の旅行切替） ---- */
.test-now { background: #fff3cd; border: 1px solid #ffe08a; color: #7a5b00; font-size: 12px; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.trip-switch { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.trip-switch select { flex: 1; font-weight: 700; }
.trip-switch .lbl { font-size: 12px; color: var(--muted); white-space: nowrap; }
.trip-switch .trip-one { flex: 1; font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-trip-name { font-size: 16px; font-weight: 700; color: var(--ink); margin: 2px 0 12px; line-height: 1.4; }
.now-trip-name .tag-past { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 6px; }

/* ---- 写真マーカーのバッジ ---- */
.photo-marker-wrap { position: relative; }
.photo-marker-wrap .badge {
  position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--green); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff;
}
/* ---- 新規マーカーの登場アニメーション ---- */
@keyframes markerDrop {
  0%   { transform: translateY(-48px) scale(.3); opacity: 0; }
  55%  { transform: translateY(7px) scale(1.14); opacity: 1; }
  75%  { transform: translateY(-3px) scale(.97); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes ringPulse {
  0%   { transform: translate(-50%, -50%) scale(.2); opacity: .65; }
  100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; }
}
.marker-anim { position: relative; transform-origin: center bottom; animation: markerDrop .75s cubic-bezier(.18,.79,.28,1.12) both; }
.marker-anim::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--terracotta);
  transform: translate(-50%, -50%); animation: ringPulse .85s ease-out both; pointer-events: none;
}

.popup-photo { width: 160px; max-width: 60vw; border-radius: 8px; display: block; margin: 4px 0; cursor: zoom-in; }
.popup-actions { display: flex; gap: 6px; margin-top: 4px; }
.popup-actions button { border: 1px solid var(--terracotta); color: var(--terracotta); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; }

/* ---- ライトボックス ---- */
.lightbox { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.88); padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }

/* ---- 共有モーダルのリンク表示 ---- */
.share-url { width: 100%; font-size: 12px; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--muted); max-height: 110px; overflow-y: auto; }
.photo-strip img { cursor: zoom-in; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 84px); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px;
  z-index: 50; opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 86%;
}
.toast.show { opacity: .95; }

/* ---- 近隣スポット確認（チェックイン時） ---- */
.tb-cands { display: flex; flex-direction: column; gap: 6px; }
.tb-searching { font-size: 12px; color: var(--muted); padding: 8px 4px; }
.tb-cand { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.tb-cand:has(input:checked) { border-color: var(--terracotta); background: #FFF4EE; }
.tb-cand input { accent-color: var(--terracotta); flex: none; width: 18px; height: 18px; }
.tb-ic { font-size: 20px; flex: none; }
.tb-cb { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tb-nm { font-weight: 700; color: var(--ink); font-size: 14px; }
.tb-mt { font-size: 11px; color: var(--muted); }
.tb-inp { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; background: var(--surface); color: var(--ink); }
.tb-review { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--terracotta); border-radius: 12px; background: #FFF4EE; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-rl { font-size: 12px; color: var(--muted); flex: 1 1 100%; }
.tb-star-row { display: flex; gap: 2px; }
.tb-star { font-size: 28px; line-height: 1; border: none; background: none; color: var(--terracotta); cursor: pointer; padding: 0 2px; }
.tb-rv { font-size: 13px; color: var(--terracotta-d); font-weight: 700; }
.tb-bm { align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
.tb-bm input { accent-color: var(--terracotta); width: 18px; height: 18px; flex: none; }

/* ピン一覧の評価・ブックマーク */
.pin-stars { color: var(--terracotta); font-size: 12px; letter-spacing: 1px; }
.pin-bm { font-size: 12px; }

/* ---- 旅行プラン一覧：これから／実施済みの区分け ---- */
.plan-group { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 18px 2px 10px; }
.plan-group.done { color: #B7ABA0; }
.trip-card.trip-done { opacity: .6; filter: grayscale(.55); background: #F3EEE8; }
.trip-card.trip-done .trip-cover img,
.trip-card.trip-done .trip-icon { filter: grayscale(.85); }
.done-chip { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: #B7ABA0; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; letter-spacing: .03em; }
.ongoing-chip { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: var(--green); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; letter-spacing: .03em; }
