/* 稼働状況ページ。書体は端末のものを使う(外部の配信元に頼らない —— 本体に障害があっても出せるように)。 */
:root {
  --ink: #1f2937;
  --muted: #4b5563;
  --line: #dfe3e8;
  --navy: #1f4e78;
  --ok: #2e8540;
  --minor: #e0a100;
  --major: #b42318;
  --none: #d5d9df;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f5f6f8;
  color: var(--ink);
  font-family: 'BIZ UDPGothic', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', sans-serif;
  line-height: 1.6;
}
.page { max-width: 880px; margin: 0 auto; padding: 40px 16px 56px; display: flex; flex-direction: column; gap: 24px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: 0.02em; }
.brand-sub { font-size: 18px; color: #3b4452; }
.refresh { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; }
.updated { font-size: 13px; color: var(--muted); }
.refresh-button {
  font: inherit; font-size: 14px; min-height: 44px; padding: 0 16px; border-radius: 8px;
  border: 1px solid #b7c4d1; background: #fff; color: var(--navy); cursor: pointer;
}
.refresh-button:hover { background: #eef3f8; }
.refresh-button:focus-visible { outline: 3px solid #7aa7d6; outline-offset: 2px; }
.refresh-button:disabled { color: var(--muted); cursor: default; background: #f3f4f6; }
.refresh-error { flex-basis: 100%; text-align: right; font-size: 13px; color: #a3241a; }
.trial { margin: 0; padding: 12px 16px; border-radius: 8px; background: #e8eef5; color: #1f3a57; font-size: 14px; }
.stale { margin: 0; padding: 12px 16px; border-radius: 8px; background: #fdf3e1; color: #6b3d00; font-size: 14px; }
[hidden] { display: none !important; }

.banner { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-radius: 10px; background: #eef0f3; color: #374151; }
.banner-text { display: flex; flex-direction: column; gap: 4px; }
.banner-title { font-size: 20px; font-weight: 700; }
.banner-sub { font-size: 14px; }
.banner .i-ok, .banner .i-down, .banner .i-maint { display: none; }
.banner[data-state='ok'] { background: #e7f4ea; color: #14532d; }
.banner[data-state='ok'] .i-ok { display: inline; }
.banner[data-state='down'] { background: #fdecea; color: #7a1a12; }
.banner[data-state='down'] .i-down { display: inline; }
.banner[data-state='maintenance'] { background: #fdf3e1; color: #6b3d00; }
.banner[data-state='maintenance'] .i-maint { display: inline; }
.banner[data-state='loading'] .banner-icon, .banner[data-state='error'] .banner-icon { display: none; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font-size: 17px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.short { font-size: 15px; font-weight: 700; }
.short[data-state='ok'] { color: #1e6b34; }
.short[data-state='down'] { color: #a3241a; }
.short[data-state='maintenance'] { color: #8a5300; }
.note { margin: 0; font-size: 13px; color: var(--muted); }

.bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 36px; }
.bar { border-radius: 2px; background: var(--none); }
.bar.ok, .sw.ok { background: var(--ok); }
.bar.minor, .sw.minor { background: var(--minor); }
.bar.major, .sw.major { background: var(--major); }
.bar.none, .sw.none { background: var(--none); }
.bars-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; color: #374151; }
.legend span { display: flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }

.months { width: 100%; border-collapse: collapse; font-size: 14px; }
.months th { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); color: #374151; }
.months td { padding: 10px 8px; border-bottom: 1px solid #eef0f3; }
.months tr:last-child td { border-bottom: none; }
.months .num { text-align: right; font-variant-numeric: tabular-nums; }
.months td.num.rate { font-weight: 700; }
.months .remark { color: var(--muted); }
.months .empty td { color: #6b7280; }

.empty-text { margin: 0; font-size: 14px; color: #374151; }
.notice { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid #e5e7eb; border-radius: 8px; }
.notice + .notice { margin-top: 12px; }
.notice-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e8eef5; color: var(--navy); }
.tag.incident { background: #fdecea; color: #7a1a12; }
.tag.maintenance { background: #fdf3e1; color: #6b3d00; }
.notice-title { font-size: 15px; font-weight: 700; }
.notice-when { font-size: 13px; color: var(--muted); }
.updates { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.updates li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; }
.updates time { color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .bars { gap: 1px; }
  .months .remark { display: none; }
}
