:root {
  --bg: #fbf6ee;
  --bg-2: #f8efdf;
  --bg-3: #f2e5cd;
  --zebra: #fffaf2;
  --hover: #fff5e4;
  --card: #ffffff;
  --ink: #2b1813;
  --ink-2: #6b4f45;
  --ink-3: #8a6d60;
  --line: #f0e1c6;
  --line-2: #e3cba0;
  --brand: #c1121c;
  --brand-2: #9c0c15;
  --brand-deep: #6b0710;
  --brand-ink: #7a0c14;
  --brand-soft: #fdeceb;
  --brand-ring: rgba(193, 18, 28, .2);
  --gold: #c99525;
  --gold-2: #e9bb47;
  --gold-hi: #ffe7a0;
  --gold-ink: #7d5509;
  --gold-soft: #fff5dc;
  --gold-line: #ecd59a;
  --grad-red: linear-gradient(180deg, #d3141f 0%, #b00d17 100%);
  --grad-maroon: linear-gradient(180deg, #800a13 0%, #5a050b 100%);
  --grad-gold: linear-gradient(135deg, #fff2b8 0%, #f3cb62 28%, #d09628 56%, #f6d982 80%, #b9821a 100%);
  --gold-trim: linear-gradient(90deg, #9a6a12 0%, #f8dc84 22%, #c9912a 50%, #fff1b9 76%, #9a6a12 100%);
  --ok: #1d7a4a;
  --ok-soft: #e6f4ec;
  --warn: #a8570a;
  --warn-soft: #fdf1e1;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --info: #1d4ed8;
  --info-soft: #e8eefc;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(74, 30, 12, .06), 0 3px 10px rgba(74, 30, 12, .05);
  --font: "MK Myanmar", "MK Lao", "Sukhumvit Set", "Leelawadee UI", "Noto Sans Thai", "Sarabun", "Thonburi", Tahoma, system-ui, -apple-system, sans-serif;
  --font-num: "MK Num", var(--font);
}
@font-face { font-family: "MK Myanmar"; src: url("/fonts/mk-my-400.woff") format("woff"); font-weight: 100 549; font-display: swap; unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F; }
@font-face { font-family: "MK Myanmar"; src: url("/fonts/mk-my-700.woff") format("woff"); font-weight: 550 900; font-display: swap; unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F; }
@font-face { font-family: "MK Lao"; src: url("/fonts/mk-lo-400.woff") format("woff"); font-weight: 100 549; font-display: swap; unicode-range: U+0E80-0EFF; }
@font-face { font-family: "MK Lao"; src: url("/fonts/mk-lo-700.woff") format("woff"); font-weight: 550 900; font-display: swap; unicode-range: U+0E80-0EFF; }
@font-face {
  font-family: "MK Num";
  src: url("/fonts/mk-num.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0020, U+0025, U+0028-0029, U+002B-003A, U+2212;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: 14px; }
.small { font-size: 14px; }
.right { text-align: right; }
.hidden { display: none !important; }
.app-back { display: none !important; }
html.is-app .app-back { display: inline-block !important; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--brand); color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; }
.topbar .brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar .brand .mark { width: 40px; height: 40px; border-radius: 9px; display: block; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.topbar .who .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.app-notice { padding: 10px 16px; font-weight: 600; text-align: center; line-height: 1.5; border-bottom: 1px solid rgba(0,0,0,.08); }
.app-notice.warn { background: #fff4d6; color: #6b4a00; }
.app-notice.bad { background: #fde3e1; color: #8a1410; }
.topbar .chip-price { background: rgba(255,255,255,.14); border-radius: 999px; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.topbar button { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.topbar button:hover { background: rgba(255,255,255,.24); }
.topbar select.input { color: var(--ink); background: #fff; }

.tabs { display: flex; gap: 4px; padding: 8px 16px 0; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 56px; z-index: 19; }
.tabs button { border: 0; background: none; padding: 10px 14px; border-bottom: 3px solid transparent; cursor: pointer; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .badge { margin-left: 6px; }

.page { padding: 20px 24px; max-width: 1440px; margin: 0 auto; }
.page.narrow { max-width: 560px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.pad-s { padding: 12px; }
.card h3 { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid.buy { grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "seller add" "seller bill"; align-items: start; }
.buy-seller { grid-area: seller; }
.buy-add { grid-area: add; }
.grid.buy > #billCard { grid-area: bill; }
.grid.checkin { grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
.grid.metals { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 960px) {
  .grid.two, .grid.buy, .grid.checkin { grid-template-columns: minmax(0, 1fr); }
  .grid.buy { grid-template-rows: none; grid-template-areas: "seller" "add" "bill"; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-weight: 600; min-height: 42px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); border-color: #f0c4bf; }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn.big { min-height: 56px; font-size: 18px; padding: 12px 20px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; min-height: 42px; }
.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips button.off { border-style: dashed; color: var(--ink-3); background: var(--hover); font-weight: 500; }
.card.flash { animation: cardFlash 2.4s ease-out; }
@keyframes cardFlash { 0%, 30% { box-shadow: 0 0 0 4px var(--gold); } 100% { box-shadow: var(--shadow); } }
.chips.seg button { border-radius: 10px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; background: #fff; min-height: 44px; }
.input:focus { outline: 3px solid var(--brand-ring); border-color: var(--brand); }
.input.big { font-size: 26px; font-weight: 700; min-height: 60px; font-variant-numeric: tabular-nums; }
.input.bad { border-color: var(--bad); background: var(--bad-soft); }
.input-unit { position: relative; }
.input-unit .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.input-unit .input { padding-right: 52px; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 20px; height: 20px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--bg-3); color: var(--ink-2); }
.badge.locked, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.checked { background: var(--info-soft); color: var(--info); }
.badge.paid, .badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.cancelled, .badge.void, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.gold { background: var(--gold-soft); color: var(--gold-ink); }
.badge.count { background: var(--brand); color: #fff; padding: 0 7px; min-width: 22px; justify-content: center; }

.note { border-radius: 10px; padding: 10px 12px; font-size: 15px; border: 1px solid; }
.note.warn { background: var(--warn-soft); border-color: #f3d3a8; color: #6b3a06; }
.note.bad { background: var(--bad-soft); border-color: #f1bdb7; color: #7a1a12; }
.note.ok { background: var(--ok-soft); border-color: #b9dfc9; color: #0f4d2d; }
.note.info { background: var(--info-soft); border-color: #c4d3f7; color: #183b9c; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.table { border-collapse: collapse; width: 100%; font-size: 15px; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--bg-2); font-size: 13px; color: var(--ink-2); font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.void td { color: var(--ink-3); text-decoration: line-through; }
.table tr.void td.keep { text-decoration: none; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--hover); }
.table tr.sel td { background: var(--gold-soft); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.kv .sep { grid-column: 1 / -1; border-top: 1px dashed var(--line-2); margin: 4px 0; }
.kv .total { font-size: 20px; font-weight: 800; }

.amount { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.amount.mid { font-size: 24px; }
.amount small { font-size: 16px; font-weight: 600; color: var(--ink-2); }

.metal-card { border-left: 5px solid var(--line-2); }
.metal-card.need { border-left-color: var(--warn); background: linear-gradient(0deg, #fff, #fffaf2); }
.metal-card.over { border-left-color: var(--bad); }
.metal-card.zero { border-left-color: var(--ok); }
.metal-card .big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; width: 100%; }
.item:hover { border-color: var(--line-2); }
.item.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-ring); }
.item .t { font-weight: 700; }
.item.overdue { border-left: 5px solid var(--bad); }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 15px; animation: tin .2s ease-out; }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
.toast.alert { background: var(--gold); color: #1f1c17; font-weight: 700; }
.toast.warn { background: #9a4a06; }
.slip-via { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.slip-via select.input { width: auto; max-width: 320px; padding-top: 6px; padding-bottom: 6px; }
.slip-busy { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 15px; }
@media print { .slip-busy { display: none; } }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-back { position: fixed; inset: 0; background: rgba(42, 6, 8, .48); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--card); border-radius: 16px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { width: min(860px, 100%); }
.modal-head { padding: 16px 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal-body { padding: 14px 18px; }
.modal-foot { padding: 0 18px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.x { border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--ink-3); line-height: 1; padding: 4px 8px; }

.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav button { border: 0; background: none; padding: 8px 4px 10px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bottomnav button .ic { font-size: 20px; line-height: 1; }
.bottomnav button.on { color: var(--brand); }
.has-bottomnav { padding-bottom: 84px; }

.empty { text-align: center; color: var(--ink-3); padding: 28px 12px; }
.divider { border-top: 1px solid var(--line); margin: 12px 0; }
.pill-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, var(--gold-soft), var(--bg) 60%); }
.login-card { width: min(400px, 100%); }
.login-pair { display: flex; gap: 16px; align-items: flex-start; justify-content: center; flex-wrap: wrap; width: 100%; }
#demo .list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#demo .item { padding: 8px 10px; }
#demo .item .t { font-size: 15px; }
#demo .item .faint { font-size: 12.5px; }
@media (max-width: 420px) { #demo .list { grid-template-columns: 1fr; } }
.login-logo { width: 120px; height: 120px; border-radius: 22px; display: block; object-fit: cover; margin: 0 auto 14px; box-shadow: 0 4px 14px rgba(107, 7, 16, .22); }

.livep { background: linear-gradient(135deg, var(--zebra), #fff 70%); border: 1px solid var(--gold-line); border-left: 6px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; display: grid; gap: 4px; }
.livep.bad { border-left-color: var(--bad); border-color: #f1bdb7; background: linear-gradient(135deg, #fff3f1, #fff 70%); }
.livep.warn { border-left-color: #e08a12; }
.livep.manual, .livep.wait { border-left-color: var(--ink-3); background: var(--card); border-color: var(--line); }
.lp-head { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.lp-title { font-weight: 700; color: var(--ink-2); }
.lp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--ink-3); flex: none; }
.dot.ok { background: #22a35a; animation: pulse 2s infinite; }
.dot.bad { background: var(--bad); }
.dot.warn { background: #e08a12; }
.dot.wait, .dot.manual { background: #9a9385; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 163, 90, .55); } 70% { box-shadow: 0 0 0 8px rgba(34, 163, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 163, 90, 0); } }
.lp-main { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; }
.lp-price { font-size: 44px; font-weight: 800; letter-spacing: -1px; color: var(--brand-ink); line-height: 1.1; border-radius: 8px; padding: 0 6px; margin-left: -6px; }
.lp-price.dim { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 3px; }
.lp-unit { font-weight: 700; color: var(--ink-2); }
.lp-delta { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.lp-delta.up { color: var(--ok); }
.lp-delta.down { color: var(--bad); }
.flash-up { animation: flashUp 1.6s ease-out; }
.flash-down { animation: flashDown 1.6s ease-out; }
@keyframes flashUp { from { background: #bdebcd; } to { background: transparent; } }
@keyframes flashDown { from { background: #f6cbc4; } to { background: transparent; } }
.lp-src { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; justify-self: start; }
.src-badge { border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--bg-3); color: var(--ink-2); }
.src-badge.asso { background: var(--gold-ink); color: #fff; }
.src-badge.mts { background: var(--brand); color: #fff; }
.lp-both { font-variant-numeric: tabular-nums; justify-self: start; }
.lp-warn { background: var(--warn-soft); color: #6b3a06; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 600; }
.livep.bad .lp-warn { background: var(--bad-soft); color: #7a1a12; }
.lp-lock { display: flex; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; font-weight: 700; font-size: 14px; border-top: 1px dashed var(--line-2); padding-top: 6px; margin-top: 2px; }
.lp-lock.open { color: var(--ok); }
.lp-lock.closed { color: var(--bad); }
.lp-pgm { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; border-top: 1px dashed var(--line-2); padding-top: 6px; margin-top: 2px; font-size: 15px; }
.lp-pgm-t { font-size: 13px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border-radius: 999px; padding: 1px 8px; }
.bad-t { color: var(--bad); font-weight: 700; }
.lp-board { font-size: 14px; font-weight: 600; justify-self: start; }
.lp-boards { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-self: start; }
.site-tag { display: inline-block; font-size: .82em; font-weight: 700; line-height: 1.5; color: var(--brand-ink); background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 999px; padding: 0 .6em; margin-left: 4px; vertical-align: .05em; }
.item.cust-site { padding-left: 22px; }
.livep.compact .lp-price { font-size: 32px; }
.topbar .chip-price .dot { width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; animation: none; }
.topbar .chip-price .dot.ok { background: #6ee39a; }
.topbar .chip-price .dot.bad { background: #ffb0a5; }
.price-live { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: stretch; margin-bottom: 16px; }
@media (max-width: 960px) { .price-live { grid-template-columns: minmax(0, 1fr); } }
.input:disabled { background: var(--bg-2); color: var(--ink-2); }
.auto-tag { font-size: 12px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.timegrid { display: grid; grid-template-columns: auto auto auto auto; gap: 8px 10px; align-items: center; justify-content: start; align-self: flex-start; }
.timegrid .input { width: 96px; min-height: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.feed-table td, .feed-table th { padding: 6px 10px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.thumbs figcaption { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; border-radius: 6px; padding: 0 6px; }
.thumbs button { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.chips.small button { min-height: 36px; padding: 5px 12px; font-size: 14px; }


@media (max-width: 600px) {
  .page { padding: 12px; }
  .topbar { padding: 8px 12px; flex-wrap: wrap; row-gap: 6px; gap: 8px; }
  .topbar .chip-price { display: none; }
  .topbar:has(#branchSel) .brand span:not(.mark) { display: none; }
  .topbar #branchSel { min-width: 0; max-width: 48vw; flex: 0 1 auto; }
  .topbar:has(#branchSel) .who .name { max-width: 28vw; }
  .amount { font-size: 28px; }
  .tabs { padding: 4px 8px 0; }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}

.pc { display: grid; gap: 10px; padding: 14px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; width: 100%; }
.pc-name { font-size: 22px; font-weight: 800; color: var(--brand); }
.pc-go { font-weight: 700; color: var(--brand); font-size: 15px; white-space: nowrap; }
.pc-base { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; padding: 6px 10px; font-size: 15px; }
.pc-base b { font-size: 18px; }
.pc-prod { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.pc-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; width: 100%; font-weight: 700; font-size: 17px; color: var(--ink); }
.pc-sub .faint { font-weight: 600; white-space: nowrap; }
.pc-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 3px 0; font-size: 15px; }
.pc-line b { font-size: 19px; }
.pc-line small, .pc-cell small { color: var(--ink-3); font-weight: 600; }
.pc-line.hit { background: var(--gold-soft); border-radius: 8px; padding: 3px 8px; margin: 0 -8px; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pc-cell { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; border: 1px solid var(--line); background: var(--zebra); border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: left; font-size: 15px; }
.pc-cell b { font-size: 17px; }
.pc-cell:hover, .pc-sub:hover span:first-child, .pc-head:hover .pc-name { color: var(--brand-2); }
.pc-bands { display: grid; gap: 2px; }
.lock-price { border: 2px solid var(--gold); background: linear-gradient(135deg, var(--zebra), #fff 70%); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.lock-price.paused { border-color: var(--bad); }
.lk-k { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.lk-k2 { font-weight: 700; font-size: 17px; }
.lk-v { line-height: 1.1; }
.lk-v .num { font-size: 40px; font-weight: 800; letter-spacing: -1px; color: var(--brand-ink); }
.lk-v small { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.gtab input.input { min-height: 36px; padding: 4px 8px; width: 96px; text-align: right; }
.gtab td, .gtab th { vertical-align: middle; }
.gtab .res { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.gtab.row input.input { width: 110px; }
.pc-cell > span { display: grid; }
.pc-one { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; width: 100%; color: var(--ink); }
.pc-one .t { font-weight: 700; font-size: 17px; }
.pc-one .v { text-align: right; }
.pc-one .v b { font-size: 21px; }
.pc-one .v small { display: block; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.gtab .ov { background: var(--warn-soft); }

.perm-banner { position: sticky; top: 0; z-index: 60; margin: 0; border-radius: 0; border-width: 0 0 1px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }

.perm-table th, .perm-table td { vertical-align: middle; }
.perm-table td:first-child, .perm-table th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 230px; max-width: 340px; white-space: normal; }
.perm-table th:first-child { background: var(--bg-2); z-index: 2; }
.perm-table td.pcell { text-align: center; min-width: 150px; }
.perm-table td.pcell input[type="checkbox"] { width: 22px; height: 22px; cursor: pointer; }
.perm-table td.pcell select.input { min-height: 38px; padding: 6px 8px; font-size: 14px; }
.perm-table tr.grp td { background: var(--bg-2); font-weight: 700; color: var(--ink-2); font-size: 14px; }
.perm-table th.pos { min-width: 150px; text-align: center; white-space: normal; }
.perm-table th.pos input.input { min-height: 38px; padding: 6px 8px; text-align: center; font-weight: 700; }
.perm-table .hint { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.perm-scope { font-size: 14px; }
.input[readonly], select.input:disabled { background: var(--bg-2); color: var(--ink-2); }
.savebar { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; gap: 8px; z-index: 10; }
@media (max-width: 600px) {
  .perm-table td:first-child, .perm-table th:first-child { min-width: 150px; max-width: 170px; font-size: 14px; padding: 8px; }
  .perm-table th.pos, .perm-table td.pcell { min-width: 118px; padding: 8px 6px; }
  .perm-table .hint { font-size: 12px; }
}

.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 12px; }
.hist-grid .wide { grid-column: span 2; }
.hist-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.hist-cust { border-left: 5px solid var(--brand); }
.hist-table { min-width: 940px; }
.linkish { border: 0; background: none; padding: 0; margin: 0; font: inherit; font-weight: 700; color: var(--brand); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--brand-ring); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: currentColor; }
@media (max-width: 600px) {
  .hist-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hist-grid .wide { grid-column: 1 / -1; }
}

.badge.cust-r { background: #e8eef7; color: #2c4a7a; }
.badge.cust-w { background: var(--gold-soft); color: #7a520c; border: 1px solid var(--gold-line); }

.imp-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; margin-top: 6px; }
textarea.input { min-height: 120px; font: inherit; line-height: 1.5; }

.shot-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.shot-btn { min-height: 64px; white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 600px) {
  .shot-row { grid-template-columns: minmax(0, 1fr); }
  .shot-row .shot-btn:first-child { min-height: 72px; font-size: 19px; }
  .shot-row .shot-btn:last-child { min-height: 48px; }
}
.ph-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-th { display: grid; gap: 3px; align-content: start; }
.bp-th .badge { justify-self: start; font-size: 11.5px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gallery-grid > .empty, .gallery-grid > .note { grid-column: 1 / -1; }
.g-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.g-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg-3); }
.g-cap { padding: 8px 10px 10px; display: grid; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
.g-cap .btn { justify-self: start; }
.g-tags { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; } }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: min(52vh, 460px); overflow: auto; padding: 2px; }
.pick-item { position: relative; border: 2px solid var(--line); border-radius: 10px; background: var(--card); padding: 0; cursor: pointer; text-align: left; overflow: hidden; display: flex; flex-direction: column; }
.pick-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--bg-3); }
.pick-item.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.pick-item.on::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.pi-cap { padding: 4px 6px 6px; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 600px) { .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.line-ph { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; }
.lp-slot { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lp-slot .btn.small { min-height: 36px; padding: 5px 10px; }
.thumbs.mini { grid-template-columns: repeat(auto-fill, 52px); gap: 4px; }
.thumbs.mini button { width: 22px; height: 22px; font-size: 14px; top: 1px; right: 1px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.bp-slot { border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 10px; display: grid; gap: 8px; align-content: start; }

.calc-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.calc-ov { display: grid; gap: 8px; border-top: 1px dashed var(--line-2); padding-top: 10px; justify-items: start; }
.calc-ov .fields { width: 100%; }
.calc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; }
.calc-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.calc-out { display: flex; justify-content: space-between; align-items: center; gap: 6px 14px; flex-wrap: wrap; grid-column: 1 / -1; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.calc-out .amount { font-size: 26px; }
.calc-del { grid-row: 1; grid-column: 2; align-self: start; }
.calc-total { font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.calc-total .amount { color: var(--brand); }
@media (max-width: 600px) {
  .calc-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .calc-in .field:first-child { grid-column: 1 / -1; }
  .calc-out .amount { font-size: 22px; }
}

.bs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.bs-card { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--line-2); border-radius: var(--radius); padding: 10px 14px 12px; display: grid; gap: 6px; align-content: start; }
.bs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bs-kv { margin: 0; display: grid; gap: 3px; }
.bs-kv > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.bs-kv dt { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.bs-kv dd { margin: 0; font-weight: 700; text-align: right; }
.bs-kv small { font-weight: 500; color: var(--ink-3); }
.bs-card.m-gold { border-top-color: #c99b37; background: linear-gradient(180deg, #fdf7e6 0, #fff 46px); }
.bs-card.m-gold .bs-head b { color: #6e4c08; }
.bs-card.m-silver { border-top-color: #9ea8b2; background: linear-gradient(180deg, #f2f4f6 0, #fff 46px); }
.bs-card.m-silver .bs-head b { color: #27323d; }
.bs-card.m-pt { border-top-color: #2a5c8a; }
.bs-card.m-pt .bs-head b { color: #2a5c8a; }
.bs-card.m-pd { border-top-color: #7a5230; }
.bs-card.m-pd .bs-head b { color: #7a5230; }
.bs-card.m-rh { border-top-color: #6b2d6e; }
.bs-card.m-rh .bs-head b { color: #6b2d6e; }
.bs-card.m-copper { border-top-color: #b4643a; }
.bs-card.m-brass { border-top-color: #b99a3c; }
.bs-card.m-tin { border-top-color: #8a9096; }
.lp-ag .lp-pgm-t { background: linear-gradient(115deg, #f6f8fa, #d5dbe1 60%, #c3cad2); color: #27323d; }
.lp-ag .num { color: #27323d; font-weight: 700; }
.lp-pt .num { color: #2a5c8a; font-weight: 700; }
.lp-pd .num { color: #7a5230; font-weight: 700; }
.lp-rh .num { color: #6b2d6e; font-weight: 700; }

.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.ref-card { border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; background: var(--card); }
.ref-card.off { opacity: .6; border-left-color: var(--line-2); }
.hedge-est { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; padding: 10px 12px; }
.lf-est { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.lf-amt { font-size: 18px; margin-top: 4px; }
.lf-price { background: var(--zebra); }
.expo-card { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; }
.expo-card .x { display: inline-flex; gap: 6px; align-items: baseline; }
.expo-card .x b { font-size: 18px; }

.reader-box { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.reader-line { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; min-width: 0; }
.reader-line:empty { display: none; }
.reader-line select.input { width: auto; min-height: 34px; padding: 4px 8px; font-size: 14px; }
.reader-st { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.reader-st.ok { color: #17713f; }
.reader-st.bad { color: var(--bad); }
.reader-st .dot { width: 8px; height: 8px; }
.reader-tbl td { vertical-align: middle; }
.reader-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid.three { grid-template-columns: minmax(0, 1fr); } }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.stk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stk-card { border-top: 4px solid var(--line-2); display: grid; gap: 10px; align-content: start; }
.stk-card.m-gold { border-top-color: var(--gold); }
.stk-card.m-silver { border-top-color: #9aa4ae; }
.stk-card.m-pt { border-top-color: #2a5c8a; }
.stk-card.m-pd { border-top-color: #7a5230; }
.stk-card.m-rh { border-top-color: #6b2d6e; }
.stk-card.m-copper, .stk-card.m-brass, .stk-card.m-tin { border-top-color: #b4673a; }
.stk-head { display: grid; gap: 2px; }
.stk-head h3 { margin: 0; font-size: 19px; }
.stk-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; align-items: baseline; }
.stk-dl dt { color: var(--ink-2); font-size: 14px; }
.stk-dl dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.stk-dl dd .faint { font-weight: 500; font-size: 13px; }
.stk-br { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 8px; }
.stk-ships td { vertical-align: top; }
.stk-it { padding: 2px 0; font-size: 14px; }
.stk-it .btn { margin-left: 4px; }
.stk-preview, .stk-sum, .stk-book { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; font-size: 15px; }
.stk-book { display: block; line-height: 1.7; }
.stk-sum .stk-net { border-top: 1px solid var(--gold-line); padding-top: 6px; margin-top: 2px; font-size: 16px; }
.pf-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pf-box { display: grid; gap: 2px; align-content: start; }
.pf-v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pf-box.big { grid-column: span 2; background: var(--brand); border-color: var(--brand); color: #fff; }
.pf-box.big .faint { color: rgba(255, 255, 255, .78); }
.pf-box.big .pf-v { font-size: 34px; color: #fff; }
.pf-table tfoot td { font-weight: 800; border-top: 2px solid var(--line-2); }
.pf-how { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-size: 14px; }
@media (max-width: 520px) { .pf-box.big { grid-column: auto; } }

.stk-bin { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 7px; margin-right: 8px; font-size: 14px; font-weight: 800; vertical-align: 2px; }
.stk-bin.bin-A { background: var(--gold-ink); color: #fff; }
.stk-bin.bin-B { background: var(--gold-soft); color: var(--gold-ink); border: 1px solid var(--gold-line); }
.stk-kinds { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 8px; }
.stk-kinds .faint { width: 100%; }
.stk-cut td { vertical-align: middle; }
.stk-cut tr.off td { opacity: .45; }
.stk-cut td.small div { white-space: nowrap; }
.stk-kcut { display: grid; gap: 6px; justify-items: end; }
.stk-kcut label { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.stk-kcut .input { width: 100px; }

.orn-t td { vertical-align: middle; }
.orn-t .input.num { width: 96px; padding: 6px 8px; }
.orn-t .input.orn-ded { width: 70px; }
.orn-t tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); }
.orn-t .orn-add td { background: transparent; }
.orn-kpick { display: flex; gap: 6px; align-items: center; }
.orn-kpick .input { width: auto; min-width: 130px; padding: 6px 8px; }
.modal.orn-modal { max-width: 1040px; }
.rf-sb { border-top: 1px dashed var(--line-2); padding-top: 8px; }
.rr-t td { vertical-align: middle; }
.rr-pick { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.rr-pick > span { min-width: 0; overflow-wrap: anywhere; }
.rr-t input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.rr-alloc { display: grid; gap: 2px; border-top: 1px dashed var(--gold-line); padding-top: 6px; margin-top: 4px; font-size: 14px; }
.rr-orn > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.rr-orn[open] > summary { margin-bottom: 6px; }
.rf-lots tr.rf-grp td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.stk-it .btn.danger { margin-left: 4px; }
.cl-steps ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.cl-br { display: grid; gap: 8px; }
.cl-br + .cl-br { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.cl-brh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.cl-brh b { font-size: 17px; }
.cl-bra { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-t td { vertical-align: middle; }
.cl-t .input.num { width: 112px; padding: 6px 8px; }
.cl-sum { display: grid; gap: 8px; font-size: 15px; }
.cl-t tr.cl-chg td { background: var(--warn-soft); }
.cl-t tr.cl-chg .input { border-color: var(--warn); }
.cl select.input { max-width: 100%; }
@media (max-width: 640px) {
  .cl-t .input.num { width: 90px; }
  .table-wrap > .table.tight.orn-t { min-width: 0; }
  .table.tight.orn-t td:first-child { position: static; min-width: 0; background: transparent; }
  .orn-t thead { display: none; }
  .orn-t, .orn-t tbody, .orn-t tfoot { display: block; }
  .orn-t tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: end; }
  .orn-t td { display: block; border: 0; padding: 0; text-align: left; }
  .orn-t td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
  .orn-t td.o-n { grid-column: 1 / -1; font-size: 16px; }
  .orn-t tr.o-hv td.o-n { grid-column: 1 / 3; }
  .table.orn-t td.o-s, .table.orn-t td.o-r, .table.orn-t td.o-d, .table.orn-t td.o-u { text-align: left; }
  .orn-t td.o-h { text-align: right; }
  .orn-t td.o-u { grid-column: 1 / 2; }
  .orn-t td.o-p { grid-column: 2 / 4; text-align: right; font-weight: 700; }
  .orn-t td.o-x { display: none; }
  .orn-t .input.num, .orn-t .input.orn-ded { width: 100%; }
  .orn-t tr.orn-add { display: block; }
  .orn-t tfoot tr { background: var(--gold-soft); }
  .orn-t tfoot td.o-n { grid-column: 1 / -1; }
  .orn-t tfoot td.o-p { grid-column: auto; }
  .table-wrap > .table.mcard, .table-wrap > .table.tight.mcard { min-width: 0; }
  .table.tight.mcard td:first-child, .table.mcard td:first-child { position: static; min-width: 0; background: transparent; }
  .mcard thead { display: none; }
  .mcard, .mcard tbody, .mcard tfoot { display: block; }
  .mcard tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: end; }
  .mcard td { display: block; border: 0; padding: 0; text-align: left; min-width: 0; }
  .table.mcard td.num { text-align: left; }
  .mcard td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
  .mcard td.m-full { grid-column: 1 / -1; font-weight: 600; }
  .mcard td.m-wide { grid-column: 1 / -1; }
  .mcard td:empty { display: none; }
  .mcard .input.num, .cl-t.mcard .input.num { width: 100%; }
  .mcard .row.nowrap { justify-content: flex-start !important; }
  .mcard tr.cl-chg { background: var(--warn-soft); }
}
@media (max-width: 640px) {
  .rr-t.mcard tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rr-t.mcard td { font-size: 14px; }
  .table.rr-t.mcard td.num { white-space: normal; overflow-wrap: anywhere; }
  .rr-t.mcard td.m-full { font-size: 15px; }
  .table.mcard tr.sel { background: var(--gold-soft); }
  .table.mcard tr.sel td { background: transparent; }
}
.chipcheck { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; min-height: 42px; cursor: pointer; font-weight: 600; background: var(--card); }
.chipcheck:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

:root { --nav-h: 64px; }
body.has-appnav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
body.has-appnav #toasts { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
.appnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center; gap: 2px; padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, .97); border-top: 1px solid var(--line-2); box-shadow: 0 -6px 20px rgba(60, 40, 20, .08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.appnav button { position: relative; flex: 0 1 92px; min-width: 0; height: 56px; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px; font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.1; }
@media (hover: hover) { .appnav button:hover { background: var(--brand-soft); color: var(--brand); } }
.appnav button:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: -3px; }
.appnav button.on { color: var(--brand); background: var(--brand-soft); }
.appnav button.on .nv-ic { stroke-width: 2.2; }
.appnav .nv-ic { width: 24px; height: 24px; flex: none; }
.appnav .nv-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appnav button.hidden { display: none; }
.appnav .badge.count { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; font-size: 11px; min-width: 19px; height: 19px; padding: 0 5px; }
.appnav .nv-gap { margin-left: 14px; }
.appnav .nv-gap::before { content: ''; position: absolute; left: -9px; top: 14px; bottom: 14px; width: 1px; background: var(--line-2); }
.appnav .nv-more { display: none; }
.appnav .nv-dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #fff; }
@media (max-width: 1180px) {
  .appnav:not(.fits) .nv-sec { display: none; }
  .appnav:not(.fits) .nv-more { display: flex; }
  .appnav .nv-gap { margin-left: 0; }
  .appnav .nv-gap::before { display: none; }
  .appnav button { flex: 1 1 0; max-width: 110px; }
}
.nv-back { position: fixed; inset: 0; z-index: 85; background: rgba(42, 6, 8, .45); display: flex; align-items: flex-end; justify-content: center; animation: nvFade .16s ease-out; }
.nv-back.out { opacity: 0; transition: opacity .15s; }
.nv-sheet { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: 18px 18px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0,0,0,.25); animation: nvUp .2s ease-out; }
.nv-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 6px; }
.nv-gname { font-size: 13px; color: var(--ink-3); font-weight: 700; margin: 12px 4px 6px; }
.nv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.nv-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; font-weight: 600; text-align: left; color: var(--ink); }
.nv-item .nv-ic { width: 22px; height: 22px; flex: none; color: var(--brand); }
.nv-item.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.nv-item .badge { margin-left: auto; }
.nv-close { margin-top: 14px; }
@keyframes nvUp { from { transform: translateY(24px); } to { transform: none; } }
@keyframes nvFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nv-back, .nv-sheet { animation: none; } }
@media print { .appnav { display: none; } body.has-appnav { padding-bottom: 0; } }

.lf-items { display: grid; gap: 10px; }
.lf-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--zebra); display: grid; gap: 8px; }
.lf-item-head { display: flex; justify-content: space-between; align-items: center; min-height: 30px; }
.lf-item-grid { display: grid; gap: 8px 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.lf-item-grid .lf-prod { grid-column: span 2; }
.lf-item-grid.lf-qty { margin-top: 8px; }
.lf-item-est { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; align-items: baseline; }
.lf-add { border-style: dashed; color: var(--brand); }

.mix-rows { display: grid; gap: 8px; }
.mix-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 46px auto; gap: 8px; align-items: center; }
@media (max-width: 560px) { .mix-row { grid-template-columns: 1fr auto auto; } .mix-row select { grid-column: 1 / -1; } }

.ls-day { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ls-day > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; }
.ls-day > summary::-webkit-details-marker { display: none; }
.ls-day[open] > summary { border-bottom: 1px solid var(--line); }
.ls-day .table-wrap { border: 0; border-radius: 0 0 12px 12px; }
.ls-date { font-weight: 700; }
.ls-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-chip { font-size: 13.5px; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); border-left: 4px solid var(--line-2); }
.ls-chip.m-gold { border-left-color: var(--gold); background: var(--gold-soft); }
.ls-chip.m-silver { border-left-color: #9aa4ae; background: #f1f3f5; }
.ls-chip.m-pd { border-left-color: #7a5230; } .ls-chip.m-pt { border-left-color: #2a5c8a; } .ls-chip.m-rh { border-left-color: #6b2d6e; }
.ls-amt { white-space: nowrap; }
.ls-total { border-top: 2px solid var(--line-2); padding-top: 8px; font-size: 16px; }
@media (max-width: 640px) { .ls-day > summary { grid-template-columns: 1fr auto; } .ls-chips { grid-column: 1 / -1; grid-row: 2; } }

.mo-nav { display: flex; align-items: center; gap: 8px; }
.mo-nav h2 { margin: 0; min-width: 0; }
.mo-nav .btn { min-width: 44px; font-size: 20px; padding: 4px 10px; }
.mo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.mo-box { display: grid; gap: 2px; align-content: start; }
.mo-v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mo-box.big { grid-column: span 2; background: var(--brand); border-color: var(--brand); color: #fff; }
.mo-box.big .faint { color: rgba(255,255,255,.8); }
.mo-box.big .mo-v { font-size: 34px; }
.mo-box.big .pos, .mo-box.big .neg { color: #fff; }
.mo-table td, .mo-table th { white-space: nowrap; }
.mo-table .faint { font-size: 12.5px; }
.mo-total td { background: var(--gold-soft); font-weight: 700; border-bottom: 2px solid var(--gold-line); }
.mo-scroll { max-height: 70vh; overflow: auto; }
.mo-scroll thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.mo-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--line-2); vertical-align: 1px; }
.mo-dot.m-gold { background: var(--gold); } .mo-dot.m-silver { background: #9aa4ae; } .mo-dot.m-pd { background: #7a5230; } .mo-dot.m-pt { background: #2a5c8a; } .mo-dot.m-rh { background: #6b2d6e; }
.mo-dot.m-copper, .mo-dot.m-brass, .mo-dot.m-tin { background: #b4673a; }
.mo-mini { font-size: 13px; color: var(--ink-2); }
@media (max-width: 640px) { .mo-box.big { grid-column: 1 / -1; } }

.more-rows { display: grid; gap: 8px; }
.more-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) minmax(70px, auto) 40px; gap: 8px; align-items: center; }
.more-row:not(:has([data-xk="pct"])) { grid-template-columns: 30px minmax(0, 2fr) minmax(70px, auto) 40px; }
.more-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); font-weight: 800; font-size: 14px; }
.more-amt { text-align: right; font-weight: 700; font-size: 14px; }
.more-add { border-style: dashed; color: var(--brand); font-weight: 600; }
.more-add .faint { font-weight: 500; }
.more-sum { border-top: 1px dashed var(--gold-line); margin-top: 8px; padding-top: 6px; }
@media (min-width: 1100px) { .mo-grid { grid-template-columns: minmax(280px, 2fr) repeat(5, minmax(0, 1fr)); } .mo-box.big { grid-column: auto; } }
.hedge-lsum { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.hedge-lsum:empty { display: none; }
.modal-foot .btn.danger:first-child { margin-right: auto; }

.site-ed [data-sites] { display: grid; gap: 6px; margin-bottom: 6px; }
.site-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.site-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px; }
.site-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #e8eef6; color: #1f4e79; font-weight: 700; font-size: .85em; white-space: nowrap; }
.site-pick { border: 2px solid #c9d8ea; background: #f3f7fc; border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.site-pick.need { border-color: var(--bad); background: #fff5f3; }
.site-pick-h { font-weight: 700; }
.site-pick { border: 2px solid #c9d8ea; background: #f3f7fc; border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.site-pick.need { border-color: var(--bad); background: #fff5f3; }
.site-pick-h { font-weight: 700; }


.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 4px 2px 0; }
.ph-t { min-width: 0; }
.ph h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.ph p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; max-width: 70ch; }
.ph-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tb { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; box-shadow: var(--shadow); }
.tb-l, .tb-r { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; min-width: 0; }
.tb .input { width: auto; min-height: 42px; }
.tb-note { color: var(--ink-2); font-size: 14.5px; }
.tb .chips button { min-height: 38px; padding: 6px 12px; }
.range { display: flex; align-items: center; gap: 8px; }
.range span { color: var(--ink-3); }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper .input { width: auto; }
.stepper-l { font-weight: 800; font-size: 18px; min-width: 9.5em; text-align: center; }
.btn.icon { min-width: 42px; padding: 6px 10px; font-size: 20px; line-height: 1; }
.subnav { display: flex; gap: 4px; padding: 4px; background: var(--bg-3); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.subnav button { border: 0; background: none; border-radius: 9px; padding: 9px 18px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; min-height: 40px; }
.subnav button:hover { color: var(--ink); }
.subnav button.on { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px rgba(74, 30, 12, .14); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi { display: grid; gap: 4px; align-content: start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi-l { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.kpi-v { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; overflow-wrap: anywhere; }
.kpi-s { font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.kpi.pos .kpi-v { color: var(--ok); }
.kpi.neg .kpi-v { color: var(--bad); }
.kpi.hero { background: linear-gradient(135deg, var(--brand) 0%, #6a1212 100%); border-color: var(--brand); color: #fff; grid-column: span 2; }
.kpi.hero .kpi-l, .kpi.hero .kpi-s { color: rgba(255, 255, 255, .82); }
.kpi.hero .kpi-v { font-size: 34px; color: #fff; }
.kpi.go { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.kpi.go:hover { border-color: var(--line-2); box-shadow: 0 2px 10px rgba(74, 30, 12, .1); }
@media (max-width: 640px) { .kpi.hero { grid-column: 1 / -1; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-v { font-size: 20px; } .kpi.hero .kpi-v { font-size: 28px; } }
.sec { display: grid; gap: 12px; align-content: start; }
.sec-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.sec-h h2 { font-size: 18px; font-weight: 800; }
.sec-h p { margin: 3px 0 0; color: var(--ink-3); font-size: 13.5px; }
.sec-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table.tight th, .table.tight td { padding: 8px 12px; }
.table tr.grp td { background: var(--zebra); }
.table tr.sub td { color: var(--ink-2); font-size: 14px; }
.table tr.sub td:first-child { padding-left: 34px; }
.table th.grp-h { text-align: center; border-bottom: 1px solid var(--line); background: var(--bg-3); color: var(--ink); }
.table thead tr + tr th { top: 33px; }
.table tfoot td { font-weight: 800; border-top: 2px solid var(--line-2); background: var(--zebra); }
.table tr.click:focus-visible td { outline: 2px solid var(--brand); outline-offset: -2px; }
.mdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; background: var(--line-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.mdot.m-gold { background: var(--gold); } .mdot.m-silver { background: #9aa4ae; } .mdot.m-pd { background: #7a5230; } .mdot.m-pt { background: #2a5c8a; } .mdot.m-rh { background: #6b2d6e; }
.mdot.m-copper { background: #b4582a; } .mdot.m-brass { background: #b39020; } .mdot.m-tin { background: #5d7d88; }
.pl { display: grid; gap: 2px; max-width: 640px; }
.pl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.pl-row small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.pl-row.sum { border-bottom: 1px solid var(--line-2); font-weight: 700; }
.pl-row.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 10px; font-size: 19px; font-weight: 800; }
.rep-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rep-grid { align-items: start; }
details.how > summary { cursor: pointer; font-weight: 700; }
details.how[open] > summary { margin-bottom: 8px; }
@media (max-width: 900px) { .grid.two.rep-grid { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .topbar, .appnav, .subnav, .tb .btn, .ph-a, .sec-a, #toasts { display: none !important; }
  body { background: #fff; }
  .card, .kpi, .tb { box-shadow: none; }
  .kpi.hero { background: #fff; color: #000; border: 2px solid #000; }
  .kpi.hero .kpi-l, .kpi.hero .kpi-s, .kpi.hero .kpi-v { color: #000; }
  .mo-scroll { max-height: none; overflow: visible; }
  details.how { display: none; }
}
@media (max-width: 720px) {
  .table-wrap > .table.tight { min-width: 640px; }
  .table.tight td:first-child, .table.tight th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 132px; }
  .table.tight tr.grp td:first-child, .table.tight tfoot td:first-child { background: var(--zebra); }
  .table.tight tr.mo-total td:first-child { background: var(--gold-soft); }
  .table.tight thead th:first-child { z-index: 2; background: var(--bg-2); }
}
.metal-card { display: grid; gap: 4px; align-content: start; }
.mc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mc-l { font-size: 13.5px; color: var(--warn); font-weight: 700; }
.metal-card.over .mc-l { color: var(--bad); }
.mc-v { font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.mc-v small { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.mc-sub { font-size: 13.5px; color: var(--ink-2); }
.mc-b { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.mc-a { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--zebra); font-size: 14px; min-height: 36px; }
.mchip .btn { min-height: 28px; padding: 2px 10px; font-size: 13px; }
.mchip .mdot { margin-right: 0; }
.recent { display: grid; }
.recent-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.recent-row:last-child { border-bottom: 0; }
.recent-t { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 14px; }
.recent-m { font-weight: 600; min-width: 0; }
.recent-m small { display: block; font-weight: 500; color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-v small { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.kpi.hero .kpi-v small { color: rgba(255,255,255,.8); }
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.jump a:hover { color: var(--brand); border-color: var(--line-2); }
body.has-appnav .savebar { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.savebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); }
[id] { scroll-margin-top: 72px; }
.bill-end { display: contents; }
.bill-foot { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.bf-bar { position: sticky; bottom: 0; z-index: 3; background: var(--card); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 10px 0 4px; box-shadow: 0 -10px 12px -12px rgba(74, 30, 12, .25); }
body.has-appnav .bf-bar { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.bf-total { display: grid; min-width: 0; }
.bf-total .muted { font-size: 13.5px; }
.bf-total .amount { line-height: 1.1; }
#billRo { grid-column: 1 / -1; line-height: 1.3; }
#billRo:empty { display: none; }
@media (max-width: 560px) {
  .bf-bar { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bf-total { grid-template-columns: auto auto; justify-content: space-between; align-items: baseline; gap: 8px; }
  .bf-total .amount { font-size: 26px; }
  .bf-bar .btn.big { min-height: 52px; }
}
#billCard { gap: 10px; }
.line-ph { gap: 4px 8px; margin-top: 4px; }
.lp-slot .btn.small { min-height: 30px; padding: 3px 9px; font-size: 13px; }
.group-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 19px; font-weight: 800; margin: 14px 2px 0; padding-top: 14px; border-top: 1px solid var(--line-2); }
.group-h span { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.kpi-a { margin-top: 8px; }
.kpi-l .mdot { margin-right: 6px; }
.ref-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ref-h b { min-width: 0; padding-top: 6px; }
@media (min-width: 1360px) {
  .grid.buy { grid-template-columns: 320px minmax(0, 1fr) minmax(400px, .9fr); grid-template-rows: auto; grid-template-areas: "seller add bill"; }
  .grid.buy > #billCard { position: sticky; top: 72px; max-height: calc(100vh - 72px - var(--nav-h) - env(safe-area-inset-bottom) - 20px); overflow-y: auto; }
  .grid.buy > #billCard > * { flex-shrink: 0; }
  .grid.buy > #billCard > .bl { flex: 0 1 auto; min-height: 150px; overflow-y: auto; scrollbar-gutter: stable; }
  .grid.buy > #billCard .bill-end { display: grid; gap: 10px; background: var(--card); padding-bottom: 2px; }
  .grid.buy > #billCard .bf-bar, body.has-appnav .grid.buy > #billCard .bf-bar { position: static; box-shadow: none; grid-template-columns: minmax(0, 1fr); padding: 0; }
  .grid.buy > #billCard .bf-total { grid-template-columns: auto auto; justify-content: space-between; align-items: baseline; gap: 8px; }
}
.bl { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bl-wt { display: inline-block; margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.bl-wt b { color: var(--ink); font-weight: 700; }
#billCard > .card-head { flex-wrap: nowrap; align-items: flex-start; }
#billCard > .card-head h3 { flex: 1 1 auto; min-width: 0; }
#billCard > .card-head > .btn { flex: none; }
@media (max-width: 560px) { .bl-wt { display: block; margin-left: 0; } }
.bl-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: start; }
.bl-row:last-child { border-bottom: 0; }
.bl-row:nth-child(even) { background: var(--zebra); }
.bl-no { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-3); color: var(--ink-2); font-weight: 700; font-size: 13px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.bl-main { min-width: 0; display: grid; gap: 1px; }
.bl-t { font-weight: 700; line-height: 1.35; }
.bl-m { font-size: 14.5px; }
.bl-u { font-size: 13px; }
.bl-side { display: grid; justify-items: end; gap: 6px; }
.bl-amt { font-size: 17px; white-space: nowrap; }
.bl-del { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.livep.compact { gap: 6px; padding: 12px 14px; }
.livep.compact .lp-pgm > .faint:not(:has(.bad-t)), .livep.compact .lp-src .faint { display: none; }
.livep.compact .lp-pgm { font-size: 14.5px; gap: 2px 12px; }
.pay-i { display: block; white-space: nowrap; }
@media (max-width: 640px) {
  .table.bills-t thead { display: none; }
  .table.bills-t, .table.bills-t tbody { display: block; }
  .table.bills-t tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "no amt" "time st" "seller seller" "items items" "pay pay" "acts acts"; gap: 3px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.bills-t td { display: block; padding: 0; border: 0; }
  .table.bills-t .c-no { grid-area: no; } .table.bills-t .c-amt { grid-area: amt; font-size: 17px; }
  .table.bills-t .c-time { grid-area: time; color: var(--ink-3); font-size: 13.5px; } .table.bills-t .c-st { grid-area: st; justify-self: end; }
  .table.bills-t .c-seller { grid-area: seller; margin-top: 4px; } .table.bills-t .c-items { grid-area: items; color: var(--ink-2); }
  .table.bills-t .c-pay { grid-area: pay; color: var(--ink-2); } .table.bills-t .pay-i { display: inline-block; margin-right: 12px; }
  .table.bills-t .c-pay:empty { display: none; }
  .table.bills-t .c-acts { grid-area: acts; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; white-space: normal !important; }
}
@media (max-width: 640px) {
  .table.stack-m thead { display: none; }
  .table.stack-m, .table.stack-m tbody, .table.stack-m tr { display: block; }
  .table.stack-m tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table.stack-m td { display: block; padding: 3px 0; border: 0; text-align: right; white-space: normal; }
  .table.stack-m td::after { content: ''; display: block; clear: both; }
  .table.stack-m td[data-l]::before { content: attr(data-l); float: left; margin-right: 12px; color: var(--ink-3); font-size: 13px; font-weight: 600; text-align: left; }
  .table.stack-m td.m-title { text-align: left; padding-bottom: 6px; }
  .table.stack-m td.m-acts { padding-top: 8px; }
}
.stack > *, .sec > * { min-width: 0; }
@media (max-width: 600px) {
  .tb-l { width: 100%; }
  .range { width: 100%; min-width: 0; }
  .range .input { flex: 1 1 0; min-width: 0; width: auto; }
  .tb .input { max-width: 100%; }
}
@media (max-width: 480px) {
  .stepper { flex-wrap: wrap; row-gap: 6px; }
  .stepper-l { min-width: 0; font-size: 16px; padding: 0 4px; }
  .subnav { width: 100%; }
  .subnav button { flex: 1 1 auto; padding: 8px 6px; font-size: 14px; }
}
.wsb-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1100px) { .wsb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .wsb-grid { grid-template-columns: minmax(0, 1fr); } }
.wsb-card { border: 1px solid var(--line); border-top: 4px solid var(--line-2); border-radius: 12px; padding: 10px 12px 12px; display: grid; gap: 10px; background: var(--card); min-width: 0; }
.wsb-card.wide { grid-column: 1 / -1; }
.wsb-card.m-gold { border-top-color: #c99b37; background: linear-gradient(180deg, #fdf8ea 0, var(--card) 64px); }
.wsb-card.m-silver { border-top-color: #9ea8b2; background: linear-gradient(180deg, #f3f5f7 0, var(--card) 64px); }
.wsb-card.m-pgm { border-top-color: #2a5c8a; }
.wsb-card.m-base { border-top-color: #b4643a; }
.wsb-h { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.wsb-h > b { font-size: 16.5px; font-weight: 800; }
.wsb-ref { font-size: 13px; color: var(--ink-2); }
.wsb-ref b { font-size: 15px; color: var(--ink); }
.wsb-line { display: grid; gap: 6px; }
.wsb-lh { display: flex; align-items: baseline; gap: 2px 10px; flex-wrap: wrap; }
.wsb-ln { font-weight: 700; font-size: 14.5px; }
.wsb-lu { font-size: 12.5px; color: var(--ink-3); }
.wsb-cells { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
.wsb-c { display: grid; gap: 1px; align-content: start; text-align: left; padding: 6px 10px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; min-width: 0; }
button.wsb-c { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
button.wsb-c:hover { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
button.wsb-c:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.wsb-cl { font-size: 12.5px; color: var(--ink-2); line-height: 1.3; overflow-wrap: anywhere; }
.wsb-cl small { font-size: 11.5px; color: var(--ink-3); }
.wsb-c b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .wsb-cells { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 5px; }
  .wsb-c { padding: 5px 7px 6px; }
  .wsb-card { padding: 9px 10px 10px; }
  .wsb-c b { font-size: 15.5px; }
}
.mt-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.mt { display: grid; gap: 1px; align-content: start; text-align: left; padding: 7px 10px 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; min-width: 0; border-top-width: 3px; }
.mt.m-gold { border-top-color: #c99b37; } .mt.m-silver { border-top-color: #9ea8b2; } .mt.m-pd { border-top-color: #7a5230; } .mt.m-pt { border-top-color: #2a5c8a; } .mt.m-rh { border-top-color: #6b2d6e; }
.mt.m-copper { border-top-color: #b4643a; } .mt.m-brass { border-top-color: #b99a3c; } .mt.m-tin { border-top-color: #8a9096; }
.mt-n { font-weight: 700; font-size: 14px; }
.mt-v { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-v.multi { font-size: 15px; white-space: normal; display: flex; flex-wrap: wrap; gap: 0 10px; }
.mt-g { white-space: nowrap; }
.mt-g small { font-size: 11.5px; font-weight: 700; opacity: .7; }
.mt-s { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .mt-s { font-size: 10.8px; } }
.mt.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mt.on .mt-s { color: rgba(255, 255, 255, .8); }
.mt.paused:not(.on) .mt-v { color: var(--ink-3); text-decoration: line-through; }
.mt:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.tp-chips button { display: inline-grid; gap: 1px; justify-items: start; text-align: left; line-height: 1.25; }
.tp-v { font-size: 12.5px; font-weight: 500; opacity: .85; }
.tp-v b { font-size: 14px; font-weight: 800; }
.lf-est:empty { display: none; }
.ovr-box { align-items: start; }
.adj-row { display: flex; gap: 6px; align-items: stretch; }
.adj-row .input { flex: 1 1 auto; min-width: 0; }
.adj-row .chips { flex: none; flex-wrap: nowrap; }
.adj-row .chips button { min-height: 42px; }
.adj-sign { min-width: 44px; padding: 6px 10px; font-size: 19px; font-weight: 700; }
#adjField.own .input { border-color: #c99b37; background: var(--gold-soft); font-weight: 700; }
.input.auto { color: var(--ink-2); }
.lf-adj.own .input { border-color: #c99b37; background: var(--gold-soft); font-weight: 700; }
@media (max-width: 560px) { .lf-item-grid .lf-adj { grid-column: 1 / -1; } }
.lf-price-how { margin: 0; grid-column: 1 / -1; }
@media (min-width: 961px) { .ovr-box .field > label { display: flex; align-items: flex-end; flex-wrap: wrap; column-gap: 4px; min-height: 2.7em; line-height: 1.3; } }
#quote .row.nowrap > .stack { min-width: 0; flex: 1 1 auto; }
#quote .row.nowrap .faint, #quote .row.nowrap .small { overflow-wrap: anywhere; }
#quote .row.nowrap > .amount { flex: none; }

.lp-price, .amount, .kpi-v, .mc-v, .pf-v, .mo-v, .lk-v .num, .metal-card .big, .bl-amt, .wsb-c b, .mt-v, .stepper-l, .bf-total .amount, .calc-total .amount {
  font-family: var(--font-num);
  letter-spacing: -.01em;
}
.amount, .lp-price { font-weight: 700; }

.topbar { background: var(--grad-red); box-shadow: 0 2px 12px rgba(107, 7, 16, .28); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold-trim); pointer-events: none; }
.topbar .brand { font-weight: 800; letter-spacing: .005em; }
.topbar .brand .mark { box-shadow: 0 0 0 2px #f3cd63, 0 2px 8px rgba(60, 0, 4, .35); }
.topbar .chip-price { background: rgba(70, 0, 6, .3); border: 1px solid rgba(255, 220, 130, .55); color: #ffeab4; font-weight: 600; }
.topbar button { background: rgba(255, 255, 255, .15); }
.topbar button:hover { background: rgba(255, 255, 255, .26); }
.topbar .btn { background: var(--grad-gold); border-color: #e3bb55; color: #5c0a0e; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.topbar .btn:hover { filter: brightness(1.04); background: var(--grad-gold); }

.ph h1 { color: var(--brand-ink); font-weight: 800; letter-spacing: 0; }

.btn { border-color: var(--line-2); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--grad-red); border-color: #a50d16; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(107, 7, 16, .25); }
.btn.primary:hover { background: linear-gradient(180deg, #c4121c 0%, #960b14 100%); }
.btn.primary:disabled { background: #d9a3a3; border-color: #d9a3a3; box-shadow: none; opacity: 1; color: #fff7f2; }
.btn.gold { background: var(--grad-gold); border-color: #d6a63c; color: #5c0a0e; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.ghost { color: var(--brand); }
.btn:focus-visible, .chips button:focus-visible, .subnav button:focus-visible, .jump a:focus-visible { outline: 3px solid rgba(233, 187, 71, .75); outline-offset: 2px; }
.chips button { border-color: var(--line-2); }
.chips button:hover { border-color: var(--gold); }
.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: inset 0 -2px 0 rgba(60, 0, 4, .18); }
.chips button.on small, .chips button.on .faint { color: rgba(255, 240, 220, .85); }
.input:focus { border-color: var(--brand); outline: 3px solid var(--brand-ring); }
.subnav button.on { color: var(--brand-ink); box-shadow: 0 1px 3px rgba(74, 30, 12, .16), inset 0 -2px 0 var(--gold); }

.card { border-color: var(--line); }
.table th { color: var(--ink-2); background: var(--bg-2); }
.table tr.click:hover td { background: var(--hover); }
.badge { background: var(--bg-3); }
.badge.gold { background: var(--gold-soft); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-line); }
.badge.count { background: var(--brand); }

.kpi.hero, .pf-box.big, .mo-box.big { position: relative; overflow: hidden; background: linear-gradient(135deg, #c8121d 0%, #900a13 58%, #6b0710 100%); border-color: #8a0a13; color: #fff; }
.kpi.hero::before, .pf-box.big::before, .mo-box.big::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold-trim); }
.kpi.hero .kpi-v, .pf-box.big .pf-v, .mo-box.big .mo-v { color: #ffe08a; }
.kpi.hero .kpi-l, .kpi.hero .kpi-s, .pf-box.big .faint, .mo-box.big .faint { color: rgba(255, 238, 214, .86); }
.kpi.hero .kpi-v small { color: rgba(255, 238, 214, .8); }
.mo-box.big .pos, .mo-box.big .neg { color: #ffe08a; }

.livep { padding: 0 16px 12px; overflow: hidden; border: 1px solid var(--gold-line); border-left: 1px solid var(--gold-line); border-radius: 14px; background: linear-gradient(165deg, #fffaf0 0%, #ffffff 42%, #fff6df 100%); }
.livep > .lp-head { position: relative; margin: 0 -16px 6px; padding: 9px 16px 11px; background: var(--grad-red); color: #fff; }
.livep > .lp-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold-trim); }
.livep .lp-title { color: #fff; font-weight: 800; letter-spacing: .005em; }
.livep .lp-status { color: #ffe9b4; }
.livep .lp-status .dot.ok { background: #6ee39a; }
.livep.bad > .lp-head { background: linear-gradient(180deg, #5d1a16 0%, #3f100d 100%); }
.livep.warn > .lp-head { background: linear-gradient(180deg, #a3500a 0%, #7d3b06 100%); }
.livep.manual > .lp-head, .livep.wait > .lp-head { background: linear-gradient(180deg, #6d5246 0%, #4f3a31 100%); }
.livep.bad, .livep.warn, .livep.manual, .livep.wait { border-color: var(--line-2); background: var(--card); }
.lp-price { color: var(--brand-ink); letter-spacing: -.01em; }
.lp-unit { color: var(--ink-2); }
.src-badge.asso { background: var(--grad-gold); color: #5c0a0e; box-shadow: inset 0 0 0 1px #d6a63c; }
.src-badge.mts { background: var(--brand); }
.lp-pgm-t { color: var(--gold-ink); background: var(--gold-soft); }
.livep.compact { padding: 0 14px 12px; }
.livep.compact > .lp-head { padding: 8px 14px 10px; margin: 0 -14px 4px; }
.lp-main.two { gap: 6px 22px; align-items: flex-end; }
.lp-q { display: grid; justify-items: start; }
.lp-ql { font-size: 12.5px; font-weight: 800; line-height: 1.55; border-radius: 999px; padding: 0 9px; color: #fff; background: var(--grad-red); }
.lp-q + .lp-q { padding-left: 18px; border-left: 2px solid var(--gold-line); }
.lp-q.sell .lp-ql { background: linear-gradient(180deg, #7a0a13 0%, #4f040a 100%); }
.lp-main.two .lp-unit { padding-bottom: 8px; }
.livep.compact .lp-main.two { gap: 4px 16px; }
@media (max-width: 900px) { .topbar .chip-price .cp-sell { display: none; } }
.mb-gpair { display: grid; gap: 2px; margin-top: 6px; }
.mb-gq { display: flex; align-items: center; gap: 12px; }
.mb-gql { flex: none; min-width: 5.6em; text-align: center; font-size: 13px; font-weight: 800; line-height: 1.6; border-radius: 999px; padding: 0 10px; color: #5c0a0e; background: var(--grad-gold); }
.mb-gq.sell .mb-gql { color: #ffe9b5; background: rgba(255, 243, 214, .12); box-shadow: inset 0 0 0 1px rgba(255, 217, 138, .55); }
.mb-gpair .mb-gp { font-size: clamp(40px, 7vw, 64px); }
.mb-gold.compact .mb-gpair .mb-gp { font-size: clamp(34px, 5.5vw, 52px); }

.appnav { background: var(--grad-maroon); border-top: 0; box-shadow: 0 -6px 22px rgba(70, 8, 10, .25); -webkit-backdrop-filter: none; backdrop-filter: none; }
.appnav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold-trim); }
.appnav button { color: #f4dca8; }
@media (hover: hover) { .appnav button:hover { background: rgba(255, 228, 160, .12); color: #fff3d0; } }
.appnav button.on { background: var(--grad-gold); color: #5c0a0e; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 8px rgba(30, 0, 0, .3); }
.appnav button:focus-visible { outline: 3px solid #ffd76a; outline-offset: -3px; }
.appnav .badge.count { background: #ffd34d; color: #6b0710; box-shadow: 0 0 0 2px #6b0710; }
.appnav button.on .badge.count { background: var(--brand); color: #fff; box-shadow: 0 0 0 2px #f3cb62; }
.appnav .nv-gap::before { background: rgba(255, 220, 150, .28); }
.appnav .nv-dot { background: #ffd34d; box-shadow: 0 0 0 2px #6b0710; }
.nv-item .nv-ic { color: var(--brand); }
.nv-item.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.bottomnav { background: var(--grad-maroon); border-top: 0; box-shadow: 0 -6px 22px rgba(70, 8, 10, .25); }
.bottomnav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold-trim); }
.bottomnav button { color: #f4dca8; position: relative; }
.bottomnav button.on { color: #ffe08a; background: rgba(255, 228, 160, .12); }
.bottomnav button.on::after { content: ""; position: absolute; left: 22%; right: 22%; top: 2px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold-trim); }

.quote-box { background: linear-gradient(160deg, #fffaf0 0%, #fff 60%, #fff6df 100%); border-color: var(--gold-line); }
.quote-box .amount { color: var(--brand-ink); }
.quote-box.faint { background: var(--zebra); }
.quote-box .calc-seq { font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
#quote .row.nowrap > .stack { white-space: normal; }
@media (max-width: 600px) {
  #quote .row.nowrap { flex-wrap: wrap; row-gap: 4px; }
  #quote .row.nowrap > .stack { flex-basis: 100%; }
  #quote .row.nowrap > .amount { margin-left: auto; }
}
#billCard > .card-head h3, #billCard > h3 { color: var(--brand-ink); }
.bf-total .amount { color: var(--brand-ink); }
.bl-no { background: var(--gold-soft); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-line); }
.more-n { background: var(--gold-soft); color: var(--gold-ink); }

.ws-matrix th { white-space: nowrap; }
.ws-matrix td.ws-cell { white-space: nowrap; }
.ws-matrix td.ws-cell .res { display: inline-block; margin-left: 6px; font-size: 13px; min-width: 7.5em; text-align: left; }
@media (max-width: 720px) { .ws-matrix td.ws-cell .res { display: block; margin: 2px 0 0; } }

.login-wrap { background: radial-gradient(120% 90% at 50% 0%, #d4141f 0%, #a50c15 45%, #5c050b 100%); position: relative; }
.login-wrap::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 40% at 50% 8%, rgba(255, 214, 120, .22), transparent 70%); pointer-events: none; }
.login-pair { position: relative; }
.login-card { border: 0; box-shadow: 0 18px 50px rgba(40, 0, 4, .4); position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gold-trim); }
.login-card h2 { color: var(--brand-ink); font-weight: 800; }
.login-logo { box-shadow: 0 0 0 3px #f3cd63, 0 8px 22px rgba(107, 7, 16, .3); }

.lock-price { border-color: var(--gold); background: linear-gradient(160deg, #fffaf0 0%, #fff 60%, #fff6df 100%); }
.lk-v .num { color: var(--brand-ink); }
.mt.on { background: var(--brand); border-color: var(--brand); }
.pc-base { border-color: var(--gold-line); }

.topbar .tb-bell { position: relative; display: grid; place-items: center; width: 40px; height: 36px; padding: 0; }
.topbar .tb-bell svg { width: 21px; height: 21px; }
.tb-bell-n { position: absolute; top: -4px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--grad-gold); color: #5c0a0e; font-size: 12px; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px #a50d17; font-family: var(--font-num); }
.topbar .tb-punch { white-space: nowrap; }
.term-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: rgba(70, 0, 6, .32); border: 1px solid rgba(255, 220, 130, .5); color: #ffeab4; font-weight: 700; }
@media (max-width: 600px) { .topbar .tb-punch { padding: 6px 10px; } .term-tag { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; } }
.topbar .tb-shot { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; cursor: pointer; flex: none; }
.topbar .tb-shot.busy { opacity: .75; }
@media (hover: hover) and (pointer: fine) { .topbar .tb-shot { display: none; } }
@media not all and (hover: hover) and (pointer: fine) { .topbar:has(.tb-shot) { flex-wrap: wrap; row-gap: 6px; } }
@media (max-width: 600px) { .topbar .tb-shot { margin-left: auto; min-height: 40px; padding: 6px 14px; font-size: 15px; } }

.modal.pinpad-modal { width: min(380px, 100%); }
.pinpad-modal .modal-head h3 { width: 100%; text-align: center; font-size: 20px; }
.pinpad-modal .modal-foot { justify-content: center; }
.pinpad { display: grid; justify-items: center; gap: 10px; }
.pp-sub { margin: 0; color: var(--ink-2); text-align: center; font-weight: 600; }
.pp-dots { display: flex; gap: 16px; padding: 8px 0 2px; }
.pp-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold); background: transparent; transition: background .12s, transform .12s; }
.pp-dots i.on { background: var(--grad-gold); border-color: #b9821a; transform: scale(1.08); }
.pp-dots.shake { animation: pp-shake .38s; }
@keyframes pp-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pp-err { margin: 0; min-height: 22px; color: var(--bad); font-weight: 700; text-align: center; font-size: 15px; }
.pp-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; }
.pp-k { height: 64px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #fff 0%, #fff7e8 100%); font-size: 28px; font-weight: 700; font-family: var(--font-num); color: var(--brand-ink); cursor: pointer; box-shadow: 0 2px 0 var(--line-2); }
.pp-k:active { transform: translateY(2px); box-shadow: none; background: var(--gold-soft); }
.pp-k.fn { font-size: 17px; font-family: var(--font); color: var(--ink-2); }
.pp-k:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.pp-hint { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; text-align: center; }
.pp-busy .pp-keys { opacity: .5; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .pp-dots.shake { animation: none; } }
.modal-back.held .modal-foot .btn, .modal-back.held .modal-head .x { opacity: .5; cursor: wait; }
.modal:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.modal.punch-modal { width: min(420px, 100%); }
.punch-ok { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 6px 0 4px; }
.pk-ic { font-size: 44px; line-height: 1; }
.pk-name { font-size: 22px; font-weight: 800; }
.pk-what { color: var(--ink-2); font-weight: 600; }
.pk-time { font-family: var(--font-num); font-size: 56px; font-weight: 800; line-height: 1.05; color: var(--brand); letter-spacing: .02em; }
.punch-ok.out .pk-time { color: var(--gold-ink); }
.pk-sub { color: var(--ink-2); font-size: 15px; }
.punch-ok .note { margin-top: 8px; }

#ntPops { position: fixed; top: 70px; right: 14px; z-index: 85; display: grid; gap: 10px; width: min(380px, calc(100vw - 28px)); }
.nt-pop { background: var(--card); border: 1px solid var(--gold-line); border-left: 6px solid var(--brand); border-radius: 14px; box-shadow: 0 14px 36px rgba(74, 12, 8, .28); padding: 10px 12px 12px 14px; cursor: pointer; animation: nt-in .22s ease-out; }
.nt-pop.k-lock_checked, .nt-pop.k-lock_paid, .nt-pop.k-lock_batch_paid { border-left-color: var(--ok); }
.nt-pop.k-lock_price, .nt-pop.k-lock_due, .nt-pop.k-lock_advance { border-left-color: var(--gold); }
.nt-pop.k-lock_cancelled, .nt-pop.k-lock_unpaid { border-left-color: var(--ink-3); }
.nt-pop.k-alert { border-left-color: var(--bad); }
.nt-pop-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.nt-pop-h b { font-size: 16px; line-height: 1.3; color: var(--brand-ink); }
.nt-pop-h button { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 0 2px; }
.nt-pop-b { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
@keyframes nt-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nt-pop { animation: none; } }
@media (max-width: 600px) { #ntPops { top: auto; bottom: calc(var(--nav-h, 0px) + env(safe-area-inset-bottom) + 12px); } body.has-bottomnav #ntPops { bottom: 84px; } }
.nt-list { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: min(62vh, 560px); overflow-y: auto; }
.nt-i { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.nt-i:last-child { border-bottom: 0; }
.nt-i.new { background: var(--gold-soft); }
.nt-t { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.nt-t b { color: var(--brand-ink); }
.nt-b { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }

.steps-ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.line-code { display: grid; justify-items: center; gap: 4px; padding: 14px; border-radius: 14px; background: #06c755; color: #fff; text-align: center; }
.line-code b { font-family: var(--font-num); font-size: 40px; letter-spacing: .18em; line-height: 1.1; }
.line-code .faint { color: rgba(255, 255, 255, .85); }
.input.secret:not(:placeholder-shown) { -webkit-text-security: disc; letter-spacing: .08em; }
.line-check .nt-i { display: grid; gap: 2px; padding: 10px 12px; }
.lk-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: stretch; gap: 0; }
.lk-pick { display: grid; place-items: center; border: 1px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--zebra); cursor: pointer; }
.lk-pick input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.lk-row > .item { border-radius: 0 12px 12px 0; }
.lk-row.picked .lk-pick { background: var(--gold-soft); border-color: var(--gold-line); }
#pickBar { position: sticky; top: calc(var(--tb-h, 56px) + 8px); z-index: 4; }
.pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); box-shadow: var(--shadow); }
.note.gold-note { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-ink); }
.lav-head { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.lav-head .btn { margin-left: auto; }
.lav-list { display: grid; gap: 6px; max-height: min(44vh, 420px); overflow: auto; padding: 2px; }
.lav-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: "c m d" "c m p"; align-items: center; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.lav-row input { grid-area: c; align-self: center; width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.lav-row.on { background: var(--gold-soft); border-color: var(--gold-line); }
.lav-m { grid-area: m; display: grid; gap: 2px; min-width: 0; }
.lav-m small { color: var(--ink-2); }
.lav-d { grid-area: d; display: grid; justify-items: end; font-family: var(--font-num); font-weight: 700; white-space: nowrap; }
.lav-d small { font-family: var(--font); font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.lav-p { grid-area: p; justify-self: end; font-family: var(--font-num); font-weight: 800; color: var(--brand-ink); white-space: nowrap; }
.lav-p:empty { display: none; }
.lav-sum { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 10px 12px; border-radius: 12px; background: var(--zebra); border: 1px solid var(--line); }
.lav-sum .lav-tot { font-family: var(--font-num); font-size: 20px; color: var(--brand-ink); }
.lav-sum .lav-over, .lav-sum .lav-how { flex-basis: 100%; margin: 0; }
@media (max-width: 600px) {
  .lav-row { grid-template-areas: "c m m" "c d p"; align-items: end; }
  .lav-d { justify-items: start; }
}
.clock-card { display: grid; justify-items: center; gap: 6px; padding: 22px 16px 18px; border-radius: 18px; background: var(--grad-maroon); color: #fff3d6; box-shadow: 0 10px 30px rgba(90, 5, 11, .3); position: relative; overflow: hidden; }
.clock-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gold-trim); }
.cc-date { font-weight: 600; color: #ffd98a; }
.cc-time { font-family: var(--font-num); font-size: clamp(44px, 9vw, 72px); font-weight: 800; letter-spacing: .03em; line-height: 1.05; color: #fff; }
.clock-card .cc-btn { margin-top: 6px; min-width: min(360px, 100%); min-height: 64px; font-size: 21px; background: var(--grad-gold); color: #5c0a0e; border: 1px solid #e3bb55; font-weight: 800; box-shadow: 0 4px 0 #8a5c0c, inset 0 1px 0 rgba(255, 255, 255, .55); }
.clock-card .cc-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a5c0c; }
.cc-sub { color: #ffd98a; font-size: 14px; }
.att-today { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.att-today li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.att-today li:last-child { border-bottom: 0; }
.att-today li.out { color: var(--ink-2); }
.att-today li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  .att-today li { grid-template-columns: 14px auto minmax(0, 1fr); row-gap: 2px; }
  .att-today li b { grid-column: 2 / -1; white-space: normal; }
  .att-today li .num:not(.faint) { grid-column: 2; }
  .att-today li .num.faint { grid-column: 3; justify-self: end; }
  .att-today li .dot { grid-row: 1; }
}
tr.holiday td { background: var(--gold-soft); }
.mb { display: grid; gap: 16px; }
.mb-gold { position: relative; display: grid; gap: 8px; border-radius: 18px; padding: 18px 20px 18px; color: #fff3d6; overflow: hidden;
  background: radial-gradient(130% 150% at 0% 0%, #95101b 0%, #6d0811 48%, #48040a 100%); box-shadow: 0 14px 34px rgba(90, 5, 11, .32); }
.mb-gold::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gold-trim); }
.mb-gold.dim .mb-gp { opacity: .55; }
.mb-gmain { display: grid; justify-items: start; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; }
button.mb-gmain { cursor: pointer; }
button.mb-gmain:focus-visible { outline: 3px solid #f3cd63; outline-offset: 4px; border-radius: 8px; }
.mb-gname { font-weight: 700; font-size: 17px; color: #ffd98a; }
.mb-gp { font-family: var(--font-num); font-size: clamp(54px, 11vw, 92px); font-weight: 800; line-height: 1.02; letter-spacing: .01em;
  background: linear-gradient(180deg, #fff8d9 0%, #f8dc84 42%, #d9a338 72%, #fde7a3 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(50, 0, 4, .4)); }
.mb-gp.flash-up, .mb-gp.flash-down { animation: mb-flash 1.4s ease-out; }
@keyframes mb-flash { 0% { filter: drop-shadow(0 0 14px rgba(255, 230, 150, .95)); } 100% { filter: drop-shadow(0 2px 0 rgba(50, 0, 4, .4)); } }
.mb-gu { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #ffe9b5; }
.mb-delta { font-family: var(--font-num); font-weight: 800; font-size: 16px; }
.mb-delta.up { color: #9af3b9; }
.mb-delta.down { color: #ffb8ad; }
.mb-gmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: #ffe2a8; }
.mb-gmeta .dot { margin-right: 6px; }
.mb-gst { white-space: nowrap; }
.mb-glock { color: #fff3d6; }
.mb-gold-rows { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255, 217, 138, .28); }
.mb-gl { display: grid; gap: 6px; align-content: start; }
.mb-glh { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.mb-glh b { color: #fff; font-size: 16px; }
.mb-glh span { color: #ffd98a; font-size: 13px; }
.mb-gc { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mb-chip.mb-toggle { justify-content: center; font-weight: 700; color: #ffd98a; border-style: dashed; }
.mb-grp .mb-row > .mb-t:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mb-chip { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; padding: 7px 10px; border-radius: 10px; text-align: left; font: inherit;
  background: rgba(255, 243, 214, .08); border: 1px solid rgba(255, 217, 138, .32); color: #fff3d6; }
button.mb-chip { cursor: pointer; }
button.mb-chip:hover { background: rgba(255, 217, 138, .22); border-color: #f3cd63; }
button.mb-chip:focus-visible { outline: 3px solid #f3cd63; outline-offset: 1px; }
.mb-chip span { font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
.mb-chip small { color: #ffd98a; font-size: 12px; }
.mb-chip b { font-family: var(--font-num); font-size: 18px; color: #fff; white-space: nowrap; }
.mb-chip.top { background: rgba(255, 217, 138, .18); border-color: #e8bf55; }
.mb-chip.wide { grid-column: 1 / -1; background: rgba(255, 217, 138, .14); border-color: #e8bf55; }
.mb-pause { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); vertical-align: 2px; }
.mb-gold .mb-pause { background: rgba(255, 255, 255, .2); color: #fff; }

.mb-grp { display: grid; gap: 8px; }
.mb-gt { font-size: 15px; font-weight: 800; color: var(--ink-2); margin: 0 2px; }
.mb-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.mb-t { --mc: #8796a6; --mc-ink: #2e3d4d; --mc-bg: #eef2f6; --mc-line: #d6dee6;
  position: relative; display: grid; gap: 2px; align-content: start; min-width: 0; padding: 12px 14px 13px 20px; border-radius: 14px; text-align: left; font: inherit; color: var(--ink);
  border: 1px solid var(--mc-line); background: linear-gradient(180deg, var(--mc-bg) 0%, #fff 78%); box-shadow: var(--shadow); overflow: hidden; }
.mb-t::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--mc); }
button.mb-t { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
button.mb-t:hover { border-color: var(--mc); box-shadow: 0 0 0 3px var(--mc-line); }
button.mb-t:focus-visible { outline: 3px solid var(--mc); outline-offset: 2px; }
.mb-n { font-weight: 800; font-size: 15.5px; color: var(--mc-ink); }
.mb-v { font-family: var(--font-num); font-size: clamp(32px, 5vw, 42px); font-weight: 800; line-height: 1.08; color: var(--mc-ink); }
.mb-u { font-size: 13px; color: var(--ink-3); }
.mb-x { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.mb-x b { color: var(--mc-ink); font-family: var(--font-num); }
.mb-t.pair { padding-bottom: 12px; }
.mb-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 2px; }
.mb-pv { display: grid; text-align: left; min-width: 0; padding: 6px 9px 7px; border-radius: 10px; border: 1px solid var(--mc-line); background: #fff; font: inherit; color: inherit; }
button.mb-pv { cursor: pointer; }
button.mb-pv:hover { border-color: var(--mc); }
.mb-pv small { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.mb-pv b { font-family: var(--font-num); font-size: clamp(22px, 3.4vw, 28px); color: var(--mc-ink); line-height: 1.1; }
.mb-t.m-silver { --mc: #8796a6; --mc-ink: #2e3d4d; --mc-bg: #eef2f6; --mc-line: #d5dde5; }
.mb-t.m-silver2 { --mc: #5b7b9c; --mc-ink: #233f5c; --mc-bg: #eaf1f8; --mc-line: #ccdbea; }
.mb-t.m-pd { --mc: #8a5a33; --mc-ink: #5a3517; --mc-bg: #f8f0e7; --mc-line: #ead8c5; }
.mb-t.m-pt { --mc: #2a5c8a; --mc-ink: #163f66; --mc-bg: #eaf1f9; --mc-line: #c8d9eb; }
.mb-t.m-rh { --mc: #6b2d6e; --mc-ink: #4c1650; --mc-bg: #f6edf6; --mc-line: #e3cde4; }
.mb-t.m-copper { --mc: #b4582a; --mc-ink: #7a3412; --mc-bg: #fcf0e8; --mc-line: #f0d4c2; }
.mb-t.m-brass { --mc: #a8861c; --mc-ink: #664f05; --mc-bg: #fbf5df; --mc-line: #ecdfae; }
.mb-t.m-tin { --mc: #4f7782; --mc-ink: #2b4f58; --mc-bg: #ecf4f5; --mc-line: #cde0e3; }
.mb.compact .mb-row { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.mb.compact .mb-gold { grid-column: span 2; padding: 14px 16px; gap: 6px; border-radius: 14px; }
.mb.compact .mb-gp { font-size: clamp(42px, 5vw, 60px); }
.mb.compact .mb-gname { font-size: 15px; }
.mb.compact .mb-v { font-size: clamp(26px, 2.6vw, 32px); }
.mb.compact .mb-t { padding: 10px 12px 11px 18px; }
.mb.compact .mb-pv b { font-size: 22px; }
.wsb2.folded .sec-h { margin-bottom: 0; }
.home2-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.home2-h h2 { font-size: 22px; color: var(--brand-ink); }
.home2-h p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
@media (max-width: 600px) {
  .mb-gold { padding: 16px 14px; border-radius: 16px; }
  .mb-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mb-grp.g-base .mb-row, .mb-grp.g-silver .mb-row { grid-template-columns: minmax(0, 1fr); }
  .mb-t { padding: 10px 10px 11px 16px; }
  .mb-v { font-size: 28px; }
  .mb-gold-rows { grid-template-columns: minmax(0, 1fr); }
  .mb-gc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mb.compact .mb-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .mb-gp.flash-up, .mb-gp.flash-down { animation: none; } }
.badge.line-b { background: #06c755; color: #fff; }
.pin-show { display: grid; justify-items: center; gap: 4px; padding: 14px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--gold-line); text-align: center; }
.pin-show b { font-family: var(--font-num); font-size: 44px; letter-spacing: .25em; color: var(--brand-ink); line-height: 1.1; }
details.howto summary { cursor: pointer; font-weight: 700; color: var(--brand-ink); }
details.howto[open] summary { margin-bottom: 8px; }
.sw { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 4px 2px 0; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--bad); border-radius: 999px; }
.sw-t { position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px; background: #d8c7ae; box-shadow: inset 0 1px 2px rgba(74, 30, 12, .18); transition: background .15s; }
.sw-t::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(74, 30, 12, .35); transition: transform .15s; }
.sw[aria-checked="true"] { color: var(--ok); }
.sw[aria-checked="true"] .sw-t { background: var(--ok); }
.sw[aria-checked="true"] .sw-t::after { transform: translateX(20px); }
.sw:focus-visible { outline: none; }
.sw:focus-visible .sw-t { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.sw:disabled { opacity: .55; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .sw-t, .sw-t::after { transition: none; } }
.mo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; }
.mo-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 4px 8px 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.mo-t.off { background: var(--zebra); border-style: dashed; }
.mo-n { display: inline-flex; align-items: center; font-weight: 700; min-width: 0; }
.mo-t.off .mo-n { color: var(--ink-3); }
.adv-list { display: grid; gap: 10px; }
.adv-req { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px 18px; padding: 12px 14px; border: 1px solid var(--gold-line); border-left: 5px solid var(--gold); border-radius: 12px; background: var(--gold-soft); }
.adv-req .ar-who { display: grid; gap: 2px; min-width: 0; }
.adv-req .ar-who > span { font-size: 13.5px; }
.adv-req .ar-amt { font-family: var(--font-num); font-size: 26px; font-weight: 800; color: var(--brand-ink); white-space: nowrap; }
.adv-req .ar-amt small { font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.adv-req .ar-bal { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.adv-req .ar-act { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 760px) {
  .adv-req { grid-template-columns: minmax(0, 1fr) auto; }
  .adv-req .ar-bal { grid-column: 1; }
  .adv-req .ar-act { grid-column: 1 / -1; }
  .adv-req .ar-act .btn { flex: 1; }
}
.pr-box { display: grid; border: 1px solid var(--line); border-radius: 12px; background: var(--zebra); padding: 4px 14px; }
.pr-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.pr-line:last-child { border-bottom: 0; }
.pr-line > span { display: grid; gap: 1px; }
.pr-line small { color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.pr-line b { font-family: var(--font-num); font-size: 17px; }
.pr-line.neg b { color: var(--bad); }
.pr-line.sum { border-bottom-style: solid; }
.pr-line.sum > span { font-weight: 700; }
.pr-line.total { padding: 12px 0 10px; }
.pr-line.total > span { font-weight: 800; font-size: 17px; color: var(--brand-ink); }
.pr-line.total b { font-size: 26px; color: var(--brand-ink); }
.adv-cap { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.adv-cap b { font-family: var(--font-num); font-size: 22px; color: var(--brand-ink); }
.pay-card .cc-date { opacity: .9; }
.adv-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.adv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.adv-row:last-child { border-bottom: 0; }
.adv-row .ar-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adv-row .ar-main b { font-family: var(--font-num); font-size: 19px; }
.adv-row .ar-main small { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink-3); }
.adv-row .ar-sub { grid-column: 1; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13.5px; }
.adv-row .btn { grid-column: 2; grid-row: 1 / span 2; }
.adv-row.off .ar-main b { color: var(--ink-3); text-decoration: line-through; }
.table tr.tr-off td { color: var(--ink-3); }
.table tr.tr-off td b { color: var(--ink-2); }
.rate-fix { display: grid; gap: 8px; }
.rate-fix .check { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--gold-line); border-radius: 10px; background: var(--gold-soft); line-height: 1.45; }
.rate-fix .check input { flex: none; margin-top: 2px; }
.rate-fix .check:has(input:checked) { border-color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-ink); }
.badge.dup { background: var(--bad); color: #fff; font-weight: 700; }
.badge.dup-src { background: #fff3cf; color: #7a4b00; border: 1px solid #f0c75e; }
.dup-note { font-size: 12.5px; font-weight: 600; color: var(--bad); }
.table tr.lock-dup td { background: #fde7e4; }
.table tr.lock-dup td:first-child { box-shadow: inset 5px 0 0 var(--bad); }
.table tr.lock-dup-src td { background: #fff8e1; }
.table tr.lock-dup-src td:first-child { box-shadow: inset 5px 0 0 #e0a800; }
.item.lock-dup { background: #fde7e4; border-color: #f1bdb7; border-left: 5px solid var(--bad); }
.mc-dup { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--bad); }
.nt-pop.k-lock_dup { border-left-color: var(--bad); background: #fff4f2; }
.nt-pop.k-lock_dup .nt-pop-h b { color: var(--bad); }
.nt-i.k-lock_dup { box-shadow: inset 5px 0 0 var(--bad); }
.nt-i.k-lock_dup .nt-t b { color: var(--bad); }
@media (max-width: 720px) {
  .table.stack-m tr.lock-dup { background: #fde7e4; box-shadow: inset 5px 0 0 var(--bad); }
  .table.stack-m tr.lock-dup-src { background: #fff8e1; box-shadow: inset 5px 0 0 #e0a800; }
}
.dup-acts { display: grid; gap: 6px; justify-items: stretch; }

.backdate { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.backdate.on { border-style: solid; border-color: var(--warn); background: var(--warn-soft); }
.backdate .input { width: auto; min-width: 210px; }
.backdate .faint { flex-basis: 100%; }

.rf-card { align-content: start; }
.rf-card .rf-bal { font-size: 15px; }
.rf-card.rf-shop { border-left-color: var(--brand); }
.rf-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; gap: 24px; }
.rf-sum .pl { max-width: none; }
.pl-h { margin: 0 0 4px; font-size: 16px; }
.rf-lots td { vertical-align: top; }
.rf-kinds td { vertical-align: middle; }
.rf-dedgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.rf-dedgrid label { display: grid; grid-template-columns: minmax(0, 1fr) 82px auto; align-items: center; gap: 6px; }
.rf-dedgrid .input { padding: 6px 8px; }

.rf-agtop { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin-bottom: 12px; }
.rf-agc { display: grid; gap: 2px; align-content: start; border: 1px solid var(--line); border-left: 5px solid #9aa3ad; border-radius: 10px; padding: 9px 12px; background: var(--card); }
.rf-agc b { font-size: 17px; }
.rf-mh { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 16px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.rf-mh:first-child { margin-top: 0; }
.rf-mh .mdot { margin-right: 0; }

.ik-chips button { display: inline-flex; align-items: center; gap: 8px; }
.ik-n { font-size: 12.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chips button.on .ik-n { color: rgba(255, 240, 220, .88); }
.ik-sides { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.ik-side { --side: var(--ink); --side-soft: var(--zebra); --side-line: var(--line); border: 1px solid var(--side-line); border-radius: 12px; overflow: hidden; background: var(--card); container-type: inline-size; }
.ik-side.retail { --side: #2c4a7a; --side-soft: #eef2f9; --side-line: #d3deee; }
.ik-side.ws { --side: #6f4a08; --side-soft: var(--gold-soft); --side-line: var(--gold-line); }
.ik-side.pend { --side: var(--brand-ink); --side-soft: var(--bg-2); --side-line: var(--line-2); }
.ik-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; padding: 10px 14px; background: var(--side-soft); border-bottom: 1px solid var(--side-line); }
.ik-side.none .ik-head { border-bottom: 0; }
.ik-tag { font-size: 16px; font-weight: 800; color: var(--side); }
.ik-hn { font-size: 13.5px; color: var(--ink-2); }
.ik-ht { margin-left: auto; font-family: var(--font-num); font-size: 19px; font-weight: 800; color: var(--side); white-space: nowrap; }
.ik-ht small, .ik-ft small { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.ik-cols { display: none; }
.ik-list { list-style: none; margin: 0; padding: 0; }
.ik-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name amt" "w w"; gap: 1px 12px; align-items: baseline; padding: 9px 14px 10px 12px; border-left: 4px solid var(--m, var(--line-2)); border-bottom: 1px solid var(--line); }
.ik-row:last-child { border-bottom: 0; }
.ik-name { grid-area: name; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.ik-name b { font-size: 15px; font-weight: 700; }
.ik-name small { font-size: 13px; color: var(--ink-3); }
.ik-w { grid-area: w; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; }
.ik-w b { font-family: var(--font-num); font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.ik-w small { font-size: 13px; color: var(--ink-2); }
.ik-amt { grid-area: amt; text-align: right; font-family: var(--font-num); font-size: 15.5px; font-weight: 700; white-space: nowrap; }
.ik-flag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.ik-flag.bad { background: var(--bad-soft); color: var(--bad); }
.ik-flag.warn { background: var(--warn-soft); color: var(--warn); }
@container (min-width: 430px) {
  .ik-cols { display: grid; grid-template-columns: minmax(0, 1fr) 9em 8.5em; gap: 12px; padding: 6px 14px 5px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line); }
  .ik-cols span + span { text-align: right; }
  .ik-row { grid-template-columns: minmax(0, 1fr) 9em 8.5em; grid-template-areas: "name w amt"; align-items: center; }
  .ik-name { flex-direction: column; align-items: flex-start; }
  .ik-w { flex-direction: column; align-items: flex-end; text-align: right; }
}
.ik-row.m-gold { --m: #c99b37; } .ik-row.m-silver { --m: #9ea8b2; } .ik-row.m-pd { --m: #7a5230; } .ik-row.m-pt { --m: #2a5c8a; }
.ik-row.m-rh { --m: #6b2d6e; } .ik-row.m-copper { --m: #b4643a; } .ik-row.m-brass { --m: #b99a3c; } .ik-row.m-tin { --m: #8a9096; }
.ik-none { margin: 0; padding: 18px 14px; text-align: center; color: var(--ink-2); background: var(--zebra); border: 1px dashed var(--line-2); border-radius: 12px; }
.ik-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 14px; padding-top: 10px; border-top: 2px solid var(--line-2); color: var(--ink-2); }
.ik-foot b { color: var(--ink); }
.ik-ft { margin-left: auto; font-family: var(--font-num); font-size: 20px; font-weight: 800; color: var(--brand-ink); white-space: nowrap; }
.ik-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14px; color: var(--ink-2); }
.ik-notes li { padding-left: 14px; position: relative; }
.ik-notes li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.grid.two.dash-two { align-items: start; }
.ik-mx { margin: 2px 0 4px; }
.ik-mx table { min-width: 440px; }
.ik-mx th[scope=row] { text-align: left; font-weight: 700; white-space: nowrap; }
.ik-mx thead .mx-r { color: #2c4a7a; }
.ik-mx thead .mx-w { color: #6f4a08; }
.ik-mx tbody tr, .ik-mx tfoot tr { cursor: pointer; }
.ik-mx td b { display: block; font-family: var(--font-num); font-size: 15.5px; font-weight: 700; }
.ik-mx td small { display: block; font-size: 12.5px; color: var(--ink-3); }
.ik-mx .mx-sum b { font-weight: 800; }
.ik-mx tfoot th, .ik-mx tfoot td { border-top: 2px solid var(--line-2); background: var(--zebra); }
.ik-mx tfoot td b { font-size: 16.5px; font-weight: 800; color: var(--brand-ink); }
.ik-mx tr.on th, .ik-mx tr.on td { background: var(--gold-soft); }
.ik-mx tr.on th[scope=row] { box-shadow: inset 4px 0 0 var(--brand); }
.ik-mx tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ik-scope { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.mo-buys td .faint { font-size: 12px; }
@media print {
  .ik-mx tr.on th, .ik-mx tr.on td { background: none; }
  .ik-mx tr.on th[scope=row] { box-shadow: none; }
}
@media print {
  .ik-chips button:not(.on) { display: none; }
  .ik-chips button.on { background: none; color: #000; border-color: #000; box-shadow: none; }
  .ik-chips button.on .ik-n { color: #000; }
  .ik-side, .ik-row { break-inside: avoid; }
}
.pcs-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.pcs-head label { margin: 0; }
.pcs-head .faint { font-size: 13.5px; }
.pcs { display: grid; gap: 8px; }
.pc-row { display: grid; grid-template-columns: 76px minmax(0, .85fr) minmax(0, 1fr) minmax(118px, auto) 46px 52px; gap: 8px; align-items: center; }
.pc-no { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.pc-fine { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.pc-fine b { color: var(--ink); font-size: 15px; }
.pcs-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 8px; }
.pcs-total { font-size: 14.5px; color: var(--ink-2); }
.pcs-total b { color: var(--ink); }
@media (max-width: 560px) {
  .pc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; grid-template-areas: "no fine cam del" "pct w w w"; row-gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
  .pc-no { grid-area: no; } .pc-fine { grid-area: fine; text-align: right; } .pc-p { grid-area: pct; } .pc-w { grid-area: w; } .pc-del { grid-area: del; justify-self: end; }
  .pc-row > .pc-cam { grid-area: cam; }
}
.btn.pc-cam { min-height: 38px; min-width: 40px; padding: 4px 6px; gap: 2px; font-size: 17px; line-height: 1; }
.btn.pc-cam b { font-size: 13px; }
.btn.pc-cam.has { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-ink); }
.btn.pc-cam.wide { font-size: 14px; padding: 5px 12px; gap: 6px; }
.pc-row > .pc-thumbs { grid-column: 2 / -1; }
.mix-row > .pc-thumbs { grid-column: 1 / -1; }
.pc-thumbs.thumbs.mini { margin: 0; }
.ck-one-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ck-one-ph .pc-thumbs { flex-basis: 100%; }
.dep-ph { display: grid; gap: 4px; }
.dep-ph-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.dep-ph-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-top: 1px dashed var(--line-2); }
.dep-ph-n { flex: 1 1 150px; font-weight: 600; font-size: 14.5px; }
.dep-ph-row .pc-thumbs { flex-basis: 100%; }
.item-ph { display: grid; gap: 6px; }
.item-ph-row { display: grid; gap: 2px; }
.kv dd .item-ph { justify-items: end; font-weight: 400; }
.kv dd .item-ph .thumbs.mini { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.kv dd .item-ph .thumbs.mini figure { width: 52px; }
@media (max-width: 560px) { .pc-row > .pc-thumbs { grid-column: 1 / -1; } }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px; }
.cmp-c { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.cmp-c .k { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.cmp-c b.num { font-size: 18px; color: var(--ink); }
.cmp-c > span:last-child { font-size: 13.5px; }
.cmp-c.gap { border-width: 2px; }
.cmp-c.gap.short { background: var(--warn-soft); border-color: #eab676; }
.cmp-c.gap.short .k, .cmp-c.gap.short b.num { color: #7a3f04; }
.cmp-c.gap.short > span:last-child { color: #6b3a06; font-size: 15px; font-weight: 600; }
.cmp-c.gap.short > span:last-child b { font-size: 18px; }
.cmp-c.gap.excess { background: var(--info-soft); border-color: #a9bff2; }
.cmp-c.gap.excess .k, .cmp-c.gap.excess b.num { color: #183b9c; }
.cmp-c.gap.ok { background: var(--ok-soft); border-color: #a9d7bc; }
.cmp-c.gap.ok .k, .cmp-c.gap.ok b.num { color: #0f4d2d; }
@media (max-width: 560px) {
  .cmp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cmp-c.gap { grid-column: 1 / -1; }
}
.pc-table .pc-rule { font-size: 12px; white-space: normal; }
.pc-table tr.pc-sum td { background: var(--bg-2); }
.dv-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; padding: 10px 14px;
  border: 1px solid #b9dfc9; border-left: 5px solid var(--ok); border-radius: 12px; background: var(--ok-soft); }
.dv-strip.owe { border-color: #f1d2cc; border-left-color: var(--bad); background: #fff6f4; }
.dv-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.dv-total > span:first-child { font-weight: 700; color: var(--ink-2); }
.dv-total b { font-size: 22px; color: var(--ok); }
.dv-strip.owe .dv-total b { color: var(--bad); }
.dv-since { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--ink-2); }
.dv-line { margin-top: 2px; }
.dv-opt { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; line-height: 1.45; }
.dv-opt input[type=radio] { flex: none; margin-top: 3px; }
.dv-opt:has(input[type=radio]:checked) { border-color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-ink); background: var(--brand-soft); }
.dv-opt input[type=date] { width: auto; height: auto; margin-top: 6px; max-width: 200px; }
.adj-odd { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--warn); }
.adj-odd-note { margin: 0; }
.lk-stamp { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 20px; padding: 12px 16px 12px 18px;
  border: 1px solid var(--gold-line); border-left: 7px solid var(--gold); border-radius: var(--radius); background: linear-gradient(120deg, var(--gold-soft) 0%, #fff 72%); }
.lk-st-main, .lk-st-cust { display: grid; gap: 2px; min-width: 0; }
.lk-st-k { font-size: 15px; font-weight: 700; color: var(--gold-ink); }
.lk-st-p { font-weight: 600; color: var(--ink-2); }
.lk-st-v { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; line-height: 1.02; }
.lk-st-v .num { font-family: var(--font-num); font-size: clamp(42px, 5.4vw, 60px); font-weight: 800; letter-spacing: -1px; color: var(--brand-ink); }
.lk-st-v small { font-size: 17px; font-weight: 700; color: var(--ink-2); }
.lk-st-cust { justify-items: end; text-align: right; padding-left: 16px; border-left: 1px dashed var(--gold-line); }
.lk-st-cust .lk-st-k { color: var(--ink-2); font-size: 13px; }
.lk-st-cust b.num { font-size: 19px; color: var(--ink); }
.lk-st-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.lk-st-cond { align-self: center; margin-left: 2px; padding: 3px 10px; border: 1px solid rgba(63, 75, 87, .22); border-radius: 999px; background: rgba(255, 255, 255, .78);
  font-size: 14px; font-weight: 700; line-height: 1.3; color: #3f4b57; white-space: nowrap; }
.lk-st-txt { font-size: 26px; font-weight: 800; line-height: 1.25; color: var(--brand-ink); }
.lk-stamp.m-silver, .lk-stamp.m-pt, .lk-stamp.m-pd, .lk-stamp.m-rh { border-color: #cfd6de; border-left-color: #7f8b97; background: linear-gradient(120deg, #eef2f6 0%, #fff 72%); }
.lk-stamp.m-silver .lk-st-k, .lk-stamp.m-pt .lk-st-k, .lk-stamp.m-pd .lk-st-k, .lk-stamp.m-rh .lk-st-k { color: #3f4b57; }
.lk-stamp.m-copper, .lk-stamp.m-brass, .lk-stamp.m-tin { border-left-color: #b4622d; background: linear-gradient(120deg, #fbefe6 0%, #fff 72%); }
@media (max-width: 640px) {
  .lk-stamp { grid-template-columns: minmax(0, 1fr); }
  .lk-st-cust { justify-items: start; text-align: left; padding: 8px 0 0; border-left: 0; border-top: 1px dashed var(--gold-line); }
}
.item .lk-li-px { margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.item .lk-li-px b { font-size: 18px; color: var(--brand-ink); }
:root { --dep: #0d6870; --dep-ink: #0a4f56; --dep-soft: #e6f3f4; --dep-line: #a8d2d6; --dep-ring: rgba(13, 104, 112, .2); }
.lf-kinds { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.lf-kind { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; text-align: left; cursor: pointer;
  border: 2px solid var(--line-2); border-radius: 12px; background: #fff; }
.lf-kind:hover { border-color: var(--gold); }
.lf-kind:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.lf-kbox { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--ink-3); border-radius: 7px; background: #fff; }
.lf-kind.on .lf-kbox::after { content: ''; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.lf-ktx { display: grid; gap: 1px; line-height: 1.25; }
.lf-ktx b { font-size: 17px; }
.lf-ktx small { font-size: 13px; color: var(--ink-2); }
.lf-kind.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-ring); }
.lf-kind.on .lf-kbox { background: var(--brand); border-color: var(--brand); }
.lf-kind[data-kind="deposit"].on { border-color: var(--dep); background: var(--dep-soft); box-shadow: 0 0 0 3px var(--dep-ring); }
.lf-kind[data-kind="deposit"].on .lf-kbox { background: var(--dep); border-color: var(--dep); }
@media (max-width: 480px) { .lf-kinds { grid-template-columns: minmax(0, 1fr); } }
.modal.lf-dep .modal-head { box-shadow: inset 0 -3px 0 var(--dep); }
.lf-dep-tag { font-size: 13px; font-weight: 700; color: var(--dep-ink); background: var(--dep-soft); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.lf-dep-amt { display: grid; gap: 2px; }
.lk-sep { margin-top: 4px; padding: 8px 2px 0; border-top: 1px dashed var(--dep-line); font-size: 14px; font-weight: 700; color: var(--dep-ink); }
.item.dep-item { border-left: 5px solid var(--dep); }
.item.dep-item.on { border-color: var(--dep); border-left-width: 5px; box-shadow: 0 0 0 2px var(--dep-ring); }
.item.dep-item.overdue { border-left-color: var(--bad); }
.item .lk-li-px.dep b { color: var(--dep-ink); }
.badge.dep-st { background: var(--dep-soft); color: var(--dep-ink); border: 1px solid var(--dep-line); }
.badge.dep-st.st-waiting { background: #fff4e0; color: #8a4b05; border-color: #f0cf96; }
.badge.dep-st.st-closed, .badge.dep-st.st-cancelled { background: var(--bg-2); color: var(--ink-3); border-color: var(--line-2); }
.badge.dep { background: var(--dep-soft); color: var(--dep-ink); }
.lk-stamp.dep-band { border-color: var(--dep-line); border-left-color: var(--dep); background: linear-gradient(120deg, var(--dep-soft) 0%, #fff 72%); }
.lk-stamp.dep-band .lk-st-k, .lk-stamp.dep-band .lk-st-v .num { color: var(--dep-ink); }
.lk-stamp.dep-band .lk-st-cust { border-left-color: var(--dep-line); }
.dep-wait { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.1; color: #8a4b05; }
.dep-bal tr.dep-done td { color: var(--ink-3); }
.dep-moves { display: grid; gap: 6px; }
.dep-mv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.dep-mv-k { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--dep-soft); color: var(--dep-ink); }
.dep-mv.k-return .dep-mv-k { background: var(--bg-2); color: var(--ink-2); }
.dep-mv-t { display: grid; gap: 2px; min-width: 0; }
.dep-mv.void { opacity: .62; }
.dep-mv.void .dep-mv-t > span:first-child { text-decoration: line-through; }
.dep-acts { gap: 8px; flex-wrap: wrap; }
.dep-all { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--dep-line); border-radius: 10px; background: var(--dep-soft); }
.dep-parts { display: grid; gap: 6px; }
.dep-part { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 200px); align-items: center; gap: 8px; }
.dep-part-n { display: grid; gap: 1px; }
.dep-part .input:disabled { background: var(--bg-2); color: var(--ink-2); }
.dep-q, .dep-q-l { display: grid; gap: 4px; }
.item .row.nowrap > .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .row.nowrap > .badge { flex: none; }
.dep-tots { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; padding: 10px 14px; border: 1px solid var(--dep-line); border-left: 5px solid var(--dep); border-radius: 12px; background: var(--dep-soft); }
.dep-tot { display: inline-flex; align-items: baseline; gap: 6px; }
.dep-tot b { font-size: 20px; color: var(--dep-ink); }
.cu-sec { margin: 0 0 8px; font-size: 17px; color: var(--dep-ink); }
.dep-card { border-left: 5px solid var(--dep); }
.dep-bal-big { font-size: 20px; color: var(--dep-ink); }
.tr-cats { display: grid; gap: 10px; }
.tr-cat { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-left: 5px solid var(--line-2); border-radius: 12px; background: #fff; }
.tr-cat.m-gold { border-left-color: var(--gold); }
.tr-cat.m-silver, .tr-cat.m-pt, .tr-cat.m-pd, .tr-cat.m-rh { border-left-color: #8f9aa6; }
.tr-cat.m-copper, .tr-cat.m-brass, .tr-cat.m-tin { border-left-color: #b4622d; }
.tr-cat-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.tr-cat-h b { font-size: 16px; }
.tr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 180px) auto; align-items: center; gap: 8px; }
.tr-row-n { display: grid; gap: 1px; }
@media (max-width: 520px) { .tr-row { grid-template-columns: minmax(0, 1fr) auto; } .tr-row-n { grid-column: 1 / -1; } }
.badge.tr-st.st-sent { background: #fff4e0; color: #8a4b05; border: 1px solid #f0cf96; }
.badge.tr-st.st-received { background: var(--ok-soft); color: #0f4d2d; border: 1px solid #a9d7bc; }
.badge.tr-st.st-cancelled { background: var(--bg-2); color: var(--ink-3); border: 1px solid var(--line-2); }
.tr-table tr.tr-due td { background: #fffaf0; }
.tr-acts { white-space: nowrap; }
.tr-acts .btn { margin: 2px 0 2px 4px; }
.tr-recv { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--zebra); }
.tr-recv > div { display: flex; justify-content: space-between; gap: 10px; }
.tr-recv b { font-size: 17px; }
.tr-range-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tr-d { display: flex; align-items: center; gap: 8px; flex: 1 1 230px; min-width: 0; margin: 0; font-weight: inherit; }
.tr-d > span { flex: none; min-width: 3.2em; }
.tr-d .input { width: auto; min-width: 0; flex: 1 1 auto; }
.tr-range .chips { margin-top: 6px; }
.tr-pickh { align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-pickh:empty { display: none; }
.tr-modal .tr-row { grid-template-columns: minmax(0, 1fr) minmax(130px, 200px); padding: 5px 6px; margin: 0 -6px; border-radius: 10px; }
.tr-modal .tr-row.on { background: var(--gold-soft); }
.tr-pick { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; min-width: 0; }
.tr-pick input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.tr-pick > span { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.tr-src { font-size: 12.5px; white-space: normal; }
.sc-opts { gap: 6px; }
.sc-opt { display: flex; align-items: flex-start; font-weight: 400; }
.sc-opt input { margin-top: 4px; flex: none; }
.sc-notes { margin: 0; padding-left: 1.2em; font-size: 14px; color: var(--ink-2); }
.sc-notes li + li { margin-top: 3px; }
.sc-items { border: 1px solid var(--line); border-radius: 12px; }
.sc-it { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: start; padding: 8px 12px; }
.sc-it + .sc-it { border-top: 1px solid var(--line); }
.sc-it > .num { display: grid; justify-items: end; white-space: nowrap; }
.sc-it .faint { font-size: 13px; }
@media (max-width: 520px) {
  .sc-it { grid-template-columns: minmax(0, 1fr) auto; }
  .sc-it > :first-child { grid-column: 1 / -1; }
  .sc-it > .num { justify-items: start; }
}
@media (max-width: 520px) {
  .tr-modal .tr-row { grid-template-columns: minmax(0, 1fr); }
  .tr-modal .tr-row .tr-row-n { grid-column: auto; }
}
.topbar .tb-guide { margin-left: auto; white-space: nowrap; padding: 6px 12px; }
.topbar .tb-guide + .who { margin-left: 0; }
@media (max-width: 560px) { .topbar .tb-guide-l { display: none; } .topbar .tb-guide { padding: 6px 10px; } }
@media (max-width: 600px) { .topbar:has(.tb-guide) .brand span:not(.mark) { display: none; } .topbar:has(.tb-guide) .who .name { max-width: 34vw; } }
.lk-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lk-mode button { justify-content: center; font-weight: 700; padding: 10px 8px; }
.dep-mode .lk-mode button[data-lkmode="dep"].on { background: var(--dep); border-color: var(--dep); color: #fff; box-shadow: 0 0 0 3px var(--dep-ring); }
.dep-mode { border-top: 4px solid var(--dep); }
.dep-mode #lockBtn { background: var(--dep); border-color: var(--dep); }
.dep-mode #lockBtn:disabled { opacity: .55; }
.dep-est { background: var(--dep-soft); border-color: var(--dep-line); }
.dep-est b { color: var(--dep-ink); }
.guide { gap: 14px; }
.guide .g-head h2 { font-size: 22px; }
.guide .g-head p { margin: 2px 0 10px; }
.g-toc button { white-space: nowrap; }
.g-sec { scroll-margin-top: calc(var(--tb-h, 56px) + 10px); }
.g-sec h3 { font-size: 19px; color: var(--brand-ink); }
.g-sec h4 { margin: 4px 0 0; font-size: 16px; }
.g-sec p { margin: 0; }
.g-steps { margin: 0; padding: 0; list-style: none; counter-reset: gs; display: grid; gap: 8px; }
.g-steps li { counter-increment: gs; position: relative; padding: 2px 0 2px 40px; min-height: 30px; line-height: 1.5; }
.g-steps li::before { content: counter(gs); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; }
.g-menu { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.g-menu dt { font-weight: 700; }
.g-menu dd { margin: 0; color: var(--ink-2); }
@media (max-width: 420px) { .g-menu { grid-template-columns: 1fr; gap: 2px; } .g-menu dd { margin-bottom: 6px; } }
.g-notes { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.g-tip { padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.g-act { gap: 10px; flex-wrap: wrap; }
.g-metals { display: grid; gap: 10px; }
.g-metal { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--zebra); }
.g-mh { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 4px; }
.g-mh .mdot { margin-right: 0; }
.g-prods { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.g-prods li { display: grid; grid-template-columns: minmax(130px, auto) minmax(0, 1fr); gap: 2px 10px; }
.g-prods li span { color: var(--ink-2); }
@media (max-width: 480px) { .g-prods li { grid-template-columns: 1fr; } .g-prods li span { padding-left: 2px; } }
.lav-kind { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.lav-kind.k-lock { background: var(--gold-soft); color: var(--gold-ink); border: 1px solid var(--gold-line); }
.lav-kind.k-dep { background: var(--dep-soft); color: var(--dep-ink); border: 1px solid var(--dep-line); }
.lav-row.lav-k-dep { border-left: 4px solid var(--dep); }
.lav-row.lav-k-lock { border-left: 4px solid var(--gold); }
.lav-head .lav-man { margin-left: auto; }
.lav-head .lav-man + .btn { margin-left: 0; }
.lav-in { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.lav-in .input { width: 120px; min-height: 36px; padding: 4px 8px; text-align: right; font-family: var(--font-num); font-weight: 700; }
.lav-groups { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--zebra); }
.lav-groups summary { cursor: pointer; padding: 2px 0; }
.lav-g { display: grid; gap: 2px; padding: 8px 0; border-top: 1px dashed var(--line-2); }
.lav-g:first-of-type { margin-top: 6px; }
.lav-g.void { opacity: .65; }
.lav-g-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.lav-g-h .num { font-family: var(--font-num); font-weight: 800; color: var(--brand-ink); }
.lav-g-h .btn { margin-left: auto; }
.badge.adv-g { background: #fff4d6; color: #7d5509; border: 1px solid var(--gold-line); font-weight: 700; }
.adv-note .small { margin-top: 4px; }
.adv-back { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; }
.adv-back-i { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
html.lang-zh { --font: "MK Myanmar", "MK Lao", "Sukhumvit Set", "Leelawadee UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans Thai", "Sarabun", "Thonburi", Tahoma, system-ui, -apple-system, sans-serif; }
.lang-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 5px 11px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; white-space: nowrap; flex: none; }
.lang-btn > span[aria-hidden] { font-size: 16px; line-height: 1; }
.lang-pop { position: fixed; z-index: 2147482000; max-height: calc(100vh - 80px); overflow: auto; min-width: 220px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 14px; background: #fff; color: #2b1813; border: 1px solid #ecd59a; box-shadow: 0 12px 36px rgba(60, 14, 6, .26); font-family: var(--font); }
.lang-pop-h { padding: 6px 10px 4px; font-size: 13px; color: #8a6d60; }
.lang-list { display: grid; gap: 2px; }
.lang-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 17px; line-height: 1.35; text-align: left; cursor: pointer; }
.lang-list button b { flex: 1; font-weight: 600; }
.lang-list button small { font-size: 12.5px; font-weight: 700; color: #8a6d60; }
.lang-list button:hover { background: #fbf3e4; }
.lang-list button.on { background: #fff1cc; box-shadow: inset 0 0 0 1px #ecd59a; }
.lang-list button.on b { font-weight: 800; }
.lang-list button.on::after { content: "✓"; font-weight: 800; color: #b00d17; }
.lang-list button:focus-visible { outline: 3px solid #f0b429; outline-offset: -3px; }
html.lang-my body { line-height: 1.6; }
.btn.block { white-space: normal; text-align: center; }
.bottomnav button { overflow-wrap: anywhere; }
html.lang-zh .mb-chip span, html.lang-zh .pc-line span { word-break: keep-all; overflow-wrap: normal; }
.topbar .lang-btn { background: rgba(255, 255, 255, .15); color: #fff; border: 1px solid rgba(255, 220, 130, .5); padding: 5px 10px; }
.topbar .lang-btn:hover { background: rgba(255, 255, 255, .26); }
.login-wrap { position: relative; grid-template-rows: auto 1fr; }
.login-wrap > .login-pair { grid-row: 2; }
.login-lang { justify-self: end; position: relative; z-index: 1; margin-bottom: 6px; }
.login-lang:empty { display: none; }
.login-lang .lang-btn { background: #fff; color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow); min-height: 42px; padding: 6px 14px; font-size: 15px; }
.login-lang .lang-btn:hover { background: var(--gold-soft); }
.lang-inline .lang-list button { border: 1px solid var(--line); background: var(--card); }
.lang-inline .lang-list button.on { background: var(--gold-soft); border-color: var(--gold-line, #ecd59a); box-shadow: none; }
@media (max-width: 400px) { .topbar .lang-btn .lang-btn-t { display: none; } .topbar .lang-btn { padding: 5px 8px; } }

.sign-modal .modal-body { display: grid; gap: 0; }
.sp-who { margin: 0 0 8px; font-weight: 700; font-size: 17px; }
.sp-wrap { position: relative; height: 230px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; touch-action: none; overflow: hidden; }
.sp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.sp-base { position: absolute; left: 7%; right: 7%; bottom: 25%; border-bottom: 1.5px dashed #cdbfa6; pointer-events: none; }
.sp-base span { position: absolute; left: 0; bottom: 3px; color: #b8a888; font-size: 17px; line-height: 1; }
.sp-clear { position: absolute; top: 8px; right: 8px; z-index: 1; }
.sp-hint { margin: 8px 0 0; }
@media (max-width: 560px) { .sp-wrap { height: 200px; } }
.sig-img { display: block; max-width: 100%; height: auto; max-height: 90px; object-fit: contain; }
.sig-show { border: 1px dashed var(--line-2); border-radius: 12px; background: #fff; padding: 10px; display: grid; place-items: center; min-height: 80px; }
.sig-show .sig-img { max-height: 110px; }
.sig-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px dashed var(--line-2); border-radius: 12px; padding: 8px 10px; background: #fffdf8; }
.sig-box.ok { border-style: solid; border-color: #b9dcc2; background: #f4fbf5; }
.sig-box.warn { border-color: #f0c36d; background: #fffaf0; }
.sig-box .sig-img { max-height: 46px; max-width: 160px; background: #fff; border-radius: 6px; }
.sig-box .sig-t { flex: 1 1 160px; min-width: 0; font-size: 14px; }
.sig-box .sig-t b { display: block; }
.sig-box .sig-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.sig-cell { display: flex; align-items: center; gap: 6px; }
.sig-cell .sig-img { max-height: 30px; max-width: 110px; }

.tp-t td { vertical-align: top; }
.tp-t tr.tp-out td { background: #fff7f5; }
.tp-t tr.tp-out td:not(:first-child):not(:last-child) { color: var(--ink-3); }
.tp-why { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; max-width: 240px; white-space: normal; }
.tp-adj { color: var(--warn); }
@media (max-width: 640px) {
  .table.tp-t thead { display: none; }
  .table.tp-t, .table.tp-t tbody { display: block; }
  .table.tp-t tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "no amt" "time st" "name name" "items items" "real real" "base vat" "acts acts"; gap: 3px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.tp-t td { display: block; padding: 0; border: 0; text-align: left; }
  .table.tp-t .c-no { grid-area: no; } .table.tp-t .c-amt { grid-area: amt; text-align: right; font-size: 16px; }
  .table.tp-t .c-time { grid-area: time; color: var(--ink-3); font-size: 13.5px; } .table.tp-t .c-st { grid-area: st; justify-self: end; text-align: right; }
  .table.tp-t .c-name { grid-area: name; margin-top: 4px; } .table.tp-t .c-items { grid-area: items; color: var(--ink-2); }
  .table.tp-t .c-real { grid-area: real; color: var(--ink-3); font-size: 13.5px; }
  .table.tp-t .c-base { grid-area: base; color: var(--ink-3); font-size: 13.5px; } .table.tp-t .c-vat { grid-area: vat; color: var(--ink-3); font-size: 13.5px; text-align: right; }
  .table.tp-t .c-real::before, .table.tp-t .c-base::before, .table.tp-t .c-vat::before { content: attr(data-l) " "; }
  .table.tp-t .c-acts { grid-area: acts; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; white-space: normal !important; }
  .table.tp-t .c-acts:empty { display: none; }
  .table.tp-t .tp-why { max-width: none; }
  .table.tp-t tr.tp-out { background: #fff7f5; }
  .table.tp-t tr.tp-out td { background: transparent; }
}

.cs-brs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 520px) { .cs-brs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .cs-br { padding: 9px 11px; } .cs-br-v { font-size: 17px; } .cs-br .badge { white-space: normal; } }
.cs-br { display: grid; gap: 2px; justify-items: start; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; cursor: pointer; box-shadow: var(--shadow); font: inherit; color: inherit; min-width: 0; }
.cs-br:hover { border-color: var(--line-2); }
.cs-br.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-ring); }
.cs-br-n { font-weight: 800; }
.cs-br-l { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.cs-br-v { font-family: var(--font-num); font-size: 21px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.cs-list { display: grid; }
.cs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 11px 2px; border-top: 1px solid var(--line); }
.cs-list > .cs-row:first-child { border-top: 0; }
.cs-t { min-width: 0; overflow-wrap: anywhere; }
.cs-a { font-family: var(--font-num); font-size: 17px; font-weight: 800; text-align: right; white-space: nowrap; }
.cs-b { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.cs-row.open .cs-a { color: var(--ink-2); }
.cs-row.total { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
@media (min-width: 720px) { .cs-row.total { padding-right: 1px; } }
.cs-row.total + .cs-row.total { margin-top: 6px; }
.cs-row.total .cs-a { font-size: 21px; color: var(--ink); }
.cs-row.void .cs-t b, .cs-row.void .cs-a { text-decoration: line-through; color: var(--ink-3); }
.cs-sub { padding: 0 0 12px; }
.cs-dead { margin-top: 14px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.cs-dead > .faint + .cs-row { border-top: 0; }
@media (min-width: 720px) {
  .cs-row { grid-template-columns: minmax(0, 1fr) 168px 176px; }
  .cs-a { grid-column: 2; }
  .cs-b { grid-column: 3; justify-content: flex-end; }
}
.cs-close { display: flex; gap: 10px 36px; flex-wrap: wrap; align-items: flex-end; }
.cs-big { font-family: var(--font-num); font-size: 32px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.cs-diff { font-size: 22px; font-weight: 800; }
.cs-diff.ok, .cs-d.ok { color: var(--ok); }
.cs-diff.bad, .cs-d.bad { color: var(--bad); }
.cs-diff.warn, .cs-d.warn { color: var(--warn); }
.card.cs-closed { border-left: 5px solid var(--ok); }
.card.cs-closed.bad { border-left-color: var(--bad); }
.card.cs-closed.warn { border-left-color: var(--warn); }
.cs-log { display: grid; gap: 10px; }
.cs-log-r { border-left: 3px solid var(--gold-line); padding: 1px 0 1px 10px; overflow-wrap: anywhere; }
.cs-cnt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.cs-cnt > div { display: grid; gap: 2px; min-width: 0; }
.cs-cnt .faint { font-size: 13px; }
.cs-cnt b { font-family: var(--font-num); font-size: 19px; white-space: nowrap; }
@media (max-width: 520px) { .cs-cnt { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-cnt > div:last-child { grid-column: 1 / -1; } .cs-cnt b { font-size: 17px; } }
.cs-den-h { font-weight: 800; font-size: 14px; color: var(--ink-2); margin: 2px 0 6px; }
.cs-den { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.cs-den-i { display: grid; grid-template-columns: 58px 12px minmax(70px, 1fr) 96px; align-items: center; gap: 6px; }
.cs-den-n { font-family: var(--font-num); font-weight: 800; text-align: right; }
.cs-den-i .input { min-height: 42px; padding: 6px 10px; font-family: var(--font-num); font-size: 17px; }
.cs-den-t { text-align: right; color: var(--ink-2); font-size: 14px; }
@media (max-width: 420px) { .cs-den-i { grid-template-columns: 52px 10px minmax(60px, 1fr) 84px; } }

.clock-card .cc-hist { min-width: min(360px, 100%); background: rgba(255, 255, 255, .08); color: #ffe7b0; border: 1px solid rgba(255, 231, 176, .45); font-weight: 700; }
.clock-card .cc-hist:hover { background: rgba(255, 255, 255, .15); }
@media (min-width: 601px) { .att-today li .num { text-align: right; } }

.fl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.fl-steps::before { content: ""; position: absolute; left: 19px; top: 22px; bottom: 22px; width: 2px; background: var(--line-2); }
.fl-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; scroll-margin-top: 76px; }
.fl-no { position: relative; z-index: 1; width: 40px; height: 40px; margin-top: 8px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-num); font-size: 19px; font-weight: 800; background: var(--card); color: var(--ink-2); border: 2px solid var(--line-2); }
.fl-step.todo .fl-no { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.fl-step.done .fl-no { background: var(--ok); border-color: var(--ok); color: #fff; }
.fl-step.over .fl-no { background: var(--bad); border-color: var(--bad); color: #fff; }
.fl-card { display: grid; gap: 9px; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow); }
.fl-step.todo .fl-card { border-color: var(--line-2); }
.fl-step.done .fl-card { background: #fffdf9; }
.fl-step.flash .fl-card { animation: cardFlash 2.4s ease-out; }
.fl-h { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.fl-h h2 { margin: 0; font-size: 19px; font-weight: 800; }
.fl-why { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.fl-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.fl-stat { display: grid; gap: 1px; padding: 8px 11px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.fl-stat span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.fl-stat b { font-family: var(--font-num); font-size: 18px; }
.fl-stat small { font-size: 12.5px; color: var(--ink-3); }
.fl-cats { display: grid; gap: 6px; }
.fl-cat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 10px; border-radius: 9px; background: var(--zebra); border: 1px solid var(--line); }
.fl-cn { font-weight: 700; min-width: 150px; }
.fl-cat > b { font-family: var(--font-num); font-size: 17px; }
.fl-kinds { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; }
.fl-kinds span { padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); border: 1px solid var(--gold-line); font-size: 13px; }
.fl-kinds span.loose { background: var(--warn-soft); border-color: #efc897; }
.fl-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fl-big { font-family: var(--font-num); font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.fl-big.warn { color: var(--brand-ink); }
.fl-eq { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; font-variant-numeric: tabular-nums; }
.fl-pends { display: grid; gap: 6px; }
.fl-pend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border-left: 4px solid #e2a54e; border-radius: 9px; background: var(--warn-soft); font-size: 14.5px; }
.fl-pm { flex: 1 1 220px; min-width: 0; }
.fl-pi { display: block; font-size: 13px; color: var(--ink-3); }
.fl-pb { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-led-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.fl-led-t th { padding: 7px 10px; text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 700; background: var(--card); border-bottom: 1px solid var(--line); white-space: nowrap; }
.fl-led-t th.num { text-align: right; }
.fl-led-t td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.fl-led-t tbody tr:first-child td { border-top: 0; }
.fl-led-t td.d { white-space: nowrap; color: var(--ink-2); font-size: 13px; }
.fl-led-t td.w { overflow-wrap: anywhere; }
.fl-led-t td.w .faint { font-size: 12.5px; }
.fl-led-t td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fl-led-t td.v { font-weight: 700; }
.fl-led-t td.v.up { color: var(--brand-ink); }
.fl-led-t td.v.down { color: var(--ok); }
.fl-led-t td.v.flat { color: var(--ink-3); font-weight: 500; }
.fl-led-t td.b { font-weight: 800; }
.fl-led-t tr.k-opening td { background: var(--zebra); }
.fl-where { font-size: 13px; color: var(--ink-3); margin-right: 4px; }
.fl-where b { color: var(--ink-2); }
.fl-ows { display: grid; gap: 5px; }
.fl-ow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 6px 10px; border-radius: 9px; background: var(--zebra); border: 1px solid var(--line); font-size: 14px; }
.fl-ow b { font-family: var(--font-num); font-size: 16px; }
.fl-own { font-weight: 700; min-width: 120px; }
.fl-side-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 15px; border-left: 4px solid var(--gold); }
.fl-side-card > div:first-child { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.fl-side-card h2 { margin: 0; font-size: 16px; font-weight: 800; }
.fl-side-card p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; align-items: start; }
.sec[id], .dl-ref { scroll-margin-top: calc(var(--tb-h, 56px) + 12px); }
.dl-ref { display: grid; gap: 10px; min-width: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-top: 4px solid var(--line-2); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.dl-ref.owe { border-top-color: var(--brand); }
.dl-ref.wait { border-top-color: #e2a54e; }
.dl-h { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.dl-name { font-size: 17px; }
.dl-l { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.dl-owe { display: grid; gap: 1px; padding: 9px 12px; border-radius: 10px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.dl-owe .dl-v { font-family: var(--font-num); font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: var(--brand-ink); }
.dl-owe .dl-s { font-size: 13px; color: var(--ink-3); }
.dl-owe.ok { background: var(--zebra); border-color: var(--line); }
.dl-owe.ok .dl-v { font-family: inherit; font-size: 15px; font-weight: 700; color: var(--ok); letter-spacing: 0; }
.dl-owe.over { background: #fff6f4; border-color: #f1d2cc; }
.dl-owe.over .dl-v { font-size: 22px; color: var(--bad); }
.dl-send { display: grid; gap: 6px; }
.dl-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.btn.dl-b { display: grid; gap: 1px; justify-content: stretch; justify-items: center; align-content: center; text-align: center; white-space: normal; padding: 8px 10px; min-height: 58px; }
.dl-b b { font-size: 14.5px; line-height: 1.25; }
.dl-b small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); line-height: 1.3; font-variant-numeric: tabular-nums; }
.dl-wait { display: grid; gap: 6px; }
.dl-wait .fl-pend { font-size: 14px; }
.dl-ag { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 10px; border-radius: 9px; background: var(--zebra); border: 1px solid var(--line); font-size: 14px; }
.dl-ag .mdot { margin-right: 6px; }
.dl-led { border-top: 1px dashed var(--line-2); padding-top: 8px; }
.dl-led summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.dl-led[open] summary { margin-bottom: 6px; }
.dl-led .table-wrap { max-height: 360px; overflow: auto; margin-top: 6px; }
.dl-more, .dl-note { margin: 0; font-size: 13px; }
.dl-opts { display: grid; gap: 8px; }
.dl-opt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; background: var(--card); }
.dl-opt.off { opacity: .55; border-left-color: var(--line-2); }
.dl-ot { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.dl-ot span { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.dl-ob { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-ha { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-btns.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ag-sec { display: grid; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ag-h { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; font-size: 15px; }
.ag-h .mdot { margin-right: 6px; }
.dl-owe.ag { background: #f2f4f6; border-color: #d5dbe1; }
.dl-owe.ag .dl-v { color: #27323d; }
.dl-owe.ag.ok { background: var(--zebra); border-color: var(--line); }
.dl-owe.ag.ok .dl-v { color: var(--ok); }
.ag-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: stretch; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #d5dbe1; border-left: 4px solid #9aa4ae; border-radius: 10px; background: #f6f7f9; }
.ag-tot { display: grid; align-content: start; gap: 1px; min-width: 0; }
.ag-tot > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ag-tot > span .mdot { margin-right: 6px; }
.ag-tot b { font-size: 21px; line-height: 1.2; color: #27323d; }
.ag-tot.owe b { color: var(--bad); }
.ag-tot small { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.ag-act { display: flex; align-items: center; justify-content: flex-end; }
.ag-src { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 6px; }
.ag-o { display: grid; gap: 1px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid #c3cad1; border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.ag-o b { font-size: 14px; }
.ag-o .num { font-size: 17px; font-weight: 800; }
.ag-o small { font-size: 12px; color: var(--ink-3); }
.ag-o.on { border-color: #9aa4ae; border-left-color: #5d6b78; background: #f2f4f6; box-shadow: 0 0 0 2px #d5dbe1 inset; }
.ag-o:focus-visible { outline: 3px solid var(--focus, #2f6fde); outline-offset: 2px; }
.stk-go { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border-left: 4px solid var(--brand); }
.stk-go-t { flex: 1 1 360px; min-width: 0; display: grid; gap: 4px; }
.stk-go-t h2 { margin: 0; font-size: 18px; font-weight: 800; }
.stk-go-t p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.stk-go-n { font-size: 14px; color: var(--ink); }
.stk-go-a { display: flex; flex-wrap: wrap; gap: 8px; }
.stk-acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
@media (max-width: 520px) {
  .dl-btns, .dl-btns.two { grid-template-columns: minmax(0, 1fr); }
  .btn.dl-b { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; min-height: 46px; text-align: left; }
  .dl-b small { text-align: right; }
  .dl-owe .dl-v { font-size: 25px; }
  .stk-go-a .btn { flex: 1 1 100%; }
  .fl-steps::before { left: 15px; }
  .fl-step { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .fl-no { width: 32px; height: 32px; font-size: 16px; margin-top: 10px; }
  .fl-card { padding: 11px 12px; }
  .fl-h h2 { font-size: 17px; }
  .fl-big { font-size: 26px; }
  .fl-cn { min-width: 0; }
  .fl-led-t { font-size: 13px; }
  .fl-led-t th, .fl-led-t td { padding: 6px 7px; }
}
@media print { .fl-act, .dl-send, .dl-h .btn { display: none !important; } }
.lk-note span, .lk-note .lk-owe { display: block; }
.lk-note .lk-owe { margin-top: 2px; font-weight: 700; }
.lk-owe.ok { color: var(--ok); }
.note .lk-owe.ok { color: #0f4d2d; }
.lk-sum.ok { font-weight: 700; }
.hist-h { color: var(--brand-ink); }
.hist-f { display: grid; gap: 10px; margin: 0 0 12px; }
.hist-row { display: grid; gap: 4px; }
.hist-k { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.hist-c { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.chips button.on .hist-c { background: rgba(255, 255, 255, .24); color: #fff; }
.chips button.off .hist-c { background: transparent; }
.hist-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hist-d { display: grid; gap: 3px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.hist-d .input { min-width: 0; width: 100%; }
.hist-body { transition: opacity .15s; }
.hist-busy { opacity: .5; pointer-events: none; }
.hist-err { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hist-wait { text-align: center; padding: 24px 0; }
.hist-sum { margin-bottom: 12px; padding: 14px 16px; border-left: 5px solid var(--gold); background: linear-gradient(120deg, var(--gold-soft) 0%, #fff 64%); }
.hist-sum.is-void { border-left-color: var(--line-2); background: var(--card); }
.hist-sh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; color: var(--ink-2); }
.hist-sh span:last-child { color: var(--ink-3); font-size: 14px; font-weight: 600; white-space: nowrap; }
.hist-total { margin-top: 2px; font-family: var(--font-num); font-size: 30px; font-weight: 800; line-height: 1.15; color: var(--brand-ink); overflow-wrap: anywhere; }
.hist-total small { font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--ink-2); }
.hist-range { color: var(--ink-3); font-size: 14px; }
.hist-rows { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gold-line); }
.hist-sr { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; }
.hist-sr > span { min-width: 0; }
.hist-sr > b { white-space: nowrap; }
.hist-sr.st-paid > span::before, .hist-sr.st-checked > span::before, .hist-sr.st-locked > span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; }
.hist-sr.st-paid > span::before { background: var(--ok); }
.hist-sr.st-checked > span::before { background: var(--info); }
.hist-sr.st-locked > span::before { background: var(--warn); }
.hist-sr.is-void { color: var(--ink-3); font-size: 14px; }
.hist-sr.adv { color: var(--ink-2); font-size: 14px; }
.card.hist-card { border-left: 5px solid var(--line-2); }
.card.hist-card.st-locked { border-left-color: var(--warn); }
.card.hist-card.st-checked { border-left-color: var(--info); }
.card.hist-card.st-paid { border-left-color: var(--ok); }
.hist-card .divider { margin: 4px 0; }
.hist-amt b { font-size: 17px; color: var(--brand-ink); }
.hist-more { margin-top: 10px; }
.item.hist-bill { display: block; text-decoration: none; color: inherit; }
.item.hist-bill.is-void { opacity: .72; }
@media (prefers-reduced-motion: reduce) { .hist-body { transition: none; } }
.pc-row.pc-k { background: var(--gold-soft); border-radius: 10px; padding: 6px 8px; margin: 0 -8px; }
.pc-row.pc-k .pc-no { color: var(--gold-ink); }
.pc-row.pc-k .pc-fine { white-space: normal; line-height: 1.3; }
.pc-ded { display: inline-block; white-space: nowrap; color: var(--gold-ink); font-weight: 600; }
.pc-row select.pc-p { min-width: 0; width: 100%; }
.pcs-add .btn { white-space: nowrap; }
@media (max-width: 560px) { .pc-row.pc-k { margin: 0; } }

.st-bar { height: 14px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.st-bar span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.st-bar.warn span { background: var(--warn); }
.st-bar.bad span { background: var(--bad); }
.st-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 16px; }
.st-sum span { color: var(--ink-2); font-weight: 600; }
.st-rows { display: grid; border-top: 1px solid var(--line); }
.st-row { display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); gap: 4px 16px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.st-k { color: var(--ink-2); font-weight: 600; }
.st-v { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .st-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.from-tag { display: inline-block; max-width: 100%; padding: 1px 9px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; font-size: .85em; line-height: 1.5; vertical-align: middle; overflow-wrap: anywhere; }
.from-tag.dep { background: var(--dep-soft); color: var(--dep-ink); }
.dep-sell { min-width: 120px; }
.dsl-wait { color: var(--warn); font-weight: 700; }
.dsl-paid { color: var(--ok); font-weight: 700; }
.dsm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; border-color: var(--dep-line); background: var(--dep-soft); }
.dsm-bar .btn { flex: none; min-width: 120px; }
.dsm-head { gap: 8px; }
.dsm-list { display: grid; gap: 6px; max-height: min(46vh, 420px); overflow-y: auto; padding: 2px; }
.dsm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.dsm-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--dep); }
.dsm-row.on { border-color: var(--dep); background: var(--dep-soft); box-shadow: 0 0 0 2px var(--dep-ring); }
.dsm-main { display: grid; gap: 2px; min-width: 0; }
.dsm-sub { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.dsm-unit { overflow-wrap: anywhere; }
.dsm-amt { text-align: right; white-space: nowrap; align-self: start; padding-top: 2px; }
.dsm-row:not(.on) .dsm-amt b { color: var(--ink-3); font-weight: 600; }
.dsm-done { display: grid; gap: 2px; margin-bottom: 10px; }
.dsm-done-r { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.dsm-done-r b { white-space: nowrap; }
@media (max-width: 420px) { .dsm-bar { flex-direction: column; align-items: stretch; } }
.badge.self-cut { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.self-cut-note { border-left: 4px solid var(--warn); }
.hist-bill .hist-from { margin: 3px 0 2px; }
.sp-stu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 12px; background: #fffdf8; }
.sp-stu.on { border-style: solid; border-color: #b9dfc9; background: var(--ok-soft); }
.sp-stu .ok-t { color: var(--ok); font-weight: 700; }
.sp-wrap.stu .sp-base { display: none; }

.mix-row.bar-row { background: var(--gold-soft); border-radius: 10px; padding: 6px 8px; margin: 0 -8px; }
.mix-row > .bar-w { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; margin-top: -4px; }
@media (max-width: 560px) { .mix-row.bar-row { margin: 0; } }
.mix-row.scrap-row { background: var(--gold-soft); border-radius: 10px; padding: 6px 8px; margin: 0 -8px; border-left: 3px solid var(--gold); }
.scrap-k { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.scrap-k > b { color: var(--gold-ink); font-size: 14px; white-space: nowrap; }
.mix-row > .scrap-w { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; margin-top: -4px; }
@media (max-width: 560px) { .mix-row.scrap-row { margin: 0; } .mix-row > .scrap-k { grid-column: 1 / -1; } }

.modal.tvb-modal { width: min(1180px, 100%); }
.tvb-form { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 16px; align-items: start; }
.tvb-sec { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; background: var(--card); }
.tvb-sec h4 { margin: 0 0 10px; font-size: 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tvb-sec h4 .check { font-size: 15px; font-weight: 700; }
.tvb-sub { margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
.tvb-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-top: 1px dashed var(--line); }
.tvb-line:first-of-type { border-top: 0; }
.tvb-adj { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.tvb-adj .input, .tvb-min .input, .tvb-start select.input, .tvb-grid select.input { width: auto; min-height: 40px; padding: 7px 10px; }
.tvb-adj select.input { padding-right: 26px; }
.tvb-adj .input.tvb-n, .tvb-min .input.tvb-n { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.tvb-adj.r925 [data-f="sign"], .tvb-adj.r925 [data-f="value"] { display: none; }
.tvb-min .input.tvb-n.s { width: 70px; }
.tvb-grid select.input { width: 100%; }
.tvb-rules { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.tvb-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: 100%; padding: 6px 0; border-top: 1px dashed var(--line); }
.tvb-rule:first-child { border-top: 0; }
.tvb-rules > .btn { margin-top: 6px; }
.tvb-min, .tvb-min0 { min-width: 190px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.tvb-min0 { color: var(--ink-2); font-weight: 600; }
.tvb-radio { font-weight: 500; }
.tvb-presets { gap: 6px; margin-top: 6px; }
.tvb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tvb-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.tvb-dep.off { opacity: .45; pointer-events: none; }
.tvb-start { border: 1px dashed var(--gold-line); background: var(--gold-soft); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.tvb-start .field { margin: 0; }
.tvb-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.tvb-theme { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 14px; background: var(--card); }
.tvb-theme input { position: absolute; opacity: 0; pointer-events: none; }
.tvb-theme .tvb-sw { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 3px #f3d27a; }
.tvb-theme.t-red .tvb-sw { background: linear-gradient(135deg, #8e0f1a, #2b0105); }
.tvb-theme.t-navy .tvb-sw { background: linear-gradient(135deg, #1c3b78, #050b1c); }
.tvb-theme.t-black .tvb-sw { background: linear-gradient(135deg, #343029, #000); }
.tvb-theme.t-green .tvb-sw { background: linear-gradient(135deg, #12805a, #021d13); }
.tvb-theme.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); font-weight: 700; }
.tvb-theme:focus-within { box-shadow: 0 0 0 3px var(--brand-ring); }
.tvb-pv { position: sticky; top: 0; border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tvb-pv .table { background: var(--card); }
.tvb-pvt td, .tvb-pvt th { padding: 6px 8px; font-size: 13.5px; }
.tvb-base, .tvb-pv-ref { font-size: 13.5px; }
.tvb-calc { font-size: 11.5px; color: var(--ink-3); font-weight: 400; text-align: right; white-space: normal; }
.tvb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; }
.tvb-card { display: flex; flex-direction: column; gap: 10px; }
.tvb-card.off { opacity: .72; }
.tvb-card h3 { margin: 0 0 2px; }
.tvb-card-h { align-items: flex-start; }
.tvb-seen { font-size: 13px; white-space: nowrap; }
.tvb-on { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.tvb-on i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.tvb-sum { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.tvb-sum li + li { margin-top: 2px; }
.tvb-now { font-size: 13.5px; background: var(--gold-soft); border-radius: 8px; padding: 6px 10px; }
.tvb-info { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--ink-2); }
.tvb-info b { color: var(--ink); }
.tvb-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tvb-link .input { flex: 1 1 220px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.tvb-acts { gap: 8px; }
.tvb-how ol, .tvb-how-ol { margin: 6px 0 0; padding-left: 20px; }
.tvb-how li + li { margin-top: 4px; }
.tvb-help summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.tvb-help .note { margin-top: 8px; }
.tvb-custs { display: flex; flex-direction: column; gap: 8px; }
.tvb-custs-h { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.tvb-cust-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; }
.tvb-cust-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.tvb-cust-n { min-width: 0; }
.tvb-look { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.tvb-look .tvb-sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; box-shadow: inset 0 0 0 2px #f3d27a; margin-right: 4px; }
.tvb-look .tvb-sw.t-red { background: linear-gradient(135deg, #8e0f1a, #2b0105); }
.tvb-look .tvb-sw.t-navy { background: linear-gradient(135deg, #1c3b78, #050b1c); }
.tvb-look .tvb-sw.t-black { background: linear-gradient(135deg, #343029, #000); }
.tvb-look .tvb-sw.t-green { background: linear-gradient(135deg, #12805a, #021d13); }
.tvb-card-t { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tvb-lg-th { flex: none; display: inline-flex; align-items: center; justify-content: center; height: 48px; max-width: 132px; padding: 3px; border-radius: 10px; background: linear-gradient(135deg, #8e0f1a, #2b0105); }
.tvb-lg-th.plate { background: #fff8e8; box-shadow: inset 0 0 0 2px #f3d27a; padding: 4px 6px; }
.tvb-lg-th img { display: block; max-height: 100%; max-width: 100%; object-fit: contain; }
.tvb-lg-pv { display: flex; align-items: center; gap: 16px; min-height: 96px; padding: 14px 18px; border-radius: 12px; color: #ffe9b0; background: linear-gradient(135deg, #8e0f1a, #2b0105); box-shadow: inset 0 -4px 0 #d9a93c; overflow: hidden; }
.tvb-lg-pv.t-navy { background: linear-gradient(135deg, #1c3b78, #050b1c); }
.tvb-lg-pv.t-black { background: linear-gradient(135deg, #343029, #000); }
.tvb-lg-pv.t-green { background: linear-gradient(135deg, #12805a, #021d13); }
.tvb-lg-mark { flex: none; display: flex; align-items: center; }
.tvb-lg-mark img { display: block; height: 64px; width: auto; max-width: 240px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .35)); }
.tvb-lg-mark.plate { padding: 6px 9px; border-radius: 12px; background: #fff8e8; box-shadow: inset 0 0 0 2px #f3d27a, 0 4px 10px rgba(0, 0, 0, .3); }
.tvb-lg-mark.plate img { filter: none; }
.tvb-lg-none { flex: none; display: inline-flex; align-items: center; justify-content: center; height: 64px; padding: 0 14px; border: 2px dashed rgba(255, 233, 176, .55); border-radius: 12px; font-size: 13px; color: rgba(255, 233, 176, .85); }
.tvb-lg-name { min-width: 0; font-size: 22px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.tvb-tiers { margin-top: 4px; border-top: 1px dashed var(--line); }
.tvb-wsel.input { width: auto; min-width: 112px; min-height: 40px; padding: 7px 26px 7px 10px; }
.or-menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 16px; width: min(380px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 14px;
  background: #1d1310; color: #fff3dc; box-shadow: 0 18px 44px rgba(0, 0, 0, .55); font-size: 15px; line-height: 1.35; text-align: left; }
.or-menu b { font-size: 15px; margin-bottom: 3px; }
.or-menu button { font: inherit; text-align: left; border: 1px solid rgba(255, 220, 130, .25); background: rgba(255, 255, 255, .05); color: inherit; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.or-menu button.on { background: #f3cb62; color: #3d2a00; border-color: #f3cb62; font-weight: 700; }
.or-menu button:focus-visible { outline: 3px solid #ffd76a; outline-offset: 1px; }
.or-menu p { margin: 6px 0 0; font-size: 12.5px; color: #d9c6a3; line-height: 1.45; }
.o-preview .bd-fs, .o-preview .ag-fs { display: none; }
.modal.lk-modal { width: min(1260px, 100%); }
.lk-wrap { display: grid; grid-template-columns: minmax(0, 410px) minmax(0, 1fr); gap: 16px; align-items: start; }
.lk-side { display: flex; flex-direction: column; gap: 12px; max-height: min(70vh, 760px); overflow: auto; padding-right: 4px; }
.lk-side .field { margin: 0; }
.lk-head { display: flex; flex-direction: column; gap: 2px; }
.lk-groups { display: flex; flex-direction: column; gap: 8px; }
.lk-g { border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.lk-g > summary { cursor: pointer; padding: 10px 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.lk-g > summary::-webkit-details-marker { display: none; }
.lk-g > summary::after { content: "▾"; color: var(--ink-3); margin-left: 4px; }
.lk-g[open] > summary::after { content: "▴"; }
.lk-n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--brand); }
.lk-slot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-top: 1px dashed var(--line); }
.lk-slot label { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; font-size: 14px; }
.lk-slot input[type="color"] { flex: none; width: 46px; height: 32px; padding: 1px 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); cursor: pointer; }
.lk-slot.set label span { font-weight: 700; }
.lk-slot.set label span::after { content: " · ปรับแล้ว"; color: var(--brand); font-weight: 600; font-size: 12px; }
.lk-reset { flex: none; visibility: hidden; border: 1px solid var(--line-2); background: var(--card); border-radius: 8px; padding: 2px 10px; cursor: pointer; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.lk-slot.set .lk-reset { visibility: visible; }
.lk-slot.hit { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--brand); }
.lk-pv { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lk-pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lk-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.lk-seg button { border: 0; background: var(--card); padding: 6px 14px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.lk-seg button.on { background: var(--brand); color: #fff; font-weight: 700; }
.lk-frame { position: relative; overflow: hidden; border-radius: 12px; background: #15100e; box-shadow: inset 0 0 0 1px var(--line); }
.lk-frame iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #000; }
.modal.lk-modal .modal-foot .lk-clear { margin-right: auto; }
@media (max-width: 900px) {
  .lk-wrap { grid-template-columns: minmax(0, 1fr); }
  .lk-pv { position: static; order: -1; }
  .lk-side { max-height: none; overflow: visible; }
}
@media (max-width: 900px) {
  .tvb-form { grid-template-columns: minmax(0, 1fr); }
  .tvb-pv { position: static; }
}
.qf-box { display: grid; gap: 10px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.qf-box .input { width: 100%; }
.qf { display: grid; gap: 10px; min-width: 0; }
.qf:empty { display: none; }
.qf-row { display: grid; gap: 5px; min-width: 0; }
.qf-k { color: var(--ink-3); font-size: 13px; font-weight: 700; white-space: nowrap; }
.qf .chips { gap: 6px; }
.qf .chips button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 5px 10px; border-radius: 10px; font-size: 14px; text-align: left; white-space: nowrap; }
.qf-row.cat .chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.qf-row.cat .qf-n { margin-left: auto; }
.qf .mdot { flex: none; width: 9px; height: 9px; margin: 0; }
.qf .chips button.on .mdot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.qf-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.chips button.on .qf-n { background: rgba(255, 255, 255, .24); color: #fff; }
.chips button.off .qf-n { background: transparent; }
.tb-b { flex: 1 0 100%; min-width: 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.tb-b .qf-row { grid-template-columns: 3.4em minmax(0, 1fr); align-items: start; gap: 8px; }
.tb-b .qf-k { padding-top: 10px; }
@media (max-width: 560px) { .tb-b .qf-row { grid-template-columns: minmax(0, 1fr); gap: 5px; } .tb-b .qf-k { padding-top: 0; } }
.qf-none { display: grid; justify-items: center; gap: 10px; }
.qf-none p { margin: 0; }
.badge.lump { background: var(--gold-soft); color: var(--gold-ink); border: 1px solid var(--gold-line); }
.lp-box { min-width: 0; }
.lp-locks { display: grid; gap: 6px; }
.lpk-row { display: flex; align-items: flex-start; justify-content: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--zebra); cursor: pointer; }
.lpk-row.on { background: var(--gold-soft); border-color: var(--gold-line); }
.lpk-row input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); cursor: pointer; }
.lpk-t { flex: 1 1 auto; min-width: 0; text-align: left; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.lpk-t .badge { margin-left: 4px; }
.btn.lpk-offer { border-style: dashed; }
.lpk-note { margin: 6px 0 0; }
.lpk-head { align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-band .chips button { white-space: normal; text-align: left; }
.lp-table td .faint { font-size: 12.5px; }
.lump-note .row { flex-wrap: wrap; }
.og-rows { display: grid; gap: 8px; }
.og-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.2fr) 46px 52px; grid-template-areas: "k w to cam del" "al al al al al" "th th th th th"; gap: 6px 8px; align-items: center; }
.og-row.og-x { background: var(--gold-soft); border-radius: 10px; padding: 6px 8px; margin: 0 -8px; }
.og-row > .og-k { grid-area: k; min-width: 0; }
.og-row > .og-k > select { width: 100%; min-width: 0; }
.og-row > .og-w { grid-area: w; min-width: 0; }
.og-row > .og-to { grid-area: to; min-width: 0; width: 100%; }
.og-row > .og-cam { grid-area: cam; }
.og-row > .og-del { grid-area: del; }
.og-row > .og-al { grid-area: al; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.og-row > .og-al:empty { display: none; }
.og-row > .og-al .badge { font-size: 11.5px; }
.og-row > .pc-thumbs { grid-area: th; }
.og-table td .faint { overflow-wrap: anywhere; }
.og-table td.m-title b { white-space: nowrap; }
@media (max-width: 560px) {
  .og-row { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "k k k" "w cam del" "to to to" "al al al" "th th th"; padding-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
  .og-row.og-x { margin: 0; }
  .lp-modal .og-row .input.big { font-size: 22px; min-height: 52px; }
}
.input-unit.pc-p .input { padding-right: 34px; }
@media (max-width: 560px) {
  .lp-modal .pc-row .input.big { font-size: 22px; min-height: 52px; }
}
.logo-row { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #e5ddd0); }
.logo-row .logo-prev { width: 72px; height: 72px; border-radius: 14px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex: none; }
.logo-try { display: flex; gap: 24px; justify-content: center; margin: 4px 0 12px; }
.logo-try figure { margin: 0; text-align: center; }
.logo-try img { width: 96px; height: 96px; border-radius: 16px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); background: #fff; }
.logo-try img.round { border-radius: 50%; }
.logo-try figcaption { font-size: 13px; color: var(--muted, #6b6258); margin-top: 6px; }
.about-line { margin: 4px 0 0; text-align: right; }
.ok-t { color: var(--ok); font-weight: 700; }
.kf { gap: 14px; }
.kf-tools { display: grid; gap: 10px; }
.kf-search { display: flex; gap: 8px; }
.kf-search .input { flex: 1 1 auto; min-width: 0; }
.kf-list { display: grid; gap: 8px; }
.kf-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 150px; gap: 4px 14px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold-line); border-radius: 12px; padding: 10px 14px; cursor: pointer; box-shadow: var(--shadow); }
.kf-row:hover { background: var(--hover); }
.kf-row:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.kf-row.late { border-left-color: var(--bad); }
.kf-row > span { display: grid; gap: 1px; min-width: 0; }
.kf-row .faint { font-size: 13px; overflow-wrap: anywhere; }
.kf-no { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.kf-c3 { text-align: right; }
.kf-c4 { justify-items: end; }
@media (max-width: 760px) {
  .kf-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "c1 c4" "c2 c2" "c3 c3"; }
  .kf-c1 { grid-area: c1; } .kf-c2 { grid-area: c2; } .kf-c4 { grid-area: c4; }
  .kf-c3 { grid-area: c3; display: flex !important; justify-content: space-between; align-items: baseline; text-align: left; }
}
.kf-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px 20px; border-top: 4px solid var(--gold); }
.kf-hero.late { border-top-color: var(--bad); }
.kf-hno { font-size: 30px; letter-spacing: .01em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kf-who { font-size: 16px; }
.kf-hero-m { text-align: right; display: grid; align-content: start; gap: 2px; }
.kf-big { font-family: var(--font-num); font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--brand-ink); }
.kf-mid { font-family: var(--font-num); font-size: 24px; font-weight: 800; line-height: 1.15; }
.kf-dates { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 0; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.kf-dates div { display: grid; gap: 2px; }
.kf-dates dt { font-size: 13px; color: var(--ink-3); }
.kf-dates dd { margin: 0; font-weight: 700; }
@media (max-width: 760px) {
  .kf-hero { grid-template-columns: minmax(0, 1fr); }
  .kf-hero-m { text-align: left; }
  .kf-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kf-today { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--gold-soft); border-color: var(--gold-line); }
.kf-today > div { display: grid; gap: 3px; min-width: 0; }
.kf-redeem { text-align: right; }
.kf-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kf-more { gap: 8px; }
.kf-two { align-items: start; }
@media (max-width: 900px) { .kf-two { grid-template-columns: minmax(0, 1fr); } }
.kf-kv dd { text-align: left; font-weight: 600; overflow-wrap: anywhere; }
.kf-photos { display: grid; gap: 6px; margin-top: 10px; }
.kf-lines { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.kf-lines li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kf-qr { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--zebra); }
.kf-qr svg { flex: none; border-radius: 6px; background: #fff; }
.kf-qr > div { display: grid; gap: 4px; min-width: 0; flex: 1 1 220px; }
.kf-code { font-family: var(--font-num); letter-spacing: .12em; font-size: 18px; color: var(--brand-ink); }
.kf-op { gap: 12px; }
.kf-static { min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.kf-int { background: var(--zebra); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px; }
.kf-disc summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.kf-total { font-size: 19px; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: #0f4d2d; }
.kf-total b { font-family: var(--font-num); font-size: 24px; }
.kf-total.out { background: var(--brand-soft); color: var(--brand-ink); }
.kf-sigline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sig-img.kf-sigmini { display: inline-block; max-height: 32px; max-width: 120px; vertical-align: middle; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.kf-item { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; background: var(--zebra); }
.kf-item + .kf-item { margin-top: 10px; }
.kf-ihead { display: flex; justify-content: space-between; align-items: center; }
.kf-igrid { display: grid; grid-template-columns: 170px minmax(200px, 2fr) 80px minmax(110px, 1fr) 90px minmax(110px, 1fr); gap: 8px 10px; }
@media (max-width: 1100px) { .kf-igrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kf-iname { grid-column: span 2; } }
@media (max-width: 560px) { .kf-igrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kf-iname { grid-column: 1 / -1; } }
.kf-cond { align-items: center; }
.kf-cust .kf-wide { grid-column: 1 / -1; }
.kf-cust textarea { resize: vertical; }
.kf-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.kf-people .faint { flex-basis: 100%; }
.kf-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.kf-sum:empty { display: none; }
.kf-sum b { font-size: 17px; }
.kf-submit { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; background: linear-gradient(180deg, rgba(251, 246, 238, 0), var(--bg) 30%); }
body.has-appnav .kf-submit { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.kf-subtxt b { font-size: 20px; }
.table tr.kf-tot td { font-weight: 800; border-top: 2px solid var(--line-2); }
.kf-radios { display: grid; gap: 8px; }
.kf-radios .check { align-items: flex-start; }
.kf-radios .check input { margin-top: 3px; flex: none; }
.kf-term { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.kf-tn { font-weight: 800; padding-top: 10px; }
.kf-brow { display: grid; grid-template-columns: 180px minmax(0, 2fr) minmax(0, 1fr); gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.kf-brow:last-child { border-bottom: 0; }
@media (max-width: 900px) { .kf-brow { grid-template-columns: minmax(0, 1fr); } }
.kf-total.err { background: var(--bad-soft); color: var(--bad); font-size: 16px; }
.kf-cust textarea.input { min-height: 64px; }
.kf-row.kf-mini { box-shadow: none; padding: 8px 12px; }

.topbar .tb-manual { white-space: nowrap; padding: 6px 11px; text-decoration: none; }
@media (max-width: 760px) { .topbar .tb-manual-l { display: none; } .topbar .tb-manual { padding: 6px 9px; } }
.mn { display: grid; gap: 14px; }
.mn-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mn-head .mn-ttl { flex: 1 1 260px; min-width: 0; }
.mn-head h1 { margin: 0; font-size: 26px; line-height: 1.2; color: var(--brand-ink); }
.mn-head p { margin: 3px 0 0; }
.mn-lead { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); line-height: 1.6; }
.mn-search { position: sticky; top: var(--tb-h, 56px); z-index: 6; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; background: var(--bg); }
.mn-search .input { flex: 1 1 280px; max-width: 560px; }
.mn-body { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 18px; align-items: start; }
.mn-toc { position: sticky; top: calc(var(--tb-h, 56px) + 62px); max-height: calc(100vh - var(--tb-h, 56px) - 76px); overflow: auto; overscroll-behavior: contain;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px 10px; }
.mn-toc summary { cursor: pointer; font-weight: 700; padding: 8px 6px; list-style: none; }
.mn-toc summary::-webkit-details-marker { display: none; }
.mn-toc summary::after { content: '▾'; margin-left: 6px; color: var(--ink-3); }
.mn-toc[open] summary::after { content: '▴'; }
@media (min-width: 901px) { .mn-toc summary { display: none; } }
.mn-toc h4 { margin: 12px 6px 4px; font-size: 13px; font-weight: 700; color: var(--ink-3); line-height: 1.35; }
.mn-toc ul { list-style: none; margin: 0; padding: 0; }
.mn-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
@media (hover: hover) { .mn-toc a:hover { background: var(--hover); } }
.mn-toc a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.mn-toc a:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.mn-secs { display: grid; gap: 14px; min-width: 0; }
.mn-sec { scroll-margin-top: calc(var(--tb-h, 56px) + 70px); display: grid; gap: 12px; transition: box-shadow .3s; }
.mn-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.mn-sec h2 { margin: 0; font-size: 22px; line-height: 1.3; color: var(--brand-ink); }
.mn-gname { font-size: 13px; color: var(--ink-3); }
.mn-txt { display: grid; gap: 10px; min-width: 0; line-height: 1.65; }
.mn-txt h3 { margin: 8px 0 0; font-size: 17.5px; color: var(--ink); }
.mn-txt p { margin: 0; }
.mn-txt .g-steps li { line-height: 1.6; }
.mn-txt .g-notes { gap: 5px; }
.mn-txt .g-menu { gap: 8px 14px; }
.mn-txt .g-menu dt { white-space: nowrap; }
.mn-txt .g-tip, .mn-warn { margin: 0; line-height: 1.6; }
.mn-warn { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); border: 1px solid #efcf9e; color: #6e3d06; }
.mn-tbl table.table { font-size: 14.5px; }
.mn-tbl th, .mn-tbl td { vertical-align: top; line-height: 1.5; }
.mn-go { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.mn-sec.mn-hit { box-shadow: 0 0 0 3px var(--brand-ring), var(--shadow); }
mark.mn-m { background: #ffe38a; color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 900px) {
  .mn-body { grid-template-columns: minmax(0, 1fr); }
  .mn-toc { position: static; max-height: none; }
  .mn-head h1 { font-size: 22px; }
  .mn-sec h2 { font-size: 20px; }
}
@media (max-width: 520px) { .mn-txt .g-menu dt { white-space: normal; } }
@media print {
  .mn-body-page .topbar, .mn-head [data-go-back], .mn-print, .mn-search, .mn-toc, .mn-go, #appNotice { display: none !important; }
  .mn-body { display: block; }
  .mn-sec { break-inside: auto; box-shadow: none !important; border: 0; padding: 0; margin: 0 0 14px; }
  .mn-sec h2 { break-after: avoid; }
  .mn-lead { border: 0; padding: 0; }
  mark.mn-m { background: none; }
}

.dv-page .dv { max-width: 1080px; margin: 0 auto; }
.dv-row { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.dv-row:first-of-type { border-top: 0; padding-top: 4px; }
.dv-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 16px; }
.dv-ctl { gap: 8px; align-items: center; flex-wrap: wrap; }
.dv-ctl select.input { flex: 1 1 320px; max-width: 560px; }
.dv-steps { margin-top: 2px; }
.dv-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--ok-soft, #eaf6ee); color: var(--ink-2); font-size: 14px; }
.dv-lock h3 { font-size: 17px; }

.topbar .tb-appr { white-space: nowrap; font-weight: 700; }
.topbar .tb-appr b { font-family: var(--font-num); }
.topbar .tb-appr.on { background: var(--grad-gold); border-color: #b9821a; color: #5c0a0e; box-shadow: 0 0 0 2px rgba(255, 231, 160, .55); animation: ap-pulse 2.4s ease-in-out infinite; }
@keyframes ap-pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(255, 231, 160, .55); } 50% { box-shadow: 0 0 0 5px rgba(255, 231, 160, .25); } }
@media (prefers-reduced-motion: reduce) { .topbar .tb-appr.on { animation: none; } }
@media (max-width: 600px) { .topbar .tb-appr { padding: 6px 9px; font-size: 13px; } }
.nt-pop.k-approval { border-left-color: var(--gold); background: linear-gradient(0deg, #fff, var(--gold-soft)); }
.nt-pop-a { margin-top: 8px; display: flex; justify-content: flex-end; }
.ap-modal .modal-body { max-height: min(72vh, 760px); overflow: auto; }
.ap-list { display: grid; gap: 10px; }
.ap-card { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; background: var(--card); display: grid; gap: 4px; }
.ap-card.pending { border-left: 6px solid var(--gold); background: linear-gradient(0deg, #fff, var(--zebra)); }
.ap-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ap-h b { font-size: 16px; color: var(--brand-ink); }
.ap-ref { font-family: var(--font-num); font-weight: 700; }
.ap-at { margin-left: auto; font-size: 13px; }
.ap-who { font-size: 13.5px; }
.ap-purpose { font-weight: 700; color: var(--warn); }
.ap-dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 4px 0 0; font-size: 14px; }
.ap-dl dt { color: var(--ink-3); }
.ap-dl dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ap-reason { margin: 2px 0 0; }
.ap-done { margin: 0; font-size: 13.5px; }
.ap-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.ap-acts .btn { min-width: 92px; }
.ap-recent { margin-top: 12px; }
.ap-recent summary { cursor: pointer; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.ap-groups { display: grid; gap: 4px; padding-left: 4px; }
@media (max-width: 600px) { .ap-dl { grid-template-columns: 1fr; } .ap-dl dt { margin-top: 2px; } .ap-acts .btn { flex: 1 1 auto; } }
.badge.gbase { background: #fff; color: var(--gold-ink); border: 1px dashed var(--gold-line); font-weight: 700; }
.stk-card .stk-adj { justify-self: start; margin-top: 4px; }
.cs-split-k { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 10px; }
.cs-split-k > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--zebra); }
.cs-split-k b { font-size: 20px; color: var(--ink); }
.cs-split tfoot td { border-top: 2px solid var(--line-2); }
.cs-split .cs-sum td { background: var(--bg-2); }
th.cs-tr, td.cs-tr { color: var(--ink-2); background: rgba(240, 232, 214, .35); }
.ik-row.ik-bin { padding-left: 26px; background: linear-gradient(90deg, rgba(201, 155, 55, .08), transparent 60%); }
.ik-row.ik-bin .ik-name b { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ik-row.ik-bin .stk-bin { font-size: 12px; min-width: 22px; height: 20px; margin-right: 0; vertical-align: 0; }
th.mx-bin, td.mx-bin { background: rgba(201, 155, 55, .07); }
thead th.mx-bin { color: #7a520c; white-space: nowrap; }
.rep-br { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: -4px; }
.rep-br-l { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.rep-br .chips.seg { flex-wrap: wrap; }
.rep-br .chips.seg button { min-height: 40px; padding: 0 16px; font-weight: 700; }
.rep-br .chips.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.note.rep-shop { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.note.rep-shop .btn { margin-left: auto; }
.rep-scope tbody tr.click { cursor: pointer; }
.rep-scope tbody tr.click:hover td { background: var(--hover); }
.rep-scope tbody tr.click td:first-child { font-weight: 700; color: var(--brand-ink); text-decoration: underline; text-decoration-color: rgba(122, 82, 12, .35); text-underline-offset: 3px; }
.rep-scope tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
th.mx-orn, td.mx-orn { background: rgba(176, 106, 34, .08); border-left: 2px solid rgba(176, 106, 34, .28); }
thead th.mx-orn { color: #8a4b12; white-space: nowrap; }
th.mx-orn small, th.mx-bin small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.table tr.sub.orn td { color: #8a4b12; background: rgba(176, 106, 34, .06); }
.table tr.sub.orn td:first-child { font-weight: 700; box-shadow: inset 3px 0 0 rgba(176, 106, 34, .55); }
.mo-metals tr.grp td { font-weight: 600; }
.mo-metals tr.sub td:first-child { white-space: nowrap; }
.kpi { container-type: inline-size; }
.kpi-v { font-size: clamp(17px, 13.5cqi, 24px); }
.kpi.hero .kpi-v { font-size: clamp(24px, 10cqi, 34px); }
@media (max-width: 640px) { .kpi-v { font-size: clamp(16px, 13.5cqi, 20px); } .kpi.hero .kpi-v { font-size: clamp(22px, 9cqi, 28px); } }
@media (max-width: 640px) {
  .rep-br { margin-top: 0; }
  .rep-br .chips.seg { width: 100%; }
  .rep-br .chips.seg button { flex: 1 1 auto; padding: 0 10px; }
  .note.rep-shop .btn { margin-left: 0; }
}
@media print { .rep-br, .note.rep-shop .btn { display: none !important; } }
.appnav.nv-grouped { flex-wrap: wrap; align-content: flex-end; }
.appnav.nv-grouped .nv-src, .appnav.nv-grouped .nv-more { display: none !important; }
.appnav.nv-grouped .nv-grp { flex: 0 1 112px; }
.appnav .nv-chips { flex: 0 0 calc(100% + 16px); order: -1; display: flex; justify-content: center; gap: 6px; margin: -4px -8px 4px; padding: 8px 10px; overflow-x: auto; scrollbar-width: none;
  background: rgba(40, 3, 6, .28); border-bottom: 1px solid rgba(255, 220, 150, .2); }
.appnav .nv-chips::-webkit-scrollbar { display: none; }
.appnav .nv-chips.hidden { display: none; }
.appnav .nv-chips button.nv-chip { flex: none; height: 38px; flex-direction: row; gap: 7px; padding: 0 15px 0 11px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  color: #f8e3b4; background: rgba(255, 228, 160, .09); box-shadow: inset 0 0 0 1px rgba(255, 220, 150, .3); transform: none !important; }
.appnav .nv-chips .nv-chip .nv-ic { width: 18px; height: 18px; }
@media (hover: hover) { .appnav .nv-chips .nv-chip:hover { background: rgba(255, 228, 160, .2); color: #fff3d0; } }
.appnav .nv-chips .nv-chip.on { background: var(--grad-gold); color: #5c0a0e; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 8px rgba(30, 0, 0, .3); }
.appnav .nv-chips .nv-chip .badge.count { position: static; margin: 0 0 0 2px; }
.appnav .nv-grp .nv-dot { top: 7px; }
@media (max-width: 1180px) {
  .appnav.nv-grouped .nv-grp { flex: 1 1 0; max-width: 120px; }
  .appnav .nv-chips { justify-content: flex-start; }
}
@media (max-width: 420px) { .appnav.nv-grouped .nv-grp { font-size: 11.5px; } .appnav .nv-chips button.nv-chip { font-size: 13.5px; padding: 0 12px 0 9px; } }
@media print { .appnav .nv-chips { display: none; } }
.lot-tabs { flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lot-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.lot-tabs button[aria-selected="true"] { background: var(--grad-gold); color: #5c0a0e; border-color: transparent; }
.lot-tabs .badge.count { margin: 0; }
.lot-table td, .lot-table th { vertical-align: middle; }
.lot-table .lot-ck { width: 34px; text-align: center; }
.lot-table .lot-ck input { width: 20px; height: 20px; }
.lot-table tr.sel td { background: rgba(201, 155, 55, .1); }
.lot-table .lot-w { width: 112px; text-align: right; }
.lot-bar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 6px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fffaf0; border: 1px solid var(--gold-line, #e4c983); box-shadow: 0 6px 18px rgba(80, 30, 0, .12); }
.lot-bar .lot-sum { display: grid; gap: 2px; min-width: 0; }
.lot-bar .lot-act { display: flex; flex-wrap: wrap; gap: 6px; }
.lot-list { display: grid; gap: 4px; }
.lot-list .row { gap: 10px; }
.lot-ship select.input { min-width: 180px; }
@media (max-width: 640px) { .lot-bar { flex-direction: column; align-items: stretch; } .lot-bar .lot-act .btn { flex: 1 1 auto; } .lot-table .lot-w { width: 100%; } }
.dep-line { display: grid; gap: 4px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.dep-line:last-of-type { border-bottom: 0; }
.dep-act { gap: 6px; flex-wrap: wrap; }
.dep-bills tr.sel td { background: rgba(201, 155, 55, .1); }
.dep-bills td:first-child { width: 34px; text-align: center; }
.dep-bills input[type=checkbox] { width: 20px; height: 20px; }
.rs-t { margin: 6px 0 0; font-size: 15px; }
.rs-sec { display: grid; gap: 4px; }
.rs-no { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--gold-soft); border: 1px solid var(--gold-line); font-size: 13px; font-weight: 800; vertical-align: 1px; }
.rs-sub { margin: 0; }
.rs-sec.rs-ex { padding: 8px 10px 10px; border: 1px solid #f1d2cc; border-left: 4px solid var(--bad); border-radius: 10px; background: #fff8f6; }
.rs-focus { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0; }
.rs-plan .rs-keep { border-top: 1px solid var(--gold-line); padding-top: 6px; margin-top: 2px; }
.rs-tab .rs-in { width: 140px; text-align: right; }
.rs-hist summary { cursor: pointer; font-weight: 700; }
.rs-h { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 8px; display: grid; gap: 4px; }
.rs-h.void { opacity: .65; }
.rs-h ul { margin: 0; padding-left: 18px; }
@media (max-width: 640px) { .rs-tab .rs-in { width: 100%; } }
.appnav .nv-chips button.nv-chip { white-space: nowrap; max-width: none; min-width: max-content; }
@media (max-width: 640px) {
  .lot-table.mcard tr, .dep-bills.mcard tr, .rs-tab.mcard tr { position: relative; }
  .table.lot-table.mcard td.lot-ck { position: absolute; left: auto; right: 12px; top: 10px; width: auto; }
  .lot-table.mcard td.m-full { padding-right: 40px; }
  .table.dep-bills.mcard td:first-child { position: absolute; left: auto; right: 12px; top: 10px; width: auto; }
  .dep-bills.mcard td.m-full { order: -1; padding-right: 40px; }
  .table.rs-tab.mcard td:first-child:not(.m-full) { position: absolute; left: auto; right: 12px; top: 10px; width: auto; }
}

.pile2 { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; }
.pile2 + .pile2 { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pile2-t { grid-column: 1 / -1; display: flex; align-items: center; margin-bottom: 8px; font-size: 15px; font-weight: 800; color: var(--ink); }
.pile { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 10px; border: 1px solid var(--line); border-top-width: 4px; border-radius: 10px; background: var(--card); }
.pile-sale { border-color: var(--gold-line); border-top-color: var(--gold); background: var(--gold-soft); }
.m-silver .pile-sale { border-color: #d5dbe1; border-top-color: #7d8995; background: #f2f4f6; }
.pile-buy { border-top-color: var(--line-2); }
.pile-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 10px; }
.pile-h b { font-size: 15.5px; }
.pile-sale .pile-h b { color: var(--gold-ink); }
.m-silver .pile-sale .pile-h b { color: #27323d; }
.pile-h span { font-size: 12.5px; color: var(--ink-3); }
.pile-k { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 10px; }
.pile-k + .pile-k { padding-top: 8px; border-top: 1px dashed var(--line-2); }
.pile-kn { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.pile-kv { font-family: var(--font-num); font-size: 26px; font-weight: 800; line-height: 1.1; text-align: right; color: var(--ink); }
.pile-kv small { font-size: 14px; font-weight: 700; }
.pile-u { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.pile-locs { grid-column: 1 / -1; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.pile-from { margin: auto 0 0; font-size: 12.5px; color: var(--ink-3); }
.pile-arrow { display: flex; align-items: center; justify-content: center; }
.pile-arrow span { display: grid; justify-items: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.pile-arrow span::before { content: '←'; font-size: 22px; line-height: 1; color: var(--gold); }
.m-silver .pile-arrow span::before { color: #7d8995; }
.pile-r { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-top: 7px; border-top: 1px dashed var(--line); }
.pile-h + .pile-r { padding-top: 0; border-top: 0; }
.pile-rn { flex: 1 1 120px; min-width: 0; font-size: 14px; color: var(--ink-2); }
.pile-r b { font-family: var(--font-num); font-size: 17px; }
.pile-r small { flex-basis: 100%; text-align: right; font-size: 12.5px; color: var(--ink-3); }
.pile-r.mv .pile-rn { font-weight: 700; color: var(--ink); }
.pile-mv { margin-left: auto; }
.pile-k .pile-mv { grid-column: 1 / -1; justify-self: end; }
.ag-src.fs-kinds { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.pile-none { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.pile-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.pile-foot b { font-family: var(--font-num); }
.pile-foot small { color: var(--ink-3); }
@media (max-width: 760px) {
  .pile2 { grid-template-columns: minmax(0, 1fr); }
  .pile-arrow { padding: 4px 0; }
  .pile-arrow span { grid-auto-flow: column; gap: 6px; align-items: center; }
  .pile-arrow span::before { content: '↑'; font-size: 18px; }
  .pile-kv { font-size: 23px; }
}
.rav-box { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed var(--gold-line); border-radius: 12px; background: #fffdf6; }
.rav-f { gap: 8px 12px; }
.rav-pick { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--gold-line); border-radius: 12px; background: var(--gold-soft); }
.rav-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 130px; align-items: center; gap: 4px 10px; padding: 6px 0; border-top: 1px dashed var(--line); cursor: pointer; }
.rav-row:first-of-type { border-top: 0; }
.rav-n { min-width: 0; overflow-wrap: anywhere; }
.rav-l { color: var(--ink-2); white-space: nowrap; }
.rav-a { width: 130px; }
.rav-chip { color: var(--warn); font-weight: 700; }
.dl-owe.adv { background: var(--warn-soft); border-color: #f0cf96; }
.dl-owe.adv .dl-v { font-size: 22px; color: var(--warn); }
.bt-card { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--gold); border-radius: 12px; background: #fff; }
.bt-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.bt-h b { font-size: 16px; }
.bt-sel { width: auto; min-width: 110px; }
@media (max-width: 640px) {
  .rav-row { grid-template-columns: auto minmax(0, 1fr); }
  .rav-l { grid-column: 2; }
  .rav-a { grid-column: 2; width: 100%; }
}
.dy-bar { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.dy-t th, .dy-t td { white-space: nowrap; }
.dy-t td.num b { font-size: 15px; }
.dy-left { font-size: 12px; }
.dy-sort { font-size: 12px; color: var(--warn); text-decoration-color: var(--warn); }
.dy-tot td { border-top: 2px solid var(--line-2); background: var(--zebra); }
@media (max-width: 640px) {
  .dy-t th, .dy-t td { white-space: normal; overflow-wrap: anywhere; }
  .dy-t .dy-sort { text-align: left; }
  .dy-t tfoot td:first-child { grid-column: 1 / -1; }
}

.ota-list { display: grid; gap: 6px; max-height: min(50vh, 440px); overflow-y: auto; padding: 2px; }
.ota-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.ota-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--ok); }
.ota-row.on { border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 0 0 2px rgba(29, 122, 74, .18); }
.ota-who { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ota-st { font-size: 14px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.ota-st.on { color: var(--ok); }
@media (max-width: 420px) { .ota-row { grid-template-columns: auto minmax(0, 1fr); } .ota-st { grid-column: 2; } }

.rt-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--bg-2); }
.rt-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.rt-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: var(--card); cursor: pointer; min-width: 0; }
.rt-opt input { margin-top: 3px; flex: 0 0 auto; }
.rt-opt > span { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.rt-opt.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 2px var(--gold-line); }
.rt-row { align-items: flex-end; }
.rt-key { flex: 1 1 320px; min-width: 0; }
.rt-key .input:not(:placeholder-shown) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.rt-calc { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 10px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 8px 8px 0; color: var(--ink-2); }
.rt-calc b { color: var(--ink); }
.rt-preview { display: grid; gap: 2px; }
.bill-wv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bill-wv-k { font-size: 13.5px; color: var(--ink-2); }
.hist-print-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.hp-pick { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; cursor: pointer; white-space: nowrap; }
.hp-pick input { width: 18px; height: 18px; margin: 0; }
.split-list { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.split-row { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.split-row:last-child { border-bottom: 0; }
.split-row .check { display: flex; gap: 6px; align-items: flex-start; }
.xf { display: grid; gap: 10px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.xf-sec { display: grid; gap: 6px; min-width: 0; }
.xf-h { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.xf-chips button.xf-c { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; text-align: left; border-radius: 10px; max-width: 100%; overflow-wrap: anywhere; }
.xf-chips button.xf-c small { font-weight: 500; color: var(--ink-3); }
.xf-chips button.xf-c.on small { color: rgba(255, 240, 220, .85); }
.xf-chips button.xf-add { border-style: dashed; }
.xf-chips button.xf-add.on { border-style: solid; }
.xf-new { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg-2); }
.xf-banks button { min-height: 38px; }
.xf-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; }
.xf-in .input[data-xf="number"] { font-size: 18px; letter-spacing: .03em; }
.xf-check { min-height: 1.2em; }
.xf-cust { display: grid; gap: 6px; }
.xf-cust > span { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.xf-cust:has(> span) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.xf-done { display: inline-flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; font-size: 13.5px; color: var(--ink-2); }
.xf-sum { padding: 8px 10px; border-radius: 8px; background: var(--gold-soft); border-left: 3px solid var(--gold); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 600px) {
  .xf { padding: 8px 10px; }
  .xf-in { grid-template-columns: 1fr; }
  .xf-chips button.xf-c { width: 100%; }
}
.cs-xfm { margin-top: 10px; padding: 6px 10px 2px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg-2); }
.cs-xfm > .cs-row:first-of-type { border-top: 0; }
.badge.xf-b { background: #e8f0fb; color: #1d4f91; border-color: #c9daf3; }
.cs-xf td:first-child, .cs-xfl td { overflow-wrap: anywhere; }
.cpay { display: grid; gap: 6px; }
.cpay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.cpay-new { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 8px; border-radius: 10px; background: var(--bg-2); }
@media (max-width: 700px) { .cpay-new { grid-template-columns: 1fr; } }
.wt-t td.wt-c small, .wt-t td.num small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); line-height: 1.35; }
.wt-t td.wt-c b { font-size: 15.5px; }
.wt-t tr.grp td { background: var(--bg-2); font-weight: 700; color: var(--ink-2); font-size: 14px; }
.wt-k { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
@media print {
  .wt .ph-a, .wt .tb { display: none !important; }
}
.gs-card { gap: 10px; }
.gs-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.gs-h h3 { margin: 0; }
.gs-scan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.gs-scan .input { font-size: 20px; letter-spacing: .03em; }
.gs-bars { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gs-bars:empty { display: none; }
.gs-bars small { font-weight: 500; opacity: .8; }
.gs-lines { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gs-line { display: grid; grid-template-columns: minmax(0, 1fr) 128px 120px 40px; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--card); }
.gs-line:first-child { border-top: 0; }
.gs-line:nth-child(even) { background: var(--zebra); }
.gs-l-t { min-width: 0; overflow-wrap: anywhere; }
.gs-mk { display: grid; gap: 2px; }
.gs-mk .input { min-height: 38px; padding: 4px 8px; text-align: right; }
.gs-l-a { text-align: right; font-size: 16px; }
.gs-qty { display: flex; align-items: center; gap: 8px; justify-content: center; }
.gs-qty b { min-width: 24px; text-align: center; font-size: 17px; }
.gs-olds { display: grid; gap: 8px; }
.gs-old-row { display: grid; grid-template-columns: auto minmax(120px, 1fr) minmax(90px, 140px) auto 40px; gap: 8px; align-items: center; padding: 8px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg-2); }
.gs-old-row:has(.gs-pct) { grid-template-columns: auto minmax(110px, 1fr) 80px auto 40px; }
.gs-old-row:has(select) { grid-template-columns: auto minmax(130px, 1fr) minmax(90px, 140px) auto 40px; }
.gs-old-row .gs-l-a { min-width: 90px; }
.gs-ack { grid-column: 1 / -1; }
.gs-method { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.gs-fee { display: inline-flex; align-items: center; gap: 6px; }
.gs-fee .input { width: 110px; min-height: 38px; }
.gs-photos { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.gs-oldsum { padding: 8px 12px; border-radius: 10px; background: var(--gold-soft); border-left: 4px solid var(--gold); font-size: 15px; line-height: 1.5; }
.gs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.gs-grid.gs-buyer { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr); }
.gs-pay { border-top: 4px solid var(--gold); }
.gs-kv { font-size: 15.5px; }
.gs-net { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); }
.gs-net.out { background: var(--brand-soft); color: var(--brand-ink); }
.gs-net span { font-weight: 700; font-size: 16px; }
.gs-net b { font-size: 30px; font-weight: 800; letter-spacing: -.3px; }
.gs-net small { font-size: 15px; font-weight: 600; }
.gs-picks { display: grid; gap: 6px; max-height: 56vh; overflow: auto; }
.gs-pick { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font: inherit; color: inherit; min-height: 48px; }
@media (hover: hover) { .gs-pick:hover { background: var(--hover); border-color: var(--gold-line); } }
.gs-pick.picked, .gs-pick:disabled { opacity: .45; cursor: default; }
.gs-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.gt-ck { width: 36px; }
.gt-ck input, .gt-t th input[type="checkbox"] { width: 20px; height: 20px; }
.gt-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 8px; z-index: 3; padding: 8px 12px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); box-shadow: 0 4px 14px rgba(60, 40, 20, .1); }
.gt-rt td { padding: 4px; vertical-align: middle; }
.gt-rt .input { min-height: 38px; padding: 4px 8px; }
.gt-rt td:nth-child(1) .input { min-width: 128px; }
.gt-rt td:nth-child(2) .input { min-width: 120px; }
.gt-rt td:nth-child(3) .input { min-width: 96px; }
.gt-rt td:nth-child(4) .input, .gt-rt td:nth-child(5) .input, .gt-rt td:nth-child(6) .input { width: 96px; }
.gt-rt td:nth-child(7) .input { width: 64px; }
.gt-bars-in { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.gt-bars-in summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.gt-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.gt-bgrid label { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: center; }
.gt-bgrid .input { min-height: 38px; padding: 4px 8px; }
@media (max-width: 700px) {
  .gs-line { grid-template-columns: minmax(0, 1fr) auto; }
  .gs-line .gs-mk, .gs-line .gs-qty { grid-column: 1; }
  .gs-line .gs-l-a { grid-column: 2; grid-row: 2; }
  .gs-line > .btn { grid-column: 2; grid-row: 1; justify-self: end; }
  .gs-old-row, .gs-old-row:has(.gs-pct), .gs-old-row:has(select) { display: flex; flex-wrap: wrap; align-items: center; }
  .gs-old-row > .chips, .gs-old-row > .gs-ack { flex: 1 1 100%; }
  .gs-old-row > .gs-unit, .gs-old-row > select { flex: 1 1 110px; }
  .gs-old-row .gs-l-a { flex: 1 1 auto; min-width: 0; }
  .gs-old-row > .btn { flex: none; }
  .gs-grid, .gs-grid.gs-buyer { grid-template-columns: 1fr; }
  .gs-pick { grid-template-columns: minmax(0, 1fr) auto; }
  .gs-pick span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .gs-net b { font-size: 26px; }
}
.gs .input.need { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 149, 37, .25); background: var(--gold-soft); }
.gs-unit { position: relative; display: block; min-width: 0; }
.gs-unit .input { width: 100%; padding-right: 46px; }
.gs-unit span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; pointer-events: none; }
.gs-unit.gs-pct .input { padding-right: 28px; }
.warn-t { color: var(--warn); }
@keyframes gsNew { from { background: var(--gold-hi); } to { background: transparent; } }
.gs-line.gs-new, .gt-t tr.gt-hit td { animation: gsNew 1.6s ease-out; }
.gt-t tr.gt-hit td { box-shadow: inset 0 0 0 9999px rgba(255, 231, 160, .25); }
.gs-mk .linkish, .gt-mkc .linkish { font-size: 12.5px; }
.gt-mkc small { display: block; font-size: 11.5px; margin-top: 2px; white-space: nowrap; }
.gt-new { display: inline-block; margin-top: 2px; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); border: 1px solid var(--gold-line); }
.gt-acts { white-space: nowrap; }
.gt-acts .btn + .btn { margin-left: 4px; }
.cg-cats { flex-wrap: wrap; }
.cg-cats button small { font-weight: 500; opacity: .75; }
.cg-cats button.cg-offc { text-decoration: line-through; opacity: .6; }
.cg-cats .cg-add { border-style: dashed; }
.cg-catbar { display: flex; align-items: flex-end; gap: 10px 14px; flex-wrap: wrap; margin: 10px 0; }
.cg-catbar .field { margin: 0; min-width: 200px; }
.cg-wrap { max-height: 70vh; overflow: auto; }
.cg-t th, .cg-t td { padding: 4px; vertical-align: middle; }
.cg-t thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-2); white-space: nowrap; }
.cg-t .cg-name { position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 170px; }
.cg-t .cg-name .input { min-width: 150px; }
.cg-t td .input.num { width: 82px; min-height: 36px; padding: 4px 6px; text-align: right; }
.cg-t td.cg-per .input.num { background: var(--bg-2); }
.cg-t td.cg-x { white-space: nowrap; }
.cg-t tr.cg-off td { opacity: .55; }
.cg-sizes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cg-size { display: inline-flex; gap: 4px; align-items: center; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.cg-size > .input { width: 110px; min-height: 36px; }
.cg-size .gs-unit .input { width: 92px; min-height: 36px; padding-right: 30px; }
.gs-sct-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.gs-sct-codes { display: flex; gap: 24px; justify-content: center; align-items: flex-end; flex-wrap: wrap; padding: 12px; background: #fff; border: 1px dashed var(--line-2); border-radius: 12px; }
.gs-sct-codes figure { margin: 0; text-align: center; }
.gs-sct-codes figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.gs-sct-codes .qr { width: 150px; height: 150px; }
.gs-sct-bar { width: 260px; height: 70px; display: block; }
.gs-sct-out { padding: 10px 12px; border-radius: 10px; background: var(--bg-2); min-height: 48px; }

.cf-box { margin-bottom: 2px; }
.cf-box > label { font-weight: 700; }
.cf-list { margin-top: 6px; max-height: 320px; overflow: auto; }
.cf-item .t { font-weight: 600; }
.cf-msg { margin: 6px 0 0; }
.cf-card { background: var(--ok-soft); border-color: #bfe0cc; margin-bottom: 6px; }
.cf-rows { margin-top: 6px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.cf-cardimg { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 6px; width: 100%; text-align: left; background: var(--card); border: 1px dashed var(--line); border-radius: 10px; cursor: zoom-in; color: inherit; font: inherit; }
.cf-cardimg img { width: 128px; height: auto; flex: none; border-radius: 6px; border: 1px solid var(--line); }
.cf-nocard { margin-top: 8px; }
.cf-copy { margin-top: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--gold-line); border-radius: 10px; background: var(--gold-soft); font-weight: 600; line-height: 1.4; }
.cf-copy input { flex: none; margin-top: 1px; }
.badge.sale { background: var(--info-soft); color: var(--info); border: 1px solid #c9d6f6; }
.cs-tl td.m-full { overflow-wrap: anywhere; min-width: 220px; }
.cs-tl .cs-tl-tm { display: none; }
.cs-tl td.cs-tl-time { color: var(--ink-2); font-family: var(--font-num); }
.cs-tl td.cs-tl-bal { color: var(--ink-2); white-space: nowrap; }
.cs-tl tr.cs-tl-open td { background: var(--bg-2); }
.cs-tl tfoot td { background: var(--bg-2); }
.cs-tl tfoot tr:first-child td { border-top: 2px solid var(--line-2); }
.cs-tl tfoot tr.end td { background: var(--gold-soft); }
.cs-tl tr.cs-tl-more td { text-align: center; }
.cs-tl tr.cs-tl-r.move td.m-full > b, .cs-tl tr.cs-tl-r.consign td.m-full > b { color: var(--ink-2); }
@media (max-width: 640px) {
  .cs-tl.mcard tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-tl.mcard td.cs-tl-time { display: none; }
  .cs-tl.mcard .cs-tl-tm { display: inline-block; margin-right: 6px; color: var(--ink-3); font-family: var(--font-num); font-weight: 700; }
  .cs-tl.mcard td.m-full { min-width: 0; }
  .cs-tl.mcard tr.cs-tl-more td { text-align: left; }
  .cs-tl.mcard tfoot tr td, .cs-tl.mcard tr.cs-tl-open td { background: transparent; border: 0; }
  .cs-tl.mcard tfoot tr, .cs-tl.mcard tr.cs-tl-open { background: var(--bg-2); }
  .cs-tl.mcard tfoot tr:first-child { border-top: 2px solid var(--line-2); }
  .cs-tl.mcard tfoot tr.end { background: var(--gold-soft); }
}
.wt-t tr.wt-bin td { background: var(--zebra); }
.wt-t tr.wt-bin td.m-full { padding-left: 22px; }
.wt-t tr.wt-bin .stk-bin { font-size: 12.5px; min-width: 24px; height: 22px; margin-right: 6px; vertical-align: 1px; }
@media (max-width: 640px) { .wt-t.mcard tr.wt-bin { background: var(--zebra); } .wt-t.mcard tr.wt-bin td { background: transparent; } .wt-t tr.wt-bin td.m-full { padding-left: 0; } }
.wt-t tr.wt-bar td { background: var(--gold-soft); }
.wt-t tr.wt-bar .stk-bin { font-size: 12.5px; min-width: 24px; height: 22px; margin-right: 6px; vertical-align: 1px; }
@media (max-width: 640px) { .wt-t.mcard tr.wt-bar { background: var(--gold-soft); } .wt-t.mcard tr.wt-bar td { background: transparent; } }
.mlt-bins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mlt-bins button { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 58px; padding: 8px 12px; font-size: 16px; font-weight: 700; text-align: left; }
.mlt-bins button .stk-bin { margin-right: 2px; }
.mlt-bins button .faint { font-size: 13px; font-weight: 500; }
.mlt-bins button.mlt-ab { grid-column: 1 / -1; min-height: 50px; }
.mlt-why { margin: 2px 0 0; text-align: right; }
.mlt-bins button b.num { margin-left: auto; font-size: 17px; }
details.mlt-orn > summary, details.mx-orn > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
details.mlt-orn > summary::-webkit-details-marker, details.mx-orn > summary::-webkit-details-marker { display: none; }
details.mlt-orn > summary::after, details.mx-orn > summary::after { content: '▾'; margin-left: auto; color: var(--ink-3); }
details.mlt-orn[open] > summary::after, details.mx-orn[open] > summary::after { content: '▴'; }
details.mlt-orn[open] > summary, details.mx-orn[open] > summary { margin-bottom: 8px; }
details.mx-orn { border: 1px dashed rgba(176, 106, 34, .45); border-radius: 10px; padding: 8px 12px; background: rgba(176, 106, 34, .05); }
details.mx-orn > summary { font-weight: 700; color: #8a4b12; }
.mlt-t input.input.num, details.mx-orn input.input.num { width: 110px; max-width: 100%; min-height: 38px; padding: 6px 8px; text-align: right; }
.mlt-t td .btn.small { white-space: nowrap; }
@media (max-width: 640px) {
  .mlt-bins button { min-height: 54px; font-size: 15px; padding: 8px 10px; }
  .mlt-bins button .faint { flex-basis: 100%; order: 3; }
  .mlt-t.mcard input.input.num, details.mx-orn input.input.num { width: 100%; }
  .mlt-t.mcard td.mlt-in { grid-column: 1 / -1; }
}
.mlt-t td.mlt-in b.num { white-space: nowrap; }
.xf-reg { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; font-weight: 700; vertical-align: 1px; }
.kf-proxy { border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 12px; }
.kf-proxy summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.kf-proxy[open] { background: var(--bg-2); }
