* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f4f4f6; color: #1d1d22; }
a { color: #c13584; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e3e3e8; }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; background: linear-gradient(90deg, #f58529, #dd2a7b, #8134af); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav a { margin-left: 16px; text-decoration: none; color: #444; }
main { max-width: 920px; margin: 24px auto; padding: 0 16px; }
.card { background: #fff; border: 1px solid #e3e3e8; border-radius: 12px; padding: 20px 22px; margin-bottom: 20px; }
.card.narrow { max-width: 420px; margin: 60px auto; }
h1 { font-size: 20px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 22px 0 8px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { font-weight: 400; color: #777; font-size: 13px; }
input[type=text], input[type=password], input[type=datetime-local], textarea, input[type=file] {
  width: 100%; padding: 9px 11px; border: 1px solid #cfcfd6; border-radius: 8px; font: inherit; background: #fff;
}
textarea { resize: vertical; }
button, .btn { display: inline-block; padding: 9px 16px; border: 0; border-radius: 8px; background: #dd2a7b; color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button:disabled { opacity: .5; cursor: wait; }
button.ghost, .btn.ghost { background: #fff; color: #333; border: 1px solid #cfcfd6; }
button.danger { background: #fff; color: #b42318; border: 1px solid #f1b5ad; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
form.inline { display: inline; margin: 0; }
.note { color: #666; font-size: 13px; }
code, pre.code { background: #f1f1f4; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
pre.code { padding: 10px; overflow-x: auto; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; background: #e8f7ee; color: #14532d; border: 1px solid #b7e4c7; }
.flash.err { background: #fdecea; color: #7a1d14; border-color: #f5c2bc; }
.flash.warn { background: #fff6e0; color: #6b4b00; border-color: #f3dc9a; }
#preview { display: block; max-height: 320px; margin-top: 10px; border-radius: 8px; background: #000; }
.preview-box { margin-top: 16px; border: 1px dashed #cfcfd6; border-radius: 8px; padding: 10px 12px; }
.preview-head { font-weight: 600; font-size: 13px; color: #555; display: flex; justify-content: space-between; flex-wrap: wrap; }
.preview-head .over { color: #b42318; font-weight: 700; }
#caption-preview, .post-caption { white-space: pre-wrap; word-break: break-word; font: inherit; margin: 8px 0 0; }
#upload-progress { margin-top: 10px; }
#upload-progress progress { width: 70%; vertical-align: middle; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: #444; background: #f1f1f4; }
.tabs a.active { background: #1d1d22; color: #fff; }
.post { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid #eee; }
.post video { width: 120px; height: 213px; object-fit: cover; border-radius: 8px; background: #000; flex-shrink: 0; }
.post-body { flex: 1; min-width: 0; }
.post-caption { max-height: 140px; overflow: auto; font-size: 14px; color: #333; }
.post-meta { font-size: 13px; color: #555; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.badge.scheduled { background: #e7efff; color: #1e40af; }
.badge.processing { background: #fff6e0; color: #6b4b00; }
.badge.posted { background: #e8f7ee; color: #14532d; }
.badge.failed { background: #fdecea; color: #7a1d14; }
.error-text { color: #b42318; font-size: 13px; margin-top: 6px; }
@media (max-width: 560px) {
  .post { flex-direction: column; }
  .post video { width: 100%; height: auto; max-height: 360px; }
}
form > button[type=submit] { margin-top: 14px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin-top: 16px; }
label.check input { width: auto; }
select { padding: 8px 10px; border: 1px solid #cfcfd6; border-radius: 8px; font: inherit; background: #fff; }
.platforms { display: flex; gap: 22px; flex-wrap: wrap; }
.platforms label.check { margin-top: 0; }
