/* ---------- colour tokens ---------- */
:root {
  --dk-bg-4ff0a3: #4ff0a3;
  --dk-bg-b7d3ee: #b7d3ee;
  --dk-bg-cfe3d8: #cfe3d8;
  --dk-bg-d7f4e3: #d7f4e3;
  --dk-bg-dbe8f3: #dbe8f3;
  --dk-bg-dcefe4: #dcefe4;
  --dk-bg-dfedfc: #dfedfc;
  --dk-bg-e1f6e8: #e1f6e8;
  --dk-bg-e1f7e8: #e1f7e8;
  --dk-bg-e2eee7: #e2eee7;
  --dk-bg-e2f3ea: #e2f3ea;
  --dk-bg-e2f6ea: #e2f6ea;
  --dk-bg-e3f1e8: #e3f1e8;
  --dk-bg-e4f0fc: #e4f0fc;
  --dk-bg-e4f8e9: #e4f8e9;
  --dk-bg-e6f0fb: #e6f0fb;
  --dk-bg-e6f1fb: #e6f1fb;
  --dk-bg-e6f6ed: #e6f6ed;
  --dk-bg-e8f5ee: #e8f5ee;
  --dk-bg-e8f8ec: #e8f8ec;
  --dk-bg-e9f8ee: #e9f8ee;
  --dk-bg-eaf3fd: #eaf3fd;
  --dk-bg-eaf5f0: #eaf5f0;
  --dk-bg-eaf8f0: #eaf8f0;
  --dk-bg-eaf9f2: #eaf9f2;
  --dk-bg-ecfaef: #ecfaef;
  --dk-bg-edf5ff: #edf5ff;
  --dk-bg-edf6f1: #edf6f1;
  --dk-bg-edf7f0: #edf7f0;
  --dk-bg-edf7f1: #edf7f1;
  --dk-bg-edf8f0: #edf8f0;
  --dk-bg-eef3fa: #eef3fa;
  --dk-bg-eef6f1: #eef6f1;
  --dk-bg-eef7f2: #eef7f2;
  --dk-bg-effaf3: #effaf3;
  --dk-bg-f0f7ff: #f0f7ff;
  --dk-bg-f1f7fb: #f1f7fb;
  --dk-bg-f1f8ff: #f1f8ff;
  --dk-bg-f1faf4: #f1faf4;
  --dk-bg-f1faf5: #f1faf5;
  --dk-bg-f3d9d6: #f3d9d6;
  --dk-bg-f3f8fd: #f3f8fd;
  --dk-bg-f4d9a8: #f4d9a8;
  --dk-bg-f4f9f6: #f4f9f6;
  --dk-bg-f5fbf7: #f5fbf7;
  --dk-bg-f6fcf9e8: #f6fcf9e8;
  --dk-bg-f7fbf9: #f7fbf9;
  --dk-bg-f8e6c4: #f8e6c4;
  --dk-bg-f8fcfa: #f8fcfa;
  --dk-bg-f8fcfa80: #f8fcfa80;
  --dk-bg-f8fcfaec: #f8fcfaec;
  --dk-bg-f9fffb: #f9fffb;
  --dk-bg-fcfffd: #fcfffd;
  --dk-bg-fdecd3: #fdecd3;
  --dk-bg-fdecea: #fdecea;
  --dk-bg-fdf0dc: #fdf0dc;
  --dk-bg-fdf1dc: #fdf1dc;
  --dk-bg-fff: #fff;
  --dk-bg-fff4f3: #fff4f3;
  --dk-bg-fff6df: #fff6df;
  --dk-bg-fff6e8: #fff6e8;
  --dk-bg-fff7e8: #fff7e8;
  --dk-bg-fff7ea: #fff7ea;
  --dk-bg-fff9e9: #fff9e9;
  --dk-bg-ffffff: #ffffff;
  --dk-bg-ffffff17: #ffffff17;
  --dk-bg-ffffff26: #ffffff26;
  --dk-bg-ffffff33: #ffffff33;
  --dk-bg-ffffffd9: #ffffffd9;
  --dk-bg-ffffffdf: #ffffffdf;
  --dk-bg-ffffffe6: #ffffffe6;
  --dk-bg-fffffff0: #fffffff0;
  --dk-fg-03271a: #03271a;
  --dk-fg-0c8047: #0c8047;
  --dk-fg-0e3f75: #0e3f75;
  --dk-fg-0f7a43: #0f7a43;
  --dk-fg-0f7a45: #0f7a45;
  --dk-fg-0f8a4d: #0f8a4d;
  --dk-fg-109a56: #109a56;
  --dk-fg-117549: #117549;
  --dk-fg-11754a: #11754a;
  --dk-fg-118b4c: #118b4c;
  --dk-fg-118b4e: #118b4e;
  --dk-fg-123f75: #123f75;
  --dk-fg-125aa7: #125aa7;
  --dk-fg-125d49: #125d49;
  --dk-fg-13804a: #13804a;
  --dk-fg-139151: #139151;
  --dk-fg-14844e: #14844e;
  --dk-fg-149554: #149554;
  --dk-fg-154b57: #154b57;
  --dk-fg-155941: #155941;
  --dk-fg-15864d: #15864d;
  --dk-fg-15a75a: #15a75a;
  --dk-fg-164b50: #164b50;
  --dk-fg-168d52: #168d52;
  --dk-fg-173f37: #173f37;
  --dk-fg-174e44: #174e44;
  --dk-fg-175640: #175640;
  --dk-fg-195da4: #195da4;
  --dk-fg-197744: #197744;
  --dk-fg-1d4e42: #1d4e42;
  --dk-fg-1d7747: #1d7747;
  --dk-fg-204d3b: #204d3b;
  --dk-fg-234e42: #234e42;
  --dk-fg-235d98: #235d98;
  --dk-fg-264f3b: #264f3b;
  --dk-fg-264f48: #264f48;
  --dk-fg-2b6c4b: #2b6c4b;
  --dk-fg-2c554b: #2c554b;
  --dk-fg-2f5a4d: #2f5a4d;
  --dk-fg-365c50: #365c50;
  --dk-fg-38695a: #38695a;
  --dk-fg-3c5f78: #3c5f78;
  --dk-fg-3d2904: #3d2904;
  --dk-fg-3f5f7f: #3f5f7f;
  --dk-fg-467864: #467864;
  --dk-fg-47665e: #47665e;
  --dk-fg-48685b: #48685b;
  --dk-fg-4c6d61: #4c6d61;
  --dk-fg-4f8370: #4f8370;
  --dk-fg-527b68: #527b68;
  --dk-fg-528274: #528274;
  --dk-fg-537662: #537662;
  --dk-fg-53766e: #53766e;
  --dk-fg-56776a: #56776a;
  --dk-fg-58756c: #58756c;
  --dk-fg-587a6b: #587a6b;
  --dk-fg-587a8b: #587a8b;
  --dk-fg-5a736a: #5a736a;
  --dk-fg-5b766c: #5b766c;
  --dk-fg-5c3d08: #5c3d08;
  --dk-fg-5c786a: #5c786a;
  --dk-fg-5c7d6c: #5c7d6c;
  --dk-fg-5c7d6d: #5c7d6d;
  --dk-fg-5d7b6e: #5d7b6e;
  --dk-fg-5e7d6b: #5e7d6b;
  --dk-fg-607f6d: #607f6d;
  --dk-fg-61796d: #61796d;
  --dk-fg-617d70: #617d70;
  --dk-fg-617e72: #617e72;
  --dk-fg-627d6c: #627d6c;
  --dk-fg-638c7b: #638c7b;
  --dk-fg-678379: #678379;
  --dk-fg-6b4508: #6b4508;
  --dk-fg-6c8b7d: #6c8b7d;
  --dk-fg-6e8878: #6e8878;
  --dk-fg-7a571d: #7a571d;
  --dk-fg-7a5a14: #7a5a14;
  --dk-fg-7c231d: #7c231d;
  --dk-fg-7e6d4c: #7e6d4c;
  --dk-fg-7f9188: #7f9188;
  --dk-fg-886119: #886119;
  --dk-fg-886421: #886421;
  --dk-fg-8a5a0a: #8a5a0a;
  --dk-fg-9a5a08: #9a5a08;
  --dk-fg-a4480f: #a4480f;
  --dk-fg-a4580a: #a4580a;
  --dk-fg-b3261e: #b3261e;
  --dk-fg-c97a06: #c97a06;
  --dk-line-4ff0a3: #4ff0a3;
  --dk-line-74bd92: #74bd92;
  --dk-line-9fd3b6: #9fd3b6;
  --dk-line-abd9bb: #abd9bb;
  --dk-line-bbd9c8: #bbd9c8;
  --dk-line-bfe0cc: #bfe0cc;
  --dk-line-bfe3cf: #bfe3cf;
  --dk-line-c3dfce: #c3dfce;
  --dk-line-c4dfcf: #c4dfcf;
  --dk-line-c4dfd0: #c4dfd0;
  --dk-line-c8dfd0: #c8dfd0;
  --dk-line-c8e7d2: #c8e7d2;
  --dk-line-c9dfd2: #c9dfd2;
  --dk-line-c9dfd6: #c9dfd6;
  --dk-line-c9e1d2: #c9e1d2;
  --dk-line-ccdff1: #ccdff1;
  --dk-line-cce1d4: #cce1d4;
  --dk-line-cedbd2: #cedbd2;
  --dk-line-cee6d7: #cee6d7;
  --dk-line-cfe2d8: #cfe2d8;
  --dk-line-cfe2f7: #cfe2f7;
  --dk-line-cfe3f5: #cfe3f5;
  --dk-line-d0e1f2: #d0e1f2;
  --dk-line-d0e4d8: #d0e4d8;
  --dk-line-d0e6d7: #d0e6d7;
  --dk-line-d2e7d9: #d2e7d9;
  --dk-line-d3e3db: #d3e3db;
  --dk-line-d3e3dc: #d3e3dc;
  --dk-line-d3e3f0: #d3e3f0;
  --dk-line-d3e6da: #d3e6da;
  --dk-line-d3e8d8: #d3e8d8;
  --dk-line-d3e8dc: #d3e8dc;
  --dk-line-d4e4f0: #d4e4f0;
  --dk-line-d6e5f2: #d6e5f2;
  --dk-line-d8e8e2: #d8e8e2;
  --dk-line-d9e8e0: #d9e8e0;
  --dk-line-d9e9e0: #d9e9e0;
  --dk-line-daeae3: #daeae3;
  --dk-line-dbe3de: #dbe3de;
  --dk-line-dbe8f5: #dbe8f5;
  --dk-line-dfe8e3: #dfe8e3;
  --dk-line-e1ece6: #e1ece6;
  --dk-line-e1ede5: #e1ede5;
  --dk-line-e3efe8: #e3efe8;
  --dk-line-edf0ee: #edf0ee;
  --dk-line-eedbb0: #eedbb0;
  --dk-line-efb4ae: #efb4ae;
  --dk-line-efc4c0: #efc4c0;
  --dk-line-efdfb4: #efdfb4;
  --dk-line-f0c2bd: #f0c2bd;
  --dk-line-f0d6a8: #f0d6a8;
  --dk-line-f0dfbb: #f0dfbb;
  --dk-line-ffffff38: #ffffff38;
}
/* ---------- fonts (hosted with the app, so they load with no signal) ---------- */
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: var(--font-mono);
  src: url("assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: var(--font-mono);
  src: url("assets/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: var(--font-mono);
  src: url("assets/fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: var(--font-mono);
  src: url("assets/fonts/plex-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-family: var(--font);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #3994d1;
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

button svg {
  flex-shrink: 0;
}

svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app {
  max-width: 600px;
  min-height: 100dvh;
  margin: auto;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.topbar img {
  height: auto;
  display: block;
}

.workspace {
  font-weight: 700;
  border-left: 1px solid var(--line);
  padding-left: 14px;
  line-height: 1.5;
}

.avatar {
  margin-left: auto;
  border: 1px solid var(--dk-line-dfe8e3);
  width: 40px;
  height: 40px;
  font-weight: 700;
  font-size: 13px;
}

main {
  padding: 27px 22px 130px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: 18px;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 9px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin: 27px 0 14px;
}

.text-button {
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.text-button svg {
  width: 16px;
}

.primary {
  border: 0;
  padding: 14px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.stat {
  min-width: 0;
}

.stat-top {
  display: flex;
  align-items: center;
}

.stat strong {
  display: block;
}

.stat small {
  display: block;
}

.alert {
  border: 1px solid var(--dk-line-f0dfbb);
  display: flex;
  gap: 11px;
  margin-top: 15px;
  align-items: center;
  text-align: left;
  width: 100%;
}

.alert > svg {
  color: var(--amber);
}

.alert strong {
  font-size: 13px;
  display: block;
}

.alert small {
  font-size: 12px;
  display: block;
  margin-top: 3px;
}

.alert .chev {
  margin-left: auto;
}

.panel {
  border: 1px solid var(--line);
  overflow: hidden;
}

.list-row {
  padding: 17px 16px;
  display: flex;
  gap: 13px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  width: 100%;
  min-height: 76px;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row .copy {
  flex: 1;
  min-width: 0;
}

.list-row strong {
  font-size: 14px;
  display: block;
  line-height: 1.5;
}

.list-row small {
  font-size: 12px;
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

.list-row > svg {
  width: 17px;
  color: var(--dk-fg-7f9188);
}

.icon-tile {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.icon-tile.blue {
  background: var(--dk-bg-eef3fa);
  color: var(--blue);
}

.icon-tile.amber {
  background: var(--dk-bg-fff7e8);
  color: var(--amber);
}

.time {
  white-space: nowrap;
}

nav {
  left: 50%;
  border-top: 1px solid var(--line);
}

nav a {
  font-weight: 550;
}

nav a.active:before {
  border-radius: 0 0 4px 4px;
}

.demo-label {
  position: fixed;
  width: min(100%, 600px);
  text-align: center;
  padding: 7px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--dk-line-dbe3de);
  padding: 0 14px;
  height: 49px;
  margin: 20px 0 15px;
}

.search input {
  border: 0;
  background: none;
  width: 100%;
  font-size: 14px;
}

.filters {
  display: flex;
  overflow-x: auto;
  padding: 2px 0 8px;
}

.filter {
  white-space: nowrap;
  border: 1px solid var(--line);
  padding: 9px 14px;
  font-size: 13px;
}

.result-label {
  margin: 13px 0;
}

.stock-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.stock-card .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}

.code {
  font-weight: 650;
}

.badge {
  font-weight: 650;
  border-radius: 6px;
  padding: 5px 7px;
  white-space: nowrap;
}

.stock-card p {
  font-size: 13px;
  margin-top: 5px;
}

.stock-card footer {
  border-top: 1px solid var(--dk-line-edf0ee);
  margin-top: 17px;
  padding-top: 13px;
  display: flex;
}

.location {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
}

.location svg {
  width: 14px;
  height: 14px;
}

.quantity small {
  font-size: 12px;
  font-family: var(--font);
  font-weight: 400;
}

.wide {
  width: 100%;
}

.empty {
  text-align: center;
  padding: 45px 20px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  line-height: 1.6;
}

.empty p {
  font-size: 14px;
}

dialog {
  border-radius: 24px 24px 0 0;
  margin: auto auto 0;
  width: min(100%, 600px);
  padding: 25px 24px calc(27px + env(safe-area-inset-bottom));
  max-height: 90dvh;
}

.close {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
}

.close svg {
  width: 19px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 22px;
}

.sheet-header h2 {
  font-size: 23px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-radius: 14px;
  padding: 20px;
  margin: 22px 0;
}

.detail-grid dt {
  font-size: 12px;
  margin-bottom: 7px;
}

.detail-grid dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

label.field {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 17px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--dk-line-cedbd2);
  border-radius: 10px;
  min-height: 49px;
  padding: 12px;
  margin-top: 7px;
  font-size: 16px;
}

.field textarea {
  min-height: 85px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.form-actions {
  margin-top: 24px;
}

.helper {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 13px;
}

.toast {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
}

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.activity-icon svg {
  width: 17px;
}

.note {
  font-size: 12px;
  line-height: 1.7;
  margin: 20px 0;
}

.success-mark {
  height: 65px;
  width: 65px;
  display: grid;
  margin: 10px auto 18px;
  border-radius: 50%;
}

.success-mark svg {
  width: 32px;
  height: 32px;
}

@media (min-width: 650px) {
  .app {
    margin: 24px auto;
    min-height: calc(100dvh - 48px);
    overflow: hidden;
  }
  main {
    padding: 30px 30px 135px;
  }
  nav {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  dialog {
    margin: auto;
    border-radius: 24px;
    max-width: 510px;
  }
}

@media (max-width: 360px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .workspace {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Ecobelt future / image-led mobile design */

.app {
  border: 1px solid #263641;
}

.topbar {
  backdrop-filter: blur(20px);
  height: 88px;
}

.workspace {
  font-size: 10px;
  letter-spacing: 1.9px;
}

.avatar {
  border-radius: 12px;
}

h1,
h2,
h3,
.quantity,
.stat strong {
  font-family: var(--font);
}

h1 {
  font-size: 37px;
  line-height: 1.1;
  font-weight: 600;
}

.primary {
  border-radius: 10px;
  font-weight: 700;
  min-height: 48px;
}

.primary svg {
  width: 19px;
}

.stats {
  gap: 12px;
  margin-top: 16px;
}

.stat {
  border: 1px solid #2e474f;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  padding: 17px;
}

.stat-top {
  font-size: 12px;
  gap: 7px;
}

.stat-top svg {
  width: 16px;
}

.stat strong {
  font-size: 40px;
  letter-spacing: -2px;
  font-weight: 500;
  margin-top: 11px;
}

.stat small {
  font-size: 11px;
}

.stat-line {
  margin-top: 17px;
}

.alert {
  padding: 13px;
  border-radius: 12px;
}

.section-heading {
  margin-top: 29px;
}

.section-heading h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.6px;
}

.panel {
  border-radius: 15px;
}

.list-row {
  background: transparent;
}

.icon-tile {
  border: 1px solid #335a4e;
}

.time {
  font-family: var(--font-mono);
  font-size: 11px;
}

.search {
  border-radius: 11px;
}

.filters {
  scrollbar-width: none;
  gap: 8px;
}

.filter {
  border-radius: 9px;
}

.result-label {
  font-family: var(--font-mono);
  font-size: 12px;
}

.stock-card {
  border-radius: 14px;
  padding: 17px;
}

.code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2px;
}

.badge {
  border: 1px solid #3d6355;
  font-size: 10px;
}

.quantity {
  font-size: 23px;
  font-weight: 500;
}

nav {
  border: 1px solid #3b535e !important;
  border-radius: 19px;
  width: min(calc(100% - 24px), 568px);
}

nav a.active:before {
  content: "";
  position: absolute;
  top: -11px;
  width: 29px;
  height: 3px;
  background: var(--green);
  display: none;
}

nav a.active svg {
  border-radius: 4px;
  box-shadow: none;
  background: none;
}

nav svg {
  width: 22px;
  height: 22px;
}

.demo-label {
  font-size: 8px;
}

.app main {
  padding-bottom: 155px;
}

dialog {
  border: 1px solid #405b68;
}

.detail-grid {
  border: 1px solid #314652;
}

button,
a {
  touch-action: manipulation;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

button:active,
a:active {
  transform: translateY(1px);
}

@media (min-width: 650px) {
  .app {
    border-radius: 25px;
  }
  nav {
    width: 568px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 33px;
  }
  .stat {
    padding: 14px;
  }
  .stat-top {
    font-size: 11px;
  }
  .stat-top svg:last-child {
    display: none;
  }
  .code {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  main {
    animation: appear 0.3s ease-out;
  }
  @keyframes appear {    from {
      opacity: 0.7;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Bright Ecobelt brand direction: transparent logo, green + blue, daylight surfaces. */

:root {
  --radius: 18px;
  --ink: #183f42;
  --muted: #557276;
  --green: #109f59;
  --dark: #125d49;
  --line: #d6e7e1;
  --bg: #f6fbf8;
  --blue: #195da4;
  --amber: #90600f;
  color-scheme: light;
  color: var(--ink);
  background: var(--dk-bg-eaf5f0);
}

body {
  background: radial-gradient(ellipse at 15% 0, var(--dk-bg-d7f4e3) 0, transparent 55%), radial-gradient(ellipse at 100% 60%, var(--dk-bg-dfedfc), transparent 60%), var(--dk-bg-edf6f1);
}

.app {
  border-color: var(--dk-line-d8e8e2);
  box-shadow: 0 20px 80px #18554812;
}

.topbar {
  background: var(--dk-bg-f6fcf9e8);
  border-color: var(--dk-line-daeae3);
}

.topbar > a {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.topbar img {
  width: 132px;
  background: transparent;
}

.workspace {
  max-width: 90px;
  color: var(--dk-fg-53766e);
  border-color: var(--dk-line-cfe2d8);
}

.avatar {
  background: linear-gradient(140deg, var(--dk-bg-e1f7e8), var(--dk-bg-e6f1fb));
  border-color: var(--dk-line-c4dfd0);
  color: var(--dk-fg-117549);
}

.accent {
  color: var(--dk-fg-109a56);
}

h1 {
  letter-spacing: -1.6px;
  color: var(--dk-fg-154b57);
}

.primary {
  background: linear-gradient(110deg, #109b51, #0c985f);
  color: #fff;
  box-shadow: 0 5px 16px #109b5122;
}

.stat {
  background: linear-gradient(135deg, var(--dk-bg-ecfaef), var(--dk-bg-fff));
  border-color: var(--dk-line-cee6d7);
}

.stat:nth-child(2) {
  background: linear-gradient(135deg, var(--dk-bg-edf5ff), var(--dk-bg-fff));
  border-color: var(--dk-line-d0e1f2);
}

.stat-top {
  color: var(--dk-fg-47665e);
}

.stat-top svg {
  height: 16px;
  color: var(--dk-fg-149554);
}

.stat-top svg:last-child {
  margin-left: auto;
  width: 13px;
  color: var(--dk-fg-528274);
}

.stat:nth-child(2) .stat-top svg {
  color: var(--dk-fg-195da4);
}

.stat strong {
  color: var(--dk-fg-15864d);
}

.stat:nth-child(2) strong {
  color: var(--dk-fg-195da4);
}

.stat small {
  margin-top: 0;
  color: var(--dk-fg-5a736a);
}

.stat-line {
  display: block;
  width: 35px;
  height: 2px;
  background: #16a35c;
  box-shadow: none;
}

.stat:nth-child(2) .stat-line {
  background: #286cb0;
  box-shadow: none;
}

.alert {
  background: var(--dk-bg-fff9e9);
  border-color: var(--dk-line-efdfb4);
}

.alert strong {
  color: var(--dk-fg-7a571d);
}

.alert small {
  color: var(--dk-fg-7e6d4c);
}

.alert .chev {
  width: 17px;
  color: var(--dk-fg-886421);
}

.section-heading h2 {
  color: var(--dk-fg-164b50);
}

.section-heading .eyebrow {
  margin: 0;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--dk-fg-638c7b);
}

.panel {
  background: var(--dk-bg-fff);
  border-color: var(--dk-line-d9e8e0);
}

.list-row {
  border-color: var(--dk-line-e1ece6);
}

.list-row strong {
  color: var(--dk-fg-264f48);
}

.list-row small {
  color: var(--dk-fg-58756c);
}

.icon-tile {
  flex-shrink: 0;
  background: var(--dk-bg-e8f8ec);
  color: var(--dk-fg-118b4e);
  border-color: var(--dk-line-d3e8d8);
}

.time {
  color: var(--dk-fg-617e72);
}

.search {
  margin-top: 20px;
  background: var(--dk-bg-fff);
  border-color: var(--dk-line-c9dfd6);
  color: var(--dk-fg-4f8370);
  box-shadow: 0 3px 10px #20694305;
}

.search input {
  outline: none;
  color: var(--dk-fg-174e44);
}

.search input::placeholder {
  color: var(--dk-fg-678379);
}

.search:focus-within {
  outline: 2px solid var(--green);
  outline-color: #139b58;
}

.filter {
  min-height: 43px;
  background: var(--dk-bg-fff);
  border-color: var(--dk-line-d3e3db);
  color: var(--dk-fg-4c6d61);
}

.filter.active {
  color: #fff;
  background: #149c58;
  border-color: #149c58;
  box-shadow: 0 3px 10px #149c5819;
}

.result-label {
  color: var(--dk-fg-56776a);
}

.stock-card {
  position: relative;
  background: linear-gradient(130deg, var(--dk-bg-fff), var(--dk-bg-fcfffd));
  border-color: var(--dk-line-d0e4d8);
  box-shadow: 0 4px 16px #18564205;
}

.stock-card h3 {
  font-size: 17px;
  letter-spacing: -0.2px;
  font-weight: 500;
  color: var(--dk-fg-1d4e42);
}

.stock-card p {
  color: var(--dk-fg-5b766c);
}

.stock-card footer {
  align-items: center;
  justify-content: space-between;
  border-color: var(--dk-line-e1ede5);
}

.code {
  color: var(--dk-fg-5c7d6d);
}

.badge {
  letter-spacing: 0.2px;
  background: var(--dk-bg-e9f8ee);
  color: var(--dk-fg-1d7747);
  border-color: var(--dk-line-c8e7d2);
}

.badge.amber {
  background: var(--dk-bg-fff6df);
  color: var(--dk-fg-886119);
  border-color: var(--dk-line-eedbb0);
}

.badge.blue {
  background: var(--dk-bg-eaf3fd);
  color: var(--dk-fg-235d98);
  border-color: var(--dk-line-ccdff1);
}

.quantity {
  color: var(--dk-fg-0c8047);
}

.quantity small {
  color: var(--dk-fg-61796d);
}

.location {
  color: var(--dk-fg-5c7d6c);
}

.text-button {
  color: var(--dk-fg-14844e);
}

.empty {
  background: var(--dk-bg-fff);
  border-color: var(--dk-line-c3dfce);
}

.empty p {
  color: var(--dk-fg-5c786a);
}

nav {
  background: var(--dk-bg-fffffff0);
  border-color: var(--dk-line-cce1d4) !important;
  box-shadow: 0 8px 35px #1a604321;
}

nav a {
  display: flex;
  align-items: center;
  flex-direction: column;
  position: relative;
  font-size: 10px;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 0;
  min-height: 62px;
  color: var(--dk-fg-617d70);
}

nav a.active {
  font-weight: 750;
  border: 1px solid #49735e;
  background: linear-gradient(130deg, var(--dk-bg-e4f8e9), var(--dk-bg-eaf9f2));
  color: var(--dk-fg-0f8a4d);
  border-color: var(--dk-line-abd9bb);
}

.demo-label {
  z-index: 6;
  letter-spacing: 1.4px;
  height: 25px;
  bottom: 0;
  background: var(--dk-bg-edf7f1);
  color: var(--dk-fg-607f6d);
}

dialog {
  overscroll-behavior: contain;
  background: linear-gradient(145deg, var(--dk-bg-f9fffb), var(--dk-bg-fff));
  color: var(--dk-fg-234e42);
  border-color: var(--dk-line-c4dfcf);
  box-shadow: 0 15px 65px #123c4133;
}

dialog::backdrop {
  backdrop-filter: blur(8px);
  background: #214d4a66;
}

.close {
  background: var(--dk-bg-edf7f0);
  color: var(--dk-fg-2b6c4b);
  border-color: var(--dk-line-c8dfd0);
}

.detail-grid {
  background: var(--dk-bg-edf8f0);
  border-color: var(--dk-line-d0e6d7);
}

.detail-grid dt {
  color: var(--dk-fg-5e7d6b);
}

.detail-grid dd {
  color: var(--dk-fg-264f3b);
}

.field input,
.field select,
.field textarea {
  display: block;
  background: var(--dk-bg-fff);
  color: var(--dk-fg-204d3b);
  border-color: var(--dk-line-bbd9c8);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--dk-fg-6e8878);
}

.helper,
.note {
  color: var(--dk-fg-627d6c);
}

.success-mark {
  place-items: center;
  background: var(--dk-bg-e1f6e8);
  color: var(--dk-fg-118b4c);
}

button:focus-visible,
a:focus-visible {
  outline-color: #195da4;
}

@media (hover: hover) {
  .stock-card:hover,
  .stat:hover {
    border-color: var(--dk-line-74bd92);
  }
}

@media (max-width: 360px) {
  .topbar img {
    width: 124px;
  }
}

/* Artwork is part of the working surface; controls remain live HTML. */

.app {
  background: var(--dk-bg-f8fcfa);
}

.app main {
  padding-top: 0;
  overflow: hidden;
}

.art-stage {
  position: relative;
  isolation: isolate;
  height: 340px;
  margin: 0 -22px;
  padding: 29px 22px 0;
  background: var(--dk-bg-f8fcfa);
}

.stage-art {
  position: absolute;
  z-index: -2;
  width: 100%;
  height: 520px;
  top: -48px;
  left: 0;
  object-fit: cover;
  object-position: center 39%;
  pointer-events: none;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(#000 0%, #000 70%, transparent 95%);
  -webkit-mask-image: linear-gradient(#000 0%, #000 70%, transparent 95%);
}

.art-stage:after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--dk-bg-f8fcfaec) 0%, var(--dk-bg-f8fcfa80) 36%, transparent 63%);
}

.stage-copy {
  max-width: 68%;
  position: relative;
}

.stage-copy > .eyebrow {
  font-family: var(--font-mono);
  color: var(--dk-fg-197744);
  font-size: 10px;
  letter-spacing: 1.4px;
  margin: 0 0 14px;
}

.stage-copy h1 {
  font-size: 36px;
  line-height: 1.06;
  letter-spacing: -1.5px;
  color: var(--dk-fg-154b57);
}

.stage-copy > p {
  color: var(--dk-fg-48685b);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 13px;
  max-width: 170px;
}

.arrival-chip {
  display: inline-block;
  background: var(--dk-bg-ffffffd9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--dk-line-c9e1d2);
  border-radius: 13px;
  padding: 12px 14px;
  margin-top: 25px;
  box-shadow: 0 10px 25px #13463109;
}

.arrival-chip > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dk-fg-467864);
  letter-spacing: 0.5px;
}

.arrival-chip > span svg {
  width: 15px;
  height: 15px;
}

.arrival-chip strong {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 500;
  margin-top: 7px;
  color: var(--dk-fg-155941);
}

.arrival-chip strong svg {
  width: 17px;
}

.stage-count {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.stage-count strong {
  font-family: var(--font);
  font-size: 43px;
  line-height: 1;
  color: var(--dk-fg-139151);
  letter-spacing: -2px;
}

.stage-count span {
  font-size: 12px;
  line-height: 1.4;
  color: var(--dk-fg-38695a);
}

.art-stage.finished .stage-count strong {
  color: var(--dk-fg-195da4);
}

.collection-controls {
  position: relative;
  margin-top: -19px;
  z-index: 1;
}

.collection-controls .search {
  background: var(--dk-bg-ffffffdf);
  backdrop-filter: blur(18px);
}

.scene-links {
  display: grid;
  gap: 12px;
}

.scene-link {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  min-height: 124px;
  border: 1px solid var(--dk-line-d2e7d9);
  border-radius: 16px;
  background: var(--dk-bg-f1faf4);
}

.scene-link img {
  position: absolute;
  z-index: -2;
  right: -5px;
  top: -85px;
  width: 210px;
  height: 280px;
  object-fit: cover;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(90deg, transparent, #000 35%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%);
}

.scene-link-copy {
  padding: 20px;
}

.scene-link-copy small {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--dk-fg-527b68);
  display: block;
}

.scene-link-copy strong {
  display: block;
  font-family: var(--font);
  font-size: 21px;
  color: var(--dk-fg-175640);
  margin: 7px 0;
}

.scene-link-copy > span {
  font-size: 12px;
  color: var(--dk-fg-537662);
}

.scene-link > svg {
  align-self: flex-end;
  margin: 0 16px 16px 0;
  background: var(--dk-bg-ffffffe6);
  border-radius: 50%;
  padding: 7px;
  box-sizing: content-box;
  width: 18px;
  height: 18px;
  color: var(--dk-fg-168d52);
}

.scene-link:nth-child(2) {
  background: var(--dk-bg-f0f7ff);
  border-color: var(--dk-line-d4e4f0);
}

.scene-link:nth-child(2) strong {
  color: var(--dk-fg-195da4);
}

@media (min-width: 650px) {
  .app main {
    padding-top: 0;
  }
  .art-stage {
    margin-left: -30px;
    margin-right: -30px;
    padding-left: 30px;
    padding-right: 30px;
    height: 365px;
  }
  .stage-art {
    height: 650px;
    top: -95px;
  }
  .stage-copy {
    max-width: 65%;
  }
  .stage-copy h1 {
    font-size: 43px;
  }
  .scene-link img {
    width: 250px;
    height: 335px;
    top: -110px;
  }
}

@media (max-width: 360px) {
  .art-stage {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    height: 325px;
  }
  .stage-copy h1 {
    font-size: 31px;
  }
  .stage-copy > .eyebrow {
    font-size: 9px;
  }
  .stage-art {
    height: 460px;
    top: -20px;
  }
  .arrival-chip {
    padding: 10px;
    margin-top: 19px;
  }
  .arrival-chip strong {
    font-size: 18px;
  }
  .scene-link-copy {
    padding: 15px;
  }
  .scene-link img {
    right: -25px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stage-art {
    animation: art-arrive 1.1s ease-out both;
  }
  @keyframes art-arrive {    from {
      opacity: 0;
      transform: translate3d(12px, 7px, 0) scale(1.02);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }
}

/* ==========================================================================
   Barcode labels, scanning and motion
   ========================================================================== */

@property --p {  syntax: "<number>";
  inherits: false;
  initial-value: 0;}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- navigation with raised scan button ---------- */

nav {
  position: fixed;
  transform: translateX(-50%);
  display: grid;
  z-index: 5;
  bottom: calc(33px + env(safe-area-inset-bottom));
  padding: 9px 7px;
  backdrop-filter: blur(24px);
  grid-template-columns: 1fr 76px 1fr;
  align-items: end;
  view-transition-name: nav;
}

.nav-side {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.nav-side a {
  flex: 1;
  min-width: 0;
}

.topbar {
  view-transition-name: topbar;
}

nav a span {
  white-space: nowrap;
}

.nav-scan {
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 0 8px;
  font-size: 10px;
  font-weight: 750;
  color: #0f7a4a;
  position: relative;
}

.nav-scan-ring {
  width: 62px;
  height: 62px;
  margin-top: -34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #16b169, #0f8f63 45%, #1b64b0);
  box-shadow: 0 0 0 5px #fffffff2, 0 12px 28px #0f8a5a55;
  position: relative;
}

.nav-scan-ring svg {
  width: 27px;
  height: 27px;
  stroke-width: 2;
}

.nav-scan-ring:after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid #19b36b;
  opacity: 0;
}

.nav-scan:active .nav-scan-ring {
  transform: scale(0.94);
}

/* ---------- home: scan hero card ---------- */

.scan-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  margin: -8px 0 14px;
  min-height: 168px;
  border: 0;
  border-radius: 22px;
  padding: 22px;
  display: flex;
  align-items: flex-end;
  text-align: left;
  color: #fff;
  background: radial-gradient(circle at 85% 20%, #3fd49155, transparent 55%), linear-gradient(125deg, #0d8a4f, #0f7f6b 50%, #1a5ea6);
  box-shadow: 0 16px 36px #0f6a4a33;
}

.scan-card img {
  position: absolute;
  z-index: -1;
  right: -40px;
  top: -40px;
  width: 250px;
  height: 290px;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.85;
  mask-image: linear-gradient(90deg, transparent, #000 40%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
}

.scan-card-copy {
  max-width: 66%;
}

.scan-card-copy small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #c9f7de;
}

.scan-card-copy small svg {
  width: 14px;
  height: 14px;
}

.scan-card-copy strong {
  display: block;
  font-family: var(--font);
  font-size: 27px;
  letter-spacing: -0.8px;
  margin: 8px 0 6px;
}

.scan-card-copy > span {
  font-size: 13px;
  line-height: 1.45;
  color: #e3f7ee;
}

.scan-card-cta {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  color: #0f8a4d;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px #00000033;
}

.scan-card-cta svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

.scan-card-cta i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #ffffffaa;
  opacity: 0;
}

.scan-inline {
  margin-bottom: 12px;
}

/* ---------- shared bits ---------- */

/* IDs, sizes and other figures: the main font with even-width digits (easier on the eye than a
   typewriter face at large sizes). The printed labels keep the mono font. */
.mono,
.code.mono {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.stat {
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

button.list-row,
button.arrival-chip {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

button.arrival-chip {
  width: auto;
  background: var(--dk-bg-ffffffd9);
  border: 1px solid var(--dk-line-c9e1d2);
}

button.list-row + button.list-row {
  border-top: 1px solid var(--dk-line-e3efe8);
}

.list-row .mono {
  font-weight: 600;
}

.activity-icon.warn {
  background: var(--dk-bg-fdecd3);
  color: var(--dk-fg-9a5a08);
}

.unver {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--dk-fg-b3261e);
  border: 1px solid var(--dk-line-efb4ae);
  border-radius: 20px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: 2px;
}

.panel-empty {
  padding: 18px;
  font-size: 13px;
  color: var(--dk-fg-5d7b6e);
}

.norate,
.needs {
  color: var(--dk-fg-b3261e);
  font-weight: 700;
}

#toast.warn {
  background: #6b4508;
}

#toast.err {
  background: #8c1d18;
}

/* ---------- find ---------- */

.find-card {
  margin: 0 0 16px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--dk-bg-ffffff), var(--dk-bg-f1faf5));
  border: 1px solid var(--dk-line-d3e8dc);
  box-shadow: 0 10px 28px #125aa70d;
}

.find-card h2 {
  font-family: var(--font);
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--dk-fg-154b57);
  margin-bottom: 12px;
}

.find-row {
  display: flex;
  gap: 8px;
}

.find-row .search {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.find-row .primary {
  flex: none;
  padding: 0 20px;
  border-radius: 14px;
}

.find-sugs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 12px -20px 0;
  padding: 0 20px 2px;
}

.find-sugs .filter {
  flex: none;
  min-height: 36px;
  font-size: 12.5px;
}

#find-results:not(:empty) {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.readback {
  font-size: 13.5px;
  color: var(--dk-fg-365c50);
  background: var(--dk-bg-e8f5ee);
  border-radius: 12px;
  padding: 10px 13px;
}

.readback small {
  display: block;
  color: var(--dk-fg-7a5a14);
  margin-top: 4px;
}

.find-hit {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--dk-line-d3e6da);
  border-radius: 16px;
  background: var(--dk-bg-fff);
  padding: 12px 14px;
  font: inherit;
  color: inherit;
}

.find-hit.best {
  border-color: #15a75a;
  box-shadow: 0 0 0 3px #15a75a1c;
}

.find-loc {
  flex: none;
  width: 76px;
  text-align: center;
  border-radius: 12px;
  padding: 8px 4px;
  background: var(--dk-bg-eef7f2);
}

.find-hit.best .find-loc {
  background: #15a75a;
  color: #fff;
}

.find-loc small {
  display: block;
  font-size: 8.5px;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: 0.8;
}

.find-loc b {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  margin-top: 2px;
  word-break: break-word;
}

.find-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.find-copy strong {
  font-size: 14.5px;
  color: var(--dk-fg-173f37);
}

.find-copy em {
  font-style: normal;
  font-weight: 500;
  color: var(--dk-fg-5d7b6e);
}

.find-copy .mono {
  font-size: 12.5px;
  color: var(--dk-fg-2f5a4d);
}

.find-copy small {
  font-size: 12px;
  color: var(--dk-fg-13804a);
}

.find-hit .chev {
  width: 18px;
  flex: none;
  color: var(--dk-fg-6c8b7d);
}

/* ---------- inventory groups ---------- */

.loc-group {
  margin-bottom: 22px;
}

.loc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(120deg, #125aa7, #1b7fa0);
  color: #fff;
  margin-bottom: 10px;
  box-shadow: 0 10px 24px #125aa726;
}

.loc-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--dk-bg-ffffff26);
  font-family: var(--font);
  font-weight: 700;
  font-size: 18px;
}

.loc-name {
  flex: 1;
  min-width: 0;
}

.loc-name strong {
  display: block;
  font-family: var(--font);
  font-size: 18px;
}

.loc-name small,
.loc-tot small {
  display: block;
  font-size: 11.5px;
  color: #d6ecff;
}

.loc-tot {
  text-align: right;
}

.loc-tot b {
  font-family: var(--font-mono);
  font-size: 15px;
}

.slot-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: var(--dk-fg-5d7b6e);
  margin: 14px 4px 8px;
}

.slot-head .mono {
  font-size: 15px;
  font-weight: 700;
  color: var(--dk-fg-125aa7);
}

.piece-card + .piece-card {
  margin-top: 10px;
}

.piece-card .code.mono {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dk-fg-2f5a4d);
}

.piece-card .dims {
  font-size: 15px;
  font-weight: 600;
  color: var(--dk-fg-173f37);
}

.piece-card .dims small {
  font-size: 11px;
  font-weight: 500;
  color: var(--dk-fg-5d7b6e);
}

.price-line {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--dk-line-d9e9e0);
  font-size: 12.5px;
  color: var(--dk-fg-5d7b6e);
}

.price-line b {
  color: var(--dk-fg-173f37);
}

.grand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #0f3b33;
  color: #fff;
}

.grand span {
  flex: 1;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #a8d8c1;
}

.grand b {
  font-family: var(--font-mono);
  font-size: 17px;
}

/* ---------- level bar on cards ---------- */

.level {
  display: block;
  height: 5px;
  border-radius: 5px;
  background: var(--dk-bg-e3f1e8);
  margin: 12px 0 2px;
  position: relative;
  overflow: hidden;
}

.level:after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill);
  border-radius: inherit;
  background: linear-gradient(90deg, #15a75a, #5bcaf1);
}

/* ---------- sheets ---------- */

.secondary,
.danger {
  border: 1px solid var(--dk-line-bfe0cc);
  background: var(--dk-bg-fff);
  color: var(--dk-fg-11754a);
  border-radius: 14px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
}

.danger {
  border-color: var(--dk-line-efb4ae);
  color: var(--dk-fg-b3261e);
}

.primary.amber {
  background: linear-gradient(110deg, #d98a12, #c97a06);
  color: #fff;
}

.secondary svg,
.danger svg {
  width: 19px;
}

.sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

#act-form .secondary {
  margin-top: 10px;
}

.helper.center {
  text-align: center;
  margin-top: 12px;
}

.sheet-sub {
  margin-top: 24px;
}

.sheet-sub h3 {
  font-size: 16px;
}

#sheet-title .mono {
  font-size: 0.95em;
  letter-spacing: -0.5px;
}

