/* p3_vend.css — the my-shop window #vend and someone's shop #vbuy (mockup p3_vend A, js/p3_vend.js). Sizes in --m = one
   pixel of the mockup (its window is 1312 x 847 px) so the parts keep the mockup's proportions; --m follows --u. The
   stall painting is positioned in --bh (its height) so the counter, the sign and the slots stay on the painted wood.
   ID selectors: this loads after css/shop.css and css/kskin.css and wins over both. */

#vend, #vbuy { --m: calc(1.14 * var(--u)); }
#vend > .card.p3v-win, #vbuy > .card.p3v-win {
  --bh: calc(780 * var(--m)); --bs: calc(var(--bh) * 1.05); --by: calc(var(--bh) * -0.05); /* (the painting a little bigger and lifted: the counter higher) */
  width: min(97vw, calc(1312 * var(--m))); max-height: 97vh; padding: 0; overflow-x: hidden; overflow-y: auto;
  border-width: calc(5 * var(--m)); border-radius: calc(26 * var(--m));
  box-shadow: inset 0 0 0 calc(4 * var(--m)) #416e87, 0 calc(10 * var(--m)) 0 rgba(0, 0, 0, 0.3);
}
#vend > .card.p3v-win > .vd-body, #vbuy > .card.p3v-win > .vd-body { margin: 0; padding: 0; display: block; }

/* ---------- the title bar: the name in the middle, the coins and the close at the right ---------- */
#vend .p3v-win .ptitle, #vbuy .p3v-win .ptitle {
  position: sticky; height: calc(67 * var(--m)); margin: 0; padding: 0 calc(12 * var(--m)) 0 calc(60 * var(--m)); gap: calc(22 * var(--m)); justify-content: flex-end;
  border-bottom-width: calc(4 * var(--m)); font-size: calc(42 * var(--m)); -webkit-text-stroke-width: calc(8 * var(--m));
}
#vend .p3v-win .ptitle::before, #vbuy .p3v-win .ptitle::before { left: calc(20 * var(--m)); width: calc(20 * var(--m)); height: calc(20 * var(--m)); margin-top: calc(-10 * var(--m)); border-width: calc(3 * var(--m)); }
#vend .p3v-win .ptitle .vd-t, #vbuy .p3v-win .ptitle .vd-t {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%); max-width: 46%; margin: 0; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
#vend .p3v-win .sh-coins, #vbuy .p3v-win .sh-coins {
  display: flex; align-items: center; gap: calc(12 * var(--m)); min-width: calc(190 * var(--m)); height: calc(48 * var(--m)); padding: 0 calc(22 * var(--m)) 0 calc(5 * var(--m));
  border-radius: calc(24 * var(--m)); border-width: calc(3.5 * var(--m));
}
#vend .p3v-win .sh-coins img, #vbuy .p3v-win .sh-coins img { width: calc(40 * var(--m)); height: calc(40 * var(--m)); }
#vend .p3v-win .sh-coins b, #vbuy .p3v-win .sh-coins b { font-size: calc(27 * var(--m)); margin-left: auto; }
#vend .p3v-win .vd-x, #vbuy .p3v-win .vd-x { width: calc(48 * var(--m)); height: calc(48 * var(--m)); border-width: calc(4 * var(--m)); font-size: calc(24 * var(--m)); -webkit-text-stroke-width: calc(3.5 * var(--m)); }

