/* Panay job tracker.
   Style: true-black flat (taste-skill app sheet, seed 1310776231) on the Panay brand. Elevation is a
   lightness step alone (#000 ground, #111 panel, #1c1c1c raised row, #2a2a2a nested); no shadows except
   on dialogs. The one data hue is Panay amber, used on what needs someone: a job waiting on approval and
   the latest edit on the ladder. Buttons, tabs and nav never take it. The primary control is a white pill.
   Organised by component; phone rules sit under each component's desktop rules (max-width: 760px). */

/* ========== tokens and base ========== */
[hidden] { display: none !important; }
:root {
  --ground: #000;
  --panel: #111;
  --raised: #1c1c1c;
  --nested: #2a2a2a;
  --rule: #222;
  --control: #5c5c5c;          /* control edges: 3:1 on black */
  --text: #fff;
  --muted: #b4b4b4;
  --meta: #949494;
  --parchment: #fff4e0;        /* the Panay wordmark */
  --hue: #f5b83d;              /* the one data hue */
  --hue-tint: rgba(245, 184, 61, 0.14);
  --positive: #9fd8a6;
  --danger: #ff8f80;

  --display: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  /* Grid: a 1120px column of 12 x 77.33px columns with 16px gutters (12*77.33 + 11*16 = 1104 + 16 padding
     each side inside the 1152 frame). Blocks span 8+4, then 4+4+4, so every internal edge meets one above. */
  --col: 1120px;
  --gap: 16px;
  --pad: 16px;
  --r: 12px;
  --r-row: 8px;
  --tap: 44px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--text);
  font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--parchment); outline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dash { color: var(--meta); }

/* ========== buttons ========== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  background: var(--nested); color: var(--text); border: 0; border-radius: 18px;
  font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.12s, transform 0.08s;
}
.btn:hover { background: #363636; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--primary { background: var(--text); color: #000; }
.btn--primary:hover { background: #e2e2e2; }
.btn--quiet { background: transparent; color: var(--muted); padding: 0 10px; }
.btn--quiet:hover { background: var(--raised); color: var(--text); }
.btn--danger { background: transparent; color: var(--danger); }
.btn--danger:hover { background: #2a1513; }
.btn--small { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 15px; }
.btn--wide { width: 100%; justify-content: center; }

/* ========== top bar ========== */
.bar {
  position: sticky; top: 0; z-index: 10; background: var(--ground);
  border-bottom: 1px solid transparent; transition: border-color 0.15s;
}
.bar.is-scrolled { border-bottom-color: var(--rule); }
.bar-in {
  max-width: calc(var(--col) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad);
  height: 48px; display: flex; align-items: center; gap: 28px;
}
.bar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.bar-logo img { height: 18px; width: auto; display: block; }
.bar-logo span { font: 400 14px/1 var(--display); color: var(--muted); letter-spacing: 0.01em; }
.bar-clients { display: flex; gap: 20px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bar-clients a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; padding: 13px 0; }
.bar-clients a:hover { color: var(--text); }
.bar-clients a[aria-current="page"] { color: var(--text); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.bar-who { color: var(--meta); font-size: 13px; }
.bar-menu { display: none; }
@media (max-width: 760px) {
  .bar-in { gap: 12px; }
  .bar-clients, .bar-who { display: none; }
  .bar-menu { display: inline-flex; }
}

/* the phone menu sheet */
.sheet { position: fixed; inset: 48px 0 auto 0; z-index: 20; background: var(--panel); padding: 8px 16px 16px; }
.sheet a, .sheet button { display: flex; width: 100%; align-items: center; min-height: var(--tap); padding: 0 8px; border-radius: 8px;
  background: none; border: 0; color: var(--muted); text-decoration: none; font-size: 16px; cursor: pointer; }
.sheet a[aria-current="page"] { color: var(--text); }
.sheet hr { border: 0; height: 1px; background: var(--rule); margin: 8px 0; }

/* ========== page frame ========== */
main { max-width: calc(var(--col) + 2 * var(--pad)); margin: 0 auto; padding: 36px var(--pad) 96px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--meta); font-size: 14px; margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.head { display: flex; align-items: flex-end; gap: 16px; justify-content: space-between; margin-bottom: 28px; }
.head h1 { font: 400 32px/1.1 var(--display); letter-spacing: -0.01em; }
.head h1 .num { color: var(--muted); margin-right: 12px; }
.head-line { color: var(--muted); margin-top: 8px; font-size: 15px; }
.head-line strong { color: var(--hue); font-weight: 500; }
.head-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 760px) {
  main { padding: 20px 16px 72px; }
  .head { flex-direction: column; align-items: stretch; margin-bottom: 20px; }
  .head h1 { font-size: 26px; }
  .head-actions { flex-wrap: wrap; }
}

