:root {
  --teal: #2fa58c;
  --teal-dark: #238a74;
  --teal-light: #e3f4ef;
  --ink: #22312d;
  --muted: #6b7d78;
  --line: #dce8e4;
  --card: #ffffff;
  --bg: #f4faf8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.view { display: none; min-height: 100dvh; flex-direction: column; }
.view.active { display: flex; }

.app-header {
  background: var(--teal);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 500;
}
.app-title { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.back-btn {
  background: transparent; border: none; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px;
}
.linklike { background: none; border: none; color: var(--teal-dark); font-size: 14px; text-decoration: underline; cursor: pointer; }
.app-footer { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); text-align: center; margin-top: auto; }

.area-body { padding: 18px 16px 8px; }
.area-heading { font-size: 22px; margin-bottom: 12px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 16px; margin-bottom: 14px;
}
.search-box input { border: none; outline: none; font-size: 16px; flex: 1; background: transparent; }
.station-list { display: flex; flex-direction: column; gap: 8px; }
.station-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 16px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; text-align: left; width: 100%; font: inherit;
}
.station-row:active { background: var(--teal-light); }
.station-main { flex: 1; min-width: 0; }
.station-name { font-size: 17px; font-weight: 700; }
.station-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count-badge {
  background: var(--teal); color: #fff; border-radius: 999px;
  font-size: 13px; font-weight: 700; padding: 3px 10px; white-space: nowrap;
}
.count-badge.zero { background: #c3d2cd; }
.station-arrow { color: var(--muted); font-size: 18px; }
.empty-note { color: var(--muted); text-align: center; padding: 24px 8px; font-size: 14px; }

.filter-row {
  display: flex; gap: 8px; padding: 12px 16px;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 57px; z-index: 400; overflow-x: auto;
}
.chip {
  border: 1.5px solid var(--teal); color: var(--teal-dark); background: #fff;
  border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--teal); color: #fff; }
#map { height: 46dvh; min-height: 280px; width: 100%; }
#detail-map { height: 30dvh; min-height: 200px; width: 100%; }
.map-list-head { padding: 12px 16px 4px; font-weight: 700; font-size: 15px; }
.parking-list { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); }
.parking-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; width: 100%; text-align: left; font: inherit;
  display: flex; gap: 12px; align-items: flex-start;
}
.parking-card:active { background: var(--teal-light); }
.p-icon {
  background: var(--teal-light); color: var(--teal-dark); font-weight: 800;
  border-radius: 10px; width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.p-main { flex: 1; min-width: 0; }
.p-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.p-fee { color: var(--teal-dark); font-weight: 700; font-size: 15px; margin-bottom: 5px; }
.p-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; border: 1px solid var(--teal); color: var(--teal-dark);
  border-radius: 6px; padding: 2px 7px; background: #fff;
}
.tag.warn { border-color: #d8a13c; color: #96690f; background: #fdf6e3; }
.p-dist { color: var(--muted); font-size: 13px; white-space: nowrap; }

.detail-card { padding: 16px; display: flex; flex-direction: column; gap: 0; }
.detail-row {
  display: flex; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line);
  font-size: 15px; align-items: flex-start;
}
.detail-row:last-child { border-bottom: none; }
.detail-ico { width: 26px; text-align: center; flex: none; }
.detail-label { width: 92px; flex: none; font-weight: 700; }
.detail-value { flex: 1; min-width: 0; word-break: break-word; }
.detail-value a { color: var(--teal-dark); }
.gmap-btn {
  display: block; text-align: center; background: var(--teal); color: #fff;
  border-radius: 12px; padding: 13px; font-weight: 700; text-decoration: none; margin-top: 16px;
}

.about-body { padding: 28px 20px; text-align: center; }
.about-icon { font-size: 56px; margin-bottom: 8px; }
.about-body h1 { font-size: 22px; margin-bottom: 8px; }
.about-body > p { color: var(--muted); margin-bottom: 20px; }
.about-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: left; }
.about-row { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.about-row:last-child { border-bottom: none; }
.about-label { width: 76px; flex: none; font-weight: 700; }

.pin-p, .pin-station {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.pin-p { background: #2b7cd3; width: 30px; height: 30px; }
.pin-p span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 15px; }
.pin-station { background: var(--teal-dark); width: 32px; height: 32px; }
.pin-station span { transform: rotate(45deg); font-size: 15px; }

.footer-sep { color: var(--muted); margin: 0 4px; }
.affiliate-section { padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); }
.affiliate-head { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.affiliate-item {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: var(--ink);
}
.affiliate-item .af-title { flex: 1; font-size: 14px; font-weight: 700; }
.affiliate-item .af-store { font-size: 12px; color: #fff; background: var(--teal); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.privacy-body { padding: 20px; font-size: 14px; line-height: 1.8; }
.privacy-body h2 { font-size: 16px; margin: 18px 0 6px; }
.privacy-body h2:first-child { margin-top: 0; }
.privacy-body p { color: #3c4a46; }

.ad-slot { padding: 12px 16px 4px; }
.ad-slot .adsbygoogle { display: block; }

.search-status { color: var(--muted); font-size: 14px; padding: 2px 4px 10px; }
.search-status:empty { padding: 0; }
.dist-label { color: var(--teal-dark); font-weight: 700; font-size: 13px; white-space: nowrap; }
.tab-row { display: flex; gap: 8px; margin-bottom: 14px; }
.tab-btn {
  flex: 1; border: 1.5px solid var(--teal); color: var(--teal-dark); background: #fff;
  border-radius: 999px; padding: 9px 10px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.tab-btn.active { background: var(--teal); color: #fff; }
.kana-head {
  font-size: 14px; font-weight: 700; color: var(--teal-dark);
  padding: 14px 4px 6px;
  scroll-margin-top: 120px;
}
.kana-jump {
  display: flex; gap: 6px; flex-wrap: wrap;
  position: sticky; top: 57px; z-index: 300;
  background: var(--bg); padding: 8px 0 10px;
}
.kana-jump-btn {
  flex: 1; min-width: 30px;
  border: 1.5px solid var(--teal); color: var(--teal-dark); background: #fff;
  border-radius: 999px; padding: 6px 0; font-size: 14px; font-weight: 700; cursor: pointer;
}
.kana-jump-btn:active { background: var(--teal); color: #fff; }
.area-back {
  background: none; border: none; color: var(--teal-dark); font-size: 15px; font-weight: 700;
  cursor: pointer; padding: 4px 4px 10px; display: block;
}
.area-title { font-size: 18px; font-weight: 700; padding: 2px 4px 8px; }