/* ---------- two halves: the bag on the left, the stall on the right ---------- */
#vend .p3v, #vbuy .p3v { display: grid; grid-template-columns: calc(592 * var(--m)) minmax(0, 1fr); height: var(--bh); font: 400 calc(18 * var(--m)) / 1.35 'Mitr', sans-serif; color: var(--ink); }
#vend .p3v-left, #vbuy .p3v-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: calc(13 * var(--m)) calc(16 * var(--m)) calc(20 * var(--m)) calc(28 * var(--m)); box-sizing: border-box; }
#vend .p3v-name { display: flex; align-items: center; gap: calc(12 * var(--m)); }
#vend .p3v-name label { flex: none; font: 700 calc(24 * var(--m)) / 1 'Mitr', sans-serif; color: var(--ink); }
#vend .p3v-name input {
  flex: 1; min-width: 0; height: calc(48 * var(--m)); padding: 0 calc(14 * var(--m)); box-sizing: border-box; border-radius: calc(14 * var(--m));
  border: calc(3 * var(--m)) solid #37637b; background: #10283b; color: var(--ink); font: 400 calc(23 * var(--m)) / 1 'Mitr', sans-serif; outline: none;
}
#vend .p3v-name input:focus { box-shadow: 0 0 0 calc(3 * var(--m)) #416e87; }
#vend .p3v-h, #vbuy .p3v-h { display: flex; align-items: baseline; gap: calc(12 * var(--m)); margin: calc(16 * var(--m)) 0 calc(8 * var(--m)); font: 700 calc(31 * var(--m)) / 1.15 'Mitr', sans-serif; color: var(--ink); white-space: nowrap; }
#vend .p3v-h small, #vbuy .p3v-h small { font-size: calc(17 * var(--m)); font-weight: 400; color: #a7c5d9; overflow: hidden; text-overflow: ellipsis; }

/* the folder tabs */
#vend .p3v-tabs { display: flex; gap: calc(6 * var(--m)); padding: 0 calc(4 * var(--m)); border-bottom: calc(4 * var(--m)) solid #37637b; }
#vend .p3v-tabs button {
  flex: 1 1 auto; height: calc(48 * var(--m)); margin-bottom: calc(-4 * var(--m)); padding: 0 calc(12 * var(--m)); cursor: pointer; white-space: nowrap;
  border: calc(3.5 * var(--m)) solid #37637b; border-bottom-width: calc(4 * var(--m)); border-radius: calc(14 * var(--m)) calc(14 * var(--m)) 0 0;
  background: linear-gradient(#10283b, #17364b); color: var(--ink); font: 700 calc(21 * var(--m)) / 1 'Mitr', sans-serif;
}
#vend .p3v-tabs button.on { background: linear-gradient(#185776, #185776); color: #e8f7ff; -webkit-text-stroke: calc(4 * var(--m)) #061421; paint-order: stroke fill; border-bottom-color: #3c7d98; }