.loading, .page-error { padding: 96px 0; color: var(--muted); }
.page-error p + p { margin-top: 12px; }

/* ========== status ========== */
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--control); flex: none; }
.status--wait { color: var(--hue); }
.status--wait::before { background: var(--hue); }
.status--done { color: var(--text); }
.status--done::before { background: var(--text); }
.status--dropped { color: var(--meta); text-decoration: line-through; }
.status--dropped::before { background: var(--nested); }
.status--hold::before { background: transparent; border: 1.5px solid var(--control); width: 9px; height: 9px; }

/* ========== client page: the job table ========== */
.jobs { background: var(--panel); border-radius: var(--r); padding: 8px; }
.jobs-head, .job-row {
  display: grid; align-items: center; gap: 16px;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.6fr) 88px;
  padding: 0 16px;
}
.jobs-head { height: 36px; color: var(--meta); font-size: 13px; }
.job-row { min-height: 64px; border-radius: var(--r-row); text-decoration: none; color: var(--text); transition: background 0.12s; }
.job-row + .job-row { margin-top: 2px; }
.job-row:hover { background: var(--raised); }
.job-name { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.job-name .num { color: var(--muted); font-size: 14px; flex: none; min-width: 3.4em; }
.job-name b { font: 400 18px/1.25 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-cell { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-edit b { color: var(--text); font-weight: 500; }
.job-edit span { color: var(--meta); margin-left: 8px; }
.job-when { color: var(--meta); font-size: 13px; text-align: right; }
.job-cell .wait { color: var(--hue); }
.jobs-empty { padding: 40px 16px; color: var(--muted); }
.jobs-empty p + p { margin-top: 6px; color: var(--meta); }
@media (max-width: 900px) {
  .jobs-head { display: none; }
  .job-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "meta meta"; gap: 4px 12px; padding: 12px; }
  .job-name { grid-area: name; }
  .job-row .status { grid-area: status; }
  .job-row .job-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--meta); font-size: 13px; }
  .job-row .job-cell, .job-row .job-when { display: none; }
}
@media (min-width: 901px) { .job-meta { display: none; } }

