/* ご近所ライブカメラ 共通の見た目(暗い1テーマ・差し色は青緑1色・警告は黄色だけ) */
:root {
  --bg: #0a0f15;
  --bg2: #0e151d;
  --panel: #111a24;
  --panel2: #16212d;
  --line: #1e2a37;
  --line2: #2b3b4d;
  --tx: #dce5ee;
  --tx2: #93a4b6;
  --tx3: #6c7d8f;
  --ac: #2ec4b6;          /* 差し色(青緑) */
  --ac-dim: rgba(46, 196, 182, .14);
  --warn: #f2c94c;        /* 警告(撮影が古いとき)だけに使う黄色 */
  --ph: #1a2430;          /* 画像の読み込み前の暗いグレー */
  --r: 4px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  /* 画面の下の広告(AdSense の自動広告のアンカー広告。枠は 320×50 か 320×100)のためのすき間。高さはここ1か所で決める。
     いちばん大きい 100px+2px。今は広告が無いのでいつもあけておく。広告を入れたら、出た時だけあける形に切りかえる(例: 広告が出ていない時は 0px)。 */
  --ad-h: 102px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.dlg-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 400 15px/1.65 var(--sans);
  padding-bottom: 0;   /* 下のすき間は .ad-space(いちばん下)であける */
  overflow-x: hidden;
}
a { color: var(--ac); text-underline-offset: 3px; }
a:hover { color: #5fe0d3; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.num { font-family: var(--mono); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
h1, h2, h3 { line-height: 1.35; margin: 0; font-weight: 700; }
p { margin: 0 0 12px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--panel); padding: 8px 12px; border: 1px solid var(--ac); border-radius: var(--r); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.hd { border-bottom: 1px solid var(--line); background: rgba(10, 15, 21, .94); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.hd-in { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; flex-wrap: wrap; }
.brand { color: var(--tx); text-decoration: none; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 0 3px var(--ac-dim); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(46, 196, 182, 0); } }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--tx2); text-decoration: none; font-size: 14px; padding: 0 9px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r); }
.nav a:hover { color: var(--tx); background: var(--panel); }
@media (max-width: 400px) { .nav a { padding: 0 5px; font-size: 13px; } .hd-in { gap: 4px; } }   /* メニュー5つを1行に収める */
.nav a[aria-current="page"] { color: var(--tx); box-shadow: inset 0 -2px 0 var(--ac); border-radius: 0; }

.crumbs { font-size: 13px; color: var(--tx3); padding-top: 12px; overflow-wrap: anywhere; }
.crumbs a { color: var(--tx2); }
.h1 { font-size: 22px; margin: 16px 0 8px; letter-spacing: .01em; }
.lead { color: var(--tx2); font-size: 14px; max-width: 64em; }
.note { color: var(--tx3); font-size: 13px; margin: 0 0 10px; }
.caution { font-size: 13px; color: var(--tx2); border-left: 2px solid var(--line2); padding: 6px 10px; margin: 16px 0; background: var(--bg2); }

/* 場所の帯 */
.locbar { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 10px 12px; margin: 12px 0 8px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.loc-line { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.loc-label { font-size: 11px; color: var(--tx3); border: 1px solid var(--line2); border-radius: 2px; padding: 1px 6px; margin-right: 6px; white-space: nowrap; vertical-align: 1px; }
.loc-text { color: var(--tx); }
.loc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--ac); background: var(--ac-dim); color: var(--tx); font: 500 14px/1.3 var(--sans); border-radius: var(--r); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: rgba(46, 196, 182, .24); color: var(--tx); }
.btn-ghost { border-color: var(--line2); background: transparent; }
.btn-ghost:hover { background: var(--panel2); }
.btn-sm { min-height: 44px; padding: 0 10px; font-size: 13px; }
.btn-wide { width: 100%; max-width: 420px; padding: 10px 14px; }

