:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #14161c; --muted: #5d6475; --line: #dfe3ea;
  --accent: #036afc; --accent-ink: #ffffff; --ok: #137a4b; --warn: #8a5a00; --warn-bg: #fff6df;
  --danger: #b42318; --radius: 8px; --gap: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12; --surface: #151922; --text: #e8ebf2; --muted: #9aa3b5; --line: #262c39;
    --accent: #3b8bff; --warn: #f2c14e; --warn-bg: #2a2310; --ok: #4cc38a; --danger: #ff6b5e;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top nav { display: flex; gap: 16px; flex: 1; }
.brand { font-weight: 700; color: var(--text); }
.brand span { color: var(--muted); font-weight: 400; }
.page { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
.crumbs { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); margin: 16px 0 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); }
.notice { background: var(--surface); border-left: 4px solid var(--ok); padding: 8px 16px; border-radius: var(--radius); }
.warn { background: var(--warn-bg); color: var(--warn); padding: 8px 16px; border-radius: var(--radius); }
.button, button { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); padding: 8px 16px; font: inherit; cursor: pointer; min-height: 40px; }
.button.secondary, button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.link { background: none; color: var(--muted); padding: 0; min-height: 0; }
button:disabled { opacity: .6; cursor: default; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card { color: var(--text); display: block; }
.card:hover { border-color: var(--accent); text-decoration: none; }
.panel { margin: 16px 0; }
.mini { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; }
.list { padding-left: 18px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table th, .table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.count { font-size: .75rem; background: var(--line); border-radius: 999px; padding: 0 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--gap); }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.gallery img { width: 100%; height: 220px; object-fit: contain; display: block; }
.gallery figcaption { font-size: .85rem; margin-top: 4px; word-break: break-all; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.strip img { height: 260px; border-radius: 4px; border: 1px solid var(--line); }
.preview { max-width: 320px; max-height: 320px; display: block; margin: 8px 0; border: 1px solid var(--line); border-radius: 4px; }
video, .full { max-width: 100%; display: block; }
audio { width: 100%; }
.mockup { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.prose { overflow-wrap: anywhere; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 4px 8px; }
.prose img { max-width: 100%; }
.prose pre, .code { overflow-x: auto; background: var(--bg); padding: 12px; border-radius: 4px; white-space: pre-wrap; }
.badge { font-size: .8rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.badge-gerada { color: var(--accent); border-color: var(--accent); }
.badge-conferida { color: var(--ok); border-color: var(--ok); }
.badge-recusada { color: var(--danger); border-color: var(--danger); }
.review { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-end; margin-top: 12px; }
.review .inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form { display: grid; gap: 6px; max-width: 720px; }
.form label, .auth-card label { font-weight: 600; margin-top: 8px; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; min-height: 40px; width: 100%; }
.review input { width: auto; min-width: 240px; }
textarea { font-family: ui-monospace, Menlo, monospace; font-size: .9rem; }
.actions { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; display: grid; gap: 6px; }
.auth-card form { display: grid; gap: 6px; }
.auth-card button { margin-top: 12px; }
@media (max-width: 640px) {
  .top { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .table { display: block; overflow-x: auto; }
  .strip img { height: 200px; }
}
