/* «Архив» v2 — нео-брутализм по дизайну «Архив v2 - awwwards.dc.html»:
   крем-бумага, чёрные рамки, жёсткие тени, стикеры. Шрифты селфхост
   (Space Grotesk/Space Mono из макета без кириллицы → Manrope/JetBrains Mono). */
@import url("/static/fonts/fonts.css");

:root {
  --bg: #FAF3E7;
  --ink: #1A1A1A;
  --muted: #8A7F6D;
  --line: #EFE6D3;
  --dot-grid: #E8DCC4;
  --orange: #FF5C39;
  --blue: #2B4BF2;
  --green: #00A676;
  --yellow: #FFC940;
  --pink: #FF5CA8;
  --purple: #7B5CFF;
  --amber: #FFB800;
  --teal: #00B5A3;
  --lime: #6FBF2E;
  --thumb: 132px;
  font-size: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--orange); }
::selection { background: var(--yellow); }
.mono { font-family: "JetBrains Mono", monospace; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

select, input[type="text"], input[type="password"], textarea {
  background: #fff; color: var(--ink); border: 2px solid var(--ink);
  border-radius: 10px; padding: 7px 10px; font: inherit; font-weight: 500;
}
select { box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--blue); outline-offset: 1px; }

/* ── кнопки-пилюли ── */
.pill-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .1s;
}
.pill-btn:hover { transform: translate(1px, 1px); color: var(--ink); }
.pill-btn.on { background: var(--ink); color: var(--bg); box-shadow: 3px 3px 0 var(--yellow); }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); flex-shrink: 0; }
.chip-count { font-family: "JetBrains Mono", monospace; font-size: 10px; opacity: .65; }

/* ── шапка ── */
.top {
  display: flex; align-items: center; gap: 20px; height: 62px; padding: 0 22px;
  border-bottom: 3px solid var(--ink); background: var(--bg);
  position: sticky; top: 0; z-index: 10; flex-shrink: 0;
}
.brand {
  font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 18px;
  color: var(--ink); white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand .brand-dot { color: var(--orange); }
.brand .brand-vl { font-family: "JetBrains Mono", monospace; font-weight: 400; font-size: 11px; color: var(--muted); }
.top nav { display: flex; gap: 8px; }
.top nav a {
  padding: 7px 16px; font-weight: 700; font-size: 13px; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .1s;
}
.top nav a:hover { transform: translate(1px, 1px); }
.top nav a.on { background: var(--ink); color: var(--bg); box-shadow: 3px 3px 0 var(--orange); }
.top-spacer { flex: 1; }
.progress-wrap { display: flex; align-items: center; gap: 10px; }
.progress-bar {
  width: 130px; height: 14px; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; overflow: hidden;
}
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.progress-nums { font-family: "JetBrains Mono", monospace; font-size: 12px; white-space: nowrap; }
.logout { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.logout:hover { color: var(--orange); }

/* ── футер ── */
.foot {
  margin-top: auto; display: flex; align-items: center; gap: 18px; height: 34px;
  padding: 0 22px; border-top: 3px solid var(--ink); background: var(--yellow);
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.foot .spacer { flex: 1; }
.foot .help-link { cursor: pointer; color: var(--ink); }
.foot .help-link:hover { color: var(--orange); }

/* ── фильтры галереи ── */
.filters { padding: 14px 22px; }
.filters form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filters select { font-size: 13px; max-width: 190px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.size-ctl { margin-left: auto; display: flex; gap: 7px; }
.size-btn {
  width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--ink);
  background: #fff; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 15px;
  box-shadow: 2px 2px 0 var(--ink); padding: 0; font-family: inherit;
}
.size-btn:hover { background: var(--yellow); }

/* ── bulk-панель ── */
.bulk {
  display: flex; align-items: center; gap: 12px; padding: 10px 22px;
  background: var(--blue); color: var(--bg); border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink); font-size: 13px; font-weight: 500;
}
.bulk .bulk-count { font-family: "JetBrains Mono", monospace; font-weight: 700; }
.bulk select { box-shadow: none; border-radius: 9px; padding: 5px 8px; font-size: 12px; }
.bulk-btn {
  padding: 5px 14px; border: 2px solid var(--ink); border-radius: 999px; color: #fff;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.bulk-btn:hover { transform: translate(1px, 1px); }
.bulk-btn.ok { background: var(--green); }
.bulk-btn.no { background: var(--orange); }
.bulk .clear { cursor: pointer; opacity: .75; background: none; border: none; color: inherit; font: inherit; }
.bulk .clear:hover { opacity: 1; }

/* ── сетка галереи ── */
.grid-wrap { flex: 1; padding: 18px 26px 30px; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--thumb), 1fr));
  gap: 18px 14px;
}
.tile {
  position: relative; display: block; cursor: pointer;
  animation: popIn .35s both; transition: transform .15s;
}
.tile:nth-child(6n+1) { transform: rotate(-1.8deg); }
.tile:nth-child(6n+2) { transform: rotate(1.4deg); }
.tile:nth-child(6n+3) { transform: rotate(-.9deg); }
.tile:nth-child(6n+4) { transform: rotate(2deg); }
.tile:nth-child(6n+5) { transform: rotate(-1.3deg); }
.tile:nth-child(6n+6) { transform: rotate(.7deg); }
.tile:hover { transform: rotate(0) scale(1.04); z-index: 3; }
.tile img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  border-radius: 10px; border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  background: #fff;
}
.tile.picked img { box-shadow: 4px 4px 0 var(--blue), 0 0 0 3px var(--blue); }
.tile .st-dot {
  position: absolute; left: -5px; top: -7px; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid var(--ink); background: var(--bg);
}
.tile.st-candidate .st-dot { background: var(--blue); }
.tile.st-selected .st-dot { background: var(--green); }
.tile.st-rejected .st-dot { background: var(--orange); }
.tile.st-rejected img { opacity: .45; }
.badge-ch {
  position: absolute; left: 7px; bottom: 8px; font-family: "JetBrains Mono", monospace;
  font-size: 10px; font-weight: 700; color: var(--ink); background: var(--yellow);
  border: 2px solid var(--ink); padding: 1px 7px; border-radius: 999px; transform: rotate(-2deg);
}
.badge-low {
  position: absolute; right: 6px; top: 6px; font-family: "JetBrains Mono", monospace;
  font-size: 9px; font-weight: 700; color: #fff; background: var(--orange);
  border: 2px solid var(--ink); padding: 1px 6px; border-radius: 999px;
}
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 110px 20px; }
.empty-title { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 20px; transform: rotate(-2deg); }
.empty-sub { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }

