/* replica-bills.css: buy bills, direction B "แผงเครื่อง" (board drinkin-winkin-buy-bills-2026-10-23) */
.num { font-variant-numeric: tabular-nums }
button.cam-left, button.t2-left, button.lv-left { cursor: pointer }
.bB { margin-top: 0 }
.bB-ctr { position: relative; display: grid; gap: 8px; padding: 12px 40px 12px 12px; border-radius: 8px; background: #070B16; box-shadow: inset 0 2px 6px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.06) }
.bB-row { display: grid; grid-template-columns: 1fr auto 34px; align-items: center; gap: 10px }
.bB-row small { font-size: 14px; font-weight: 600; color: #DCE1EE }
.bB-row small:last-child { color: #8F97AE }
.flap { display: inline-flex; gap: 3px }
.flap-d { width: 26px; height: 36px; overflow: hidden; border-radius: 4px; background: linear-gradient(#1E2740 50%, #161D31 50%); box-shadow: inset 0 0 0 1px #2E3854;
  font: 400 26px/36px var(--chon); color: var(--gold); text-align: center }
/* the column 0-9 is one digit per row; --d moves it to the digit shown */
.flap-d i { display: block; font-style: normal; transform: translateY(calc(var(--d) * -36px)); transition: transform 1.1s cubic-bezier(.3,.8,.25,1) }
.flap-d b { display: block; height: 36px; font-weight: 400 }
.bB-lamp { position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 12px; height: 12px; border-radius: 50% }
.bB-lamp.green { background: #5BD36A; box-shadow: 0 0 9px 2px rgba(91,211,106,.6) }
.bB-lamp.amber { background: var(--gold); box-shadow: 0 0 9px 2px rgba(242,179,61,.6) }
.bB-lamp.red { background: #FF4A36; box-shadow: 0 0 9px 2px rgba(255,74,54,.65) }
.bB-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 16px }
.bB-key { gap: 5px }
.bB-key .cap { width: 86px; height: 70px; display: grid; place-content: center; justify-items: center; gap: 0 }
.bB-key .cap b { font: 400 28px/1.05 var(--chon); color: var(--parch) }
.bB-key .cap small { font-size: 12.5px; font-weight: 600; color: #B9BED0 }
.bB-key.hm-lit .cap b { color: var(--gold) }
.bB-key .lb { display: grid; gap: 1px }
.bB-key .lb b { font-size: 17px; color: var(--parch) }
.bB-key .lb span { font-size: 12px; color: #9AA3B8 }
.bB-plate { height: 20px; padding: 0 8px; border-radius: 4px; font-size: 12.5px; font-weight: 700; line-height: 20px; color: var(--navy); background: var(--gold) }
.bB-plate:empty { background: none }
.bB-note { padding-top: 10px; font-size: 12px; color: var(--gold); text-align: center }
.bB-mini { position: relative; flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #070B16; box-shadow: inset 0 0 0 1.5px var(--navy) }
.bB-mini .bB-lamp { position: static; translate: none; width: 9px; height: 9px }
/* P'Ek 2026-10-23: "เหลือ" sits on the key above the panel (not inside it), centred; the lamp sits on the digits'
   centre line; even padding; smaller digits keep the key's height */
.bB-left { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px }
#phone .bB-left small { margin: 0; font: 700 11px/12px var(--plex); color: var(--navy) }   /* #phone beats the key's own .snap small (margin, 1.51 line) */
.bB-mini { padding: 5px }
/* days to the next free Bill, แบบ ค "แผ่นพลิกวัน" (board drinkin-winkin-free-countdown-2026-10-23): "+1 [n] วัน" on a
   one-digit split-flap plate, "ครบ 4" in green at 4 free */
.bB-fc { display: flex; align-items: center; gap: 3px; height: 18px }
.bB-fc .flap-d { width: 12px; height: 15px; font-size: 12.5px; line-height: 15px; border-radius: 2px }
.bB-fc .flap-d i { transform: translateY(calc(var(--d) * -15px - 2px)) }   /* Chon sits low in a 15px cell (measured) */
.bB-fc .flap-d b { height: 15px; font: 400 12.5px/15px var(--chon) }
/* on the add-bill key: a dark plate of the panel's own material under it */
.bB-left .bB-fc { padding: 0 6px; border-radius: 5px; background: #070B16; box-shadow: inset 0 0 0 1.5px var(--navy) }
#phone .bB-left .bB-fc small { font: 700 10px/12px var(--plex); color: #DCE1EE; white-space: nowrap }
#phone .bB-left .bB-fc small.ok { color: #5BD36A }
/* in the buy sheet: under the counter's free label, its 7 day lamps lit for the days gone since last Friday */
.bB-fcL { display: grid; justify-items: start; gap: 3px }
.bB-fcL .bB-fc small { font: 600 11.5px/14px var(--plex); color: #B9BED0 }
.bB-row .bB-fc small.ok { font: 400 13px/16px var(--chon); color: #5BD36A }
/* P'Ek 2026-10-24: the bill icon and "+1" in gold on the dark panel (no plate behind them), before "อีก [n] วัน" */
.bB-tk { flex: none; display: inline-flex; align-items: center; gap: 1px; height: 14px; color: var(--gold) }
.bB-tk .ic { stroke-width: 2 }
#phone .bB-tk b { font: 700 10px/1 var(--plex); color: var(--gold) }
.bB-fc .leds { display: flex; gap: 4px; margin-left: 6px }
.bB-fc .leds i { width: 7px; height: 7px; border-radius: 50%; background: #1E2740 }
.bB-fc .leds i.on { background: var(--gold); box-shadow: 0 0 6px 1px rgba(242,179,61,.55) }
/* in Settings: a small rack, free Bills and the days to the next */
.bB-fcT { margin-top: 16px }
/* P'Ek 2026-10-24 (แบบ ก): free Bills "3 / 4" on flaps of one size, all gold; the count takes the row's last two columns */
.bB-cnt { grid-column: 2 / 4; justify-self: end; display: flex; align-items: center; gap: 3px }
.bB-sl { font: 400 24px/36px var(--chon); color: var(--gold); padding: 0 3px }
.bB-mini .flap-d { width: 18px; height: 24px; font-size: 17px; line-height: 24px }
.bB-mini .flap-d i { transform: translateY(calc(var(--d) * -24px - 3px)) }   /* Chon's digits sit 3px low in the cell (measured) */
.bB-mini .flap-d b { height: 24px }
.bB-sheet .hm-rk { margin-top: 4px }
.sheet.medium.bB-sheet { top: 32% }   /* P'Ek 2026-10-26: tall enough that the packs and the split line show without scrolling */
.bB-sheet .sh-paper { box-shadow: none }   /* the rack is the frame; the sheet's own rule would double it */
/* the read that waits: its photos stay on top, the rack under them */
.bB-held { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px }
.bB-photo { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 4px }
.bB-photo .parts { position: relative }
.bB-wait { font: 400 20px/1.3 var(--chon); color: var(--parch) }
.bw-note { font-size: 14px; font-weight: 600; color: #DCE1EE; text-align: center; text-wrap: balance }
.t2-left.bB-zero { color: #FF8A7A; border-color: #FF8A7A }

/* P'Ek 2026-10-26 picked ข "เครื่องพิมพ์ใบเสร็จ" on board drinkin-winkin-buy-zone-board: ported from its bz.css */
.sheet.medium.bB-sheet { top: 26% }   /* the slips stand taller than the keys did; nothing scrolls */
.bz { --ink2: #4D5570; --edge: #D8C69E; --hole: #0B1020; position: relative; padding-top: 14px }
.bz button { font: inherit; color: var(--navy); background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent }
.bz button:disabled { cursor: default }
.bz button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px }
.bz .bz-cnt { display: flex; align-items: baseline; gap: 5px }
.bz .bz-n { font: 400 26px/1.3 var(--chon); color: var(--navy) }
.bz .bz-u { font: 600 12.5px/1.3 var(--plex); color: var(--ink2) }
.bz .bz-p { font: 700 13px/1.25 var(--plex); color: var(--navy) }
.bz .bz-per { font: 500 10px/1.3 var(--plex); color: var(--ink2) }   /* two lines, broken at the space by replica-bills.js: never inside ต่อบิล */
.bz .bz-rule { display: block; align-self: stretch; height: 0; margin: 6px 4px; border-top: 1.5px dashed rgba(24,33,61,.35) }
/* a rubber stamp: brick ink, a double rule, set a little crooked as a hand would */
.bz-stamp { display: inline-block; padding: 1px 7px; font: 400 13px/1.45 var(--chon); color: #B93226; white-space: nowrap;
  border: 1.5px solid #B93226; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--parch), inset 0 0 0 3px rgba(185,50,38,.8); rotate: -7deg }
/* the app's minimumScaleFactor: "Best value" (68 px of text at 13 px) is wider than a slip of four, so it shrinks to fit;
   คุ้มสุด always fits at 13 px */
.bzB-tail { container-type: inline-size }
.bzB-tail .bz-stamp-en { font-size: max(7.8px, min(13px, calc((100cqw - 21px) * .191))) }
.bz button:disabled:not(.on) { opacity: .5 }
/* ---------- b · เครื่องพิมพ์: the counter is the printer's head, four slips feed out of its slot (the 50 pack, 2026-10-28) ---------- */
.bB-print .bB-ctr { border-radius: 10px 10px 4px 4px; background: linear-gradient(#0A0F1D, #070B16 70%); box-shadow: inset 0 2px 6px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.06), 0 0 0 1.5px #2E3854 }
.bz-b { display: block; padding-top: 0 }
/* the slot plate: one lamp over each slip (the old keys' LEDs), the picked one gold with a check; the slit at its foot */
.bzB-slot { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 24px; margin: 0 6px; padding: 3px 10px 0;
  border-radius: 0 0 8px 8px; background: #1E2740; box-shadow: 0 0 0 1.5px #2E3854, 0 4px 6px rgba(0,0,0,.5) }
.bzB-slot::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 4px; border-radius: 2px; background: #02040A; box-shadow: 0 1px 0 rgba(242,179,61,.35) }
.bzB-slot i { justify-self: center; width: 12px; height: 12px; display: grid; place-items: center; border-radius: 50%; background: #4a1712; box-shadow: inset 0 1px 1px rgba(0,0,0,.6) }
.bzB-slot i.on { width: 14px; height: 14px; margin-top: -1px; background: var(--gold); color: var(--navy); box-shadow: 0 0 8px 2px rgba(242,179,61,.6) }
.bzB-slot i .ic { stroke-width: 3 }
.bzB-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 12px; margin-top: -6px; align-items: start }
.bzB { display: block; overflow: hidden; padding-bottom: 12px }   /* the slip feeds down out of the slot, never above it */
.bzB-slip { position: relative; display: grid; justify-items: center; padding: 14px 6px calc(14px + var(--len)); transform: translateY(-6px);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); transition: transform .4s cubic-bezier(.2,.9,.25,1); animation: bzFeed .9s cubic-bezier(.2,.8,.25,1) both }
.bzB:nth-child(2) .bzB-slip { animation-delay: .12s } .bzB:nth-child(3) .bzB-slip { animation-delay: .24s } .bzB:nth-child(4) .bzB-slip { animation-delay: .36s }
@keyframes bzFeed { from { transform: translateY(-100%) } }
.bzB-slip::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(24,33,61,.22), transparent 18px), var(--parch);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 10px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 10px 100% }
.bzB.on .bzB-slip { transform: translateY(0); filter: drop-shadow(0 0 1.5px var(--gold)) drop-shadow(0 0 7px rgba(242,179,61,.7)) drop-shadow(0 6px 6px rgba(0,0,0,.5)) }
.bzB-tail { position: absolute; left: 0; right: 0; bottom: 14px; height: var(--len); display: grid; place-items: center }
/* a printed bar code as plain stripes, no digits */
.bzB-code { width: 64px; height: 14px; background: repeating-linear-gradient(90deg, var(--navy) 0 2px, transparent 2px 4px, var(--navy) 4px 5px, transparent 5px 8px, var(--navy) 8px 11px, transparent 11px 13px); opacity: .8 }
.bzB:first-child .bzB-tail { display: none }
@media (prefers-reduced-motion: reduce) { .bz * { animation: none !important; transition: none !important } }
.bB-print .bB-keys { display: block; padding-top: 0 }   /* the slot plate, then the row of slips under it */

/* ---------- the counter: the printer's amber display beside its status lamp (P'Ek 2026-10-26 picked ข "จอเครื่อง",
   board drinkin-winkin-buy-counter-board); the dark housing the slot plate hangs under ---------- */
.bD { display: grid; grid-template-columns: 1fr 58px; gap: 10px; align-items: center; padding: 10px; border-radius: 10px 10px 4px 4px;
  background: linear-gradient(#0E1424, #070B16 70%); box-shadow: inset 0 2px 6px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 1.5px #2E3854; font-family: var(--plex) }
.bD .num { font-variant-numeric: tabular-nums }
/* Settings (P'Ek 2026-10-26: "ขอบมันติดกัน"): clear of the Level plate, and the glass and lamp clear of the housing's edge */
.bD-se { margin-top: 16px }
.bD-se .bD { padding: 16px; gap: 16px; border-radius: 12px }
.bD-lcd { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px 10px; padding: 9px 12px; border-radius: 6px;
  /* the glass: dark amber with a faint pixel grid drawn in its own background */
  background: linear-gradient(rgba(255,194,74,.05) 1px, transparent 1px) 0 0 / 3px 3px, linear-gradient(90deg, rgba(255,194,74,.05) 1px, transparent 1px) 0 0 / 3px 3px,
    linear-gradient(#2A1C06, #1A1104); box-shadow: inset 0 0 0 1.5px #3E2C0C, inset 0 3px 8px rgba(0,0,0,.6), 0 0 0 3px #0A0F1D, 0 0 0 4.5px #2E3854 }
.bD-k { font: 600 13px/1.35 var(--plex); color: #FFC24A; white-space: nowrap }
.bD-v { justify-self: end; white-space: nowrap; font: 700 16px/1.3 var(--plex); color: #FFC24A }
.bD-cells { display: flex; gap: 5px }
.bD-cells i { width: 18px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1.5px rgba(255,194,74,.35) }
.bD-cells i.on { background: #FFC24A; box-shadow: none }
.bD-nx { display: inline-flex; align-items: center; gap: 4px }
.bD-nx .bB-tk, #phone .bD-nx .bB-tk b { color: #FFC24A }
.bD-nx b.num { font: 700 14px/1 var(--plex) }
/* the ten 3-day marks (flapLeds) drawn as display segments */
.bD .leds { display: flex; gap: 2px }
.bD .leds i { flex: 1; max-width: 10px; height: 8px; box-shadow: inset 0 0 0 1px rgba(255,194,74,.35) }
.bD .leds i.on { background: #FFC24A; box-shadow: none }
.bD-st { display: grid; justify-items: center; gap: 6px; padding: 10px 0; border-radius: 6px; background: #0A0F1D; box-shadow: inset 0 0 0 1.5px #2E3854 }
.bD-lamp { width: 14px; height: 14px; border-radius: 50% }
.bD-st.green .bD-lamp { background: #5BD36A; box-shadow: 0 0 9px 2px rgba(91,211,106,.55) }
.bD-st.amber .bD-lamp { background: var(--gold); box-shadow: 0 0 9px 2px rgba(242,179,61,.55) }
.bD-st.red .bD-lamp { background: #FF4A36; box-shadow: 0 0 9px 2px rgba(255,74,54,.6) }
.bD-st small { font: 700 12px/1.3 var(--plex); text-align: center }
.bD-st.red small { color: #FF8A7A } .bD-st.green small { color: #8FD98A } .bD-st.amber small { color: var(--gold) }

/* Reading pass badge (PassBadge.swift): gold on the dark housing, on the add-Bill key the parchment pill with burnt ink (wood) */
.pb { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 12px; border-radius: 8px; color: #F2B33D; background: #0A0F1D; box-shadow: inset 0 0 0 1.5px rgba(242, 179, 61, .75); white-space: nowrap }
.pb-a { display: inline-flex; align-items: center; gap: 5px }
#phone .pb b { font: 700 14px/1.3 var(--plex); color: inherit }
#phone .pb small { margin: 0; font: 600 11.5px/1.3 var(--plex); color: inherit }
.pb-hang { position: relative; z-index: 1; display: flex; justify-content: center; margin-bottom: -12px }
#phone .snap .pb.key { flex: none; background: #F3E6C8; color: #24130A; box-shadow: inset 0 0 0 1.5px rgba(74, 40, 14, .85); padding: 4px 8px }
