/* Arcmite Collective repo manager — black, crimson-to-coral ARC gradient, ice white for "done". */
:root {
  --bg: #0e0e10;
  --panel: #151518;
  --raised: #1e1e22;
  --sunken: #0a0a0c;
  --line: #2d2d33;
  --line-soft: #212126;
  --text: #f1efed;
  --muted: #a6a6ae;
  --faint: #70707a;
  --arc: #ff4f6e;          /* brand crimson, readable on black */
  --arc-strong: #e5133f;   /* filled buttons (white text passes contrast) */
  --arc-ink: #ffffff;
  --arc-soft: rgba(255, 46, 86, 0.13);
  --coral: #f39a82;
  --grad: linear-gradient(100deg, #ff1d4c 0%, #f39a82 100%);
  --ok: #9fe6f2;           /* the icy white of "collective" */
  --ok-soft: rgba(159, 230, 242, 0.12);
  --amber: #f2b84b;
  --amber-soft: rgba(242, 184, 75, 0.13);
  --danger: #ff8a4c;
  --danger-soft: rgba(255, 138, 76, 0.13);
  --live: #39ff88;          /* neon green: public on Discord */
  --live-ink: #032b13;
  --live-soft: rgba(57, 255, 136, 0.12);
  --display: "Bahnschrift", "DIN Alternate", "D-DIN", "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --brand: "Century Gothic", "Futura", "Avenir Next", "URW Gothic", "Trebuchet MS", sans-serif;
  --body: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --r-sm: 4px;
  --r-md: 7px;
  --r-lg: 12px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ecebea; --panel: #ffffff; --raised: #f5f4f3; --sunken: #e6e5e3; --line: #d3d1ce; --line-soft: #e5e3e0;
    --text: #18171a; --muted: #5c5a60; --faint: #8a8890; --arc: #c80f37; --arc-strong: #d4123b; --arc-ink: #ffffff;
    --arc-soft: rgba(212, 18, 59, 0.1); --ok: #13768a; --ok-soft: rgba(19, 118, 138, 0.1);
    --amber: #9a6500; --amber-soft: rgba(196, 136, 0, 0.13); --danger: #b8460c; --danger-soft: rgba(184, 70, 12, 0.1);
    --live: #0b9b45; --live-ink: #ffffff; --live-soft: rgba(11, 155, 69, 0.12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--arc); }
:focus-visible { outline: 2px solid var(--arc); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised);
  cursor: pointer; white-space: nowrap; font-weight: 500;
}
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--arc-strong); border-color: var(--arc-strong); color: var(--arc-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--raised); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 30px; height: 30px; padding: 0; justify-content: center; }

.input, .textarea, .select {
  width: 100%; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 7px 10px; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--arc); }
.textarea { resize: vertical; min-height: 220px; font-family: var(--body); line-height: 1.55; }
.select { padding-right: 28px; }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--arc); }

/* ---------- top bar ---------- */
.topbar {
  height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: var(--panel); position: relative;
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: 6px; white-space: nowrap; }
.brand-logo { width: 40px; height: auto; display: block; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6)); }
.brand-name { font: 700 13px/1 var(--brand); letter-spacing: 0.22em; text-transform: uppercase; }
.brand small { font: 400 13px/1 var(--body); color: var(--muted); }
.topbar .select { width: auto; min-width: 180px; height: 34px; padding-top: 0; padding-bottom: 0; }
.sync-state { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
.user { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* ---------- layout ---------- */
.workbench { display: grid; grid-template-columns: clamp(290px, 18vw, 440px) minmax(0, 1fr) clamp(380px, 25vw, 660px); height: calc(100vh - 52px); }
.list-pane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.editor-pane { min-width: 0; min-height: 0; overflow: auto; position: relative; container-type: inline-size; }
.preview-pane { border-left: 1px solid var(--line); overflow: auto; background: var(--panel); padding: 16px; }
@media (max-width: 1280px) {
  .workbench { grid-template-columns: 320px minmax(0, 1fr); }
  .preview-pane { display: none; }
  .editor .inline-preview { display: block; }
}
@media (max-width: 820px) {
  .workbench { grid-template-columns: 1fr; }
  .workbench.editing .list-pane { display: none; }
  .workbench:not(.editing) .editor-pane { display: none; }
  .editor .back-btn { display: inline-flex; }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar .sync-state, .brand small, .brand-name, .user-name { display: none; }
  .topbar .select { min-width: 0; flex: 1; max-width: none; }
  .topbar .spacer { display: none; }
}

/* ---------- post list ---------- */
.list-head { padding: 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line-soft); }
.list-head .row { display: flex; gap: 8px; }
.list-head .select { height: 32px; padding: 0 4px 0 8px; font-size: 13px; min-width: 0; }
.list-head .filters { display: grid; grid-template-columns: 1.25fr 1fr 0.9fr; gap: 6px; }
.list-count { color: var(--faint); font-size: 12px; }
.post-list { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.post-item {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: var(--r-md);
  cursor: pointer; border: 1px solid transparent;
}
.post-item:hover { background: var(--raised); }
.post-item.active { background: var(--arc-soft); border-color: color-mix(in srgb, var(--arc) 45%, transparent); }
.post-thumb {
  width: 76px; height: 43px; border-radius: var(--r-sm); background: var(--sunken) center/cover no-repeat;
  border: 1px solid var(--line-soft);
}
.post-thumb.empty { display: grid; place-items: center; color: var(--faint); font-size: 11px; }
.post-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.badge {
  font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 9px; background: var(--raised);
  color: var(--muted); border: 1px solid var(--line-soft); white-space: nowrap;
}
.badge.draft { color: var(--text); border-style: dashed; }
.badge.dirty { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.badge.foreign { color: var(--muted); }
.badge.deleted, .badge.conflict { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.list-empty { padding: 30px 16px; color: var(--muted); text-align: center; }

/* ---------- editor ---------- */
.editor { max-width: 900px; margin: 0 auto; padding: 18px 22px 110px; }
.ed-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 36px; }
/* Wide screens (e.g. 21:9): two editor columns side by side, so nothing is wasted. */
@container (min-width: 1180px) {
  .editor { max-width: 1900px; padding: 20px 32px 110px; }
  .ed-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .ed-cols .textarea.desc { min-height: 260px; }
}
.editor-empty {
  display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 30px;
  background: linear-gradient(180deg, rgba(14, 14, 16, 0.55), rgba(14, 14, 16, 0.92)), url("/assets/art-streak.jpg") center / cover no-repeat;
}
.editor-empty .stamp { display: block; margin: 0 auto 18px; width: 180px; height: auto; opacity: 0.9; }
@media (prefers-color-scheme: light) { .editor-empty { background: var(--bg); color: var(--muted); } .editor-empty .stamp { filter: invert(1); } }
.editor-empty h2 { font: 600 22px/1.2 var(--display); color: var(--text); margin: 0 0 6px; }
.back-btn { display: none; margin-bottom: 10px; }

.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--raised); border: 1px solid var(--line); margin-bottom: 14px; color: var(--muted);
}
.banner strong { color: var(--text); }
.banner.warn { background: var(--amber-soft); border-color: transparent; }
.banner.bad { background: var(--danger-soft); border-color: transparent; }
.banner .btn { margin-left: auto; flex: none; }

.field { margin-bottom: 22px; }
.field-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.field-head label, .field-head h3 { font: 600 15px/1.2 var(--display); margin: 0; letter-spacing: 0.01em; }
.field-head .hint { color: var(--faint); font-size: 12.5px; }
.counter { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 600; }
.counter.near { color: var(--amber); }

.title-input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  font: 600 28px/1.25 var(--display); padding: 4px 0 10px; outline: none; letter-spacing: 0.005em;
}
.title-input:focus { border-bottom-color: var(--arc); }
.title-input::placeholder { color: var(--faint); }

