/* DeadDrop Studio. The DeadDrop identity (acid lime on near-black, Zalando Sans Expanded + Martian Mono),
   tuned for long working sessions: calmer surfaces, larger body text, dense but legible tables. */
@font-face { font-family: "Zalando Sans Expanded"; font-weight: 900; font-display: swap; src: url(/_dd/fonts/zalando-sans-expanded-latin-900-normal.woff2) format("woff2"); }
@font-face { font-family: "Martian Mono"; font-weight: 400; font-display: swap; src: url(/_dd/fonts/martian-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Martian Mono"; font-weight: 500; font-display: swap; src: url(/_dd/fonts/martian-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0b0c0a; --panel: #121410; --panel-2: #181a16; --line: #25281f; --line-2: #33372c;
  --ink: #eceee6; --dim: #8a907f; --faint: #5d6355;
  --acid: #d4ff00; --acid-ink: #0a0b09; --warn: #ffb020; --bad: #ff5a4f; --ok: #9be15d;
  --display: "Zalando Sans Expanded", "Arial Black", sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, Consolas, monospace;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 3px; --top: 52px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body.studio { min-height: 100vh; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--ui); }
a { color: var(--acid); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
::selection { background: var(--acid); color: var(--acid-ink); }
.sprite { position: absolute; width: 0; height: 0; }
svg.logo { display: block; fill: currentColor; aspect-ratio: 1595.2 / 720; }
svg.logo.sm { aspect-ratio: 1617.8 / 720; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { display: block; margin: 0; font: 500 10.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
h1, h2, h3 { margin: 0; }
h1 { font: 900 clamp(26px, 3.4vw, 38px)/1 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
h2 { font: 900 17px/1.15 var(--display); letter-spacing: -.02em; text-transform: uppercase; }
h3 { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 6px; }
.hint, .sub, small { color: var(--dim); font-size: 12.5px; }
.loading { color: var(--dim); }

/* ---------- buttons, fields, pills ---------- */
.btn, .ghost { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--panel-2); cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; font-size: 13px; line-height: 1.2; }
.btn:hover { border-color: var(--dim); }
.btn.primary { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn:disabled, .ghost:disabled { opacity: .5; cursor: default; }
.ghost { background: none; border-color: transparent; color: var(--dim); }
.ghost:hover { color: var(--ink); border-color: var(--line-2); }
.ghost.danger:hover { color: var(--bad); }
.ghost.mini, .mini { padding: 4px 8px; font-size: 12px; }
.ghost.x { padding: 4px 8px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.field > span { font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.field small { font-size: 12px; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 10px; min-width: 0; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acid); }
input.saved, select.saved, textarea.saved { border-color: var(--ok); transition: border-color .2s; }
input.err, select.err { border-color: var(--bad); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row.wrap > .field { flex: 1 1 140px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 99px; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tag { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border: 1px solid var(--line-2); border-radius: var(--r); }

/* ---------- frame ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 38px; color: var(--acid); }
.brand span { font: 900 13px/1 var(--display); text-transform: uppercase; letter-spacing: -.01em; }
.brand b { color: var(--acid); font-weight: inherit; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs a { color: var(--dim); text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--ink); } .crumbs i { font-style: normal; color: var(--faint); }
.me { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.me form { margin: 0; }
.me .who { color: var(--dim); font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.catbar { position: sticky; top: var(--top); z-index: 25; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.catbar-in { display: flex; align-items: center; gap: 16px; padding: 10px 18px; flex-wrap: wrap; }
.cat-id strong { display: block; font: 900 18px/1.1 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.cat-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pl-pick select { padding: 7px 8px; font-size: 12.5px; }
.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.shell.solo { grid-template-columns: minmax(0, 1fr); }
.side { border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--top) + 60px); align-self: start; }
.side a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--r); color: var(--dim); text-decoration: none; font-size: 13.5px; }
.side a:hover { color: var(--ink); background: var(--panel); }
.side a[aria-current="page"] { color: var(--acid-ink); background: var(--acid); font-weight: 600; }
.side a span { font: 500 11px var(--mono); opacity: .8; }
main { padding: 26px clamp(16px, 3vw, 34px) 60px; min-width: 0; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.lede { color: var(--dim); max-width: 75ch; margin: -6px 0 22px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; max-width: 920px; }
.panel.welcome { border-color: color-mix(in srgb, var(--acid) 40%, transparent); }
.panel.welcome ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.empty, .emptystate { color: var(--dim); }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .side a { white-space: nowrap; }
  .me .who { display: none; }
}

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.num { font: 500 12px var(--mono); color: var(--acid); }
.table .sub { font-size: 12px; }
.table td.actions { text-align: right; white-space: nowrap; }
form.inline { display: inline; margin: 0; }

/* ---------- dashboard ---------- */
.newclient { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); padding: 16px; border-radius: var(--r); margin-bottom: 22px; max-width: 920px; }
.orgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.org { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.catcard { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--bg); }
.catcard:hover { border-color: var(--acid); }
.catcard strong { font: 900 16px/1.1 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.catcard .meta { color: var(--dim); font-size: 12.5px; }
.catcard .pill { align-self: flex-start; }
.minor { font-size: 12.5px; color: var(--dim); text-decoration: none; } .minor:hover { color: var(--acid); }
.addmember .row { align-items: end; }

/* ---------- product editor ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.toolbar .find input { width: 240px; padding: 7px 10px; }
.toolbar select { padding: 7px 8px; }
.save-state { font: 500 11px var(--mono); color: var(--dim); min-width: 130px; text-align: right; }
.save-state[data-busy="1"] { color: var(--warn); }
.ghost[aria-pressed="true"], .btn[aria-pressed="true"] { color: var(--acid-ink); background: var(--acid); border-color: var(--acid); }
.bulkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 8px; background: color-mix(in srgb, var(--acid) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--acid) 35%, transparent); border-radius: var(--r); }
.work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.editor.split .work { grid-template-columns: minmax(0, 1fr) minmax(360px, 42%); }
.editor.drawer-open .work { margin-right: min(480px, 92vw); }
.workmain { min-width: 0; }
.gridwrap { overflow: auto; max-height: calc(100vh - 210px); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.previewframe { width: 100%; height: calc(100vh - 210px); border: 1px solid var(--line); border-radius: var(--r); background: #0a0b09; }
.pgrid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.pgrid th { position: sticky; top: 0; z-index: 2; background: var(--panel-2); text-align: left; font: 500 10.5px/1.25 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 9px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.pgrid th small { display: block; font-size: 10px; color: var(--faint); letter-spacing: .08em; }
.pgrid td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; background: var(--panel); }
.pgrid tr:hover td { background: var(--panel-2); }
.pgrid tr.sel td { background: color-mix(in srgb, var(--acid) 7%, var(--panel)); }
.pgrid tr.draft td:not(.c-status):not(.c-more) { opacity: .5; }
.pgrid tr.dropabove td { box-shadow: inset 0 2px 0 var(--acid); }
.pgrid tr.dropbelow td { box-shadow: inset 0 -2px 0 var(--acid); }
.pgrid .cell { width: 100%; border-color: transparent; background: transparent; padding: 7px 6px; }
.pgrid .cell:hover { border-color: var(--line-2); }
.pgrid .cell:focus { background: var(--bg); border-color: var(--acid); }
.pgrid .cell.saving { border-color: var(--warn); }
.pgrid .cell.saved { border-color: var(--ok); }
.pgrid .cell::placeholder { color: var(--faint); }
.c-sel { width: 30px; text-align: center; } .c-drag { width: 22px; color: var(--faint); cursor: grab; text-align: center; user-select: none; }
.c-img { width: 62px; }
.c-sku { width: 130px; } .c-name { min-width: 190px; } .c-kind { min-width: 150px; } .c-sec { width: 140px; }
.c-num { width: 70px; } .c-num .cell { text-align: right; } .c-price { width: 112px; } .c-price .cell { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.c-add { width: 1%; white-space: nowrap; } .c-status { width: 74px; } .c-more { width: 56px; }
.nomatch { text-align: center; color: var(--dim); padding: 30px !important; }
.imgbtn { position: relative; width: 52px; height: 52px; padding: 0; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--bg); cursor: pointer; overflow: hidden; display: grid; place-items: center; color: var(--faint); font-size: 18px; }
.imgbtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgbtn b { position: absolute; right: 2px; bottom: 2px; font: 500 9.5px/1 var(--mono); background: var(--acid); color: var(--acid-ink); padding: 2px 4px; border-radius: 2px; }
.imgbtn:hover, .imgbtn.over { border-color: var(--acid); border-style: solid; }
.toggle { padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line-2); background: none; cursor: pointer; font: 500 11px var(--mono); color: var(--dim); }
.toggle[aria-pressed="true"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.emptystate { padding: 44px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.emptystate h2 { font-size: 22px; color: var(--ink); }
.emptystate p { max-width: 60ch; margin: 0; }
.starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; width: min(900px, 100%); margin-top: 8px; }
.start { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; }
.start:hover { border-color: var(--acid); }
.start strong { font: 900 15px/1.1 var(--display); text-transform: uppercase; letter-spacing: -.02em; color: var(--ink); }
.start span { color: var(--dim); font-size: 13px; }
.dropoverlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(8, 9, 7, .78); backdrop-filter: blur(3px); pointer-events: none; }
.dropoverlay div { border: 2px dashed var(--acid); padding: 40px 56px; text-align: center; display: flex; flex-direction: column; gap: 6px; border-radius: 6px; }
.dropoverlay strong { font: 900 30px var(--display); text-transform: uppercase; color: var(--acid); }
.dropoverlay span { color: var(--ink); }

/* details drawer */
.drawer { position: fixed; top: var(--top); right: 0; bottom: 0; z-index: 28; width: min(480px, 92vw); background: var(--panel); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; box-shadow: -20px 0 40px -20px #000; }
.drawer > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer > header h2 { font-size: 20px; margin-top: 4px; }
.dbody { overflow: auto; padding: 16px 18px 40px; display: flex; flex-direction: column; gap: 12px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery figure { position: relative; margin: 0; aspect-ratio: 1; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--bg); cursor: grab; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption { position: absolute; left: 4px; top: 4px; font: 500 9.5px var(--mono); background: var(--acid); color: var(--acid-ink); padding: 2px 5px; border-radius: 2px; }
.gallery .x { position: absolute; right: 2px; top: 2px; background: rgba(0, 0, 0, .65); color: var(--ink); }
.addimg { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px dashed var(--line-2); border-radius: var(--r); background: none; cursor: pointer; color: var(--dim); font-size: 12px; text-align: center; padding: 6px; }
.addimg span { font-size: 22px; color: var(--acid); }
.addimg:hover { border-color: var(--acid); color: var(--ink); }
.dangerzone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- dialogs ---------- */
dialog.dlg { width: min(560px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px -20px #000; }
dialog.dlg.wide { width: min(820px, calc(100vw - 24px)); }
dialog.dlg::backdrop { background: rgba(5, 6, 4, .7); backdrop-filter: blur(3px); }
dialog.dlg > header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
dialog.dlg > .body { padding: 18px; max-height: calc(100vh - 200px); overflow: auto; }
dialog.dlg > .body p { margin: 0; }
dialog.dlg > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
textarea.paste { font: 12px/1.5 var(--mono); white-space: pre; }
.pastepreview p { margin: 0 0 4px !important; }
.unmatched { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.umrow { display: grid; grid-template-columns: 1fr 260px; gap: 10px; align-items: center; font: 12px var(--mono); }
.umrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* invite card */
.invitecard .msg { border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.invitecard .msg header { display: flex; align-items: center; gap: 10px; }
.invitecard .step { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--acid); color: var(--acid-ink); font: 600 12px var(--mono); }
.invitecard pre { margin: 0; white-space: pre-wrap; word-break: break-all; font: 12px/1.6 var(--mono); color: var(--dim); background: var(--panel); padding: 10px; border-radius: var(--r); }
.invitecard .words { font: 500 clamp(16px, 2.6vw, 22px)/1.4 var(--mono); color: var(--acid); letter-spacing: .02em; margin: 0 !important; word-spacing: .2em; }
details.revoked { margin-top: 26px; color: var(--dim); }
details.revoked summary { cursor: pointer; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.inv select { padding: 6px 8px; font-size: 13px; }

/* settings */
.coverimg { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
.coverempty { height: 140px; display: grid; place-items: center; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--faint); }
.sortable { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sortable li { display: flex; align-items: center; gap: 8px; }
.sortable li input { flex: 1; }
.grip { color: var(--faint); cursor: grab; user-select: none; padding: 0 4px; }
.addrow { display: flex; gap: 8px; } .addrow input { flex: 1; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; padding: 10px 16px; border-radius: var(--r); background: var(--ink); color: var(--acid-ink); font-size: 13.5px; box-shadow: 0 10px 30px -10px #000; max-width: min(560px, 92vw); transition: opacity .3s, transform .3s; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- sign-in card ---------- */
body.gate { display: grid; place-items: center; padding: 24px; }
.gatecard { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.gatecard .logo { width: 96px; color: var(--acid); }
.gatecard h1 { font-size: 28px; }
.gatecard p { margin: 0; color: var(--dim); }
.gatecard .btn { justify-content: center; }
.gatecard .fine { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.devnote { border-left: 2px solid var(--warn); padding-left: 10px; font-size: 12.5px; }

/* ---------- manual ---------- */
.manual { max-width: 760px; font-size: 15px; line-height: 1.7; }
.manual h1 { margin-bottom: 18px; }
.manual h2 { margin: 34px 0 10px; font-size: 19px; }
.manual h3 { margin: 22px 0 6px; }
.manual p, .manual ul, .manual ol { margin: 0 0 14px; }
.manual li { margin-bottom: 4px; }
.manual code { font: 12.5px var(--mono); background: var(--panel-2); padding: 2px 5px; border-radius: 3px; }
.manual pre { background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; overflow: auto; border-radius: var(--r); }
.manual pre code { background: none; padding: 0; }
.manual .tip { border-left: 3px solid var(--acid); background: var(--panel); padding: 12px 16px; margin: 0 0 16px; border-radius: 0 var(--r) var(--r) 0; }
.manual .tip p:last-child { margin: 0; }
.manual .table { margin: 0 0 16px; }
.manual hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }

/* the grid keeps real column widths and scrolls sideways like a spreadsheet; select, image and SKU stay pinned */
.pgrid { width: max-content; min-width: 100%; }
.pgrid .c-sku .cell { width: 128px; } .pgrid .c-name .cell { width: 230px; } .pgrid .c-kind .cell { width: 190px; }
.pgrid .c-sec .cell { width: 140px; } .pgrid .c-num .cell { width: 66px; } .pgrid .c-price .cell { width: 104px; }
.pgrid .c-sel, .pgrid .c-drag, .pgrid .c-img, .pgrid .c-sku { position: sticky; z-index: 1; }
.pgrid th.c-sel, .pgrid th.c-drag, .pgrid th.c-img, .pgrid th.c-sku { z-index: 3; }
.pgrid .c-sel { left: 0; min-width: 32px; } .pgrid .c-drag { left: 32px; min-width: 22px; } .pgrid .c-img { left: 54px; min-width: 62px; }
.pgrid .c-sku { left: 116px; box-shadow: inset -1px 0 0 var(--line-2); }

/* ---------- The Wire (Studio) ---------- */
.wirecols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 1180px; }
@media (min-width: 1200px) { .wirecols:has(.composer) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .composer { position: sticky; top: calc(var(--top) + 16px); max-height: calc(100vh - var(--top) - 32px); overflow: auto; } }
.composer { max-width: none; border-color: color-mix(in srgb, var(--acid) 35%, var(--line)); }
.composer .ch { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kindbtn { padding: 7px 11px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg); cursor: pointer; font: 500 11px var(--mono); letter-spacing: .06em; color: var(--dim); }
.kindbtn[aria-checked="true"] { color: var(--acid-ink); background: var(--acid); border-color: var(--acid); }
.kindhint { margin: -6px 0 0; }
.composer input.title { font: 900 20px/1.2 var(--display); text-transform: uppercase; letter-spacing: -.02em; padding: 10px 12px; }
.composer textarea.body { font-size: 14.5px; line-height: 1.65; }
.wimgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; padding: 8px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.wimgs.over { border-color: var(--acid); }
.wimgs figure { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: var(--r); background: var(--bg); }
.wimgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wimgs .x { position: absolute; top: 2px; right: 2px; background: rgba(0, 0, 0, .65); color: var(--ink); }
.tagged { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 12.5px; background: var(--bg); }
.tagchip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.tagchip .x { padding: 0 6px; font-size: 11px; }
.tagresults { display: flex; flex-direction: column; gap: 2px; }
.tagopt { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 5px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; text-align: left; font-size: 13px; }
.tagopt:hover { border-color: var(--acid); }
.tagopt img, .tagopt .noimg { width: 28px; height: 28px; object-fit: cover; border-radius: 2px; background: var(--panel-2); display: block; }
.tagopt small { color: var(--dim); }
.audience { display: flex; flex-direction: column; gap: 10px; }
.radios { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.radio, .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.radio input, .check input { accent-color: var(--acid); width: 16px; height: 16px; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); max-height: 220px; overflow: auto; }
.composeacts { align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.composeacts .grow { flex: 1; }
.schedule { display: inline-flex; gap: 6px; align-items: center; }
.schedule input { padding: 7px 8px; }
.pill.draft { color: var(--dim); background: var(--panel-2); }
.postlist { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wpost { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.wpost.editing { border-color: var(--acid); }
.wpost header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kindtag { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 2px; }
.wpost.k-drop .kindtag { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); }
.wpost.k-restock .kindtag { color: var(--ok); } .wpost.k-embargo .kindtag { color: var(--warn); }
.pinned { font: 500 10.5px var(--mono); color: var(--acid); letter-spacing: .08em; }
.wpost h3 { font: 900 18px/1.15 var(--display); text-transform: uppercase; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.wpost .excerpt { margin: 0; color: var(--dim); white-space: pre-line; font-size: 13.5px; }
.wpost .thumbs { display: flex; gap: 6px; }
.wpost .thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r); }
.wpost .meta { margin: 0; font-size: 12.5px; color: var(--faint); }

/* ---------- Reactions ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; max-width: 920px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font: 900 30px/1 var(--display); letter-spacing: -.03em; }
.stat span { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.stat.hot { border-color: color-mix(in srgb, var(--acid) 50%, transparent); } .stat.hot b { color: var(--acid); }
.segs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.seg { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: none; cursor: pointer; color: var(--dim); font-size: 13px; }
.seg[aria-selected="true"] { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); font-weight: 600; }
.rxgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; max-width: 1180px; align-items: start; }
@media (max-width: 980px) { .rxgrid { grid-template-columns: 1fr; } }
.rxmain { display: flex; flex-direction: column; gap: 6px; }
.rxrow { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); text-align: left; color: var(--ink); font: inherit; width: 100%; }
button.rxrow { cursor: pointer; } button.rxrow:hover { border-color: var(--dim); }
.rxrow .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--dim); font-size: 13px; }
.rxrow .ico.heart { color: var(--acid); }
.rxrow.unread { border-color: color-mix(in srgb, var(--acid) 45%, var(--line)); }
.rxrow.unread .ico { background: var(--acid); color: var(--acid-ink); font: 600 12px var(--mono); }
.rxrow .txt p { margin: 0; font-size: 13.5px; } .rxrow .txt em { font-style: normal; color: var(--acid); }
.rxrow .txt .last { color: var(--dim); margin-top: 3px; }
.rxrow .txt small { color: var(--faint); font-size: 12px; }
.rxrow .go { font: 500 11px var(--mono); color: var(--dim); }
.rxside { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--top) + 16px); }
.toplist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.toplist li { font-size: 13.5px; } .toplist li span { display: block; } .toplist small { color: var(--faint); } .toplist b { float: right; color: var(--acid); font-weight: 500; }
.threadview .tlist { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding: 4px; }
.tm { max-width: 80%; padding: 9px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.tm p { margin: 3px 0 0 !important; white-space: pre-line; }
.tm small { color: var(--dim); font-size: 11.5px; }
.tm.from-brand { align-self: flex-end; border-color: color-mix(in srgb, var(--acid) 40%, var(--line)); }
.tm.from-brand small { color: var(--acid); }
.rxcount { font: 500 11px var(--mono); color: var(--dim); white-space: nowrap; } .rxcount b { color: var(--acid); font-weight: 500; }

/* ---------- House navigation ---------- */
.navhead { margin: 14px 10px 4px; font: 500 10px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.navhead:first-child { margin-top: 0; }
.navgroup { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-2); margin: 2px 0 4px 10px; padding-left: 4px; }
.navcat { font: 900 12px/1.2 var(--display); text-transform: uppercase; letter-spacing: -.01em; padding: 6px 6px 2px; color: var(--ink); }
.side .switch { display: flex; flex-direction: column; gap: 4px; margin: 0 4px 6px; }
.side .switch span { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.side .switch select { padding: 7px 8px; font-size: 13px; }
.houses { display: flex; flex-direction: column; gap: 26px; }
.house > header { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.house h2 { font-size: 22px; }
.hlinks { display: flex; gap: 6px; flex-wrap: wrap; }
.hlinks a { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; color: var(--ink); text-decoration: none; font-size: 13px; }
.hlinks a:hover { border-color: var(--acid); }
.org h3 { font: 900 16px/1.1 var(--display); text-transform: uppercase; letter-spacing: -.02em; margin: 0; }
.addbrand { justify-content: space-between; border-style: dashed; background: none; }
.tag.hscope { color: var(--acid); border-color: color-mix(in srgb, var(--acid) 40%, transparent); }
.warnt { color: var(--warn); }

/* ---------- Accounts ---------- */
.acctlist { display: flex; flex-direction: column; gap: 8px; max-width: 1100px; }
.acct { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.acct.open { border-color: var(--line-2); }
.acct-head { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 200px 190px 20px; gap: 14px; align-items: center; padding: 14px 16px; background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.acct-name strong { display: block; font: 900 16px/1.15 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.acct-name small, .acct-owner small { color: var(--dim); font-size: 12.5px; }
.acct-owner { font-size: 13.5px; }
.acct-sig { font: 500 12px var(--mono); color: var(--dim); } .acct-sig b { color: var(--acid); font-weight: 500; }
.acct-sig .badge { margin-left: 8px; background: var(--acid); color: var(--acid-ink); padding: 2px 6px; border-radius: 2px; }
.acct-head .chev { color: var(--dim); }
.acct-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.panel.slim { padding: 14px; margin: 0; max-width: none; background: var(--bg); gap: 10px; }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.field.inline span { flex: 0 0 160px; }
.field.inline select { flex: 1; }
.person { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.pinfo strong { display: block; } .pinfo small { color: var(--dim); }
.pinv { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.invchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 12.5px; }
.invchip.revoked { opacity: .5; padding-right: 10px; }
@media (max-width: 860px) { .acct-head { grid-template-columns: 1fr; } .person { grid-template-columns: 1fr; } }

/* =====================================================================================
   POLISH PASS 1: tokens, transitions, components in every state.
   ===================================================================================== */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --r1: 4px; --r2: 6px; --r3: 10px; --r: var(--r1);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  --t-fast: 120ms; --t: 180ms; --t-slow: 320ms;
  --pop: 0 16px 40px -12px rgba(0, 0, 0, .75), 0 0 0 1px var(--line-2);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px color-mix(in srgb, var(--acid) 70%, transparent);
}
:focus-visible { outline: none; box-shadow: var(--ring); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--acid); color: var(--acid-ink); padding: 8px 12px; border-radius: var(--r1); }
.skip:focus { left: 8px; }

/* ---------- page transitions: the frame stays put, only the work area moves ---------- */
@view-transition { navigation: auto; }
.top { view-transition-name: topbar; }
.side { view-transition-name: sidenav; }
.catbar { view-transition-name: catbar; }
main { view-transition-name: workarea; }
::view-transition-group(topbar), ::view-transition-group(sidenav) { animation-duration: 0s; }
::view-transition-old(workarea) { animation: vt-out 120ms var(--ease) both; }
::view-transition-new(workarea) { animation: vt-in 240ms var(--ease) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-3px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- icons ---------- */
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.btn svg.i { width: 15px; height: 15px; margin-left: -2px; }
.iconbtn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: var(--r2); background: none; color: var(--dim); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease); }
.iconbtn:hover { color: var(--ink); background: var(--panel-2); }
.iconbtn:active { transform: scale(.92); }
.iconbtn[aria-expanded="true"] { color: var(--ink); background: var(--panel-2); border-color: var(--line-2); }
.iconbtn.sm { width: 26px; height: 26px; } .iconbtn.sm svg.i { width: 14px; height: 14px; }

/* ---------- top bar ---------- */
.top { gap: var(--s4); }
.crumbs { gap: var(--s1); }
.crumbs svg.sep { width: 13px; height: 13px; color: var(--faint); }
.crumbs a { padding: 3px 6px; border-radius: var(--r1); transition: background var(--t-fast), color var(--t-fast); }
.crumbs a:hover { background: var(--panel); }
.me { gap: var(--s1); }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--acid), #8fbf00);
  color: var(--acid-ink); font: 600 11px/1 var(--mono); letter-spacing: .02em; margin: 0 var(--s1); cursor: default; }

/* ---------- side menu ---------- */
.side { gap: 1px; }
.side a { gap: var(--s2); justify-content: flex-start; padding: 7px 10px; transition: background var(--t-fast), color var(--t-fast); }
.side a .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side a .n { font: 500 10.5px var(--mono); padding: 1px 6px; border-radius: 99px; background: var(--panel-2); color: var(--dim); }
.side a[aria-current="page"] .n { background: rgba(0, 0, 0, .15); color: var(--acid-ink); }
.side a svg.i { color: var(--faint); transition: color var(--t-fast); }
.side a:hover svg.i { color: var(--ink); }
.side a[aria-current="page"] svg.i { color: var(--acid-ink); }
.navcat { display: flex; align-items: center; gap: var(--s2); }
.navcat svg.i { width: 14px; height: 14px; color: var(--acid); }

/* ---------- buttons: press, busy, disabled ---------- */
.btn, .ghost { gap: 7px; border-radius: var(--r2); transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease), filter var(--t-fast); }
.btn:active:not(:disabled), .ghost:active:not(:disabled) { transform: scale(.97); }
.btn.primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 16px -8px color-mix(in srgb, var(--acid) 60%, transparent); }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--acid-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.busy svg.i { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- fields: consistent height, styled dropdowns ---------- */
input:not([type=checkbox]):not([type=radio]), select { min-height: 36px; border-radius: var(--r2); transition: border-color var(--t-fast), background var(--t-fast); }
textarea { border-radius: var(--r2); transition: border-color var(--t-fast); }
input:hover:not(:focus):not(:disabled), select:hover:not(:focus):not(:disabled), textarea:hover:not(:focus):not(:disabled) { border-color: var(--dim); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a907f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
select:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
.pgrid .cell { min-height: 32px; }
.pgrid select.cell { background-position: right 6px center; padding-right: 24px; }

/* ---------- status pill & save state ---------- */
.pill { transition: color var(--t), background var(--t); }
.pill.flash { animation: flash .9s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.save-state { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.save-state svg.i { width: 13px; height: 13px; color: var(--ok); }
.save-state[data-busy="1"] svg.i { color: var(--warn); animation: spin 1.2s linear infinite; }

/* ---------- tooltips ---------- */
.tip { position: fixed; z-index: 120; pointer-events: none; display: flex; align-items: center; gap: 8px; max-width: 280px; padding: 6px 9px; border-radius: var(--r2);
  background: #f2f4ec; color: #111; font: 12px/1.35 var(--ui); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .7); animation: tipin 140ms var(--ease); }
.tip kbd, .menu kbd { font: 500 10.5px var(--mono); padding: 1px 5px; border-radius: 3px; background: rgba(0, 0, 0, .1); white-space: nowrap; }
@keyframes tipin { from { opacity: 0; transform: translateY(3px); } }
.tip[data-side="below"] { animation-name: tipin2; } @keyframes tipin2 { from { opacity: 0; transform: translateY(-3px); } }

/* ---------- menus ---------- */
.menu { position: absolute; z-index: 110; min-width: 200px; padding: 5px; border-radius: var(--r3); background: var(--panel-2); box-shadow: var(--pop);
  display: flex; flex-direction: column; animation: menuin 140ms var(--ease); transform-origin: top right; }
@keyframes menuin { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.mitem { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 0; border-radius: var(--r2); background: none; color: var(--ink); cursor: pointer; text-align: left; font-size: 13.5px; }
.mitem:hover, .mitem:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); box-shadow: none; }
.mitem svg.i, .mitem .ispace { width: 15px; height: 15px; color: var(--dim); flex: none; }
.mitem .ml { flex: 1; }
.mitem.danger { color: var(--bad); } .mitem.danger svg.i { color: var(--bad); }
.mitem:disabled { opacity: .4; cursor: default; }
.mitem kbd { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--dim); }
.msep { height: 1px; margin: 4px 6px; background: var(--line-2); }

/* ---------- toasts ---------- */
.toasts { gap: var(--s2); bottom: var(--s6); }
.toast { display: flex; align-items: center; gap: 10px; padding: 9px 9px 9px 14px; border-radius: var(--r3); background: #f2f4ec; color: #121310; box-shadow: var(--pop);
  position: relative; overflow: hidden; animation: toastin 260ms var(--spring); }
.toast .msg { flex: 1; }
.toast svg.i { color: #3a6d00; }
.toast.bad { background: #2a1513; color: #ffd9d4; box-shadow: var(--pop), 0 0 0 1px #6b2a22 inset; } .toast.bad svg.i { color: var(--bad); }
.toast.undo svg.i:first-child, .toast.info svg.i:first-child { color: #555; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .25; transform-origin: left; animation: life var(--life, 3600ms) linear forwards; }
.toast.held::after { animation-play-state: paused; }
@keyframes life { to { transform: scaleX(0); } }
.tact { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r2); border: 0; background: #121310; color: #f2f4ec; font-weight: 600; cursor: pointer; font-size: 12.5px; }
.tact svg.i { color: var(--acid) !important; width: 14px; height: 14px; }
.tclose { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; opacity: .5; cursor: pointer; }
.tclose:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.tclose svg.i { width: 13px; height: 13px; color: inherit !important; }
.toast.out { opacity: 0; transform: translateY(6px) scale(.98); }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---------- dialogs and drawer: animate in and out ---------- */
dialog.dlg { border-radius: var(--r3); opacity: 1; transform: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), overlay var(--t) allow-discrete, display var(--t) allow-discrete; }
dialog.dlg:not([open]) { opacity: 0; transform: translateY(6px) scale(.985); }
@starting-style { dialog.dlg[open] { opacity: 0; transform: translateY(10px) scale(.97); } }
dialog.dlg::backdrop { transition: opacity var(--t), overlay var(--t) allow-discrete, display var(--t) allow-discrete; opacity: 1; }
dialog.dlg:not([open])::backdrop { opacity: 0; }
@starting-style { dialog.dlg[open]::backdrop { opacity: 0; } }
dialog.dlg > header .iconbtn { margin: -6px -8px -6px 0; }
.drawer { animation: drawerin 260ms var(--ease); }
@keyframes drawerin { from { transform: translateX(24px); opacity: 0; } }

/* ---------- skeletons: the shape of what's coming, never "Loading…" ---------- */
.skel { display: block; border-radius: var(--r1); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 40%, var(--panel) 80%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.sk-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: var(--s5); }
.sk-title { width: 260px; height: 34px; } .sk-eyebrow { width: 140px; height: 10px; margin-bottom: 10px; } .sk-btn { width: 130px; height: 36px; border-radius: var(--r2); }
.sk-line { height: 12px; margin-bottom: 8px; } .sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; }
.sk-rows { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s4); }
.sk-row { height: 56px; border-radius: var(--r2); }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.sk-card { height: 150px; border-radius: var(--r3); }

/* ---------- small details ---------- */
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover td { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.panel { border-radius: var(--r3); }
.catcard, .acct, .wpost, .rxrow, .stat, .org, .start { border-radius: var(--r3); transition: border-color var(--t-fast), transform var(--t-fast) var(--ease), background var(--t-fast); }
.catcard:hover, .start:hover { transform: translateY(-1px); }
.empty, .emptystate p { text-wrap: pretty; }
h1, h2, .catcard strong { text-wrap: balance; }
.num, .n, .acct-sig, .rxcount, .stat b { font-variant-numeric: tabular-nums; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; } }

/* ---------- pass 1: icons inside existing components ---------- */
.c-drag svg.i { width: 15px; height: 15px; color: var(--faint); }
.c-drag:hover svg.i { color: var(--ink); }
.imgbtn > svg.i { width: 18px; height: 18px; color: var(--faint); }
.imgbtn:hover > svg.i { color: var(--acid); }
.addimg svg.i { width: 20px; height: 20px; color: var(--acid); }
.gallery .iconbtn.x, .wimgs .iconbtn.x { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .7); color: var(--ink); }
.gallery .iconbtn.x:hover, .wimgs .iconbtn.x:hover { color: var(--bad); }
.c-more { text-align: right; }
.wpost header .grow { flex: 1; }
.pinned { display: inline-flex; align-items: center; gap: 4px; } .pinned svg.i { width: 12px; height: 12px; }
.acct-sig { display: inline-flex; align-items: center; gap: 10px; }
.acct-sig b, .acct-sig > span:not(.badge) { display: inline-flex; align-items: center; gap: 4px; }
.acct-sig svg.i { width: 13px; height: 13px; }
.acct-head .chev svg.i { width: 15px; height: 15px; }
.rxrow .ico svg.i { width: 15px; height: 15px; }
.rxrow .go { display: inline-flex; align-items: center; gap: 2px; }
.rxrow .go svg.i { width: 14px; height: 14px; }
.toplist b { display: inline-flex; align-items: center; gap: 4px; } .toplist b svg.i { width: 12px; height: 12px; }
.grip { display: inline-grid; place-items: center; } .grip svg.i { width: 15px; height: 15px; }
.tagchip .iconbtn.sm { width: 20px; height: 20px; } .tagchip .iconbtn.sm svg.i { width: 11px; height: 11px; }
.invchip .iconbtn.sm { width: 22px; height: 22px; }
.ghost svg.i { width: 15px; height: 15px; }

/* ---------- View as ---------- */
.viewas { position: sticky; top: var(--top); z-index: 26; display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-size: 13px;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--acid) 16%, var(--bg)) 0 12px, color-mix(in srgb, var(--acid) 10%, var(--bg)) 12px 24px);
  border-bottom: 1px solid color-mix(in srgb, var(--acid) 45%, transparent); view-transition-name: viewas; }
.viewas span { flex: 1; } .viewas b { color: var(--acid); }
.viewas svg.i { color: var(--acid); }
.viewas form { margin: 0; }
.viewas ~ .catbar { top: calc(var(--top) + 41px); }
.iconbtn.on { color: var(--acid-ink); background: var(--acid); }
.viewgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; max-width: 1100px; }
.vrow { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); margin: 0; }
.vwho strong { display: block; } .vwho small { color: var(--dim); }
.avatar.sm { width: 30px; height: 30px; margin: 0; font-size: 10.5px; }
.viewback { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 16px; } .viewback span { flex: 1; }
.btn.mini { padding: 5px 10px; font-size: 12.5px; }

.vsub { display: flex; align-items: center; gap: 7px; margin: 18px 0 6px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.vsub .i { width: 13px; height: 13px; }
.avatar.buyer { background: var(--panel-2); color: var(--acid); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Darkroom: image processing status ---------- */
.gallery figure .imgstate { position: absolute; left: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 99px;
  background: rgba(0, 0, 0, .72); color: var(--dim); font: 500 10px var(--mono); letter-spacing: .04em; max-width: calc(100% - 44px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery figure .imgstate.ok { color: var(--acid); }
.gallery figure .imgstate.bad { color: var(--warn); }
.gallery figure .imgstate.busy { color: var(--ink); }
.gallery figure.st-queued img, .gallery figure.st-processing img { filter: grayscale(.6) brightness(.7); }
.gallery figure .iconbtn.v { position: absolute; bottom: 4px; right: 4px; background: rgba(0, 0, 0, .7); color: var(--ink); }
.gallery figure figcaption + .imgstate { bottom: 4px; }
.spin { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
.imgbtn .imgbusy { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.imgbtn .imgbusy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; border: 2px solid var(--acid); border-right-color: transparent; animation: spin .8s linear infinite; }
.cmpgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmpgrid .cmp { margin: 0; display: grid; gap: 6px; }
.cmpgrid img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.cmpgrid figcaption { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
@media (max-width: 640px) { .cmpgrid { grid-template-columns: 1fr; } }

/* ---------- Requests ---------- */
.stat.money b { font-size: 22px; line-height: 1.15; white-space: nowrap; }
.reqlist { display: grid; gap: 6px; max-width: 1100px; }
.reqrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; width: 100%; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font: inherit; cursor: pointer; }
.reqrow:hover { border-color: var(--dim); }
.reqrow.s-new { border-color: color-mix(in srgb, var(--acid) 45%, transparent); }
.reqrow .ico { width: 44px; height: 34px; display: grid; place-items: center; border-radius: var(--r); background: var(--panel-2); color: var(--dim); font: 600 9.5px var(--mono); letter-spacing: .1em; }
.reqrow.s-new .ico { background: var(--acid); color: var(--acid-ink); }
.reqrow .ico .i { width: 15px; height: 15px; }
.reqrow .txt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; min-width: 0; }
.reqrow .txt span { color: var(--dim); }
.reqrow small { flex-basis: 100%; color: var(--dim); font-size: 12px; }
.reqrow small.note { color: var(--ink); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reqrow .amt { font: 500 13px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill.st-new { color: var(--acid); background: color-mix(in srgb, var(--acid) 12%, transparent); }
.pill.st-seen { color: var(--ink); background: var(--panel-2); }
.pill.st-confirmed { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pill.st-declined { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
@media (max-width: 640px) { .reqrow { grid-template-columns: 38px minmax(0, 1fr); } .reqrow .amt, .reqrow .pill { grid-column: 2; justify-self: start; } }
.reqview .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--dim); font-size: 12.5px; margin: 0; }
.reqnote { margin: 0; padding: 10px 14px; border-left: 2px solid var(--acid); background: var(--panel-2); white-space: pre-wrap; }
.tablewrap { overflow-x: auto; }
.reqlines { width: 100%; border-collapse: collapse; font-size: 13px; }
.reqlines th { text-align: left; font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.reqlines td { padding: 8px; border-bottom: 1px solid var(--line); }
.reqlines .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reqlines .mono { font: 500 12px var(--mono); color: var(--dim); white-space: nowrap; }
.reqlines tfoot td { border: 0; font-weight: 600; padding-top: 12px; }
.reqlines tfoot td:first-child { color: var(--dim); font-weight: 400; }
dialog.dlg > footer .grow { flex: 1; }

/* ---------- Wire: product pins ---------- */
.wimgs .pinbtn { position: absolute; left: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 0; border-radius: 99px;
  background: rgba(0, 0, 0, .72); color: var(--acid); font: 500 10.5px var(--mono); cursor: pointer; }
.wimgs .pinbtn .i { width: 12px; height: 12px; }
.wimgs .pinbtn:hover { background: var(--acid); color: var(--acid-ink); }
dialog.dlg.pins { width: min(1100px, calc(100vw - 24px)); }
.pineditor { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .pineditor { grid-template-columns: 1fr; } }
.pinstage { position: relative; line-height: 0; background: var(--bg); border-radius: var(--r); overflow: hidden; user-select: none; }
.pinstage img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; }
.pinlayer { position: absolute; inset: 0; cursor: crosshair; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: grab; touch-action: none;
  border: 2px solid var(--acid); background: rgba(10, 11, 9, .7); color: var(--acid); font: 600 11px/1 var(--mono); display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .35); }
.pin.on { background: var(--acid); color: var(--acid-ink); }
.pin.empty { border-style: dashed; }
.pinside { display: grid; gap: 10px; align-content: start; }
.pinresults { display: grid; gap: 4px; }
.pinresults .tagopt { display: flex; align-items: center; gap: 10px; text-align: left; }
.pinresults .tagopt img, .pinresults .noimg { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; background: var(--panel-2); flex: none; }
.pinresults .tagopt span { display: grid; } .pinresults .tagopt small { color: var(--dim); }
.pinresults .tagopt.on { box-shadow: inset 0 0 0 1px var(--acid); }
.pinlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pinlist li { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: var(--r); cursor: pointer; }
.pinlist li.on, .pinlist li:hover { background: var(--panel-2); }
.pinlist .pn { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--acid); color: var(--acid); display: grid; place-items: center; font: 600 10px var(--mono); flex: none; }
.pinlist .pl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Pass 2: command bar, cheat sheet, live presence, deep-link flash ---------- */
dialog.palette { width: min(640px, calc(100vw - 24px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r3);
  background: var(--panel); color: var(--ink); box-shadow: var(--pop); overflow: hidden; animation: palin var(--t) var(--ease); }
dialog.palette::backdrop { background: rgba(5, 6, 4, .62); backdrop-filter: blur(2px); }
@keyframes palin { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.pal-head .i { width: 17px; height: 17px; color: var(--dim); flex: none; }
.pal-head input { flex: 1; height: 54px; border: 0; outline: 0; background: none; color: var(--ink); font: 400 16px var(--ui); }
.pal-head input::placeholder { color: var(--faint); }
.pal-list { max-height: min(56vh, 460px); overflow: auto; padding: 6px; scroll-padding: 32px 0 6px; }
.pal-group { padding: 10px 10px 5px; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.pal-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 7px 10px; border: 0; border-radius: var(--r2);
  background: none; color: var(--ink); font: 400 14px var(--ui); text-align: left; cursor: pointer; }
.pal-item .i { width: 16px; height: 16px; color: var(--dim); flex: none; }
.pal-item .pl { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .ps { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 12.5px; }
.pal-item kbd { margin-left: auto; font: 500 10.5px var(--mono); padding: 2px 6px; border-radius: 3px; background: var(--panel-2); color: var(--dim); white-space: nowrap; }
.pal-item[aria-selected="true"] { background: color-mix(in srgb, var(--acid) 11%, var(--panel-2)); box-shadow: inset 2px 0 0 var(--acid); }
.pal-item[aria-selected="true"] .i { color: var(--acid); }
.pal-empty { margin: 0; padding: 28px 12px; text-align: center; color: var(--dim); font-size: 13.5px; }
.pal-foot { display: flex; flex-wrap: wrap; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--faint); font: 400 11.5px var(--ui); }
.pal-foot .grow { flex: 1; }
.pal-foot kbd, .cheat-row kbd { display: inline-block; min-width: 20px; padding: 1px 5px; margin-right: 2px; border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 4px; background: var(--panel-2); color: var(--ink); font: 500 10.5px/1.5 var(--mono); text-align: center; }
@media (max-width: 560px) { dialog.palette { margin-top: 10px; } .pal-foot { display: none; } }

.cheat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px 32px; }
.cheat-grid h3 { margin: 0 0 8px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acid); }
.cheat-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cheat-row .keys { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.cheat-row .then { margin: 0 5px; color: var(--faint); font-size: 11px; }

.presence { display: inline-flex; align-items: center; }
.presence[hidden] { display: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 9.5px; margin: 0 0 0 -6px; box-shadow: 0 0 0 2px var(--bg); animation: popin var(--t-slow) var(--spring); }
.avatar.sm:first-child { margin-left: 0; }
@keyframes popin { from { transform: scale(.4); opacity: 0; } }
.side a .n.bump { animation: bump .7s var(--spring); background: var(--acid); color: var(--acid-ink); }
@keyframes bump { 30% { transform: scale(1.35); } }

tr.flash td, .acct.flash, .wpost.flash { animation: rowflash 1.8s var(--ease); }
@keyframes rowflash { 0%, 30% { background-color: color-mix(in srgb, var(--acid) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acid) 50%, transparent); } }
@media (prefers-reduced-motion: reduce) { dialog.palette, .avatar.sm, .side a .n.bump, tr.flash td, .acct.flash, .wpost.flash { animation: none; } }
