:root {
  --bg: #050505;
  --panel: #15161a;
  --line: #2a2c33;
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --accent: #fe710a;      /* ロゴのオレンジ */
  --accent-text: #ffffff;
  --soon: #ff6b5b;
  --mid: #ffc531;
  --later: #6cc4ff;
  --ok: #5fd38d;
  --error: #ff7b7b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
h1, h2 { margin: 0 0 12px; }
h2 { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--error); min-height: 1.5em; }

.screen { max-width: 480px; margin: 0 auto; padding: 48px 16px; }
.logo { margin: 0 auto 16px; max-width: 280px; }
.logo img { display: block; width: 100%; height: auto; }
.screen > .muted { text-align: center; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }

main { max-width: 640px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 20px; }
label { display: block; margin-bottom: 12px; font-size: 15px; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
input:not([type=checkbox]) {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font-size: 17px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
}
details { margin-bottom: 12px; color: var(--muted); font-size: 15px; }
summary { cursor: pointer; margin-bottom: 10px; }

button { font: inherit; color: inherit; border: 0; cursor: pointer; border-radius: 12px; }
button:disabled { opacity: .5; }
.primary { background: var(--accent); color: var(--accent-text); font-weight: 700; padding: 12px 18px; }
.big { width: 100%; padding: 18px; font-size: 20px; border-radius: 14px; }
.ghost { background: transparent; border: 1px solid var(--line); padding: 10px 14px; }
.ghost.small { padding: 6px 10px; font-size: 14px; }

.radius { display: flex; gap: 6px; margin-bottom: 12px; }
.radius button { flex: 1; padding: 12px 0; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.radius button.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.event {
  background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--later);
  border-radius: 12px; padding: 14px; display: grid; gap: 4px;
}
.event.soon { border-left-color: var(--soon); }
.event.mid { border-left-color: var(--mid); }
.event.ended { border-left-color: var(--muted); opacity: .75; }
.event .when { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.event .end { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.event .left { font-size: 18px; font-weight: 700; }
.event.soon .left { color: var(--soon); }
.event.mid .left { color: var(--mid); }
.event .tag { font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--line); color: var(--muted); }
.event .venue { font-size: 18px; font-weight: 700; }
.event .title { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.event .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.event a.nav { background: var(--line); color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 15px; }

.item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.item .name { font-weight: 700; }
.item .url { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.item .status.ok { color: var(--ok); }
.item .status.error, .item .status.empty, .item .status.blocked { color: var(--error); }
.item .actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row-between h2 { margin: 0; }

.empty { text-align: center; color: var(--muted); padding: 32px 8px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex;
  background: var(--panel); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button { flex: 1; padding: 16px 0; background: none; border-radius: 0; font-size: 16px; color: var(--muted); font-weight: 600; }
.tabs button.active { color: var(--accent); }

.center { text-align: center; }
a { color: var(--accent); }
.line { width: 100%; background: #06c755; color: #fff; font-weight: 700; }
.admin-login { margin-top: 24px; }
.admin-login summary { text-align: center; }
.refresh {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px;
}
.refresh.done strong { color: var(--ok); }
.refresh.running strong { color: var(--mid); }
.refresh button.primary { padding: 8px 14px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); margin-left: 6px; }
.badge.pending { background: var(--mid); color: #1a1400; }
.avatar { width: 28px; height: 28px; border-radius: 50%; vertical-align: middle; margin-right: 8px; object-fit: cover; }
