@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
:root {
  --bg: #0b0e13; --s1: #11151c; --s2: #171c25; --s3: #202734; --line: #212836; --line2: #2f3848;
  --tx: #edf0f5; --tx2: #a6afbf; --tx3: #7d8799; --red: #ff2d41; --teal: #2dd4bf; --ok: #3ddc97; --warn: #ffb020;
  --k-ia: #8f7dff; --k-manual: #ffb020; --k-edited: #2dd4bf; --k-coldopen: #ff5c8a;
  --tiktok: #25f4ee; --youtube: #ff0033; --instagram: #e1306c; --snapchat: #fffc00; --facebook: #1877f2; --x: #e7e9ea;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 450 15px/1.45 "Archivo", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
main { max-width: 1180px; margin: 0 auto; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }

/* header */
.top { position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: max(12px, env(safe-area-inset-top)) 16px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand h1 { margin: 0; font-size: 22px; font-weight: 800; font-stretch: 115%; letter-spacing: -.02em; }
.brand h1 b { color: var(--red); }
.who { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--tx2); font-weight: 650; }
.who > span { margin-right: 4px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line2); background: var(--s1); color: var(--tx2); }
.icon svg { width: 18px; height: 18px; }
.icon.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }
.nav { display: flex; gap: 2px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.nav button { flex: none; height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--tx2); font-weight: 650; font-size: 14.5px; }
.nav button.on { color: var(--tx); border-bottom-color: var(--red); }
.page { padding-top: 18px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; height: 34px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line2); background: transparent; color: var(--tx2); font-weight: 650; font-size: 14px; }
.tabs button.on { background: var(--tx); color: var(--bg); border-color: var(--tx); }
.tabs .n { margin-left: 6px; opacity: .7; font-variant-numeric: tabular-nums; }
.disk { display: grid; font-size: 12px; line-height: 1.3; color: var(--tx3); text-align: right; font-variant-numeric: tabular-nums; }

