/* Laagste prijs: schapplan. The store plan, built: products stand as packs on
   lit shelves, price tickets sit in the shelf lip, deals hang in promo yellow.
   Yellow appears only where a deal is live; store colours appear only as the
   small swatch beside a store's written name. */
:root {
  --ground: #e4e7e2;
  --back: #dfe3dd;          /* the shelving's back panel */
  --paper: #fbfbf9;
  --paper-2: #f0f2ee;
  --pack: #ffffff;
  --ink: #1b211e;
  --ink-2: #525c56;
  --ink-3: #6b746e;
  --rule: #cfd4ce;
  --rule-2: #a3aba4;
  --shelf: #2a332f;
  --shelf-top: #c9cfc8;     /* the shelf board's top face, catching the light */
  --fixture: #0d6a4b;
  --fixture-2: #0a563d;
  --fixture-soft: #dcebe3;
  --deal: #f3c318;
  --deal-deep: #c99a00;
  --hatch: repeating-linear-gradient(-45deg, var(--deal) 0 5px, var(--ink) 5px 7px);
  --lift-1: 0 1px 1px rgba(27, 33, 30, .08), 0 2px 5px -1px rgba(27, 33, 30, .10);
  --lift-2: 0 2px 3px rgba(27, 33, 30, .08), 0 12px 24px -10px rgba(27, 33, 30, .28);
  --lift-3: 0 3px 6px rgba(27, 33, 30, .10), 0 22px 40px -14px rgba(27, 33, 30, .32);
  --ticket: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 1px 2px rgba(0, 0, 0, .35);
  --radius: 6px;
  --sans: "Barlow", system-ui, sans-serif;
  --cond: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* Store identity: only ever the swatch next to the written name. */
  --st-kruidvat: #e32219;
  --st-etos: #f4a5c7;
  --st-ah: #00ade6;
  --st-jumbo: #eeb717;
  --st-dirk: #e30613;
  --st-vomar: #fc0816;
  --st-plus: #007f38;
  --st-gall: #bc4d1a;
  --st-dirckiii: #c00418;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.4 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  caret-color: var(--fixture);
}
::selection { background: var(--fixture-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--fixture); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rule-2); border: 3px solid var(--ground); border-radius: 6px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--fixture); text-underline-offset: 3px; }
.ico { width: 18px; height: 18px; flex: none; }
h1, h2, p { margin: 0; }

/* Store name with its swatch */
.st { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.st::before {
  content: ""; width: 9px; height: 9px; border-radius: 2px; flex: none;
  background: var(--st, var(--rule-2)); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12) inset;
}
.st-kruidvat { --st: var(--st-kruidvat); }
.st-etos { --st: var(--st-etos); }
.st-ah { --st: var(--st-ah); }
.st-jumbo { --st: var(--st-jumbo); }
.st-dirk { --st: var(--st-dirk); }
.st-vomar { --st: var(--st-vomar); }
.st-plus { --st: var(--st-plus); }
.st-gall { --st: var(--st-gall); }
.st-dirckiii { --st: var(--st-dirckiii); }