/* the bag's grid */
#vend .p3v-grid {
  flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, calc(122 * var(--m)))); grid-auto-rows: calc(114 * var(--m)); align-content: start; justify-content: space-evenly; overflow-x: hidden;
  gap: calc(15 * var(--m)) calc(10 * var(--m)); margin-top: calc(6 * var(--m)); padding: calc(16 * var(--m)) calc(8 * var(--m)); overflow-y: auto; box-sizing: border-box;
  background: #17364b; border: calc(3 * var(--m)) solid #416e87; border-radius: calc(18 * var(--m)); scrollbar-width: thin; scrollbar-color: #74b6ec transparent;
}
#vend .p3v-cell {
  position: relative; display: grid; place-items: center; padding: 0; cursor: pointer; box-sizing: border-box; border-radius: calc(14 * var(--m));
  border: calc(3.5 * var(--m)) solid #37637b; background: linear-gradient(#10283b, #17364b); box-shadow: inset 0 calc(-4 * var(--m)) 0 rgba(42, 36, 53, 0.1);
}
#vend .p3v-cell.t-blue { background: linear-gradient(#10283b, #17364b); }
#vend .p3v-cell.t-lav { background: linear-gradient(#10283b, #17364b); }
#vend .p3v-cell.t-gold { background: linear-gradient(#10283b, #23516b); }
#vend .p3v-cell.t-pink { background: linear-gradient(#10283b, #17364b); }
#vend .p3v-cell.t-mint { background: linear-gradient(#10283b, #17364b); }
#vend .p3v-cell img { width: calc(80 * var(--m)); height: calc(80 * var(--m)); object-fit: contain; filter: drop-shadow(0 calc(2 * var(--m)) 0 rgba(42, 36, 53, 0.25)); }
#vend .p3v-cell > b {
  position: absolute; right: calc(6 * var(--m)); bottom: calc(6 * var(--m)); min-width: calc(34 * var(--m)); padding: 0 calc(8 * var(--m)); box-sizing: border-box;
  border-radius: calc(13 * var(--m)); background: #081b2b; color: #e8f7ff; text-align: center; font: 700 calc(18 * var(--m)) / calc(26 * var(--m)) 'Baloo 2', 'Mitr', sans-serif;
}
#vend .p3v-cell.sel { box-shadow: 0 0 0 calc(3 * var(--m)) #416e87, 0 0 0 calc(6.5 * var(--m)) #3c7d98; }
#vend .p3v-cell .p3v-in {
  position: absolute; left: calc(5 * var(--m)); top: calc(5 * var(--m)); width: calc(28 * var(--m)); height: calc(28 * var(--m)); box-sizing: border-box; border-radius: 50%;
  background: linear-gradient(#185776, #185776); border: calc(2.5 * var(--m)) solid #416e87; box-shadow: 0 0 0 calc(2 * var(--m)) #37637b;
}
#vend .p3v-cell .p3v-in::after { content: ''; position: absolute; left: 30%; top: 14%; width: 26%; height: 46%; border: solid #416e87; border-width: 0 calc(3.5 * var(--m)) calc(3.5 * var(--m)) 0; transform: rotate(40deg); }
#vend .p3v-cell:hover { filter: brightness(1.05); }
/* account-bound items (vend.js isBound: founder packs): shown locked, a click only says why */
#vend .p3v-cell.bd { cursor: not-allowed; background: linear-gradient(#10283b, #17364b); }
#vend .p3v-cell.bd img { filter: grayscale(0.7) opacity(0.6); }
#vend .p3v-cell.bd:hover { filter: none; }
#vend .p3v-note.warn { color: #d57c73; font-weight: 600; }
#vend .p3v-cell .p3v-bd {
  position: absolute; left: 50%; bottom: calc(5 * var(--m)); transform: translateX(-50%); padding: 0 calc(8 * var(--m)); border-radius: calc(10 * var(--m)); white-space: nowrap;
  background: #16445c; color: #e8f7ff; border: calc(2 * var(--m)) solid #37637b; font: 600 calc(14 * var(--m)) / calc(22 * var(--m)) 'Mitr', sans-serif; font-style: normal;
}
#vend .p3v-empty, #vbuy .p3v-empty { grid-column: 1 / -1; padding: calc(30 * var(--m)) calc(10 * var(--m)); text-align: center; color: #a7c5d9; font: 500 calc(20 * var(--m)) / 1.5 'Mitr', sans-serif; }
#vbuy .p3v-empty.big { flex: 1; display: grid; place-items: center; font-size: calc(26 * var(--m)); }

/* ---------- the stall ---------- */
#vend .p3v-stall, #vbuy .p3v-stall { position: relative; min-width: 0; height: var(--bh); overflow: hidden; border-left: calc(4 * var(--m)) solid #37637b; background: #081b2b; }
#vend .p3v-back, #vbuy .p3v-back, #vend .p3v-front, #vbuy .p3v-front {
  position: absolute; left: 0; right: 0; background: url('../assets/p3/vend/stall.jpg') no-repeat 50% var(--by) / auto var(--bs);
}
#vend .p3v-back, #vbuy .p3v-back { top: 0; bottom: 0; }
/* the counter's top edge is at 47.6% of the painting */
#vend .p3v-front, #vbuy .p3v-front { top: calc(var(--bs) * 0.476 + var(--by)); bottom: 0; background-position: 50% calc(var(--bs) * -0.476); }
#vend .p3v-hero, #vbuy .p3v-hero { position: absolute; left: 50%; top: calc(var(--bh) * 0.17); width: calc(var(--bh) * 0.6); height: calc(var(--bh) * 0.55); transform: translateX(-50%); }
#vend .p3v-sign, #vbuy .p3v-sign {
  position: absolute; left: 50%; top: calc(var(--bs) * 0.128 + var(--by)); width: calc(var(--bs) * 0.36); height: calc(var(--bs) * 0.078); transform: translateX(-50%);
  display: grid; place-items: center; color: var(--ink); font: 600 calc(26 * var(--m)) / 1 'Mitr', sans-serif; text-align: center;
}
#vend .p3v-sign span, #vbuy .p3v-sign span { max-width: 100%; padding: 0 calc(10 * var(--m)); box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 calc(1.5 * var(--m)) 0 rgba(255, 240, 210, 0.6); }
#vend .p3v-sign b, #vbuy .p3v-sign b { font-family: 'Baloo 2', 'Mitr', sans-serif; font-weight: 800; }
#vend .p3v-lower, #vbuy .p3v-lower {
  position: absolute; left: calc(22 * var(--m)); right: calc(22 * var(--m)); top: calc(var(--bs) * 0.54 + var(--by)); bottom: calc(8 * var(--m));
  display: flex; flex-direction: column; align-items: center; gap: calc(9 * var(--m));
}
#vend .p3v-slots, #vbuy .p3v-slots { align-self: stretch; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: calc(112 * var(--m)); gap: calc(9 * var(--m)) calc(10 * var(--m)); }