.sheet-lede {
  font-size: 14.5px;
  color: var(--dk-fg-587a6b);
  margin: -6px 0 14px;
}

.verified {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dk-fg-0f7a45);
  background: var(--dk-bg-e2f6ea);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

.verified svg {
  width: 18px;
  height: 18px;
}

.warnbox {
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  background: var(--dk-bg-fdecea);
  color: var(--dk-fg-7c231d);
}

.warnbox b {
  display: block;
  margin-bottom: 2px;
}

.warnbox.amber {
  background: var(--dk-bg-fdf1dc);
  color: var(--dk-fg-6b4508);
}

.warnbox.blue {
  background: var(--dk-bg-e6f0fb);
  color: var(--dk-fg-123f75);
}

.item-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 4px 0 16px;
}

.item-gauge {
  --p: var(--pct);
  flex: none;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(closest-side, var(--dk-bg-fff) 78%, transparent 80% 100%), conic-gradient(from 0deg, #15a75a, #5bcaf1 calc(var(--p) * 1%), var(--dk-bg-dcefe4) 0);
}

.item-gauge div {
  text-align: center;
}

.item-gauge strong {
  display: block;
  font-family: var(--font);
  font-size: 26px;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--dk-fg-125d49);
}

.item-gauge small {
  font-size: 11px;
  color: var(--dk-fg-587a6b);
}