/* Login: the app's card standing on a shelf, nothing else on the floor. */
body.gated .titleblock, body.gated .floor { display: none; }
.gate { flex: 1; display: grid; place-items: center; padding: 32px 16px 48px; }
.gate-card {
  position: relative; width: min(100%, 390px);
  background: var(--paper); border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--lift-3); padding: 30px 28px 26px;
}
.gate-card::after {
  content: ""; position: absolute; left: -14px; right: -14px; bottom: -12px; height: 12px;
  background: var(--shelf); border-radius: 2px; box-shadow: 0 1px 0 var(--shelf-top) inset, var(--lift-2);
}
.gate h1 { font: 700 36px/1 var(--cond); text-transform: uppercase; letter-spacing: .01em; }
.gate-sub { margin-top: 8px; color: var(--ink-2); text-wrap: pretty; }
.gate-form { margin-top: 24px; display: grid; gap: 8px; }
.gate-form label { font: 600 13px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.gate-form input {
  height: 46px; padding: 0 13px; border: 1px solid var(--rule-2); border-radius: 7px;
  background: var(--pack); box-shadow: 0 1px 2px rgba(27, 33, 30, .06) inset;
}
.gate-form input:focus-visible { outline-offset: 0; border-color: var(--fixture); }
.gate .btn-go {
  margin-top: 6px; height: 46px; justify-content: center;
  background: var(--fixture); border-color: var(--fixture-2); color: var(--paper);
}
.gate .btn-go:hover { background: var(--fixture-2); }
.gate .btn-go:disabled { opacity: .65; cursor: progress; }
.gate-msg { margin-top: 14px; min-height: 1.4em; font-size: 14px; color: var(--ink-2); text-wrap: pretty; }
.gate-msg b { color: var(--ink); }
.gate-msg.err { color: #a3261b; }
.logout {
  align-self: flex-start; margin-top: 5px; padding: 0; border: 0; background: none;
  font: 500 12px/1.2 var(--sans); color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px;
}
.logout:hover { color: var(--ink); }

/* Title block */
.titleblock {
  position: relative; z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule), 0 6px 18px -12px rgba(27, 33, 30, .35);
  min-height: 60px;
}
.tb-name {
  padding: 10px 22px 9px;
  display: flex; flex-direction: column; justify-content: center;
}
.tb-name h1 { font: 700 25px/1 var(--cond); text-transform: uppercase; letter-spacing: .01em; }
.tb-sub { font: 500 13px/1.2 var(--cond); color: var(--ink-2); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }
.tb-stores {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border-left: 1px solid var(--rule);
}
.tb-stores > div {
  padding: 9px 12px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.tb-stores dt { font: 700 14.5px/1.15 var(--cond); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-stores dd { margin: 3px 0 0 15px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The legend lives in the aisle rail at every width; the header keeps room for the stores. */
.lg { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.aisle-legend { display: block; }
.aisle-legend h2 { margin-bottom: 10px; }
.lg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: var(--ink-2); }
.mech-legend.compact { margin-top: 12px; }
.mech-legend.compact dd { font-size: 13px; }
.foot-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.foot-legend .tag { min-width: 30px; font-size: 11px; padding: 1px 4px; }
.sw { width: 18px; height: 9px; display: inline-block; border-radius: 2px; }
.sw-live { background: var(--deal); }
.sw-ending { background: var(--hatch) top / 100% 3px no-repeat, var(--deal); }
.sw-next { box-shadow: inset 0 0 0 1.5px var(--deal-deep); }
.sw-unsure { background: var(--deal); outline: 1.5px dashed var(--ink); outline-offset: -1.5px; }

/* Floor: aisle rail | bay | shelf elevation */
.floor {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) minmax(380px, 450px);
}

/* Aisle rail: a panel set a little forward of the shelving. */
.aisles {
  position: relative; z-index: 2;
  background: var(--paper-2);
  box-shadow: 1px 0 0 var(--rule), 8px 0 20px -16px rgba(27, 33, 30, .4);
  min-height: 0; overflow: auto;
}
.aisles-toggle { display: none; }
.aisle { padding: 16px 16px 14px; border-bottom: 1px solid var(--rule); }
.aisle-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.aisle h2 { font: 700 15px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em; }
.clear { border: 0; background: none; padding: 0; font-size: 13px; color: var(--fixture); text-decoration: underline; text-underline-offset: 3px; }
.aisle-find {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--rule-2); background: var(--pack); border-radius: 5px;
  box-shadow: inset 0 1px 2px rgba(27, 33, 30, .08);
  font-size: 14px;
}
.aisle-find::placeholder, .find input::placeholder { color: var(--ink-3); }
.aisle-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 34vh; overflow: auto; }
.aisle-list button {
  width: 100%; display: flex; justify-content: space-between; gap: 10px;
  padding: 5px 8px; border: 0; background: none; text-align: left; font-size: 14px; border-radius: 4px;
}
.aisle-list button span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 2px; }
.aisle-list button span:last-child { color: var(--ink-2); font-size: 13px; }
.aisle-list button:hover { background: var(--pack); box-shadow: var(--lift-1); }
.aisle-list button[aria-pressed="true"] { background: var(--shelf); color: var(--paper); box-shadow: var(--lift-1); }
.aisle-list button[aria-pressed="true"] span:last-child { color: #c8d0ca; }
.stores-list { max-height: none; }
.aisle-list button:disabled { opacity: .45; cursor: default; }
.aisle-list button:disabled:hover { background: none; box-shadow: none; }
.aisle-list .none { color: var(--ink-3); font-size: 13px; padding: 5px 8px; }
.aisle-flags { display: grid; gap: 10px; }
.flag { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.flag input { appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--pack); display: grid; place-content: center; cursor: pointer; }
.flag input:checked { background: var(--shelf); }
.flag input:checked::after { content: ""; width: 9px; height: 5px; border: solid var(--paper); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }

/* Bay: the shelving unit, lit from above. */
.bay {
  min-height: 0; overflow: auto; padding: 0 26px 48px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 220px),
    var(--back);
}
.bay-head {
  position: sticky; top: 0; z-index: 4;
  display: flex; gap: 12px; align-items: center;
  margin: 0 -26px; padding: 16px 26px 10px;
  background: linear-gradient(180deg, var(--back) 80%, rgba(223, 227, 221, 0));
}
.find {
  flex: 1; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px;
  background: var(--pack); border: 1px solid var(--rule-2); border-radius: 8px;
  box-shadow: var(--lift-1);
}
.find input { flex: 1; min-width: 0; border: 0; background: none; font-size: 16px; outline: none; }
.find:focus-within { outline: 2px solid var(--fixture); outline-offset: 2px; }
.myshelf {
  height: 46px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px;
  background: var(--pack); border: 1px solid var(--rule-2); border-radius: 8px; font-weight: 600;
  box-shadow: var(--lift-1);
}
.myshelf b { font: 700 15px/1 var(--cond); min-width: 18px; text-align: right; }
.myshelf[aria-pressed="true"] { background: var(--shelf); color: var(--paper); border-color: var(--shelf); }
.bay-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 2px 0 18px;
}
.count { font-size: 14px; color: var(--ink-2); }
.count b { color: var(--ink); font-weight: 600; }
.sorts { display: flex; flex-wrap: wrap; background: var(--pack); border-radius: 7px; box-shadow: var(--lift-1); padding: 3px; gap: 2px; }
.sorts button { border: 0; background: none; padding: 5px 11px; font-size: 13px; color: var(--ink-2); border-radius: 5px; }
.sorts button:hover { color: var(--ink); background: var(--paper-2); }
.sorts button[aria-checked="true"] { color: var(--paper); background: var(--ink); }

