@charset "UTF-8";
/* ================== ARAS MAP – SCSS 全体 ================== */
:root {
  --header-h: 56px;
  --panel-w: 380px;
  --brand: #0ea5e9;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f5f7fb;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Apple Color Emoji", "Segoe UI Emoji";
  color: #111827;
  background: var(--bg);
}

/* Header */
#app {
  min-height: 100%;
}

header {
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.02em;
}

@media (max-width: 400px) {
  header h1 {
    font-size: 15px;
  }
}
header .user {
  color: var(--muted);
  font-size: 13px;
}

/* Map */
#map {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

/* Controls overlay */
#controls.overlay {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 16px;
  z-index: 650;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Search bar */
.gm-searchbar {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.06);
  flex: 1 1 420px;
  min-width: 260px;
  max-width: 720px;
}

.gm-searchbar input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 0.55rem 2.1rem 0.55rem 0.25rem;
}

.gm-searchbar .sb-clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gm-searchbar .sb-clear:hover {
  background: #e5e7eb;
  color: #111827;
}

.gm-searchbar .sb-clear:active {
  transform: translateY(-50%) scale(0.96);
}

.sb-search-btn {
  white-space: nowrap;
}

/* Chips row */
.chip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.25rem;
}

.chip-row .chip {
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.chip-row .flex-spacer {
  flex: 1 1 auto;
}

/* PC side panel */
.panel {
  position: fixed;
  left: 16px;
  top: calc(var(--header-h) + 160px);
  bottom: 16px;
  width: var(--panel-w);
  max-width: calc(100% - 32px);
  z-index: 640;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: none;
  /* 右側のボタン群を横並び固定（⭐／編集／×） */
}

.panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.panel header .row {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
}

.panel header .row .btn,
.panel header .row .bookmark-btn {
  width: auto !important;
  flex: 0 0 auto !important;
  display: inline-flex;
}

.panel .body {
  height: calc(100% - 48px);
  overflow: auto;
  padding: 0.75rem;
}

.panel.open {
  display: block;
}

/* モバイル調整 */
@media (max-width: 900px) {
  #controls.overlay {
    left: 8px;
    right: 8px;
  }
  .gm-searchbar {
    max-width: none;
  }
  /* PCサイドパネルは非表示（JS側で使用しない想定） */
  .panel {
    display: none !important;
  }
}
/* Common UI */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.title {
  font-weight: 700;
  margin: 0.15rem 0 0.4rem;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 12px;
  margin-right: 0.25rem;
}

.btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 0.5rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn.danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.bookmark-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

.bookmark-btn.on {
  color: #f59e0b;
}

/* コメント */
#side-comments .comment {
  border-bottom: 1px dashed #eee;
  padding: 0.45rem 0;
}

#side-comments .comment:last-child {
  border-bottom: 0;
}

/* 写真 */
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
}

.thumbs img {
  width: 100%;
  height: 88px;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* ピン */
.pin .pin-body {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pin-color, #9ca3af);
  display: grid;
  place-items: center;
  outline: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pin-emoji {
  font-size: 14px;
  line-height: 1;
}

.leaflet-tooltip.place-label {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.leaflet-top.leaflet-left {
  margin-top: 84px;
  margin-left: 8px;
}

/* 現在地 */
.leaflet-div-icon.me {
  background: transparent;
  border: none;
}

.me-wrap {
  position: relative;
  width: 16px;
  height: 16px;
}

.me-dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  outline: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.me-pulse {
  position: absolute;
  inset: -6px;
  margin: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  animation: pulse 1.8s infinite ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.65;
  }
  70%, 100% {
    transform: scale(1.4);
    opacity: 0;
  }
}
/* リスト */
.result-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.25rem;
  border-radius: 8px;
  cursor: pointer;
}

.result-item:hover {
  background: #f8fafc;
}

.result-item .badge {
  font-size: 11px;
  color: #475569;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

/* —— PCだけ #btn-close-side 表示（サイドパネル内に配置想定） */
@media (max-width: 900px) {
  #btn-close-side {
    display: none !important;
  }
}
/* ===== ボトムシート（モバイル） ===== */
/* ==== Bottom Sheet: 初期は完全非表示、表示中のみ block ==== */
#sheet {
  display: none;
  /* ← 初期は出さない */
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  /* peek時は地図操作を通す */
}

#sheet.showing {
  /* ← setSheetContentで表示 */
  display: block;
}

#sheet[data-state=half] .sheet-backdrop,
#sheet[data-state=full] .sheet-backdrop {
  pointer-events: auto;
  opacity: 1;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.18s ease;
}

/* パネル：translateYは必ず JS で 0..max の間にクランプされる */
.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(72vh, 100vh - var(--header-h) - 24px);
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(var(--sheet-translate, 0px));
  transition: transform 0.18s ease-out;
  will-change: transform;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

.sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 8px auto 6px;
  touch-action: none;
  /* ← 追加: ユーザーが掴める領域を広げる */
  padding: 12px 0;
  /* 上下に透明な余白を追加 */
  background-clip: content-box;
  /* 中央の見えるバーだけ色付きに */
}

.sheet-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.75rem 0.55rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.sheet-body {
  min-height: 0;
  overflow: auto;
  padding: 0.5rem 0.75rem 0.75rem;
}

/* 低い画面でも無理なく収まる */
@media (max-height: 620px) {
  .sheet-panel {
    height: min(76vh, 100vh - var(--header-h) - 16px);
  }
}
/* バックドロップをタップしても “peek に戻すだけ”（完全に消さない） */
#sheet[data-state=peek] .sheet-backdrop {
  opacity: 0;
  pointer-events: none;
}

