/* jigari tech — стиль органайзера jigari: тёплый фон, засечки в заголовках, без теней, скругление 2px, цвет — только данные. */
:root {
  --page: #FCFCF4; --card: #F4F2E8; --line: #E4E0D2; --ink: #191918; --muted: #6B6A63; --faint: #9C9A90;
  --accent: #FCBC34; --ok: #3E7C5A; --bad: #B04A3A; --warn: #A87412; --r: 2px;
  --serif: "Newsreader", Georgia, serif; --sans: "Inter", -apple-system, system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #141413; --card: #1E1E1C; --line: #2E2D29; --ink: #EDEBE3; --muted: #A3A196; --faint: #75736A; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 30px; } h2 { font-size: 20px; margin-top: 28px; } h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 14px; }

.bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--page); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 20px; display: flex; align-items: center; gap: 8px; }
.brand b { font-weight: 500; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; }
.who { font-size: 14px; color: var(--muted); }
.who a { color: var(--ink); }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 96px; }
section + section { margin-top: 8px; }
.hero { padding: 12px 0 8px; max-width: 640px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--ink); border-radius: var(--r); background: transparent; color: var(--ink); font: 500 15px var(--sans);
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.btn:active { background: var(--card); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--ink); color: var(--page); }
.btn.big { min-height: 56px; font-size: 17px; width: 100%; max-width: 420px; margin-top: 12px; }
.btn.ok { border-color: var(--ok); color: var(--ok); } .btn.bad { border-color: var(--bad); color: var(--bad); }
.btn.ghost { border-color: transparent; }
.btn.light { color: #fff; border-color: rgba(255,255,255,.7); background: rgba(0,0,0,.35); }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--muted); border-top-color: transparent;
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { width: 100%; padding: 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  color: var(--ink); font: 16px var(--sans); }
.field:focus { outline: none; border-color: var(--ink); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps > li { counter-increment: s; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps > li h3::before { content: counter(s) " · "; color: var(--faint); font-family: var(--mono); font-size: 14px; }

.list { display: grid; gap: 8px; }
.item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px; background: var(--card);
  border-radius: var(--r); border-left: 3px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; }
.item.live { border-left-color: var(--accent); } .item.done { border-left-color: var(--ok); }
.item small { color: var(--muted); display: block; }
.empty { color: var(--faint); font-size: 14px; padding: 8px 0; }

.card { background: var(--card); border-radius: var(--r); padding: 16px; margin: 0 0 12px; }
.card.idc { border-left: 3px solid var(--accent); margin-top: 12px; }
.card h3 { margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 15px; margin: 8px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.tag { display: inline-block; font: 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line); padding: 2px 6px; border-radius: var(--r); margin-bottom: 6px; }
.safety { border-left: 3px solid var(--bad); padding: 8px 12px; margin: 10px 0; color: var(--bad); font-size: 15px; background: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions .field { flex: 1 1 160px; margin: 0; min-height: 44px; }

.grid { display: grid; gap: 20px; }
@media (min-width: 820px) { .grid { grid-template-columns: minmax(0, 1fr) 320px; } .col-side h2:first-child { margin-top: 0; } }
.case-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }

.suspects { display: grid; gap: 10px; }
.sus { font-size: 14px; }
.sus .t { display: flex; justify-content: space-between; gap: 8px; }
.sus .meter { height: 4px; background: var(--line); border-radius: var(--r); margin-top: 4px; overflow: hidden; }
.sus .meter i { display: block; height: 100%; background: var(--ink); }
.sus small { color: var(--muted); }
.history { padding-left: 20px; margin: 0; font-size: 14px; }
.history li { margin-bottom: 6px; }
.r-ok { color: var(--ok); } .r-bad { color: var(--bad); }

.part { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.part:first-of-type { border-top: 0; }
.part .num { font-family: var(--mono); }
.part .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.part .acts .btn { min-height: 38px; padding: 6px 12px; font-size: 14px; }

.cam { position: fixed; inset: 0; z-index: 20; background: #000; }
.cam video, .cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cam-top { position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; display: flex; gap: 12px; align-items: center; padding: 12px; color: #fff; font-size: 15px; }
.cam-hint { position: absolute; left: 12px; right: 12px; bottom: calc(110px + env(safe-area-inset-bottom)); color: #fff; font-size: 15px;
  background: rgba(0,0,0,.55); padding: 10px 12px; border-radius: var(--r); }
.cam-hint:empty { display: none; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); display: flex; justify-content: center; align-items: center; gap: 24px; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }
.shutter.busy { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { background: rgba(252,188,52,.7); } }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; max-width: 520px; margin: 0 auto;
  background: var(--ink); color: var(--page); padding: 12px 14px; border-radius: var(--r); font-size: 15px; }
