/* ============================================================
   車中泊口コミサイト v2 — スタイルシート
============================================================ */
:root {
  --primary:       #2d6a4f;
  --primary-light: #40916c;
  --primary-dark:  #1b4332;
  --accent:        #f77f00;
  --accent-light:  #fcbf49;
  --bg:            #f4f6f0;
  --card-bg:       #ffffff;
  --text:          #2d2d2d;
  --text-muted:    #6c757d;
  --border:        #dee2e6;
  --shadow:        0 2px 12px rgba(0,0,0,.10);
  --radius:        10px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── ヘッダー ── */
header {
  background: var(--primary-dark);
  color: #fff;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
header h1 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.logo-icon { font-size: 1.3rem; }
.header-hint { font-size: .72rem; opacity: .7; }
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-user  { display: flex; align-items: center; gap: 8px; }
.user-nickname { font-size: .82rem; color: #fff; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-outline-white {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.7);
  color: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); }

/* ── 認証モーダル ── */
.modal-auth { max-width: 400px; }
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: .92rem;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  transition: color .15s, border-color .15s;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form label { font-size: .84rem; font-weight: 600; margin-bottom: 5px; display: block; }
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
}
.auth-form input:focus { outline: none; border-color: var(--primary); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: .6;
}
.pw-toggle:hover { opacity: 1; }
.btn-block { width: 100%; padding: 12px; font-size: 1rem; margin-top: 6px; }
.auth-error { color: #e74c3c; font-size: .82rem; min-height: 18px; margin: 4px 0; }

/* ── SNSアイコンバッジ ── */
.sns-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity .15s;
}
.sns-icon:hover { opacity: .8; }
.sns-icon.x         { background: #000;      color: #fff; font-size: .85rem; }
.sns-icon.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; font-size: 1rem; }
.sns-icon.facebook  { background: #1877f2;   color: #fff; font-size: .9rem; }
.sns-icon.tiktok    { background: #010101;   color: #fff; font-size: .85rem; letter-spacing: -1px; }
.sns-icon.youtube   { background: #ff0000;   color: #fff; font-size: .85rem; }
.sns-icon.other     { background: #6c757d;   color: #fff; }

/* ── ヘッダーアバター ── */
.header-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.6);
}

/* ── プロフィール編集モーダル ── */
.profile-img-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.profile-img-preview {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.profile-img-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-img-placeholder { font-size: 2rem; }
.sns-input-grid { display: flex; flex-direction: column; gap: 8px; }
.sns-input-row  { display: flex; align-items: center; gap: 10px; }
.sns-input-row input { flex: 1; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-size: .84rem; }
.sns-input-row input:focus { outline: none; border-color: var(--primary); }

/* ── 公開プロフィール表示 ── */
.user-profile-card {
  text-align: center;
  padding: 10px 0 20px;
}
.user-profile-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 10px;
}
.user-profile-avatar-placeholder {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 10px;
}
.user-profile-name  { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.user-profile-bio   { font-size: .84rem; color: var(--text-muted); margin-bottom: 12px; white-space: pre-wrap; }
.user-profile-sns   { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.user-profile-stats { display: flex; justify-content: center; gap: 24px; }
.user-profile-stat  { text-align: center; }
.user-profile-stat .val { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.user-profile-stat .lbl { font-size: .72rem; color: var(--text-muted); }

/* ── 口コミカード 投稿者 ── */
.review-author {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.review-author-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}
.review-author-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.review-author-name:hover { color: var(--primary); }
.review-author-anon { font-size: .82rem; color: var(--text-muted); }

/* ── フィルタバー ── */
#filter-bar {
  background: var(--primary);
  padding: 6px 12px;
  flex-shrink: 0;
  overflow-x: auto;
  white-space: nowrap;
  z-index: 900;
}
#type-filter { display: inline-flex; gap: 6px; }
.filter-btn {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.filter-btn.active,
.filter-btn:hover { background: rgba(255,255,255,.35); }

/* ── メインレイアウト ── */
#app { display: flex; flex: 1; overflow: hidden; }
#map { flex: 1; height: 100%; cursor: crosshair; position: relative; }

/* ── 広域ズーム注意オーバーレイ ── */
.zoom-overlay {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  background: rgba(30, 30, 30, .72);
  color: #fff;
  font-size: .78rem;
  padding: 7px 18px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* ── サイドバー ── */
#sidebar {
  width: 320px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
#sidebar-header {
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#spot-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.loading-msg { text-align: center; color: #aaa; padding: 30px; font-size: .85rem; }

/* ── スポットカード ── */
.spot-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 12px;
  cursor: pointer;
  transition: box-shadow .15s, transform .12s;
}
.spot-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card-name {
  font-weight: 700;
  font-size: .92rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.type-emoji { font-size: 1rem; }
.card-addr { font-size: .75rem; color: var(--text-muted); margin-bottom: 6px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.card-footer { display: flex; align-items: center; gap: 10px; font-size: .76rem; }
.good-badge   { color: var(--accent); font-weight: 700; }
.review-count { color: var(--primary); font-weight: 600; }
.quietness-mini { color: var(--accent); letter-spacing: -.05em; }

/* タグ */
.tag { font-size: .69rem; padding: 2px 7px; border-radius: 20px; font-weight: 600; border: 1px solid; }
.tag-green  { color: #1b6835; background: #d4edda; border-color: #b7dfbf; }
.tag-blue   { color: #1a5276; background: #d6eaf8; border-color: #a9cce3; }
.tag-orange { color: #7d4e00; background: #fdebd0; border-color: #f5cba7; }
.tag-red    { color: #7b241c; background: #fadbd8; border-color: #f1948a; }

/* 有料/無料バッジ */
.paid-badge { font-size: .68rem; padding: 1px 6px; border-radius: 4px; font-weight: 700; }
.paid-badge.paid { background: #fadbd8; color: #a93226; }
.paid-badge.free { background: #d5f5e3; color: #1e8449; }

/* ── 地図ピン ── */
.map-pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  overflow: hidden;
}
.map-pin > * { transform: rotate(45deg); }
.map-pin-has-svg {
  background: #fff !important;
  padding: 2px;
}
.map-pin-svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

/* カードサムネ内のSVGアイコン */
.card-thumb-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: .5;
}

/* ── モーダル共通 ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--card-bg);
  border-radius: 14px;
  width: 92%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  animation: slide-up .2s ease;
}
.modal-wide { max-width: 680px; }
@keyframes slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--primary);
  color: #fff;
  border-radius: 14px 14px 0 0;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.modal-body   { padding: 18px 20px; }
.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: #fff;
}
.btn-close { background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.btn-close:hover { opacity: .75; }

/* ── フォーム ── */
.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--primary-dark); margin-bottom: 4px; }
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: .86rem;
  font-family: inherit;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(64,145,108,.12);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.char-count { font-size: .7rem; color: var(--text-muted); text-align: right; margin-top: 2px; }
.required { color: #e74c3c; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.latlng-info {
  font-size: .76rem;
  color: #666;
  background: #f0f4f8;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* チェックリスト */
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .81rem;
  cursor: pointer;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: background .12s, border-color .12s;
  user-select: none;
}
.check-item:has(input:checked) {
  background: #d4edda;
  border-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
.check-item input { accent-color: var(--primary); }

/* 静かさスライダー */
.quietness-row { display: flex; align-items: center; gap: 8px; }
.quietness-row input[type=range] { flex: 1; accent-color: var(--primary); }
.quietness-val { font-weight: 700; color: var(--primary); width: 20px; text-align: center; }
.muted-label { font-size: .72rem; color: var(--text-muted); }

/* ── ボタン ── */
.btn {
  padding: 8px 18px;
  border: none;
  border-radius: 7px;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 4px 10px; font-size: .76rem; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { filter: brightness(1.1); }
.btn-secondary { background: #e9ecef; color: #555; }
.btn-secondary:hover { filter: brightness(.95); }

/* ── 詳細モーダル内 ── */
.spot-info-section { margin-bottom: 4px; }
.spot-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.type-badge {
  font-size: .72rem;
  background: var(--primary);
  color: #fff;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 700;
}
.detail-addr { font-size: .78rem; color: var(--text-muted); margin-bottom: 10px; }
.outdated-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: .8rem;
  margin-bottom: 10px;
}
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.detail-checklist { display: flex; flex-direction: column; gap: 4px; }
.detail-check-item {
  font-size: .78rem;
  padding: 4px 7px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.detail-check-item.on  { background: #d4edda; color: var(--primary-dark); }
.detail-check-item.off { background: #f5f5f5; color: #bbb; }
.signal-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.signal-badge { font-size: .68rem; padding: 2px 7px; border-radius: 20px; font-weight: 700; }
.signal-badge.on  { background: #d4edda; color: #1b6835; }
.signal-badge.off { background: #f0f0f0; color: #aaa; }
.quietness-stars { color: var(--accent); }
.spot-footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.detail-stats { font-size: .85rem; color: var(--text-muted); }
.spot-actions { display: flex; align-items: center; gap: 8px; }
.btn-outdated {
  font-size: .72rem;
  padding: 3px 10px;
  border: 1px solid #ffc107;
  background: #fff3cd;
  color: #856404;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background .12s;
}
.btn-outdated:hover { background: #ffe69c; }

/* ── 口コミセクション ── */
.reviews-section { margin-top: 4px; }
.reviews-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.reviews-title { font-size: .95rem; font-weight: 700; color: var(--primary-dark); }

/* カテゴリタブ */
.category-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.cat-tab {
  background: #f0f4f8;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .76rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
}
.cat-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-tab:hover:not(.active) { background: #e0e9e4; }

/* 口コミリスト */
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
.review-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #fafafa;
}
/* ── スポットカード サムネイル ── */
.card-top { display: flex; gap: 10px; }
.card-thumb {
  width: 80px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.card-thumb-empty {
  width: 80px;
  height: 70px;
  border-radius: 8px;
  background: #e8f0eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.card-body { flex: 1; min-width: 0; }

/* ── 詳細モーダル ヒーロー画像 ── */
#detail-main-photo { margin: -16px -16px 16px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.detail-hero-img { width: 100%; max-height: 220px; object-fit: cover; display: block; }

/* ── 口コミフラグボタン ── */
.review-flag-btns { display: flex; gap: 6px; }
.btn-flag {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font-size: .75rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all .15s;
}
.btn-flag:hover { border-color: #ccc; background: #f5f5f5; }
.btn-flag-outdated.pressed { border-color: #f0a500; color: #f0a500; background: #fffbea; }
.btn-flag-report.pressed   { border-color: #e04040; color: #e04040; background: #fff0f0; }
.flag-count { font-size: .7rem; }

/* 口コミカードヘッダー（カテゴリバッジ + 日付） */
.review-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.review-cat-badge {
  font-size: .72rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
}
.review-stat-note {
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: 6px;
}

/* 投稿カテゴリ選択タブ（投稿フォーム内） */
.review-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rev-cat-tab {
  padding: 6px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
}
.rev-cat-tab:hover { border-color: var(--primary-light); color: var(--primary); }
.rev-cat-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }

.review-comment { font-size: .86rem; line-height: 1.6; margin-bottom: 8px; }
.review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: .78rem;
  color: var(--text-muted);
}
.review-quietness { display: flex; align-items: center; gap: 4px; }
.review-signals   { display: flex; align-items: center; gap: 4px; }
.review-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; }
.review-photo-wrap { position: relative; flex-shrink: 0; }
.review-photo-img {
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
  display: block;
}
.photo-cat-label {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .62rem;
  padding: 1px 5px;
  border-radius: 4px;
}
.review-footer { display: flex; align-items: center; justify-content: space-between; }
.btn-review-good {
  background: #fff3e0;
  color: var(--accent);
  border: 1.5px solid var(--accent-light);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s;
}
.btn-review-good:hover  { background: var(--accent-light); }
.btn-review-good.pressed { background: var(--accent); color: #fff; border-color: var(--accent); }
.review-date { font-size: .72rem; color: var(--text-muted); }

/* ── 口コミ写真投稿 ── */
.review-photo-area {
  border: 2px dashed var(--border);
  border-radius: 9px;
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.review-photo-area:hover { border-color: var(--primary-light); background: #f0f7f4; }
.review-photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-photo-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}
.photo-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.photo-cat-select { font-size: .72rem; width: 80px; border: 1px solid var(--border); border-radius: 5px; padding: 2px 4px; }
.photo-del-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: .65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-photo-area {
  border: 2px dashed var(--border);
  border-radius: 9px;
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
}
#post-photo-previews { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ── 現在地ドット ── */
.location-dot {
  width: 24px;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.location-dot::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(30, 120, 255, .25);
  animation: loc-pulse 1.8s ease-out infinite;
}
.location-dot-inner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1e78ff;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.35);
  position: relative;
  z-index: 1;
}
@keyframes loc-pulse {
  0%   { transform: scale(.6); opacity: .8; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ── 現在地ボタン（Leaflet カスタムコントロール） ── */
.leaflet-control-locate a {
  font-size: 1.1rem !important;
  line-height: 28px !important;
  text-align: center;
  text-decoration: none;
  display: block;
  cursor: pointer;
}
.leaflet-control-locate a:hover { background: #f0f0f0; }

/* ── スポット登録確認ポップアップ ── */
.leaflet-popup.register-popup .leaflet-popup-content-wrapper {
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
.leaflet-popup.register-popup .leaflet-popup-content { margin: 0; }
.register-popup-inner { padding: 14px 16px; text-align: center; min-width: 200px; }
.register-popup-title { font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.register-popup-coords { font-size: .72rem; color: #888; margin-bottom: 10px; }
.register-popup-btns { display: flex; gap: 8px; justify-content: center; }
.register-popup-btns button {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
}
.register-popup-btns .btn-confirm { background: var(--primary); color: #fff; }
.register-popup-btns .btn-confirm:hover { background: var(--primary-dark); }
.register-popup-btns .btn-cancel  { background: #e0e0e0; color: #333; }
.register-popup-btns .btn-cancel:hover  { background: #ccc; }

/* ── ズームアウト時メッセージ ── */
.zoom-hint-msg { padding: 30px 20px; text-align: center; color: var(--text-muted); font-size: .88rem; line-height: 1.7; }
.zoom-hint-msg .zoom-level { font-size: 1.6rem; font-weight: 700; color: var(--primary); }

/* ── FAB ── */
#fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.5rem;
  border: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

/* ── トースト ── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333;
  color: #fff;
  padding: 9px 20px;
  border-radius: 30px;
  font-size: .84rem;
  z-index: 9999;
  transition: transform .3s ease;
  pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ── セクション区切り ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.section-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 5px; }

/* ── レスポンシブ ── */
@media (max-width: 768px) {
  #sidebar { display: none; }
  #fab { display: flex; }
  .modal { width: 98%; max-height: 95dvh; }
  .check-grid { grid-template-columns: repeat(2, 1fr); }
  .signal-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
}

/* スクロールバー */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ── αテスト告知バー ── */
#alpha-bar {
  background: #fff3cd;
  color: #856404;
  text-align: center;
  font-size: .78rem;
  padding: 5px 12px;
  border-bottom: 1px solid #ffd978;
  line-height: 1.4;
}
#alpha-bar a { color: #6d5000; font-weight: 600; }

/* ── αバッジ ── */
.alpha-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: .04em;
}

/* ── 利用規約モーダル ── */
.modal-tos { max-width: 600px; }
.tos-body {
  font-size: .86rem;
  line-height: 1.75;
  color: var(--text);
}
.tos-update {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.tos-body h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 18px 0 6px;
  padding-left: 8px;
  border-left: 3px solid var(--primary-light);
}
.tos-list {
  padding-left: 1.4em;
  margin: 6px 0;
}
.tos-list li { margin-bottom: 4px; }
.tos-contact {
  margin-top: 20px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: .82rem;
  text-align: center;
}
.tos-contact a { color: var(--primary); font-weight: 600; }
.tos-agree-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .88rem;
}
.tos-agree-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.tos-agree-label a { color: var(--primary); font-weight: 600; }

/* ── 投稿マナー注意書き ── */
.posting-manner-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fffbea;
  border: 1px solid #f5e07a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.posting-manner-icon { font-size: 1.2rem; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.posting-manner-text { font-size: .8rem; color: #5a4500; line-height: 1.55; }
.posting-manner-text strong { display: block; margin-bottom: 2px; font-size: .82rem; }

/* ── ここへ行く / オーナーCTA ── */
.detail-action-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.btn-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #1a73e8;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: background .15s, transform .1s;
  border: none;
  cursor: pointer;
}
.btn-goto:hover { background: #1558b0; transform: translateY(-1px); }
.btn-owner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--card-bg);
  color: var(--primary-dark);
  border: 2px solid var(--primary-light);
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-owner-cta:hover { background: #e8f5e9; transform: translateY(-1px); }

/* ── オーナーモーダル ── */
.modal-owner { max-width: 460px; }
.owner-modal-hero {
  text-align: center;
  padding: 10px 0 16px;
}
.owner-modal-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 6px; }
.owner-modal-lead {
  font-size: .92rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.owner-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.owner-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
}
.owner-feature-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.owner-feature-item strong {
  display: block;
  font-size: .88rem;
  color: var(--primary-dark);
  margin-bottom: 2px;
}
.owner-feature-item span {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.owner-modal-note {
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0 12px;
  border-top: 1px solid var(--border);
  margin-bottom: 12px;
}
.owner-contact-btn { font-size: .92rem; padding: 12px; }

/* ── Phase 3: サイドバータブ ── */
#sidebar-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  background: var(--card-bg);
  flex-shrink: 0;
}
.sidebar-tab {
  flex: 1;
  padding: 9px 6px;
  background: none;
  border: none;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.sidebar-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.sidebar-tab:hover:not(.active) { color: var(--text); }

/* ── Phase 3: マイスポットカード ── */
.my-spot-card { flex-direction: column; }
.my-spot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 8px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.visibility-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}
.visibility-toggle input[type="checkbox"] { display: none; }
.vis-slider {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background: #ccc;
  border-radius: 20px;
  transition: background .2s;
  flex-shrink: 0;
}
.vis-slider::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.vis-checkbox:checked ~ .vis-slider { background: var(--primary-light); }
.vis-checkbox:checked ~ .vis-slider::after { transform: translateX(16px); }
.vis-label { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
.btn-my-spot-delete {
  background: none;
  border: 1px solid #e74c3c55;
  color: #e74c3c;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .78rem;
  cursor: pointer;
  transition: background .15s;
}
.btn-my-spot-delete:hover { background: #ffeaea; }

/* ── Phase 4: ランキングモーダル ── */
.modal-ranking { max-width: 520px; }
.ranking-type-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.ranking-type-tab {
  flex: 1;
  padding: 8px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.ranking-type-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.ranking-scope-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ranking-scope-btns { display: flex; gap: 4px; }
.ranking-scope-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
}
.ranking-scope-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.ranking-area-sel {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .84rem;
  background: var(--card-bg);
}
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.rank-item:hover { background: #e8f5e9; }
.rank-num {
  font-size: 1.3rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
  color: var(--text-muted);
}
.rank-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.rank-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--border);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.rank-body { flex: 1; min-width: 0; }
.rank-name {
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-pref {
  display: inline-block;
  background: var(--primary-light);
  color: #fff;
  font-size: .68rem;
  padding: 1px 6px;
  border-radius: 10px;
  margin-right: 5px;
  vertical-align: middle;
}
.rank-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rank-type-tag {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── はじめての方向け Tips モーダル ── */
.modal-tips {
  max-width: 480px;
  padding: 0;
  overflow: hidden;
}
.tips-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: #fff;
  padding: 28px 28px 22px;
  text-align: center;
}
.tips-logo {
  display: block;
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 8px;
}
.tips-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.tips-sub {
  font-size: .88rem;
  opacity: .85;
}
.tips-list {
  padding: 20px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tips-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
}
.tips-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.tips-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tips-text strong {
  font-size: .92rem;
  color: var(--primary-dark);
}
.tips-text span {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.tips-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 22px;
  gap: 12px;
}
.tips-no-show {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.tips-no-show input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}
#tips-close-btn {
  white-space: nowrap;
  padding: 9px 22px;
  font-size: .9rem;
}