/* a sale slot on the counter: cream card, a paper price tag, a little x to take it back */
#vend .p3v-slot, #vbuy .p3v-slot {
  position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: calc(4 * var(--m)) calc(4 * var(--m)) calc(5 * var(--m)); box-sizing: border-box;
  border-radius: calc(12 * var(--m)); border: calc(3 * var(--m)) solid #183c54; background: linear-gradient(#10283b, #17364b);
  box-shadow: inset 0 0 0 calc(2 * var(--m)) rgba(255, 255, 255, 0.55), 0 calc(3 * var(--m)) 0 rgba(30, 18, 10, 0.35);
}
#vend .p3v-slot.empty, #vbuy .p3v-slot.empty { background: rgba(251, 243, 223, 0.86); box-shadow: inset 0 0 0 calc(5 * var(--m)) rgba(251, 243, 223, 0.86), inset 0 0 0 calc(7 * var(--m)) rgba(150, 120, 80, 0.55); }
#vend .p3v-slot.empty::after, #vbuy .p3v-slot.empty::after { content: ''; position: absolute; inset: calc(8 * var(--m)); border: calc(2 * var(--m)) dashed rgba(140, 110, 70, 0.6); border-radius: calc(8 * var(--m)); }
#vend .p3v-slot.full, #vbuy .p3v-slot.full { cursor: pointer; }
#vend .p3v-slot.ro { cursor: default; }
#vend .p3v-slot.sel, #vbuy .p3v-slot.sel { border-color: #37637b; box-shadow: 0 0 0 calc(3 * var(--m)) #416e87, 0 0 0 calc(6.5 * var(--m)) #3c7d98, 0 calc(3 * var(--m)) 0 rgba(30, 18, 10, 0.35); }
#vend .p3v-slot > img, #vbuy .p3v-slot > img { flex: none; width: calc(58 * var(--m)); height: calc(58 * var(--m)); object-fit: contain; filter: drop-shadow(0 calc(2 * var(--m)) 0 rgba(42, 36, 53, 0.25)); }
#vend .p3v-slot > b, #vbuy .p3v-slot > b { max-width: 100%; font: 700 calc(16 * var(--m)) / 1.2 'Mitr', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vend .p3v-line, #vbuy .p3v-line { display: flex; align-items: center; justify-content: center; gap: calc(4 * var(--m)); max-width: 100%; margin-top: auto; }
#vend .p3v-line em, #vbuy .p3v-line em { flex: none; font: 600 calc(14 * var(--m)) / 1 'Mitr', sans-serif; font-style: normal; color: #e8f7ff; }
#vend .p3v-tag, #vbuy .p3v-tag {
  display: inline-flex; align-items: center; gap: calc(2 * var(--m)); min-width: 0; padding: calc(1 * var(--m)) calc(6 * var(--m)) calc(1 * var(--m)) calc(3 * var(--m));
  background: #10283b; border: calc(1.5 * var(--m)) solid #3c7d98; border-radius: calc(3 * var(--m)) calc(8 * var(--m)) calc(8 * var(--m)) calc(3 * var(--m));
  transform: rotate(-3deg); box-shadow: 0 calc(1.5 * var(--m)) 0 rgba(60, 40, 20, 0.3);
  font: 800 calc(15 * var(--m)) / 1.2 'Baloo 2', 'Mitr', sans-serif; color: var(--ink); white-space: nowrap; overflow: hidden;
}
#vend .p3v-tag img, #vbuy .p3v-tag img { flex: none; width: calc(17 * var(--m)); height: calc(17 * var(--m)); }
#vend .p3v-x {
  position: absolute; right: calc(-8 * var(--m)); top: calc(-8 * var(--m)); z-index: 1; width: calc(28 * var(--m)); height: calc(28 * var(--m)); padding: 0; cursor: pointer;
  border-radius: 50%; border: calc(2.5 * var(--m)) solid #416e87; box-shadow: 0 0 0 calc(2 * var(--m)) #37637b; background: linear-gradient(#17364b, #d6424f);
  color: #e8f7ff; font: 800 calc(14 * var(--m)) / 1 'Baloo 2', sans-serif;
}
#vend .p3v-slot.full:hover, #vbuy .p3v-slot.full:hover { filter: brightness(1.05); }

