:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #5d6470;
  --line: #dde1e7;
  --accent: #1f5eff;
  --accent-ink: #ffffff;
  --approve: #137a45;
  --changes: #b4570a;
  --awaiting: #1f5eff;
  --queued: #6b7280;
  --pin: #e0245e;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #1a1d23;
    --ink: #eceef2;
    --muted: #9aa3b0;
    --line: #2c313a;
    --accent: #6d95ff;
    --accent-ink: #0d1020;
    --approve: #3cc480;
    --changes: #f0a050;
    --awaiting: #6d95ff;
    --queued: #9aa3b0;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 'DM Sans', system-ui, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.error { color: #c0262d; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.logo img { display: block; height: 27px; width: auto; }
@media (prefers-color-scheme: dark) { .logo img { filter: brightness(0) invert(1); } }
.nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .95rem; }
.nav__who { color: var(--muted); }
.nav form { margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }

.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.page--wide { max-width: 1280px; }
.site-footer { text-align: center; color: var(--muted); padding: 24px 16px; }

.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.narrow { max-width: 460px; margin: 40px auto; }
label { display: block; font-weight: 500; margin: .4rem 0 .3rem; }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
.button { display: inline-block; margin-top: .6rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.button:disabled { opacity: .55; cursor: default; }
.button--small { padding: 6px 10px; font-size: .85rem; margin-top: 0; }
.button--approve { background: var(--approve); color: #fff; }
.button--changes { background: var(--changes); color: #fff; }

.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 500; border: 1px solid currentColor; white-space: nowrap; }
.pill--awaiting { color: var(--awaiting); }
.pill--changes { color: var(--changes); }
.pill--approved { color: var(--approve); }
.pill--queued { color: var(--queued); }

.brand-list { display: grid; gap: 10px; }
.brand-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); text-decoration: none; }
.brand-row:hover { border-color: var(--accent); }
.brand-row__name { font-weight: 700; display: flex; flex-direction: column; }
.brand-row__name .small { font-weight: 400; color: var(--muted); }
.brand-row__counts { display: flex; gap: 6px; flex-wrap: wrap; }

.crumbs { margin: 0 0 .4rem; font-size: .9rem; color: var(--muted); }
.status-group { margin: 26px 0; }
.count { color: var(--muted); font-weight: 400; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.item-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; }
.item-card:hover { border-color: var(--accent); }
.thumb { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--bg); }
.thumb--empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.item-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.item-card__title { font-weight: 700; }

.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.vtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.vtab { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: .9rem; }
.vtab--on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.notice { background: var(--surface); border-left: 3px solid var(--changes); padding: 8px 12px; }

.review { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; margin-top: 12px; }
@media (max-width: 900px) { .review { grid-template-columns: minmax(0, 1fr); } }
.stage { min-width: 0; }
.frame { position: relative; display: block; max-width: 100%; margin: 0 auto 14px; width: fit-content; }
.frame[hidden], .pin[hidden] { display: none; }
.frame img, .frame video, .frame canvas { display: block; max-width: 100%; max-height: 80vh; height: auto; border-radius: 6px; background: #000; }
.pdf .frame canvas { max-height: none; width: 100%; background: #fff; }
.pdf .frame { width: 100%; }
.overlay { position: absolute; inset: 0; cursor: crosshair; }
.frame--video .overlay { bottom: 56px; }
.frame--playing .overlay { pointer-events: none; }
.frame__label { text-align: center; color: var(--muted); margin: 4px 0 0; }
.pin { position: absolute; transform: translate(-50%, -50%); min-width: 26px; height: 26px; border-radius: 13px; background: var(--pin); color: #fff; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); pointer-events: none; }
.pin--new { background: var(--accent); }
.pin--done { background: var(--queued); }
.carousel__nav { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.strip { display: flex; gap: 4px; flex-wrap: wrap; }
.strip button { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: .85rem; }
.strip button.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }

.side { display: flex; flex-direction: column; }
.brief { white-space: pre-wrap; margin: 0; }
.comments { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.comment { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.comment--done .comment__body { text-decoration: line-through; color: var(--muted); }
.comment__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment__body { margin: 4px 0 0; white-space: pre-wrap; }
.badge { background: var(--pin); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.decide__buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.decide, .release { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.history { margin: 0; padding-left: 18px; }
.history li { margin-bottom: 6px; }
.note { white-space: pre-wrap; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.link-out { margin-top: 6px; font-size: .8rem; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.filter { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.filter.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.topic { margin: 30px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.topic h2 { font-size: 1.35rem; margin-bottom: 4px; }
.topic__label { display: block; font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.channel { margin: 16px 0 6px; }
.channel h3 { font-size: 1rem; margin: 0 0 8px; }
.channel__note { margin: 8px 0 0; }
.item-card[hidden], .channel[hidden], .topic[hidden] { display: none; }
.topic__channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; align-items: start; }
.topic__channels .channel { margin: 8px 0 0; }
.topic__channels .item-grid { grid-template-columns: minmax(0, 1fr); }
.channel--wide { grid-column: 1 / -1; }
.channel--wide .item-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; }
