/* Site Orders: site app.
   Built for a tablet in a site cabin or a cab: big targets for gloved hands,
   strong contrast for daylight, nothing that needs a good signal to look right. */

@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(fonts/barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }

:root {
  --ground: #E9ECE8;      /* cast-concrete grey: the page */
  --paper: #FFFFFF;       /* tickets and panels */
  --ink: #0F1F1A;
  --muted: #4A5852;
  --line: #C3CBC6;
  --edge: #7F8C85;        /* outline of things you can press */
  --brand: #17594A;       /* site-safety green: the header */
  --brand-ink: #FFFFFF;
  --hivis: #FFD60A;       /* hi-vis yellow: the one thing to press */
  --hivis-press: #E8C000;
  --hivis-ink: #14140A;
  --ok: #17703A;   --ok-bg: #DDF0E2;
  --info: #1D4C9C; --info-bg: #E0E9F8;
  --wait: #7A4F00; --wait-bg: #FBEBC8;
  --stop: #AD231C; --stop-bg: #F9DFDC;
  --shadow: 0 1px 0 rgba(15, 31, 26, .08), 0 6px 18px -10px rgba(15, 31, 26, .35);
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E1512; --paper: #18221E; --ink: #E9EFEB; --muted: #A3B1AB; --line: #34423C; --edge: #6E7F77;
    --brand: #0F3D32; --brand-ink: #F2F7F4;
    --ok: #7FD69A; --ok-bg: #143122; --info: #9DBBF5; --info-bg: #17263F;
    --wait: #F2C261; --wait-bg: #382A0C; --stop: #FF9D94; --stop-bg: #3F1916;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 8px 20px -10px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0E1512; --paper: #18221E; --ink: #E9EFEB; --muted: #A3B1AB; --line: #34423C; --edge: #6E7F77;
  --brand: #0F3D32; --brand-ink: #F2F7F4;
  --ok: #7FD69A; --ok-bg: #143122; --info: #9DBBF5; --info-bg: #17263F;
  --wait: #F2C261; --wait-bg: #382A0C; --stop: #FF9D94; --stop-bg: #3F1916;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 8px 20px -10px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--ground); color: var(--ink);
  font: 500 17px/1.4 var(--body); -webkit-tap-highlight-color: transparent; overflow-wrap: anywhere;
  overscroll-behavior-y: contain;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
svg { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--brand); }
.boot { display: grid; place-items: center; min-height: 100dvh; background: var(--brand); }
.boot-mark { font: 700 44px/1 var(--display); color: var(--brand-ink); letter-spacing: .01em; }

