:root {
  --bg: #F6EBDD; --ink: #2B2118; --muted: #8A7866; --accent: #E8772E; --accent2: #6B4FA0;
  --card: #fff; --line: #E6D8C6; --ok: #2E8B57; --warn: #D98E04; --bad: #C0392B; --fb: #F0F2F5;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 600; }
button:disabled { opacity: .5; }
input, textarea { font: inherit; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 70px; resize: vertical; }
a { color: inherit; }
.muted { color: var(--muted); } .center { text-align: center; }
.ghost { background: transparent; color: var(--muted); }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(246,235,221,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .5px; }

main { max-width: 560px; margin: 0 auto; padding: 16px 12px 120px; }
h1 { font-size: 22px; margin: 6px 4px 14px; }
h1 small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }

.login { background: var(--card); border-radius: 20px; padding: 26px 20px; margin-top: 40px; display: grid; gap: 12px; }
.login h1 { margin: 0 0 4px; }
.primary { background: var(--accent); color: #fff; padding: 13px; font-size: 16px; }

.batch { display: block; background: var(--card); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px;
  text-decoration: none; border: 1.5px solid transparent; }
.batch:active { border-color: var(--accent); }
.batch .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.batch b { font-size: 16px; }
.counts { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; gap: 12px; }

.chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--line); white-space: nowrap; }
.chip.in_review, .chip.pending { background: #FFE8CC; color: #9A5B00; }
.chip.approved, .chip.published { background: #D9F2E3; color: var(--ok); }
.chip.changes, .chip.reviewed { background: #EDE3FA; color: var(--accent2); }
.chip.rejected { background: #F8DADA; color: var(--bad); }

.bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 0 4px 14px; }
.note-box { background: #fff8ef; border-left: 4px solid var(--accent); padding: 10px 12px; border-radius: 10px; margin: 0 4px 14px; font-size: 14px; white-space: pre-line; }

/* FB post mockup */
.post { background: var(--card); border-radius: 16px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 1px 0 var(--line); }
.post-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px 8px; }
.post-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-head .who { flex: 1; line-height: 1.25; }
.post-head .who b { font-size: 15px; }
.post-head .who span { display: block; font-size: 12px; color: var(--muted); }
.post-label { font-size: 12px; color: var(--muted); padding: 0 14px 6px; font-weight: 600; }
.caption { padding: 0 14px 10px; font-size: 15px; line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.caption.clamp { white-space: normal; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.more { display: block; margin-top: 2px; color: var(--muted); font-weight: 600; padding: 0 14px 10px; font-size: 14px; background: none; }
.media { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: #000; }
.media img { flex: 0 0 100%; width: 100%; scroll-snap-align: center; display: block; object-fit: contain; max-height: 70vh; background: var(--fb); }
.media.multi img { flex-basis: 88%; margin-right: 4px; }
.fb-actions { display: flex; justify-content: space-around; padding: 8px 0; color: var(--muted); font-size: 14px; font-weight: 600; border-top: 1px solid var(--fb); }

.ai { margin: 10px 14px; background: #F3EEFB; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.ai b { color: var(--accent2); }
.review { padding: 10px 14px 14px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.review .status { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.review .rnote { font-size: 14px; background: var(--fb); border-radius: 10px; padding: 8px 10px; white-space: pre-line; }
.actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.actions button { padding: 11px 6px; font-size: 14px; }
.a-ok { background: var(--ok); color: #fff; } .a-edit { background: var(--accent2); color: #fff; } .a-no { background: #F8DADA; color: var(--bad); }

.fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom));
  background: var(--accent); color: #fff; padding: 14px 22px; border-radius: 99px; box-shadow: 0 6px 20px rgba(232,119,46,.4); font-size: 15px; }
#toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 20; max-width: 90vw; }
.empty { background: var(--card); border-radius: 16px; padding: 30px 20px; text-align: center; }
.empty img { width: 120px; border-radius: 20px; }
