:root {
  --bg: #0F1113; --top: #000000; --f1: #15171A; --line: #202327; --line2: #2B2F34;
  --ink: #6E7176; --hi: #85888C; --muted: #4F5257; --ok: #3FBF6F; --warn: #D98B3A; --no: #C9534F;
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--hi); text-decoration: none; }
button, input, select, textarea { font: inherit; color: var(--hi); background: transparent; border: 0; }
input, select, textarea { border-bottom: 1px solid var(--line2); padding: 6px 0; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--hi); }
textarea { width: 100%; resize: vertical; }
button { cursor: pointer; padding: 6px 0; color: var(--muted); }
button:hover { color: var(--hi); }
button.pri { color: var(--hi); }
button.yes { color: var(--ok); }
button.no { color: var(--no); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 1px solid var(--hi); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { background: var(--top); }
.top .in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.top .brand { color: var(--hi); font-weight: 600; letter-spacing: .02em; }
.top .sp { flex: 1; }
.top .chip { padding: 2px 8px; border: 1px solid var(--line2); border-radius: 999px; white-space: nowrap; }
.top .chip.low { border-color: var(--warn); color: var(--warn); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px 64px; }
nav.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 8px 0 20px; overflow-x: auto; }
nav.tabs button { padding: 10px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
nav.tabs button[aria-selected="true"] { color: var(--hi); border-bottom-color: var(--hi); }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 16px; font-size: 14px; }
.toolbar .sp { flex: 1; }
.notice { padding: 16px 0; color: var(--muted); }
.unit { margin-bottom: 36px; }
.u-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-bottom: 10px; border-bottom: 1px solid var(--line2); }
.u-head h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--hi); }
.u-head .meta { font-size: 13px; color: var(--muted); }
.themes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; font-size: 13px; }
.themes .chip { padding: 2px 8px; border: 1px solid var(--line2); border-radius: 999px; color: var(--ink); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.row .t { color: var(--hi); font-weight: 500; }
.row .s { font-size: 13px; color: var(--muted); }
.row .s.err { color: var(--no); }
.row .acts { display: flex; gap: 14px; font-size: 13px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.bar { height: 2px; background: var(--line2); border-radius: 1px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .3s; }
details.add { padding: 10px 0; }
details.add summary { cursor: pointer; font-size: 14px; color: var(--muted); list-style: none; }
details.add summary::-webkit-details-marker { display: none; }
details.add summary:hover { color: var(--hi); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.grid .wide { grid-column: 1 / -1; }
.sug { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sug .why { color: var(--muted); font-size: 13px; }

.card { background: var(--f1); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 16px; color: var(--hi); font-weight: 600; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .text { margin: 8px 0; color: var(--ink); }
.card .acts { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 14px; }
.votes { display: flex; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.votes .v.yes { color: var(--ok); } .votes .v.no { color: var(--no); }
video { width: 100%; max-height: 60vh; background: #000; border-radius: 6px; display: block; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.range { display: grid; gap: 6px; margin: 10px 0; font-size: 13px; color: var(--muted); }
.range input[type=range] { width: 100%; border: 0; accent-color: #8A8F95; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.sec { margin: 28px 0; }
.sec h3 { margin: 0 0 10px; font-size: 16px; color: var(--hi); font-weight: 600; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 400; color: var(--muted); font-size: 13px; }
.state { font-size: 12px; color: var(--muted); }
.state.ok { color: var(--ok); } .state.warn { color: var(--warn); } .state.no { color: var(--no); }

#login { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; z-index: 10; }
#login form { display: grid; gap: 14px; width: min(320px, 90vw); }
#login h1 { margin: 0 0 8px; font-size: 22px; color: var(--hi); font-weight: 600; }
#login .err { color: var(--no); font-size: 13px; min-height: 1.3em; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--top); color: var(--hi); font-size: 14px; padding: 9px 14px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
.toast.show { opacity: 1; }
.reg ol { padding-left: 1.2em; } .reg li { margin: 6px 0; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } .row .acts { justify-content: flex-start; } }

.activity { display: grid; gap: 8px; padding: 12px 0 4px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.act { display: grid; gap: 4px; font-size: 13px; }
.act-l { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.act-who { color: var(--hi); font-weight: 500; }
.act-stage { color: var(--ink); }
.act-pct { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.bar.idle i { width: 0; }
.bar.idle { background: repeating-linear-gradient(90deg, var(--line2) 0 6px, transparent 6px 12px); }