.item-hero-copy {
  min-width: 0;
  flex: 1;
}

.big-dims {
  font-size: 26px;
  font-weight: 700;
  color: var(--dk-fg-173f37);
  margin: 8px 0 2px;
  line-height: 1.15;
}

.item-hero-copy small {
  font-size: 12.5px;
  color: var(--dk-fg-587a6b);
}

.where-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--dk-bg-f1f7fb);
  border: 1px solid var(--dk-line-d6e5f2);
  margin-bottom: 12px;
}

.where-card small {
  display: block;
  font-size: 12px;
  color: var(--dk-fg-587a8b);
}

.where-card b {
  display: block;
  font-size: 26px;
  color: var(--dk-fg-125aa7);
  line-height: 1.15;
}

.where-card span {
  font-size: 12.5px;
  color: var(--dk-fg-3c5f78);
}

.baygrid {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 16px);
  gap: 3px;
}

.baygrid .cell {
  height: 12px;
  border-radius: 3px;
  background: var(--dk-bg-dbe8f3);
  font-size: 0;
}

.baygrid .cell.row {
  background: var(--dk-bg-b7d3ee);
}

.baygrid .cell.here {
  background: #15a75a;
  box-shadow: 0 0 0 2px #15a75a55;
}

.calcbox {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--dk-bg-f4f9f6);
  border: 1px dashed var(--dk-line-c9dfd2);
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dk-fg-587a6b);
}