/* tag slots: the signature element */
.slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.slot {
  height: 34px; border-radius: var(--r-md); border: 1.5px dashed var(--line); display: flex; align-items: center;
  justify-content: center; color: var(--faint); font-size: 12px; min-width: 0;
}
.slot.filled {
  border: 1.5px solid var(--arc); background: var(--arc-soft); color: var(--text); justify-content: space-between;
  padding: 0 4px 0 10px; font-weight: 600;
}
.slot.filled span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.filled button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 22px; height: 22px; border-radius: 4px; flex: none; }
.slot.filled button:hover { color: var(--text); background: var(--raised); }
.slots.full .slot.filled { border-color: var(--amber); background: var(--amber-soft); }
.tag-bank { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--raised);
  cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 5px;
}
.tag-chip:hover:not(:disabled) { border-color: var(--arc); }
.tag-chip[aria-pressed="true"] { display: none; }
.tag-chip:disabled { opacity: 0.4; cursor: not-allowed; }
.tag-chip .shield { color: var(--amber); font-size: 11px; }
.slot-note { font-size: 12.5px; color: var(--amber); margin-top: 8px; }

/* cover */
.cover-box {
  position: relative; aspect-ratio: 3 / 2; border-radius: var(--r-lg); overflow: hidden; background: var(--sunken);
  border: 1px solid var(--line);
}
.cover-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.cover-actions .btn { background: rgba(17, 20, 24, 0.82); border-color: rgba(255, 255, 255, 0.14); color: #eee; backdrop-filter: blur(6px); }
.drop {
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); padding: 26px; text-align: center; color: var(--muted);
  cursor: pointer; background: var(--sunken);
}
.drop strong { color: var(--text); display: block; font: 600 15px/1.3 var(--display); margin-bottom: 3px; }
.drop.over, .drop:hover { border-color: var(--arc); color: var(--text); }
.cover-box.drop-target.over { outline: 2px solid var(--arc); }

/* markdown toolbar */
.md-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--raised); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; }
.md-toolbar button { height: 28px; min-width: 30px; padding: 0 7px; border: 0; background: none; border-radius: 4px; cursor: pointer; color: var(--muted); font-size: 13px; }
.md-toolbar button:hover { background: var(--panel); color: var(--text); }
.md-toolbar + .textarea { border-radius: 0 0 var(--r-md) var(--r-md); }
.footer-note { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.footer-note code { font-family: var(--mono); font-size: 12px; background: var(--raised); padding: 1px 5px; border-radius: 3px; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.gal-item { position: relative; aspect-ratio: 3 / 2; border-radius: var(--r-md); overflow: hidden; background: var(--sunken); border: 1px solid var(--line); cursor: grab; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.gal-item.dragging { opacity: 0.4; }
.gal-item.drop-before { box-shadow: -3px 0 0 var(--arc); }
.gal-tools { position: absolute; inset: auto 4px 4px 4px; display: flex; gap: 4px; justify-content: flex-end; opacity: 0; }
.gal-item:hover .gal-tools, .gal-item:focus-within .gal-tools { opacity: 1; }
.gal-tools button { height: 24px; padding: 0 7px; font-size: 12px; border-radius: 4px; border: 0; background: rgba(17, 20, 24, 0.85); color: #eee; cursor: pointer; }
.gal-add { aspect-ratio: 3 / 2; border: 1.5px dashed var(--line); border-radius: var(--r-md); display: grid; place-items: center; color: var(--muted); cursor: pointer; background: transparent; }
.gal-add:hover { border-color: var(--arc); color: var(--text); }

.file-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); }
.file-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .size { color: var(--faint); font-size: 12px; }

.keyword-box { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); }
.keyword-box:focus-within { border-color: var(--arc); }
.kw { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 9px; border-radius: 13px; background: var(--raised); font-size: 13px; }
.kw button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; }
.keyword-box input { flex: 1; min-width: 140px; border: 0; background: transparent; outline: none; padding: 3px 4px; }

.problems { margin: 0 0 14px; padding: 10px 12px 10px 30px; border-radius: var(--r-md); background: var(--danger-soft); color: var(--text); }
.problems li { margin: 2px 0; }

/* sticky action bar */
.action-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 22px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.save-state { font-size: 13px; color: var(--muted); margin-right: auto; display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; }
.save-state .label, .save-state .last-editor { overflow: hidden; text-overflow: ellipsis; }
.save-state .dot { flex: none; }
.action-bar { flex-wrap: nowrap; }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.save-state.saved .dot { background: var(--ok); }
.save-state.saving .dot { background: var(--amber); }
.save-state.error .dot { background: var(--danger); }

.menu { position: relative; }
.menu-list {
  position: absolute; bottom: calc(100% + 6px); right: 0; min-width: 250px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); z-index: 20;
}
.menu-list.down { bottom: auto; top: calc(100% + 6px); }
.menu-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 5px; cursor: pointer; }
.menu-list button small { display: block; color: var(--faint); font-size: 12px; }
.menu-list button:hover:not(:disabled) { background: var(--raised); }
.menu-list button:disabled { opacity: 0.4; cursor: not-allowed; }
.menu-list hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.menu-list .danger { color: var(--danger); }