/* Facings: packs standing on a shelf, tickets in the shelf lip. */
.facings {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  column-gap: 0;
  row-gap: 30px;
}
.facing { position: relative; display: flex; flex-direction: column; min-width: 0; }
.facing > button.open {
  flex: 1; display: flex; flex-direction: column; text-align: left;
  border: 0; padding: 0; background: none; min-width: 0;
}
.pack {
  position: relative;
  flex: 1;
  margin: 0 7px;
  padding: 10px 12px 12px;
  background: var(--pack);
  border-radius: var(--radius) var(--radius) 2px 2px;
  box-shadow: var(--lift-2);
  display: flex; flex-direction: column; gap: 3px;
  min-height: 250px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
@media (hover: hover) {
  .facing > button.open:hover .pack { transform: translateY(-4px); box-shadow: var(--lift-3); }
}
.photo {
  height: 132px; margin: 0 -2px 8px;
  display: grid; place-items: center;
  border-radius: 4px;
}
.photo img {
  max-width: 100%; max-height: 132px; object-fit: contain;
  filter: drop-shadow(0 6px 6px rgba(27, 33, 30, .14));
}
.photo .no-photo { width: 56px; height: 56px; color: var(--rule-2); }
.pname b, .el-name b { font-weight: 700; }
.pname { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.psize { font-size: 12px; color: var(--ink-3); }
.carried { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carried b { color: var(--ink); font-weight: 600; }
.carried .st { margin-right: 6px; gap: 4px; }
.carried .st::before { width: 7px; height: 7px; }

/* Shelf lip: light top face, dark front face, a shadow on the shelf below. */
.edge {
  position: relative;
  background: linear-gradient(180deg, #34403a, var(--shelf) 60%);
  padding: 7px 8px 8px;
  display: flex; align-items: stretch; gap: 6px;
  height: 92px;   /* one board: every lip in a row the same height */
  box-shadow: 0 -5px 0 var(--shelf-top), 0 12px 16px -10px rgba(27, 33, 30, .55);
}
/* One shelf ticket per product: paper for the regular price, promo yellow
   when a deal is live. Price line on top, the deal (if any) below it. */
.ticket {
  flex: 1; min-width: 0;
  background: var(--paper);
  border-radius: 2px; box-shadow: var(--ticket);
  padding: 6px 9px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.ticket.deal { background: var(--deal); }
/* Last day(s): a hazard band along the top of the yellow ticket. */
.ticket.ending { background: var(--hatch) top / 100% 5px no-repeat, var(--deal); padding-top: 9px; }
.ticket.next { box-shadow: inset 0 0 0 1.5px var(--deal-deep), var(--ticket); }
.ticket.unsure { outline: 1.5px dashed var(--ink); outline-offset: -3px; }
.t-price { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.label-price { font: 700 23px/1 var(--cond); letter-spacing: -.01em; white-space: nowrap; min-width: 58px; text-align: right; }
.t-where { font: 600 12px/1.15 var(--cond); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.t-where .st::before { width: 7px; height: 7px; }
.ticket.deal .t-where { color: var(--ink); }
.t-deal { min-width: 0; display: grid; gap: 2px; }
.t-deal b { font: 700 13px/1.1 var(--cond); text-transform: uppercase; display: flex; align-items: flex-start; gap: 5px; min-width: 0; }
.t-deal b .mech { min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-deal b .tag { min-width: 0; padding: 1px 4px; font-size: 11px; flex: none; }
.t-when { font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-deal.nonprice { color: var(--ink-2); }
.facing.sel .pack { box-shadow: 0 0 0 2px var(--fixture), var(--lift-3); transform: translateY(-4px); }
.facing.sel .edge { background: linear-gradient(180deg, #13805b, var(--fixture) 60%); }

.star {
  position: absolute; top: 6px; right: 12px; z-index: 1;
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--ink-3);
}
.star:hover { color: var(--ink); background: var(--paper-2); }
.star[aria-pressed="true"] { color: var(--fixture); }

.bay-foot { padding: 32px 0 0; display: flex; justify-content: center; }
.more { height: 42px; padding: 0 20px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--pack); font-weight: 600; box-shadow: var(--lift-1); }
.note { max-width: 46ch; text-align: center; color: var(--ink-2); padding: 40px 0; }
.note b { display: block; font: 700 20px/1.2 var(--cond); text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }

/* Shelf elevation: the gondola in front of you. */
.elevation {
  position: relative; z-index: 3;
  background: var(--paper);
  box-shadow: -1px 0 0 var(--rule), -12px 0 28px -18px rgba(27, 33, 30, .45);
  min-height: 0; overflow: auto;
}
.el-empty { padding: 28px 24px; color: var(--ink-2); display: grid; gap: 10px; max-width: 44ch; }
.el-empty-title { font: 700 22px/1.1 var(--cond); text-transform: uppercase; color: var(--ink); }
.mech-legend { margin: 14px 0 0; display: grid; gap: 7px; }
.mech-legend div { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; }
.mech-legend dt, .mech-legend dd { margin: 0; font-size: 14px; }
.tag {
  display: inline-block; min-width: 36px; padding: 2px 5px; text-align: center; border-radius: 2px;
  font: 700 12px/1.2 var(--cond); background: var(--ink); color: var(--deal);
}

.el-head { padding: 20px 24px 18px; position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: start; }
.el-photo {
  width: 112px; height: 132px; display: grid; place-items: center;
  background: var(--pack); border-radius: var(--radius); box-shadow: var(--lift-2); padding: 8px;
}
.el-photo img { max-width: 100%; max-height: 116px; object-fit: contain; }
.el-photo .no-photo { width: 44px; height: 44px; color: var(--rule-2); }
.el-close { display: none; }
.el-name { font: 500 21px/1.22 var(--sans); text-wrap: balance; letter-spacing: -.01em; }
.el-meta { margin-top: 8px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 3px 14px; }
.el-meta code { font: 400 12px var(--mono); color: var(--ink-2); }
.el-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  border: 1px solid var(--rule-2); border-radius: 7px; background: var(--pack); font-weight: 600; font-size: 14px;
  box-shadow: var(--lift-1);
}
.btn[aria-pressed="true"] { background: var(--shelf); color: var(--paper); border-color: var(--shelf); }
.btn[aria-pressed="true"] .ico { color: var(--paper); }

.verdict {
  margin: 0 24px; padding: 16px 18px;
  background: var(--fixture-soft); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(13, 106, 75, .15);
}
.verdict p { font-size: 14px; color: var(--ink-2); }
.verdict strong { display: block; font: 700 30px/1 var(--cond); color: var(--ink); margin: 4px 0 6px; }
.verdict strong small { font: 600 15px var(--cond); color: var(--ink-2); margin-left: 6px; }

/* Gondola: one upright post, a shelf per store. */
.tiers {
  list-style: none; margin: 18px 24px 28px; padding: 0 0 0 12px; display: grid; gap: 0;
  position: relative;
}
/* The upright: the same graphite as the shelf fronts, lit on its left face. */
.tiers::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; border-radius: 2px 0 0 2px;
  background: var(--shelf); box-shadow: inset 3px 0 0 #3d4944;
}
.tier { position: relative; padding: 0 0 22px 0; }
.board-top { padding-left: 14px; }
.tier:last-child { padding-bottom: 6px; }
.board { display: flex; flex-direction: column; min-width: 0; }
.board-top {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center;
  padding: 8px 10px 10px; min-height: 64px;
}
.board-top .thumb {
  width: 52px; height: 56px; display: grid; place-items: center;
  background: var(--pack); border-radius: 4px; box-shadow: var(--lift-1); padding: 4px;
}
.board-top .thumb img { max-width: 100%; max-height: 48px; object-fit: contain; }
.board-top .thumb .no-photo { width: 26px; height: 26px; color: var(--rule-2); }
.board-top .who { min-width: 0; display: grid; gap: 2px; }
.board-top .storename { font: 700 17px/1.1 var(--cond); letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.board-top .storename .st::before { width: 10px; height: 10px; }
.board-top .best-mark {
  font: 700 11px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em;
  color: var(--paper); background: var(--fixture); padding: 3px 6px 2px; border-radius: 3px;
}
.board-top .variant { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-edge {
  position: relative;
  background: linear-gradient(180deg, #34403a, var(--shelf) 60%);
  padding: 7px 7px 8px; display: flex; gap: 6px; align-items: stretch;
  box-shadow: 0 -5px 0 var(--shelf-top), 0 12px 16px -10px rgba(27, 33, 30, .55);
  border-radius: 0 3px 3px 0;
}
.tier.cheapest .board-edge { background: linear-gradient(180deg, #13805b, var(--fixture) 60%); }
/* On a shelf the ticket has three fixed columns: price, deal, price per unit. */
.board-edge .ticket { display: grid; grid-template-columns: 70px minmax(0, 1fr) 78px; align-items: center; gap: 10px; min-height: 54px; }
.board-edge .t-price { flex-direction: column; align-items: flex-end; gap: 2px; }
.board-edge .label-price { font-size: 24px; }
.board-edge .t-deal b { font-size: 14px; }
.board-edge .t-when { font-size: 12px; white-space: normal; }
.t-each { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.t-each b { font: 700 19px/1 var(--cond); }
.t-each span { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.ticket.deal .t-each span { color: var(--ink); }
.go {
  align-self: stretch; display: grid; place-items: center; width: 34px; color: var(--paper); border-radius: 3px;
}
.go:hover { background: rgba(255, 255, 255, .14); }
.history { padding: 4px 24px 18px; }
.history h3 { margin: 0 0 8px; font: 700 15px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em; }
.hist-note { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; max-width: 52ch; }
.history table { width: 100%; border-collapse: collapse; }
.history th { width: 110px; padding: 8px 8px 8px 0; vertical-align: top; text-align: left; font: 700 15px/1.2 var(--cond); border-top: 1px solid var(--rule); }
.history td { padding: 8px 0; border-top: 1px solid var(--rule); }
.history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.history li { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.history li b { font: 700 16px/1 var(--cond); min-width: 44px; text-align: right; }
.history li span { color: var(--ink-2); }
.history li .hist-now { color: var(--ink); font-weight: 600; }
.history li .tag { font-size: 11px; padding: 1px 4px; color: var(--deal); }
.el-foot { padding: 0 24px 24px; font-size: 12.5px; color: var(--ink-2); display: grid; gap: 6px; }

/* The signature moment: stock slides onto each shelf, top to bottom. */
@media (prefers-reduced-motion: no-preference) {
  .tiers.unfold .tier { animation: shelve .45s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
  .tiers.unfold .tier .board-top { animation: stock .55s var(--ease) both; animation-delay: calc(var(--i) * 50ms + 70ms); }
  @keyframes shelve { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 -24px 0); } }
  @keyframes stock { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
}

.skeleton .pack { background: var(--paper-2); box-shadow: none; }
.skeleton .edge { background: #9aa39c; box-shadow: 0 -5px 0 var(--shelf-top); }

/* Narrower desks: the elevation becomes a sheet over the bay. */
@media (max-width: 1180px) {
  .floor { grid-template-columns: 232px minmax(0, 1fr); }
  .elevation {
    position: fixed; inset: 0 0 0 auto; width: min(470px, 100%); z-index: 20;
    transform: translateX(100%); visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s linear .35s;
  }
  body.sheet .elevation { transform: none; visibility: visible; transition: transform .35s var(--ease); box-shadow: -12px 0 40px rgba(27, 33, 30, .25); }
  .el-empty { display: none; }
  .el-close {
    display: grid; place-items: center; position: absolute; top: 12px; right: 12px;
    width: 40px; height: 40px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--pack); box-shadow: var(--lift-1);
  }
  .el-head { padding-right: 64px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .titleblock { grid-template-columns: 1fr; min-height: 0; }
  .tb-name { padding: 10px 16px 8px; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .tb-stores { display: none; }
  .tb-name h1 { font-size: 22px; }
  .tb-sub { margin-top: 0; }
  .floor { display: flex; flex-direction: column; overflow: auto; }
  .aisles { flex: none; overflow: visible; box-shadow: 0 1px 0 var(--rule); }
  .bay { flex: none; }
  .aisles-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 16px;
    border: 0; background: none; font-weight: 600; text-align: left;
  }
  .aisles-state { margin-left: auto; font-weight: 400; color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
  .aisles-body { display: none; }
  .aisles.open .aisles-body { display: block; }
  .aisle-list { max-height: 40vh; }
  .bay { overflow: visible; padding: 0 12px 32px; }
  .bay-head { position: sticky; top: 0; margin: 0 -12px; padding: 12px 12px 10px; }
  .myshelf span { display: none; }
  .sorts { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
  .sorts button { white-space: nowrap; }
  .facings { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  .pack { min-height: 236px; padding: 8px 9px 10px; margin: 0 5px; }
  .photo { height: 110px; }
  .photo img { max-height: 110px; }
  .label-price { font-size: 21px; min-width: 0; }
  .edge { height: 104px; }
  .t-price { flex-wrap: wrap; column-gap: 6px; row-gap: 0; }
  .elevation { width: 100%; }
  .el-head { grid-template-columns: 84px 1fr; gap: 14px; padding: 16px 64px 16px 16px; }
  .el-photo { width: 84px; height: 100px; }
  .el-photo img { max-height: 84px; }
  .verdict { margin: 0 16px; }
  .tiers { margin: 16px 16px 24px; }
  .board-edge .ticket { grid-template-columns: 62px minmax(0, 1fr) 66px; gap: 8px; padding: 6px 8px; }
  .history { padding: 4px 16px 18px; }
}

/* Reduced motion: no lift, no slide; states still change, instantly. */
@media (prefers-reduced-motion: reduce) {
  .pack, .elevation, body.sheet .elevation { transition: none; }
  .facing > button.open:hover .pack, .facing.sel .pack { transform: none; }
}
