/* Workshop Board. House style: Inter, ink on white, flat (no blurred shadows), 4px corners,
   brand pink only where something is urgent. Phones first; columns from 760px; a big-type
   workshop screen mode (body.screen). */

:root {
  --ink: #111111;
  --paper: #ffffff;
  --ground: #f4f4f5;
  --line: #e4e4e6;
  --muted: #5f5f66;
  --pink: #D10074;
  --green: #36dd45;   /* produced: DN's hub ticks (owner's green, 14 Oct). Too light for white text: labels use ink */
  --warn-bg: #fff4f9;
  --r: 4px;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --top: 56px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.problem { color: var(--ink); background: var(--warn-bg); border: 1.5px solid var(--pink); border-radius: var(--r); padding: 10px 12px; font-weight: 600; }

/* buttons: white and outlined, like the size boxes on the shop */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: var(--r); background: var(--paper); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ground); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #333; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--ground); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; border-width: 1.5px; }
.btn.wide { width: 100%; }
.link { background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.field input, .field textarea { min-height: 48px; padding: 10px 12px; border: 1.5px solid #b8b8bd; border-radius: var(--r); background: var(--paper); font-size: 16px; font-weight: 400; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; font-size: 17px; white-space: nowrap; }
.heart { width: 26px; height: 26px; flex: none; }

#app { min-height: 100%; }
.loading { padding: 24px; }

/* ---------- sign in ---------- */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--paper); }
.signin-box { width: min(440px, 100%); display: grid; gap: 22px; }
.signin h1 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.name-btn { min-height: 64px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--paper); font-size: 18px; font-weight: 700; cursor: pointer; }
.name-btn:hover { background: var(--ground); }
#pin-form, #setup-form { display: grid; gap: 14px; }
#pin { font-size: 28px; letter-spacing: .4em; text-align: center; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { min-height: 58px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper); font-size: 22px; font-weight: 700; cursor: pointer; }
.key:active { background: var(--ground); }
.key[data-k="clear"], .key[data-k="del"] { font-size: 15px; color: var(--muted); }
.back { justify-self: start; }

/* ---------- top bar and toolbar ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; min-height: var(--top);
  padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--paper); border-bottom: 2px solid var(--ink); }
.sync { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn { font-weight: 700; padding: 2px 8px; border: 1.5px solid var(--pink); border-radius: var(--r); background: var(--warn-bg); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.top-actions .btn { white-space: nowrap; padding: 0 10px; }
#refresh span[aria-hidden] { font-size: 18px; }
#refresh.busy span[aria-hidden] { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 759px) {
  .top { gap: 8px; padding-left: 12px; padding-right: 8px; }
  .top .brand span, .wide-only { display: none; }
  .sync { font-size: 12px; white-space: normal; line-height: 1.25; }
}
.clock { display: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); display: grid; z-index: 10; }
.menu button { text-align: left; background: none; border: 0; padding: 14px 16px; font-weight: 600; cursor: pointer; }
.menu button + button { border-top: 1px solid var(--line); }
.menu button:hover { background: var(--ground); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.chip-btn { flex: none; min-height: 38px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip-btn.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.search input { min-height: 40px; width: min(280px, 100%); padding: 0 12px; border: 1.5px solid #b8b8bd; border-radius: var(--r); font-size: 16px; }
.search { flex: 0 1 280px; }

/* ---------- view switch and week bar ---------- */
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; flex: none; }
.seg button { min-height: 36px; padding: 0 14px; border: 0; background: var(--paper); font-weight: 700; font-size: 14px; cursor: pointer; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.weekbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.week-nav { display: flex; align-items: center; gap: 8px; }
.week-nav b { min-width: 7em; text-align: center; }
.card-status { display: flex; }

/* ---------- stage tabs (phones) ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: var(--top); z-index: 4; }
.tab { flex: none; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tab b { margin-left: 4px; color: var(--muted); }
.tab.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tab.on b { color: #c9c9cf; }

/* ---------- the board ---------- */
.board { padding: 12px 16px 96px; }
.board-note { padding: 12px 0; font-weight: 600; }
.col { display: none; }
.col.current { display: block; }
.col-head { display: none; }
.col-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; container-type: inline-size; }
.col-grip { display: none; }
.col-empty { color: var(--muted); padding: 20px 4px; text-align: center; }