/* ========== job page ========== */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.fact { background: var(--panel); border-radius: var(--r); padding: 14px 16px; min-height: 76px; }
.fact dt { color: var(--meta); font-size: 13px; margin-bottom: 4px; }
.fact dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.span-12 { grid-column: 1 / -1; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.fill { display: grid; }
.span-4 { grid-column: span 4; }
.stack { display: grid; gap: var(--gap); align-content: start; }
@media (max-width: 900px) { .span-8, .span-6, .span-4 { grid-column: 1 / -1; } }

.panel { background: var(--panel); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 30px; }
.panel-head h2 { font-size: 14px; font-weight: 600; }
.panel-head h2 a { text-decoration: none; }
.panel-head h2 a:hover { text-decoration: underline; }
.panel-head .count { color: var(--meta); font-size: 13px; }
.panel-head .btn { margin-left: auto; }

/* the latest edit: the screen's answer, so the biggest thing on it */
.latest { display: grid; gap: 4px; }
.latest-ver { font: 400 56px/1 var(--display); letter-spacing: -0.02em; }
.latest-title { font-size: 17px; margin-top: 6px; overflow-wrap: anywhere; }
.latest-meta { color: var(--meta); font-size: 13px; }
.latest-note { color: var(--muted); margin-top: 8px; max-width: 60ch; white-space: pre-wrap; }
.latest-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.latest-player { margin-top: 16px; --pp-accent: var(--text); --pp-line: var(--rule); --pp-hover: var(--raised); --pp-radius: 8px; }
.empty-slot { color: var(--muted); }
.empty-slot p + p { color: var(--meta); font-size: 13px; margin-top: 4px; }

/* the edit ladder: every edit on one line, oldest to newest, the latest in the hue */
.ladder { margin-top: 24px; }
.ladder-label { color: var(--meta); font-size: 13px; margin-bottom: 8px; }
.ladder-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.rung {
  flex: none; display: grid; gap: 2px; min-width: 76px; padding: 8px 10px; border-radius: var(--r-row);
  background: var(--raised); color: var(--muted); text-decoration: none; border: 0; cursor: pointer; text-align: left; font: inherit;
  transition: background 0.12s;
}
.rung:hover { background: var(--nested); color: var(--text); }
.rung b { font-weight: 500; font-size: 14px; color: var(--text); }
.rung span { font-size: 12px; color: var(--meta); }
.rung.is-latest { background: var(--hue-tint); }
.rung.is-latest b { color: var(--hue); }

/* item rows inside panels */
.items { display: grid; gap: 6px; }
.item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  background: var(--raised); border-radius: var(--r-row); padding: 10px 12px; min-height: 52px;
}
.item.is-old { background: transparent; }
.item.is-old .item-title { color: var(--muted); font-weight: 400; }
.item-main { min-width: 0; }
.item-title { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
a.item-title:hover { text-decoration: underline; }
.item-sub { color: var(--meta); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub .ver { color: var(--muted); }
.item-note { color: var(--muted); font-size: 13px; margin-top: 4px; white-space: pre-wrap; grid-column: 1 / -1; }
.item-tools { display: flex; gap: 2px; }
.more { color: var(--meta); font-size: 13px; margin-top: 10px; }
.more a { color: var(--muted); }

/* the three group cards on the job page */
.group-slots { display: grid; gap: 2px; }
.group-slot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
  padding: 10px 12px; border-radius: var(--r-row); text-decoration: none; color: var(--text); min-height: 52px;
  transition: background 0.12s;
}
.group-slot:hover { background: var(--raised); }
.group-slot b { font-weight: 500; }
.group-slot .n { color: var(--meta); font-size: 13px; }
.group-slot .last { grid-column: 1 / -1; color: var(--meta); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel--group { display: flex; flex-direction: column; }
.group-open { margin-top: auto; padding-top: 12px; }

/* group sub-page: one section per slot */
.slots { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 900px) { .slots { grid-template-columns: 1fr; } }
.slot-history summary { color: var(--meta); font-size: 13px; cursor: pointer; margin-top: 10px; padding: 6px 0; }
.slot-history .items { margin-top: 6px; }

/* ========== dialogs ========== */
dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px;
  background: var(--panel); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,0.7); /* taste-skill-ignore: a dialog truly floats */
}
dialog::backdrop { background: rgba(0,0,0,0.72); }
dialog.dlg-player { width: min(1100px, calc(100vw - 32px)); }
.dlg { padding: 24px; display: grid; gap: 16px; }
.dlg h2 { font: 400 22px/1.2 var(--display); }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-foot .btn--danger { margin-right: auto; }
.field { display: grid; gap: 6px; }
.field label, .field .label { color: var(--muted); font-size: 13px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--ground); border: 1px solid var(--control); border-radius: 8px; padding: 9px 11px; font-size: 15px;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--parchment); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.hint { color: var(--meta); font-size: 13px; }
.form-error { color: var(--danger); font-size: 14px; }
.seg { display: inline-flex; background: var(--ground); border-radius: 18px; padding: 3px; gap: 2px; justify-self: start; }
.seg button { height: 30px; padding: 0 14px; border-radius: 15px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--nested); color: var(--text); }
.progress { height: 4px; background: var(--nested); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--text); transition: width 0.2s; }

/* ========== toast ========== */
#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(8px); z-index: 50;
  max-width: min(36rem, calc(100vw - 2rem)); display: flex; align-items: center; gap: 14px;
  background: var(--parchment); color: #000; padding: 10px 16px; border-radius: 22px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s;
}
#toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
#toast.is-error { background: #ffd9d4; color: #4a0e0a; }
#toast button { background: none; border: 0; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* ========== sign-in page ========== */
.signin { width: min(24rem, calc(100% - 32px)); margin: 0 auto; padding: calc(64px + env(safe-area-inset-top, 0px)) 0 64px; }
.signin-logo { height: 30px; width: auto; margin-bottom: 40px; }
.signin h1 { margin: 0 0 6px; font: 400 32px/1.1 var(--display); }
.signin-form { display: grid; gap: 16px; margin-top: 28px; }
.signin-form .btn { height: 44px; border-radius: 22px; justify-content: center; font-size: 15px; }
.signin-form .btn--wide { background: var(--nested); color: var(--text); }
.signin-sub { margin: 0; font: 400 20px/1.2 var(--display); }
.notice { margin: 0; padding: 12px 14px; background: var(--panel); border-radius: 8px; color: var(--text); font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--meta); font-size: 13px; margin-top: 8px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (max-width: 760px) { .bar-desk { display: none; } }
.notice--top { margin-bottom: 24px; }
.notice a { color: var(--text); }