/* 区切り */
.sec { margin: 24px 0; }
.sec > h2, .sec-hd h2 { font-size: 16px; }
.sec > h2 { margin-bottom: 10px; }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 10px; }
.sec-meta { font-size: 13px; color: var(--tx2); }
.grp { font-size: 14px; margin: 18px 0 8px; color: var(--tx2); font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.more-link { margin-top: 10px; font-size: 14px; }
.links { padding-left: 1.2em; margin: 0; }
.links li { margin: 4px 0; }
.links a { display: inline-flex; align-items: center; min-height: 44px; }   /* 押しやすさ(44px以上) */

/* マスの一覧: スマホ2列、700px以上で4列 */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.tile { min-width: 0; }
.tile-btn { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0 0 8px; margin: 0; border: 1px solid var(--line); background: var(--panel); color: var(--tx); border-radius: var(--r); text-align: left; cursor: pointer; font: inherit; overflow: hidden; }
.tile-btn:hover { border-color: var(--line2); background: var(--panel2); }
.thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--ph); border-bottom: 1px solid var(--line); overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
/* 海の画像は 16:9 と 4:3 がまざる(extra/NOTES.md 6章)。4:3の枠に「全体が見えるように収める」で統一する(16:9は上下に黒い帯、4:3はぴったり) */
.thumb-sea { background: #05080c; }
.thumb-sea img { object-fit: contain; }
.thumb.loaded img { opacity: 1; }
.thumb.loaded .ph { display: none; }
.ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--tx3); text-align: center; padding: 4px; }
.thumb.failed .ph { color: var(--tx2); }
.thumb.failed img { display: none; }
/* 撮影時刻の札(右下。カメラの焼き込み文字は左上・右上に多いため) */
.tag { position: absolute; right: 4px; bottom: 4px; font: 600 11px/1 var(--mono); padding: 3px 5px; border-radius: 2px; background: rgba(5, 10, 15, .8); color: var(--tx); border: 1px solid rgba(255, 255, 255, .14); }
.tag-old { background: var(--warn); color: #1b1600; border-color: var(--warn); }
.t1 { display: block; padding: 6px 8px 0; font-size: 13px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.t2 { display: block; padding: 2px 8px 0; font-size: 12px; color: var(--tx2); line-height: 1.4; overflow-wrap: anywhere; }
.t2 .num { color: var(--tx); font-weight: 600; }
.more { margin: 12px auto 0; display: flex; }
.list-msg, .panel-msg { border: 1px dashed var(--line2); border-radius: var(--r); padding: 12px; font-size: 14px; color: var(--tx2); margin-top: 10px; }
.panel-msg p { margin: 0 0 8px; }
.list-host .panel-msg { margin-top: 0; }

/* チップ(市・川・県の一覧) */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--tx); border-radius: var(--r); text-decoration: none; font: 400 14px/1.3 var(--sans); cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.chip:hover { border-color: var(--ac); color: var(--tx); }
.chip .num { font-size: 12px; color: var(--tx2); font-weight: 400; }
.chip .mark { font-size: 11px; color: var(--ac); border: 1px solid var(--ac); border-radius: 2px; padding: 0 4px; }
.region { margin: 0 0 12px; }
.region h3 { font-size: 13px; color: var(--tx3); font-weight: 500; margin-bottom: 6px; }

/* 場所を選ぶ画面 */
.picker { border: 1px solid var(--line2); background: var(--bg2); border-radius: var(--r); padding: 12px; margin: 8px 0 16px; scroll-margin-top: 64px; }
.picker-hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.picker-hd h2 { font-size: 16px; }
.picker-msg { color: var(--tx); font-size: 14px; border-left: 2px solid var(--ac); padding-left: 10px; }

/* 拡大表示 */
.dlg { position: fixed; inset: 0; z-index: 50; background: rgba(2, 5, 8, .78); display: flex; align-items: flex-start; justify-content: center; }
.dlg[hidden] { display: none; }
.dlg-panel { background: var(--bg); border: 1px solid var(--line2); width: 100%; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(var(--ad-h) + 16px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) { .dlg { padding: 3vh 16px; } .dlg-panel { max-width: 760px; height: auto; max-height: 94vh; border-radius: var(--r); } }
.dlg-hd { position: sticky; top: 0; background: rgba(10, 15, 21, .97); border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 12px 10px 16px; z-index: 1; }
.dlg-ttl { min-width: 0; }
.dlg-ttl h2 { font-size: 17px; overflow-wrap: anywhere; }
.dlg-sub { font-size: 12px; color: var(--tx3); margin: 2px 0 0; overflow-wrap: anywhere; }
.btn-close { flex-shrink: 0; }
.dlg-body { padding: 12px 16px; }
.fig { margin: 0 0 16px; }
.fig figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 6px; }
.fig-label { font-weight: 700; }
.fig-time { font-family: var(--mono); font-size: 12px; color: var(--tx2); }
.fig-time.old { color: var(--warn); }
.fig-img { position: relative; aspect-ratio: 4 / 3; background: var(--ph); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fig-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.fig-img.loaded img { opacity: 1; }
.fig-img.loaded .ph { display: none; }
.fig-img.failed img { display: none; }
.fig-note { font-size: 12px; color: var(--tx3); margin: 6px 0 0; }
.info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; font-size: 14px; margin: 0 0 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.info dt { color: var(--tx3); font-size: 13px; }
.info dd { margin: 0; overflow-wrap: anywhere; }
.dlg-acts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.dlg-acts .btn-wide { max-width: none; }
.share-url { width: 100%; min-height: 44px; background: var(--panel); color: var(--tx); border: 1px solid var(--line2); border-radius: var(--r); padding: 0 10px; font: 13px var(--mono); }
.near { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.near h3 { font-size: 14px; margin-bottom: 4px; }
@media (min-width: 700px) { .grid-near { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 読み物(about) */
.prose ul { padding-left: 1.2em; margin: 0; }
.prose li { margin: 6px 0; color: var(--tx2); font-size: 14px; }
.prose a { overflow-wrap: anywhere; }

/* フッター */
.ft { border-top: 1px solid var(--line); margin-top: 40px; padding: 16px 0 24px; font-size: 12px; color: var(--tx3); }
.src { list-style: none; padding: 0; margin: 0 0 8px; overflow-wrap: anywhere; }
.src li { margin: 2px 0; }
.warn-note { margin: 0 0 8px; }
.ft-links { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; }
.ft-links a { color: var(--tx2); display: inline-flex; align-items: center; min-height: 44px; }
.ft-links .op { white-space: nowrap; display: inline-flex; align-items: center; }
.list-msg { margin: 0 0 10px; }
.ad-space { height: calc(var(--ad-h) + env(safe-area-inset-bottom, 0px)); }   /* 出典・運営のリンクの下。iPhone の下のバーの分も足す */

.toast { position: fixed; left: 50%; bottom: calc(var(--ad-h) + 16px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--panel2); border: 1px solid var(--ac); color: var(--tx); padding: 10px 14px; border-radius: var(--r); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 気象庁のページへの小さいボタン(雨雲の動き・天気予報・洪水キキクル)。表示中の場所の箱の中、いちばん下に1行で */
.wx-box:empty { display: none; }
.wx-box, .locbar .wx { flex-basis: 100%; }
.wx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wx-src { font-size: 11px; color: var(--tx3); margin-right: 2px; }
.btn-wx { min-height: 44px; padding: 0 9px; font-size: 12px; }   /* 押しやすさ(44px以上)。狭い画面では2行になってよい */

/* ---- 「表示中の場所」の1行の箱・ロゴの h1(トップ)・バナー用のすき間(トップ) ---- */
.brand-h1 { margin: 0; font: inherit; }
.locbar-mini { padding: 4px 6px 4px 10px; gap: 0; margin: 8px 0 6px; }
.locbar-mini .loc-line { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; min-height: 44px; }
.locbar-mini .pin { color: var(--ac); flex: none; }
.locbar-mini .loc-text { font-weight: 500; min-width: 0; }
.loc-how { font-size: 11px; color: var(--tx3); border: 1px solid var(--line2); border-radius: 2px; padding: 0 5px; white-space: nowrap; }
.loc-how:empty { display: none; }
.loc-toggle { margin-left: auto; flex: none; }
.loc-more { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; padding: 6px 0 8px; }
.loc-more[hidden] { display: none; }
.wx-text { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 12px; color: var(--tx3); min-height: 44px; border-top: 1px solid var(--line); }
.wx-text a { color: var(--tx2); display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.drop-note { margin-top: 8px; font-size: 11px; }   /* 外した数の文は一覧の下に小さく */
.wx-text .wx-src { font-size: 10px; color: var(--tx3); margin-left: 2px; }
/* 天気のマス(トップだけ)。字は12px以上。気象庁の値をそのまま出す。
   中身は真ん中にそろえ、となりのカメラのマスと同じ高さの中に、上から下まで同じ間をあけて並べる(space-evenly) */
.wx-btn { display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 2px; width: 100%; height: 100%; padding: 6px 8px; margin: 0; border: 1px solid var(--line2); background: var(--panel); color: var(--tx); border-radius: var(--r); text-align: center; cursor: pointer; font: 400 12px/1.4 var(--sans); overflow: hidden; }
.wx-btn:hover { background: var(--panel2); }
.wx-hd { display: flex; gap: 6px; align-items: baseline; justify-content: center; min-width: 0; max-width: 100%; }
.wx-lb { font-size: 12px; color: var(--ac); font-weight: 700; flex: none; }
.wx-area { font-size: 12px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wx-main { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; max-width: 100%; }
.wx-ic { width: 38px; height: 38px; flex: none; display: block; }
.wx-ic-big { width: 48px; height: 48px; }
.wx-tel { font-size: 14px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wx-row { font-size: 12px; color: var(--tx2); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wx-row b { color: var(--tx); font-size: 14px; }
.wx-st { color: var(--tx3); font-size: 12px; }
.wx-ft { display: flex; justify-content: center; gap: 0 8px; font-size: 12px; color: var(--tx3); flex-wrap: wrap; max-width: 100%; }
.wx-btn > * { flex: none; }
.wx-day { text-align: left; }
.wx-days { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 600px) { .wx-days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wx-day { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.wx-day .wx-row { white-space: normal; }
.wx-day-hd { font-size: 14px; margin-bottom: 4px; }
.wx-full { font-size: 13px; color: var(--tx2); margin: 4px 0; overflow-wrap: anywhere; }
.wx-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.wx-credit { font-size: 12px; overflow-wrap: anywhere; }

/* ---- 地図(国土地理院 地理院タイル 淡色地図)----
   タイルの画像には色・明るさ・透明度などの効果を付けない(そのまま表示する決まり)。印は別の層(.map-over)に重ねる */
/* 「地図で見る」は見出しの行の右はし(狭い画面は「地図」だけ) */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 8px; }
.title-row .h1 { margin: 0; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.btn-map { flex: none; gap: 5px; white-space: nowrap; }
.btn-map svg { flex: none; }
.btn-map .lb-s { display: none; }
@media (max-width: 480px) { .btn-map .lb-l { display: none; } .btn-map .lb-s { display: inline; } .btn-map { padding: 0 9px; } }
.sec-right { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.sec-hd:has(.btn-map) { align-items: center; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.map-box { margin: 4px 0 16px; }
/* ホイールだけ回した時の案内(地図は動かさず、ページを動かす) */
.map-whint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; max-width: 86%; padding: 10px 14px; border-radius: 10px; background: rgba(0,0,0,.68); color: #fff; font-size: 14px; line-height: 1.5; text-align: center; pointer-events: none; opacity: 0; transition: opacity .2s; }
.map-whint.on { opacity: 1; }
.map-box[hidden] { display: none; }
.map-layers { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.map-layers:empty { display: none; }
.map-layers .note { margin: 0; }
.map-host { position: relative; height: 340px; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: var(--ph); }
@media (min-width: 700px) { .map-host { height: 440px; } }
@media (orientation: landscape) and (max-height: 500px) { .map-host { height: 260px; } }
.map-host-q { height: min(62vh, 440px); min-height: 300px; scroll-margin-top: 64px; }
@media (min-width: 700px) { .map-host-q { height: min(64vh, 560px); } }
@media (orientation: landscape) and (max-height: 500px) { .map-host-q { height: 250px; min-height: 0; } }
.map-view { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; outline-offset: -2px; }
.map-view.dragging { cursor: grabbing; }
.map-tiles { position: absolute; inset: 0; }
.map-tiles img { position: absolute; max-width: none; display: block; -webkit-user-drag: none; pointer-events: none; }
.map-deco { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.map-over { position: absolute; inset: 0; pointer-events: none; }
/* 重ね絵(洪水の想定)。タイルの画像には手を加えず、入れ物の重ね方だけで半透明にする */
.map-ovs, .map-ov { position: absolute; inset: 0; pointer-events: none; }
.map-ov { opacity: .65; }
.map-ov[hidden] { display: none; }
.map-ov img { position: absolute; max-width: none; display: block; -webkit-user-drag: none; pointer-events: none; }
.sw-flood { border-radius: 3px; background: linear-gradient(90deg, #f7f5a9, #ffb7b7, #dc7adc); }
.flood-info { margin: 6px 0 12px; }
.flood-info[hidden] { display: none; }
.flood-info .note { margin: 4px 0 0; }
.flood-lg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 13px; color: var(--tx2); }
.flood-lg-t { color: var(--tx3); }
.flood-lg-i { display: inline-flex; align-items: center; gap: 4px; }
.flood-sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.25); }
.map-mk { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
.map-mk[hidden] { display: none; }
.map-ctl { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.map-zb { width: 44px; height: 44px; border: 1px solid var(--line2); background: rgba(10, 15, 21, .9); color: var(--tx); font: 600 20px/1 var(--mono); border-radius: var(--r); cursor: pointer; }
.map-zb:hover { border-color: var(--ac); }
.map-attr { font-size: 12px; color: var(--tx3); margin: 4px 0 0; }
.map-attr a { color: var(--tx2); display: inline-flex; align-items: center; min-height: 44px; }
.map-hint { margin-top: -6px; }
/* カメラの印(押せる所は44px。見える丸は小さく) */
.mk-cam { width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mk-cam .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ac); border: 2px solid #0a0f15; box-shadow: 0 0 0 1px var(--ac); }
.mk-s .dot { background: #0a0f15; border: 3px solid var(--ac); box-shadow: 0 0 0 1px #0a0f15; border-radius: 2px; }
.mk-cam:hover .dot, .mk-cam:focus-visible .dot { transform: scale(1.3); }
.mk-base { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #0a0f15; background: var(--tx); box-shadow: 0 0 0 2px var(--tx); pointer-events: none; }
/* 表示中の場所(自分の場所)はスマホの地図アプリと同じ形: 青い点・白いふち・まわりに薄い青の円(2026-11-17 オーナー)。市の代表点は .mk-base のまま */
.mk-base.mk-me { display: block; width: 18px; height: 18px; border: 0; background: transparent; box-shadow: none; }
.mk-base.mk-me::before { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(66,133,244,.18); border: 1px solid rgba(66,133,244,.55); box-sizing: border-box; pointer-events: none; }
.mk-base.mk-me::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4285f4; border: 3px solid #fff; box-sizing: border-box; box-shadow: 0 1px 4px rgba(0,0,0,.45); pointer-events: none; }
.chip-tg[aria-pressed="false"] { color: var(--tx3); border-style: dashed; }
.chip-tg[aria-pressed="false"] .sw { opacity: .3; }
.sw { width: 12px; height: 12px; display: inline-block; flex: none; }
.sw-r { border-radius: 50%; background: var(--ac); }
.sw-s { border: 3px solid var(--ac); border-radius: 2px; }
.sw-q { border-radius: 50%; background: linear-gradient(90deg, #5b6f84 0 33%, var(--ac) 33% 66%, var(--warn) 66%); }
.sw-me { border-radius: 50%; border: 1px dashed var(--tx); }

/* ---- 地震のページ ---- */
/* 最大震度の色: 1・2 灰青 / 3 暗い青緑 / 4 青緑(差し色) / 5弱・5強 黄(警告) / 6弱以上 黄+白い縁。色だけに頼らず、数字も必ず出す */
.sd { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; height: 44px; border-radius: var(--r); flex: none; line-height: 1.1; border: 1px solid transparent; }
.sd small { font-size: 10px; }
.sd b { font: 700 16px/1.1 var(--mono); }
.sd-x { background: transparent; color: var(--tx3); border-color: var(--line2); }
.sd-1 { background: #5b6f84; color: #fff; }
.sd-3 { background: #1f7f78; color: #fff; }
.sd-4 { background: var(--ac); color: #04201d; }
.sd-5 { background: var(--warn); color: #1b1600; }
.sd-6 { background: var(--warn); color: #1b1600; box-shadow: inset 0 0 0 2px #fff; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (min-width: 1000px) { .qlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qlist > .note { margin: 0; }
.q-item { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 56px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); background: var(--panel); color: var(--tx); border-radius: var(--r); text-align: left; cursor: pointer; font: inherit; }
.q-item:hover { border-color: var(--line2); background: var(--panel2); }
.q-item.q-near { border-left: 3px solid var(--ac); }
.q-item.q-sel { border-color: var(--ac); background: var(--ac-dim); }
.q-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-l1 { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-size: 14px; }
.q-time { font-size: 13px; color: var(--tx2); }
.q-anm { font-weight: 500; overflow-wrap: anywhere; }
.q-l2 { font-size: 12px; color: var(--tx2); overflow-wrap: anywhere; }
.q-l2 .num { color: var(--tx); }
.q-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.q-legend .sd { height: 36px; min-width: 64px; }
.q-legend-note { margin: 6px 0; }
.mk-q { width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mk-q .dot { display: block; border-radius: 50%; border: 1.5px solid #0a0f15; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); flex: none; }
.mk-q.sd-x .dot { background: rgba(10, 15, 21, .6); border: 2px solid var(--tx2); box-shadow: none; }
.mk-q.sd-1 .dot { background: #5b6f84; }
.mk-q.sd-3 .dot { background: #1f7f78; }
.mk-q.sd-4 .dot { background: var(--ac); }
.mk-q.sd-5 .dot { background: var(--warn); }
.mk-q.sd-6 .dot { background: var(--warn); box-shadow: 0 0 0 2px #fff; }
.mk-q.sd-x, .mk-q.sd-1, .mk-q.sd-3, .mk-q.sd-4, .mk-q.sd-5, .mk-q.sd-6 { background: transparent; box-shadow: none; border: 0; }   /* 色は中の丸だけ */
.mk-q.on { z-index: 3; }
.mk-q.on .dot { box-shadow: 0 0 0 3px #0a0f15, 0 0 0 6px var(--ac); }   /* 選んだ地震(明るい地図の上でも見える濃い縁+青緑) */
.mk-q:focus-visible .dot { outline: 2px solid var(--ac); outline-offset: 3px; }
.near-ring { fill: none; stroke: var(--tx2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.sub-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.sub-hd h3 { font-size: 15px; }
#q-sel .grp { margin-top: 10px; }
#q-sel .info { margin-bottom: 10px; }

/* ---- 地震のページ(地図が上) ---- */
.sec-map { margin-top: 6px; }
.map-under { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 10px; margin-bottom: 4px; }
.map-under .map-attr { margin: 0; }
.mk-q.mk-new { background: transparent; border: 0; }
.mk-q.mk-new .dot { background: #e5484d; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(10, 15, 21, .6); }
.mk-q { overflow: visible; }
/* 日時の札(地図の上で読めるように、白い半透明の札に濃い字) */
.q-tag { position: absolute; left: 50%; bottom: calc(50% + 10px); transform: translate(-50%, 0); white-space: nowrap; font: 600 11px/1.3 var(--sans); color: #0a0f15; background: rgba(255, 255, 255, .86); border: 1px solid rgba(10, 15, 21, .25); border-radius: 3px; padding: 1px 5px; pointer-events: none; }
.mk-q.mk-new .q-tag { color: #fff; background: rgba(176, 30, 36, .9); border-color: #fff; }
.mk-q.on .q-tag { outline: 2px solid var(--ac); }
.mk-int { width: 8px; height: 8px; border-radius: 1px; border: 1px solid rgba(10, 15, 21, .7); pointer-events: none; display: block; }
.mk-int.sd-1 { background: #5b6f84; } .mk-int.sd-3 { background: #1f7f78; } .mk-int.sd-4 { background: var(--ac); }
.mk-int.sd-5, .mk-int.sd-6 { background: var(--warn); }
.int-hull { fill: none; stroke: #0a0f15; stroke-width: 1.4; stroke-dasharray: 6 4; stroke-linejoin: round; }
.sw-int { border-radius: 1px; background: var(--ac); width: 9px; height: 9px; }
/* 地図の上の小さい窓(選んだ地震)。半透明 */
.q-ov { position: absolute; left: 8px; bottom: 8px; z-index: 3; max-width: min(250px, calc(100% - 70px)); background: rgba(10, 15, 21, .74); color: var(--tx); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--r); padding: 4px 4px 8px 10px; font-size: 12px; }
.q-ov:empty { display: none; }
.q-ov.shut { padding: 0; background: transparent; border: 0; }
.q-ov-hd { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }
.q-ov-x { width: 44px; height: 44px; margin: -4px 0; border: 0; background: transparent; color: var(--tx); font-size: 20px; line-height: 1; cursor: pointer; }
.q-ov-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 1px 8px; margin: 0; padding-right: 6px; }
.q-ov-dl dt { color: var(--tx2); }
.q-ov-dl dd { margin: 0; overflow-wrap: anywhere; }
.q-ov-note { margin: 4px 0 0; color: var(--tx2); }
.q-ov-open { min-height: 44px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 15, 21, .74); color: var(--tx); border-radius: var(--r); font: 500 13px var(--sans); cursor: pointer; }
@media (orientation: landscape) and (max-height: 500px) { .q-ov { max-width: 300px; } .q-ov-dl { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); } }
/* 凡例 */
.q-legend { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--tx2); }
.q-legend li { display: inline-flex; align-items: center; gap: 5px; }
.lg-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.lg-dot.sd-1 { background: #5b6f84; } .lg-dot.sd-3 { background: #1f7f78; } .lg-dot.sd-4 { background: var(--ac); } .lg-dot.sd-5 { background: var(--warn); }
.lg-dot.sd-6 { background: var(--warn); box-shadow: 0 0 0 2px #fff; }
.lg-new { background: #e5484d; box-shadow: 0 0 0 2px #fff; }
.lg-int { width: 8px; height: 8px; border-radius: 1px; background: var(--tx2); }
.lg-line { width: 22px; border-top: 2px dashed var(--tx2); display: inline-block; }
.q-new { font-size: 11px; color: #fff; background: #b81e24; border-radius: 2px; padding: 0 5px; }
.q-more { margin: 10px 0 0; }

/* 川の歩み(過去の洪水と工事) */
.rv-jump { margin: 4px 0 10px; font-size: 14px; }
.rv-jump a { color: var(--ac); display: inline-flex; align-items: center; min-height: 44px; }
.rv-hist { scroll-margin-top: 64px; }
.rv-prof { list-style: none; padding: 0; margin: 0 0 8px; font-size: 14px; color: var(--tx2); }
.rv-prof li { margin: 2px 0; }
.rv-srcs { font-size: 12px; color: var(--tx3); margin-left: 4px; }
.rv-tl { list-style: none; padding: 0 0 0 14px; margin: 0 0 12px; border-left: 2px solid var(--line2); }
.rv-tl > li { position: relative; margin: 0 0 14px; font-size: 14px; line-height: 1.7; }
.rv-tl > li::before { content: ''; position: absolute; left: -20px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--ac); }
.rv-works > li::before { background: var(--tx3); }
.rv-tl p { margin: 2px 0; }
.rv-h { font-weight: 600; color: var(--tx); }
.rv-y { color: var(--ac); margin-right: 6px; }
.rv-goal { background: var(--bg2); border-radius: 6px; padding: 6px 10px; }
.rv-goal span { font-size: 12px; color: var(--tx3); margin-right: 8px; }
.rv-src { font-size: 12px; color: var(--tx3); }
.rv-src a { color: var(--tx2); word-break: break-all; }
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.guide-list a { display: block; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r); color: var(--tx); text-decoration: none; }
.guide-list a:hover { border-color: var(--ac); }
.guide-list b { display: block; font-size: 15px; }
.guide-list span { display: block; font-size: 13px; color: var(--tx3); margin-top: 2px; }