.card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 12px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; }
.card:hover { border-color: var(--ink); }
.card.is-fast { border-color: var(--ink); }
.card-img { position: relative; width: 76px; height: 76px; border-radius: var(--r); overflow: hidden; background: var(--ground); display: grid; place-items: center; }
/* produced or sent: a green tick, the card greyed a little */
.tick { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.tick .ico { width: 16px; height: 16px; }
.card.is-done { background: var(--ground); }
.card.is-done .card-img { background: #e9e9ec; }
.card.is-done .card-img img { opacity: .55; filter: grayscale(.5); }
.card.is-done .card-title { color: #3a3a40; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { font-size: 11px; color: var(--muted); text-align: center; padding: 4px; }
.card-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; min-width: 0; }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.card-top .due { margin-left: auto; }
/* drag handle: this device's own order (app.js) */
.card-side { display: grid; gap: 4px; align-content: start; }
.drag { display: grid; place-items: center; width: 100%; height: 30px; padding: 0; border: 0; border-radius: var(--r); background: none; color: #9a9aa1; cursor: grab; touch-action: none; }
.drag:hover, .drag:focus-visible { background: var(--ground); color: var(--ink); }
.drag svg { width: 16px; height: 16px; }
.card.dragging { border-color: var(--ink); background: var(--ground); }
body.arranging, body.arranging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.ono { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.card-qty { font-size: 14px; }
.card-qty b { font-weight: 800; }
.card-qty span { color: var(--muted); }
.card-meta { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
/* labels stay on one line when they fit and wrap inside their box on narrow cards */
.chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border: 1.5px solid var(--line); border-radius: 3px; }
.chip.fast { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip.done { background: var(--green); border-color: var(--green); color: var(--ink); }
.chip.part { border-color: var(--green); color: var(--ink); }
.chip.hold { border-color: var(--ink); }
.chip.dnstep { color: var(--muted); }
.pill { display: inline-block; padding: 3px 8px; border-radius: 3px; font-weight: 800; font-size: 12.5px; letter-spacing: .02em; background: var(--ground); color: var(--ink); line-height: 1.3; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; border: 1px solid rgba(17,17,17,.25); box-sizing: border-box; }
.ico { width: 14px; height: 14px; }
.due { max-width: 100%; font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 3px; border: 1.5px solid var(--line); }
.due-overdue { background: var(--pink); border-color: var(--pink); color: #fff; }
.due-today { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.due-tomorrow { border-color: var(--ink); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.moved { font-size: 12px; color: var(--muted); }
.card-foot .next { margin-left: auto; }

/* week view: every day shows, stacked on phones */
.board.week .col { display: block; margin-bottom: 18px; }
.board.week .col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 2px 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--ink); margin-bottom: 10px; }
.board.week .col-head b { color: var(--muted); font-size: 12px; letter-spacing: 0; text-transform: none; }
.board.week .col.today .col-head { background: var(--ink); color: var(--paper); padding: 6px 8px; border-radius: var(--r) var(--r) 0 0; }
.board.week .col.today .col-head b { color: #c9c9cf; }
.board.week .col.late .col-head span::after { content: " ⚠"; }

.fold { display: none; margin-left: 8px; text-transform: none; letter-spacing: 0; }
@media (max-width: 759px) {
  .fold { display: inline; }
  .board.week .col.late:not(.open) .col-list { display: none; }
}

/* ---------- columns from tablet width ---------- */
@media (min-width: 760px) {
  .tabs { display: none; }
  .board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 12px 16px 16px;
    height: calc(100dvh - var(--top) - 61px); }
  /* Columns grow to share the screen's width (up to 640px each); empty ones stay narrow. When there
     are more than fit, they keep their base width and the board scrolls sideways. */
  .col, .col.current { position: relative; display: flex; flex-direction: column; flex: 1 0 280px; max-width: 640px; max-height: 100%; background: transparent; }
  .col.empty { flex: 0 0 170px; }
  .board.week .col { display: flex; margin-bottom: 0; flex: 1 0 240px; }
  .board.week .col.empty { flex: 0 0 200px; }
  /* someone dragged a separator on this device: every column takes that width (--col-w, app.js) */
  .board.sized .col { flex: 0 0 var(--col-w); max-width: none; }
  .board.sized .col.empty { flex-basis: min(var(--col-w), 170px); }
  .board.week.sized .col.empty { flex-basis: min(var(--col-w), 200px); }
  .col-grip { display: block; position: absolute; top: 0; bottom: 0; right: -12px; width: 12px; cursor: col-resize; touch-action: none; z-index: 2; }
  .col-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; border-radius: 1px; background: transparent; }
  .col-grip:hover::after, .col-grip:focus-visible::after, .col-grip.on::after { background: var(--ink); }
  .col-grip:focus-visible { outline: none; }
  body.resizing { cursor: col-resize; user-select: none; }
  .col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; border-bottom: 2px solid var(--ink); margin-bottom: 10px; }
  .col-head b { color: var(--muted); }
  .col-head .pill { font-size: 12.5px; text-transform: none; letter-spacing: .02em; }
  .col-list { overflow-y: auto; padding-bottom: 12px; min-height: 0; }
  .col-empty { padding: 10px 2px; text-align: left; font-size: 13px; }
}

/* ---------- workshop screen: read from across the room ---------- */
body.screen .toolbar, body.screen .card-foot .next, body.screen .tabs, body.screen .drag { display: none; }
body.screen .clock { display: inline; font-size: 22px; margin-right: 8px; }
body.screen .brand { font-size: 20px; }
@media (min-width: 760px) {
  body.screen .board { height: calc(100dvh - var(--top)); }
  body.screen .col, body.screen .col.current { flex-basis: 340px; }
  body.screen .col.empty { flex-basis: 150px; }
  body.screen .col-head { font-size: 16px; }
  body.screen .col-head .pill { font-size: 15px; padding: 4px 10px; }
  body.screen .card { grid-template-columns: 120px minmax(0, 1fr); }
  body.screen .card-img { width: 120px; height: 120px; }
  body.screen .tick { width: 32px; height: 32px; }
  body.screen .tick .ico { width: 20px; height: 20px; }
  body.screen .card-title { font-size: 21px; }
  body.screen .card-meta { font-size: 15px; }
  body.screen .card-qty { font-size: 17px; }
  body.screen .due, body.screen .chip { font-size: 13.5px; }
}

/* wider columns, bigger mock-ups */
@container (min-width: 400px) {
  .card { grid-template-columns: 110px minmax(0, 1fr); }
  .card-img { width: 110px; height: 110px; }
}
@container (min-width: 520px) {
  .card, body.screen .card { grid-template-columns: 150px minmax(0, 1fr); gap: 16px; }
  .card-img, body.screen .card-img { width: 150px; height: 150px; }
  .card-title { font-size: 18px; }
}

/* ---------- job sheet ---------- */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(17, 17, 17, .55); }
.sheet { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; background: var(--paper); }
@media (min-width: 760px) {
  .sheet { width: min(1000px, calc(100% - 48px)); height: auto; max-height: calc(100dvh - 48px); margin: auto; border: 2px solid var(--ink); border-radius: var(--r); }
}
.sheet-inner { display: grid; gap: 0; padding-bottom: 32px; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); background: var(--paper); border-bottom: 2px solid var(--ink); }
.sheet-head > div { display: grid; gap: 6px; min-width: 0; }
.sheet-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.sheet-head .ono { display: flex; gap: 8px; align-items: center; }
.close { font-size: 20px; min-width: 44px; }
.block { padding: 16px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.block h3 .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.stage-btn { min-height: 52px; border: 2px solid var(--line); border-radius: var(--r); background: var(--paper); font-weight: 700; font-size: 15px; cursor: pointer; }
.stage-btn:hover { border-color: var(--ink); }
.stage-btn.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ship-form, .note-form { display: grid; gap: 10px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r); }
.steps li .pill { text-align: right; }
.line { display: grid; gap: 10px; padding-bottom: 14px; }
.line + .line { border-top: 1px solid var(--line); padding-top: 14px; }
.line h4 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.sizes span { padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: var(--r); font-variant-numeric: tabular-nums; }
.views { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.view { margin: 0; display: grid; gap: 8px; }
.view .zoom:not(.link) { padding: 0; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--ground); cursor: zoom-in; }
.view img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.view figcaption { display: grid; gap: 4px; font-size: 14px; }
.sheet-who { font-size: 18px; font-weight: 700; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notes li { display: grid; gap: 4px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r); }
.notes li.dn { background: var(--ground); }
.notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.tag { justify-self: start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; background: var(--ink); color: var(--paper); border-radius: 3px; }
.history summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.history ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.confirm { display: grid; gap: 14px; padding: 22px; max-width: 520px; }
.confirm h2 { font-size: 22px; font-weight: 800; }
.sheet:has(.confirm) { height: auto; width: min(560px, calc(100% - 32px)); margin: auto; border: 2px solid var(--ink); border-radius: var(--r); }
.facts { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14.5px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.img-check { margin: 0; display: grid; gap: 6px; width: 160px; }
.img-check img { width: 160px; height: 160px; object-fit: contain; background: var(--ground); border: 1.5px solid var(--line); border-radius: var(--r); }
.staff-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.staff-list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r); }
.staff-list li .row { margin-left: auto; }
.staff-list li.off { opacity: .6; }
.inline-pin input { min-height: 36px; width: 120px; padding: 0 10px; border: 1.5px solid #b8b8bd; border-radius: var(--r); }
.row.wrap { align-items: flex-end; }

/* ---------- lightbox ---------- */
.lightbox { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; display: none; }
.lightbox.lb-light { background: #dcdce0; color: var(--ink); }
.lightbox.lb-white { background: #ffffff; color: var(--ink); }
.lightbox.lb-dark { background: #0b0b0c; color: #ffffff; }
.lightbox[open] { display: grid; place-items: center; grid-template-rows: auto auto minmax(0, 1fr) auto; padding: 12px 16px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.lb-bar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lb-seg button { min-height: 34px; padding: 0 12px; font-size: 13px; }
.lightbox.lb-dark .lb-seg { border-color: #ffffff; }
.lightbox.lb-dark .lb-seg button { background: #0b0b0c; color: #ffffff; }
.lightbox.lb-dark .lb-seg button + button { border-left-color: #ffffff; }
.lightbox.lb-dark .lb-seg button[aria-pressed="true"] { background: #ffffff; color: #0b0b0c; }
/* views one under the other (phones held upright), side by side on landscape screens */
.lb-views { width: 100%; height: 100%; min-height: 0; display: grid; gap: 16px; align-content: start; justify-items: center; overflow-y: auto; padding: 8px 0; }
.lb-view { margin: 0; width: 100%; min-width: 0; display: grid; gap: 6px; justify-items: center; }
/* who the job is for, readable from the bench on a tablet */
.lb-head { width: 100%; text-align: center; padding: 2px 8px 4px; }
.lb-name { font-size: clamp(28px, 4.8vw, 52px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.lb-sub { margin-top: 4px; font-size: clamp(18px, 2.6vw, 26px); font-weight: 700; }
.lb-view img { max-height: calc(100dvh - 260px); object-fit: contain; }
.lb-view figcaption { font-size: 14px; font-weight: 700; text-align: center; }
.lb-cap { padding: 8px; font-weight: 600; text-align: center; }
@media (orientation: landscape) and (min-width: 600px) {
  .lb-views { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-content: center; align-items: center; overflow: hidden; }
}
.lb-close { color: inherit; font-size: 22px; min-width: 44px; }
.lightbox.lb-dark .lb-close:hover { background: #222; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; width: min(440px, calc(100% - 32px)); padding: 12px 16px; background: var(--ink); color: var(--paper); border-radius: var(--r); font-weight: 600; }
.toast .link { color: var(--paper); }

@media (prefers-reduced-motion: no-preference) {
  .card, .btn, .chip-btn, .stage-btn { transition: border-color .12s, background-color .12s; }
}