.calcbox b {
  font-size: 15px;
  color: var(--dk-fg-173f37);
}

.locked {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--dk-bg-fff7ea), var(--dk-bg-fdf0dc));
  border: 1px solid var(--dk-line-f0d6a8);
  color: var(--dk-fg-5c3d08);
  display: grid;
  gap: 10px;
}

.locked-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.locked-head svg {
  color: var(--dk-fg-c97a06);
}

.locked p {
  font-size: 13.5px;
  line-height: 1.5;
}

.locked .where {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.locked .where .mono {
  font-size: 30px;
  font-weight: 700;
  color: var(--dk-fg-3d2904);
}

.locked .where small {
  font-size: 12.5px;
}

.damaged {
  border: 0;
  background: none;
  color: var(--dk-fg-8a5a0a);
  text-decoration: underline;
  font-size: 13.5px;
  min-height: 40px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field input.mono {
  font-family: var(--font-mono);
}

.form-card {
  margin-top: -8px;
  position: relative;
  z-index: 1;
  padding: 20px;
  border-radius: 22px;
  background: var(--dk-bg-fff);
  border: 1px solid var(--dk-line-d3e8dc);
  box-shadow: 0 10px 28px #125aa70d;
}

.form-card h2 {
  font-family: var(--font);
  font-size: 22px;
  color: var(--dk-fg-154b57);
}

.form-card .calcbox {
  margin-top: 12px;
}

.remain {
  margin: 14px 0 10px;
}

.remain-bar {
  height: 12px;
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, var(--dk-bg-f4d9a8) 0 6px, var(--dk-bg-f8e6c4) 6px 12px);
  overflow: hidden;
}

.remain-bar span {
  display: block;
  height: 100%;
  width: var(--left);
  border-radius: inherit;
  background: linear-gradient(90deg, #15a75a, #5bcaf1);
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.remain p {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-size: 13px;
  color: var(--dk-fg-587a6b);
}

.remain strong {
  font-family: var(--font);
  font-size: 18px;
  color: var(--dk-fg-125d49);
}

.remain.over strong {
  color: var(--dk-fg-a4480f);
}

.field-error {
  color: var(--dk-fg-b3261e);
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.field-error:empty {
  display: none;
}

.people {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.person {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 1px solid var(--dk-line-d3e6da);
  border-radius: 16px;
  background: var(--dk-bg-fff);
  padding: 12px 14px;
  font: inherit;
  color: inherit;
}

.person.on {
  border-color: #15a75a;
  box-shadow: 0 0 0 3px #15a75a1c;
}

.person .av {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(140deg, var(--dk-bg-e1f7e8), var(--dk-bg-e6f1fb));
  color: var(--dk-fg-117549);
}

.person-copy b {
  display: block;
}

.person-copy small {
  font-size: 12.5px;
  color: var(--dk-fg-587a6b);
}

.perms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.perms span {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--dk-bg-eef6f1);
  color: var(--dk-fg-2f5a4d);
}

/* ---------- QR label: monochrome, hard edges, 100 × 70 mm ---------- */

.labels-intro {
  text-align: center;
}

.labels-intro p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--dk-fg-587a6b);
}

.label-stack {
  display: grid;
  gap: 14px;
  margin: 16px 0 4px;
}

.lbl {
  aspect-ratio: 10 / 7;
  max-width: 100%;
  background: #fff;
  color: #000;
  border: 1.5px solid #000;
  border-radius: 0;
  padding: 3.5% 4%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2%;
  font-family: var(--font);
  container-type: inline-size;
  box-shadow: 0 10px 26px #12453a26;
  overflow: hidden;
}

.lbl header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #000;
  padding-bottom: 1.5cqw;
}

.lbl-loc {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 6cqw;
  line-height: 1;
}

.lbl header img {
  height: 5.5cqw;
  width: auto;
  /* Solid black: crisp on thermal label printers and on A4 alike. */
  filter: grayscale(1) brightness(0);
}

.lbl-body {
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 3cqw;
  align-items: center;
  min-height: 0;
}

.lbl-qr svg {
  display: block;
  width: 100%;
  height: auto;
  stroke: none;
}

.lbl-qr svg path,
.lbl-qr svg rect {
  stroke: none;
}

.lbl-copy {
  min-width: 0;
}

.lbl-name {
  font-weight: 700;
  font-size: 4.6cqw;
  line-height: 1.15;
}

.lbl-sup {
  font-size: 2.9cqw;
  margin-top: 0.6cqw;
}

.lbl-dims {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 6.6cqw;
  line-height: 1.1;
  margin-top: 1.8cqw;
  white-space: nowrap;
}

.lbl-dims small {
  font-size: 3.4cqw;
}

.lbl-sqm {
  font-family: var(--font-mono);
  font-size: 3.4cqw;
}

.lbl-idlb {
  font-size: 2.5cqw;
  margin-top: 1.8cqw;
}

.lbl-id {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 6.4cqw;
  line-height: 1.05;
  border: 1.5px solid #000;
  display: inline-block;
  padding: 0.4cqw 1.6cqw;
}

.lbl footer {
  display: flex;
  justify-content: space-between;
  border-top: 1.5px solid #000;
  padding-top: 1.2cqw;
  font-family: var(--font-mono);
  font-size: 2.5cqw;
}

.qrfail {
  font-size: 12px;
  color: #b3261e;
}

#print-area {
  display: none;
}