/* ===== モーダル（名刺アップロード） ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal .modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 640px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}

.modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.modal .modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--danger);
  cursor: pointer;
}

.modal .modal-body {
  padding: 0.9rem;
  overflow: auto;
}

.modal .modal-actions {
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.modal.open {
  display: block;
}

/* 編集フォーム用の簡易レイアウト */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 0.8rem;
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field label {
  font-size: 12px;
  color: var(--muted);
}

.field input,
.field select {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem;
  font-size: 14px;
  outline: none;
  background: #fff;
}

/* ==== Bookmark 強調表示（上書き用） ==== */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.08s ease;
}

.bookmark-btn .icn {
  font-size: 16px;
  line-height: 1;
}

.bookmark-btn:hover {
  background: #f8fafc;
}

.bookmark-btn:active {
  transform: scale(0.96);
}

/* ON状態の見た目（背景/枠/文字色を強調） */
.bookmark-btn.on {
  background: #fff7ed;
  /* orange-50 */
  border-color: #fdba74;
  /* orange-300 */
  color: #b45309;
  /* orange-700 */
}

/* Leaflet の既定の白い四角を無効化 */
.leaflet-div-icon,
.pin.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 丸ピンの見た目を明示（必要に応じて調整） */
.pin .pin-body {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pin-color, #9ca3af);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 絵文字のズレが気になる場合に微調整 */
.pin .pin-emoji {
  font-size: 14px;
  transform: translateY(-0.5px);
}

/* ==== Filters ==== */
#filters.filters {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: flex-end;
}

#filters.filters .filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#filters.filters .filter-group label {
  font-size: 12px;
  color: var(--muted);
}

#filters.filters .chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* トグル式チップのON表現 */
.chip.toggle.on {
  background: #eef2ff;
  /* indigo-50  */
  border-color: #6366f1;
  /* indigo-500 */
  color: #3730a3;
  /* indigo-800 */
}

/* === セレクトをチップ風に（カテゴリ用） === */
.select-like {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 13px;
  line-height: 1.2;
}

.select-like:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* 絞り込みモーダル内の行レイアウト */
#filter-modal .field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

#filter-modal label {
  width: 90px;
  color: var(--muted);
  font-size: 12px;
}

#filter-modal select {
  flex: 1 1 auto;
}

/* --- 既存chipが縦書き等になっていたら強制解除 --- */
.chip {
  writing-mode: horizontal-tb !important;
  transform: none !important;
}

/* chipのベース調整（読みやすく・押しやすく） */
.chip {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  padding: 0.5rem 0.6rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-size: 13px;
  line-height: 1.2;
}

/* 縦積みアイコン＋ラベル */
.chip.icontext {
  width: 72px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
}

.chip.icontext .icn {
  font-size: 20px;
  line-height: 1;
}

.chip.icontext .lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* カテゴリ用：内側にselectを縦積み */
.chip.iconstack {
  width: 120px;
  /* 文字が長いのでやや広め */
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
}

.chip.iconstack .icn {
  font-size: 18px;
  line-height: 1;
}

/* 見た目をフラット化したセレクト（中央寄せ） */
.select-plain {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  margin: 0;
  width: 100%;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  /* Chrome/Edge */
  -moz-text-align-last: center;
  /* Firefox */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* hover/active ちょい強調 */
.chip.icontext:hover,
.chip.iconstack:hover {
  border-color: #6366f1;
  /* indigo-500 */
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* chip-row の並びと間隔（縦並び想定） */
.chip-row {
  display: flex;
  flex-direction: row;
  gap: 0.6rem;
  align-items: flex-start;
  /* 地図の左端貼りつきならこのまま */
}

#place-sheet .place-title {
  cursor: grab;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
@media (hover: hover) and (pointer: fine) {
  #place-sheet .place-title:hover {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
  }
}
#place-sheet.sheet--dragging .place-title {
  cursor: grabbing;
}
#place-sheet #bookmark-btn {
  pointer-events: auto;
}

/* === 概要：アイコン付き 日本語ラベル行 === */
.kv {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
}

.kv-row {
  display: grid;
  grid-template-columns: 20px 80px 1fr;
  align-items: start;
  -moz-column-gap: 8px;
       column-gap: 8px;
}

.kv-ico {
  font-size: 16px;
  line-height: 1.2;
  margin-top: 2px;
}

.kv-k {
  font-size: 12px;
  color: #6b7280;
}

.kv-v {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.kv-v a {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .kv-k {
    color: #9ca3af;
  }
}

#am-legend {
  margin-top: 70px !important;
  /* ← これで下にずらす（デフォルトは 0） */
  margin-right: 8px;
}

.leaflet-top.leaflet-left {
  margin-top: 100px !important;
  /* ← デフォルト84px → 下に+16pxほど */
  margin-left: 8px;
}

/* ==== 右下 現在地FAB ==== */
.fab-locate {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff url("./cursor_your-location_icon_2030.png") center/60% no-repeat;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 850;
  /* 地図より上、ボトムシート(1000)より下 */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fab-locate:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: scale(1.05);
}

.fab-locate:active {
  transform: scale(0.95);
}

/* ==== 表示件数 表示位置調整 ==== */
#count-text {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(8px, env(safe-area-inset-bottom));
  font-size: 12px;
  color: #48494b;
  /* gray-400 相当の薄いグレー */
  z-index: 500;
  /* Leafletのピンや凡例の下ではなく上に */
  background: rgba(255, 255, 255, 0.6);
  /* 地図上でも見えるよう半透明背景 */
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
  /* クリックを透過（地図操作に干渉しない） */
}/*# sourceMappingURL=style.css.map */