/* the note and the big button under the counter */
#vend .p3v-note, #vbuy .p3v-note {
  align-self: stretch; display: grid; place-items: center; min-height: calc(54 * var(--m)); padding: calc(4 * var(--m)) calc(16 * var(--m)); box-sizing: border-box; text-align: center;
  border-radius: calc(12 * var(--m)); background: rgba(251, 245, 230, 0.95); border: calc(2.5 * var(--m)) solid #3c7d98; color: #e8f7ff; font: 500 calc(17 * var(--m)) / 1.25 'Mitr', sans-serif;
}
#vbuy .p3v-note.ok { color: #b0d2b2; font-weight: 600; }
#vbuy .p3v-note.warn { color: #df888e; font-weight: 600; }
#vend .p3v-go, #vbuy .p3v-go {
  position: relative; flex: none; min-width: calc(392 * var(--m)); max-width: 100%; height: calc(60 * var(--m)); padding: 0 calc(24 * var(--m)); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: calc(20 * var(--m)); border: calc(4.5 * var(--m)) solid #37637b; background: linear-gradient(#17364b 0%, #ffcf3f 50%, #f0a522 100%); color: var(--ink);
  font: 700 calc(32 * var(--m)) / 1 'Mitr', sans-serif; box-shadow: inset 0 calc(4 * var(--m)) 0 rgba(255, 255, 255, 0.55), inset 0 calc(-5 * var(--m)) 0 rgba(150, 80, 0, 0.25), 0 calc(5 * var(--m)) 0 rgba(0, 0, 0, 0.35);
}
#vend .p3v-go small, #vbuy .p3v-go small { font-size: calc(19 * var(--m)); font-weight: 500; }
#vend .p3v-go.grey, #vbuy .p3v-go.grey { background: linear-gradient(#10283b, #17364b); }
#vend .p3v-go:disabled, #vbuy .p3v-go:disabled { cursor: default; filter: grayscale(0.7) brightness(0.92); }
#vend .p3v-go:not(:disabled):hover, #vbuy .p3v-go:not(:disabled):hover { filter: brightness(1.06); }