/* ---------- full-screen scanner ---------- */

dialog.scanner {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #03130e;
  color: #fff;
  overflow: hidden;
  box-shadow: none;
}

dialog.scanner::backdrop {
  background: #03130e;
}

.scanner video,
.scan-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-fallback {
  display: none;
  background: linear-gradient(180deg, #03130ecc, #03130e66 40%, #03130ef2 78%), url("assets/art-scan.jpg") center / cover;
}

.scanner.no-camera .scan-fallback {
  display: block;
}

.scan-top {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}

.scan-title {
  font-family: var(--font);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.2px;
}

.scan-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #ffffff33;
  background: #ffffff1c;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  display: grid;
  place-items: center;
}

.scan-round[hidden] {
  visibility: hidden;
  display: grid;
}

.scan-round.active {
  background: #fff;
  color: #0f7a4a;
}

.scan-window {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(80vw, 340px);
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 24px;
  box-shadow: 0 0 0 100vmax #02110cb3;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s;
  z-index: 1;
}

.scanner.no-camera .scan-window {
  box-shadow: none;
}

.scan-window i {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 4px solid #4ff0a3;
  filter: drop-shadow(0 0 8px #4ff0a399);
  transition: border-color 0.3s;
}

.scan-window i:nth-child(1) {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 24px 0 0 0;
}

.scan-window i:nth-child(2) {
  top: -2px;
  right: -2px;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 24px 0 0;
}

.scan-window i:nth-child(3) {
  bottom: -2px;
  left: -2px;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 24px;
}

.scan-window i:nth-child(4) {
  bottom: -2px;
  right: -2px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 24px 0;
}

.scan-laser {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #58ffb0 25%, #5bb8ff 75%, transparent);
  box-shadow: 0 0 12px #58ffb0, 0 0 26px #5bb8ff88;
}

.scanner.hit .scan-window {
  transform: translate(-50%, -50%) scale(1.05);
  background: #4ff0a32e;
}

.scanner.hit .scan-window i {
  border-color: #fff;
}

.scanner.hit .scan-laser {
  opacity: 0;
}

.scan-status {
  position: absolute;
  left: 50%;
  top: calc(38% + 112px);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 40px);
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  padding: 9px 16px;
  border-radius: 20px;
  background: #ffffff14;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
}

