/* ============================================================
   イマカメ design system — calm, white, data-first (kumamap-spirit)
   webfont-free (Core Web Vitals first), live-green signature, dark mode
   ============================================================ */

:root {
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic",
    "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;

  --bg: #faf9f5;
  --bg-tint: #eef3f3;
  --surface: #ffffff;
  --ink: #1b1b17;
  --muted: #6f6e66;
  --faint: #9b9a8f;
  --line: #ece9e1;
  --line-2: #ddd9cf;

  --live: #0f9d54;
  --live-ink: #0a5e34;
  --live-tint: #e7f5ec;
  --warn-ink: #8a6d12;
  --warn-tint: #f7efd6;
  --dead-ink: #9e3b2d;
  --dead-tint: #f6e4df;

  --shadow: 0 1px 2px rgba(24, 24, 18, .04), 0 10px 26px -14px rgba(24, 24, 18, .14);
  --shadow-lift: 0 2px 6px rgba(24, 24, 18, .06), 0 22px 48px -20px rgba(24, 24, 18, .22);

  --r: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
  --frame: 1080px;
}

:root[data-theme="dark"] {
    /* KUMA-LOG(takao-fumoto.com/kuma-log)風: 青みのある濃いグレーの地 × 暖かいアンバーの枠線 */
    --bg: oklch(21% 0.034 264.665);          /* gray-900 */
    --bg-tint: oklch(25.5% 0.033 261);       /* gray-900↔800 の中間 */
    --surface: oklch(27.8% 0.033 256.848);   /* gray-800 */
    --ink: oklch(96.7% 0.003 264.542);       /* gray-100 */
    --muted: oklch(70.7% 0.022 261.325);     /* gray-400 */
    --faint: oklch(55.1% 0.027 264.364);     /* gray-500 */
    --line: color-mix(in oklab, oklch(47.3% 0.137 46.201) 42%, transparent);   /* amber-800 のアンバー枠線 */
    --line-2: color-mix(in oklab, oklch(55.5% 0.163 48.998) 52%, transparent); /* amber-700(やや強い枠線) */
    --live: #2fc274;
    --live-ink: #8be3b1;
    --live-tint: color-mix(in oklab, var(--live) 18%, transparent);
    --warn-ink: oklch(87.9% 0.169 91.605);   /* amber-300 */
    --warn-tint: color-mix(in oklab, oklch(47.3% 0.137 46.201) 28%, transparent);
    --dead-ink: #e89283;
    --dead-tint: color-mix(in oklab, var(--dead-ink) 16%, transparent);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -16px rgba(0, 0, 0, .7);
    --shadow-lift: 0 2px 8px rgba(0, 0, 0, .5), 0 24px 52px -22px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--frame); margin: 0 auto; padding: 0 1.25rem; }

a { color: inherit; text-decoration: none; }
main a:not(.btn):not(.area-card):not(.spot-card):not(.chip):not(.link-card) {
  color: var(--live-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--live) 45%, transparent);
}
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; border-radius: 4px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo-mark { display: block; width: 26px; height: 26px; }
.logo-dot { fill: var(--live); animation: livepulse 2.4s ease-in-out infinite; transform-origin: center; }
.logo-text { font-size: 1.12rem; font-weight: 700; letter-spacing: .04em; }
.header-nav { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.header-nav a { color: var(--muted); }
.header-nav a:hover { color: var(--ink); }

@keyframes livepulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ---------- typography ---------- */
h1 { font-size: 1.7rem; font-weight: 700; line-height: 1.3; letter-spacing: .01em; margin: 0; }
h2 { font-size: 1.18rem; font-weight: 700; margin: 0; }
h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.section-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: none;
  color: var(--muted); margin: 0 0 .9rem;
}

main { display: block; padding: 1.5rem 0 4rem; }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: .78rem; color: var(--faint); margin: 0 0 1.1rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .62rem 1.25rem; border-radius: var(--r-pill);
  font-size: .94rem; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { box-shadow: var(--shadow-lift); }

