:root {
  --bg: #17181c; --panel: #22242b; --panel2: #1c1e24; --text: #e8e6df;
  --muted: #9a988f; --accent: #e8b34b; --ok: #57a95c; --bad: #d05555;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, sans-serif;
}
header {
  position: sticky; top: 0; z-index: 10; background: var(--panel);
  padding: 14px 20px; border-bottom: 2px solid #000;
}
h1 { margin: 0 0 4px; font-size: 20px; }
.sub { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
#progress { font-weight: 600; color: var(--accent); }
button {
  background: #33363f; color: var(--text); border: 1px solid #4a4d58;
  border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px;
}
button:hover { background: #40434e; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.flt.active { background: var(--accent); color: #20180a; border-color: var(--accent); }

section { padding: 18px 20px 6px; }
section > h2 { margin: 6px 0 2px; font-size: 17px; color: var(--accent); }
section > .intro { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.card {
  background: var(--panel); border: 1px solid #33363f; border-radius: 10px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.card.ok { border-color: var(--ok); }
.card.problem { border-color: var(--bad); }
.card h3 { margin: 0; font-size: 14px; }
.card .imgbox {
  background: repeating-conic-gradient(#2a2c33 0% 25%, #1f2127 0% 50%) 0 0 / 16px 16px;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  min-height: 60px; max-height: 320px; overflow: auto; cursor: zoom-in;
}
.card .imgbox img { image-rendering: pixelated; max-width: 100%; height: auto; }
.card .note { margin: 0; font-size: 13px; color: var(--text); }
.card .crit { margin: 0; font-size: 12px; color: var(--muted); font-style: italic; }
.row { display: flex; gap: 8px; align-items: center; }
.row button.ok-btn.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.row button.bad-btn.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.card textarea {
  width: 100%; min-height: 44px; background: var(--panel2); color: var(--text);
  border: 1px solid #3a3d47; border-radius: 6px; padding: 6px 8px;
  font: 13px/1.4 system-ui, sans-serif; resize: vertical;
}
.card textarea::placeholder { color: #6a6c75; }

#lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 14, .92);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
#lightbox[hidden] { display: none; }
#lightbox img {
  image-rendering: pixelated; max-width: 96vw; max-height: 96vh;
  background: repeating-conic-gradient(#2a2c33 0% 25%, #1f2127 0% 50%) 0 0 / 16px 16px;
}
.hidden { display: none !important; }