/* ========== pieces table on the job page ==========
   The job's answer: every piece, grouped by type, with its people, status, latest edit and the links to open.
   Columns: name 2.2fr, source 1fr, editor 1fr, status 1.3fr, latest 1.3fr, links 1.8fr. */
.ptable { display: grid; gap: 4px; }
.prow {
  display: grid; align-items: center; gap: 12px; padding: 0 12px; min-height: 52px; border-radius: var(--r-row);
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1.8fr);
  transition: background 0.12s;
}
.prow:not(.prow--head):hover { background: var(--raised); }
.prow--head { min-height: 28px; color: var(--meta); font-size: 13px; }
.pgroup + .pgroup { margin-top: 12px; }
.pgroup-label { display: flex; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 12px 4px; }
.pgroup-label span { color: var(--meta); font-weight: 400; }
.prow-name { font: 400 17px/1.3 var(--display); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-name:hover { text-decoration: underline; }
.prow-cell { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-ver { display: grid; min-width: 0; }
.prow-ver b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-ver span { color: var(--meta); font-size: 12px; }
.prow-links { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.prow.is-dropped .prow-name, .prow.is-dropped .prow-cell, .prow.is-dropped .prow-ver b { color: var(--meta); }
.prow.is-dropped .prow-name { text-decoration: line-through; }
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; border: 0;
  background: var(--nested); color: var(--text); font: 500 12px/1 var(--body); text-decoration: none; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background 0.12s;
}
.chip:hover { background: #3a3a3a; }
.chip--add { background: transparent; color: var(--muted); }
.chip--add:hover { background: var(--raised); color: var(--text); }
@media (max-width: 900px) {
  .prow--head { display: none; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "meta meta" "links links"; gap: 6px 12px; padding: 10px 12px; }
  .prow > :nth-child(1) { grid-area: name; }
  .prow > :nth-child(4) { grid-area: status; }
  .prow > :nth-child(2), .prow > :nth-child(3) { display: none; }
  .prow > :nth-child(5) { grid-area: meta; display: flex; gap: 8px; align-items: baseline; }
  .prow > :nth-child(6) { grid-area: links; }
}
.also { margin-top: 20px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--text); }
/* Editorial elements across the full width on the job page: the five slots side by side. */
.panel--wide .group-slots { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.panel--wide .group-slot { background: var(--raised); align-content: start; min-height: 76px; }
.panel--wide .group-slot:hover { background: var(--nested); }
@media (max-width: 900px) { .panel--wide .group-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .panel--wide .group-slots { grid-template-columns: 1fr; } }
.group-slot .status { font-size: 13px; }
.group-slot.is-dropped b { color: var(--meta); text-decoration: line-through; }
@media (max-width: 520px) { .panel--wide .group-slot { min-height: 52px; } }

/* ========== media: thumbnails, drop targets, the gallery ========== */
.pic { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--nested); border-radius: 6px; overflow: hidden; }
.pic img, .pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-tile { position: absolute; inset: 0; display: grid; place-items: center; color: var(--meta); font-size: 11px; padding: 4px; text-align: center; }
.pic-tile b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pic-play { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; display: grid; place-items: center; }
.pic-play svg { width: 10px; height: 10px; margin-left: 1px; }
.pic--big { width: 100%; max-width: 640px; }
.pic--big .pic-play { width: 44px; height: 44px; right: 12px; bottom: 12px; }
.pic--big .pic-play svg { width: 20px; height: 20px; }
.prow-first { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prow-pic { flex: none; width: 64px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; }
.prow-pic.is-empty { height: 36px; background: var(--raised); border-radius: 6px; cursor: default; }
.prow-pic:hover .pic { outline: 1px solid var(--muted); }
.latest-pic { display: block; width: 100%; max-width: 640px; margin-top: 16px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ladder-row.has-pics .rung { width: 132px; }
.rung .pic { margin-bottom: 6px; }
/* A file drag over a target lights it and says what a drop will do. */
.is-drop { position: relative; background: var(--raised) !important; }
.is-drop::after {
  content: attr(data-drop); position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  background: rgba(0,0,0,0.72); color: var(--text); font-weight: 500; border-radius: inherit; pointer-events: none;
}
label.btn { cursor: pointer; }

dialog.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border-radius: 0; background: #000;
  padding: 16px 24px 20px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; box-shadow: none;
}
dialog.lightbox:not([open]) { display: none; }
dialog.lightbox::backdrop { background: #000; }
.lb-top { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; }
.lb-head { min-width: 0; }
.lb-title { font: 400 22px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sub { color: var(--meta); font-size: 13px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-nav { display: flex; align-items: center; gap: 8px; flex: none; }
.lb-count { color: var(--muted); font-size: 13px; min-width: 64px; text-align: center; }
.lb-stage { display: grid; place-items: center; min-height: 0; --pp-accent: var(--text); --pp-line: var(--rule); --pp-hover: var(--raised); }
/* The player keeps 16:9 plus its ~76px control bar inside the stage: chrome above and below takes ~230px, curate adds 48. */
.lb-stage > .player { width: min(100%, calc((100vh - 310px) * 16 / 9)); }
dialog.lightbox.is-curating .lb-stage > .player { width: min(100%, calc((100vh - 360px) * 16 / 9)); }
.lb-stage { position: relative; }
.lb-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lb-stage > iframe { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 1000px); height: 100%; border: 0; background: #fff; border-radius: 4px; }
.lb-card { display: grid; gap: 16px; justify-items: center; color: var(--muted); width: min(100%, 640px); }
.lb-actions { display: flex; gap: 8px; justify-content: center; }
@media (max-width: 760px) {
  dialog.lightbox { padding: 12px; }
  .lb-top { flex-direction: column; }
  .lb-nav { width: 100%; justify-content: space-between; }
  .prow-pic { width: 48px; }
}

/* ========== the review switch ==========
   Green: on the client review site. Red: hidden. A status, so it may carry colour; nothing else does. */
:root { --on: #3ccf74; --off: #ff5c52; }
.rdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--control); /* taste-skill-ignore: a ring, not a shadow */ flex: none; vertical-align: middle; margin-right: 6px; }
.rdot.is-review { background: var(--on); box-shadow: none; /* taste-skill-ignore */ }
.chip .rdot { margin-right: 6px; }
.lb-titlerow { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lb-tag { color: var(--on); font-size: 13px; flex: none; }
.lb-tag:empty { display: none; }
.lb-curate { display: none; align-items: center; gap: 8px; justify-content: center; }
dialog.lightbox.is-curating .lb-curate { display: flex; }
dialog.lightbox.is-curating { grid-template-rows: auto auto minmax(0, 1fr) auto; }
dialog.lightbox:not(.is-curating) { grid-template-rows: auto minmax(0, 1fr) auto; }
.rswitch {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 18px; border: 0;
  background: var(--raised); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.rswitch kbd, .btn kbd { font: 500 11px/1 var(--body); color: var(--meta); padding: 3px 5px; border-radius: 4px; background: rgba(255,255,255,0.08); }
.rswitch--on[aria-pressed="true"] { background: var(--on); color: #00210d; }
.rswitch--off[aria-pressed="true"] { background: var(--off); color: #2a0503; }
.rswitch[aria-pressed="true"] kbd { color: inherit; background: rgba(0,0,0,0.12); }
.lb-tally { color: var(--meta); font-size: 13px; margin-left: 8px; }
/* While curating, the stage's edge says which side the item is on. */
dialog.lightbox.is-curating .lb-stage { border-radius: 8px; box-shadow: inset 0 0 0 2px var(--off); /* taste-skill-ignore: the curate edge */ }
dialog.lightbox.is-curating[data-review="on"] .lb-stage { box-shadow: inset 0 0 0 2px var(--on); /* taste-skill-ignore: the curate edge */ }
.btn[aria-pressed="true"] { background: var(--nested); color: var(--text); }
.pic-count { position: absolute; left: 4px; bottom: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; font-weight: 500; display: grid; place-items: center; }

/* ========== Sandra's cut (Nov 3): the client page is just the jobs ========== */
.jobs .job-row { grid-template-columns: minmax(0, 1fr) auto 24px; grid-template-areas: none; min-height: 64px; padding: 0 16px; gap: 16px; }
.jobs .job-row > * { grid-area: auto; }
.job-name b { font-size: 20px; }
.job-wait { color: var(--hue); font-size: 14px; }
.job-go { color: var(--meta); text-align: right; transition: transform 0.12s, color 0.12s; }
.job-row:hover .job-go { color: var(--text); transform: translateX(3px); }
/* Other pieces on a piece page run across the full width. */
.panel--others .group-slots { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; }