/* the card of a picked slot: how many, the price, take it back */
#vend .p3v-pop {
  position: absolute; z-index: 3; left: calc(var(--px) * var(--m)); bottom: calc(var(--bh) - var(--bs) * 0.54 - var(--by) + 6 * var(--m)); width: calc(340 * var(--m)); box-sizing: border-box;
  padding: calc(10 * var(--m)) calc(14 * var(--m)) calc(12 * var(--m)); border-radius: calc(16 * var(--m)); border: calc(3.5 * var(--m)) solid #37637b; background: #10283b;
  box-shadow: 0 calc(6 * var(--m)) 0 rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; gap: calc(8 * var(--m));
}
#vend .p3v-pop-h { display: flex; align-items: center; gap: calc(10 * var(--m)); }
#vend .p3v-pop-h img { flex: none; width: calc(48 * var(--m)); height: calc(48 * var(--m)); object-fit: contain; }
#vend .p3v-pop-h div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#vend .p3v-pop-h b { font: 700 calc(20 * var(--m)) / 1.2 'Mitr', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vend .p3v-pop-h small { font: 400 calc(15 * var(--m)) / 1.3 'Mitr', sans-serif; color: #a7c5d9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#vend .p3v-pop-x { flex: none; align-self: flex-start; width: calc(32 * var(--m)); height: calc(32 * var(--m)); padding: 0; cursor: pointer; border-radius: 50%; border: calc(3 * var(--m)) solid #37637b; background: linear-gradient(#17364b, #e0525e); color: #e8f7ff; font: 800 calc(15 * var(--m)) / 1 'Baloo 2', sans-serif; }
#vend .p3v-pop-r { display: flex; align-items: center; justify-content: space-between; gap: calc(10 * var(--m)); font: 600 calc(19 * var(--m)) / 1.2 'Mitr', sans-serif; }
#vend .p3v-pop-r em { font-style: normal; font-weight: 500; color: #a7c5d9; font-size: calc(16 * var(--m)); }
#vend .p3v-step, #vbuy .p3v-step { display: inline-flex; align-items: center; gap: calc(5 * var(--m)); }
#vend .p3v-step button, #vbuy .p3v-step button {
  width: calc(36 * var(--m)); height: calc(36 * var(--m)); padding: 0; cursor: pointer; border-radius: calc(10 * var(--m)); border: calc(3 * var(--m)) solid #37637b;
  background: linear-gradient(#185776, #185776); color: #e8f7ff; font: 800 calc(22 * var(--m)) / 1 'Baloo 2', sans-serif; -webkit-text-stroke: calc(3 * var(--m)) #061421; paint-order: stroke fill;
}
#vend .p3v-step input, #vend .p3v-price input {
  width: calc(76 * var(--m)); height: calc(38 * var(--m)); padding: 0 calc(8 * var(--m)); box-sizing: border-box; text-align: center; border-radius: calc(10 * var(--m));
  border: calc(3 * var(--m)) solid #37637b; background: #10283b; color: var(--ink); font: 700 calc(20 * var(--m)) / 1 'Baloo 2', 'Mitr', sans-serif; outline: none;
}
#vend .p3v-step input:focus, #vend .p3v-price input:focus { box-shadow: 0 0 0 calc(3 * var(--m)) #416e87; }
#vend .p3v-price { display: inline-flex; align-items: center; gap: calc(6 * var(--m)); }
#vend .p3v-price img { width: calc(28 * var(--m)); height: calc(28 * var(--m)); }
#vend .p3v-price input { width: calc(130 * var(--m)); text-align: right; }
#vend .p3v-pop-f { display: flex; gap: calc(10 * var(--m)); justify-content: space-between; margin-top: calc(2 * var(--m)); }
#vend .p3v-pop-f button {
  height: calc(40 * var(--m)); padding: 0 calc(16 * var(--m)); cursor: pointer; border-radius: calc(12 * var(--m)); border: calc(3 * var(--m)) solid #37637b;
  font: 700 calc(18 * var(--m)) / 1 'Mitr', sans-serif;
}
#vend .p3v-pop-del { background: linear-gradient(#10283b, #17364b); color: var(--ink); }
#vend .p3v-pop-ok { min-width: calc(110 * var(--m)); background: linear-gradient(#8fd3fb, #3b8fdc); color: #e8f7ff; -webkit-text-stroke: calc(4 * var(--m)) #061421; paint-order: stroke fill; }