.scan-status[data-tone="warn"] {
  background: #f3b34a26;
  color: #ffe2b0;
}

.scan-status[data-tone="ok"] {
  background: #4ff0a333;
  color: #d4ffe9;
}

.scan-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, #02110cf0 30%);
  z-index: 2;
}

.manual {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
}

.manual input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--dk-line-ffffff38);
  background: var(--dk-bg-ffffff17);
  color: #fff;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.manual input::placeholder {
  color: #ffffff8c;
  letter-spacing: 0.5px;
  text-transform: none;
  font-family: var(--font);
}

.manual input:focus {
  outline: 2px solid var(--dk-line-4ff0a3);
}

.manual button {
  min-width: 78px;
  border: 0;
  border-radius: 14px;
  background: var(--dk-bg-4ff0a3);
  color: var(--dk-fg-03271a);
  font-weight: 750;
}

.scan-samples-wrap {
  max-width: 520px;
  margin: 16px auto 0;
}

.scan-samples-wrap small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #ffffff99;
  margin-bottom: 8px;
}

.scan-samples {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.scan-samples button {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1px solid #ffffff30;
  background: #ffffff12;
  color: #fff;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .nav-scan-ring:after {
    animation: halo 2.6s ease-out infinite;
  }
  .scan-card-cta i {
    animation: halo 2.2s ease-out infinite;
  }
  @keyframes halo {    0% {
      opacity: 0.8;
      transform: scale(1);
    }
    100% {
      opacity: 0;
      transform: scale(1.45);
    }
  }
  .scan-laser {
    animation: laser 1.7s ease-in-out infinite alternate;
  }
  @keyframes laser {    from {
      top: 12%;
    }
    to {
      top: 88%;
    }
  }
  .scanner.miss .scan-window {
    animation: shake 0.4s;
  }
  @keyframes shake {    20%,
    60% {
      transform: translate(calc(-50% - 8px), -50%);
    }
    40%,
    80% {
      transform: translate(calc(-50% + 8px), -50%);
    }
  }
  #results .stock-card {
    animation: card-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
  }
  @keyframes card-in {    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
  #sheet[open] {
    animation: sheet-up 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  @keyframes sheet-up {    from {
      transform: translateY(40px);
      opacity: 0;
    }
  }
  .scanner[open] {
    animation: fade-in 0.25s ease-out;
  }
  @keyframes fade-in {    from {
      opacity: 0;
    }
  }
  .item-gauge {
    animation: gauge 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  @keyframes gauge {    from {
      --p: 0;
    }
  }
  .label-stack .lbl {
    animation: print-out 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .label-stack .lbl:nth-child(2) {
    animation-delay: 0.25s;
  }
  @keyframes print-out {    from {
      clip-path: inset(0 0 100% 0);
      transform: translateY(-18px);
    }
    to {
      clip-path: inset(0 0 0 0);
      transform: none;
    }
  }
  .labels-intro .success-mark {
    animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
  }
  @keyframes pop {    from {
      transform: scale(0.4);
      opacity: 0;
    }
  }
  ::view-transition-old(root) {
    animation: vt-out 0.16s ease-in both;
  }
  ::view-transition-new(root) {
    animation: vt-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  @keyframes vt-out {    to {
      opacity: 0;
      transform: translateY(-6px);
    }
  }
  @keyframes vt-in {    from {
      opacity: 0;
      transform: translateY(12px);
    }
  }
}

/* ---------- printing: labels only, one 100 × 70 mm label per page ---------- */

@media print {
  @page  {    size: 100mm 70mm;
    margin: 0;
  }
  html,
  body {
    background: var(--dk-bg-fff) !important;
  }
  .app,
  dialog,
  #toast {
    display: none !important;
  }
  #print-area {
    display: block;
  }
  #print-area .lbl {
    width: 100mm;
    height: 70mm;
    aspect-ratio: auto;
    border: 0;
    box-shadow: none;
    padding: 3.5mm 4mm;
    break-after: page;
    page-break-after: always;
  }
  #print-area .lbl:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  /* QR at 34 mm keeps the module size up at error-correction H. */
  #print-area .lbl-body {
    grid-template-columns: 34mm 1fr;
  }
}