/* ---------- hero (top) ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  background:
    radial-gradient(120% 90% at 80% -10%, color-mix(in srgb, var(--live) 8%, transparent), transparent 60%),
    radial-gradient(90% 80% at 0% 0%, var(--bg-tint), transparent 65%),
    var(--surface);
  padding: 2.6rem 1.75rem 2.2rem; margin: .5rem 0 2.5rem;
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr; gap: 1.6rem; align-items: center;
}
@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr 1.02fr; gap: 2rem; padding: 2.8rem 2.4rem; }
}
.hero-copy { min-width: 0; }
.hero-map { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.hero-map svg { width: 100%; max-width: 380px; height: auto; display: block; color: var(--faint); }
.hero-map-cap { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--faint); }
.hero-map-cap .cap-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.hero-map .sea { fill: var(--bg-tint); stroke: var(--line); }
.hero-map .isle { fill: currentColor; opacity: .13; }
.hero-map .coast { fill: none; stroke: currentColor; stroke-width: .7; opacity: .42; stroke-linejoin: round; }
.hero-map .dot { fill: var(--muted); opacity: .55; }
.hero-map .dot.live { fill: var(--live); opacity: 1; }
.hero-map .ping { fill: none; stroke: var(--live); stroke-width: 1.1; }
@media (prefers-reduced-motion: no-preference) { .hero-map .ping { animation: ping 2.8s ease-out infinite; } }
@keyframes ping { 0% { r: 2.6; opacity: .5; } 70%, 100% { r: 10; opacity: 0; } }
@media (max-width: 600px) { .hero-map { display: none; } }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(currentColor .8px, transparent .8px);
  background-size: 22px 22px; color: color-mix(in srgb, var(--ink) 6%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%, #000);
  mask-image: linear-gradient(to bottom, transparent, #000 40%, #000);
}
.hero > * { position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; color: var(--live-ink);
  background: var(--live-tint); padding: .28rem .7rem; border-radius: var(--r-pill); margin: 0 0 1rem;
}
.hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: livepulse 2.4s ease-in-out infinite; }
.hero-title { font-size: clamp(1.7rem, 5vw, 2.5rem); font-weight: 700; line-height: 1.25; letter-spacing: .01em; margin: 0 0 .8rem; }
.hero-lead { color: var(--muted); font-size: 1.02rem; max-width: 36em; margin: 0 0 1.5rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.hero-meta { margin: 1.4rem 0 0; font-size: .82rem; color: var(--faint); }

/* ---------- hero search (ボタンの右にインライン・スマホは全幅で回り込み) ---------- */
.hero-search { position: relative; flex: 1 1 240px; min-width: 220px; }
.hero-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--faint); pointer-events: none;
}
.hero-search input {
  width: 100%; height: 44px; padding: 0 1rem 0 2.6rem;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem;
  box-shadow: var(--shadow); -webkit-appearance: none; appearance: none;
}
.hero-search input::placeholder { color: var(--faint); }
.hero-search input:focus { outline: none; border-color: var(--ink); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  margin: 0; padding: .3rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lift); max-height: 340px; overflow-y: auto;
}
.search-item { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .7rem; border-radius: 8px; cursor: pointer; }
.search-item:hover, .search-item.is-active { background: var(--bg-tint); }
.si-name { font-weight: 600; color: var(--ink); }
.si-meta { font-size: .8rem; color: var(--muted); }
.search-empty { padding: .6rem .7rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) {
  .hero-search { flex-basis: 100%; }
}

/* ---------- area grid (top) ---------- */
/* カテゴリ(山/海/観光地)の見出しセクション間に余白を取る */
.cat-section { margin-top: 2.75rem; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.area-card {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1.05rem 1.15rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); transition: transform .14s ease, box-shadow .22s ease, border-color .2s ease;
}
.area-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.area-name { font-weight: 700; }
.area-count { font-size: .8rem; color: var(--faint); }

