:root {
  --bg: #f4f5f7; --card: #ffffff; --text: #111827; --muted: #6b7280; --line: #e5e7eb;
  --accent: #2563eb; --accent-text: #ffffff; --btn: #eef0f3; --ok: #15803d; --bad: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17; --card: #151b26; --text: #e5e7eb; --muted: #9ca3af; --line: #253041;
    --accent: #3b82f6; --accent-text: #ffffff; --btn: #1f2836; --ok: #4ade80; --bad: #f87171;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
header {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--card); border-bottom: 1px solid var(--line);
}
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 18px; margin: 8px 0; }
main { max-width: 720px; margin: 0 auto; padding: 12px 16px 40px; }
.muted { color: var(--muted); font-size: 14px; }
button { font: inherit; border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; color: var(--text); background: var(--btn); }
button.primary { background: var(--accent); color: var(--accent-text); width: 100%; padding: 14px; font-weight: 600; margin: 8px 0; }
button.secondary { width: 100%; margin-top: 12px; }
button.link { background: none; color: var(--accent); padding: 6px; }
button:disabled { opacity: .5; }
input:not([type]), input[type=text] {
  width: 100%; font: inherit; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); margin: 6px 0 4px;
}
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.box p { margin: 0 0 6px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.card.focus { outline: 3px solid var(--accent); }
.card img { display: block; width: 100%; height: auto; background: #000; }
.card .cap { white-space: pre-line; padding: 10px 12px 4px; }
.card .cap b { display: block; }
.card.descartado .cap { color: var(--muted); }
.card .btns { padding: 4px 8px 10px; }
.card .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.card .row button { flex: 1 1 auto; min-width: 30%; font-size: 15px; padding: 9px 8px; }
#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; max-width: 90vw; z-index: 5;
}
