:root {
  --ink: #1b1d22; --muted: #6b6f78; --line: #e7e2d6; --paper: #faf8f3; --card: #ffffff;
  --side: #12151b; --side-ink: #c9ccd3; --gold: #e5c158; --gold-soft: #f5e6ad; --gold-deep: #996515;
  --ok: #2f7d4f; --bad: #b3261e; --wait: #8a6d1d; --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--paper); }
body.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
body.bare main { max-width: 420px; margin: 12vh auto; }
aside { background: var(--side); color: var(--side-ink); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 0; height: 100vh; }
.brand { color: #fff; font-weight: 650; font-size: 20px; letter-spacing: .2px; }
.brand small { display: block; color: var(--gold); font-weight: 500; font-size: 12px; letter-spacing: .4px; }
aside nav { display: flex; flex-direction: column; gap: 2px; }
aside nav a { color: var(--side-ink); text-decoration: none; padding: 9px 12px; border-radius: 8px; }
aside nav a:hover { background: #1c2029; color: #fff; }
aside nav a.on { background: #1f232c; color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
aside form { margin-top: auto; }
main { padding: 32px clamp(16px, 4vw, 48px); max-width: 1180px; }
h1 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 650; margin: 0 0 20px; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 8px 0 4px; }
a { color: var(--gold-deep); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; }
.card.warn { border-color: var(--gold); background: #fffaf0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile b { display: block; font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 13px; }
.list, .checklist, .targets { list-style: none; margin: 0; padding: 0; }
.list li, .targets li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.list li:first-child, .targets li:first-child { border-top: 0; }
.checklist li { padding: 6px 0; }
time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
ul.error { padding-left: 34px; }
.flash { background: var(--gold-soft); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: #f4f2ec; }
.chip-approved, .chip-processing, .chip-waiting { color: var(--wait); border-color: #ead9a4; background: #fbf5e1; }
.chip-done, .chip-published { color: var(--ok); border-color: #cfe5d6; background: #eef7f1; }
.chip-failed { color: var(--bad); border-color: #f0c9c6; background: #fcf0ef; }
.pf { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: #f1efe9; }
.pf-youtube { color: #b3261e; } .pf-instagram { color: #8a3a8f; } .pf-threads { color: #1b1d22; }
label { display: block; margin: 0 0 14px; font-weight: 550; font-size: 14px; }
label small { color: var(--muted); font-weight: 400; }
input, textarea { display: block; width: 100%; margin-top: 6px; font: inherit; padding: 9px 11px; border: 1px solid #d9d4c6;
  border-radius: 8px; background: #fff; color: var(--ink); font-weight: 400; }
input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; }
textarea { resize: vertical; }
button, .button { font: inherit; font-weight: 550; padding: 8px 16px; border-radius: 8px; border: 1px solid #d9d4c6;
  background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; user-select: none; }
button:hover, .button:hover { border-color: var(--gold); }
button.primary, .button.primary { background: var(--gold); border-color: var(--gold); color: #1b1d22; }
button.primary:hover, .button.primary:hover { background: #d9b247; }
button.link { background: none; border: 0; color: var(--side-ink); padding: 9px 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }
form.inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
form.inline input { margin: 0; min-width: 260px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.compose { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.accs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.acc { font-weight: 500; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.limits { list-style: none; padding: 0; margin: -6px 0 14px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.count { font-variant-numeric: tabular-nums; }
.count.over { color: var(--bad); font-weight: 600; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: -6px 0 8px; }
.progress div { height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { text-decoration: none; color: var(--ink); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.tabs a.on { border-color: var(--gold); background: var(--gold-soft); }
.post header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.caption { white-space: pre-wrap; margin: 8px 0 12px; }
.comments .comment { display: block; }
.comment p { margin: 4px 0 8px; white-space: pre-wrap; }
.reply { display: flex; gap: 8px; }
.reply input { margin: 0; }
@media (max-width: 860px) {
  body.app { grid-template-columns: 1fr; }
  aside { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 12px; }
  aside nav { flex-direction: row; flex-wrap: wrap; }
  aside form { margin: 0; }
  .compose { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
