/* 3D Lettering — Robot Food tools palette (Artwork Checker / Copy Check) with its own accent */
:root {
  --bg: #111111; --s1: #1a1a1a; --s2: #222222; --line: #2a2a2a; --line2: #333333;
  --text: #ffffff; --muted: #a8a8a8; --dim: #8c8c8c;
  --accent: #ff3ec8; --fail: #ff6b6b; --fail-line: #5a2a2a; --pass: #3effc8;
  --ui: 'Instrument Sans', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; font-family: var(--ui); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
h1, h2, h3 { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* layout width (fixed, like the portal) */
.wrap { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 32px; }

/* header */
.hdr { height: 64px; flex-shrink: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 20; }
.hdr__in { height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; }
.rf { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: #fff; color: #111; border-radius: 5px; font-family: 'Archivo Black', Arial, sans-serif; font-size: 14px; line-height: 1; }
.rf--big { width: 52px; height: 52px; border-radius: 7px; font-size: 21px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav { display: flex; gap: 28px; height: 64px; }
.nav a { height: 64px; display: flex; align-items: center; font-weight: 500; color: var(--muted); }
.nav a:hover { color: #fff; }
.nav a.is-on { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.hdr__gap { flex-grow: 1; }
.hdr__link { font-size: 13px; font-weight: 500; color: var(--muted); }
.hdr__link:hover { color: #fff; }
.subnav { border-bottom: 1px solid var(--line); background: var(--bg); }
.subnav__in { height: 48px; display: flex; align-items: center; gap: 24px; }
.subnav a { height: 48px; display: flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--muted); }
.subnav a:hover { color: #fff; }
.subnav a.is-on { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 #fff; }
.avatar { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: transparent; border: 1px solid #fff; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; transition: background-color .15s; }
.avatar:hover, .menu.is-open .avatar { background: rgba(255,255,255,.1); }
.menu { position: relative; }
.menu__pop { position: absolute; right: 0; top: 44px; min-width: 220px; background: var(--s1); border: 1px solid var(--line2); border-radius: 10px; padding: 8px; display: none; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.menu.is-open .menu__pop { display: block; }
.menu__who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; }
.menu__pop button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.menu__pop button:hover { background: var(--s2); }
.menu__pop--pack { min-width: 230px; top: 50px; z-index: 20; }
.menu__pop a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.menu__pop a:hover { background: var(--s2); }
.menu__pop a b { font-weight: 600; }
.menu__pop a .dim { font-size: 12px; }

/* segmented + buttons */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--s1); border: 1px solid var(--line); border-radius: 8px; }
.seg a, .seg button, .seg label { height: 30px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; white-space: nowrap; }
.seg a:hover, .seg button:hover, .seg label:hover { color: #fff; }
.seg .is-on, .seg .is-on:hover, .seg input:checked + span, .seg label:hover input:checked + span { background: #fff; color: #111; font-weight: 600; }
.seg--radio label { padding: 0; }
.seg--radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg--radio span { height: 30px; padding: 0 14px; border-radius: 6px; display: inline-flex; align-items: center; }
.seg--radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 8px; background: var(--s1); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #555; }
.btn--go { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.btn--go:hover { filter: brightness(.93); border-color: var(--accent); }
.btn--sm { height: 34px; font-size: 13px; }
.btn--danger { color: var(--fail); }
.btn[disabled] { opacity: .45; cursor: default; }
.iconbtn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--s2); border: 1px solid var(--line2); border-radius: 6px; color: #fff; cursor: pointer; }
.chip { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line2); padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.chip--go { color: #111; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.chip--fail { color: var(--fail); border-color: var(--fail-line); }

/* layout */
main { flex-grow: 1; }
.page { width: 100%; max-width: 1600px; margin: 0 auto; padding: 32px 32px 48px; }
.pagehead { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 24px; }
.pagehead__text { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; }
.pagehead h1 { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; }
.crumbs a:hover { color: #fff; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.search { position: relative; width: 360px; }
.search svg { position: absolute; left: 12px; top: 12px; color: var(--dim); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; color: #fff; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #777; }
.search .input { padding-left: 38px; background: var(--s1); }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23bbbbbb' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 11px 8px; }
.select::-ms-expand { display: none; }
.select option { background: #1b1b1b; color: #fff; }
.toolbar .select { width: auto; background-color: var(--s1); }
.textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel__head { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.panel__head h2 { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.panel__head .grow { flex-grow: 1; }
.flash { margin: 20px 0 0; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line2); background: var(--s1); display: flex; gap: 10px; align-items: center; }
.flash--error { border-color: var(--fail-line); color: var(--fail); }
.flash--ok::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* banner */
.banner { margin-bottom: 24px; padding: 16px 20px; display: flex; align-items: center; gap: 20px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); }
.banner__body { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
.banner__title { font-weight: 600; }
.banner__list { font-size: 13px; color: var(--muted); }
.banner__list .mono { color: #fff; }
.banner form { margin: 0; }
.banner__x { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--muted); cursor: pointer; }

/* library */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1280px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.card:hover, .card:focus-visible { border-color: var(--accent); }
.card__art { height: 150px; background: var(--card-bg, #cdcdcd); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.card__art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card__flags { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card__top { display: flex; align-items: center; gap: 8px; }
.card__top .grow { flex-grow: 1; }
.card__code { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.card__title { font-size: 15px; font-weight: 500; }
.card__dim { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.card__dim2 { font-family: var(--mono); font-size: 12px; color: var(--dim); }

/* item */
.itemhead { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.itemhead__text { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; }
.itemhead__code { display: flex; align-items: center; gap: 10px; }
.itemhead__code .mono { font-size: 15px; font-weight: 700; color: var(--accent); }
.itemhead h1 { font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.oldbar { margin-bottom: 20px; padding: 14px 18px; border: 1px solid var(--accent); border-radius: var(--radius); display: flex; align-items: center; gap: 14px; }
.oldbar .grow { flex-grow: 1; }
.cols { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.spec__row { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line); }
.spec__k { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.spec__v { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.spec__v2 { font-size: 12px; color: var(--muted); }
.spec__v.warn { color: var(--fail); }
.swatch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.swatch__chip { width: 48px; height: 48px; border-radius: 6px; border: 1px solid var(--line2); flex-shrink: 0; }
.dl { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dl:hover { background: #1f1f1f; }
.dl__ico { width: 34px; height: 34px; border-radius: 8px; background: var(--s2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl__txt { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.dl__name { font-weight: 600; }
.dl__sub { font-size: 12px; color: var(--dim); font-family: var(--mono); }
.dl__go { color: var(--muted); }
.note { margin: 0; padding: 14px 16px 16px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.55; white-space: pre-line; }
.canvas { margin: 0 16px 16px; height: min(74vh, 820px); min-height: 520px; border-radius: 8px; background: #fff; overflow: hidden; }
.canvas svg { display: block; width: 100%; height: 100%; }
.canvas.is-zoomed { overflow: auto; cursor: grab; }
.canvas.is-zoomed svg { width: calc(100% * var(--z, 1)); height: calc(100% * var(--z, 1)); }
.preview .canvas { height: calc(100vh - 360px); min-height: 360px; }
.canvas--dark { background: #151515; }
.photos { padding: 0 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.photos a { display: block; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: var(--s2); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map { display: block; margin: 0 16px 16px; position: relative; border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; }
.map img { width: 100%; display: block; }
/* location spot: solid dot with a pulsing ring */
.spot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.45); pointer-events: none; }
.spot::before, .spot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: .55; animation: spot 2s ease-out infinite; }
.spot::after { animation-delay: 1s; }
@keyframes spot { from { transform: scale(1); opacity: .55; } to { transform: scale(4.2); opacity: 0; } }
.spot__label { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; font-weight: 700; color: #fff; background: #111; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .spot::before, .spot::after { animation: none; opacity: 0; } }
.ver { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ver__n { font-family: var(--mono); font-size: 13px; font-weight: 700; width: 32px; }
.ver__txt { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.ver__meta { font-size: 12px; color: var(--dim); }
.ver a.lnk { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.ver a.lnk:hover { color: #fff; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }

/* changelog */
.log__row { display: grid; grid-template-columns: 90px 90px 260px minmax(0, 1fr) 44px 20px; gap: 20px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.log__row:hover { background: #1f1f1f; }
.kind { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 0; border-radius: 4px; text-align: center; border: 1px solid var(--line2); }
.kind--added { color: #111; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.kind--archived { color: var(--fail); border-color: var(--fail-line); }
.kind--restored { color: var(--pass); border-color: #1d5a49; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); padding: 12px 16px; }
.tbl td { padding: 0 16px; height: 52px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr.rowlink { cursor: pointer; }
.tbl tr.rowlink:hover td { background: #1f1f1f; }
.tbl td.mono { font-size: 13px; }

/* admin editor */
.editor { display: grid; grid-template-columns: 560px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 110px; }
.fsec { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); }
.fsec h2 { font-size: 15px; font-weight: 600; }
.frow { display: flex; gap: 12px; align-items: flex-end; }
.frow > * { flex: 1 1 0; min-width: 0; }
.frow > .fixed { flex: 0 0 auto; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lab { font-size: 12px; font-weight: 600; color: var(--muted); }
.suffix { position: relative; }
.suffix .input { padding-right: 36px; }
.suffix span { position: absolute; right: 12px; top: 11px; font-size: 13px; color: var(--dim); pointer-events: none; }
.names { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.names b { font-weight: 500; color: #fff; }
.names .mono { color: #fff; }
.drop { min-height: 96px; border: 1px dashed var(--line2); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); cursor: pointer; padding: 14px; text-align: center; }
.drop:hover, .drop.is-over { border-color: var(--accent); color: #fff; }
.drop input { display: none; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.thumbs div { position: relative; height: 80px; border-radius: 6px; overflow: hidden; background: var(--s2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mapedit { position: relative; border-radius: 8px; overflow: hidden; cursor: crosshair; background: #fff; }
.spot[hidden] { display: none; }
.mapedit img { width: 100%; display: block; }
.preview { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.calc .k { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.calc .a { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.calc .b { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.warnbar { padding: 10px 14px; border: 1px solid var(--fail-line); border-radius: 8px; color: var(--fail); font-size: 13px; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 max(32px, calc((100vw - 1600px) / 2 + 32px)); border-top: 1px solid var(--line); background: var(--s1); z-index: 15; }
.savebar label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.savebar .input { flex-grow: 1; height: 44px; }
.savebar .btn { height: 44px; }
.stats { display: flex; gap: 12px; margin-bottom: 24px; }
.stat { flex: 1 1 0; display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { font-size: 28px; font-weight: 600; }
.stat span { font-size: 13px; color: var(--muted); }
.imp__row { display: grid; grid-template-columns: 76px 90px 240px minmax(0, 1fr); gap: 20px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.diffs { display: flex; gap: 16px; flex-wrap: wrap; }
.diffs > span { display: inline-flex; align-items: center; gap: 8px; }
.diffs .f { font-size: 12px; color: var(--muted); }
.old { color: var(--dim); text-decoration: line-through; font-family: var(--mono); font-size: 13px; }
.new { color: #111; background: var(--accent); padding: 1px 5px; border-radius: 3px; font-family: var(--mono); font-size: 13px; }
.errtxt { color: var(--fail); }
.formgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; padding: 20px; border-top: 1px solid var(--line); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); height: 40px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* login */
.center { flex-grow: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px 14vh; }
.entry { width: 340px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.entry__head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.entry__head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.entry__head span { font-size: 15px; color: var(--muted); }
.entry form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.entry input { width: 100%; font-size: 15px; padding: 13px 16px; color: #fff; background: #1e1e1e; border: 1px solid #333; border-radius: 8px; outline: none; }
.entry input:focus { border-color: #999; }
.entry button { width: 100%; font-size: 15px; font-weight: 700; padding: 13px 16px; color: #111; background: #fff; border: 0; border-radius: 8px; cursor: pointer; }
.entry button:hover { opacity: .88; }
.entry .error { font-size: 13px; color: #ff6b7b; text-align: center; min-height: 18px; margin: 0; }
.foot { padding-top: 20px; padding-bottom: 20px; font-size: 12px; color: var(--dim); }

/* per-region position blocks in the editor */
.regionblock { display: flex; flex-direction: column; gap: 16px; padding: 18px; border: 1px solid var(--line2); border-radius: 8px; }
.regionblock__head { display: flex; align-items: center; gap: 10px; }
.regionblock__head b { font-size: 14px; }
.colourpick { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; }
.colourpick .chipc { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line2); }
.swatchrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatchbtn { width: 32px; height: 32px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatchbtn.is-on { border-color: #fff; }
.colourtbl td { height: 46px; }
.regiontabs { display: inline-flex; }

/* popover: installation photos and floor plan */
.lb { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 64px 88px; background: rgba(8,8,8,.9); backdrop-filter: blur(6px); }
.lb[hidden] { display: none; }
.lb__stage { position: relative; margin: 0; line-height: 0; }
.lb__stage img { display: block; max-width: calc(100vw - 176px); max-height: calc(100vh - 128px); border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb__close, .lb__nav { position: absolute; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; cursor: pointer; transition: background-color .15s; }
.lb__close:hover, .lb__nav:hover { background: rgba(255,255,255,.18); }
.lb__close { top: 16px; right: 16px; }
.lb__nav { top: 50%; margin-top: -22px; }
.lb__nav--prev { left: 20px; }
.lb__nav--next { right: 20px; }
.lb__nav[hidden], .lb__count[hidden] { display: none; }
.lb__count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 13px; color: #bbb; font-variant-numeric: tabular-nums; }
.spot--lg { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.spot--lg .spot__label { bottom: 26px; font-size: 13px; line-height: 1.4; }
body.has-lb { overflow: hidden; }
.photos a { cursor: zoom-in; }
@media (max-width: 700px) { .lb { padding: 56px 12px; } .lb__stage img { max-width: calc(100vw - 24px); } .lb__nav { top: auto; bottom: 12px; margin: 0; } }

/* admin items: order grip and show/hide switch */
.tbl__grip { width: 28px; padding-right: 0 !important; }
.grip { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 28px; color: var(--dim); cursor: grab; border-radius: 4px; }
.grip:hover { color: #fff; background: var(--s2); }
.tbl--order tr.is-dragging { opacity: .4; }
.tbl--order tr.is-hidden td:not(:nth-child(-n+2)) { opacity: .45; }
.switch { position: relative; width: 38px; height: 22px; padding: 0; border-radius: 11px; border: 1px solid var(--line2); background: var(--s2); cursor: pointer; transition: background-color .15s, border-color .15s; vertical-align: middle; }
.switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #8a8a8a; transition: transform .15s, background-color .15s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(16px); background: #fff; }
.switch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.switch.is-error { border-color: #ff6b7b; }

/* settings: section tabs along the top, active one underlined in pink */
.settings { padding-bottom: 48px; }
.setnav { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.setnav a { height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.setnav a:hover { color: #fff; }
.setnav a.is-on { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.setform { max-width: 720px; }
.setsplit { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 20px; align-items: start; }
.setpreview { position: sticky; top: 24px; }
.setcanvas { height: auto; min-height: 0; aspect-ratio: 4 / 3; margin: 0 16px 16px; }
.setcanvas svg { width: 100%; height: 100%; }
.setcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px 16px; }
.setcards .card__art { border-radius: 8px; border: 0; }
.colourinput { width: 44px; height: 36px; padding: 2px; background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; cursor: pointer; }
.setcover { display: block; width: calc(100% - 32px); height: auto; aspect-ratio: 16 / 9; margin: 0 16px 16px; border-radius: 8px; background: #002869; }
@media (max-width: 1100px) { .setsplit { grid-template-columns: 1fr; } .setpreview { position: static; } }

.range { width: 220px; accent-color: var(--accent); cursor: pointer; }

/* editor: Size sits with Font and Leading for typeset lettering, on its own (narrow) for uploaded artwork */
.frow:has(> [data-show-source][hidden]) .field--size { flex: 0 0 160px; }
