/* 通信障害マップ：独立ブランドの見た目（落ち着いた紺＋警報色のオレンジ） */
:root {
  --ink: #14202e; --ink2: #44505e; --muted: #6b7684; --line: #e3e7ec; --bg: #f5f7fa; --card: #fff;
  --brand: #14202e; --accent: #e0542a; --accent-dark: #b3341a; --ok: #1f8a5b; --ok-bg: #e9f6ef; --alert-bg: #fdeee8;
  --l0: #e9edf2; --l1: #fde3d4; --l2: #fbb894; --l3: #f4874f; --l4: #e0542a; --l5: #a92f17;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.7; font-size: 16px; }
a { color: #1c5fb8; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; padding-bottom: 40px; }
h1 { font-size: clamp(22px, 4.5vw, 30px); line-height: 1.35; margin: 8px 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h2.mt { margin-top: 24px; }
h3 { font-size: 14px; color: var(--ink2); margin: 12px 0 6px; }
.lead { color: var(--ink2); margin: 0 0 16px; }
.muted, .note { color: var(--muted); }
.note { font-size: 13px; }

/* ヘッダー・フッター */
.site-header { background: var(--brand); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; }
.logo-mark { width: 30px; height: 30px; color: #fff; }
.site-header nav { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.site-header nav a { color: #d6dde6; text-decoration: none; }
.site-header nav a:hover { color: #fff; }
.site-header .nav-report { background: var(--accent); color: #fff; padding: 6px 12px; border-radius: 999px; font-weight: 700; }
@media (max-width: 560px) { .site-header nav a:not(.nav-report) { display: none; } }
.site-footer { border-top: 1px solid var(--line); background: #fff; font-size: 13px; padding: 20px 0 32px; }
.site-footer p { margin: 4px 0; }

/* トップの見出し */
.hero { text-align: center; padding: 12px 0 8px; }
.hero h1 { margin-bottom: 2px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* ボタン */
.btn-report { display: flex; flex-direction: column; align-items: center; max-width: 420px; margin: 12px auto 20px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; padding: 14px 20px;
  border-radius: var(--radius); box-shadow: 0 4px 14px rgba(224, 84, 42, .3); }
.btn-report small { font-weight: 500; font-size: 12px; opacity: .9; }
.btn-report:hover { background: var(--accent-dark); }
.btn { display: inline-block; background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 10px; margin: 4px 4px 4px 0; }
.btn.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }

/* いまの状況 */
.status { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 14px 16px; margin: 8px 0 12px; }
.status strong { font-size: 17px; }
.status p { margin: 2px 0 0; font-size: 14px; color: var(--ink2); }
.status ul { margin: 6px 0 0; padding-left: 18px; }
.status .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 8px; }
.status.ok { background: var(--ok-bg); }
.status.ok .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(31, 138, 91, .18); }
.status.alert { background: var(--alert-bg); border: 1px solid #f6c2ad; }
.status.alert .dot { background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 84, 42, .5); } 100% { box-shadow: 0 0 0 10px rgba(224, 84, 42, 0); } }
@media (prefers-reduced-motion: reduce) { .status.alert .dot { animation: none; } }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpis div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.kpis span { display: block; font-size: 12px; color: var(--muted); }
.kpis strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.updated { font-size: 12px; color: var(--muted); text-align: right; margin: 4px 0 8px; }

/* カード */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.grid2 { display: grid; gap: 0 12px; }
@media (min-width: 820px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.empty small { font-weight: 400; color: var(--muted); }
.empty { text-align: center; padding: 40px 12px; color: var(--ok); font-weight: 700; background: var(--ok-bg); border-radius: 10px; margin: 0; }
.more { margin: 8px 0 0; text-align: right; font-size: 14px; }

/* マス目地図 */
.tilemap { width: 100%; height: auto; display: block; }
.tile rect { fill: var(--l0); transition: opacity .15s; }
.tile.l1 rect { fill: var(--l1); } .tile.l2 rect { fill: var(--l2); } .tile.l3 rect { fill: var(--l3); }
.tile.l4 rect { fill: var(--l4); } .tile.l5 rect { fill: var(--l5); }
.tile text { text-anchor: middle; font-size: 12px; fill: var(--ink); pointer-events: none; }
.tile .tc { font-size: 13px; font-weight: 800; }
.tile.l4 text, .tile.l5 text { fill: #fff; }
a:hover .tile rect, a:focus .tile rect { opacity: .75; }
.legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .l1 { background: var(--l1); } .legend .l2 { background: var(--l2); } .legend .l3 { background: var(--l3); }
.legend .l4 { background: var(--l4); } .legend .l5 { background: var(--l5); }

/* グラフ */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar.zero { fill: none; }
.chart .grid { stroke: var(--line); }
.chart .ax { font-size: 13px; fill: var(--muted); }

/* 一覧 */
.barlist { list-style: none; margin: 0; padding: 0; }
.barlist li { display: grid; grid-template-columns: minmax(7em, 38%) 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.bl-bar { background: var(--l0); border-radius: 4px; height: 8px; overflow: hidden; }
.bl-bar i { display: block; height: 100%; background: var(--l3); }
.bl-n { font-variant-numeric: tabular-nums; color: var(--ink2); font-size: 13px; }
.rising { margin: 0; padding-left: 22px; }
.rising li { padding: 4px 0; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 7.5em 1fr; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.events li.active { background: linear-gradient(90deg, var(--alert-bg), transparent); }
.events time { color: var(--ink2); font-variant-numeric: tabular-nums; }
.events .ev-area { margin-left: 6px; color: var(--ink2); }
.events .ev-meta { grid-column: 2; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.badge.red { background: var(--accent); color: #fff; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-block; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: #fafbfc; font-size: 14px; }
.chips.small a { font-size: 13px; padding: 3px 9px; }
.chips a:hover { border-color: var(--ink2); }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin: 4px 0; }
.ext::after { content: " ↗"; }
.switch { border-color: #c9d6e8; background: #f4f8fd; }

/* 履歴の絞り込み */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; font-size: 13px; color: var(--ink2); }
.filters select, .filters button { font-size: 15px; padding: 7px 10px; border-radius: 8px; border: 1px solid #c8cfd8; background: #fff; }
.filters button { background: var(--brand); color: #fff; border: 0; font-weight: 700; }

/* 報告フォーム */
.report-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.report-form legend { font-weight: 800; margin-bottom: 8px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; padding: 9px 14px; border: 1.5px solid #c8cfd8; border-radius: 10px; background: #fff; cursor: pointer; font-size: 15px; }
.opt input:checked + span { border-color: var(--accent); background: var(--alert-bg); font-weight: 700; }
.opt input:focus-visible + span { outline: 3px solid #8fb4e8; }
.opt[hidden] { display: none; }
.report-form select { width: 100%; font-size: 16px; padding: 10px; border-radius: 10px; border: 1.5px solid #c8cfd8; background: #fff; }
.btn-submit { width: 100%; font-size: 18px; font-weight: 800; padding: 14px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; cursor: pointer; }
.btn-submit:disabled { opacity: .6; }
.form-error { background: var(--alert-bg); color: var(--accent-dark); padding: 10px 12px; border-radius: 8px; }
.done { text-align: center; }
.done .big { font-size: 18px; font-weight: 700; }
.cf-turnstile { margin-bottom: 12px; }

/* 運営者情報など文章のページ */
.prose h3 { font-size: 15px; color: var(--ink); margin: 18px 0 6px; }
.prose ul { padding-left: 20px; margin: 6px 0; }
.prose li { margin: 4px 0; }
.prose dl { display: grid; grid-template-columns: 7em 1fr; gap: 6px 12px; margin: 0; }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; }
