.setup-screen { min-height: calc(100dvh - 60px); }
.setup-screen .bf-main { gap: 10px; }
.setup-screen .bf-panel h2 { font-size: 18px; font-weight: 800; }
.setup-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.setup-link { display: grid; gap: 8px; color: var(--ink); text-decoration: none; }
.setup-link strong { font-size: 15px; font-weight: 800; }
.setup-link span { font-size: 13.5px; color: var(--ink-2); }
.setup-review { border-color: var(--teal); background: var(--teal-bg); }
.setup-review[hidden] { display: none; }
.setup-review strong { font-size: 15px; font-weight: 800; }
.setup-review p, .setup-review li { font-size: 13.5px; }
.setup-review-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.setup-screen .field, .setup-screen form { display: grid; gap: 10px; }
/* Q8a B-05: the boards draw a command button at its content's width (48 tall) and a field at the flavour's field
   width, never the whole panel's 1268 px; the inputs themselves take the flavour's 52 (board-flavour.css). */
.setup-screen .bf-panel > .btn, .setup-screen .bf-panel form > .btn { align-self: flex-start; justify-self: start; }
.setup-screen .bf-panel .field .input { max-inline-size: 320px; }
.setup-screen .switch { min-height: 48px; }
.setup-screen .error:empty { display: none; }
.setup-screen .bf-panel { flex: none; }
.setup-equipment { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; align-items: start; }
.setup-equipment .card { margin: 0; }
.setup-wrap { flex-wrap: wrap; }
.setup-align-start { align-items: start; }
.setup-scan-box { min-height: 96px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: text; }
.setup-scan-facts { gap: 20px; }
.setup-scan-facts [data-scan-count], .setup-scan-facts [data-scan-mangled] { font-size: 22px; font-weight: 800; }
.setup-scan-facts [data-scan-last] { font-weight: 700; }
.setup-import-table { overflow: auto; max-height: 60vh; }
.setup-import-mapping { display: flex; flex-wrap: wrap; gap: 10px; }
.setup-import-mapping .field { min-width: 180px; }
.setup-tills { min-height: 0; }
.setup-tills .bf-main { width: 100%; max-width: 1100px; margin-inline: auto; }
.setup-tills .setup-till-grid { display: grid; grid-template-columns: minmax(320px, 2fr) minmax(320px, 3fr); gap: 10px; }
.setup-tills .till-row { min-height: 48px; }
@media (max-width: 740px) { .setup-tills .setup-till-grid { grid-template-columns: 1fr; } }

/* Mobile v2: secondary workflow */
@media screen and (max-width: 760px) {

  .setup-screen { min-height: 100%; height: auto; }
  .setup-screen .bf-main { padding: 12px 0; overflow: visible; }
  .setup-screen .bf-head { flex-wrap: wrap; height: auto; padding: 0 0 12px; gap: 6px; }
  .setup-screen .bf-head > * { min-width: 0; max-width: 100%; }
  .setup-screen .bf-head h1 { width: 100%; font-size: var(--t-22); }
  .setup-screen .bf-head p { width: 100%; white-space: normal; }
  .setup-tiles, .setup-equipment, .setup-tills .setup-till-grid { grid-template-columns: minmax(0, 1fr); }
  .setup-screen .bf-panel { min-width: 0; padding: 12px; }
  .setup-screen .bf-panel .field .input { width: 100%; max-inline-size: none; min-height: 44px; font-size: 16px; }
  .setup-screen .switch { min-height: 44px; height: auto; gap: 12px; white-space: normal; }
  .setup-screen .switch > span { overflow-wrap: anywhere; }
  .setup-screen .setup-wrap, .setup-scan-facts { flex-wrap: wrap; }
  .setup-screen .row { flex-wrap: wrap; }
  .setup-import-mapping { display: grid; grid-template-columns: minmax(0, 1fr); }
  .setup-import-mapping .field { min-width: 0; }
  .setup-import-table { max-width: 100%; overflow: auto; }
  .setup-link strong, .setup-link span { overflow-wrap: anywhere; }
}