.nowrap {
  white-space: nowrap;
}

label.check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
  min-height: 44px;
}

label.check input {
  width: 22px;
  height: 22px;
  accent-color: #15a75a;
  flex: none;
}

.split-fields {
  border: 1px solid var(--dk-line-cfe3f5);
  background: var(--dk-bg-f1f7fb);
  border-radius: 16px;
  padding: 4px 14px 14px;
  margin: 8px 0 0;
}

.split-fields legend {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dk-fg-125aa7);
  padding: 0 6px;
}

.split-fields .calcbox {
  margin-top: 10px;
}

button.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--dk-fg-125aa7);
  text-decoration: underline;
  font-size: inherit;
  font-weight: 700;
}

.signout {
  margin-top: 10px;
  text-decoration: none;
}

/* Home header: text first, then the loop artwork sitting under it on the right, so the
   picture fills the space instead of sitting behind the headline. */

.art-stage.home {
  height: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 46px;
}

.art-stage.home .stage-art {
  position: relative;
  order: 2;
  top: auto;
  left: auto;
  z-index: 0;
  align-self: flex-end;
  width: 82%;
  max-width: 460px;
  height: auto;
  margin: -6px -10px 0 0;
  object-fit: contain;
  mask-image: radial-gradient(ellipse at center, #000 62%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 62%, transparent 76%);
}

.art-stage.home .stage-copy {
  max-width: 100%;
}

.art-stage.home:after {
  display: none;
}

.art-stage.home + .scan-card {
  margin-top: -40px;
}

/* With the admin "on the shelf" chip, the loop sits beside the chip rather than below it. */

.art-stage.home:has(.arrival-chip) .stage-art {
  width: 60%;
  margin-top: -104px;
}

/* ---------- polish pass ---------- */

#sheet-title:focus {
  outline: none;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-grid > :only-child,
.action-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.used-up {
  width: auto;
  margin: 18px 0 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--dk-line-d9e9e0);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  font-size: 13px;
  color: var(--dk-fg-587a6b);
}

.text-danger {
  border: 0;
  background: none;
  color: var(--dk-fg-b3261e);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  min-height: 40px;
  padding: 0 4px;
}

.stage-count span {
  max-width: 120px;
}

/* ---------- admin pages: History and Labels ---------- */

.page-head {
  padding: 22px 0 18px;
}

.page-head .back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dk-fg-13804a);
  min-height: 40px;
  margin-bottom: 6px;
}

.page-head .back svg {
  width: 16px;
  height: 16px;
}

svg.flip {
  transform: scaleX(-1);
}

.page-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--dk-fg-197744);
}

.page-head h1 {
  font-family: var(--font);
  font-size: 34px;
  letter-spacing: -1.2px;
  color: var(--dk-fg-154b57);
  margin: 6px 0 6px;
}

.page-head p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--dk-fg-587a6b);
  max-width: 34ch;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.tile {
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1px solid var(--dk-line-d3e8dc);
  border-radius: 18px;
  background: var(--dk-bg-fff);
  padding: 14px 14px 12px;
}

.tile strong {
  display: block;
  font-family: var(--font);
  font-size: 30px;
  letter-spacing: -1px;
  color: var(--dk-fg-125d49);
  line-height: 1.05;
}

.tile small {
  font-size: 12px;
  color: var(--dk-fg-587a6b);
}

.tile.warn {
  background: var(--dk-bg-fff6e8);
  border-color: var(--dk-line-f0d6a8);
}

.tile.warn strong {
  color: var(--dk-fg-a4580a);
}

.tool-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--dk-line-d3e3f0);
  background: linear-gradient(150deg, var(--dk-bg-f3f8fd), var(--dk-bg-fff));
}

.tool-link .icon-tile {
  margin-bottom: 6px;
  color: var(--dk-fg-125aa7);
}

.tool-link strong {
  font-family: var(--font);
  font-size: 18px;
  color: var(--dk-fg-154b57);
}

.tool-link small {
  font-size: 12.5px;
  color: var(--dk-fg-587a6b);
}

.warn-text {
  color: var(--dk-fg-a4580a);
}

.people-filter {
  margin-top: 8px;
}

.people-filter .filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 800;
  background: var(--dk-bg-e2f3ea);
  color: var(--dk-fg-117549);
}

.filter.active .mini-av {
  background: var(--dk-bg-ffffff33);
  color: #fff;
}

.day-head {
  margin-top: 18px;
}

.day-head h3 {
  font-size: 15px;
  color: var(--dk-fg-154b57);
}

.print-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: var(--dk-bg-fff);
  border: 1px solid var(--dk-line-d3e8dc);
  box-shadow: 0 10px 28px #125aa70d;
  margin-bottom: 12px;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg button {
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1px solid var(--dk-line-d3e3dc);
  border-radius: 14px;
  background: var(--dk-bg-f7fbf9);
  padding: 10px 12px;
}

.seg button b {
  display: block;
  font-size: 14px;
}

.seg button small {
  font-size: 11.5px;
  color: var(--dk-fg-587a6b);
}

.seg button.on {
  border-color: #15a75a;
  background: var(--dk-bg-eaf8f0);
  box-shadow: 0 0 0 3px #15a75a1c;
}

.print-card .primary[disabled] {
  opacity: 0.5;
}

.select-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--dk-fg-587a6b);
  margin: 4px 4px 8px;
}

.select-row .text-button {
  font-size: 13px;
}

.lrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 60px;
  cursor: pointer;
}

.lrow + .lrow {
  border-top: 1px solid var(--dk-line-e3efe8);
}

.lrow input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: #15a75a;
}

.lrow-loc {
  flex: none;
  min-width: 52px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dk-fg-125aa7);
}

.lrow .copy strong {
  font-size: 13.5px;
  color: var(--dk-fg-173f37);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lrow .copy small {
  font-size: 12px;
  color: var(--dk-fg-587a6b);
}

/* A4 label sheets: 2 × 4 grid of 100 × 70 mm labels with light cut guides. */

@media print {
  #print-area.a4 .a4-page {
    display: grid;
    grid-template-columns: 100mm 100mm;
    grid-auto-rows: 70mm;
    break-after: page;
    page-break-after: always;
  }
  #print-area.a4 .a4-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  #print-area.a4 .lbl {
    break-after: auto;
    page-break-after: auto;
    outline: 0.2mm dashed #9aa;
    outline-offset: -0.1mm;
  }
}

.page-head ~ .collection-controls {
  margin-top: 0;
}

.lrow .copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0;
  padding: 0;
}

.admin-link {
  margin: 14px 0 4px;
  text-decoration: none;
  flex-wrap: wrap;
  gap: 4px 9px;
}

.admin-link small {
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.85;
}

.perms .all {
  background: #125aa7;
  color: #fff;
}

/* ---------- undo in toasts ---------- */

#toast {
  position: fixed;
  bottom: 125px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: #173c2f;
  color: #fff;
  box-shadow: 0 5px 30px #0002;
  padding: 13px 20px;
  border-radius: 12px;
  z-index: 20;
  max-width: 90%;
  width: max-content;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
}

#toast.has-action {
  pointer-events: auto;
}

#toast button {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 36px;
  background: #ffffff26;
  color: #b8ffd8;
  font-weight: 800;
  letter-spacing: 0.3px;
}

#toast[popover] {
  inset: auto auto 125px 50%;
  margin: 0;
  border: 0;
  overflow: visible;
}

#toast[popover]:not(:popover-open) {
  display: none;
}

/* ---------- offline ---------- */

.offline-pill {
  display: none;
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  padding: 7px 14px;
  border-radius: 999px;
  background: #6b4508;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 6px 18px #0003;
}

body.offline .offline-pill {
  display: block;
}

/* ---------- running low ---------- */

.alert.low {
  background: var(--dk-bg-fff4f3);
  border-color: var(--dk-line-f0c2bd);
}

.alert.low svg:first-child {
  color: var(--dk-fg-b3261e);
}

.low-meter {
  display: block;
  height: 5px;
  border-radius: 5px;
  background: var(--dk-bg-f3d9d6);
  margin-top: 6px;
  overflow: hidden;
}

.low-meter i {
  display: block;
  height: 100%;
  background: #b3261e;
}

/* ---------- stocktake ---------- */

.count-areas {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.count-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font: inherit;
  text-align: left;
  color: var(--dk-fg-173f37);
  background: var(--dk-bg-fff);
  border: 1px solid var(--dk-line-d3e8dc);
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.count-area strong {
  font-family: var(--font);
  font-size: 19px;
  flex: 1;
}

.count-area small {
  font-size: 13px;
  color: var(--dk-fg-587a6b);
}

.count-area svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--dk-fg-15a75a);
  stroke-width: 2;
}

.count-area:hover:not(:disabled) {
  border-color: #15a75a;
}

.count-area:active:not(:disabled) {
  transform: scale(0.98);
}

.count-area:disabled {
  opacity: 0.45;
  cursor: default;
}

