/* ライブカメラマップ 共通スタイル（夜の紺 × LIVE の赤） */
:root {
  --brand: #101a2e; --brand-dk: #0a1120; --brand-lt: #eef1f7;
  --accent: #ff3b4e; --accent-dk: #d81f33; --accent-lt: #ffecee;
  --ink: #131c2e; --sub: #5b6577; --line: #dfe3ea; --bg: #f3f5f8; --card: #fff;
  --sea: #0b84c6; --port: #1565a8; --river: #12907f; --lake: #1f98b3; --highway: #2e7d32; --road: #6b7a12; --city: #7b4bc4; --mount: #8a5a2b;
  --snow: #3d97cf; --sky: #d98200; --airport: #3f51b5; --rail: #c2410c; --spot: #c2185b; --animal: #cf6f1c; --facility: #546e7a; --in: #6d4c41;
  --radius: 14px; --shadow: 0 1px 2px rgba(10,20,40,.05), 0 4px 14px rgba(10,20,40,.07);
  --display: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif; overflow-x: hidden; }
a { color: #1b4fd1; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--sub); } .small { font-size: 13px; } .hidden { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: -.22em; }

/* ---------- header ---------- */
#um-back { background: #06090f; color: #fff; font-size: 12.5px; line-height: 1.3; padding: 7px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
#um-back a { color: #fff; text-decoration: none; white-space: nowrap; opacity: .75; } #um-back a.b1 { font-weight: 700; opacity: 1; }
#site-header { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,.25); border-bottom: 3px solid var(--accent); }
.hd { display: flex; align-items: center; gap: 14px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; line-height: 1.2; flex-shrink: 0; }
.logo b { font-family: var(--display); font-weight: 900; font-size: 18px; letter-spacing: .03em; }
.logo small { display: block; font-size: 10.5px; opacity: .7; margin-top: 2px; }
.logo-mark { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255,255,255,.22); }
.gnav { margin-left: auto; display: flex; gap: 1px; }
.gnav a { color: #e3e7ef; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.gnav a:hover { background: rgba(255,255,255,.09); }
.gnav a.on { background: var(--accent); color: #fff; font-weight: 700; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; color: #fff; font-size: 13px; padding: 6px 12px; cursor: pointer; }
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .gnav { display: none; position: absolute; left: 0; right: 0; top: 63px; background: var(--brand); flex-direction: column; padding: 8px 16px 14px; max-height: calc(100vh - 110px); overflow: auto; }
  .nav-open .gnav { display: flex; }
  .gnav a { padding: 12px; }
}
@media (max-width: 520px) { .logo small { display: none; } }

/* ---------- footer ---------- */
#site-footer { background: var(--brand-dk); color: #aeb5c2; margin-top: 48px; font-size: 13px; }
.ft { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding: 32px 16px 20px; }
.ft b { color: #fff; display: block; margin-bottom: 6px; }
.ft a { display: block; color: #aeb5c2; text-decoration: none; padding: 2px 0; } .ft a:hover { color: #fff; }
.ft p { margin: 0; }
.copy { border-top: 1px solid #1c2740; padding: 14px 16px 24px; font-size: 12px; color: #8791a3; }
.copy a { color: #aeb5c2; word-break: break-all; }
@media (max-width: 700px) { .ft { grid-template-columns: 1fr 1fr; } .ft > div:first-child { grid-column: 1 / -1; } }

/* ---------- parts ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer; line-height: 1.3; }
.btn:hover { border-color: #b8c0cf; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn-dark { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.sec { margin: 34px 0 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-h h2 { font-family: var(--display); font-weight: 900; font-size: 21px; margin: 0; line-height: 1.4; }
.sec-h a { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.lead { color: var(--sub); margin: 6px 0 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.crumb { font-size: 12.5px; color: var(--sub); margin: 14px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.crumb a { color: var(--sub); } .crumb b { color: var(--ink); font-weight: 600; }
.page-h h1 { font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1.4; margin: 4px 0 6px; }
.page-h h1 small { font-size: 15px; color: var(--accent-dk); margin-left: 6px; white-space: nowrap; }

/* チップ（種類・地域） */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.3; }
.chip small { font-weight: 600; color: var(--sub); font-size: 12px; }
.chip:hover { border-color: #b8c0cf; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; } .chip.on small { color: #c9d1e0; }
.chip .ic { color: var(--c, var(--sub)); } .chip.on .ic { color: #fff; }
.t-sea { --c: var(--sea); } .t-port { --c: var(--port); } .t-river { --c: var(--river); } .t-lake { --c: var(--lake); } .t-highway { --c: var(--highway); } .t-road { --c: var(--road); }
.t-city { --c: var(--city); } .t-mount { --c: var(--mount); } .t-snow { --c: var(--snow); } .t-sky { --c: var(--sky); } .t-airport { --c: var(--airport); } .t-rail { --c: var(--rail); }
.t-spot { --c: var(--spot); } .t-animal { --c: var(--animal); } .t-facility { --c: var(--facility); } .t-in { --c: var(--in); } .t-out { --c: var(--sky); } .t-world { --c: var(--airport); }

/* バッジ */
.tb { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 6px; background: var(--brand-lt); color: var(--ink); white-space: nowrap; }
.tb-sea { background: #e2f1fa; color: #075f90; } .tb-port { background: #e1ecf7; color: #0f4c80; } .tb-river { background: #dff3ef; color: #0b6a5d; } .tb-lake { background: #dff1f5; color: #146c80; }
.tb-highway { background: #e3f1e4; color: #20602a; } .tb-road { background: #eef0d9; color: #4f5a0d; } .tb-city { background: #eee6fa; color: #5a34a0; } .tb-mount { background: #f1e7dc; color: #6b441f; }
.tb-snow { background: #e2f0f9; color: #256f9c; } .tb-sky { background: #fbefd8; color: #8f5600; } .tb-airport { background: #e5e8f7; color: #303f9f; } .tb-rail { background: #fbe6db; color: #9a3209; }
.tb-spot { background: #fbe1ec; color: #99134a; } .tb-animal { background: #fae9d9; color: #96500f; } .tb-facility { background: #e6ebee; color: #3d5059; }
.tb-in { background: #efe5e1; color: #5d4037; } .tb-still { background: #eceff3; color: #5b6577; }
.tb-live { background: var(--accent); color: #fff; letter-spacing: .04em; }
.tb-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tb-live i { animation: none; } }

/* カメラのカード */
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cam-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; min-width: 0; }
.cam-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(10,20,40,.13); }
.cam-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 7; background: linear-gradient(135deg, color-mix(in srgb, var(--c, #556) 88%, #000), color-mix(in srgb, var(--c, #556) 60%, #0a1120)); color: rgba(255,255,255,.9); position: relative; }
.cam-thumb .ic { width: 42px; height: 42px; stroke-width: 1.300; }
.cam-thumb.has-img { aspect-ratio: 16 / 9; background: #000; }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; min-width: 0; }
.cam-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.cam-body b { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.cam-sub { font-size: 12.5px; color: var(--sub); }
.cam-op { font-size: 11.5px; color: #8a93a3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 文字だけの一覧（川のカメラなど数が多いとき） */
.cam-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.cam-list .cam-card { flex-direction: row; align-items: center; border-radius: 10px; box-shadow: none; }
.cam-list .cam-thumb { width: 46px; height: 46px; aspect-ratio: auto; flex-shrink: 0; border-radius: 0; } .cam-list .cam-thumb .ic { width: 22px; height: 22px; }
.cam-list .cam-body { padding: 6px 10px; gap: 1px; } .cam-list .cam-body b { font-size: 13.5px; } .cam-list .cam-badges, .cam-list .cam-op { display: none; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 0; }
.pager a, .pager b, .pager span { min-width: 38px; text-align: center; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.pager b { background: var(--brand); border-color: var(--brand); color: #fff; } .pager span { border: 0; background: none; }

/* よくある質問 */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 20px; color: var(--sub); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 16px 14px; color: #3a4458; }

/* 関連リンクの段組み */
.linkcols { columns: 4 200px; column-gap: 22px; font-size: 14px; }
.linkcols a { display: block; padding: 3px 0; text-decoration: none; break-inside: avoid; } .linkcols a:hover { text-decoration: underline; }
.linkcols small { color: var(--sub); }
.region { margin-bottom: 14px; } .region h3 { font-size: 13px; color: var(--sub); margin: 0 0 6px; font-weight: 700; letter-spacing: .08em; }

/* 検索フォーム */
.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input[type=search], .search input[type=text] { flex: 1 1 220px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; font-size: 16px; }
.field { display: block; margin: 0 0 14px; } .field > span { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; font-size: 16px; }
.field textarea { min-height: 110px; }

/* 広告枠（共通 ads.js が中身を入れる） */
.ad-slot:empty { display: none; }
.ad-slot { margin: 18px 0 0; }

/* ---------- カメラのページ ---------- */
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.player iframe, .player img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(0,0,0,.25); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 15px; }
.player button span.pl { width: 76px; height: 76px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(0,0,0,.4); } .player button .ic { width: 34px; height: 34px; margin-left: 4px; }
.poster { border-radius: var(--radius); padding: 34px 20px; text-align: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c, #556) 85%, #000), var(--brand)); box-shadow: var(--shadow); }
.poster .ic { width: 56px; height: 56px; stroke-width: 1.200; opacity: .9; }
.poster p { margin: 8px 0 16px; opacity: .9; }
.spot-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .spot-grid { grid-template-columns: minmax(0, 1fr); } }
.info { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.info th { text-align: left; white-space: nowrap; color: var(--sub); font-weight: 600; padding: 8px 12px 8px 0; vertical-align: top; width: 1%; }
.info td { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; } .info tr:last-child td { border-bottom: 0; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
#spotmap { height: 280px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.note { background: #fff8e1; border: 1px solid #f1dfa0; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #6b5300; }

/* ---------- 地図ページ ---------- */
.mapwrap { display: grid; grid-template-columns: 370px minmax(0, 1fr); height: calc(100vh - 96px); min-height: 480px; }
.mapside { display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); min-height: 0; }
.mapfilt { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.seg { display: flex; background: var(--brand-lt); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 7px 4px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--sub); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mapfilt .search input[type=search] { flex: 1 1 110px; }
.mapfilt .chips { gap: 5px; max-height: 96px; overflow: auto; } .mapfilt .chip { padding: 5px 9px; font-size: 12.5px; cursor: pointer; }
.maplist { flex: 1; overflow: auto; padding: 8px 10px 20px; min-height: 0; }
.maplist .cam-list { grid-template-columns: 1fr; gap: 6px; }
.mapcount { font-size: 12.5px; color: var(--sub); padding: 2px 2px 8px; }
#map { height: 100%; min-height: 300px; z-index: 1; background: #dde3ea; }
.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c, #556); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.pin .ic { transform: rotate(45deg); width: 14px; height: 14px; color: #fff; stroke-width: 2; }
.pin.live::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.leaflet-popup-content { margin: 12px 14px; font: 14px/1.5 "Noto Sans JP", sans-serif; min-width: 200px; }
.pop b { display: block; font-size: 15px; margin: 4px 0 2px; } .pop .cam-sub { display: block; margin-bottom: 8px; } .pop img { border-radius: 8px; display: block; margin-bottom: 6px; width: 100%; }
.pop .acts { margin-top: 8px; }
@media (max-width: 820px) {
  .mapwrap { grid-template-columns: 1fr; grid-template-rows: auto 52vh auto; height: auto; }
  .mapside { display: contents; }
  .mapfilt { order: 1; } #map { order: 2; height: 52vh; } .maplist { order: 3; max-height: none; overflow: visible; }
}

/* ---------- トップ ---------- */
.hero { background: var(--brand); color: #fff; padding: 46px 0 40px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 86% 10%, rgba(255,59,78,.38), transparent 38%), radial-gradient(circle at 4% 100%, rgba(40,120,255,.30), transparent 46%); }
.hero .scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .28em; color: #ffc2c8; font-weight: 700; }
.eyebrow i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,59,78,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(255,59,78,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,78,0); } }
@media (prefers-reduced-motion: reduce) { .eyebrow i { animation: none; } }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: 38px; line-height: 1.35; margin: 10px 0 10px; letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: #ff8f9a; }
.hero p { margin: 0 0 18px; color: #d5dbe8; max-width: 760px; }
.hero .search { max-width: 760px; }
.hero .search input { border-color: transparent; }
.hero-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-acts .btn { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.28); color: #fff; }
.hero-acts .btn:hover { background: rgba(255,255,255,.18); }
.stats { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 20px; font-size: 13px; color: #c3cbdb; }
.stats b { font-family: var(--display); font-size: 24px; color: #fff; margin-right: 4px; }
@media (max-width: 640px) { .hero { padding: 30px 0 28px; } .hero h1 { font-size: 27px; } .page-h h1 { font-size: 21px; } .sec-h h2 { font-size: 18px; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); position: relative; overflow: hidden; min-width: 0; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, #556); }
.tile .ic { width: 28px; height: 28px; color: var(--c, #556); }
.tile b { font-size: 15.5px; line-height: 1.35; } .tile small { color: var(--sub); font-size: 12px; line-height: 1.5; }
.tile .n { font-family: var(--display); font-weight: 900; font-size: 18px; color: var(--c, #556); }
.io2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.io2 a { display: flex; gap: 14px; align-items: center; border-radius: var(--radius); padding: 18px; color: #fff; text-decoration: none; box-shadow: var(--shadow); min-width: 0; }
.io2 a.o { background: linear-gradient(135deg, #0b84c6, #12907f); } .io2 a.i { background: linear-gradient(135deg, #6d4c41, #3b2a50); }
.io2 .ic { width: 40px; height: 40px; } .io2 b { font-family: var(--display); font-size: 20px; display: block; line-height: 1.3; } .io2 span { font-size: 13px; opacity: .92; }
@media (max-width: 640px) { .io2 { grid-template-columns: 1fr; } }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.steps .box b { display: block; margin-bottom: 4px; }
