/* SK Hub ステータス。色と部品は sk-hub.jp の assets/site.css（稼働状況ページ）に合わせる。
   本体が落ちていても出るように、sk-hub.jp のファイルや外部のフォントは読み込まない */
:root {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eef0f3;
  --ink: #0d1014; --muted: #5a6371; --line: #e1e4e9; --line-strong: #c9ced6;
  --accent: #2563eb; --link: #1a56db;
  --ok: #16a34a; --slow: #d97706; --partial: #f97316; --down: #dc2626; --maint: #8b5cf6; --none: #dfe3e8;
  --ok-soft: #dcfce7; --ok-ink: #15803d;
  --slow-soft: #fef3c7; --slow-ink: #b45309;
  --down-soft: #fee2e2; --down-ink: #b91c1c;
  --maint-soft: #efe9ff; --maint-ink: #6d28d9;
  --info-soft: #e0f0ff; --info-ink: #1e40af;
  --shadow: 0 1px 2px rgba(13, 16, 20, .04), 0 8px 24px rgba(13, 16, 20, .06);
  --font: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", Meiryo, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0e13; --surface: #151a21; --surface-2: #1d232c;
    --ink: #e8ecf1; --muted: #9aa4b2; --line: #2a313b; --line-strong: #3a4350;
    --accent: #3b82f6; --link: #7aa7ff;
    --ok: #22c55e; --slow: #f59e0b; --partial: #fb923c; --down: #ef4444; --maint: #a78bfa; --none: #2a313b;
    --ok-soft: #10281a; --ok-ink: #6ee7a0;
    --slow-soft: #2d220c; --slow-ink: #fbbf5a;
    --down-soft: #2f1414; --down-ink: #fca5a5;
    --maint-soft: #251a3d; --maint-ink: #c4a8ff;
    --info-soft: #13263d; --info-ink: #9cc3ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--font); }
h1, h2, p { margin: 0; }
a { color: var(--link); }
svg { flex: none; }
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ヘッダー */
.hd { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.hd-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.hd-logo b { color: var(--muted); font-weight: 600; }
.hd-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.hd-link:hover { background: var(--surface-2); color: var(--ink); }
.hd-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.hero { padding: 48px 0 24px; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.25; letter-spacing: -.01em; margin-top: 4px; }
.lead { color: var(--muted); margin-top: 8px; }

/* メンテナンス・障害のお知らせ */
.notice { display: flex; gap: 14px; padding: 18px 20px; border-radius: 20px; margin-bottom: 16px; background: var(--info-soft); color: var(--info-ink); }
.notice[data-level="warning"] { background: var(--down-soft); color: var(--down-ink); }
.notice[data-level="maintenance"] { background: var(--maint-soft); color: var(--maint-ink); }
.notice-icon { width: 10px; height: 10px; border-radius: 50%; background: currentColor; margin-top: 8px; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.notice strong { display: block; font-size: 15px; }
.notice p { color: var(--ink); font-size: 14px; margin-top: 2px; white-space: pre-wrap; }
.notice small { display: block; font-size: 12.5px; margin-top: 4px; opacity: .85; }

/* 全体の状態 */
.summary { --st: #3b82f6; display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--st) 22%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--st) 10%, var(--surface)), var(--surface) 70%); box-shadow: var(--shadow), 0 14px 40px -18px color-mix(in srgb, var(--st) 45%, transparent); }
.summary[data-state="ok"] { --st: var(--ok); }
.summary[data-state="slow"] { --st: var(--slow); }
.summary[data-state="maint"] { --st: var(--maint); }
.summary[data-state="down"] { --st: var(--down); }
.summary > div { flex: 1; min-width: 0; }
.summary strong { display: block; font-size: 19px; line-height: 1.45; }
.summary strong.is-in { animation: rise .5s cubic-bezier(.22, 1, .36, 1) backwards; }
.summary small { color: var(--muted); font-size: 13px; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--link); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.summary[data-state="checking"] .btn svg { animation: spin 1s linear infinite; }

.orb { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.orb-ring, .orb-ripple { position: absolute; border-radius: 50%; pointer-events: none; }
.orb-ring { inset: 0; background: conic-gradient(from 0deg, transparent 0 55%, var(--st)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); opacity: 0; transition: opacity .3s ease; }
.summary[data-state="checking"] .orb-ring { opacity: 1; animation: spin .9s linear infinite; }
.orb-ripple { inset: 10px; border: 2px solid var(--st); opacity: 0; }
.summary[data-state="ok"] .orb-ripple { animation: ripple 3s cubic-bezier(.22, 1, .36, 1) .5s infinite; }
.summary[data-state="ok"] .orb-ripple + .orb-ripple { animation-delay: 2s; }
.summary:is([data-state="slow"], [data-state="down"], [data-state="maint"]) .orb-ripple { animation: ripple 1.8s cubic-bezier(.22, 1, .36, 1) .4s infinite; }
.summary:is([data-state="slow"], [data-state="down"], [data-state="maint"]) .orb-ripple + .orb-ripple { animation-delay: 1.3s; }
.orb-core { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--st); display: grid; place-items: center; box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--st) 70%, transparent); transition: width .5s cubic-bezier(.34, 1.56, .64, 1), height .5s cubic-bezier(.34, 1.56, .64, 1); }
.summary[data-state="checking"] .orb-core { animation: breathe 1.2s ease-in-out infinite; }
.summary:not([data-state="checking"]) .orb-core { width: 34px; height: 34px; }
.orb-core svg { position: absolute; width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .2s ease; }
.summary[data-state="ok"] .orb-ok, .summary:is([data-state="slow"], [data-state="maint"]) .orb-slow, .summary[data-state="down"] .orb-down { opacity: 1; transition-delay: .2s; }
.orb-ok path { stroke-dasharray: 22; }
.summary[data-state="ok"] .orb-ok path { animation: draw .45s .3s cubic-bezier(.65, 0, .35, 1) backwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { 0% { transform: scale(.75); opacity: .6; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(.7); opacity: .6; } }
@keyframes draw { from { stroke-dashoffset: 22; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* サービスの一覧 */
.group { margin-top: 32px; }
.group h2 { font-size: 14px; font-weight: 800; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.row { padding: 16px 20px 14px; }
.row + .row { border-top: 1px solid var(--line); }
.row-top { display: flex; align-items: center; gap: 12px; }
.row-name { flex: 1; min-width: 0; }
.row-name strong { display: block; font-size: 15px; line-height: 1.4; }
.row-name small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.ms { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.row[data-state="ok"] .pill { background: var(--ok-soft); color: var(--ok-ink); }
.row[data-state="ok"] .pill::before { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.row[data-state="slow"] .pill { background: var(--slow-soft); color: var(--slow-ink); }
.row:is([data-state="down"], [data-state="incident"]) .pill { background: var(--down-soft); color: var(--down-ink); }
.row[data-state="maint"] .pill { background: var(--maint-soft); color: var(--maint-ink); }
.row:is([data-state="setup"], [data-state="unknown"]) .pill { background: var(--info-soft); color: var(--info-ink); }

.bars { display: flex; gap: 2px; height: 30px; margin-top: 12px; }
.bar { flex: 1; min-width: 0; border-radius: 3px; background: var(--none); cursor: default; transition: transform .12s ease, opacity .12s ease; }
.bar:hover, .bar.is-active { transform: scaleY(1.12); }
.bars:hover .bar:not(:hover):not(.is-active) { opacity: .75; }
.lv-ok { background: var(--ok); } .lv-slow { background: var(--slow); } .lv-partial { background: var(--partial); }
.lv-down { background: var(--down); } .lv-maint { background: var(--maint); } .lv-none { background: var(--none); }
.bars-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars-foot b { color: var(--ink); font-weight: 700; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* ポップアップ（バーの上） */
.tip { position: absolute; z-index: 20; width: max-content; max-width: 240px; padding: 10px 12px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.6; box-shadow: var(--shadow); pointer-events: none; }
.tip strong { display: block; font-size: 13px; }
.tip span { display: block; opacity: .8; }

/* 最近の停止・このページについて */
.block { margin-top: 48px; }
.block h2 { font-size: 20px; line-height: 1.4; }
.sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.events { list-style: none; margin: 14px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.events li { display: flex; gap: 12px; align-items: baseline; padding: 14px 20px; font-size: 14px; }
.events li + li { border-top: 1px solid var(--line); }
.events .ev-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--down); flex: none; transform: translateY(-1px); }
.events .ev-dot.is-done { background: var(--line-strong); }
.events .ev-main { flex: 1; min-width: 0; }
.events .ev-main strong { font-weight: 700; }
.events .ev-main small { display: block; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.events .ev-tag { font-size: 12px; font-weight: 700; color: var(--down-ink); background: var(--down-soft); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.events .empty { color: var(--muted); }
.about ul { margin: 12px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 14px; }
.about li + li { margin-top: 6px; }

.ft { margin-top: 64px; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; }
.ft-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ft-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; text-decoration: none; }
.ft nav { display: flex; flex-wrap: wrap; gap: 6px 18px; flex: 1; }
.ft nav a { color: var(--muted); text-decoration: none; }
.ft nav a:hover { color: var(--ink); text-decoration: underline; }
.ft small { color: var(--muted); }

@media (max-width: 560px) {
  .hero { padding-top: 32px; }
  .summary { padding: 18px; gap: 14px; flex-wrap: wrap; }
  .summary .btn { width: 100%; justify-content: center; }
  .row { padding: 14px 16px 12px; }
  .row-top { gap: 10px; }
  .ms { display: none; }
  .bars { height: 26px; }
  .events li { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
