/* Stageframe / NDRS.ai product desk */
:root {
  --black: #060606;
  --cream: #f2eee3;
  --paper: #f8f6ef;
  --amber: #d4a52f;
  --muted: #8c8880;
  --line: #272727;
  --line-soft: #3a3731;
  --ink-2: #0d0c0a;
  --ok: #8aae70;
  --radius: 0;
  --shell: 1440px;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

.eyebrow, .chip-label, .pill, .desk-foot, .lbl, .tiny, .ghost, .primary, .meta {
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.eyebrow { margin: 0 0 8px; font-size: 10px; color: var(--amber); font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }

.top {
  position: sticky; top: 0; z-index: 30;
  height: 72px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(6,6,6,.92);
  backdrop-filter: blur(18px);
}
.brand-lockup { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 34px; height: 34px; border: 1px solid var(--black);
  background: var(--amber); color: var(--black);
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; letter-spacing: -.04em;
}
.brand-lockup h1 {
  margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.04em; line-height: 1;
}
.brand-lockup h1 em { font-style: normal; color: var(--amber); }
.top-actions { display: flex; gap: 8px; align-items: center; }

.pill {
  font-size: 10px; padding: 7px 12px; border: 1px solid var(--line);
  color: var(--muted);
}
.pill.ok { color: var(--ok); border-color: rgba(138,174,112,.45); }
.pill.muted { color: var(--muted); }

button {
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--cream);
  min-height: 40px; padding: 0 14px;
  cursor: pointer;
}
button:hover { border-color: #555149; }
button.primary {
  background: var(--amber); color: var(--black); border-color: var(--amber);
  font: 600 10px/1 "JetBrains Mono", monospace;
  letter-spacing: .12em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
}
button.primary:hover { background: var(--cream); border-color: var(--cream); }
button.ghost {
  font: 500 10px/1 "JetBrains Mono", monospace;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--cream); border-color: var(--line-soft);
}
button.ghost:hover { border-color: var(--amber); color: var(--amber); }
button.tiny {
  min-height: 28px; padding: 0 8px; font-size: 9px;
}
button.full { width: 100%; margin-top: 8px; }
button:disabled { opacity: .45; cursor: not-allowed; }

.desk {
  display: grid;
  grid-template-columns: 300px minmax(0,1fr) 320px;
  gap: 0;
  min-height: calc(100vh - 72px - 44px);
  border-bottom: 1px solid var(--line);
}
.rail, .stage { padding: 22px; }
.rail.ink { background: var(--black); border-right: 1px solid var(--line); }
.rail.ink + .stage + .rail { border-right: 0; border-left: 1px solid var(--line); }
.stage.paper { background: #0a0908; }
section + section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }

.sec-head, .stage-head, .row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sec-head { margin-bottom: 12px; }
.stage-head { margin-bottom: 16px; }
h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: .95;
  letter-spacing: -.045em;
  font-weight: 800;
}

.lbl { display: block; margin: 12px 0 6px; font-size: 9px; color: var(--muted); }
textarea, input, select {
  width: 100%;
  background: #0d0c0a;
  color: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 11px 12px;
  outline: none;
}
textarea { resize: vertical; line-height: 1.45; }
textarea:focus, input:focus, select:focus { border-color: var(--amber); }

.chip-label {
  margin: 14px 0 8px;
  font-size: 9px; color: #68645d; font-weight: 500;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  min-height: 32px; padding: 0 10px;
  font: 500 10px/1 "JetBrains Mono", monospace;
  letter-spacing: .08em; text-transform: uppercase;
  border-color: var(--line-soft); color: #b0aba1;
}
.chips button.on, .chips button:hover {
  border-color: var(--amber); color: var(--cream); background: #12100c;
}

.shot-line {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--amber);
  font: 500 10px/1.4 "JetBrains Mono", monospace;
  letter-spacing: .08em; text-transform: uppercase;
}

.check {
  display: flex; gap: 8px; align-items: center;
  margin: 10px 0; font-size: 13px; color: var(--muted);
}