/* ── лайтбокс ── */
.lb-body { background: #2B2925; }
.lb-body .top, .lb-body .foot { display: none; }
.lightbox { display: flex; height: 100vh; }
.lb-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lb-stage { flex: 1; display: grid; place-items: center; padding: 38px; min-height: 0; position: relative; }
.lb-frame { position: relative; transform: rotate(-.6deg); max-width: 90%; max-height: 100%; display: flex; }
.lb-frame img {
  max-width: 100%; max-height: 72vh; object-fit: contain; border: 3px solid var(--ink);
  border-radius: 14px; box-shadow: 8px 8px 0 rgba(255, 201, 64, .9); background: #fff;
}
.tape {
  position: absolute; top: -14px; left: 50%; width: 90px; height: 26px;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(26, 26, 26, .15);
  transform: translateX(-50%) rotate(-3deg); pointer-events: none;
}
.lb-pos {
  display: flex; justify-content: center; padding: 0 34px 12px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--yellow); font-weight: 700;
}
.lb-hints {
  display: flex; justify-content: center; gap: 14px; padding: 0 34px 20px;
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: rgba(250, 243, 231, .55); flex-wrap: wrap;
}
.lb-hints .k-s { color: #4ADE9E; } .lb-hints .k-x { color: #FF8A70; } .lb-hints .k-c { color: #8FA5FF; }

.lb-panel {
  width: 340px; flex-shrink: 0; background: var(--bg); border-left: 3px solid var(--ink);
  padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto;
}
.lb-who { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; color: var(--ink);
}
.lb-who-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-who-name a { color: inherit; }
.lb-who-sub { font-size: 11px; color: var(--muted); }
.lb-close {
  margin-left: auto; cursor: pointer; font-size: 15px; width: 30px; height: 30px;
  display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%;
  background: #fff; box-shadow: 2px 2px 0 var(--ink); color: var(--ink);
}
.lb-close:hover { background: var(--orange); color: #fff; }

.ctx-card {
  background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 14px 15px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(.4deg); font-size: 13.5px; line-height: 1.6;
}
.ctx-card p { margin: 0; white-space: pre-wrap; max-height: 240px; overflow-y: auto; }
.ctx-edit {
  position: absolute; top: -10px; right: -8px; width: 26px; height: 26px;
  display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--yellow); cursor: pointer; font-size: 12px; padding: 0;
  box-shadow: 2px 2px 0 var(--ink);
}
.ctx-edit:hover { transform: translate(1px, 1px); }
.ctx-none { cursor: pointer; }
.ctx-none:hover { border-color: var(--ink); color: var(--ink); }
.tag-voice {
  font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: #fff; background: var(--blue);
  border-radius: 999px; padding: 2px 9px; align-self: flex-start;
}
.ctx-none {
  border: 2px dashed #C4B79F; border-radius: 12px; padding: 13px 14px;
  font-size: 12px; color: var(--muted);
}
.lb-tech { display: flex; flex-direction: column; gap: 4px; font-family: "JetBrains Mono", monospace; font-size: 11px; }
.lb-tech .warn { color: var(--orange); font-weight: 700; }

.lb-actions { display: flex; gap: 7px; }
.act-btn {
  flex: 1; text-align: center; padding: 10px 4px; border-radius: 11px; font-size: 12px;
  font-weight: 700; cursor: pointer; color: var(--ink); background: #fff;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(26, 26, 26, .25); font-family: inherit;
}
.act-btn:hover { transform: translate(1px, 1px); }
.act-btn .k { font-family: "JetBrains Mono", monospace; font-size: 10px; opacity: .6; }
.act-btn.on { color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.act-btn.on.act-selected { background: var(--green); }
.act-btn.on.act-candidate { background: var(--blue); }
.act-btn.on.act-rejected { background: var(--orange); }

.panel-label {
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.ch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ch-chip {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px;
  border-radius: 10px; cursor: pointer; background: #fff; color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 rgba(26, 26, 26, .2); font-family: inherit;
}
.ch-chip:hover { transform: translate(1px, 1px); }
.ch-chip .num { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 11px; }
.ch-chip .nm { font-size: 9px; font-weight: 500; }
.ch-chip.on { color: #fff; box-shadow: 3px 3px 0 var(--ink); }

.note {
  width: 100%; min-height: 64px; resize: vertical; border-radius: 11px;
  padding: 9px 11px; font-size: 13px; line-height: 1.5; box-shadow: 3px 3px 0 var(--ink);
}
.lb-nav { display: flex; gap: 7px; margin-top: auto; }
.lb-nav a {
  flex: 1; text-align: center; padding: 9px; border: 2px solid var(--ink); border-radius: 11px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; box-shadow: 3px 3px 0 var(--ink);
}
.lb-nav a:hover { background: var(--yellow); transform: translate(1px, 1px); }
.lb-auto { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); cursor: pointer; }
.lb-auto input { accent-color: var(--green); }

.ctx-picker summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.ctx-list { max-height: 220px; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ctx-option {
  text-align: left; background: #fff; border: 2px solid var(--ink); border-radius: 10px;
  color: var(--ink); padding: 7px 9px; font: inherit; font-size: 12px; cursor: pointer; line-height: 1.4;
}
.ctx-option:hover { box-shadow: 2px 2px 0 var(--blue); }
.ctx-option .muted { display: block; font-family: "JetBrains Mono", monospace; font-size: 9px; margin-bottom: 2px; }

/* ── помощь ── */
.help { position: fixed; inset: 0; background: rgba(26, 26, 26, .7); display: grid; place-items: center; z-index: 60; }
.help-box {
  width: 360px; background: var(--bg); border: 3px solid var(--ink); border-radius: 18px;
  padding: 26px 28px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 8px 8px 0 var(--orange); transform: rotate(-.7deg);
}
.help-title {
  font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 16px;
  padding-bottom: 8px; border-bottom: 3px solid var(--ink);
}
.help-row { display: flex; align-items: baseline; gap: 14px; font-size: 13px; }
.help-row .k {
  font-family: "JetBrains Mono", monospace; font-weight: 700; min-width: 72px; flex-shrink: 0;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 7px; padding: 1px 7px; text-align: center;
}
.help-foot { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--muted); padding-top: 6px; }

/* ── страницы ── */
.page { padding: 22px; }
.stat-cards { display: flex; gap: 12px; padding-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  border: 2px solid var(--ink); border-radius: 14px; padding: 12px 18px;
  box-shadow: 4px 4px 0 var(--ink); color: #fff;
}
.stat-card .big { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 22px; }
.stat-card .lbl { font-size: 12px; font-weight: 500; }
.stat-green { background: var(--green); transform: rotate(-1deg); }
.stat-blue { background: var(--blue); transform: rotate(.8deg); }
.stat-yellow { background: var(--yellow); color: var(--ink); transform: rotate(-.6deg); }

.card {
  background: #fff; border: 2.5px solid var(--ink); border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink); overflow: hidden;
}
.thead, .trow { display: grid; gap: 0 14px; padding: 11px 18px; align-items: center; }
.thead {
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; background: var(--ink); color: var(--bg);
}
.trow { border-top: 2px solid var(--line); padding: 9px 18px; }
.trow:hover { background: #FFF8EA; }
.trow.inactive { opacity: .45; }
.people-grid { grid-template-columns: 190px 90px 200px 100px 24px 54px 140px 1fr; }
.notes-input {
  width: 100%; background: transparent; border-color: transparent; box-shadow: none;
  font-size: 12px; padding: 4px 6px;
}
.notes-input:hover, .notes-input:focus { border-color: var(--ink); background: #fff; }
.add-person { margin-bottom: 14px; }
.add-person summary {
  cursor: pointer; display: inline-block; font-size: 13px; font-weight: 700;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px;
  padding: 6px 16px; box-shadow: 3px 3px 0 var(--ink);
}
.add-person form { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.add-person input { box-shadow: 3px 3px 0 var(--ink); }
.p-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-name .avatar { width: 28px; height: 28px; font-size: 10px; }
.p-name a { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-name a:hover { color: var(--blue); }
.closeness { font-size: 11px; font-weight: 700; background: none; border: none; cursor: pointer; padding: 0; text-align: left; font-family: inherit; }
.closeness.cl-core { color: var(--green); }
.closeness.cl-close { color: var(--blue); }
.closeness.cl-context, .closeness.cl-q { color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 9px; }
.stepper .dots { display: flex; gap: 4px; }
.step-dot {
  width: 13px; height: 13px; border-radius: 50%; cursor: pointer; background: #fff;
  border: 2px solid var(--ink); padding: 0;
}
.step-dot:hover { transform: scale(1.25); }
.step-dot.f { background: var(--blue); }
.step-dot.f.hi { background: var(--green); }
.step-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cnt { font-family: "JetBrains Mono", monospace; font-size: 11px; }
.days { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.days.hot { color: var(--orange); }
.sig { font-size: 11px; font-weight: 700; color: var(--orange); }
.sig-stop { color: #fff; background: var(--orange); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
input[type="checkbox"] { accent-color: var(--green); width: 15px; height: 15px; }

.reminders { margin-bottom: 20px; }
.reminders summary {
  cursor: pointer; display: inline-block; font-size: 13px; font-weight: 700;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px;
  box-shadow: 3px 3px 0 var(--ink);
}
.reminders ul { margin: 12px 0 0; padding: 0; list-style: none; column-width: 220px; column-gap: 24px; }
.reminders li { padding: 2px 0; break-inside: avoid; }
.reminders li a { color: var(--ink); font-weight: 500; }
.reminders li a:hover { color: var(--blue); }
.reminders li .muted { margin-left: 6px; font-size: 11px; }

/* ── персона ── */
.person-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.person-head h1 { font-family: "Unbounded", sans-serif; font-size: 18px; font-weight: 600; margin: 0; }
.btn {
  display: inline-block; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px;
  color: var(--ink); background: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); font-family: inherit;
}
.btn:hover { transform: translate(1px, 1px); color: var(--ink); }
.person-notes { max-width: 640px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.person-notes input[type="text"] { flex: 1; box-shadow: 3px 3px 0 var(--ink); }
.letter-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 12px; margin-bottom: 16px; }
.strip .tile { flex: 0 0 96px; }
.feed { max-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.msg {
  background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px;
  box-shadow: 3px 3px 0 var(--ink);
}
.msg:nth-child(odd) { transform: rotate(.3deg); }
.msg:nth-child(even) { transform: rotate(-.3deg); }
.msg p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.5; }
.msg-meta { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--muted); }

/* ── главы ── */
.chapters-wrap { flex: 1; overflow-x: auto; padding: 22px; }
.chapters { display: flex; gap: 14px; align-items: stretch; min-height: 70vh; }
.chapter {
  width: 168px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink); padding: 12px;
}
.chapter:nth-child(odd) { transform: rotate(-.5deg); }
.chapter:nth-child(even) { transform: rotate(.5deg); }
.chapter.drop { box-shadow: 4px 4px 0 var(--green); transform: rotate(0); }
.chapter-head { display: flex; align-items: baseline; gap: 7px; padding-bottom: 8px; border-bottom: 3px solid var(--ch-accent, var(--muted)); }
.chapter-head .num { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 13px; color: var(--ch-accent, var(--muted)); }
.chapter-head .nm { font-size: 13px; font-weight: 700; }
.chapter-head .count {
  margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700;
  background: var(--bg); color: var(--muted); border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px;
}
.chapter-head .count.full { background: var(--green); color: #fff; }
.chapter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; flex: 1; overflow-y: auto; padding-bottom: 4px; min-height: 60px; }
.mini { aspect-ratio: 1; display: block; cursor: grab; }
.mini img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 7px; border: 2px solid var(--ink); }
.mini:hover { transform: rotate(-4deg) scale(1.1); }

/* ── ссылки ── */
.links-card { max-width: 920px; }
.links-grid { grid-template-columns: 160px 60px 1fr 190px; }
.links-grid .url { font-family: "JetBrains Mono", monospace; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.links-grid .when { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.link-toggles { display: flex; gap: 8px; }
.tgl {
  display: inline-flex; align-items: center; padding: 3px 10px; border: 2px solid var(--ink);
  border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.tgl:hover { transform: translate(1px, 1px); }
.tgl.on-done { background: var(--green); color: #fff; }
.tgl.on-ign { background: var(--yellow); color: var(--ink); }
.hint { margin-top: 12px; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }

/* ── вход ── */
.login-body {
  align-items: center; justify-content: center; display: flex; gap: 34px; flex-direction: column;
  background-image: radial-gradient(var(--dot-grid) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.logo { display: flex; gap: 4px; font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 56px; letter-spacing: .02em; }
.logo span { display: inline-block; text-shadow: 3px 3px 0 var(--ink); }
.logo span:nth-child(1) { color: var(--orange); transform: rotate(-3deg); }
.logo span:nth-child(2) { color: var(--blue); transform: rotate(2deg); }
.logo span:nth-child(3) { color: var(--green); transform: rotate(-2deg); }
.logo span:nth-child(4) { color: var(--amber); transform: rotate(3deg); }
.logo span:nth-child(5) { color: var(--pink); transform: rotate(-1deg); }
.login-tag {
  font-family: "JetBrains Mono", monospace; font-size: 12px; background: var(--yellow);
  border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(-1.5deg);
}
.login { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.login input {
  width: 240px; border-radius: 12px; padding: 13px 16px; font-size: 15px;
  text-align: center; letter-spacing: .2em; box-shadow: 4px 4px 0 var(--ink);
}
.login button {
  font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 13px;
  background: var(--orange); color: var(--bg); border: 2px solid var(--ink);
  border-radius: 999px; padding: 11px 30px; cursor: pointer; box-shadow: 4px 4px 0 var(--ink);
}
.login button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.login button:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.login-error { color: var(--orange); font-weight: 700; font-size: 12px; }

/* ── телефон: юзабелен экран «Люди» ── */
@media (max-width: 700px) {
  .top { height: auto; padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .progress-wrap, .top nav a { box-shadow: 2px 2px 0 var(--ink); }
  .lightbox { flex-direction: column; height: auto; min-height: 100vh; }
  .lb-panel { width: 100%; border-left: none; border-top: 3px solid var(--ink); }
  .card { overflow-x: auto; }
  .people-grid, .links-grid { min-width: 760px; }
  .stat-card .big { font-size: 18px; }
}
