:root {
  --bg: #0f1013; --panel: #17191d; --panel2: #1e2126; --line: #2a2e35; --fg: #e9e7e1; --muted: #9298a0;
  --accent: #e8743b; --ok: #6cc28a; --bad: #e0675b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 80px; }
.acc { color: var(--accent); }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 10px 20px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-size: 16px; }
.logo { width: 30px; height: 30px; }
.top nav { display: flex; gap: 14px; flex: 1; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); }

main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 60px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 10px; }
h2.mt { margin-top: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.sec-head h2 { margin: 0; font-size: 17px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hint { color: #6f757c; font-size: 12.5px; margin: 10px 0 0; }

.btn { display: inline-block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2);
  color: var(--fg); text-decoration: none; cursor: pointer; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.main { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.ghost { background: none; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; border-color: var(--line); }
label { display: block; color: var(--muted); font-size: 13px; margin: 0 0 10px; }
input, textarea, select { display: block; width: 100%; margin-top: 4px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.row input { flex: 1; min-width: 200px; margin: 0; }
.msg { font-size: 13px; }
.msg.ok { color: var(--ok); } .msg.err { color: var(--bad); }

.hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.who { flex: 1; min-width: 180px; }
.who p { margin: 2px 0 0; }
.stat { display: flex; flex-direction: column; align-items: center; min-width: 90px; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.avatar { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2) center/cover;
  display: grid; place-items: center; font-size: 26px; font-weight: 700; color: var(--muted); cursor: pointer; padding: 0; flex: none; }
.avatar.big { width: 96px; height: 96px; font-size: 38px; cursor: default; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; background: var(--panel2); color: var(--muted); }
.badge.plan { font-size: 14px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.badge.pub { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }

.limits { margin: 0; padding-left: 18px; line-height: 1.8; }
.scroll { max-height: 320px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl td { border-bottom: 1px solid var(--line); padding: 5px 6px; vertical-align: top; }
.tbl td.d { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.tbl td.d.plus { color: var(--ok); } .tbl td.d.minus { color: var(--muted); }

.plist { display: flex; flex-direction: column; gap: 12px; }
.proj { display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
.cover { width: 180px; aspect-ratio: 4/3; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2) center/cover;
  display: grid; place-items: center; color: var(--muted); font-size: 32px; font-weight: 700; position: relative; overflow: hidden; }
.cover .ups { position: absolute; inset: auto 6px 6px 6px; display: flex; flex-direction: column; gap: 4px;
  opacity: 0; transition: opacity .15s; }
.cover .up { font-size: 12px; font-weight: 400; padding: 4px 6px; }
.cover:hover .ups, .cover:focus-within .ups { opacity: 1; }
@media (hover: none) { .cover .ups { opacity: 1; } }
label.check { display: flex; gap: 8px; align-items: flex-start; }
label.check input { width: auto; margin-top: 2px; }
.pbody { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ptitle { font-size: 16px; font-weight: 600; background: none; border: 1px solid transparent; padding: 3px 6px; margin: 0 0 0 -6px; }
.ptitle:hover { border-color: var(--line); }
.pdesc { min-height: 54px; margin: 0; }
.seg { display: inline-flex; background: var(--panel2); border-radius: 8px; padding: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.pmeta { color: var(--muted); font-size: 12px; }
.prow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prow select { width: auto; margin: 0; padding: 4px 8px; font-size: 13px; }
.switch { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-size: 13px; margin: 0; cursor: pointer; }
.switch input { width: auto; margin: 0; accent-color: var(--accent); }
.empty { color: var(--muted); padding: 20px; text-align: center; }

@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .top { justify-content: space-between; }
  .proj { grid-template-columns: 1fr; }
  .cover { width: 100%; }
}
