/* Referral Hub — one small stylesheet, mobile first, light + dark. */
:root {
  --brand: #2563eb;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #14171c;
  --muted: #5d6672;
  --line: #e2e5e9;
  --soft: #f0f2f5;
  --ok: #15803d; --ok-bg: #e8f6ee;
  --warn: #a15c07; --warn-bg: #fdf3e2;
  --bad: #b91c1c; --bad-bg: #fdeceb;
  --info: #1d4ed8; --info-bg: #e8effd;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --grid: #e1e0d9; --axis: #c3c2b7; --tick: #898781;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 10px rgba(16, 24, 40, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --card: #171a21; --text: #e9ebee; --muted: #9aa3ae; --line: #2a2f38; --soft: #1e222a;
    --ok: #4ade80; --ok-bg: #12291c; --warn: #fbbf24; --warn-bg: #2d2412; --bad: #f87171; --bad-bg: #2e1515;
    --info: #93c5fd; --info-bg: #15213a;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --grid: #2c2c2a; --axis: #383835; --tick: #898781;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.noscroll { overflow: hidden; }
a { color: var(--brand); }
@media (prefers-color-scheme: dark) { a, .linkbtn, .drop, .tabs a.on, .anav a.on { color: color-mix(in srgb, var(--brand) 55%, #fff); } }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .4rem; }
h2 { font-size: 1.12rem; margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--soft); padding: .05em .35em; border-radius: 5px; }
kbd { font: 600 .72rem ui-monospace, monospace; border: 1px solid currentColor; border-radius: 4px; padding: 0 .3em; opacity: .7; margin-left: .3em; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.strong { font-weight: 600; }
.center { text-align: center; }
.pad { padding: 2rem 1rem !important; }
.inline { display: inline; margin: 0; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.banner { background: var(--brand); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .92rem; font-weight: 500; }
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 720px; margin: 0 auto; padding: .65rem 16px; display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.top-in.wide, .wrap.wide { max-width: 1240px; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { border-radius: 7px; object-fit: contain; }
.top nav { display: flex; gap: 1rem; align-items: center; font-size: .95rem; }
.top nav a { text-decoration: none; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; padding: 1.5rem 16px 2.5rem; font-size: .9rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; margin-bottom: 14px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 440px; margin: 2rem auto; }
.big-ic { color: var(--muted); }
.big-ic .ic { width: 42px; height: 42px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .6rem 1.1rem; border-radius: 11px; border: 1px solid transparent;
  background: var(--brand); color: #fff !important; font: 600 1rem/1.2 inherit; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 54px; font-size: 1.08rem; }
.btn.sm { min-height: 36px; padding: .35rem .8rem; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--text) !important; border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); filter: none; }
.btn.ok { background: var(--ok); }
@media (prefers-color-scheme: dark) { .btn.ok { background: #15803d; } .btn.bad { background: #b91c1c !important; } }
.btn.bad { background: var(--bad); }
.btn.copied { background: var(--ok) !important; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
.linkbtn.bad { color: var(--bad); }
.linkbtn.sm { font-size: .8rem; }

.form label, label.sm { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .9rem; }
.label-like { font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; font: 400 1rem/1.4 inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; min-height: 46px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .ed-area:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; margin: 0; flex: none; accent-color: var(--brand); display: inline-block; }
input[type=color] { width: 52px; padding: 2px; flex: none; }
input[readonly] { background: var(--soft); }
.hint { display: block; font-weight: 400; font-size: .84rem; color: var(--muted); margin-top: .3rem; }
.check { display: flex !important; align-items: flex-start; gap: .65rem; font-weight: 500 !important; cursor: pointer; }
.check.big { padding: .75rem; border: 1px solid var(--line); border-radius: 11px; margin: 0; }
.check.big:has(input:checked) { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.row2, .row3 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: .8rem; }
.copyrow { display: flex; gap: .5rem; align-items: stretch; }
.copyrow input { margin: 0; font-size: .9rem; }
.copyrow .btn { flex: none; }
.prefix { display: flex; align-items: center; margin-top: .3rem; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prefix span { padding: 0 .1rem 0 .7rem; color: var(--muted); font-weight: 400; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.prefix input { border: 0; margin: 0; border-radius: 0; }
.color-row { display: flex; gap: .5rem; align-items: center; }
.color-row input { margin-top: .3rem; }

/* ---------- alerts, badges, toasts ---------- */
.alert { border-radius: 11px; padding: .75rem 1rem; margin-bottom: 14px; border: 1px solid transparent; }
.a-ok { background: var(--ok-bg); color: var(--ok); }
.a-error { background: var(--bad-bg); color: var(--bad); }
.a-info { background: var(--info-bg); color: var(--info); }
.badge { display: inline-flex; align-items: center; gap: .2rem; font-size: .76rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; white-space: nowrap; vertical-align: middle; background: var(--soft); color: var(--muted); }
.st-submitted, .st-review { background: var(--info-bg); color: var(--info); }
.st-approved { background: var(--ok-bg); color: var(--ok); }
.st-paid { background: var(--ok); color: #fff; }
.st-rejected { background: var(--bad-bg); color: var(--bad); }
.badge.hs { background: #ede9fe; color: #6d28d9; }
@media (prefers-color-scheme: dark) { .badge.hs { background: #2a2145; color: #c4b5fd; } .st-paid { color: #0b2614; } }
.flag { display: inline-flex; align-items: center; gap: .2rem; font-size: .74rem; font-weight: 700; padding: .12rem .45rem; border-radius: 6px; margin: 0 .2rem .2rem 0; white-space: nowrap; }
.flag .ic { width: .9em; height: .9em; }
.f-bad { background: var(--bad-bg); color: var(--bad); }
.f-warn { background: var(--warn-bg); color: var(--warn); }
.count { display: inline-block; min-width: 1.4em; text-align: center; font-size: .75rem; font-weight: 700; padding: 0 .35em; border-radius: 999px; background: var(--soft); color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 32px); background: #1f2937; color: #fff; padding: .75rem 1rem; border-radius: 11px; z-index: 60; box-shadow: 0 8px 30px rgba(0,0,0,.25); transition: opacity .5s; }
.toast.bad { background: #991b1b; }
.toast.out { opacity: 0; }

/* ---------- landing ---------- */
.hero h1 { font-size: 1.6rem; }
.lead { font-size: 1.05rem; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; background: var(--soft); border-radius: 999px; padding: .35rem .8rem; font-weight: 600; font-size: .92rem; }
.pill.pay { background: var(--ok-bg); color: var(--ok); }
.cta { border-color: var(--brand); }
.closed { background: var(--soft); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: .55rem; align-items: flex-start; padding: .35rem 0; }
.checks li .ic { color: var(--ok); margin-top: .2rem; }
.checks li.no .ic { color: var(--bad); }
.checks li.no { color: var(--muted); }
.steps-preview { margin: 0; padding-left: 1.3rem; }
.steps-preview li { margin-bottom: .55rem; }
.prose h2, .prose h3, .prose h4 { display: block; margin: 1rem 0 .5rem; }
.prose > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .3rem; }
.vid { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; display: block; }
.yt { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 16/9; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.yt-play .ic { width: 64px; height: 64px; background: rgba(220, 0, 0, .9); border-radius: 16px; padding: 16px; fill: #fff; }
.yt-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; }

/* ---------- worker panel ---------- */
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.head h1 { font-size: 1.25rem; }
.save-login { border: 2px solid var(--ok); background: var(--ok-bg); }
.fold summary { cursor: pointer; font-weight: 600; }
.fold[open] summary { margin-bottom: .75rem; }
.stepnum { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; flex: none; }
.step-card .clicked-note { display: none; color: var(--ok); margin: .6rem 0 0; }
.step-card.is-done .clicked-note { display: block; }
.step-card.is-done .stepnum { background: var(--ok); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.uploader { margin-bottom: 1.25rem; }
.uploader:last-child { margin-bottom: 0; }
.drop { position: relative; display: flex !important; flex-direction: column; align-items: center; gap: .25rem; text-align: center; border: 2px dashed var(--line); border-radius: 12px; padding: 1.1rem; cursor: pointer; font-weight: 600 !important; color: var(--brand); margin: 0 0 .6rem !important; }
.drop:hover { border-color: var(--brand); background: var(--soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; min-height: 0; height: 100%; }
.drop small { color: var(--muted); font-weight: 400; font-size: .82rem; }
.drop .ic { width: 28px; height: 28px; }
.qitem { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; margin-bottom: .5rem; }
.qitem.err { border-color: var(--bad); background: var(--bad-bg); }
.qitem.err .qstat { color: var(--bad); }
.qname { font-size: .88rem; font-weight: 600; word-break: break-all; }
.bar { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; margin: .4rem 0; }
.bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .2s; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.thumb { position: relative; display: block; margin: 0; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); padding: 0; cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.vfile { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding: .55rem .75rem; background: var(--soft); border-radius: 10px; margin: 0 0 .5rem; font-size: .92rem; }
.vfile span { flex: 1; word-break: break-all; }
.missing ul { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--bad); }
.missing .ready { color: var(--ok); font-weight: 600; }
.code-card { text-align: center; border: 2px solid var(--brand); }
.code-card .label { font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.code { font: 800 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; margin: .2rem 0 1rem; user-select: all; word-break: break-all; }
.code.sm { font-size: 1.25rem; margin: 0 0 .75rem; text-align: center; }
.code-card .btn { margin-bottom: .75rem; }
.timeline { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.timeline li { display: flex; align-items: center; gap: .35rem; font-size: .88rem; color: var(--muted); padding: .3rem .65rem .3rem .35rem; border-radius: 999px; background: var(--soft); }
.timeline .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.timeline .dot .ic { width: 12px; height: 12px; }
.timeline li.done { color: var(--ok); }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.timeline li.now { color: var(--text); font-weight: 700; background: var(--info-bg); }
.timeline li.now .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.rejected { border: 2px solid var(--bad); }

/* ---------- admin ---------- */
.admin .top-in { flex-wrap: wrap; gap: .6rem 1rem; }
.finder { flex: 1 1 260px; max-width: 380px; margin: 0; }
.finder input { margin: 0; min-height: 38px; padding: .4rem .7rem; font-size: .92rem; }
.anav { flex-wrap: wrap; gap: .25rem !important; }
.anav a { padding: .35rem .6rem; border-radius: 8px; color: var(--text); font-weight: 500; }
.anav a.on { background: var(--soft); color: var(--brand); font-weight: 700; }
.anav .linkbtn { padding: .35rem .6rem; text-decoration: none; color: var(--muted); }
.login-card { margin-top: 12vh; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters input, .filters select { width: auto; margin: 0; min-height: 40px; padding: .4rem .6rem; font-size: .92rem; }
.filters input[name=q] { flex: 1 1 220px; }
.filters label.sm { display: flex; align-items: center; gap: .35rem; margin: 0; font-weight: 500; font-size: .88rem; }
.filters .check.sm { align-items: center; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 14px; }
.tile { display: flex; flex-direction: column; gap: .15rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.t-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.t-val { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.t-sub { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .3rem; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.cols { display: grid; gap: 0 14px; }
@media (min-width: 960px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.funnel { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .55rem; }
.funnel li { display: grid; grid-template-columns: minmax(110px, 9.5rem) 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.f-bar { height: 14px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.f-bar span { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.f-val { min-width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.legend span, .tip div { display: inline-flex; align-items: center; gap: .35rem; }
.sw { display: inline-block; width: 12px; height: 4px; border-radius: 2px; }
.sw.s1 { background: var(--s1); } .sw.s2 { background: var(--s2); } .sw.s3 { background: var(--s3); } .sw.s4 { background: var(--s4); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--tick); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.s1 { stroke: var(--s1); } .chart .ln.s2 { stroke: var(--s2); } .chart .ln.s3 { stroke: var(--s3); } .chart .ln.s4 { stroke: var(--s4); }
.chart .endlab { fill: var(--muted); font-size: 11px; }
.chart .dotc.s1 { fill: var(--s1); } .chart .dotc.s2 { fill: var(--s2); } .chart .dotc.s3 { fill: var(--s3); } .chart .dotc.s4 { fill: var(--s4); }
.chart .hit { fill: transparent; }
.chart .xhair { stroke: var(--axis); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; top: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .82rem; box-shadow: 0 6px 20px rgba(0,0,0,.12); pointer-events: none; display: grid; gap: .15rem; min-width: 140px; }
.tip b { margin-left: auto; padding-left: .8rem; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--soft); white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.compact th, .tbl.compact td { padding: .4rem .6rem; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.queue tbody tr { cursor: pointer; }
.tbl.queue tbody tr:hover { background: var(--soft); }
.tbl .cb { width: 36px; }
.tabs { display: flex; gap: .25rem; overflow-x: auto; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.tabs a { padding: .55rem .8rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.bulkbar { position: sticky; top: 60px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--info-bg); border-radius: 11px; padding: .55rem .75rem; margin-bottom: 10px; }
.bulkbar select, .bulkbar input { width: auto; margin: 0; min-height: 38px; padding: .35rem .6rem; font-size: .9rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }
.camp-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.camp h2 { margin-bottom: .25rem; }
.camp h2 a { color: var(--text); text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.camp-form .card h2 { margin-bottom: 1rem; }
.rows { display: grid; gap: .6rem; margin-bottom: .75rem; }
.rowitem { display: grid; gap: .5rem; grid-template-columns: 1fr; padding: .6rem; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.rowitem input, .rowitem select { margin: 0; }
.row-main { display: grid; gap: .4rem; }
.row-ctl { display: flex; gap: .3rem; }
.row-ctl button { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 9px; cursor: pointer; font-size: 1rem; }
@media (min-width: 800px) { .rowitem { grid-template-columns: 1fr auto auto auto; align-items: start; } .rowitem:has(select[name="field_kind[]"]) { grid-template-columns: 1fr auto auto auto; } }
.toggles { display: grid; gap: .3rem 1.5rem; }
@media (min-width: 800px) { .toggles { grid-template-columns: 1fr 1fr; } }
.toggles .check { margin: .55rem 0 !important; }
.inline-num { display: flex !important; align-items: center; justify-content: space-between; gap: .75rem; font-weight: 500 !important; }
.inline-num input { width: 110px; flex: none; margin: 0; }
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; gap: .6rem; padding: .75rem; margin: 0 -4px 14px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.danger { text-align: right; margin: 1rem 0 2rem; }
.editor { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 1rem; overflow: hidden; }
.ed-bar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; background: var(--soft); border-bottom: 1px solid var(--line); }
.ed-bar button { min-width: 38px; height: 34px; padding: 0 .55rem; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 7px; cursor: pointer; font: 600 .85rem inherit; }
.ed-area { min-height: 180px; padding: .8rem 1rem; outline: none; }
.media-up { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.media-up .bar { flex: 1 1 120px; margin: 0; }
.media-cur { display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.logo-prev { max-height: 48px; max-width: 160px; border-radius: 8px; background: var(--soft); }
.kv { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: .35rem .9rem; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.rec-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .25rem; }
.nav-btns { display: flex; gap: .4rem; }
.rec { display: grid; gap: 0 14px; }
@media (min-width: 960px) { .rec { grid-template-columns: minmax(0, 1fr) 360px; } .rec-side { position: sticky; top: 70px; align-self: start; max-height: calc(100vh - 80px); overflow-y: auto; } }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.act-grid { display: grid; gap: .55rem; }
.act-grid form { margin: 0; }
.paid-form { display: grid; gap: .4rem; }
.paid-form input { margin: 0; }
.reject-box summary { list-style: none; }
.reject-box summary::-webkit-details-marker { display: none; }
.reject-box[open] summary { margin-bottom: .6rem; }
.reject-box form { padding: .7rem; border: 1px solid var(--bad); border-radius: 11px; }
.keys { margin: .75rem 0 0; }
.sg-status { padding: .55rem .7rem; border-radius: 10px; background: var(--ok-bg); color: var(--ok); }
.sg-status.bad { background: var(--bad-bg); color: var(--bad); }
.sg-status:not(.bad):not(:has(.ic)) { background: var(--soft); color: var(--muted); }
.badge.sg { background: #fff4e5; color: #9a4b00; }
@media (prefers-color-scheme: dark) { .badge.sg { background: #33240f; color: #fbbf72; } }
.sg-box { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.sg-guide { margin: .5rem 0 1rem; padding-left: 1.2rem; }
.sg-guide li { margin-bottom: .25rem; }
.flags-card { border-color: var(--warn); }
.flag-list { margin: 0; padding-left: 1.1rem; }
.flag-list > li { margin-bottom: .55rem; }
.flag-list > li.f-bad, .flag-list > li.f-warn { background: none; }
.flag-list > li.f-bad strong { color: var(--bad); }
.flag-list > li.f-warn strong { color: var(--warn); }
.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.92); display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.lb-stage { height: 100vh; overflow: auto; display: grid; place-items: center; padding: 2rem 0; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 4rem); cursor: zoom-in; display: block; }
.lb-stage.zoom { place-items: start; }
.lb-stage.zoom img { max-width: none; max-height: none; width: 220%; cursor: zoom-out; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; height: 100%; }
.lb-close { position: absolute; top: 8px; right: 12px; height: auto !important; z-index: 2; }
.lb-hint { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: #aaa; font-size: .8rem; pointer-events: none; }
@media (max-width: 600px) { .tbl.queue th:nth-child(3), .tbl.queue td:nth-child(3), .tbl.queue th:nth-child(7), .tbl.queue td:nth-child(7) { display: none; } }
@media (forced-colors: active) { .btn { border: 1px solid ButtonText; } }