/* ---------- travel (バーチャル散歩) ---------- */
.travel-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.tchip {
  font-size: .85rem; font-weight: 700; padding: .4rem .9rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tchip:hover { color: var(--ink); }
.tchip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.travel-shell { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; align-items: stretch; }
.travel-map { height: 72vh; min-height: 420px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.travel-panel {
  height: 72vh; min-height: 420px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 1rem;
}
.travel-empty { color: var(--faint); font-size: .95rem; margin: 2.5rem 0; text-align: center; }
.travel-spot-name { font-size: 1.15rem; font-weight: 700; margin: .85rem 0 .2rem; }
.travel-spot-area { color: var(--faint); font-size: .85rem; margin: 0 0 .85rem; }

.travel-dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; max-width: 240px; margin: 0 0 1rem; }
.tdir-n { grid-column: 2; grid-row: 1; }
.tdir-w { grid-column: 1; grid-row: 2; }
.tdir-near { grid-column: 2; grid-row: 2; }
.tdir-e { grid-column: 3; grid-row: 2; }
.tdir-s { grid-column: 2; grid-row: 3; }
.tdir {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: 1 / 1; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--bg-tint); color: var(--ink); cursor: pointer; font-weight: 700;
  transition: background .14s ease, transform .12s ease, border-color .14s ease;
}
.tdir .ar { font-size: 1.2rem; line-height: 1; }
.tdir .lb { font-size: .7rem; color: var(--muted); }
.tdir:hover:not(:disabled) { background: var(--surface); border-color: var(--live); transform: translateY(-1px); }
.tdir:disabled { opacity: .32; cursor: default; }
.tdir-near { background: var(--live-tint); border-color: var(--live); }

.travel-cams { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.travel-cam {
  font-size: .8rem; padding: .35rem .7rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bg-tint); color: var(--muted); cursor: pointer;
}
.travel-cam:hover { color: var(--ink); border-color: var(--line-2); }

.maplibregl-marker.is-selected { z-index: 3; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }

.travel-cta { margin: 1.25rem 0 0; }

