:root {
  color-scheme: light dark;
  --bg: #f7f6f3;
  --paper: #ffffff;
  --ink: #141033;
  --muted: #5c5a6b;
  --line: #e2e0ea;
  --brand: #3b2a8c;
  --brand-ink: #ffffff;
  --ok: #1f7a4d;
  --ok-bg: #e7f4ec;
  --warn: #8a5a00;
  --warn-bg: #fdf1d8;
  --down: #b3261e;
  --down-bg: #fbe7e5;
  --none: #8a8898;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14121d;
    --paper: #1d1a29;
    --ink: #ecebf3;
    --muted: #a9a6b8;
    --line: #34304a;
    --brand: #b9a8ff;
    --brand-ink: #14121d;
    --ok: #7fd3a4;
    --ok-bg: #173327;
    --warn: #f2c36b;
    --warn-bg: #3a2e14;
    --down: #ff9b92;
    --down-bg: #3d1d1b;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 0.9375rem; line-height: 1.75; }
main { max-width: 64rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
.client main { max-width: 40rem; }
h1 { margin: 0; font-size: 1.5rem; line-height: 1.4; text-wrap: balance; }
h2 { margin: 2.5rem 0 0.75rem; font-size: 1rem; }
p { margin: 0; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.eyebrow { color: var(--muted); font-size: 0.8125rem; letter-spacing: 0; }
.sep { color: var(--line); margin: 0 0.25rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* 一覧（SMASK 用） */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
button, .button { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 1.25rem; border: 0; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.flash { margin-top: 1rem; color: var(--ok); }
.counts { margin: 1.5rem 0 0.75rem; }
.counts b { font-size: 1.125rem; }
.counts .is-down { color: var(--down); }
.counts .is-warn { color: var(--warn); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--paper); }
table.sites { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.sites caption { padding: 0.75rem 1rem 0; text-align: left; font-weight: 700; }
.sites th, .sites td { padding: 0.75rem 0.625rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.sites thead th { position: sticky; top: 0; background: var(--paper); color: var(--muted); font-weight: 400; font-size: 0.8125rem; }
.sites tbody tr:last-child > * { border-bottom: 0; }
.sites th[scope="row"] { font-weight: 400; }
.sites .name { display: block; font-weight: 700; }
.sites td .small, .sites th .small { display: block; }
.reason { color: var(--down); }
.spark { color: var(--muted); vertical-align: middle; }
.lv-down .spark { color: var(--down); }
.badge { display: inline-block; padding: 0.0625rem 0.625rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-down { background: var(--down-bg); color: var(--down); }
.b-none { background: var(--bg); color: var(--muted); }
@media (max-width: 47.99rem) {
  .sites thead { display: none; }
  .sites, .sites tbody, .sites tr, .sites th, .sites td, .sites caption { display: block; }
  .sites caption { width: auto; padding-bottom: 0.25rem; }
  .sites tr { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
  .sites th, .sites td { border: 0; padding: 0.25rem 1rem; white-space: normal; }
  .sites td::before { content: attr(data-label) "："; color: var(--muted); font-size: 0.8125rem; }
}
.feed { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.feed li { position: relative; padding: 0.375rem 0 0.375rem 1rem; }
.feed li::before { content: ""; position: absolute; left: -0.3125rem; top: 0.95rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--none); }
.feed .k-down::before { background: var(--down); }
.feed .k-up::before { background: var(--ok); }
.feed .k-ssl::before { background: var(--warn); }
.feed time { color: var(--muted); font-size: 0.8125rem; margin-right: 0.5rem; font-variant-numeric: tabular-nums; }

/* お客さん用 */
.brandbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; font-size: 0.8125rem; }
.logo { height: 1.5rem; width: auto; }
.sample-note { margin-bottom: 1.5rem; padding: 0.625rem 0.875rem; border: 1px dashed var(--line); border-radius: 0.5rem; color: var(--muted); font-size: 0.8125rem; }
.hero { margin-top: 0.5rem; padding: 1.5rem 1.25rem; border-radius: 1rem; background: var(--paper); border-left: 6px solid var(--none); }
.hero p { margin-top: 0.5rem; }
.hero.lv-ok { border-left-color: var(--ok); }
.hero.lv-warn { border-left-color: var(--warn); }
.hero.lv-down { border-left-color: var(--down); background: var(--down-bg); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 1.25rem 0 0; }
@media (min-width: 36rem) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { padding: 0.875rem 1rem; border-radius: 0.75rem; background: var(--paper); }
.facts dt { color: var(--muted); font-size: 0.75rem; }
.facts dd { margin: 0.125rem 0 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.days { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; margin: 0; padding: 0; list-style: none; }
.days li { height: 2.25rem; border-radius: 3px; background: var(--line); }
.days .d-ok, .key.d-ok { background: var(--ok); }
.days .d-warn, .key.d-warn { background: var(--warn); }
.days .d-down, .key.d-down { background: var(--down); }
.days .d-none, .key.d-none { background: var(--line); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin-top: 0.5rem; color: var(--muted); }
.legend > span { white-space: nowrap; }
.key { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 2px; vertical-align: -1px; }
.checks { margin: 0; padding: 0; list-style: none; background: var(--paper); border-radius: 0.75rem; }
.checks li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.foot { margin-top: 3rem; }
.feed .k-note::before { background: var(--brand); }
.top3 { margin: 0; padding-left: 1.5rem; }
.top3 li + li { margin-top: 0.5rem; }
.plain-list { margin: 0; padding-left: 1.25rem; }
.brandbar .print { margin-left: auto; min-height: 2.25rem; padding: 0.25rem 1rem; font-size: 0.8125rem; }
.notes-form { display: grid; gap: 0.5rem; max-width: 40rem; padding: 1rem; border-radius: 0.75rem; background: var(--paper); }
.notes-form select, .notes-form textarea { width: 100%; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.375rem; background: var(--bg); color: var(--ink); font: inherit; }
.notes-form .row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.cal { width: 100%; border-collapse: collapse; font-size: 0.875rem; background: var(--paper); border-radius: 0.75rem; overflow: hidden; }
.cal th, .cal td { padding: 0.5rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.cal thead th { color: var(--muted); font-weight: 400; font-size: 0.8125rem; }
@media print {
  .print, .sample-note { display: none; }
  body { background: #fff; }
  main { padding: 0; }
  .facts div, .checks, .hero { border: 1px solid #ddd; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (forced-colors: active) {
  .hero, .facts div, .checks, .table-wrap { border: 1px solid CanvasText; }
  .days li { forced-color-adjust: none; }
}

/* 合言葉の入口（open.php） */
.keylead { margin-top: 0.75rem; }
.keyform { display: grid; gap: 0.5rem; max-width: 30rem; margin-top: 1.75rem; }
.keyform label { font-weight: 700; }
.keyform input { min-height: 2.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.keyform input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.keyform input[aria-invalid="true"] { border-color: var(--down); }
.keyerr { color: var(--down); font-size: 0.875rem; font-weight: 700; }
.keyform button { justify-self: start; margin-top: 0.5rem; }
.keyfoot { margin-top: 2.5rem; }
.checks + .small { margin-top: 0.625rem; }
