:root {
  --bg: #fbf8f4; --card: #fff; --ink: #1d1b26; --muted: #6b6878; --line: #e9e3da;
  --accent: #e8453c; --accent-ink: #fff; --ok: #1f9d55; --warn: #c27c0e; --err: #d33a2c;
  --ig: #c13584; --yt: #e62117; --tt: #111;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15141b; --card: #1e1d26; --ink: #f2efe9; --muted: #a29fae; --line: #2e2c38; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
a { color: var(--accent); }
h1 { font-size: 1.8rem; line-height: 1.2; margin: .4em 0 .6em; }
h2 { font-size: 1.15rem; margin: 1em 0 .5em; }
h3 { margin: .6em 0 .3em; }
img, video { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 760px; }
.wrap.wide { max-width: 1280px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 10px; }
.wrapflex { flex-wrap: wrap; gap: 10px; }
.center { text-align: center; }
.center-row { justify-content: center; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small-text { font-size: .85rem; }
.err { color: var(--err); }
.pre { white-space: pre-wrap; }

.topbar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.topbar .wrap { min-height: 62px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.appnav a { color: var(--ink); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.appnav a.on { background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.appnav a.btn { color: var(--accent-ink); }

.btn { display: inline-block; border: 0; background: var(--accent); color: var(--accent-ink); padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { background: var(--err); }
.btn.big { padding: 12px 22px; font-size: 1.05rem; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.full { width: 100%; margin-top: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 8px; }
.linkbtn.err { color: var(--err); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } .appnav { flex-wrap: wrap; justify-content: flex-end; } }

.hero { padding: 72px 0 56px; background: radial-gradient(600px 260px at 50% 0, color-mix(in srgb, var(--accent) 18%, transparent), transparent); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.accent { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 600px; margin: 0 auto 26px; }
.pill { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 12px; font-size: .85rem; color: var(--muted); }
.section { padding: 48px 18px; }
.band { background: color-mix(in srgb, var(--line) 45%, transparent); }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }

.footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: .92rem; margin-top: 40px; }
.footer a { color: var(--ink); font-weight: 600; }

.flashes { margin-top: 14px; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.flash.ok { border-color: var(--ok); }
.flash.error { border-color: var(--err); color: var(--err); }
.flash.warn { border-color: var(--warn); }

.auth { display: grid; place-items: center; padding: 48px 18px; }
.auth form { width: 100%; max-width: 400px; }
.form label, .postform label { display: block; margin: 10px 0; font-weight: 600; font-size: .95rem; }
input, select, textarea { width: 100%; font: inherit; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); margin-top: 4px; }
textarea { resize: vertical; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 4px; }

.page { padding-top: 10px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { font-size: .8rem; color: var(--muted); text-align: center; padding: 4px; }
.cal-day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal-day.other { opacity: .45; }
.cal-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.daynum { font-weight: 600; font-size: .9rem; }
.add { text-decoration: none; color: var(--muted); font-weight: 700; padding: 0 6px; border-radius: 6px; }
.add:hover { background: var(--line); }
.chip { display: flex; align-items: center; gap: 5px; text-decoration: none; color: var(--ink); font-size: .8rem; border-left: 4px solid var(--muted); background: var(--bg); border-radius: 6px; padding: 2px 5px; }
.chip img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }
@media (max-width: 700px) { .cal { gap: 3px; } .cal-day { min-height: 70px; padding: 3px; } .chip img { display: none; } .cal-head { font-size: .7rem; } }

.st-draft { --st: #8b8797; } .st-scheduled { --st: #2f6fdf; } .st-publishing, .st-processing, .st-pending { --st: #c27c0e; }
.st-published { --st: #1f9d55; } .st-failed { --st: #d33a2c; } .st-partial { --st: #b5560f; }
.chip[class*="st-"] { border-left-color: var(--st); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .8rem; font-weight: 600; color: var(--st); background: color-mix(in srgb, var(--st) 14%, transparent); }
.badge.big { font-size: .95rem; padding: 4px 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--st); margin: 0 3px 0 10px; }

.filters select { width: auto; }
.list { display: grid; gap: 10px; }
.list-row { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); padding: 12px; }
.list-row img, .list-row video, .list-row .ph { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--line); flex: none; }
.list-row .right { text-align: right; }
.empty { text-align: center; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.seg label { border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; margin: 0; }
.seg input { width: auto; margin-right: 6px; }
.seg label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.preview img, .preview video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #000; }
.preview .n { position: relative; }
.actions { margin-top: 16px; }
.plat { font-weight: 700; font-size: .8rem; padding: 2px 8px; border-radius: 6px; color: #fff; background: var(--muted); }
.plat.instagram { background: var(--ig); } .plat.youtube { background: var(--yt); } .plat.tiktok { background: var(--tt); }
.acc.disabled { opacity: .45; }
.target { padding: 8px 0; border-bottom: 1px solid var(--line); }
.acct { padding: 8px 0; border-bottom: 1px solid var(--line); }
.avatar { width: 26px; height: 26px; border-radius: 50%; }
.legal h2 { margin-top: 1.6em; }
[hidden] { display: none !important; }
.creator { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 10px 0; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.creator.err { color: var(--err); border-color: var(--err); }
fieldset.plain { border: 0; padding: 0; margin: 12px 0; }
fieldset.plain legend { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
label.disabled { opacity: .5; }
.indent { padding-left: 26px; }
.label-note { font-size: .9rem; color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 8px; padding: 6px 10px; }
.label-note:empty { display: none; }
.consent { font-size: .9rem; color: var(--muted); margin-top: 14px; }