/* ---------- routes (コース) ---------- */
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.route-card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); transition: transform .14s ease, box-shadow .22s ease, border-color .2s ease;
}
.route-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.route-card-cat { align-self: flex-start; font-size: .72rem; font-weight: 700; color: var(--live-ink); background: var(--live-tint); padding: .2rem .6rem; border-radius: var(--r-pill); }
.route-card-title { font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.route-card-lead { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.route-card-meta { color: var(--faint); font-size: .78rem; }
.route-more { margin: 1rem 0 0; font-size: .9rem; font-weight: 700; }

.route-head { margin: 0 0 1.2rem; }
.route-head h1 { margin: .5rem 0 .4rem; }

.route-shell { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1rem; align-items: start; }
.route-map { height: 60vh; min-height: 360px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.route-viewer { display: flex; flex-direction: column; gap: .6rem; }
.route-step-bar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.route-counter { font-size: .85rem; font-weight: 700; color: var(--muted); }
.route-step-name { font-size: 1.15rem; font-weight: 700; margin: .2rem 0 0; }
.route-step-area { color: var(--faint); font-size: .82rem; margin: 0; }
.route-step-blurb { color: var(--muted); font-size: .92rem; line-height: 1.6; margin: .2rem 0 .4rem; }
.route-fallback { padding: 2rem 1rem; text-align: center; color: var(--muted); background: var(--bg-tint); border: 1px dashed var(--line-2); border-radius: var(--r); font-size: .92rem; }

.route-legs { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .5rem; }
.route-leg {
  width: 100%; display: flex; align-items: flex-start; gap: .7rem; text-align: left;
  padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.route-leg:hover { border-color: var(--line-2); }
.route-leg.is-on { border-color: var(--live); background: var(--live-tint); }
.route-leg-no {
  flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  background: var(--ink); color: var(--bg);
}
.route-leg.is-on .route-leg-no { background: var(--live); color: #fff; }
.route-leg-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.route-leg-name { font-weight: 700; font-size: .95rem; }
.route-leg-blurb { color: var(--muted); font-size: .82rem; line-height: 1.5; }

.route-pin {
  width: 1.5rem; height: 1.5rem; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: .78rem; font-weight: 700;
  background: var(--ink); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.route-pin.is-on { background: var(--live); transform: scale(1.18); }

/* ---------- live wall (ライブ壁) ---------- */
.wall-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin: 0 0 1rem; }
.wall-bar .travel-filters { margin: 0; }
#wall-auto.is-on { background: var(--live); color: #fff; border-color: var(--live); }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.wall-cell { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.wall-cell.is-live { border-color: var(--live); box-shadow: var(--shadow); }
.wall-media { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; margin: 0; cursor: pointer; background: var(--bg-tint); overflow: hidden; }
.wall-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wall-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.wall-play {
  position: absolute; inset: 0; margin: auto; width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center; border-radius: 50%; pointer-events: none;
  background: color-mix(in oklab, #000 45%, transparent); color: #fff; font-size: 1rem;
}
.wall-media:hover .wall-play { background: color-mix(in oklab, var(--live) 82%, #000); }
.wall-label { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .7rem; }
.wall-name { font-weight: 700; font-size: .9rem; }
.wall-area { font-size: .75rem; color: var(--faint); }
@media (max-width: 700px) { .wall-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

@media (max-width: 860px) {
  .route-shell { grid-template-columns: 1fr; }
  .route-map { height: 42vh; min-height: 280px; }
}

kbd {
  font: inherit; font-size: .78em; font-weight: 700; padding: .05em .4em; margin: 0 .08em;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  background: var(--bg-tint); color: var(--muted);
}

@media (max-width: 860px) {
  .travel-shell { grid-template-columns: 1fr; }
  .travel-map { height: 46vh; min-height: 300px; }
  .travel-panel { height: auto; min-height: 0; }
}

/* ---------- spot grid (area page) ---------- */
.page-head { margin: 0 0 1.6rem; }
.page-sub { color: var(--muted); font-size: .9rem; margin: .35rem 0 0; }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.spot-card {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .95rem 1.15rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); font-weight: 700;
  transition: transform .14s ease, box-shadow .22s ease, border-color .2s ease;
}
.spot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.spot-card-meta { font-size: .8rem; font-weight: 500; color: var(--faint); white-space: nowrap; }
.spot-card-meta .chev { color: var(--line-2); margin-left: .15rem; }

/* ---------- spot page head ---------- */
.spot-head { margin: 0 0 1.7rem; }
.spot-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: .85rem 0 0; }
.tag {
  font-size: .78rem; font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); padding: .26rem .7rem; border-radius: var(--r-pill);
}
.tag-soft { color: var(--live-ink); background: var(--live-tint); border-color: transparent; }

/* ---------- camera card ---------- */
.camera-stack { display: flex; flex-direction: column; gap: 1.4rem; }
.camera-card { border: 0; }
.camera-headrow { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin: 0 0 .6rem; }
.camera-name { font-size: 1.02rem; }

.media { margin: 0; }
.media-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  background: var(--bg-tint); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.media-frame iframe, .media-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.attribution { font-size: .72rem; color: var(--faint); margin: .5rem 0 0; }

.link-card {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 1rem 1.2rem; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); font-weight: 700; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .22s ease;
}
.link-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.link-card .ext { color: var(--faint); font-weight: 500; }

/* 配信停止中の差し替えリンク(status-badge JS が dead 判定時に表示) */
.camera-down { color: var(--dead-ink); border-color: var(--dead-tint); background: var(--dead-tint); }
.camera-down .ext { color: color-mix(in srgb, var(--dead-ink) 70%, transparent); }
/* flex 指定が hidden を上書きしないよう明示的に隠す */
.camera-down[hidden], .media[hidden] { display: none !important; }

.camera-foot { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .65rem 0 0; }
.views { font-size: .84rem; color: var(--muted); }
.operator { font-size: .76rem; color: var(--faint); margin-left: auto; }

/* status badge (set by /status-badge JS; hidden until known) */
.status-badge {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  font-size: .76rem; font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: .22rem .6rem; border-radius: var(--r-pill); white-space: nowrap;
}
.status-badge:empty { display: none; }
.status-badge.alive { color: var(--live-ink); background: var(--live-tint); border-color: transparent; }
.status-badge.warning { color: var(--warn-ink); background: var(--warn-tint); border-color: transparent; }
.status-badge.dead { color: var(--dead-ink); background: var(--dead-tint); border-color: transparent; }

/* ---------- prose / nearby ---------- */
.prose {
  margin: 2.2rem 0 0; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
}
.prose p { margin: 0 0 .8rem; }
.prose p:last-child { margin: 0; }
.prose .season { font-size: .85rem; color: var(--muted); }

/* ---------- guide (読み物) ---------- */
.lead { margin: .6rem 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.8; }
.guide-list { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1rem; }
.guide-item a {
  display: block; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .22s ease;
}
.guide-item a:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.guide-item h2 { margin: 0; font-size: 1.12rem; }
.guide-item p { margin: .45rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }

.guide-article { max-width: 760px; }
.guide-head { margin: 0 0 .4rem; }
.guide-head h1 { margin: 0; }
.guide-meta { margin: .5rem 0 0; font-size: .82rem; color: var(--faint); }
.guide-head .lead { margin-top: .9rem; }

.guide-toc {
  margin: 1.6rem 0 0; padding: 1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
}
.guide-toc-title { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.guide-toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.guide-toc a { color: var(--ink); font-size: .92rem; }

.guide-prose { line-height: 1.9; }
.guide-prose h2 { margin: 2rem 0 .7rem; font-size: 1.22rem; scroll-margin-top: 72px; }
.guide-prose h2:first-child { margin-top: 0; }
.guide-prose ol, .guide-prose ul { margin: 0 0 .9rem; padding-left: 1.4rem; }
.guide-prose li { margin: 0 0 .4rem; }
.guide-prose li:last-child { margin-bottom: 0; }
.guide-prose strong { font-weight: 700; }

.nearby { margin: 2.2rem 0 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-size: .85rem; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); padding: .42rem .9rem; border-radius: var(--r-pill);
  transition: transform .14s ease, box-shadow .2s ease, border-color .2s ease;
}
.chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--line-2); }

/* ---------- spot FAQ / related guides ---------- */
.spot-faq { margin: 2.2rem 0 0; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.spot-faq dl { margin: 0; }
.faq-item { padding: .9rem 0; border-top: 1px solid var(--line); }
.faq-item:first-child { padding-top: 0; border-top: 0; }
.faq-item:last-child { padding-bottom: 0; }
.faq-item dt { margin: 0 0 .4rem; font-weight: 700; color: var(--ink); }
.faq-item dd { margin: 0; color: var(--muted); line-height: 1.8; }

.guide-links { margin: 2.2rem 0 0; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.guide-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.guide-links li a { color: var(--ink); font-weight: 600; }
.guide-links li a:hover { text-decoration: underline; }

/* ---------- map page ---------- */
#map { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 2rem 0 3rem; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .85rem; margin: 0 0 1rem; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--ink); }
.footer-copy { font-size: .76rem; color: var(--faint); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero, .area-card, .spot-card, .camera-card, .prose, .nearby {
    animation: rise .6s cubic-bezier(.22, .61, .36, 1) both;
  }
  .area-card:nth-child(2), .spot-card:nth-child(2), .camera-card:nth-child(2) { animation-delay: .05s; }
  .area-card:nth-child(3), .spot-card:nth-child(3), .camera-card:nth-child(3) { animation-delay: .1s; }
  .area-card:nth-child(4), .spot-card:nth-child(4) { animation-delay: .15s; }
  .area-card:nth-child(n+5), .spot-card:nth-child(n+5) { animation-delay: .2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 540px) {
  body { font-size: 15.5px; }
  h1, .hero-title { font-size: 1.5rem; }
  .operator { margin-left: 0; width: 100%; }
}

/* ---------- theme switch ---------- */
.theme-switch { position: relative; }
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted);
  cursor: pointer; transition: color .2s ease, box-shadow .2s ease;
}
.theme-btn:hover { color: var(--ink); box-shadow: var(--shadow); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-menu {
  position: absolute; right: 0; top: 44px; min-width: 138px; padding: .3rem;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-lift); z-index: 30;
}
.theme-menu[hidden] { display: none; }
.theme-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; text-align: left; padding: .5rem .7rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-size: .88rem; cursor: pointer;
}
.theme-menu button:hover { background: var(--bg-tint); }
.theme-menu button[aria-checked="true"]::after { content: "✓"; color: var(--live); font-weight: 700; }

/* ---------- spot page: wide 2-up cameras on PC ---------- */
@media (min-width: 920px) {
  .camera-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 1.5rem; }
  .camera-stack > .camera-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .camera-stack > .camera-card:last-child:nth-child(odd) .media-frame { max-width: 760px; margin-inline: auto; }
  .prose { max-width: 880px; }
}

/* ---------- バーチャル散歩: 再生できないときの YouTube 逃げ道リンク ---------- */
.travel-yt {
  display: inline-block; margin-top: .55rem; font-size: .82rem;
  color: var(--muted); text-decoration: underline;
}
.travel-yt:hover { color: var(--ink); }

/* ---------- back-to-top button (右下固定。スクロール時のみ表示) ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lift); cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top svg { width: 22px; height: 22px; }
.to-top:hover { border-color: var(--ink); }
@media (max-width: 640px) {
  .to-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }
}