/* ---------- lists (my open shop, someone's shop) ---------- */
#vend .p3v-openbox, #vbuy .p3v-seller {
  display: flex; flex-direction: column; gap: calc(6 * var(--m)); padding: calc(12 * var(--m)) calc(16 * var(--m)); border-radius: calc(16 * var(--m));
  background: #10283b; border: calc(3 * var(--m)) solid #37637b; font: 500 calc(20 * var(--m)) / 1.35 'Mitr', sans-serif; color: #a7c5d9;
}
#vend .p3v-openbox b, #vbuy .p3v-seller b { color: var(--ink) !important; }
#vend .p3v-openbox em { font-style: normal; font-weight: 700; color: #ead29e; }
#vend .p3v-live { align-self: flex-start; padding: 0 calc(14 * var(--m)); border-radius: calc(12 * var(--m)); background: linear-gradient(#17364b, #185776); border: calc(2.5 * var(--m)) solid #37637b; color: #e8f7ff; -webkit-text-stroke: calc(3.5 * var(--m)) #061421; paint-order: stroke fill; font: 700 calc(19 * var(--m)) / 1.5 'Mitr', sans-serif; }
#vend .p3v-rows, #vbuy .p3v-rows {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: calc(10 * var(--m)); padding: calc(12 * var(--m)); box-sizing: border-box;
  background: #17364b; border: calc(3 * var(--m)) solid #416e87; border-radius: calc(18 * var(--m)); scrollbar-width: thin; scrollbar-color: #74b6ec transparent;
}
#vend .p3v-row, #vbuy .p3v-row {
  flex: none; display: grid; grid-template-columns: calc(62 * var(--m)) minmax(0, 1fr) auto auto; align-items: center; column-gap: calc(12 * var(--m)); row-gap: calc(6 * var(--m));
  padding: calc(8 * var(--m)) calc(12 * var(--m)); border-radius: calc(14 * var(--m)); background: #10283b; border: calc(3 * var(--m)) solid #37637b;
}
#vbuy .p3v-row { grid-template-columns: calc(62 * var(--m)) minmax(0, 1fr) auto; cursor: pointer; }
#vbuy .p3v-row.sel { box-shadow: 0 0 0 calc(3 * var(--m)) #416e87, 0 0 0 calc(6.5 * var(--m)) #3c7d98; background: #10283b; }
#vend .p3v-row > img, #vbuy .p3v-row > img { width: calc(58 * var(--m)); height: calc(58 * var(--m)); object-fit: contain; }
#vbuy .p3v-row > img { grid-row: span 2; }
#vend .p3v-rn, #vbuy .p3v-rn { display: flex; flex-direction: column; min-width: 0; }
#vend .p3v-rn b, #vbuy .p3v-rn b { font: 700 calc(20 * var(--m)) / 1.25 'Mitr', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vend .p3v-rn small, #vbuy .p3v-rn small { font: 400 calc(15 * var(--m)) / 1.3 'Mitr', sans-serif; color: #a7c5d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vend .p3v-row .p3v-tag, #vbuy .p3v-row .p3v-tag { font-size: calc(19 * var(--m)); padding: calc(2 * var(--m)) calc(10 * var(--m)) calc(2 * var(--m)) calc(5 * var(--m)); }
#vend .p3v-row .p3v-tag img, #vbuy .p3v-row .p3v-tag img { width: calc(22 * var(--m)); height: calc(22 * var(--m)); }
#vend .p3v-left-n, #vbuy .p3v-left-n { font: 500 calc(17 * var(--m)) / 1 'Mitr', sans-serif; color: #a7c5d9; white-space: nowrap; }
#vbuy .p3v-rb { grid-column: 2 / -1; display: flex; align-items: center; gap: calc(12 * var(--m)); }
#vbuy .p3v-step span { min-width: calc(34 * var(--m)); text-align: center; font: 700 calc(20 * var(--m)) / 1 'Baloo 2', sans-serif; }
#vbuy .p3v-step.one { font: 500 calc(16 * var(--m)) / 1 'Mitr', sans-serif; color: #a7c5d9; }
#vbuy .p3v-buy {
  margin-left: auto; height: calc(40 * var(--m)); padding: 0 calc(16 * var(--m)); cursor: pointer; white-space: nowrap; border-radius: calc(12 * var(--m)); border: calc(3 * var(--m)) solid #37637b;
  background: linear-gradient(#17364b, #f5bb3a); color: var(--ink); font: 700 calc(18 * var(--m)) / 1 'Mitr', sans-serif;
}
#vbuy .p3v-buy:disabled { cursor: default; background: linear-gradient(#10283b, #17364b); color: #a7c5d9; }
/* the picked row's details (js/p3_vend.js more(), js/vend.js NC.Vend.detail): what it is before buying it */
#vbuy .p3v-more { grid-column: 1 / -1; cursor: default; }
#vbuy .vd-detail {
  display: flex; flex-direction: column; gap: calc(4 * var(--m)); padding: calc(10 * var(--m)) calc(12 * var(--m));
  background: #10283b; border: calc(2.5 * var(--m)) solid #416e87; border-radius: calc(12 * var(--m)); font: 400 calc(15.5 * var(--m)) / 1.35 'Mitr', sans-serif; color: #a7c5d9;
}
#vbuy .vd-dl { display: grid; grid-template-columns: calc(132 * var(--m)) minmax(0, 1fr); column-gap: calc(10 * var(--m)); align-items: baseline; }
#vbuy .vd-dl > span { color: #a7c5d9; }
#vbuy .vd-dl > b { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
#vbuy .vd-dl .bad { color: #e5938d; }
#vbuy .vd-dd { color: #a7c5d9; font-style: italic; }
#vbuy .vd-drows { font-size: calc(15 * var(--m)); }

