:root {
  --bg: #f5f4f1; --card: #ffffff; --ink: #1a1a1a; --muted: #6b6b6b;
  --line: #dcdad5; --accent: #0b7a57; --accent-ink: #ffffff;
  --star: #e0a100; --bad: #b3261e; --warn: #9a6700;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101112; --card: #1a1c1d; --ink: #ecebe8; --muted: #9a9894;
    --line: #2e3132; --accent: #2bb585; --accent-ink: #06150f;
    --star: #f2b420; --bad: #ff8a80; --warn: #e3b341;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 0 16px 80px; max-width: 720px; margin-inline: auto;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
header.bar {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  padding: 12px 0 10px; border-bottom: 1px solid var(--line);
}
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.top h1 { font-size: 17px; margin: 0; }
.linklike { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 4px; }
#progress { font-size: 14px; color: var(--muted); }
#saved { font-size: 13px; color: var(--accent); min-width: 72px; text-align: right; }
#saved.err { color: var(--bad); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; align-items: center; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; flex: 1 1 100%; }
.seg button { flex: 1; min-height: 44px; padding: 0 14px; border: 0; background: transparent; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.filters select {
  flex: 1 1 0; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 22px;
  padding: 0 12px; background: var(--card); font-size: 14px;
}
.empty { color: var(--muted); padding: 32px 0; text-align: center; }
.brief { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.banner { font-size: 14px; color: var(--warn); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; border: 1px solid var(--warn); }
.meter { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.meter .track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 4px; }
.meter .fill { height: 100%; background: var(--accent); }
.meter .fill.high { background: var(--warn); }
.meter .fill.full { background: var(--bad); }
h2 { font-size: 20px; margin: 32px 0 4px; }
h3 { font-size: 17px; margin: 24px 0 2px; }
.pend { font-size: 13px; color: var(--warn); font-weight: 600; margin: 0 0 6px; }
.grid { display: grid; gap: 14px; margin-top: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card.best { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.media { display: block; width: 100%; background: #000; }
.media img, .media video { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; }
.media img { cursor: zoom-in; }
.body { padding: 12px 14px 14px; }
.title { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-weight: 600; }
.sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.stars { display: flex; gap: 2px; margin: 8px 0; }
.stars button {
  flex: 0 0 auto; width: 48px; height: 48px; border: 0; background: none; cursor: pointer;
  font-size: 34px; line-height: 1; color: var(--line); padding: 0; -webkit-tap-highlight-color: transparent;
}
.stars button.on { color: var(--star); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line);
  background: transparent; font-size: 15px; cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip.refazer.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.chip.descartar.on, .chip.naogostei.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.chip.bestbtn { border-color: var(--accent); color: var(--accent); }
.chip.bestbtn.on { color: var(--accent-ink); }
textarea {
  width: 100%; min-height: 72px; resize: vertical; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); font-size: 16px;
}
.approve { margin-top: 10px; min-height: 48px; width: 100%; border-radius: 24px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; }
.approve.confirm { background: var(--accent); color: var(--accent-ink); }
.approve.done { border-style: dashed; cursor: default; }
.cost { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
#zoom { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 20; overflow: auto; -webkit-overflow-scrolling: touch; }
#zoom img { display: block; width: 100%; height: auto; touch-action: pinch-zoom; }
#zoom button {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 21;
  min-width: 48px; min-height: 48px; border-radius: 24px; border: 0; font-size: 22px;
  background: rgba(255,255,255,.9); color: #000; cursor: pointer;
}
.login { max-width: 360px; margin: 18vh auto 0; }
.login h1 { font-size: 22px; margin: 0 0 4px; }
.login label { display: block; margin: 14px 0 4px; font-size: 14px; color: var(--muted); }
.login input {
  width: 100%; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); font-size: 16px;
}
.login .primary {
  margin-top: 18px; min-height: 48px; width: 100%; border-radius: 24px; border: 0; background: var(--accent);
  color: var(--accent-ink); font-weight: 600; cursor: pointer;
}
.login .primary[disabled] { opacity: .5; cursor: default; }
.err { color: var(--bad); font-size: 14px; margin: 10px 0 0; min-height: 20px; }
/* admin */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.panel h2 { margin: 0 0 8px; font-size: 16px; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row:first-of-type { border-top: 0; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.tl li:first-child { border-top: 0; }
.tl .when { color: var(--muted); font-size: 12px; }
.pill { font-size: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 2px 9px; color: var(--muted); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.ok { color: var(--accent); border-color: var(--accent); }
.small { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.small.danger { color: var(--bad); border-color: var(--bad); }