/* ---------- discord preview ---------- */
.pv-label { font: 600 13px/1.2 var(--display); color: var(--muted); margin: 0 0 8px; letter-spacing: 0.02em; }
.pv-section + .pv-section { margin-top: 22px; }
.dc { background: #313338; color: #dbdee1; border-radius: 8px; font: 15px/1.375 "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif; }
.dc-card { display: flex; gap: 12px; padding: 12px; }
.dc-card-main { flex: 1; min-width: 0; }
.dc-card-title { font-weight: 600; color: #f2f3f5; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.dc-tag { background: #404249; color: #dbdee1; border-radius: 4px; font-size: 12px; padding: 0 6px; line-height: 18px; }
.dc-snippet { font-size: 14px; color: #b5bac1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-thumb { width: 88px; height: 88px; border-radius: 8px; flex: none; background: #1e1f22 center/cover no-repeat; }
.dc-post { padding: 14px; }
.dc-post-title { font-weight: 700; color: #f2f3f5; font-size: 20px; margin-bottom: 8px; }
.dc-body { word-wrap: break-word; }
.dc-body h1 { font-size: 24px; margin: 8px 0 4px; color: #f2f3f5; }
.dc-body h2 { font-size: 20px; margin: 8px 0 4px; color: #f2f3f5; }
.dc-body h3 { font-size: 16px; margin: 8px 0 4px; color: #f2f3f5; }
.dc-body .sub { font-size: 12px; color: #949ba4; }
.dc-body blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid #4e5058; }
.dc-body code { background: #2b2d31; border-radius: 3px; padding: 0 3px; font-family: var(--mono); font-size: 0.875em; }
.dc-body pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 7px; white-space: pre-wrap; margin: 4px 0; }
.dc-body pre code { background: none; padding: 0; }
.dc-body ul, .dc-body ol { margin: 2px 0; padding-left: 22px; }
.dc-body a { color: #00a8fc; text-decoration: none; }
.dc-body .mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.dc-body .spoiler { background: #1e1f22; color: transparent; border-radius: 3px; }
.dc-body .spoiler:hover { color: inherit; }
.dc-media { display: grid; gap: 4px; margin-top: 8px; grid-template-columns: 1fr 1fr; }
.dc-media img { width: 100%; border-radius: 6px; display: block; object-fit: cover; max-height: 260px; }
.dc-media img:first-child { grid-column: 1 / -1; }
.dc-file { margin-top: 6px; background: #2b2d31; border: 1px solid #1e1f22; border-radius: 6px; padding: 8px 10px; font-size: 13px; color: #00a8fc; }
.inline-preview { display: none; margin-top: 28px; }

/* ---------- dialogs ---------- */
dialog {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--text);
  padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
dialog::backdrop { background: rgba(8, 10, 13, 0.62); }
.dlg-head { padding: 16px 18px 0; }
.dlg-head h2 { margin: 0; font: 600 19px/1.25 var(--display); }
.dlg-body { padding: 12px 18px; color: var(--muted); display: grid; gap: 12px; }
.dlg-body p { margin: 0; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; }
.radio-group { display: grid; gap: 6px; }
.radio-group label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.radio-group label:has(input:checked) { border-color: var(--arc); background: var(--arc-soft); }
.radio-group input { accent-color: var(--arc); margin-top: 3px; }
.radio-group strong { color: var(--text); display: block; font-weight: 600; }

/* cover editor */
dialog.cover-dlg { width: min(1100px, calc(100vw - 24px)); }
.cover-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; padding: 14px 18px; }
@media (max-width: 800px) { .cover-grid { grid-template-columns: 1fr; } }
.stage-wrap { background: var(--sunken); border-radius: var(--r-md); display: grid; place-items: center; padding: 10px; min-height: 280px; }
.stage { position: relative; max-width: 100%; touch-action: none; cursor: grab; }
.stage:active { cursor: grabbing; }
.stage canvas { display: block; max-width: 100%; max-height: 62vh; border-radius: 4px; }
.stage .guide { position: absolute; top: 0; bottom: 0; border: 1.5px dashed rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35); pointer-events: none; border-radius: 6px; }
.stage .guide span { position: absolute; top: 6px; left: 6px; font-size: 11px; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 1px 6px; border-radius: 3px; }
.controls { display: grid; gap: 14px; align-content: start; color: var(--muted); }
.controls h4 { margin: 0 0 6px; font: 600 13px/1.2 var(--display); color: var(--text); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { height: 28px; padding: 0 9px; border-radius: 5px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; font-size: 12.5px; }
.seg button[aria-pressed="true"] { border-color: var(--arc); background: var(--arc-soft); color: var(--text); }
input[type="range"] { width: 100%; accent-color: var(--arc); }
input[type="color"] { width: 38px; height: 28px; border: 1px solid var(--line); border-radius: 4px; background: none; padding: 1px; }
.row { display: flex; gap: 8px; align-items: center; }

/* tags manager */
.tag-rows { display: grid; gap: 6px; max-height: 50vh; overflow: auto; padding-right: 4px; }
.tag-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.tag-row .input { height: 32px; padding: 4px 8px; }
.tag-row .emoji { text-align: center; }

/* toasts */
.toasts { position: fixed; right: 14px; bottom: 70px; display: grid; gap: 8px; z-index: 100; width: min(380px, calc(100vw - 28px)); }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: var(--r-md); padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.toast.bad { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--amber); }
.toast .t-title { font-weight: 600; }
.toast .t-text { color: var(--muted); font-size: 13px; }
.progress { height: 4px; background: var(--sunken); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.progress div { height: 100%; background: var(--grad); width: 0; transition: width 0.2s; }

/* ---------- login ---------- */
.login-page {
  display: grid; align-items: center; min-height: 100vh; padding: 20px 6vw;
  background: linear-gradient(90deg, rgba(8, 8, 10, 0.94) 0%, rgba(8, 8, 10, 0.7) 45%, rgba(8, 8, 10, 0.25) 100%), url("/assets/art-drift.jpg") center / cover no-repeat #000;
  color-scheme: dark; color: #f1efed;
}
.login-card { width: min(380px, 100%); padding: 8px 0; }
.login-logo { width: 190px; height: auto; display: block; margin: 0 0 10px -6px; }
.wordmark { margin: 0 0 6px; font: 700 15px/1.2 var(--brand); letter-spacing: 0.32em; text-transform: uppercase; }
.login-card .lead { color: #b9b8bf; margin: 0 0 22px; }
.login-card form { display: grid; gap: 10px; }
.login-card .input { background: rgba(10, 10, 12, 0.8); border-color: #3a3a41; color: #f1efed; }
.login-card .or { text-align: center; color: #8b8a93; font-size: 12.5px; margin: 14px 0; }
.login-stamp { display: block; width: 120px; height: auto; margin-top: 34px; opacity: 0.75; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; justify-content: center; height: 40px; width: 100%; font-weight: 600; }
.login-error { color: #ffb08a; margin: 0 0 12px; font-size: 13.5px; }
.login-card .btn.primary { justify-content: center; height: 40px; }

.mt-8 { margin-top: 8px; }
.block { display: block; }
.hint { color: var(--faint); font-size: 12.5px; }

/* templates */
.tpl-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; }
.tpl-switch button { height: 30px; padding: 0 12px; border: 0; border-radius: 5px; background: none; cursor: pointer; color: var(--muted); font-weight: 500; }
.tpl-switch button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tpl-block { margin-bottom: 18px; }
.tpl-label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font: 600 13.5px/1.2 var(--display); letter-spacing: 0.04em; }
.tpl-label .hint { font: 400 12.5px var(--body); letter-spacing: 0; }
.tpl-label code { font-family: var(--mono); font-size: 12px; color: var(--faint); font-weight: 400; letter-spacing: 0; }
.textarea.desc { min-height: 150px; }
.lines { display: grid; gap: 4px; border-left: 3px solid var(--line); padding-left: 10px; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.line-row .input { height: 32px; padding: 4px 9px; }
.line-row.skin { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; }
.line-row.skin.with-author { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.6fr) auto; }
.dl-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.dl-row .dl-note { grid-column: 2 / 4; }
.track-stats { gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.track-stats label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.track-stats .input { width: 80px; }
.ai-box { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--arc) 5%, transparent); }
.ai-box > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; font-size: 13px; color: var(--arc); }
.ai-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.ai-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.ai-row label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.ai-name { flex: 1 1 200px; } .ai-year .input { width: 90px; } .ai-prov .select { min-width: 160px; }
.ai-manual { border-top: 1px dashed var(--line); padding-top: 8px; font-size: 13px; }
.ai-manual-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 4px; }
.ai-manual ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ai-manual li span { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; background: var(--panel-2, rgba(255,255,255,.04)); padding: 2px 6px; border-radius: 6px; }

.line-add { justify-self: start; margin-top: 4px; }
.review-list { margin: 4px 0 0; padding-left: 18px; }
.review-list li { margin: 1px 0; }
.badge.review { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.badge.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.kept { color: var(--text); }
.badge.test { color: var(--ok); }
.textarea.download { min-height: 64px; }
.last-editor { font-size: 12px; color: var(--faint); }
.dc-second { margin-top: 6px; padding: 10px 14px; }

.ratio-note p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.post-thumb { width: 72px; height: 48px; }
.post-item { grid-template-columns: 72px minmax(0, 1fr); }
/* forum gallery card preview (3:2 image on top, like the repo's gallery layout) */
.dc-gallery { width: 100%; max-width: 260px; overflow: hidden; }
.dc-gallery .dc-gimg { aspect-ratio: 3 / 2; background: #1e1f22 center / cover no-repeat; }
.dc-gallery .dc-gbody { padding: 8px 10px 10px; }
.dc-gallery .dc-gauthor { font-size: 11px; color: #949ba4; }

/* ---------- section tabs ---------- */
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--sunken); border-radius: var(--r-md); border: 1px solid var(--line-soft); }
.tabs button { height: 28px; padding: 0 12px; border: 0; background: none; color: var(--muted); border-radius: 5px; cursor: pointer; font-weight: 600; font-size: 13px; }
.tabs button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 -2px 0 var(--arc); }
.posts-tools { display: flex; align-items: center; gap: 10px; }
.posts-tools[hidden] { display: none !important; }

/* ---------- mod list ---------- */
.modlist { height: calc(100vh - 52px); overflow: auto; }
.ml-inner { max-width: 1180px; margin: 0 auto; padding: 22px 22px 80px; }
.ml-add { display: flex; gap: 8px; margin-bottom: 14px; }
.ml-add .input { height: 44px; font-size: 15px; padding: 0 14px; }
.ml-add .btn { height: 44px; padding: 0 20px; }
.ml-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ml-toolbar .input { width: 260px; height: 32px; padding: 0 10px; }
.ml-toolbar .select { width: auto; height: 32px; padding-top: 0; padding-bottom: 0; }
a.btn { text-decoration: none; color: inherit; }
.ml-summary { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.ml-empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.ml-empty h2 { font: 600 20px/1.2 var(--display); color: var(--text); margin: 0 0 6px; }

.ml-inbox { border: 1px solid color-mix(in srgb, var(--arc) 40%, var(--line)); background: linear-gradient(180deg, var(--arc-soft), transparent 80px), var(--panel); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 18px; }
.ml-ihead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ml-ihead h2 { margin: 0; font: 600 17px/1.2 var(--display); }
.ml-ilist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.ml-ilist li { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--r-md); background: var(--sunken); }
.ml-imain { flex: 1; min-width: 0; }
.ml-iurl { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ml-imeta { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-imeta a { color: var(--muted); }

.ml-group { border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--panel); margin-bottom: 8px; }
.ml-group.open { border-color: var(--line); }
.ml-ghead { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; }
.ml-toggle { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 9px 10px; border: 0; background: none; cursor: pointer; text-align: left; border-radius: var(--r-md); }
.ml-toggle:hover { background: var(--raised); }
.ml-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(-45deg); transition: transform 0.15s; flex: none; }
.ml-group.open .ml-toggle::before { transform: rotate(45deg); }
.ml-cname { font: 600 16px/1.2 var(--display); letter-spacing: 0.01em; }
.ml-cmeta { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.ml-bar { margin-left: auto; width: 90px; height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; flex: none; }
.ml-bar span { display: block; height: 100%; width: var(--p, 0); background: var(--grad); }

.ml-table { padding: 0 10px 10px; overflow-x: auto; }
.ml-row { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, 92px) 118px minmax(140px, 1.2fr) 36px; gap: 6px; align-items: center; padding: 5px 4px; border-top: 1px solid var(--line-soft); min-width: 860px; }
.ml-headrow { border-top: 0; font-size: 11.5px; color: var(--faint); font-weight: 600; letter-spacing: 0.02em; }
.ml-chk-h { text-align: center; }
.ml-mod { display: flex; flex-direction: column; min-width: 0; }
.ml-name, .ml-notes { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 5px; padding: 3px 6px; outline: none; }
.ml-name { font-weight: 600; }
.ml-name:hover, .ml-notes:hover { border-color: var(--line); }
.ml-name:focus, .ml-notes:focus { border-color: var(--arc); background: var(--sunken); }
.ml-notes::placeholder { color: var(--faint); }
.ml-link { font-size: 12px; color: var(--muted); padding: 0 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-link.none { color: var(--faint); }
.ml-chk { display: grid; place-items: center; cursor: pointer; height: 30px; border-radius: 5px; }
.ml-chk:hover { background: var(--raised); }
.ml-chk input { width: 18px; height: 18px; accent-color: var(--arc-strong); cursor: pointer; }
.ml-chk.gate input { accent-color: var(--ok); }
.ml-chk input:disabled { cursor: default; opacity: 0.85; }
.ml-row .menu-list { right: 0; }

.wide-dlg { width: min(760px, calc(100vw - 24px)); }
.ml-cinfo { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ml-cinfo a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-creator-pick { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
.ml-creator-pick legend { padding: 0; margin-bottom: 6px; }
.radio-group label.warn { border-color: var(--amber); background: var(--amber-soft); }
.radio-group label > span { flex: 1; min-width: 0; }
.dlg-body p.banner { margin: 0; }
.ml-import-table { max-height: 52vh; overflow: auto; display: grid; gap: 4px; }
.ml-irow { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr); gap: 6px; align-items: center; }
.ml-irow .input { height: 30px; padding: 3px 8px; }
.ml-irow input[type="checkbox"] { accent-color: var(--arc-strong); }
.ml-irow-head { font-size: 11.5px; color: var(--faint); font-weight: 600; position: sticky; top: 0; background: var(--panel); padding-bottom: 4px; }
.ml-irow.warn .input[data-creator] { border-color: var(--amber); }
.ml-ititle { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .tabs button { padding: 0 8px; }
  .ml-inner { padding: 14px 12px 60px; }
  .ml-toolbar .input { width: 100%; }
}

/* ---------- section toggle: Cars / Tracks / Other ---------- */
.sections { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--sunken); }
.sections button { height: 30px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 700 13px/1 var(--brand); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.sections button:hover { color: var(--text); }
.sections button[aria-pressed="true"] { background: var(--grad); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); }
.sections button[hidden] { display: none; }

/* ---------- post status ---------- */
.status { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-live { background: var(--live-soft); color: var(--live); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 55%, transparent); }
.status-live::before { box-shadow: 0 0 6px var(--live); }
.status-test { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent); }
.status-draft { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.status-draft::before { background: transparent; border: 1.5px dashed var(--muted); width: 5px; height: 5px; }
.status-pending { background: var(--amber); color: #2a1c00; }
.status-pending::before { background: #2a1c00; }
.status-deleted { background: var(--danger-soft); color: var(--danger); }
.status-offline { background: rgba(148, 155, 164, 0.16); color: #c4c9d0; }
.status-offline::before { background: #949ba4; }
.status.big { height: 26px; padding: 0 12px; font-size: 13px; border-radius: 13px; }
.post-status { display: flex; gap: 4px; margin-bottom: 3px; }
.post-body { min-width: 0; }
.post-item.st-deleted { opacity: 0.8; }
.ed-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line-soft); }
.ed-status.st-live { border-color: color-mix(in srgb, var(--live) 40%, var(--line)); background: linear-gradient(90deg, var(--live-soft), transparent 60%), var(--panel); }
.ed-status.st-test { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.ed-status-hint { color: var(--muted); font-size: 13px; }
.ed-status .status-pending { margin-left: auto; }

/* ---------- 3:2 notice ---------- */
.ratio-callout { display: flex; gap: 14px; align-items: center; margin: 12px 18px 0; padding: 12px 14px; border-radius: var(--r-md); background: linear-gradient(90deg, rgba(255, 29, 76, 0.2), rgba(243, 154, 130, 0.08)); border: 1px solid rgba(255, 79, 110, 0.55); color: var(--text); }
.ratio-callout strong { color: #fff; }
.ratio-badge { flex: none; display: grid; place-items: center; width: 64px; height: 43px; border: 2px solid var(--arc); border-radius: 6px; font: 800 17px/1 var(--brand); letter-spacing: 0.04em; color: var(--arc); background: rgba(0, 0, 0, 0.35); }
.ratio-chip { font: 700 11px/1 var(--brand); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--grad); padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
@media (prefers-color-scheme: light) { .ratio-callout strong { color: var(--text); } }

/* ---------- track + versions ---------- */
.site-input { max-width: 170px; }
.versions { display: grid; gap: 6px; }
.version-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) minmax(0, 1.3fr) 32px; gap: 6px; align-items: center; }
.version-row .input { height: 34px; }
.v-thumb { width: 84px; aspect-ratio: 3 / 2; border: 1.5px dashed var(--line); border-radius: 6px; background: var(--sunken); color: var(--muted); cursor: pointer; padding: 0; overflow: hidden; font-size: 12px; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-thumb:hover { border-color: var(--arc); }
.v-thumb.small { width: 60px; }

/* ---------- GIF maker ---------- */
dialog.gif-dlg { width: min(1100px, calc(100vw - 24px)); }
.gif-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; padding: 12px 18px; }
@media (max-width: 860px) { .gif-grid { grid-template-columns: 1fr; } }
.gif-frames { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 56vh; overflow: auto; }
.gif-frames li { display: grid; grid-template-columns: 24px 96px minmax(0, 1fr) 30px 30px; gap: 8px; align-items: center; padding: 6px; border-radius: var(--r-md); background: var(--sunken); }
.gif-frames img { width: 96px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; display: block; }
.gif-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gif-result { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
#gif-interval-out { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- spreadsheet extras ---------- */
.ml-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 6px; }
.ml-sub .ml-link { padding: 0; }
.ml-more { border: 0; background: none; color: var(--faint); font-size: 12px; cursor: pointer; padding: 0; text-decoration: underline dotted; }
.ml-more:hover, .ml-row.open .ml-more { color: var(--arc); }
.badge.paid { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.ml-row.rejected .ml-name { color: var(--faint); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 70%, transparent); }
.ml-row.rejected { opacity: 0.72; }
.ml-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; padding: 12px 14px 14px; margin: 0 4px 8px; background: var(--sunken); border-radius: var(--r-md); border: 1px solid var(--line-soft); min-width: 840px; }
.ml-dcol h4 { margin: 0 0 8px; font: 600 13.5px/1.2 var(--display); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ml-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ml-pics figure { position: relative; margin: 0; aspect-ratio: 3 / 2; border-radius: 5px; overflow: hidden; background: var(--panel); }
.ml-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-pics figcaption { position: absolute; left: 4px; top: 4px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: var(--grad); color: #fff; }
.ml-pic-btn { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 4px; background: rgba(0, 0, 0, 0.7); color: #fff; cursor: pointer; font-size: 11px; }
.ml-pic-btn[data-pcover] { right: 30px; }
.ml-pic-add { aspect-ratio: 3 / 2; border: 1.5px dashed var(--line); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.ml-pic-add:hover { border-color: var(--arc); color: var(--text); }
.ml-locked { color: var(--faint); font-size: 13px; margin: 0; padding: 14px; border: 1.5px dashed var(--line); border-radius: 6px; text-align: center; }
.ml-links { display: grid; gap: 4px; margin-bottom: 6px; }
.ml-lrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 30px; gap: 4px; align-items: center; }
.ml-lrow.pic { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1.3fr) 30px; }
.ml-lrow .input { height: 30px; padding: 3px 8px; }
.select.narrow { width: auto; }
.ml-sheet-blocks { display: grid; gap: 4px; max-height: 56vh; overflow: auto; padding-right: 4px; }
.ml-sblock { border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--sunken); }
.ml-sblock.warn { border-color: var(--amber); }
.ml-sblock summary { display: grid; grid-template-columns: 20px 14px minmax(140px, 220px) 70px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; cursor: pointer; list-style: none; }
.ml-sblock summary::-webkit-details-marker { display: none; }
.ml-sblock summary .input { height: 30px; padding: 3px 8px; }
.ml-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); }
.ml-scount { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ml-ssample { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-srows { padding: 4px 10px 10px 50px; display: grid; gap: 3px; }
.ml-srow { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr); gap: 8px; align-items: center; font-size: 12.5px; }
.ml-srow .input { height: 26px; padding: 2px 6px; font-size: 12.5px; }
.ml-sverdict { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- very wide screens ---------- */
@media (min-width: 2200px) {
  .ml-inner { max-width: 2000px; }
  .ml-row { grid-template-columns: minmax(320px, 2.2fr) repeat(3, 110px) 130px minmax(200px, 1.6fr) 40px; }
  .post-thumb { width: 96px; height: 64px; }
  .post-item { grid-template-columns: 96px minmax(0, 1fr); }
  .dc-gallery { max-width: 340px; }
}
@media (max-width: 1100px) { .sections button { padding: 0 10px; letter-spacing: 0.06em; } .brand-name, .brand small { display: none; } }
.tabs button, .sync-state, .user, .sections button { white-space: nowrap; }
@media (max-width: 1700px) { .brand small { display: none; } }
@media (max-width: 1500px) { .brand-name { display: none; } .sync-state { display: none; } .topbar .select { min-width: 150px; } }

.ml-srow.dup { background: color-mix(in srgb, var(--amber) 10%, transparent); border-radius: 6px; padding: 2px 4px; }
.ml-sdup { display: block; color: var(--amber); font-size: 11.5px; }
.ml-dupe-note { color: var(--amber); font-weight: 600; }
.badge.warn { color: var(--amber); background: var(--amber-soft); border-color: transparent; }

/* ---------- Discord-accurate preview (dark theme values from the Discord client) ---------- */
.preview-pane { padding: 16px 18px; }
.dcx { --dc-bg: #313338; --dc-bg2: #2b2d31; --dc-bg3: #1e1f22; --dc-text: #dbdee1; --dc-head: #f2f3f5; --dc-muted: #949ba4; --dc-link: #00a8fc; --dc-line: #3f4147;
  background: var(--dc-bg); color: var(--dc-text); border-radius: 8px; font: 400 15px/1.375 "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; overflow-wrap: anywhere; }
.dcx-faint { color: var(--dc-muted); font-size: 12px; }
.dcx-name { color: #f2f3f5; font-weight: 500; }
.dcx-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; background: rgba(17, 18, 20, 0.82); color: #dbdee1; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dcx-tag-emoji { font-size: 13px; }
.dcx-gif { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, 0.62); color: #fff; font: 700 11px/1 "gg sans", Arial, sans-serif; padding: 3px 5px; border-radius: 4px; }
img.broken { visibility: hidden; }

/* gallery card: author + time, title, 3:2 cover with tags on it, message count */
.dcx-card { width: 100%; max-width: 330px; padding: 12px; background: #2b2d31; border: 1px solid #1e1f22; display: grid; gap: 6px; }
.dcx-card-meta { display: flex; gap: 6px; align-items: baseline; font-size: 12px; }
.dcx-card-meta .dcx-name { color: var(--arc); font-weight: 600; }
.dcx-card-title { color: var(--dc-head); font-weight: 700; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dcx-card-media { position: relative; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--dc-bg3); }
.dcx-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcx-card-media.empty { display: grid; place-items: center; color: var(--dc-muted); font-size: 12px; aspect-ratio: auto; min-height: 44px; }
.dcx-card-tags { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.dcx-card-snippet { color: #b5bac1; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dcx-card-foot { display: flex; justify-content: space-between; color: var(--dc-muted); font-size: 13px; font-weight: 600; }
.dcx-count { display: inline-flex; gap: 5px; align-items: center; }

/* opened post: icon, big title, tags, date divider, message */
.dcx-thread { padding: 16px 16px 12px; }
.dcx-thread-icon { width: 56px; height: 56px; border-radius: 50%; background: #41434a; display: grid; place-items: center; color: #fff; }
.dcx-thread-icon svg { width: 28px; height: 28px; }
.dcx-thread-title { font: 700 24px/1.25 "gg sans", "Noto Sans", Arial, sans-serif; color: var(--dc-head); margin: 10px 0 8px; }
.dcx-thread-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dcx-thread-tags .dcx-tag { background: #41434a; }
.dcx-divider { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; color: var(--dc-muted); font-size: 12px; font-weight: 600; }
.dcx-divider::before, .dcx-divider::after { content: ""; flex: 1; border-top: 1px solid var(--dc-line); }
.dcx-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; padding: 2px 0; }
.dcx-msg.follow { margin-top: 10px; }
.dcx-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #5865f2; }
.dcx-avatar.letter { display: grid; place-items: center; color: #fff; font-weight: 700; }
.dcx-msg-head { display: flex; align-items: center; gap: 6px; line-height: 22px; }
.dcx-msg-head .dcx-name { color: var(--arc); font-weight: 500; font-size: 16px; }
.dcx-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 3px; line-height: 15px; }
.dcx-time { color: var(--dc-muted); font-size: 12px; }
.dcx-reactbar { display: flex; gap: 8px; margin: 10px 0 0 54px; }
.dcx-pill { background: #2b2d31; color: #b5bac1; border-radius: 8px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.dcx-pill.right { margin-left: auto; }

/* message text in Discord's sizes */
.dcx-md { white-space: normal; }
.dcx-md .line { min-height: 1.375em; }
.dcx-md .blank { height: 1.375em; }
.dcx-md h1, .dcx-md h2, .dcx-md h3 { color: var(--dc-head); font-weight: 700; line-height: 1.375; margin: 8px 0 0; }
.dcx-md h1 { font-size: 24px; margin-top: 16px; }
.dcx-md h2 { font-size: 20px; margin-top: 16px; }
.dcx-md h3 { font-size: 16px; }
.dcx-md > :first-child { margin-top: 0; }
.dcx-md .sub { font-size: 13px; color: var(--dc-muted); line-height: 1.11rem; }
.dcx-md .sub a { color: var(--dc-link); }
.dcx-md blockquote { margin: 0; padding: 0 8px 0 12px; position: relative; }
.dcx-md blockquote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px; background: #4e5058; }
.dcx-md ul, .dcx-md ol { margin: 4px 0 0 16px; padding: 0; }
.dcx-md ul { list-style: disc; } .dcx-md ul ul { list-style: circle; }
.dcx-md li { margin-bottom: 4px; }
.dcx-md li::marker { color: var(--dc-text); }
.dcx-md a { color: var(--dc-link); text-decoration: none; }
.dcx-md a:hover { text-decoration: underline; }
.dcx-md strong { font-weight: 700; }
.dcx-md code { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 0 .2em; font: .85em/1.125rem Consolas, "Andale Mono WT", monospace; }
.dcx-md pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: .5em; margin: 6px 0 0; white-space: pre-wrap; }
.dcx-md pre code { border: 0; padding: 0; background: none; }
.dcx-md .mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dcx-md .timestamp { background: rgba(78, 80, 88, 0.48); border-radius: 3px; padding: 0 2px; }
.dcx-md .spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.dcx-md .spoiler:hover { background: rgba(255, 255, 255, 0.1); color: inherit; }
.dcx-md .emoji { width: 1.375em; height: 1.375em; vertical-align: bottom; object-fit: contain; }

/* attachments */
.dcx-mosaic { display: grid; gap: 4px; margin-top: 8px; max-width: 550px; border-radius: 8px; overflow: hidden; }
.dcx-tile { position: relative; background: var(--dc-bg3); min-height: 0; }
.dcx-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcx-mosaic.m1 .dcx-tile img { height: auto; max-height: 350px; object-fit: contain; object-position: left; }
.dcx-mosaic.m1 { border-radius: 8px; width: fit-content; }
.dcx-mosaic.m2 { grid-template-columns: 1fr 1fr; } .dcx-mosaic.m2 .dcx-tile { aspect-ratio: 1; }
.dcx-mosaic.m3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 3 / 2; }
.dcx-mosaic.m3 .dcx-tile:first-child { grid-row: 1 / 3; }
.dcx-mosaic.m4 { grid-template-columns: 1fr 1fr; } .dcx-mosaic.m4 .dcx-tile { aspect-ratio: 3 / 2; }
.dcx-mosaic.mn { grid-template-columns: repeat(3, 1fr); } .dcx-mosaic.mn .dcx-tile { aspect-ratio: 1; }
.dcx-file { display: flex; gap: 10px; align-items: center; margin-top: 8px; max-width: 430px; padding: 10px; background: #2b2d31; border: 1px solid #1e1f22; border-radius: 8px; }
.dcx-file-icon { width: 24px; height: 30px; border-radius: 3px; background: linear-gradient(135deg, #b5bac1 0 70%, #949ba4 70%); flex: none; }
.dcx-file-name { display: block; color: var(--dc-link); font-size: 15px; }
.dcx-embed { margin-top: 8px; max-width: 432px; background: #2b2d31; border-left: 4px solid #1e1f22; border-radius: 4px; padding: 8px 16px 12px 12px; display: grid; gap: 4px; }
.dcx-embed-site { color: #dbdee1; font-size: 12px; }
.dcx-embed-title { color: var(--dc-link); font-weight: 600; font-size: 15px; }
.dcx-embed-note { color: var(--dc-muted); font-size: 13px; font-style: italic; }
@media (min-width: 2200px) { .dcx-card { max-width: 360px; } }

.ml-row.flash { animation: rowflash 2s ease-out; }
@keyframes rowflash { 0%, 40% { background: color-mix(in srgb, var(--arc) 22%, transparent); } 100% { background: transparent; } }

/* skins under a car in the spreadsheet */
.ml-skin-toggle { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0 2px; color: var(--muted); font-size: 12px; cursor: pointer; }
.ml-skin-toggle:hover { color: var(--text); }
.ml-skin-toggle .caret { width: 0; height: 0; border-left: 4px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; }
.ml-skin-toggle[aria-expanded="true"] .caret { transform: rotate(90deg); }
.ml-skins { list-style: none; margin: -2px 0 6px; padding: 2px 0 4px 34px; display: grid; gap: 2px; font-size: 12.5px; }
.ml-skins li { display: flex; align-items: center; gap: 8px; min-height: 24px; padding-left: 12px; border-left: 1px solid var(--line); }
.ml-skin-name { color: var(--text); }
.ml-skin-by { color: var(--muted); }
.ml-skin-del { margin-left: auto; background: none; border: 0; color: var(--faint, var(--muted)); cursor: pointer; opacity: 0; padding: 0 6px; }
.ml-skins li:hover .ml-skin-del, .ml-skin-del:focus-visible { opacity: 1; }
.ml-skin-add form { flex: 1; max-width: 420px; }
.ml-skin-add .input { height: 26px; font-size: 12.5px; padding: 2px 8px; }

/* cover dialog: Image / GIF switch and a small 3:2 note */
.cover-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cover-mode { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--sunken); }
.cover-mode button { height: 28px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 700 12px/1 var(--brand); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.cover-mode button:hover:not(:disabled) { color: var(--text); }
.cover-mode button[aria-selected="true"] { background: var(--grad); color: #fff; }
.cover-mode button:disabled { opacity: .4; cursor: not-allowed; }
.ratio-note { margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.ratio-note .ratio-badge { width: 30px; height: 20px; font-size: 10px; border-width: 1.5px; border-radius: 3px; }
#cover-dlg .dlg-foot { align-items: center; }
.cover-foot-info { margin-right: auto; }
#gif-panel[hidden], #cover-image-panel[hidden] { display: none; }

/* forum list grouped by creator */
.creator-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 4px; font: 700 12px/1.2 var(--brand); letter-spacing: .06em; color: var(--creator, var(--text)); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.creator-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--creator, var(--muted)); flex: none; }
.creator-count { color: var(--muted); font-weight: 600; letter-spacing: 0; }
.post-item.in-group { background: color-mix(in srgb, var(--creator, transparent) 9%, transparent); border-color: color-mix(in srgb, var(--creator, transparent) 28%, transparent); }
.post-item.in-group:hover { background: color-mix(in srgb, var(--creator, transparent) 16%, transparent); }
.post-item.in-group.active { background: color-mix(in srgb, var(--creator, transparent) 22%, transparent); border-color: var(--creator); }

/* GIF tab */
.gif-source { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--sunken); width: fit-content; margin-bottom: 10px; }
.gif-source button { height: 28px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 13px/1 var(--body); cursor: pointer; }
.gif-source button[aria-selected="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--arc); }
.gif-frames li { display: grid; grid-template-columns: auto 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.gif-frames li > img, .gif-frames .v-thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; }
.gif-vfields { display: grid; gap: 4px; }
.gif-vfields .input { height: 28px; font-size: 13px; }
.gif-move { display: flex; gap: 2px; }
.gif-drop { display: grid; place-items: center; min-height: 180px; border: 1.5px dashed var(--line); border-radius: 10px; padding: 12px; text-align: center; color: var(--muted); cursor: pointer; gap: 8px; }
.gif-drop:hover, .gif-drop.over { border-color: var(--arc); color: var(--text); }
.gif-drop img { max-width: 100%; max-height: 260px; border-radius: 6px; }
.gif-clip-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 8px; font-size: 13px; }
.gif-clip-controls label { display: flex; align-items: center; gap: 6px; }
.gif-clip-controls .input.narrow { width: 80px; height: 28px; }
.gif-adv { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.gif-adv summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.gif-adv label { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.gif-adv input[type=range] { flex: 1; }
#gif-result { max-width: 100%; border-radius: 6px; margin-top: 6px; }
.versions-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.v-chips li { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
.v-chips img { width: 30px; height: 20px; object-fit: cover; border-radius: 999px; }

/* spreadsheet: floating menus, cover cell, status markers */
.menu-list.floating { position: fixed; bottom: auto; right: auto; z-index: 1000; max-height: calc(100vh - 16px); overflow: auto; }
.ml-st { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ml-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ml-st.posted { color: var(--live); background: var(--live-soft); }
.ml-st.posted::before { box-shadow: 0 0 5px var(--live); }
.ml-st.ready { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.ml-st.needcover { color: var(--amber); background: var(--amber-soft); }
.ml-st.todo { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.ml-st.rejected { color: var(--danger); background: var(--danger-soft); }
.ml-counts { display: inline-flex; gap: 4px; margin-left: 4px; }
.ml-counts .ml-st { height: 17px; padding: 0 6px; }
.ml-cover { display: flex; align-items: center; gap: 4px; min-height: 40px; position: relative; }
.ml-cover-add { height: 28px; padding: 0 9px; border: 1px dashed var(--line); border-radius: 7px; background: none; color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap; }
.ml-cover-add:hover, .ml-row.drop-over .ml-cover-add { border-color: var(--arc); color: var(--text); }
.ml-cover-add.marked { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); }
.ml-cover-thumb { position: relative; width: 60px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--sunken); cursor: pointer; flex: none; }
.ml-cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-gif { position: absolute; left: 3px; bottom: 3px; font-size: 9px; font-weight: 700; padding: 1px 3px; border-radius: 3px; background: rgba(0, 0, 0, .65); color: #fff; }
.ml-cover-warn { position: absolute; left: 0; top: -6px; font-size: 9.5px; font-weight: 700; color: var(--amber); background: var(--panel); padding: 0 3px; border-radius: 3px; }
.ml-cover-del { background: none; border: 0; color: var(--muted); cursor: pointer; opacity: 0; padding: 2px 4px; }
.ml-cover:hover .ml-cover-del, .ml-cover-del:focus-visible { opacity: 1; }
.ml-row.drop-over { background: color-mix(in srgb, var(--arc) 10%, transparent); outline: 1px dashed var(--arc); outline-offset: -1px; }
.ml-row.st-ready { background: color-mix(in srgb, var(--ok) 5%, transparent); }
.btn.ready { background: color-mix(in srgb, var(--ok) 18%, transparent); border-color: var(--ok); color: var(--ok); font-weight: 700; }
.btn.ready:hover { background: color-mix(in srgb, var(--ok) 28%, transparent); }
.ml-row { grid-template-columns: minmax(220px, 2fr) 92px 104px 92px 118px minmax(140px, 1.2fr) 36px; }
@media (min-width: 2200px) { .ml-row { grid-template-columns: minmax(320px, 2.2fr) 110px 120px 110px 130px minmax(200px, 1.6fr) 40px; } }
.ml-cover { justify-content: center; }
.ml-cover-inpost { font-size: 12px; color: var(--faint, var(--muted)); }
.ml-namerow { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ml-namerow .ml-name { flex: 1; min-width: 0; }
.ml-year { width: 92px; flex: none; font-weight: 600; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 5px; padding: 2px 4px; font: inherit; font-size: 13px; }
.ml-year:hover, .ml-year:focus { border-color: var(--line); color: var(--text); outline: none; }
.ml-year:placeholder-shown { width: 46px; }
.ml-year::placeholder { color: var(--faint, var(--muted)); font-weight: 400; }

/* title parts under the title */
.title-parts { display: grid; grid-template-columns: minmax(120px, 1fr) 150px minmax(180px, 2fr); gap: 8px; margin-top: 8px; }
.title-parts.track { grid-template-columns: minmax(120px, 1fr) minmax(180px, 2fr); }
.title-parts label { display: grid; gap: 3px; font-size: 11.5px; color: var(--muted); }
.title-parts label em { font-style: normal; color: var(--faint, var(--muted)); opacity: .8; }
.title-parts .input { height: 30px; font-size: 13.5px; }
.title-fit { margin: 4px 0 0; font-size: 12px; color: color-mix(in srgb, var(--amber) 80%, var(--muted)); }
.title-fit q { color: var(--text); quotes: "“" "”"; }
.ml-rejwarn { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: var(--danger); background: var(--danger-soft); white-space: nowrap; }
.ml-rejwarn.all { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.ml-group.all-rejected { opacity: .65; }
.ml-group.all-rejected:hover, .ml-group.all-rejected.open { opacity: 1; }
.ml-linkhint { margin: 6px 0; }

/* login extras */
.login-ok { color: var(--ok); margin: 0 0 12px; font-size: 13.5px; }
.login-label { display: block; font-size: 12.5px; color: #b9b8bf; margin: 4px 0 -4px; }
.login-card textarea.input { resize: vertical; min-height: 70px; padding: 8px 10px; font: inherit; }
.login-card .lead.small { font-size: 13px; margin-bottom: 4px; }
.linkish { background: none; border: 0; padding: 4px 0; color: #b9b8bf; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; font-size: 12.5px; justify-self: start; }
.linkish:hover { color: #fff; }
.welcome-who > div { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; }
.welcome-who img { border-radius: 50%; }
.welcome-who b { display: block; }
.welcome-who small { color: #8b8a93; }

/* ---------- team: user menu, review, members, account ---------- */
.user-chip { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; background: none; border: 1px solid transparent; border-radius: var(--r-md); padding: 3px 8px; cursor: pointer; color: var(--text); line-height: 1.15; }
.user-chip:hover, .user-chip[aria-expanded="true"] { border-color: var(--line); background: var(--raised); }
.user-chip .user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }
.menu.user .menu-list { right: 0; }
.menu.noperm, [data-noperm] { display: none !important; }
.review-btn .count:empty { display: none; }
.review-btn .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--raised); font-size: 11.5px; margin-left: 4px; }
.review-btn.has .count { background: var(--amber); color: #201400; }
.btn.ok-btn { border-color: var(--live); color: var(--live); }
.btn.ok-btn:hover:not(:disabled) { background: var(--live-soft); }
.banner.ok { background: var(--live-soft); border-color: transparent; }
.banner.wf { background: var(--amber-soft); border-color: transparent; }
.banner.modder { border-style: dashed; }
.banner blockquote { margin: 6px 0 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--text); white-space: pre-wrap; }
.banner a { color: var(--ok); }
.bad-text { color: var(--danger); }
.ok-text { color: var(--live); }
.warn-text { color: var(--amber); }
.danger-text { color: var(--danger) !important; }
.editor.read-only .ed-cols { opacity: 0.78; }

.team-dlg { width: min(520px, calc(100vw - 24px)); }
.team-dlg.wide { width: min(720px, calc(100vw - 24px)); }
.team-dlg .dlg-body { padding: 18px; gap: 12px; }
.team-dlg h2 { margin: 0; font: 600 19px/1.25 var(--display); color: var(--text); }
.team-dlg h3 { margin: 0 0 8px; font: 600 14px/1.2 var(--display); color: var(--text); letter-spacing: 0.03em; }
.dlg-intro { color: var(--muted); }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.dlg-actions .spacer { flex: 1; }
.team-dlg textarea.input { min-height: 64px; resize: vertical; padding: 8px 10px; font: inherit; }
.team-dlg .row { display: flex; gap: 8px; align-items: center; }
.team-dlg .row .input { flex: 1; }
.fld { display: grid; gap: 5px; margin: 0; }
.fld > span, .fld > legend { font-size: 12.5px; color: var(--muted); }
.fld em { font-style: normal; color: var(--faint); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
fieldset.setup { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 7px; }
fieldset.setup label { display: flex; gap: 8px; align-items: baseline; color: var(--text); cursor: pointer; }
fieldset.setup input[type=radio] { accent-color: var(--arc); }
.account .acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; padding: 10px 12px; background: var(--sunken); border-radius: var(--r-md); }
.acct-grid > div { display: grid; gap: 2px; }
.acct-grid .k, .secret-row .k { font-size: 11.5px; color: var(--faint); }
.acct-grid span:not(.k) { color: var(--text); }
.acct-sec { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.acct-sec p { color: var(--muted); }
.input.code { max-width: 140px; font-family: var(--mono); letter-spacing: 0.12em; }
code.secret { font-family: var(--mono); background: var(--sunken); padding: 3px 7px; border-radius: 4px; color: var(--text); user-select: all; }
code.secret.big { font-size: 17px; padding: 6px 10px; }
.secret-row { display: flex; gap: 10px; align-items: center; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.steps a { color: var(--ok); }
.review-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.review-queue button { width: 100%; text-align: left; display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); color: var(--text); cursor: pointer; }
.review-queue button:hover { border-color: var(--arc); }
.review-queue span { color: var(--muted); font-size: 12.5px; }
.review-queue q { color: var(--faint); font-size: 12.5px; }

.members { padding: 18px clamp(12px, 3vw, 32px) 40px; max-width: 1240px; margin: 0 auto; }
.mem-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.mem-head h2 { margin: 0; font: 600 22px/1.2 var(--display); }
.mem-head .spacer { flex: 1; }
.mem-tabs { display: flex; gap: 2px; padding: 3px; background: var(--sunken); border-radius: var(--r-md); border: 1px solid var(--line-soft); flex-wrap: wrap; }
.mem-tabs button { height: 28px; padding: 0 10px; border: 0; background: none; color: var(--muted); border-radius: 5px; cursor: pointer; font-weight: 600; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.mem-tabs button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.mem-tabs .n { font-weight: 500; color: var(--faint); font-size: 12px; }
.mem-tabs .n.hot { color: #201400; background: var(--amber); border-radius: 8px; padding: 0 6px; }
.mem-intro { color: var(--muted); margin: 0 0 12px; max-width: 75ch; }
.mem-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mem-table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--faint); padding: 0 10px 8px; border-bottom: 1px solid var(--line); }
.mem-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.mem-table tr.me td { background: rgba(255, 255, 255, 0.02); }
.m-who { display: flex; gap: 10px; align-items: center; min-width: 200px; }
.m-who .who { display: grid; gap: 1px; min-width: 0; }
.m-who .who span { color: var(--faint); font-size: 12px; }
.av { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.av.none { display: grid; place-items: center; background: var(--raised); color: var(--muted); font-weight: 700; font-size: 12px; }
.m-role { min-width: 200px; }
.m-role .select { width: 100%; max-width: 230px; height: 30px; padding-top: 0; padding-bottom: 0; }
.m-role .select.creator { margin-top: 5px; }
.role-help { color: var(--faint); font-size: 11.5px; margin-top: 4px; max-width: 34ch; }
.role-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--muted); }
.role-pill.owner { background: var(--arc-soft); color: var(--arc); }
.role-pill.admin { background: var(--amber-soft); color: var(--amber); }
.role-pill.curator { background: var(--ok-soft); color: var(--ok); }
.role-pill.trusted, .role-pill.modder { background: var(--live-soft); color: var(--live); }
.st { font-size: 12.5px; font-weight: 600; }
.st-active { color: var(--live); } .st-pending { color: var(--amber); } .st-spam, .st-disabled { color: var(--danger); }
.tag-2fa { font-size: 10.5px; font-weight: 700; color: var(--ok); border: 1px solid currentColor; border-radius: 3px; padding: 0 3px; margin-left: 4px; }
.m-act { text-align: right; width: 40px; }
.log-search { margin-bottom: 10px; max-width: 520px; }
.log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.log li { display: grid; grid-template-columns: 150px 150px 200px 1fr auto; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.log li.bad .act { color: var(--danger); }
.log time, .log .ip { color: var(--faint); font-size: 12px; }
.log .by { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .act { color: var(--muted); }
.log .obj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .log li { grid-template-columns: 1fr; gap: 2px; } .mem-table thead { display: none; } .mem-table tr { display: grid; border-bottom: 1px solid var(--line); padding: 6px 0; } .mem-table td { border: 0; padding: 4px 6px; } .m-act { text-align: left; } }
.mem-settings { display: grid; gap: 8px; max-width: 620px; }
.mem-settings .hint code { font-family: var(--mono); }
.members .empty { color: var(--faint); padding: 30px 0; }
.badge.wf { color: #201400; background: var(--amber); border-color: transparent; }
.login-card .tick { display: flex; gap: 10px; align-items: center; margin-top: 6px; color: #f1efed; font-weight: 600; cursor: pointer; }
.login-card .tick input, .login-card .chips input { accent-color: var(--arc); width: 16px; height: 16px; }
.login-card .reveal { display: grid; gap: 8px; padding: 10px 12px; border-left: 2px solid var(--arc); background: rgba(255, 79, 110, 0.06); border-radius: 0 6px 6px 0; }
.login-card .reveal[hidden] { display: none; }
.login-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.login-card .chips label { display: flex; gap: 6px; align-items: center; padding: 5px 10px; border: 1px solid #3a3a41; border-radius: 999px; cursor: pointer; font-size: 13px; }
.login-card .chips label:has(input:checked) { border-color: var(--arc); background: rgba(255, 79, 110, 0.14); }
.login-label small { color: #8b8a93; font-size: 11.5px; }
.req { margin-top: 6px; font-size: 12px; color: var(--muted); display: grid; gap: 3px; max-width: 46ch; }
.req a { color: var(--ok); word-break: break-all; }
.req .vbadge { color: var(--live); font-weight: 700; }
.req .nbadge { color: var(--amber); font-weight: 700; }
.m-who > div { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; }
.m-who > div > .req { grid-column: 2; }
.link-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; max-height: 40vh; overflow: auto; font-size: 13px; }
.link-list li { padding: 6px 8px; background: var(--sunken); border-radius: var(--r-sm); color: var(--text); }
.link-list.unsure li { display: grid; gap: 6px; }
.link-list .select { width: 100%; }
.team-dlg details summary { cursor: pointer; color: var(--muted); }