/* layout */
.stack { display: grid; gap: 14px; align-content: start; }
.stack-lg { display: grid; gap: 30px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.tight { gap: 6px; }
.row.between { justify-content: space-between; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 18px; color: var(--tx); text-align: left; }
.panel h2 { margin: 0; font-size: 20px; font-stretch: 108%; font-weight: 750; }
.panel.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.panel.warn p { margin: 0; }
.muted { color: var(--tx3); }
.small { font-size: 12.5px; }
.field { display: grid; gap: 6px; }
.flabel { font-size: 13.5px; font-weight: 650; color: var(--tx2); }
.field small { color: var(--tx3); font-size: 12.5px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line2); background: var(--bg); color: var(--tx); font: inherit; font-size: 16px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(255, 45, 65, .2); }
.btn.sm { min-height: 36px; font-size: 13.5px; padding: 0 12px; border-radius: 9px; }
.btn.danger { color: #ff6b6b; }
.btn.back { justify-self: start; padding-left: 4px; }
.linkish { border: 0; background: none; color: var(--teal); padding: 0; font-weight: 650; text-decoration: underline; }
.src { color: var(--teal); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block; font-size: 14px; }
.note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--s2); color: var(--tx2); font-size: 14px; white-space: pre-wrap; }
.list { display: grid; gap: 10px; }
.order { display: grid; gap: 10px; width: 100%; font: inherit; }
.order.clickable { cursor: pointer; }
.order.clickable:hover { border-color: var(--line2); }
.order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.group { display: grid; gap: 12px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.group-head h2 { margin: 0; font-size: 19px; font-stretch: 106%; }
.status { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; font-weight: 700; background: var(--s3); color: var(--tx2); }
.status.s-review { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.status.s-delivered { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.status.s-processing { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.status.s-failed, .status.bad { background: rgba(255, 107, 107, .15); color: #ff6b6b; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--tx3); }
.steps li::before { content: ""; height: 5px; border-radius: 3px; background: var(--s3); }
.steps li.done::before { background: color-mix(in srgb, var(--ok) 55%, var(--s3)); }
.steps li.on { color: var(--tx); }
.steps li.on::before { background: var(--ok); }
.client { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.client.off { opacity: .55; }
.secret { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--warn); }
.secret p { margin: 0; }
.secret code { padding: 6px 10px; border-radius: 8px; background: var(--bg); font-size: 16px; letter-spacing: .04em; }
.howto { margin: 0; padding-left: 20px; color: var(--tx2); font-size: 14px; display: grid; gap: 4px; }
.score { padding: 1px 7px; border-radius: 6px; background: var(--s3); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.pick { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.pick input { width: 22px; height: 22px; min-height: 0; accent-color: var(--ok); }
.card.selectable.picked { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.postform { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.postform input { min-height: 40px; font-size: 14px; }
.postlist { display: grid; gap: 6px; }
.post { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--s2); border-left: 3px solid var(--pc); }
.post .pname { font-weight: 700; color: var(--tx); text-decoration: none; }
.post .views { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; }
.post .muted { margin-left: auto; }
.table-wrap { overflow-x: auto; padding: 6px; }
table.stats { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; min-width: 760px; }
table.stats th { text-align: left; font-size: 12.5px; color: var(--tx3); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.stats td { padding: 10px; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.stats th:nth-child(1) { width: 14%; } table.stats th:nth-child(2) { width: 30%; } table.stats th:nth-child(3) { width: 12%; }
table.stats td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.stats td.t a { color: var(--tx); text-decoration: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } .grid { grid-template-columns: 1fr; } .panel { padding: 14px; } }

/* cards */
.list { display: grid; gap: 16px; margin-top: 16px; }
.card { position: relative; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--kc, var(--k-ia)); z-index: 2; }
.media { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 14px; }
.thumb { position: relative; width: 112px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--s3); border: 0; padding: 0; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .dur { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 5px; background: rgba(5, 7, 10, .8); font-size: 12px; font-weight: 700; font-stretch: 90%; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.thumb .play svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.info { min-width: 0; display: grid; gap: 7px; align-content: start; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--tx2); }
.kind::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--kc, var(--k-ia)); }
.title { margin: 0; font-size: 16.5px; line-height: 1.3; font-weight: 750; font-stretch: 104%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 12.5px; color: var(--tx3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caption { margin: 0 14px; padding: 11px 12px; border-radius: 10px; background: var(--s2); font-size: 13.5px; color: var(--tx2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.caption .tags { color: var(--teal); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line2); background: var(--s2); color: var(--tx); font-weight: 700; font-size: 15px; text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.btn.primary.ready { background: var(--ok); border-color: var(--ok); color: #062b1c; }
.btn.wide { grid-column: span 2; }
.btn:disabled { opacity: .55; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx3); min-height: 38px; font-size: 13.5px; }
.prog { height: 3px; margin: 0 14px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s; }

/* where it was posted */
.posted { padding: 12px 14px 14px; }
.posted p { margin: 0 0 8px; font-size: 12.5px; color: var(--tx3); }
.plats { display: flex; flex-wrap: wrap; gap: 7px; }
.plat { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line2); background: transparent; color: var(--tx2); font-size: 13.5px; font-weight: 650; }
.plat::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); opacity: .45; }
.plat.on { color: var(--tx); border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent); }
.plat.on::before { opacity: 1; }
.plat.on::after { content: "✓"; font-weight: 800; color: var(--pc); }
.foot { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 6px 14px; }
.foot small { color: var(--tx3); font-size: 12px; }

/* empty / login */
.empty { margin-top: 48px; text-align: center; color: var(--tx2); padding: 0 20px; display: grid; gap: 12px; justify-items: center; }
.empty svg { width: 28px; height: 28px; color: var(--tx3); }
.empty h2 { color: var(--tx); font-size: 20px; font-stretch: 108%; margin: 0 0 6px; }
.login { min-height: 80vh; display: grid; align-content: center; gap: 18px; max-width: 380px; margin: 0 auto; }
.login h1 { margin: 0; font-size: 34px; font-weight: 800; font-stretch: 118%; letter-spacing: -.02em; line-height: 1.05; }
.login h1 b { color: var(--red); }
.login p { margin: 0; color: var(--tx2); }
.login input { height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--s1); font-size: 16px; }
.login input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(255, 45, 65, .2); }
.err { color: #ff6b6b; font-size: 14px; min-height: 20px; }

#toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 28px); padding: 12px 16px; border-radius: 12px; background: var(--tx); color: var(--bg); font-weight: 650; font-size: 14px; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.viewer { position: fixed; inset: 0; z-index: 30; background: #000; display: grid; place-items: center; }
.viewer video { max-width: 100%; max-height: 100%; }
.viewer button { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .prog i { transition: none; } }
.secret-key { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--bg); font-size: 17px; letter-spacing: .08em; word-break: break-all; }