/* ---------- a phone held upright: the bag on top, the stall under it (taller, so the slots stay big) ---------- */
html.mob-port #vend, html.mob-port #vbuy { --m: calc(0.9 * var(--u)); }
html.mob-port #vend > .card.p3v-win, html.mob-port #vbuy > .card.p3v-win { --bh: calc(1080 * var(--m)); width: 100vw; max-width: 100vw; max-height: none; border-radius: 0; }
html.mob-port #vend .p3v-win .ptitle, html.mob-port #vbuy .p3v-win .ptitle { height: calc(62 * var(--m) + env(safe-area-inset-top)); font-size: calc(32 * var(--m)); justify-content: flex-end; }
html.mob-port #vend .p3v-win .ptitle .vd-t, html.mob-port #vbuy .p3v-win .ptitle .vd-t { position: static; transform: none; margin-right: auto; max-width: none; text-align: left; }
html.mob-port #vend .p3v-win .sh-coins, html.mob-port #vbuy .p3v-win .sh-coins { min-width: 0; }
html.mob-port #vend .p3v, html.mob-port #vbuy .p3v { grid-template-columns: minmax(0, 1fr); height: auto; }
html.mob-port #vend .p3v-left, html.mob-port #vbuy .p3v-left { padding: calc(12 * var(--m)) calc(14 * var(--m)); }
html.mob-port #vend .p3v-grid { flex: none; max-height: calc(520 * var(--m)); grid-template-columns: repeat(4, minmax(0, 1fr)); }
html.mob-port #vend .p3v-rows, html.mob-port #vbuy .p3v-rows { flex: none; max-height: calc(560 * var(--m)); }
html.mob-port #vend .p3v-tabs { overflow-x: auto; scrollbar-width: none; }
html.mob-port #vend .p3v-tabs button { flex: none; }
html.mob-port #vend .p3v-stall, html.mob-port #vbuy .p3v-stall { border-left: 0; border-top: calc(4 * var(--m)) solid #37637b; }
html.mob-port #vend .p3v-lower, html.mob-port #vbuy .p3v-lower { left: calc(16 * var(--m)); right: calc(16 * var(--m)); }
html.mob-port #vend .p3v-slots, html.mob-port #vbuy .p3v-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: calc(118 * var(--m)); }
html.mob-port #vend .p3v-slot > b, html.mob-port #vbuy .p3v-slot > b { font-size: calc(18 * var(--m)); }
html.mob-port #vend .p3v-tag, html.mob-port #vbuy .p3v-tag, html.mob-port #vend .p3v-line em, html.mob-port #vbuy .p3v-line em { font-size: calc(17 * var(--m)); }
html.mob-port #vend .p3v-note, html.mob-port #vbuy .p3v-note { font-size: calc(18 * var(--m)); }
html.mob-port #vend .p3v-go, html.mob-port #vbuy .p3v-go { min-width: 0; width: 100%; }
html.mob-port #vend .p3v-pop { left: 50%; transform: translateX(-50%); width: calc(420 * var(--m)); }
html.mob-port #vend .p3v-hero, html.mob-port #vbuy .p3v-hero { top: calc(var(--bh) * 0.17); height: calc(var(--bh) * 0.45); }
html.mob-port #vend .p3v-slot > img, html.mob-port #vbuy .p3v-slot > img { width: calc(50 * var(--m)); height: calc(50 * var(--m)); }
html.mob-port #vbuy .p3v-row { grid-template-columns: calc(54 * var(--m)) minmax(0, 1fr) auto; }