.count-progress {
  background: var(--dk-bg-fff);
  border: 1px solid var(--dk-line-d3e8dc);
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.count-num {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.count-num strong {
  font-family: var(--font);
  font-size: 40px;
  letter-spacing: -1.5px;
  color: var(--dk-fg-125d49);
}

.count-num span {
  color: var(--dk-fg-587a6b);
  font-size: 14px;
}

.count-bar-track {
  height: 8px;
  border-radius: 8px;
  background: #e3efe8;
  overflow: hidden;
  margin: 10px 0 8px;
}

.count-bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #15a75a, #4fd18b);
  border-radius: inherit;
  transition: width 0.4s;
}

.count-progress small {
  font-size: 12.5px;
  color: var(--dk-fg-587a6b);
}

.count-slots {
  margin-bottom: 16px;
}

.count-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  padding: 12px 14px;
  min-height: 58px;
  cursor: pointer;
}

.count-slot + .count-slot {
  border-top: 1px solid var(--dk-line-e3efe8);
}

.count-slot .copy {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.count-slot .copy strong {
  font-size: 14px;
  color: var(--dk-fg-173f37);
}

.count-slot .copy small {
  font-size: 12px;
  color: var(--dk-fg-587a6b);
}

.count-slot .chev {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #8fb3a2;
  stroke-width: 2;
}

.count-slot.ok {
  background: var(--dk-bg-effaf3);
}

.count-slot.ok .chev {
  stroke: var(--dk-fg-15a75a);
}

.count-slot.warn {
  background: var(--dk-bg-fff6e8);
}

.count-slot.warn .copy small {
  color: var(--dk-fg-a4580a);
}

.count-slot.part .copy small {
  color: var(--dk-fg-125aa7);
}

.tiles.four {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 560px) {
  .tiles.four {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tile.ok strong {
  color: var(--dk-fg-15a75a);
}

#main .primary.wide + .secondary.wide,
#main .panel + .primary.wide,
#main .panel + .secondary.wide {
  margin-top: 10px;
}

.danger-outline {
  color: var(--dk-fg-b3261e);
  border-color: var(--dk-line-efc4c0);
}

/* The count bar sits in the scanner while counting a slot. */

.count-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(66px + env(safe-area-inset-top));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 18px;
  background: #02110cc7;
  border: 1px solid #ffffff1f;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
}

.count-bar[hidden] {
  display: none;
}

.cb-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.cb-copy small {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: #7ff0b6;
}

.cb-copy strong {
  font-size: 16px;
}

.cb-copy span {
  font-size: 12.5px;
  color: #cfe7db;
}

.cb-done {
  flex: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #03130e;
  background: #4ff0a3;
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  cursor: pointer;
}

/* ---------- your pieces ---------- */

.mine .panel {
  border-color: var(--dk-line-bfe3cf);
}

.mine-row {
  display: flex;
  align-items: stretch;
}

.mine-row + .mine-row {
  border-top: 1px solid var(--dk-line-e3efe8);
}

.mine-row .list-row {
  flex: 1;
  min-width: 0;
  border: 0;
}

.mine-back {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 76px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--dk-fg-0f7a43);
  background: var(--dk-bg-effaf3);
  border: 0;
  border-left: 1px solid var(--dk-line-d3e8dc);
  cursor: pointer;
}

.mine-back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.mine-row.late .copy small {
  color: var(--dk-fg-a4580a);
}

.mine .helper {
  margin-top: 8px;
}

/* ---------- photos ---------- */

.photo-strip {
  margin: 14px 0;
}

.photo-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.photo-thumb,
.photo-add {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--dk-line-d3e8dc);
  background: var(--dk-bg-eef6f1);
  padding: 0;
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb.gone {
  background: repeating-linear-gradient(45deg, var(--dk-bg-eef6f1) 0 8px, var(--dk-bg-e2eee7) 8px 16px);
}

.photo-thumb.gone img {
  display: none;
}

.photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dk-fg-0f7a43);
  border-style: dashed;
  border-color: var(--dk-line-9fd3b6);
  background: var(--dk-bg-f5fbf7);
}

.photo-row:not(:has(.photo-thumb)) .photo-add {
  width: auto;
  height: 52px;
  flex: 1;
  flex-direction: row;
  font-size: 14px;
}

.photo-add svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.photo-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--dk-fg-587a6b);
}

.photo-big {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #0b1f18;
  min-height: 200px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.photo-big img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  display: block;
}

.photo-big span {
  display: none;
  color: #cfe7db;
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

.photo-big.gone img {
  display: none;
}

.photo-big.gone span {
  display: block;
}

.photo-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.photo-sheet .primary.wide {
  margin-top: 4px;
}

/* ---------- offcut nudge ---------- */

.nudge {
  margin: 14px 0 4px;
  padding: 14px;
  border-radius: 18px;
  background: var(--dk-bg-f1f8ff);
  border: 1px solid var(--dk-line-cfe2f7);
}

.nudge-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.nudge-head > svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--dk-fg-125aa7);
  stroke-width: 1.8;
  margin-top: 1px;
}

.nudge-head b {
  display: block;
  color: var(--dk-fg-0e3f75);
  font-size: 15px;
}

.nudge-head small {
  font-size: 12.5px;
  color: var(--dk-fg-3f5f7f);
  line-height: 1.4;
}

.nudge .field-row {
  margin-bottom: 8px;
}

.nudge-list {
  display: grid;
  gap: 6px;
}

.nudge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--dk-fg-173f37);
  background: var(--dk-bg-fff);
  border: 1px solid var(--dk-line-dbe8f5);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.nudge-row[hidden] {
  display: none;
}

.nudge-row b {
  color: var(--dk-fg-125aa7);
  min-width: 56px;
}

.nudge-row span {
  flex: 1;
  min-width: 0;
}

.nudge-row em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--dk-fg-0f7a43);
}

.nudge-row .chev {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #8fa9c2;
  stroke-width: 2;
}

.nudge-none {
  font-size: 13px;
  color: var(--dk-fg-3f5f7f);
  margin: 6px 2px 0;
}

.oc-tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--dk-fg-125aa7);
  background: var(--dk-bg-e4f0fc);
  border-radius: 6px;
  padding: 2px 6px;
  vertical-align: 2px;
}

/* Slot labels: the slot code is the headline. */

.slot-lbl .slot-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13cqw;
  line-height: 1;
  letter-spacing: -0.5cqw;
  margin-bottom: 2cqw;
}

.slot-lbl .lbl-sup {
  font-size: 3.4cqw;
}

/* ---------- first-time tour ---------- */

.tour {
  text-align: center;
}

.tour-art {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 14px;
}

.tour-icon {
  width: 88px;
  height: 88px;
  margin: 6px auto 16px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--dk-bg-e6f6ed), var(--dk-bg-e4f0fc));
}

.tour-icon svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--dk-fg-0f7a43);
  stroke-width: 1.8;
}

.tour p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--dk-fg-2c554b);
  margin: 0 0 18px;
}

.tour-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}

.tour-dots i {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: var(--dk-bg-cfe3d8);
  transition: width 0.2s;
}

.tour-dots i.on {
  width: 22px;
  background: #15a75a;
}

.tour .secondary.wide {
  margin-top: 10px;
}

.center-btn {
  display: block;
  margin: 12px auto 0;
}

/* ---------- tablets ----------
   From iPad width up, the app uses the room: a wider column, stock cards side by side, and the
   bottom bar and sheets sized for the bigger screen. Phones are unchanged. */
@media (min-width: 760px) {
  .app {
    max-width: min(1080px, calc(100% - 48px));
  }
  .demo-label {
    width: min(100%, 1080px);
  }
  nav,
  .app nav {
    width: min(640px, calc(100% - 72px));
  }
  dialog {
    width: min(100%, 620px);
    max-width: 620px;
  }
  .loc-group,
  #results:has(> .stock-card) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    align-items: start;
  }
  .loc-group > .loc-head,
  .loc-group > .slot-head,
  #results:has(> .stock-card) > :not(.stock-card) {
    grid-column: 1 / -1;
  }
  .find-card #find-results,
  .count-slots,
  .count-areas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .find-card #find-results > :not(.find-hit) {
    grid-column: 1 / -1;
  }
  .count-slots .count-slot + .count-slot {
    border-top: 0;
  }
  .count-slots {
    gap: 0;
  }
  .stage-copy {
    max-width: 55%;
  }
}
@media (min-width: 1100px) {
  .loc-group,
  #results:has(> .stock-card) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Piece sheet: just the size, big. */
.item-hero.simple {
  display: block;
}
.item-hero.simple .big-dims {
  font-size: 40px;
  margin-top: 8px;
}
.item-hero.simple .big-dims small {
  font-size: 18px;
  color: #587a6b;
}

/* ---------- owner: view the app as another rank (profile sheet) ---------- */
.view-as .filters {
  flex-wrap: wrap;
  overflow: visible;
}

/* ---------- phones: the bottom bar sits on the bottom edge ---------- */
/* Docked flush to the bottom (rounded top corners), with room for the iPhone home bar. */
@media (max-width: 649px) {
  nav {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    border-width: 1px 0 0 !important;
    border-radius: 22px 22px 0 0;
    padding: 8px 7px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 30px #1a604318;
    background: #fff;
  }
  .app main {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }
  #toast {
    bottom: calc(104px + env(safe-area-inset-bottom));
  }
}

/* No zooming: no double-tap zoom, and text boxes are big enough that phones don't zoom into them. */
html {
  touch-action: manipulation;
}
input,
select,
textarea {
  font-size: max(16px, 1em) !important;
}