.view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 42vh;
  overflow: auto;
  padding-right: 2px;
}
.view-card {
  border: 1px solid var(--line);
  background: #090909;
  min-height: 132px;
  display: flex; flex-direction: column;
  transition: background .15s;
}
.view-card:hover { background: #0f0d08; }
.view-card .card-top {
  display: flex; justify-content: space-between; align-items: start;
  padding: 8px 8px 0;
  color: #827f78;
  font: 500 8px/1 "JetBrains Mono", monospace;
  letter-spacing: .1em; text-transform: uppercase;
}
.view-card .card-top .arrow { color: var(--amber); }
.view-card .thumb {
  margin: 8px; height: 72px; border: 1px solid var(--line);
  background: #0b0b0b; display: grid; place-items: center;
  overflow: hidden; color: #555149; font-size: 10px;
}
.view-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.view-card .card-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  margin-top: auto; border-top: 1px solid var(--line);
}
.view-card .card-actions button {
  min-height: 28px; border: 0; border-radius: 0;
  font-size: 8px; letter-spacing: .08em;
  background: transparent; color: #9a958c;
}
.view-card .card-actions button:hover { background: #12100c; color: var(--amber); }
.view-card.filled .card-top { color: var(--cream); }

.fav-strip { display: grid; gap: 8px; max-height: 28vh; overflow: auto; }
.fav-item {
  display: grid; grid-template-columns: 52px 1fr; gap: 8px;
  border: 1px solid var(--line); padding: 6px; background: #090909;
}
.fav-item img { width: 52px; height: 66px; object-fit: cover; }
.fav-item .meta { font-size: 10px; color: var(--muted); margin-top: 2px; text-transform: none; letter-spacing: 0; font-family: Archivo, sans-serif; }
.fav-item button { margin-top: 4px; min-height: 26px; font-size: 9px; width: 100%; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.gallery.empty {
  display: grid; place-items: center;
  min-height: 52vh;
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 28px; text-align: center;
  font-size: 15px; line-height: 1.5;
}
.tile {
  position: relative; border: 1px solid var(--line);
  background: #0b0c10; aspect-ratio: 3/4; overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.tile .actions {
  position: absolute; inset: auto 0 0 0;
  display: flex; gap: 1px; padding: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}
.tile .actions button {
  flex: 1; min-height: 32px; border: 0; font-size: 9px;
  background: rgba(0,0,0,.35);
}
.tile.sel { border-color: var(--amber); }
.tile .vote-row {
  position: absolute;
  left: 0; right: 0;
  bottom: 32px;
  display: none;
  gap: 1px;
  z-index: 2;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
}
.tile:hover .vote-row,
.tile:focus-within .vote-row,
.tile.sel .vote-row {
  display: flex;
}
.tile .vote-row button {
  flex: 1;
  min-height: 30px;
  border: 0;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  background: rgba(0,0,0,.45);
  color: var(--cream);
}
.tile .vote-row button:hover {
  color: var(--amber);
  background: rgba(18,16,12,.85);
}
.tile .vote-row button.on { background: #12100c; }
.tile .vote-row button[data-a="up"].on { color: var(--ok); }
.tile .vote-row button[data-a="down"].on { color: #c47a6a; }
.tile .vote-row button.danger {
  font: 500 9px/1 "JetBrains Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tile .vote-row button.danger:hover { color: #e08a7a; }

.ref-chip {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid rgba(212,165,47,.45);
  background: rgba(212,165,47,.08);
  color: var(--amber);
  font: 500 10px/1 "JetBrains Mono", monospace;
  letter-spacing: .08em; text-transform: uppercase;
}

.desk-foot {
  height: 44px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  color: #625e57; font-size: 9px; border-top: 1px solid var(--line);
}

.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox img { max-width: min(90vw, 920px); max-height: 70vh; border: 1px solid var(--line); }
.lightbox .close {
  position: absolute; top: 14px; right: 18px;
  border: 0; background: transparent; color: #fff; font-size: 28px; min-height: auto;
}
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; justify-content: center; }
.lb-assign { display: flex; gap: 6px; align-items: center; }
.lb-assign select { width: auto; min-width: 160px; }

dialog {
  border: 1px solid var(--line);
  background: var(--black);
  color: var(--cream);
  padding: 22px;
  width: min(460px, 92vw);
}
dialog::backdrop { background: rgba(0,0,0,.7); }
dialog h2 { margin: 0 0 10px; font-size: 34px; letter-spacing: -.05em; }
.end { justify-content: flex-end; margin-top: 16px; }

@media (max-width: 1100px) {
  .desk { grid-template-columns: 1fr; }
  .rail.ink { border-right: 0; border-bottom: 1px solid var(--line); }
  .view-grid { max-height: none; }
}
