:root {
  --blue: #1d6fb8;
  --blue-dark: #14507f;
  --red: #d64545;
  --bg: #fdf7ee;
  --card: #fffdf9;
  --text: #3a2e24;
  --muted: #8a7663;
  --line: #ead9c2;
  --chip: #fdf0dc;
  --brand: #ef7048;
  --brand2: #f59a4e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 15.5px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
header {
  background: linear-gradient(120deg, var(--brand2), var(--brand)); color: #fff; padding: 13px 16px;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 8px rgba(190, 90, 40, .28);
  overflow: hidden;
}
header::after {
  content: "🐾"; position: absolute; right: 10px; top: -14px;
  font-size: 74px; opacity: .16; transform: rotate(18deg); pointer-events: none;
}
header h1 { margin: 0; font-size: 21px; position: relative; z-index: 1; }
.site-logo { width: 30px; height: 30px; border-radius: 50%; vertical-align: -8px; margin-right: 7px; box-shadow: 0 1px 4px rgba(160, 60, 20, .35); }
header p { margin: 2px 0 0; font-size: 12.5px; opacity: .95; position: relative; z-index: 1; }
header a { position: relative; z-index: 1; }
main { max-width: 860px; margin: 0 auto; padding: 12px; }
#map, .mini-map { width: 100%; height: 52vh; min-height: 320px; border-radius: 16px; z-index: 1; }
.mini-map { height: 230px; min-height: 200px; }
.actions { display: flex; gap: 10px; margin: 12px 0; }
.btn {
  flex: 1; display: block; text-align: center; border: none; cursor: pointer;
  padding: 15px 10px; border-radius: 13px; font-size: 16.5px; font-weight: 700;
  background: var(--blue); color: #fff; text-decoration: none;
  box-shadow: 0 3px 8px rgba(120, 80, 40, .16);
}
.btn.secondary { background: #fff; color: var(--blue); border: 2px solid var(--blue); box-shadow: none; }
.btn.red { background: var(--red); box-shadow: 0 3px 8px rgba(200, 80, 50, .22); }
.btn.gray { background: #efe6da; color: var(--text); box-shadow: none; }
.btn:disabled { opacity: .55; }
/* 一覧ページ上部の2ボタン：マップ＝青、一覧＝オレンジで色分け */
.btn-maplink { background: #2a7de1; box-shadow: 0 3px 8px rgba(42, 125, 225, .3); }
.btn-listmode { background: #e8862e; box-shadow: 0 3px 8px rgba(232, 134, 46, .3); }
.btn-listmode.on { background: #c96a1b; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25); }
/* 一覧モードのバーとページネーション */
.listmode-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff7ec; border: 2px solid var(--line); border-radius: 13px;
  padding: 10px 14px; margin: 0 0 14px; font-weight: 800; color: var(--text);
}
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 6px;
}
.pager-btn { flex: 0 0 auto; background: #e8862e; padding: 12px 18px; }
.pager-btn:disabled { background: #d8cfc2; }
.pager-info { font-weight: 800; color: var(--text); font-size: 14.5px; text-align: center; }
.btn.small { padding: 10px 10px; font-size: 14px; flex: none; }
section.card, .card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  box-shadow: 0 2px 7px rgba(160, 110, 60, .08); margin-bottom: 14px;
}
h2 { font-size: 17.5px; margin: 4px 0 10px; }
h3 { font-size: 15.5px; margin: 12px 0 6px; }
label { display: block; font-size: 13.5px; font-weight: 700; margin: 12px 0 4px; }
label .req { color: var(--red); }
input[type="text"], input[type="datetime-local"], select, textarea {
  width: 100%; padding: 11px; font-size: 16px; border: 1.5px solid #e6d3ba;
  border-radius: 11px; background: #fff; color: var(--text); font-family: inherit;
}
input[type="text"]:focus, input[type="datetime-local"]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand2); box-shadow: 0 0 0 3px rgba(245, 154, 78, .22);
}
textarea { min-height: 64px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.photo-preview { max-width: 100%; max-height: 260px; border-radius: 12px; display: none; margin-top: 8px; }
.hidden { display: none !important; }
.item-card { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.item-card:last-child { border-bottom: none; }
.item-card img { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; flex: none; background: #f3e7d3; border: 3px solid #e9dcc4; }
.item-card .meta { font-size: 12.5px; color: var(--muted); }
.chip {
  display: inline-block; background: var(--chip); color: var(--blue-dark);
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; margin-right: 6px;
}
.chip.red { background: #fdeceb; color: var(--red); }
.score-badge {
  display: inline-block; min-width: 52px; text-align: center; font-weight: 800;
  border-radius: 10px; padding: 4px 8px; color: #fff; background: #b39b7d; font-size: 15px;
}
.score-badge.high { background: #2e9e5b; }
.score-badge.mid { background: #e8a13a; }
.score-row { display: flex; align-items: center; gap: 10px; }
.score-bar { flex: 1; height: 8px; background: #f0e4d2; border-radius: 99px; overflow: hidden; }
.score-bar > div { height: 100%; background: var(--blue); }
.notes { font-size: 13px; margin: 8px 0 0; padding-left: 18px; }
.notes li { margin: 2px 0; }
.pin-photo {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.45); object-fit: cover; background: #cfe0ee;
}
.pin-photo.lost { border-color: var(--red); border-radius: 10px; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(61,38,20,.55); z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--card); width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 18px;
}
.modal img.big { width: 100%; max-height: 46vh; object-fit: contain; background: #faf3e6; border-radius: 12px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 3000;
  background: #3a2e24; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.3); max-width: 92vw; text-align: center;
}
.linkbox {
  background: #eef6ee; border: 1px solid #bcd8bc; border-radius: 12px; padding: 12px; word-break: break-all;
}
.spot-banner {
  background: #fff7e0; border: 1px solid #ecd28a; color: #6b5510;
  border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px;
}
.feed { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; }
.feed-card { flex: none; width: 128px; cursor: pointer; }
.feed-card img { width: 128px; height: 128px; object-fit: cover; border-radius: 14px; background: #f3e7d3; }
.feed-card .fc-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.feed-card .fc-cat { font-size: 12px; font-weight: 700; }
.pin-wrap { position: relative; width: 46px; height: 46px; }
.pin-wrap .pin-check {
  position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px;
  background: #2e9e5b; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.pin-photo.resolved { filter: grayscale(.9); opacity: .75; border-color: #9db3a4; }
.chip.green { background: #e2f3e7; color: #22703f; }
.share-row { display: flex; gap: 8px; margin: 10px 0; }
.share-btn {
  flex: 1; text-align: center; padding: 11px; border-radius: 11px; font-weight: 700;
  font-size: 14px; color: #fff; text-decoration: none;
}
.share-btn.line { background: #06c755; }
.share-btn.x { background: #111; }
.share-btn.fb { background: #1877f2; }
.color-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.color-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 13px; font-size: 13px; cursor: pointer;
}
.color-chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.police-box {
  background: #eaf3fb; border: 1px solid #c3d4ea; border-radius: 12px;
  padding: 10px 12px; font-size: 13px; margin-top: 12px;
}
.thanks-item { background: #fdf6e3; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 6px 0; }
.item-card.resolved { opacity: .62; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 12px 30px; }
footer::after { content: "🐾"; display: block; margin-top: 8px; font-size: 16px; opacity: .45; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.kv { font-size: 14px; margin: 3px 0; }
.kv b { color: var(--muted); font-weight: 600; margin-right: 6px; }

/* ===== 迷子ペット版 追加スタイル ===== */
.chip.orange { background: #fdeeda; color: #a35b12; }
.pin-photo.sighting { border-color: #e8a13a; }
.pin-paw {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.45); background: #eaf3fb;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.pin-paw.sighting { background: #fdeeda; border-color: #e8a13a; }
.pin-paw.lost { background: #fdeceb; border-color: var(--red); border-radius: 12px; }
.pin-paw.resolved { filter: grayscale(.9); opacity: .75; }
.pin-paw.small { width: 34px; height: 34px; font-size: 16px; }
.pin-badge {
  position: absolute; left: -4px; bottom: -4px; width: 20px; height: 20px;
  border-radius: 50%; font-size: 11px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; background: #e8a13a;
}
.pin-badge.lost { background: var(--red); }
.thumb-paw {
  width: 72px; height: 72px; border-radius: 50%; flex: none; background: #fdf0dc;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  border: 3px solid #e9dcc4;
}
.feed-paw {
  width: 128px; height: 128px; border-radius: 14px; background: #fdf0dc;
  display: flex; align-items: center; justify-content: center; font-size: 52px;
}
.big-paw {
  width: 100%; padding: 34px 0; text-align: center; background: #faf3e6;
  border-radius: 12px; font-size: 18px; color: var(--muted);
}
.seg-row { display: flex; gap: 8px; }
.seg {
  flex: 1; padding: 12px 8px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; font-size: 15px; font-weight: 700; cursor: pointer; color: var(--text);
}
.seg.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.caution-box {
  background: #fff7e0; border: 1px solid #ecd28a; color: #6b5510;
  border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 12px; line-height: 1.6;
}
.sg-item { border-top: 1px solid var(--line); padding: 9px 0; font-size: 14px; }
.sg-item:first-child { border-top: none; }
.sg-head { font-weight: 700; font-size: 13px; color: var(--blue-dark); margin-bottom: 2px; }

/* ===== しずく型ピン（写真入り） ===== */
.tlpin { position: relative; width: 48px; height: 60px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.4)); }
.tlpin-head {
  position: absolute; top: 0; left: 0; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 4px solid var(--blue); box-sizing: border-box; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.tlpin.lost .tlpin-head { border-color: var(--red); }
.tlpin.found .tlpin-head { border-color: var(--blue); }
.tlpin.sighting .tlpin-head { border-color: #e8871a; }
.tlpin-head img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.tlpin-paw { font-size: 22px; }
.tlpin-tail {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 14px solid var(--blue);
}
.tlpin.lost .tlpin-tail { border-top-color: var(--red); }
.tlpin.found .tlpin-tail { border-top-color: var(--blue); }
.tlpin.sighting .tlpin-tail { border-top-color: #e8871a; }
.tlpin.small { width: 36px; height: 46px; }
.tlpin.small .tlpin-head { width: 36px; height: 36px; border-width: 3px; }
.tlpin.small .tlpin-tail { top: 33px; border-left-width: 7px; border-right-width: 7px; border-top-width: 11px; }
.tlpin.small .tlpin-paw { font-size: 16px; }
.tlpin.big { width: 64px; height: 80px; }
.tlpin.big .tlpin-head { width: 64px; height: 64px; border-width: 5px; }
.tlpin.big .tlpin-tail { top: 59px; border-left-width: 12px; border-right-width: 12px; border-top-width: 18px; }
.tlpin.big .tlpin-paw { font-size: 30px; }

/* ===== トップ地図ラッパー（新着レール＋全画面） ===== */
#mapWrap {
  display: flex; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 7px rgba(160,110,60,.10);
}
#mapWrap #map { flex: 1 1 auto; min-width: 0; border-radius: 0; }
body.map-full { overflow: hidden; }
body.map-full #mapWrap {
  position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
  z-index: 1500; border-radius: 0; box-shadow: none; border: none;
}
body.map-full #mapWrap #map { flex: 1 1 0; height: auto !important; min-height: 0; }
.map-full-toggle {
  background: #fff; color: var(--text); border: 2px solid var(--blue);
  font-size: 15px; font-weight: 800; border-radius: 12px; padding: 10px 14px;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35); white-space: nowrap;
  /* MapLibre のコントロール配置コンテナは pointer-events:none のため、ボタン側でも
     明示的に有効化しておく（lib.js のシム側でも同じ対策をしている二重化） */
  pointer-events: auto;
}
.map-full-toggle:hover { background: #fdf3e3; }
body.map-full .map-full-toggle { border-color: var(--red); color: var(--red); }

/* ===== 新着の迷子レール（地図の端） ===== */
#lostRail {
  flex: none; width: 238px; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; background: #fffaf1;
  max-height: 52vh;
}
#lostRail h3 {
  margin: 0; padding: 10px 12px 8px; font-size: 14px; color: var(--red);
  border-bottom: 1px solid var(--line); flex: none;
}
#lostRailList { overflow-y: auto; padding: 6px; -webkit-overflow-scrolling: touch; }
body.map-full #lostRail { max-height: none; }
.rail-item {
  display: flex; gap: 8px; padding: 7px 6px; border-radius: 12px; cursor: pointer;
  align-items: center;
}
.rail-item:hover { background: #fdf0dc; }
.rail-item img, .rail-item .thumb-paw {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none;
  background: #fdf0dc; font-size: 24px; border-width: 2.5px;
}
.rail-item .rname { font-size: 14px; font-weight: 800; }
.rail-item .rmeta { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.rail-empty { font-size: 13px; color: var(--muted); padding: 10px 8px; }
@media (max-width: 700px) {
  #mapWrap { flex-direction: column; }
  #mapWrap #map { height: 46vh; min-height: 280px; }
  #lostRail {
    width: 100%; border-left: none; border-top: 1px solid var(--line);
    max-height: none;
  }
  #lostRailList { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; }
  .rail-item { flex: none; width: 196px; }
  body.map-full #mapWrap #map { height: auto !important; flex: 1 1 0; min-height: 0; }
  body.map-full #lostRail { flex: none; }
}

/* ===== 地図の凡例 ===== */
.map-legend {
  background: rgba(255,253,249,.94); border-radius: 10px; padding: 7px 10px;
  font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.6;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.lg-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); vertical-align: -2px;
}
.lg-dot.lost { background: var(--red); }
.lg-dot.found { background: var(--blue); }
.lg-dot.sighting { background: #e8871a; }

/* ===== 通知 ===== */
.notif-bell { position: relative; }
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 800;
  vertical-align: 2px; margin-left: 4px;
}
.notif-item { border-top: 1px solid var(--line); padding: 9px 0; font-size: 14px; }
.notif-item:first-child { border-top: none; }
.notif-item.unread { background: #fdf6e3; border-radius: 10px; padding: 9px 8px; }
.notif-item .meta { font-size: 12px; color: var(--muted); }
.notif-item a { color: var(--blue); font-weight: 700; }

/* ===== 写真ボタン（撮る／選ぶ）＋投稿直後のピン強調 ===== */
.file-hidden {
  position: absolute; width: 1px; height: 1px; opacity: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.photo-btns { display: flex; gap: 10px; margin-top: 2px; }
.photo-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 15px 8px; border-radius: 12px; cursor: pointer;
  font-size: 16px; font-weight: 700; text-align: center;
  background: #fff; color: var(--blue); border: 2px solid var(--blue);
}
.photo-btn.camera { background: linear-gradient(135deg, var(--brand2), var(--brand)); border-color: var(--brand); color: #fff; }
.photo-btn:active { opacity: .75; }
.post-banner {
  position: relative; background: #e8f7ee; border: 2px solid #2e9e5b;
  color: #14532d; border-radius: 14px; padding: 12px 42px 12px 14px;
  font-size: 14px; line-height: 1.65; margin-bottom: 12px;
  box-shadow: 0 2px 7px rgba(160,110,60,.10);
  scroll-margin-top: 86px;
}
.post-banner a { color: var(--blue-dark); font-weight: 800; }
.post-banner-close {
  position: absolute; top: 6px; right: 8px; border: none; background: transparent;
  font-size: 17px; line-height: 1; cursor: pointer; color: #14532d; padding: 4px;
}
.pin-pulse {
  position: absolute; left: 50%; width: 52px; height: 52px;
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 4px solid var(--blue); pointer-events: none;
  animation: pinPulse 1.15s ease-out 5; z-index: 600;
}
@keyframes pinPulse {
  0% { transform: translate(-50%, -50%) scale(.5); opacity: .95; }
  100% { transform: translate(-50%, -50%) scale(1.55); opacity: 0; }
}

/* ===== 第7回改修：特大写真ゾーン／動物チェック／場所チップ ===== */
.photo-zone {
  border: 2.5px dashed #f0a35e; background: #fff6e9;
  border-radius: 16px; padding: 14px 12px; margin: 10px 0 6px;
}
.photo-zone-title { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.photo-zone-title .pz-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.photo-zone-title .req { color: var(--red); }
.photo-btns.big { gap: 12px; }
.photo-btns.big .photo-btn {
  min-height: 96px; font-size: 19px; border-width: 3px; border-radius: 14px;
  flex-direction: column; gap: 2px; padding: 14px 8px; line-height: 1.3;
}
.photo-btn .pb-emoji { font-size: 30px; line-height: 1.15; }
.photo-btn .pb-sub { font-size: 12px; font-weight: 600; opacity: .85; }
.photo-preview.big {
  width: 100%; max-height: 340px; object-fit: contain;
  background: #faf3e6; border-radius: 12px;
}
.photo-actions { margin-top: 8px; }
.photo-actions .btn { width: 100%; }
.photo-status { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--blue-dark); line-height: 1.55; }
.photo-check {
  margin-top: 10px; background: #fdf0f0; border: 1.5px solid #e5a3a3;
  border-radius: 12px; padding: 10px 12px;
}
.photo-check-msg { font-size: 14px; font-weight: 700; color: #a02c2c; line-height: 1.6; }
.photo-confirm {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 10px 0 2px; font-size: 12.5px; font-weight: 600;
  color: var(--blue-dark); cursor: pointer; line-height: 1.5;
}
.photo-confirm input { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.place-chip {
  margin-top: 8px; background: #e8f7ee; border: 1.5px solid #2e9e5b;
  color: #14532d; border-radius: 12px; padding: 9px 12px;
  font-size: 13.5px; font-weight: 700; line-height: 1.6;
}
.rail-item .rname .chip { font-size: 11px; padding: 1px 7px; vertical-align: 1px; }

/* ===== 第8回改修：外部情報（SNS等）ピン・強み表示・絞り込み・重複・経過日数 ===== */
.tlpin.external .tlpin-head { border-color: #7c4dbd; }
.tlpin.external .tlpin-tail { border-top-color: #7c4dbd; }
.lg-dot.external { background: #7c4dbd; }
.chip.purple { background: #efe7fa; color: #5b34a0; }
.thumb-paw.external { background: #efe7fa; }
.strengths {
  display: flex; gap: 8px; margin: 0 0 12px;
}
.strength {
  flex: 1; background: #fff6e6; border: 1.5px solid #f2ddb8; border-radius: 14px; padding: 11px 8px; text-align: center;
  box-shadow: 0 2px 6px rgba(160,110,60,.08); font-size: 12.5px; font-weight: 700; line-height: 1.45;
}
.strength .st-emoji { font-size: 23px; display: block; margin-bottom: 2px; }
.strength .st-sub { font-size: 11px; color: var(--muted); font-weight: 600; display: block; }
.steps-line {
  background: #fdeed3; border: 1.5px solid #f0d9ae; color: #7c5410; border-radius: 12px;
  padding: 9px 12px; font-size: 13px; font-weight: 700; margin-bottom: 12px; text-align: center; line-height: 1.6;
}
.stats-line { font-size: 12.5px; color: var(--muted); text-align: center; margin: -4px 0 12px; }
.stats-line b { color: var(--blue-dark); }
.form-steps {
  background: #fdeed3; border: 1.5px solid #f0d9ae; color: #7c5410; border-radius: 12px;
  padding: 9px 12px; font-size: 13px; font-weight: 700; margin-bottom: 6px; line-height: 1.6;
}
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.filter-bar input { flex: 1; }
.filter-bar .btn { flex: none; }
.days-badge {
  display: inline-block; background: var(--red); color: #fff; font-weight: 800;
  font-size: 12.5px; border-radius: 999px; padding: 2px 10px; margin-left: 6px; vertical-align: 1px;
}
.days-badge.posted { background: #7c4dbd; }
.days-line { font-size: 13.5px; font-weight: 700; color: var(--red); margin: 4px 0; }
.days-line.posted { color: #5b34a0; }
.dup-box {
  background: #fdf6e3; border: 1.5px solid #ecd28a; border-radius: 12px;
  padding: 10px 12px; margin: 12px 0; font-size: 14px; line-height: 1.6;
}
.dup-box h3 { margin-top: 2px; }
.merged-banner {
  background: #eaf3fb; border: 1.5px solid #c3d4ea; border-radius: 12px;
  padding: 12px; font-size: 14px; line-height: 1.65; margin: 10px 0;
}
.ext-note {
  background: #f4eefc; border: 1px solid #d5c2f2; color: #4a2d82; border-radius: 12px;
  padding: 10px 12px; font-size: 13px; margin-top: 12px; line-height: 1.6;
}
/* 外部情報の「見つかりました」スタンプ（一覧カード右上に傾けて重ねる） */
.item-card { position: relative; }
.item-card.ext-found { opacity: .8; }
.found-stamp {
  position: absolute; top: 8px; right: 2px; transform: rotate(8deg);
  border: 2.5px solid #2e9e5b; color: #2e9e5b; border-radius: 8px;
  padding: 2px 10px; font-weight: 900; font-size: 15px; background: rgba(255,255,255,.88);
  pointer-events: none; letter-spacing: .04em;
}
.found-stamp.likely { border-color: #7c9a4d; color: #7c9a4d; font-size: 12.5px; }
.found-banner {
  background: #e8f7ee; border: 1.5px solid #2e9e5b; color: #1c6b3c; border-radius: 12px;
  padding: 10px 12px; font-size: 14px; font-weight: 700; line-height: 1.6; margin: 8px 0;
}
.found-banner.likely { background: #f2f6e8; border-color: #7c9a4d; color: #4d6425; }

/* ===== 第11回改修：新着レールを小さく＋大きいボタン（別ページへ） ===== */
/* 新着レールは少し小さく（本人の指定 2026-11-02） */
#lostRail { width: 198px; }
#lostRail h3 { padding: 7px 10px 6px; font-size: 12.5px; }
#lostRailList { padding: 4px; }
.rail-item { gap: 6px; padding: 5px 5px; border-radius: 10px; }
.rail-item img, .rail-item .thumb-paw {
  width: 40px; height: 40px; font-size: 19px; border-width: 2px;
}
.rail-item .rname { font-size: 12.5px; }
.rail-item .rname .chip { font-size: 10px; padding: 0 6px; }
.rail-item .rmeta { font-size: 10.5px; line-height: 1.4; }
.rail-empty { font-size: 12px; padding: 8px 6px; }
@media (max-width: 700px) {
  .rail-item { width: 158px; }
}
/* 大きいボタン（探してる／報告する：別ページ report.html へ） */
.big-cta { display: flex; gap: 10px; margin: 12px 0 2px; }
.big-cta-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 94px; padding: 16px 10px; border-radius: 16px;
  color: #fff; font-size: 23px; font-weight: 900; text-decoration: none;
  line-height: 1.25; text-align: center;
}
.big-cta-btn.lost { background: var(--red); box-shadow: 0 4px 10px rgba(200, 80, 50, .28); }
.big-cta-btn.found { background: var(--blue); box-shadow: 0 4px 10px rgba(30, 90, 150, .28); }
.big-cta-btn:active { opacity: .82; }
.big-cta-sub { font-size: 13px; font-weight: 700; opacity: .95; }
@media (max-width: 560px) {
  .big-cta-btn { min-height: 86px; font-size: 20px; }
  .big-cta-sub { font-size: 12px; }
}
/* report.html のモード切替タブ */
.mode-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.mode-tab {
  flex: 1; display: block; text-align: center; padding: 14px 8px; border-radius: 13px;
  border: 2px solid var(--line); background: #fff; color: var(--text);
  font-size: 16.5px; font-weight: 800; text-decoration: none; line-height: 1.35;
}
.mode-tab .mt-sub { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.mode-tab.on.lost { background: var(--red); border-color: var(--red); color: #fff; }
.mode-tab.on.found { background: var(--blue); border-color: var(--blue); color: #fff; }
.mode-tab.on .mt-sub { color: rgba(255,255,255,.9); }

/* ===== 第12回改修：新着の名前は1行・写真大きめ、現在地の青い丸、住所検索 ===== */
/* 新着レール：名前などは改行させず1行で（長い場合は…で省略）、写真は大きめに、幅は少し狭く */
#lostRail { width: 190px; }
.rail-item { align-items: center; }
.rail-item img, .rail-item .thumb-paw {
  width: 58px; height: 58px; font-size: 27px; flex: none;
}
.rail-item { position: relative; }
.rail-item .rail-badge { position: absolute; top: 1px; left: 1px; z-index: 2; }
.rail-item .rail-badge .chip {
  font-size: 9.5px; padding: 0 5px; line-height: 1.5;
  box-shadow: 0 1px 3px rgba(90, 60, 30, .35);
}
.rail-item .rail-texts { flex: 1; min-width: 0; }
.rail-item .rname {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.rail-item .rmeta { white-space: normal; }
.rail-item .rmeta .rline {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 700px) {
  .rail-item { width: 148px; }
  .rail-item img, .rail-item .thumb-paw { width: 52px; height: 52px; font-size: 24px; }
}
/* 現在地の青い丸（Googleマップ風：青丸＋白ふち＋広がる波紋） */
.my-loc-wrap { position: relative; width: 36px; height: 36px; pointer-events: none; }
.my-loc-dot {
  position: absolute; top: 50%; left: 50%; width: 15px; height: 15px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: #2a7de1; border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(20, 60, 120, .5); z-index: 2;
}
.my-loc-halo {
  position: absolute; top: 50%; left: 50%; width: 34px; height: 34px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(42, 125, 225, .25); z-index: 1;
  animation: myloc-pulse 2.4s ease-out infinite;
}
@keyframes myloc-pulse {
  0% { transform: translate(-50%, -50%) scale(.55); opacity: .9; }
  70% { transform: translate(-50%, -50%) scale(1.15); opacity: .25; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}
/* 現在地ボタン（地図の右下） */
.loc-btn {
  background: #fff; color: #20548f; border: 2px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 800; padding: 9px 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(90, 60, 30, .3); font-family: inherit; white-space: nowrap;
}
.loc-btn:active { background: #eaf3ff; }
/* 住所検索（フォーム内） */
.addr-search { display: flex; gap: 8px; margin: 4px 0 8px; }
.addr-search input { flex: 1; margin: 0; }
.addr-search button { flex: none; margin: 0; }

/* ===== 第10回改修：迷子一覧ページ（list.html）＋検索 ===== */
.search-card label { margin-top: 0; }
.search-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.search-field { min-width: 0; }
.search-wide { grid-column: 1 / -1; }
.search-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sort-label { margin: 0; flex: none; }
.sort-select { width: auto; flex: 1; }
.result-count { font-size: 14px; font-weight: 700; color: var(--blue-dark); margin: 12px 0 0; }
.list-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.list-tab {
  flex: 1 1 auto; padding: 11px 8px; border-radius: 999px; border: 2px solid var(--line);
  background: #fff; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--text);
  font-family: inherit; white-space: nowrap;
}
.list-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.list-group-title { font-size: 17.5px; margin: 16px 0 10px; }
.pet-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 6px; }
.pet-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: 0 2px 7px rgba(160, 110, 60, .08);
}
.pet-card.ext-found { opacity: .85; }
.pet-card-photo { width: 100%; height: 220px; object-fit: cover; display: block; background: #f3e7d3; }
.pet-card-paw {
  width: 100%; height: 150px; background: #fdf0dc; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 52px; gap: 2px;
}
.pet-card-paw.external { background: #efe7fa; }
.pet-card-paw span { font-size: 13px; color: var(--muted); font-weight: 700; }
.pet-card-body { padding: 13px 15px 15px; }
.pet-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.pet-card-head .days-badge { margin-left: auto; }
.pet-name { font-size: 19px; margin: 7px 0 5px; }
.pet-line { font-size: 14px; margin: 2px 0; }
.pet-facts { margin: 9px 0 0; display: grid; gap: 4px; }
.pet-facts > div { display: flex; gap: 8px; font-size: 13.5px; }
.pet-facts dt { flex: none; width: 118px; color: var(--muted); font-weight: 600; }
.pet-facts dd { margin: 0; }
.pet-feature {
  font-size: 13.5px; background: #fff6e6; border: 1px solid #f2ddb8; border-radius: 10px;
  padding: 8px 10px; margin: 10px 0 0; line-height: 1.6;
}
.pet-actions { margin: 12px 0 0; }
.pet-actions .btn { flex: 1; }
.list-cta {
  display: block; text-align: center; background: linear-gradient(120deg, var(--brand2), var(--brand));
  color: #fff; font-weight: 800; font-size: 16.5px; border-radius: 14px; padding: 15px 12px;
  text-decoration: none; box-shadow: 0 3px 8px rgba(200, 90, 40, .22); margin: 12px 0;
  line-height: 1.5;
}
.list-cta .cta-sub { display: block; font-size: 12.5px; font-weight: 600; opacity: .95; }
@media (min-width: 700px) {
  .pet-grid { grid-template-columns: 1fr 1fr; }
  .pet-card-photo { height: 190px; }
}
@media (max-width: 560px) {
  .search-grid { grid-template-columns: 1fr; }
  .search-wide { grid-column: auto; }
  .pet-facts dt { width: 104px; }
}

/* ===== 第9回改修：MapLibre 用の微調整 ===== */
.leaflet-container { font-family: inherit; }
.maplibregl-map { font-family: inherit; }
.maplibregl-popup-content {
  border-radius: 14px; font-size: 14px; line-height: 1.6;
  padding: 12px 30px 12px 14px; box-shadow: 0 3px 12px rgba(90, 60, 30, .25);
}
.maplibregl-ctrl-group { border-radius: 12px !important; overflow: hidden; box-shadow: 0 2px 8px rgba(90, 60, 30, .22) !important; }