/* ---------- header bar ---------- */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--brand); color: var(--brand-ink);
}
.bar-site { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; padding: 4px 8px 4px 0; }
.bar-name { font: 700 28px/1.05 var(--display); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bar-sub { font-size: 14px; opacity: .85; }
.bar-gap { flex: 1; }
.bar-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .13); color: inherit; font-weight: 700; white-space: nowrap;
}
.bar-btn:active { background: rgba(255, 255, 255, .26); }
.signal { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 48px; padding: 0 12px; border-radius: 20px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.signal.on { background: rgba(255, 255, 255, .13); }
.signal.off { background: var(--hivis); color: var(--hivis-ink); }
.signal.wait { background: var(--hivis); color: var(--hivis-ink); }

/* ---------- shared pieces ---------- */
.go {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 72px; padding: 0 20px;
  border-radius: 12px; background: var(--hivis); color: var(--hivis-ink);
  font: 700 30px/1 var(--display); letter-spacing: .01em;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), var(--shadow);
}
.go:active { background: var(--hivis-press); transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.go[disabled] { background: var(--line); color: var(--muted); box-shadow: none; cursor: default; transform: none; }
.go svg { width: 1em; height: 1em; stroke-width: 3; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px;
  border-radius: 10px; border: 2px solid var(--ink); background: var(--paper); font-weight: 700;
}
.btn:active { background: var(--ground); }
.btn.quiet { border-color: var(--edge); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.danger { border-color: var(--stop); color: var(--stop); }
.btn.wide { width: 100%; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.head h2 { font: 700 26px/1.1 var(--display); letter-spacing: .01em; }
.head small, .hint { color: var(--muted); font-size: 15px; }
.empty { padding: 22px 18px; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 2px; }

.stamp {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 2px; border: 2px solid currentColor; border-radius: 4px;
  font: 700 17px/1.2 var(--display); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; transform: rotate(-2deg);
}
.stamp svg { width: 15px; height: 15px; stroke-width: 3; }
.s-wait { color: var(--wait); background: var(--wait-bg); }
.s-info { color: var(--info); background: var(--info-bg); }
.s-ok { color: var(--ok); background: var(--ok-bg); }
.s-done { color: var(--paper); background: var(--ok); border-color: var(--ok); }
.s-stop { color: var(--stop); background: var(--stop-bg); }
.s-mute { color: var(--muted); }

/* ---------- home ---------- */
.home { display: grid; gap: 24px; padding: 16px; max-width: 1400px; margin: 0 auto; grid-template-areas: "go" "alerts" "coming" "orders"; }
.home > .a-go { grid-area: go; } .home > .a-alerts { grid-area: alerts; } .home > .a-coming { grid-area: coming; } .home > .a-orders { grid-area: orders; }
.a-alerts:empty { display: none; }
@media (min-width: 900px) {
  .home { grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); grid-template-rows: auto auto 1fr; padding: 24px;
          grid-template-areas: "alerts go" "coming orders" "coming orders"; column-gap: 32px; }
  .home.no-alerts { grid-template-areas: "coming go" "coming orders" "coming orders"; }
}

.alert { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 8px; border-left: 8px solid; margin-bottom: 10px; }
.alert:last-child { margin-bottom: 0; }
.alert.stop { background: var(--stop-bg); border-color: var(--stop); }
.alert.wait { background: var(--wait-bg); border-color: var(--wait); }
.alert.info { background: var(--info-bg); border-color: var(--info); }
.alert div { flex: 1; min-width: 0; }
.alert b { display: block; font-size: 18px; }
.alert .btn { min-height: 48px; flex: none; }

.day { margin: 0 0 18px; }
.day-name { display: flex; align-items: baseline; gap: 10px; padding: 0 0 6px; border-bottom: 3px solid var(--ink); margin-bottom: 8px; }
.day-name b { font: 700 24px/1 var(--display); letter-spacing: .01em; }
.day-name span { color: var(--muted); font-size: 15px; }
.day.late .day-name { border-color: var(--stop); color: var(--stop); }
.day.late .day-name span { color: inherit; }
.drop { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--paper); border-radius: 6px; box-shadow: var(--shadow); margin-bottom: 8px; }
.drop-what { flex: 1; min-width: 0; }
.drop-what h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.drop-what p { color: var(--muted); font-size: 16px; }
.drop-what h3 small { font-weight: 500; font-size: 15px; color: var(--muted); margin-left: 6px; }
.tick { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 10px; border: 2px solid var(--ink); background: var(--paper); font-weight: 700; white-space: nowrap; flex: none; }
.tick:active { background: var(--ok-bg); border-color: var(--ok); }
.ticked { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; white-space: nowrap; }

/* An order is a delivery ticket: a stub with the quantity, a perforation, the details. */
.ticket {
  position: relative; display: flex; align-items: stretch; width: 100%; text-align: left; overflow: hidden;
  background: var(--paper); border-radius: 6px; box-shadow: var(--shadow); margin-bottom: 10px;
}
.ticket-stub { position: relative; flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 6px; border-right: 2px dashed var(--line); }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; right: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--ground); }
.ticket-stub::before { top: -8px; } .ticket-stub::after { bottom: -8px; }
.ticket-stub b { font: 700 40px/.95 var(--display); }
.ticket-stub b.small { font-size: 28px; } .ticket-stub b.tiny { font-size: 20px; }
.ticket-stub span { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.15; }
.ticket-body { flex: 1; min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ticket-body h3 { font-size: 18px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ticket-body p { color: var(--muted); font-size: 15px; }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.ticket.is-new { animation: print .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes print { from { transform: translateY(-18px); opacity: 0; } }

/* ---------- ordering: the shelf on the left, the load on the right ---------- */
.till { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - 64px); }
.shelf { padding: 16px; min-width: 0; padding-bottom: 96px; }
.load { display: none; background: var(--paper); padding: 16px; flex-direction: column; gap: 14px; }
.till.show-load .shelf { display: none; }
.till.show-load .load { display: flex; min-height: calc(100dvh - 64px); }
.loadbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 2px solid var(--ink); }
.till.show-load + .loadbar { display: none; }
@media (min-width: 900px) {
  .till { grid-template-columns: minmax(0, 1fr) 400px; }
  .shelf { padding: 24px; padding-bottom: 24px; }
  .load, .till.show-load .load { display: flex; position: sticky; top: 64px; height: calc(100dvh - 64px); min-height: 0; border-left: 2px solid var(--ink); overflow-y: auto; }
  .till.show-load .shelf { display: block; }
  .loadbar, .only-narrow { display: none !important; }
}
.search { position: relative; margin-bottom: 16px; }
.search input { width: 100%; min-height: 56px; padding: 0 16px 0 50px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-size: 19px; }
.search svg { position: absolute; left: 16px; top: 17px; width: 22px; height: 22px; color: var(--muted); }
.crumb { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.crumb h2 { font: 700 30px/1.05 var(--display); letter-spacing: .01em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; gap: 14px;
  min-height: 108px; padding: 14px; border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); border-top: 6px solid var(--brand);
}
.tile:active { background: var(--ground); }
.tile b { font: 700 24px/1.05 var(--display); letter-spacing: .01em; }
.tile span { color: var(--muted); font-size: 15px; }
.tile.other { border-top-color: var(--line); background: transparent; box-shadow: none; border: 2px dashed var(--line); border-top-width: 2px; }
.group { font: 700 20px/1.1 var(--display); letter-spacing: .02em; color: var(--muted); margin: 18px 0 6px; }
.group:first-child { margin-top: 0; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 14px; text-align: left; background: var(--paper); border-bottom: 1px solid var(--line); }
.item:first-of-type { border-radius: 6px 6px 0 0; } .item:last-of-type { border-radius: 0 0 6px 6px; border-bottom: 0; }
.item:only-of-type { border-radius: 6px; }
.item:active { background: var(--ground); }
.item-name { flex: 1; min-width: 0; }
.item-name b { display: block; font-weight: 700; line-height: 1.25; }
.item-name span { color: var(--muted); font-size: 15px; }
.item-unit { color: var(--muted); white-space: nowrap; }
.item-in { min-width: 44px; padding: 4px 10px; border-radius: 6px; background: var(--hivis); color: var(--hivis-ink); font: 700 20px/1.2 var(--display); text-align: center; white-space: nowrap; }
.item .plus { color: var(--brand); width: 26px; height: 26px; stroke-width: 3; }
.else { margin-top: 14px; }

.load h2 { font: 700 26px/1.1 var(--display); letter-spacing: .01em; }
.load-lines { display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .load > * { flex: none; }
  .load > .load-lines { flex: 1 1 auto; min-height: 132px; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
  .load-lines > * { flex: none; }
  .load .note { min-height: 52px; height: 52px; }
}
.line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.line-qty { flex: none; width: 82px; text-align: right; font: 700 26px/1 var(--display); }
.line-qty small { font: 500 14px/1 var(--body); color: var(--muted); margin-left: 3px; }
.line-what { flex: 1; min-width: 0; text-align: left; min-height: 48px; display: flex; flex-direction: column; justify-content: center; }
.line-what b { font-weight: 700; line-height: 1.2; }
.line-what span { color: var(--muted); font-size: 14px; line-height: 1.25; }
.line-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.line-x:active { background: var(--stop-bg); color: var(--stop); }
.field-name { font-weight: 700; margin-bottom: 8px; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 48px; min-width: 48px; justify-content: center; padding: 0 14px; border-radius: 24px; border: 2px solid var(--edge); background: var(--paper); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip.day-chip { flex-direction: column; gap: 0; min-width: 76px; border-radius: 10px; padding: 6px 10px; line-height: 1.15; }
.chip.day-chip small { font-weight: 500; font-size: 13px; opacity: .8; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.seg button { min-height: 48px; font-weight: 700; border-right: 2px solid var(--ink); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.note { width: 100%; min-height: 76px; padding: 12px; border: 2px solid var(--edge); border-radius: 10px; background: var(--paper); resize: vertical; }
.load-end { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 0 16px; margin-bottom: -16px; position: sticky; bottom: -16px; background: var(--paper); }

/* ---------- sheets (quantity, order details, confirmations) ---------- */
#sheet { position: fixed; inset: 0; z-index: 20; display: grid; place-items: end center; background: rgba(8, 18, 14, .55); }
#sheet[hidden] { display: none; }
.sheet { width: min(100%, 880px); max-height: 100dvh; overflow-y: auto; background: var(--paper); border-radius: 16px 16px 0 0; padding: 20px 20px 0; }
.opening .sheet { animation: rise .2s ease-out; }
.sheet.small { width: min(100%, 520px); }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 900px) { #sheet { place-items: center; } .sheet { border-radius: 14px; max-height: calc(100dvh - 32px); } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { font: 700 30px/1.05 var(--display); letter-spacing: .01em; }
.sheet-head p { color: var(--muted); }
.close { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--ground); flex: none; }
.sheet-foot { display: flex; gap: 10px; margin-top: 8px; padding: 10px 0 calc(20px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; background: var(--paper); }
.sheet > :last-child:not(.sheet-foot) { margin-bottom: 20px; }
.sheet-foot.stack { flex-direction: column; }
.sheet-foot .pair { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-foot .pair > * { flex: 1 1 160px; }
.amount.full b { color: var(--muted); }
.split .amount em { text-align: right; }
.sheet-foot > * { flex: 1; }
.sheet-foot .go { min-height: 64px; font-size: 26px; }

.qty { display: grid; gap: 18px; }
@media (min-width: 720px) { .qty { grid-template-columns: minmax(0, 1fr) 300px; } }
.amount { display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 76px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 10px; text-align: left; }
.amount.on { border-color: var(--ink); box-shadow: inset 0 -5px 0 var(--hivis); }
.amount b { font: 700 54px/1 var(--display); min-width: .5em; flex: none; }
.amount b, .ticket-stub b, .line-qty, .detail-line b.q, .item-in, .stamp { overflow-wrap: normal; white-space: nowrap; }
.amount b:empty::before { content: "0"; color: var(--line); }
.amount span { font-size: 20px; color: var(--muted); }
.amount em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 15px; align-self: center; }
.split { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.split .amount { min-height: 56px; }
.split .amount b { font-size: 34px; }
.split .amount span { font-size: 16px; color: var(--ink); font-weight: 700; }
.warn { color: var(--stop); font-weight: 700; margin-top: 6px; }
.note-ok { color: var(--muted); margin-top: 6px; font-size: 15px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; }
.pad button { min-height: 64px; border-radius: 12px; background: var(--ground); font: 700 30px/1 var(--display); }
.pad button:active { background: var(--line); }
.pad .quick { min-height: 48px; font: 700 17px/1 var(--body); background: var(--paper); border: 2px solid var(--edge); }
.text-in { width: 100%; min-height: 56px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-size: 19px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.detail-lines { margin: 4px 0 14px; }
.detail-line { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.detail-line b.q { flex: none; width: 92px; text-align: right; font: 700 24px/1.1 var(--display); }
.detail-line b.q small { font: 500 14px/1 var(--body); color: var(--muted); margin-left: 3px; }
.detail-line div { flex: 1; min-width: 0; }
.detail-line span { display: block; color: var(--muted); font-size: 15px; }
.po-card { border: 2px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.po-card div { flex: 1; min-width: 0; }
.po-card h3 { font-size: 18px; font-weight: 700; }
.po-card p { color: var(--muted); font-size: 15px; }
.steps { display: flex; gap: 0; margin: 2px 0 16px; padding: 0; list-style: none; }
.steps li { flex: 1; padding-top: 14px; border-top: 6px solid var(--line); font-size: 14px; color: var(--muted); line-height: 1.2; padding-right: 6px; }
.steps li.done { border-color: var(--ok); color: var(--ink); font-weight: 700; }
.steps li.stop { border-color: var(--stop); color: var(--stop); font-weight: 700; }

/* ---------- who's ordering / PIN ---------- */
.gate { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: var(--brand); color: var(--brand-ink); }
.gate-top { padding: 28px 24px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gate-top h1 { font: 700 40px/1 var(--display); letter-spacing: .01em; }
.gate-top span { opacity: .85; }
.gate-main { display: grid; place-items: center; padding: 24px 16px 40px; }
.card { width: min(100%, 460px); background: var(--paper); color: var(--ink); border-radius: 14px; padding: 24px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.card h2 { font: 700 32px/1.05 var(--display); letter-spacing: .01em; margin-bottom: 6px; }
.card > p { color: var(--muted); margin-bottom: 18px; }
.people { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; text-align: left; font-weight: 700; font-size: 20px; }
.person:active { background: var(--ground); }
.person i { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 700 22px/1 var(--display); font-style: normal; }
.person svg { margin-left: auto; color: var(--muted); }
.dots { display: flex; justify-content: center; gap: 14px; margin: 14px 0 18px; }
.dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); }
.dots i.on { background: var(--ink); }
.dots.bad { animation: shake .3s; }
.dots.bad i { border-color: var(--stop); }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.card .pad button { min-height: 68px; }
.linkish { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.card label { display: block; font-weight: 700; margin: 14px 0 6px; }
.err { color: var(--stop); font-weight: 700; margin-top: 12px; }

/* ---------- toast and demo bar ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: var(--shadow); text-align: center; }
#toast[hidden] { display: none; }
.demo { position: fixed; left: 12px; bottom: 12px; z-index: 25; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: calc(100% - 24px); padding: 8px 10px; border-radius: 10px; background: #1B1B1F; color: #fff; font-size: 14px; box-shadow: var(--shadow); }
.demo b { padding: 0 6px; }
.demo button { min-height: 40px; padding: 0 12px; border-radius: 8px; background: #34343C; color: #fff; font-weight: 700; }
.demo button[aria-pressed="true"] { background: var(--hivis); color: var(--hivis-ink); }
.demo.shut button:not(.demo-toggle), .demo.shut .demo-tip { display: none; }
body.has-demo .shelf, body.has-demo .home { padding-bottom: 150px; }
body.has-demo #toast { bottom: 84px; }
body:has(#sheet:not([hidden])) .demo { display: none; }      /* never sits on top of a button you need */
@media (max-width: 899px) { body:has(.loadbar) .demo { bottom: 104px; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 520px) {
  .bar-name { font-size: 23px; } .signal span { display: none; } .ticket-stub { width: 76px; }
  .bar-btn[data-act="home"] span { display: none; } .bar { gap: 8px; }
  .drop { flex-wrap: wrap; } .drop .tick { width: 100%; justify-content: center; }
}
