:root {
  --ink: #1E2B45;        /* navy, like the classic leather trim */
  --ink-2: #4A5672;
  --ink-3: #7C869B;
  --paper: #EDEFF2;
  --card: #FFFFFF;
  --line: #D9DDE4;
  --leather: #9A5B2C;    /* saddle tan: the hang tag */
  --leather-dark: #7A4520;
  --brass: #C9A15B;
  --profit: #2D7A57;
  --loss: #B23A3A;
  --focus: #3B6FD8;
  --radius-s: 6px;
  --radius-m: 10px;
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.num, td.n, .kpi b { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 19px; line-height: 1.25; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--ink); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.pos { color: var(--profit); }
.neg { color: var(--loss); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side {
  background: var(--ink); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh;
}
.side a { color: #C9D0DE; text-decoration: none; padding: 9px 12px; border-radius: var(--radius-s); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.side a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side a.on { background: rgba(255,255,255,.12); color: #fff; }
.side .brand { font-family: var(--font-display); font-size: 21px; font-weight: 700; color: #fff; margin-bottom: 18px; padding-left: 8px; }
.brand svg { width: 26px; height: 26px; }
.brand svg path { fill: var(--leather); }
.brand svg circle { fill: var(--ink); }
.badge { background: var(--brass); color: var(--ink); font-size: 12px; font-weight: 700; border-radius: 99px; padding: 0 8px; margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 8px; }
.side-foot .muted { color: #93A0B8; }

main { padding: 28px 32px 60px; max-width: 1240px; width: 100%; }
main:focus, main:focus-visible { outline: none; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head p { margin-top: 4px; }

/* ---------- controls ---------- */
.btn {
  font: 600 14px/1 var(--font-body); border-radius: var(--radius-s); padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
}
.btn:hover { background: #2A3A5C; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-light { background: transparent; color: inherit; border-color: currentColor; }
.btn-light:hover { background: rgba(127,127,127,.12); }
.side .btn-light { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { background: #F3F4F7; }
.btn-src { background: var(--leather); border-color: var(--leather); }
.btn-src:hover { background: var(--leather-dark); }
.btn-sm { padding: 7px 10px; font-size: 13px; }
.btn-danger { background: transparent; color: var(--loss); border-color: #E3B7B7; }
input, select, textarea {
  font: inherit; color: inherit; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 9px 10px; background: #fff; min-width: 0;
}
input[type=number] { width: 90px; }
label { font-weight: 500; font-size: 14px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
/* iPhone Safari sizes a dropdown to its longest choice (a long show title); that widened the page and Safari
   zoomed the whole screen out to fit it. Fields and dropdowns never get wider than the screen. */
select { max-width: 100%; min-width: 0; }
html, body { overflow-x: clip; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 8px 12px; font: 500 13px var(--font-body); cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed=true] { background: var(--ink); color: #fff; }

/* ---------- panels ---------- */
.panel { background: var(--card); border-radius: var(--radius-m); padding: 20px 22px; border: 1px solid var(--line); }
.panel h2 { margin-bottom: 4px; }
.panel .sub { color: var(--ink-3); font-size: 13px; margin-bottom: 14px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g-wide { grid-template-columns: 3fr 2fr; }
.stack { display: grid; gap: 18px; }

/* ---------- the hang tag (dashboard hero) ---------- */
.hero { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 26px; align-items: stretch; margin-bottom: 18px; }
.tag {
  position: relative; color: #FFF8EF; padding: 26px 30px 24px 74px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.10), transparent 60%),
    var(--leather);
  clip-path: polygon(46px 0, 100% 0, 100% 100%, 46px 100%, 0 50%);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  min-height: 210px; display: flex; flex-direction: column; justify-content: center;
}
.tag::before { /* grommet */
  content: ""; position: absolute; left: 30px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 4px var(--brass);
}
.tag::after { /* stitching */
  content: ""; position: absolute; inset: 9px 10px 9px 56px; border: 1.5px dashed rgba(255,248,239,.35);
  border-radius: 0 6px 6px 0; pointer-events: none;
}
.tag .label { font-size: 14px; opacity: .85; }
.tag .big { font-family: var(--font-display); font-size: 58px; line-height: 1; font-weight: 700; margin: 8px 0 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tag .parts { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 32px; justify-content: start; font-size: 13px; }
.tag .parts b { display: block; font-size: 17px; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.tag.loss { background: #6E3A3A; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi:nth-child(3n) { border-right: 0; }
.kpi:nth-last-child(-n+3) { border-bottom: 0; }
.kpi span { display: block; font-size: 13px; color: var(--ink-3); }
.kpi b { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.kpi em { font-style: normal; font-size: 12px; color: var(--ink-3); display: block; }

.chart-box { position: relative; height: 280px; }
.chart-box.short { height: 230px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid #EEF0F3; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
td .title { font-weight: 500; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #EEF0F3; color: var(--ink-2); white-space: nowrap; }
.pill.sold { background: #DDEFE6; color: var(--profit); }
.pill.in_stock { background: #F3E6D9; color: var(--leather-dark); }
.pill.unmatched { background: #FBEBD0; color: #8A5A00; }
.pill.sourcing { background: #F3E6D9; color: var(--leather-dark); }
.pill.supplies { background: #E3E8F3; color: var(--ink); }
.bar { height: 8px; background: #EEF0F3; border-radius: 99px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; background: var(--profit); border-radius: 99px; }
.empty { padding: 26px; text-align: center; color: var(--ink-3); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { flex: 1 1 220px; }
.editable { border: 1px dashed transparent; padding: 3px 5px; margin: -4px -6px; border-radius: 4px; cursor: text; display: inline-block; min-width: 40px; }
.editable:hover { border-color: var(--line); background: #FAFBFC; }

/* ---------- questions ---------- */
.q { display: grid; grid-template-columns: 1fr auto; gap: 14px 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid #EEF0F3; }
.q:last-child { border-bottom: 0; }
.q .what { font-weight: 600; font-size: 16px; }
.q .amt { font-family: var(--font-display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.q .answers { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.q .more { grid-column: 1 / -1; display: none; gap: 12px; align-items: end; flex-wrap: wrap; background: #FAF6F1; padding: 14px; border-radius: var(--radius-s); }
.q.open .more { display: flex; }
.check { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; font-size: 13.5px; }
.sugg { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
.sugg button { text-align: left; max-width: 320px; }
.sugg small { display: block; color: var(--ink-3); font-weight: 400; margin-top: 3px; }
.done-note { text-align: center; padding: 40px 10px; }
.done-note h2 { margin-bottom: 6px; }

/* ---------- connect ---------- */
.conn { display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding: 22px 0; border-top: 1px solid var(--line); }
.conn:first-of-type { border-top: 0; padding-top: 6px; }
.conn h2 { font-size: 18px; }
.status { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; margin-top: 6px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status.ok::before { background: var(--profit); }
.status.warn::before { background: #D49A1E; }
.steps { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.steps li { margin-bottom: 4px; }
details { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; background: #FBFBFC; }
details + details { margin-top: 8px; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 10px; }
.acct { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #F0F1F4; font-size: 14px; }
.bankcard { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.log { font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.demo-banner { background: #FBEBD0; border: 1px solid #EFD39E; color: #6B4700; padding: 10px 14px; border-radius: var(--radius-s); margin-bottom: 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius-s); max-width: 420px; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
.toast.on { transform: none; opacity: 1; }
.toast.err { background: var(--loss); }
dialog { border: 0; border-radius: var(--radius-m); padding: 0; width: min(640px, 94vw); max-height: 86vh; }
dialog::backdrop { background: rgba(30,43,69,.45); }
#modalBody { padding: 22px; display: grid; gap: 14px; }
.pick-list { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.pick-list button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; display: flex; justify-content: space-between; gap: 10px; }
.pick-list button:hover { border-color: var(--ink); }

@media (max-width: 980px) {
  .hero, .g2, .g-wide { grid-template-columns: 1fr; }
  .conn { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .side .brand { width: 100%; margin-bottom: 6px; }
  .side-foot { margin: 0; width: 100%; grid-template-columns: auto 1fr; align-items: center; }
  main { padding: 20px 16px 50px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .tag .big { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* keep wide tables and button groups from pushing the page sideways */
.shell { grid-template-columns: 228px minmax(0, 1fr); }
main, .grid > *, .hero > *, .panel { min-width: 0; }
.seg { max-width: 100%; overflow-x: auto; }
.seg button { white-space: nowrap; }
@media (max-width: 980px) { .hero, .g2, .g-wide { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { gap: 2px 4px; }
  .side a { padding: 7px 10px; }
  .demo-banner { font-size: 14px; }
}

.tag .alltime { margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(255,248,239,.4); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tag .alltime + .alltime { margin-top: 6px; padding-top: 0; border-top: 0; }
.addon-pill { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.tag .alltime b { font-family: var(--font-display); font-size: 18px; font-variant-numeric: tabular-nums; }
tr.clickrow { cursor: pointer; }
tr.clickrow:hover td { background: #F7F8FA; }
a.title { text-decoration: none; }
a.title:hover { text-decoration: underline; }
.warn-text { color: #8A5A00; }

/* ---------- live show ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #E5484D; margin-left: auto; position: relative; flex: none; }
.live-dot[hidden] { display: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #E5484D; animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { display: none; } }
.live-pill { display: inline-block; vertical-align: 2px; margin-left: 6px; font: 700 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  background: #FFF8EF; color: var(--leather-dark); padding: 3px 7px; border-radius: 99px; }
.tag .label { overflow-wrap: anywhere; }
.tag-link { color: inherit; text-decoration: none; position: relative; z-index: 1; }
.tag-link:hover { text-decoration: underline; }
.live-ago { min-height: 1.5em; }
@media (max-width: 760px) { .side .live-dot { margin-left: 4px; } }

/* ---------- quick add ---------- */
textarea { width: 100%; resize: vertical; line-height: 1.45; }
.qa-costs { display: grid; gap: 6px; max-height: 40vh; overflow: auto; }
.qa-line { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #EEF0F3; }
.qa-line:last-child { border-bottom: 0; }
.qa-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qa-line input { width: 110px; flex: none; }
#modalBody [hidden] { display: none; }
.nowrap { white-space: nowrap; }
.live-kpis .kpi { display: flex; flex-direction: column; justify-content: center; }
/* phones: each sale becomes a small card instead of a table row that scrolls sideways */
@media (max-width: 760px) {
  .live-tbl thead { display: none; }
  .live-tbl tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid #EEF0F3; }
  .live-tbl tr:last-child { border-bottom: 0; }
  .live-tbl td { border: 0; padding: 0; }
  .live-tbl td:first-child { grid-column: 1 / -1; }
  .live-tbl td.n { text-align: left; white-space: normal; }
  .live-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--ink-3); }
}
@media (max-width: 760px) { .live-kpis .kpi:last-child { grid-column: 1 / -1; } }
a.btn { text-decoration: none; display: inline-block; }

/* ---------- toast action (Undo) ---------- */
.toast.has-act { pointer-events: auto; display: flex; gap: 14px; align-items: center; }
.toast-act { font: 600 14px/1 var(--font-body); background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: var(--radius-s); padding: 7px 10px; cursor: pointer; flex: none; }
.toast-act:hover { background: rgba(255,255,255,.12); }

/* ---------- match bags ---------- */
.m-tools { margin-bottom: 18px; padding-bottom: 14px; }
.m-tools .toolbar { margin-bottom: 8px; }
.m-tools select { flex: none; }
.m-min { width: 64px !important; padding: 5px 6px; }
.m-bulk { justify-content: space-between; }
.m-hint { margin-left: auto; }
.m-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; align-items: start; }
.m-list { padding: 8px 10px; max-height: calc(100vh - 120px); overflow: auto; }
.m-right { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.m-right[hidden] { display: none; }
.m-show { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 12px 8px 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.m-show b { font-family: var(--font-display); font-size: 15px; }
.m-sale, .m-cand { width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: var(--radius-s);
  padding: 9px 8px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; align-items: flex-start; }
.m-sale { border-bottom-color: #EEF0F3; border-radius: 0; }
.m-sale:hover, .m-cand:hover { background: #F7F8FA; }
.m-sale.on { background: #F3E6D9; border-color: var(--leather); border-radius: var(--radius-s); }
.m-t { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.m-t b { font-weight: 600; }
.m-amt { display: grid; text-align: right; white-space: nowrap; font-weight: 600; flex: none; }
.m-head { margin-bottom: 12px; }
.m-head .what { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
#mPick { display: grid; gap: 12px; }
#mPick > input[type=search] { width: 100%; }
.m-cands { display: grid; gap: 6px; }
.m-cand { border-color: var(--line); background: #fff; }
.m-cand.hi { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--leather); background: #FAFBFC; }
.m-acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid #EEF0F3; padding-top: 12px; }
#mPick.m-inline { margin: 4px 0 12px; padding: 12px; background: #FAF6F1; border-radius: var(--radius-s); border: 1px solid #EBDCCB; }
.m-est-kpis .kpi { border-bottom: 0; }
@media (max-width: 980px) { .m-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 760px) {
  .m-grid { grid-template-columns: minmax(0, 1fr); }
  .m-list { max-height: none; overflow: visible; padding: 6px 8px; }
  .m-hint { display: none; }
  .m-est-kpis { grid-template-columns: 1fr; }
  .m-est-kpis .kpi { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .m-est-kpis .kpi:last-child { border-bottom: 0 !important; }
  .toast { left: 16px; right: 16px; max-width: none; }
}
#mPick.m-inline .m-head .what { display: none; } /* the sale is right above */

/* ---------- shows page: upcoming + past show cards ---------- */
.sh-sec { margin-bottom: 26px; }
.sh-sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sc-title { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* upcoming: outlined, brass accent, no money */
.up-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 14px;
  border: 1.5px solid var(--brass); border-left-width: 5px; border-radius: var(--radius-m); background: #FFFCF6; min-width: 0; }
.up-rel { align-self: flex-start; font: 700 11px/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase;
  color: var(--leather-dark); background: #F6EBD6; padding: 4px 8px; border-radius: 99px; }
.up-rel.soon { background: var(--leather); color: #FFF8EF; }
.up-date { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.up-link { margin-top: auto; padding-top: 6px; align-self: flex-start; font-weight: 600; font-size: 14px; color: var(--leather-dark); }
.up-link:hover { color: var(--ink); }
.up-empty { padding: 18px; border: 1.5px dashed var(--line); border-radius: var(--radius-m); text-align: center; background: var(--card); }
.up-empty a { font-weight: 600; color: var(--leather-dark); }
/* past: whole card is the link */
.show-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--card); color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius-m); min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.show-card:hover { border-color: var(--ink-3); box-shadow: 0 4px 14px rgba(30,43,69,.08); transform: translateY(-1px); }
.show-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-m); }
.sc-head { display: grid; gap: 2px; margin-bottom: 8px; }
.sc-date { font-size: 13px; color: var(--ink-3); }
.sc-profit { font-family: var(--font-display); font-size: 32px; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sc-label { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.sc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 10px; border-top: 1px solid #EEF0F3; }
.sc-stats dt { font-size: 11.5px; color: var(--ink-3); }
.sc-stats dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-foot { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; margin-top: 10px; }
/* marketplace (not a show): quieter */
.show-card.market { background: #F7F8FA; border-style: dashed; }
.show-card.market .sc-profit { font-size: 24px; }
.show-card.market .sc-title { color: var(--ink-2); }
@media (max-width: 1100px) { .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sh-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .show-card:hover { transform: none; } }
@media (max-width: 760px) { .sh-kpis .kpi:last-child { grid-column: 1 / -1; border-bottom: 0; } }

/* ---------- live show: countdown to the next show ---------- */
.cd-panel { text-align: center; padding: 34px 22px 30px; }
.cd-panel .cd-title { font-size: 24px; margin: 6px auto 4px; max-width: 760px; }
.cd-panel .cd-title a { text-decoration: none; }
.cd-panel .cd-title a:hover { text-decoration: underline; }
.countdown { display: flex; justify-content: center; gap: 14px; margin: 26px 0 22px; flex-wrap: wrap; }
.cd-unit { min-width: 96px; padding: 14px 10px 10px; border-radius: var(--radius-m); background: var(--leather); color: #FFF8EF; }
.cd-unit b { display: block; font-family: var(--font-display); font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-unit span { display: block; font-size: 12.5px; margin-top: 6px; opacity: .85; }
.cd-soon { font-family: var(--font-display); font-size: 30px; color: var(--leather); }
@media (max-width: 760px) { .cd-unit { min-width: 70px; } .cd-unit b { font-size: 34px; } }

/* ---------- prep a show ---------- */
.up-acts { margin-top: auto; padding-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.up-acts .up-link { margin-top: 0; padding-top: 0; }
.pp-loading { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 34px 20px; color: var(--ink-2); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--leather); animation: pp-spin .8s linear infinite; flex: none; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
.pp-head { display: grid; gap: 12px; margin-bottom: 14px; }
.pp-show { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.pp-show h2 { overflow-wrap: anywhere; }
.pp-show h2 a { text-decoration: none; }
.pp-show h2 a:hover { text-decoration: underline; }
.pp-prog { display: grid; gap: 6px; }
.pp-prog-text { font-size: 14px; }
.pp-bar { height: 10px; }
.pp-list { display: grid; gap: 10px; }
.pp-list.only-missing .pp-row.linked, .pp-list.only-missing .pp-row.skipped { display: none; }
.pp-row.skipped { border-left-color: var(--line); opacity: .8; padding-top: 10px; padding-bottom: 10px; }
.pp-row.skipped .pp-img { width: 48px; height: 48px; }
.pp-skipline { justify-content: space-between; gap: 8px; }
.pp-alldone[hidden] { display: none; }
.pp-alldone { margin-top: 10px; }
.pp-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--card);
  border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius-m); }
.pp-row.linked { border-left-color: var(--profit); }
.pp-img { width: 72px; height: 72px; border-radius: var(--radius-s); object-fit: cover; display: block; background: #F3EEE8; flex: none; }
.pp-noimg { display: grid; place-items: center; font: 700 26px/1 var(--font-display); color: var(--ink-3); background: #EEF0F3; border: 1px dashed var(--line); }
.pp-main { display: grid; gap: 10px; min-width: 0; }
.pp-title { font-weight: 600; font-size: 15.5px; overflow-wrap: anywhere; display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: baseline; }
.pp-title a { text-decoration: none; }
.pp-title a:hover { text-decoration: underline; }
.pp-linked { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #EEF6F1; border-radius: var(--radius-s); padding: 8px 10px; }
.pp-linked .pp-img { width: 48px; height: 48px; font-size: 18px; }
.pp-linked-t { display: grid; flex: 1 1 200px; min-width: 0; }
.pp-linked-t b { color: var(--profit); font-weight: 600; }
.pp-linked-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pp-pick { display: grid; gap: 8px; }
.pp-sugg { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.pp-cand { display: flex; gap: 10px; align-items: flex-start; text-align: left; font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px; cursor: pointer; min-width: 0; }
.pp-cand:hover { border-color: var(--ink); background: #FAFBFC; }
.pp-cand:disabled { opacity: .5; }
.pp-cand-t { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.pp-cand-amt { font-family: var(--font-display); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pp-cand-amt span { font: 600 14px var(--font-body); color: var(--ink-2); }
.pp-cand-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-cand .pill { justify-self: start; margin-top: 2px; }
.pp-claude { margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: #F4F1FB; border: 1px solid #E2DAF5; font-size: 14px; }
.pp-claude p { margin: 0 0 6px; } .pp-claude p:last-child { margin: 0; }
.pp-claude .spin, .pp-look .spin { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.pp-look { margin: 8px 0 0; } .pp-look:empty { display: none; }
.pp-more { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid #EEF0F3; }
.pp-new { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pp-dollar { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.pp-new input[type=number] { width: 86px; padding: 6px 8px; }
.pp-vendor { width: 150px; padding: 6px 8px; }
.pp-find-for { display: flex; gap: 12px; align-items: center; overflow-wrap: anywhere; }
.pp-find button { align-items: center; }
.pp-find .pp-img { width: 56px; height: 56px; font-size: 20px; }
.pp-find-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pp-find-amt { font-weight: 700; flex: none; }
.pp-moresugg { display: none; }
/* tap a photo to see it bigger */
.pp-photo, .pp-cand-wrap { position: relative; }
.pp-photo { align-self: start; }
.pp-photo.sm { display: block; flex: none; }
.pp-cand-wrap { display: grid; min-width: 0; }
.pp-cand-wrap .pp-cand { height: 100%; }
.pp-img { cursor: zoom-in; }
.pp-noimg { cursor: default; }
.pp-zoom { position: absolute; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  background: rgba(30,43,69,.82); color: #fff; border: 2px solid #fff; cursor: zoom-in; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pp-zoom:hover, .pp-zoom:focus-visible { background: var(--ink); }
.pp-photo > .pp-zoom { right: -6px; bottom: -6px; }
.pp-cand-wrap > .pp-zoom { left: 58px; top: 58px; }
/* Browse all photos */
.pb-head { display: flex; gap: 12px; align-items: center; }
.pb-head .pp-img { width: 64px; height: 64px; cursor: default; }
.pb-tools { gap: 8px 12px; }
.pb-tools input[type=search] { flex: 1 1 220px; min-width: 0; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 62vh; overflow-y: auto; padding: 2px; }
.pb-tile { display: grid; gap: 4px; align-content: start; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 6px; cursor: zoom-in; min-width: 0; }
.pb-tile:hover, .pb-tile:focus-visible { border-color: var(--ink); }
.pb-tile img, .pb-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: #F3EEE8; display: block; }
.pb-noimg { display: grid; place-content: center; text-align: center; font: 700 30px/1 var(--font-display); color: var(--ink-3); background: #EEF0F3; }
.pb-noimg small { font: 500 12px var(--font-body); margin-top: 4px; }
.pb-cap { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-name { font-size: 12px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
dialog.wide { width: min(1000px, 96vw); max-height: 94vh; }
.zm-h { font-size: 17px; margin: 0; overflow-wrap: anywhere; }
.zm-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.zm-pair.one { grid-template-columns: minmax(0, 1fr); }
.zm-fig { margin: 0; display: grid; gap: 6px; }
.zm-fig img, .zm-none { width: 100%; height: min(62vh, 520px); object-fit: contain; background: #F3EEE8; border-radius: var(--radius-s); display: block; }
.zm-none { display: grid; place-content: center; text-align: center; gap: 6px; font: 700 54px/1 var(--font-display); color: var(--ink-3); background: #EEF0F3; }
.zm-none small { font: 500 14px var(--font-body); }
.zm-fig figcaption { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.zm-info { margin: 0; display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: baseline; }
.zm-info b { font-size: 18px; }
.zm-acts { gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) {
  /* phones: photo + title on top, the choices full width underneath */
  .pp-row { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .pp-main { display: contents; }
  .pp-title { align-self: center; }
  .pp-linked, .pp-pick { grid-column: 1 / -1; }
  .pp-img, .pp-cand .pp-img { width: 64px; height: 64px; }
  .pp-sugg { grid-template-columns: minmax(0, 1fr); }
  .pp-sugg:not(.all) .pp-cand-wrap:nth-child(n+4) { display: none; }
  .pp-cand-wrap > .pp-zoom { left: 50px; top: 50px; }
  .zm-pair { gap: 8px; }
  .pb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 58vh; }
  .zm-fig img, .zm-none { height: 44vh; }
  .pp-moresugg { display: inline-block; justify-self: start; }
  .pp-vendor { flex: 1 1 120px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* photos in Inventory and Match bags */
.inv-ph { width: 64px; padding-right: 0 !important; }
.inv-zoom { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; border-radius: var(--radius-s); }
.inv-img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-s); display: block; background: #F3EEE8; }
.inv-noimg { display: grid; place-items: center; font: 700 20px/1 var(--font-display); color: var(--ink-3); background: #EEF0F3; border: 1px dashed var(--line); }
.m-cand { display: flex; gap: 10px; align-items: center; }
.m-img { width: 48px; height: 48px; flex: none; object-fit: cover; border-radius: var(--radius-s); background: #F3EEE8; cursor: zoom-in; }
.m-img.inv-noimg { cursor: default; font-size: 18px; }
.m-cand .m-t { flex: 1; min-width: 0; }
.pv-img { width: 100%; height: min(70vh, 640px); object-fit: contain; background: #F3EEE8; border-radius: var(--radius-s); display: block; }
/* By vendor */
.vend-bar { margin-top: 6px; max-width: 220px; height: 6px; }
.vend-bar i.neg { background: var(--loss); }
.watch-btn { display: inline-flex; width: auto; justify-self: start; margin: -2px 0 12px; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: inherit; }

/* bundles + show cost */
.pp-bun { display: block; color: var(--ink-2); }
.pp-unbun { border: 0; background: none; color: var(--loss); font-size: 15px; line-height: 1; padding: 0 4px; cursor: pointer; }
.pp-costsum { color: var(--ink-2); }
.cs-panel { margin-top: 16px; text-align: left; }
.cs-tbl td.n, .cs-tbl th.n { text-align: right; }
.cs-tbl .pp-img { width: 40px; height: 40px; }
.cs-tot { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 6px 0 10px; }
.cs-tot b { font-size: 18px; }

/* sourcing cost on upcoming show cards */
.up-cost { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 2px 0 12px; padding: 8px 10px; background: #fff; border: 1px solid #EFE6D8; border-radius: var(--radius-s); }
.up-cost dt { font-size: 11.5px; color: var(--ink-3); }
.up-cost dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.up-nocost { margin: 0 0 12px; }

/* ---------- last show recap (Live page, after a show ends) ---------- */
.recap h2 { margin: 0; }
.recap .kpi em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.recap-lines { margin-top: 16px; }
.recap-lines summary { cursor: pointer; list-style-position: inside; }
.recap-lines[open] summary { margin-bottom: 10px; }

/* ---------- Live: failed payments and "which bag was this?" ---------- */
.linkish { background: none; border: 0; padding: 2px 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; font: inherit; }
.linkish:hover { color: inherit; }
.failed-panel { border-left: 4px solid var(--brass, #B8893B); margin-bottom: 16px; }
.failed-panel h2 { margin: 0; }
.failed-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line, #e5e7eb); }
.assign-opt { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; margin: 0 0 6px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: var(--card, #fff); cursor: pointer; font: inherit; color: inherit; }
.assign-opt > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.assign-opt:hover, .assign-opt:focus-visible { border-color: var(--leather, #8B4A2B); }
.assign-opt.primary { border-color: var(--brass, #B8893B); background: color-mix(in srgb, var(--brass, #B8893B) 10%, var(--card, #fff)); }
.assign-opt img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.assign-opt[disabled] { opacity: .5; cursor: default; }
.assign-opt b { white-space: nowrap; }

/* ---------- Inventory management ---------- */
.inv-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 16px; overflow: hidden; }
.inv-kpi { display: block; padding: 16px 18px; color: inherit; text-decoration: none; border-right: 1px solid var(--line); }
.inv-kpi:last-child { border-right: 0; }
.inv-kpi:hover { background: #F7F8FA; }
.inv-kpi span { display: block; font-size: 13px; color: var(--ink-3); }
.inv-kpi b { display: block; font-family: var(--font-display); font-size: 30px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.inv-kpi em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.inv-kpi.warn b { color: var(--leather); }
.inv-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
button.inv-act { font: inherit; text-align: left; cursor: pointer; width: 100%; border-color: var(--leather); background: color-mix(in srgb, var(--brass) 9%, var(--card)); }
.inv-act { display: block; padding: 16px 18px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--card); color: inherit; text-decoration: none; }
.inv-act:hover, .inv-act:focus-visible { border-color: var(--leather); }
.inv-act b { display: block; font-size: 16px; margin-bottom: 4px; }
.inv-act span { font-size: 13.5px; color: var(--ink-3); }
.pill.stage-shelf { background: #E5F2EA; color: #1F6B3A; }
.pill.stage-on_the_way { background: #EAF0FA; color: #2A4E8A; }
.pill.stage-unchecked { background: #FBF1E2; color: #8A5A16; }
.done-row { opacity: .5; }

.finder-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.finder-bar input[type=search] { flex: 1 1 280px; }
.finder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.f-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--card); overflow: hidden; cursor: pointer; font: inherit; color: inherit; }
.f-card:hover, .f-card:focus-visible { border-color: var(--leather); box-shadow: 0 2px 10px rgba(30,43,69,.12); }
.f-card img, .f-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; background: #F1F2F5; display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--ink-3); }
.f-noimg.big { aspect-ratio: auto; height: 320px; border-radius: var(--radius-m); }
.f-txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.f-title { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.finder-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.count-prog { min-width: 200px; text-align: right; font-size: 15px; }
.count-prog b { font-family: var(--font-display); font-size: 26px; }
.count-prog .bar { height: 8px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.count-prog .bar i { display: block; height: 100%; background: var(--leather); }

.fc-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 22px; }
.fc-ph img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius-m); background: #F1F2F5; }
.fc-title { font-size: 17px; margin: 8px 0; }
.fc-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 12px; }
.fc-more summary { cursor: pointer; color: var(--ink-3); font-size: 13.5px; margin-bottom: 8px; }
.fc-more .btn { display: block; margin: 6px 0; }
.tag-show { padding: 30px; text-align: center; }
.tag-big { display: inline-flex; flex-direction: column; align-items: center; margin: 10px; padding: 18px 30px; border: 2px dashed var(--brass); border-radius: 12px; }
.tag-big b { font-family: var(--font-display); font-size: 56px; letter-spacing: .02em; line-height: 1.05; }
.tag-big span { font-size: 14px; color: var(--ink-3); max-width: 360px; }
.tag-show .btn { margin-top: 16px; font-size: 16px; padding: 12px 26px; }
@media (max-width: 760px) {
  .inv-kpis { grid-template-columns: 1fr 1fr; }
  .inv-kpi:nth-child(2) { border-right: 0; }
  .inv-actions, .fc-wrap { grid-template-columns: 1fr; }
}

/* ---------- removing things that shouldn't be in inventory ---------- */
.f-cell { position: relative; display: flex; }
.f-cell .f-card { flex: 1; }
.f-rm { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(30,43,69,.72); color: #fff; font-size: 15px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.f-cell:hover .f-rm, .f-rm:focus-visible { opacity: 1; }
@media (hover: none) { .f-rm { opacity: 1; } }
.f-rm:hover { background: var(--loss, #9B2C2C); }
.f-check { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: rgba(30,43,69,.35); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; pointer-events: none; }
.f-cell.sel .f-card { border-color: var(--leather); box-shadow: 0 0 0 3px color-mix(in srgb, var(--leather) 35%, transparent); }
.f-cell.sel .f-check { background: var(--leather); }
.sel-bar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 16px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--leather); border-radius: var(--radius-m); box-shadow: 0 4px 16px rgba(30,43,69,.12); }
.sel-bar b { margin-right: 6px; }
.rm-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.rm-head h2 { margin: 0 0 4px; }
.rm-opt { margin-bottom: 8px; }
.rm-opt:last-of-type:hover { border-color: var(--loss, #9B2C2C); }
.sel-bar[hidden] { display: none; }

/* ---------- show reports ---------- */
.seg-sm button { padding: 5px 10px; font-size: 13px; }
.cmp-chart { position: relative; height: 260px; margin-top: 12px; }
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.th-sort:hover { color: var(--ink); text-decoration: underline; }
.cmp-tbl td { vertical-align: top; }
.pos-text { color: var(--profit); }
.rep-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); margin: 0 0 18px; overflow: hidden; }
.rep-sum > div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.rep-sum > div:last-child { border-right: 0; }
.rep-sum span { display: block; font-size: 12.5px; color: var(--ink-3); }
.rep-sum b { display: block; font-family: var(--font-display); font-size: 22px; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.rep-sum em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media print {
  .side, .no-print, .demo-banner, .toast, [data-pick], [data-unmatch] { display: none !important; }
  body, main { background: #fff !important; }
  main { margin: 0 !important; padding: 0 !important; }
  .panel, .kpis, .rep-sum { break-inside: avoid; box-shadow: none !important; }
}

/* ---------- Mail day (made for her phone) ---------- */
.mail-vend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mail-vend button { font: 600 15px/1 var(--font-body); padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; min-height: 44px; }
.mail-vend button span { color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.mail-vend button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mail-vend button[aria-pressed="true"] span { color: rgba(255,255,255,.75); }
.mail-q { width: 100%; font-size: 16px; padding: 12px 14px; margin-bottom: 14px; }
.mail-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.box-card { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--card); cursor: pointer; font: inherit; color: inherit; min-height: 96px; }
.box-card:hover, .box-card:focus-visible { border-color: var(--leather); }
.box-ph { display: grid; grid-template-columns: repeat(2, 38px); grid-auto-rows: 38px; gap: 3px; flex: none; }
.box-ph:has(> :only-child) { grid-template-columns: 79px; grid-auto-rows: 79px; }
.box-ph img, .box-ph .f-noimg { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; font-size: 16px; aspect-ratio: auto; }
.box-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.box-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.box-title { font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.box-sheet { padding: 20px; }
.bs-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.bs-head h2 { margin: 0 0 2px; }
.bs-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.bs-item.off { opacity: .45; }
.bs-ph { position: relative; flex: none; width: 84px; height: 84px; cursor: pointer; }
.bs-ph img, .bs-ph .f-noimg { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; font-size: 22px; aspect-ratio: auto; }
.bs-cam { position: absolute; right: -4px; bottom: -4px; width: 32px; height: 32px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.bs-mid { flex: 1; min-width: 0; }
.bs-title { font-size: 15px; line-height: 1.3; }
.bs-cost { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 14px; color: var(--ink-3); }
.bs-cost input { width: 96px; font-size: 16px; padding: 6px 8px; }
.bs-tick { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-size: 22px; font-weight: 700; color: #fff; cursor: pointer; }
.bs-tick[aria-pressed="true"] { background: var(--profit); border-color: var(--profit); }
.bs-foot { position: sticky; bottom: 0; background: var(--card); padding: 12px 0 2px; margin-top: 10px; border-top: 1px solid var(--line); }
.bs-foot .btn { width: 100%; font-size: 17px; padding: 14px; }
@media (max-width: 700px) {
  dialog.wide { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .mail-boxes { grid-template-columns: minmax(0, 1fr); }
  .box-sheet { padding: 14px; }
  .tag-big b { font-size: 44px; }
}

/* =====================================================================
   Phone first: slim top bar, bottom tab bar, full-screen pop-ups with Back
   ===================================================================== */
.topbar, .tabbar, .m-back { display: none; }
.more-list { display: grid; gap: 0; }
.more-link { display: flex; align-items: center; gap: 8px; padding: 15px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 500; }
.more-link span[aria-hidden] { margin-left: auto; color: var(--ink-3); font-size: 22px; }
.more-link .badge { margin-left: 6px; }

@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { background: var(--paper); }
  .side { display: none; }
  .shell { display: block; min-height: 100dvh; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff;
    padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  }
  .topbar .brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
  .topbar .brand svg { width: 22px; height: 22px; }
  .topbar .btn { padding: 7px 14px; font-size: 14px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 4px 2px calc(env(safe-area-inset-bottom) + 4px);
  }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px;
    color: var(--ink-3); text-decoration: none; font: 600 10.5px/1.1 var(--font-body); background: none; border: 0; cursor: pointer; min-height: 48px;
  }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar [data-nav="more"] svg circle { fill: currentColor; stroke: none; }
  .tabbar .on { color: var(--leather); }
  .tabbar .live-dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: #E0464B; }
  .tabbar .tb-badge { position: absolute; top: 1px; left: calc(50% + 4px); font-size: 10px; padding: 1px 5px; font-style: normal; margin: 0; }
  main { padding: 16px 14px calc(88px + env(safe-area-inset-bottom)); }

  /* type and spacing */
  h1 { font-size: 26px; line-height: 1.15; }
  .head { margin-bottom: 14px; gap: 10px; align-items: stretch; }
  .head > div:first-child { min-width: 0; }
  .head .row { flex-wrap: wrap; }
  .head p.muted { font-size: 14.5px; }
  .panel { padding: 14px; border-radius: 12px; }
  .seg { flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .seg::-webkit-scrollbar { display: none; }
  .head > .seg { width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  input, select, textarea { font-size: 16px; } /* no zoom-in on focus */
  .btn { min-height: 40px; }
  .toast { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: none; }

  /* hero cards */
  .tag { padding: 20px 20px 18px 56px; min-height: 0; clip-path: polygon(34px 0, 100% 0, 100% 100%, 34px 100%, 0 50%); }
  .tag::before { left: 20px; width: 14px; height: 14px; margin-top: -7px; }
  .tag::after { inset: 7px 8px 7px 42px; }
  .tag .big { font-size: 40px; margin: 6px 0 10px; }
  .tag .parts { gap: 6px 14px; grid-template-columns: repeat(2, auto); }
  .kpi { padding: 12px 14px; }
  .kpi b { font-size: 22px; }
  .inv-kpi { padding: 12px 14px; }
  .inv-kpi b { font-size: 24px; }
  .inv-actions { grid-template-columns: 1fr; gap: 10px; }
  .rep-sum { grid-template-columns: 1fr 1fr; }
  .rep-sum > div { border-bottom: 1px solid var(--line); }
  .sh-grid { grid-template-columns: minmax(0, 1fr); }

  /* pop-ups: full screen with a Back bar */
  dialog, dialog.wide { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog > #modalBody { padding: 0 16px calc(18px + env(safe-area-inset-bottom)); }
  .m-back { display: flex; position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line);
    padding: calc(env(safe-area-inset-top) + 6px) 8px 6px; margin: 0 -16px 0; }
  .m-back button { background: none; border: 0; color: var(--focus); font: 600 17px var(--font-body); padding: 8px 8px; cursor: pointer; }
  #modalBody > h2:first-of-type, #modalBody > .rm-head { margin-top: 6px; }
  .box-sheet { padding: 6px 0 0; }
  .fc-wrap { padding-left: 0; padding-right: 0; }
  #bsX { display: none; }

  /* Inventory list: one card per bag instead of a wide table */
  .inv-tbl thead { display: none; }
  .inv-tbl, .inv-tbl tbody { display: block; }
  .inv-tbl tr { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "ph sku cost" "ph title status" "ph title ." "act act act";
    grid-template-rows: auto auto 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .inv-tbl td { display: block; border: 0; padding: 0; }
  .inv-tbl td:nth-child(1) { grid-area: ph; }
  .inv-tbl td:nth-child(2) { grid-area: sku; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
  .inv-tbl td:nth-child(2) > div { display: contents; }
  .inv-tbl td:nth-child(3) { grid-area: title; }
  .inv-tbl td:nth-child(4), .inv-tbl td:nth-child(5), .inv-tbl td:nth-child(8), .inv-tbl td:nth-child(9) { display: none; }
  .inv-tbl td:nth-child(6) { grid-area: cost; text-align: right; font-weight: 600; }
  .inv-tbl td:nth-child(7) { grid-area: status; }
  .inv-tbl td:nth-child(7) select { max-width: 130px; font-size: 14px; padding: 4px 6px; }
  .inv-tbl td:nth-child(10) { grid-area: act; text-align: right; }
  .inv-img, .inv-noimg { width: 64px !important; height: 64px !important; }

  /* Mail day and the photo finder */
  .finder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .finder-bar { padding: 12px; }
  .finder-bar input[type=search] { flex-basis: 100%; }
  .f-txt { padding: 8px 10px 10px; }
  .fc-wrap { padding: 12px 14px; gap: 14px; }
  .fc-ph img { max-height: 46vh; }
  .count-prog { text-align: left; }
  .tag-show { padding: 20px 14px; }
  .sel-bar { top: calc(env(safe-area-inset-top) + 56px); }
}

/* ---------- Which bag was this? (bag picker) ---------- */
.bp { display: flex; flex-direction: column; gap: 14px; }
.bp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bp-head h2 { margin: 0; }
.bp-head p { margin: 4px 0 0; }
.bp-video { margin-top: 8px; }
.bp-meta { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2, #5B6478); }
.bp-what { font: 700 26px/1.2 var(--font-display); margin: 4px 0 6px; }
.bp-q { margin: 0 0 4px; font-size: 15px; color: var(--ink-2, #5B6478); }
.bp-ways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; }
.bp-ways:has(> .bp-costway) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.3fr); }
.bp-cost-row { margin-top: 6px; gap: 6px; flex-wrap: wrap; align-items: center; }
.bp-cost-row .pp-dollar input { width: 84px; }
.bp-cost-row #bpSrc { flex: 1; min-width: 90px; }
.bp-ways > [hidden] { display: none; }
.bp-ways:has(> [hidden]) { grid-template-columns: 1fr; }
.bp-way { border: 1px solid var(--line, #E3E6EB); border-radius: 12px; padding: 12px; background: var(--card, #fff); }
.bp-way label b, .bp-way > b { font-size: 15px; }
.bp-fl { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.bp-fl span { font-weight: 700; font-size: 20px; }
.bp-fl input { font-size: 22px; font-weight: 700; width: 5.2em; letter-spacing: .04em; padding: 6px 10px; }
.bp-drop.over { border-color: var(--leather, #8B4A2B); background: color-mix(in srgb, var(--brass, #B8893B) 8%, var(--card, #fff)); }
.bp-paste { align-self: center; }
.bp-sec { margin: 4px 0 6px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bp-flhit { margin-top: 8px; } .bp-flhit img { width: 56px !important; height: 56px !important; }
.bp-card { display: flex; flex-direction: column; gap: 4px; padding: 6px; text-align: left; border: 1.5px solid var(--line, #E3E6EB);
  border-radius: 12px; background: var(--card, #fff); cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.bp-card:hover, .bp-card:focus-visible { border-color: var(--leather, #8B4A2B); }
.bp-card.busy { opacity: .5; pointer-events: none; }
.bp-card .pp-img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.bp-card .pp-noimg { display: flex; align-items: center; justify-content: center; font-size: 28px; }
.bp-c-top { display: flex; justify-content: space-between; gap: 6px; font-size: 14px; }
.bp-c-name { font-size: 12.5px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-card .pill { align-self: flex-start; }
.bp-look-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bp-look-h img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #E3E6EB); }
.bp-look-h .spin { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.bp-wall-head { display: flex; flex-direction: column; gap: 8px; }
.bp-wall-head h3 { margin: 4px 0 0; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bp-chips button { border: 1px solid var(--line, #E3E6EB); background: var(--card, #fff); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; text-transform: capitalize; }
.bp-chips button[aria-pressed="true"] { background: var(--ink, #1F2A44); color: #fff; border-color: var(--ink, #1F2A44); }
.bp-sep { width: 10px; }
.bp-more { grid-column: 1 / -1; }
.bp-cost { border-top: 1px solid var(--line, #E3E6EB); padding-top: 12px; gap: 8px; align-items: center; }
.live-tip { margin: -4px 0 10px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--brass, #B8893B) 10%, transparent); }
@media (max-width: 760px) {
  .bp-ways, .bp-ways:has(> .bp-costway) { grid-template-columns: 1fr; }
  .bp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-paste { display: none; }
}

.kpi { min-width: 0; }
.kpi em { overflow-wrap: anywhere; }
.kpi b > span { display: inline; font-size: inherit; }
.kpi b > span.pos { color: var(--profit); } .kpi b > span.neg { color: var(--loss); }
/* phones: tables with a name and a few numbers become small cards (name on top, numbers labeled underneath) */
@media (max-width: 760px) {
  .stack-tbl { min-width: 0 !important; width: 100%; }
  .stack-tbl thead { display: none; }
  .stack-tbl tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid #EEF0F3; }
  .stack-tbl tr:last-child { border-bottom: 0; }
  .stack-tbl td { border: 0; padding: 0; min-width: 0; }
  .stack-tbl td:first-child { grid-column: 1 / -1; }
  .stack-tbl td.n { text-align: left; white-space: normal; }
  .stack-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
  .stack-tbl td .title { overflow-wrap: anywhere; }
}

/* ---------- List bags on Whatnot ---------- */
.lp-new h2 { margin: 0 0 12px; }
.lp-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.lp-new select, .lp-new textarea { width: 100%; }
.lp-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-ph { position: relative; width: 96px; height: 96px; }
.lp-ph img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--line); }
.lp-x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 16px; line-height: 26px; cursor: pointer; }
.lp-add { width: 96px; height: 96px; border: 2px dashed var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.lp-add span { font-size: 26px; line-height: 1; }
.lp-add:hover { border-color: var(--leather); }
.lp-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); text-align: left; font: inherit; color: inherit; width: 100%; cursor: pointer; }
.lp-item.picked { border-color: var(--profit); cursor: default; }
.lp-item .pp-img { width: 52px; height: 52px; flex: none; border-radius: 8px; object-fit: cover; }
.lp-item > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lp-sugg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lp-actions { margin-top: 6px; gap: 10px; }
.lp-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEF0F3; }
.lp-row:last-child { border-bottom: 0; }
.lp-thumb img, .lp-thumb .pp-img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.lp-txt { flex: 1; min-width: 0; }
.lp-txt .title { margin: 4px 0 2px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .lp-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-sugg { grid-template-columns: 1fr; }
  .lp-ph, .lp-ph img, .lp-add { width: 84px; height: 84px; }
}
.bp-fl[hidden] { display: none; }

/* ---------- Bags in this show (Live page) ---------- */
.lu-panel { margin: 16px 0; text-align: left; }
.lu-panel h2 { margin: 0; }
.lu-tbl { width: 100%; }
.lu-tbl td { vertical-align: middle; }
.lu-tbl .pp-img { width: 48px; height: 48px; }
.lu-tbl td .title { overflow-wrap: anywhere; }
.lu-tbl tr.lu-sold { opacity: .55; }
.lu-chips button[data-lu-filter] { text-transform: none; }
@media (max-width: 760px) {
  .lu-tbl { min-width: 0 !important; }
  .lu-tbl th, .lu-tbl td { padding-left: 4px; padding-right: 4px; }
  .lu-tbl td.n { white-space: nowrap; }
}

/* ---------- TV view (#/tv): the live numbers from across the room ---------- */
body.tv-mode { background: #121A2B; }
body.tv-mode .topbar, body.tv-mode .side, body.tv-mode .tabbar { display: none !important; }
body.tv-mode .shell { display: block; }
body.tv-mode main#main { max-width: none; margin: 0; padding: 3vh 3.5vw; min-height: 100vh; box-sizing: border-box; }
.tv { color: #F4F1EA; font-family: 'Bricolage Grotesque', system-ui, sans-serif; display: flex; flex-direction: column; gap: 3vh; }
.tv .pos { color: #5FD39A; } .tv .neg { color: #FF7B7B; }
.tv-top { display: flex; justify-content: space-between; align-items: center; font-size: 2.2vw; color: #C9D1E0; gap: 2vw; }
.tv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-top .live-pill { font-size: 1.4vw; vertical-align: middle; }
.tv-lbl { font-size: 1.7vw; color: #AEB8CC; letter-spacing: .02em; }
.tv-row { display: grid; gap: 2vw; }
.tv-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tv-tile { background: #1C2740; border-radius: 1.4vw; padding: 2.4vh 2vw; }
.tv-tile b { display: block; font-size: 6.5vw; line-height: 1.05; font-weight: 700; margin: .6vh 0; }
.tv-tile em { font-style: normal; font-size: 1.5vw; color: #AEB8CC; }
.tv-last { background: #24324F; border-radius: 1.4vw; padding: 2.4vh 2vw; transition: background .6s; }
.tv-last.flash { background: #9A5B2C; }
.tv-last.flash .tv-lbl { color: #FBE9D6; }
.tv-last-row { display: flex; align-items: baseline; gap: 2.5vw; font-size: 3.2vw; margin-top: .6vh; }
.tv-last-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-last-row b { font-size: 4vw; white-space: nowrap; }
.tv-list { display: flex; flex-direction: column; gap: 1.2vh; }
.tv-sale { display: grid; grid-template-columns: minmax(0, 1fr) auto 11vw; gap: 2vw; font-size: 2.1vw; color: #DDE3EE; padding: 0 2vw; }
.tv-sale span:not(.tv-sale-t) { text-align: right; white-space: nowrap; }
.tv-sale-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-next { text-align: center; padding: 6vh 0 2vh; }
.tv-show { font-size: 3.6vw; margin: 1vh 0 3vh; }
.tv-cd .cd-unit b { font-size: 7vw; color: #F4F1EA; }
.tv-cd .cd-unit span { font-size: 1.6vw; color: #AEB8CC; }
.tv-wait { font-size: 2.5vw; color: #AEB8CC; padding: 20vh 0; text-align: center; }
.tv-ctl { position: fixed; right: 1.5vw; bottom: 1.5vw; display: flex; gap: 8px; opacity: 0; transition: opacity .3s; }
body.tv-mode:hover .tv-ctl, .tv-ctl:focus-within { opacity: 1; }
.tv-ctl .btn { background: #F4F1EA; color: #1E2B45; border-color: #F4F1EA; }
.tv-failed { background: #4A1F24; border: 2px solid #FF7B7B; border-radius: 1.4vw; padding: 1.8vh 2vw; }
.tv-failed .tv-lbl { color: #FFC2C2; }
.tv-fail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 9vw; gap: 2vw; font-size: 2.3vw; color: #FFE3E3; margin-top: .8vh; }
.tv-fail-row span:not(.tv-sale-t) { text-align: right; white-space: nowrap; }
.tv-fail-more { font-size: 1.6vw; color: #FFC2C2; margin-top: .6vh; }
.tv-has-failed { gap: 2.2vh; }
.tv-has-failed .tv-tile { padding: 1.6vh 2vw; }
.tv-has-failed .tv-tile b { font-size: 5vw; margin: .2vh 0; }
.tv-has-failed .tv-last { padding: 1.6vh 2vw; }
.tv-has-failed .tv-last-row { font-size: 2.8vw; }
.tv-has-failed .tv-last-row b { font-size: 3.4vw; }

/* Sold again as… (a failed payment's bag, re-run) */
.rs-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.rs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; text-align: left; width: 100%;
  border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; }
.rs-row:hover, .rs-row:focus-visible { border-color: var(--leather); }
.rs-row .title { overflow-wrap: anywhere; }
.failed-row .btn { white-space: nowrap; }

.tv-btn { font: inherit; font-size: max(13px, 1.1vw); font-weight: 600; background: #C9A15B; color: #1E2B45; border: 0; border-radius: 999px;
  padding: .45em 1em; cursor: pointer; white-space: nowrap; vertical-align: middle; }
.tv-btn:hover, .tv-btn:focus-visible { background: #F4F1EA; outline: none; }
.tv-fail-row { grid-template-columns: minmax(0, 1fr) auto auto; }

/* Watch for random pulls */
.pw-sug { margin-bottom: 4px; }
.pw-wait { margin-bottom: 4px; }
.tv-btn-sug { background: #5FD39A; }
.tv-watching { font-size: 1.3vw; color: #5FD39A; margin-right: 1.2vw; vertical-align: middle; }

/* ---------- Deductions ---------- */
.dd-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.dd-seg { flex-wrap: wrap; }
.dd-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dd-date { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.dd-q { flex: 1; min-width: 200px; }
.dd-q input { width: 100%; }
.dd-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
.dd-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.dd-tbl { width: 100%; }
.dd-tbl .dd-total td { border-top: 2px solid var(--line); font-weight: 600; }
.dd-rules { display: flex; flex-direction: column; gap: 8px; }
.dd-rule { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dd-rule:last-child { border-bottom: 0; }
.dd-rule.off { opacity: .6; }
.dd-paid { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.dd-form .field { margin-bottom: 12px; }
.dd-form input:not([type=radio]):not([type=checkbox]), .dd-form select { width: 100%; }
.dd-kind { border: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.dd-kind legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
@media (max-width: 900px) { .dd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dd-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .dd-lines thead { display: none; }
  .dd-lines tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rule amt" "what what" "date paid"; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .dd-lines td { border: 0; padding: 0; min-width: 0; text-align: left; }
  .dd-lines td:nth-child(1) { grid-area: date; font-size: 13px; color: var(--ink-3); }
  .dd-lines td:nth-child(2) { grid-area: what; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
  .dd-lines td:nth-child(3) { grid-area: rule; font-weight: 600; }
  .dd-lines td:nth-child(4) { display: none; }
  .dd-lines td:nth-child(5) { grid-area: amt; text-align: right; }
  .dd-lines td:nth-child(6) { grid-area: paid; text-align: right; }
}
.dd-tbl .linkish { text-align: left; }

/* ---------- Buy list + deal checker ---------- */
.buy-form { display: flex; gap: 8px; flex-wrap: wrap; }
.buy-form input[type=text] { flex: 1; min-width: 220px; }
.buy-ph { cursor: pointer; }
.buy-phbox { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.buy-phbox img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
#buyOut:not(:empty) { margin-top: 14px; }
.buy-verdict { background: var(--paper); border-radius: 12px; padding: 12px 14px; }
.buy-big { font-size: 22px; margin: 6px 0; font-family: 'Bricolage Grotesque', system-ui, sans-serif; }
.buy-big b { color: var(--profit); }
.buy-sim { display: flex; flex-direction: column; gap: 6px; }
.buy-simrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.buy-simrow .pp-img { width: 48px; height: 48px; }
.buy-simrow > span { display: flex; flex-direction: column; min-width: 0; }
.buy-simrow .title { overflow-wrap: anywhere; }
.buy-simrow .n { text-align: right; align-items: flex-end; }
.buy-rule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.buy-rule input { width: 70px; }
.buy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.buy-kind { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--card); }
.buy-kind.skip { opacity: .75; }
.buy-kh { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.buy-pay { font-size: 18px; }
.buy-pay b { color: var(--profit); }
.buy-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.buy-search code { font-size: 12px; background: var(--paper); padding: 3px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.buy-rough { font-size: 11px; }
.buy-skip { margin-top: 14px; }
.buy-skip summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.buy-src { width: 100%; }

/* ---------- FL tags ---------- */
.tag-modes { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tag-modes label { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tag-prev { margin-top: 8px; }
.tag-canvas { display: block; margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; max-width: 100%; height: auto; image-rendering: pixelated; }
.tag-pstat { min-height: 1.2em; margin: 8px 0 4px; }
.tag-chip { position: fixed; left: 12px; bottom: 12px; z-index: 50; background: var(--ink, #1E2B45); color: #fff; font-size: 13px; padding: 7px 12px; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.tag-chip .muted { color: #C9D1E0; }
.tag-chip.warn { background: #8A4B12; display: flex; gap: 10px; align-items: center; }
.tag-chip.warn .btn { background: #fff; color: #8A4B12; }
@media (max-width: 760px) { .tag-chip { bottom: 76px; } }

/* To pay (deduction tasks) */
.dd-tasks { margin-bottom: 14px; border-left: 4px solid var(--leather); }
.dd-task-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dd-task { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.dd-task.wait { background: #FFF8EC; }
.dd-task-amt { font-size: 18px; white-space: nowrap; }
.dd-up { margin-top: 10px; }
.dd-up summary { cursor: pointer; color: var(--ink-2); }
.dd-uprow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.nav-badge { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--leather); color: #fff; font-size: 11px; text-align: center; margin-left: 4px; }
@media (max-width: 760px) { .dd-task { grid-template-columns: minmax(0, 1fr) auto; } .dd-task-act { grid-column: 1 / -1; } }
.tithe { background: var(--card, #fff); border: 1px solid var(--line, #E3E6EB); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.tithe.due { border-color: #F0C98B; background: #FFF8EC; }
.tithe h2 { margin: 0 0 8px; font-size: 18px; }
.tithe-week + .tithe-week { border-top: 1px solid var(--line, #E3E6EB); margin-top: 12px; padding-top: 12px; }
.tithe-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; font-size: 16px; flex-wrap: wrap; }
.tithe-amt { white-space: nowrap; }
.tithe-amt small { font: 500 15px var(--font-body); }
.tithe-amt { font: 700 28px var(--font-display); font-variant-numeric: tabular-nums; }
.tithe-paid-btn { margin-top: 10px; width: 100%; max-width: 320px; font-size: 17px; padding: 12px 16px; }
.tithe-done { font-size: 15px; }
.tithe-setup { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dd-due-banner { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; background: #FFF4E5; border: 1px solid #F0C98B; color: var(--ink); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; text-decoration: none; }
.dd-due-banner span { color: var(--ink-2); font-size: 14px; }

.mail-found { margin-bottom: 12px; }
.mail-hit { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.mail-hit .pp-img { width: 56px; height: 56px; flex: none; }
.mail-untag { margin-bottom: 12px; border-left: 4px solid var(--brass); }
.mail-untag summary { cursor: pointer; }
.mail-untag-list { margin-top: 8px; }
.mail-hit > span { flex: 1; min-width: 0; }
.mail-hit .btn { flex: none; }
.mail-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
@media (max-width: 760px) { .mail-hit { flex-wrap: wrap; } .mail-btns { width: 100%; justify-content: flex-start; } }

/* On the block (pinned item) */
.tv-pin { background: #1C2740; border: 2px solid #3A4A6B; border-radius: 1.4vw; padding: 1.8vh 2vw; }
.tv-pin.below { border-color: #FF7B7B; } .tv-pin.near { border-color: #E9C46A; } .tv-pin.good { border-color: #5FD39A; }
.tv-pin-row { display: flex; align-items: baseline; gap: 2vw; font-size: 2.8vw; margin-top: .4vh; }
.tv-pin-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-pin-bid { font-size: 4vw; }
.tv-pin.below .tv-pin-bid, .tv-pin.below .tv-pin-note { color: #FF7B7B; } .tv-pin.near .tv-pin-bid, .tv-pin.near .tv-pin-note { color: #E9C46A; } .tv-pin.good .tv-pin-bid, .tv-pin.good .tv-pin-note { color: #5FD39A; }
.tv-pin-nums { display: flex; flex-wrap: wrap; gap: .6vh 2.4vw; font-size: 1.9vw; color: #C9D1E0; margin-top: .8vh; }
.tv-pin-nums b { color: #F4F1EA; }
.tv-has-pin .tv-tile b { font-size: 5vw; }
.pin-panel { margin-bottom: 16px; border-left: 4px solid var(--line); }
.pin-panel.below { border-left-color: var(--loss); } .pin-panel.near { border-left-color: var(--brass); } .pin-panel.good { border-left-color: var(--profit); }
.pin-panel.below .pin-note { color: var(--loss); font-weight: 600; } .pin-panel.good .pin-note { color: var(--profit); font-weight: 600; }

/* a bag's photos, big, with arrows and thumbnails */
.pv-fig { position: relative; }
.pv-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(30,43,69,.72); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.pv-arrow.left { left: 10px; } .pv-arrow.right { right: 10px; }
.pv-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 2px; }
.pv-th { flex: 0 0 auto; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.pv-th.on { border-color: var(--leather, #9A5B2C); }
.pv-th img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- storage spots (totes, shelves, bins) ---------- */
.spot-pill { background: #F3ECE4; color: var(--leather-dark); white-space: nowrap; }
.inv-spots { margin: 0 0 18px; }
.inv-spots:empty { display: none; }
.spot-intro { display: block; width: 100%; text-align: left; padding: 14px 18px; border-radius: var(--radius-m); border: 1px dashed var(--line); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.spot-intro:hover, .spot-intro:focus-visible { border-color: var(--leather); background: var(--card); }
.spot-intro b { display: block; font-size: 15px; margin-bottom: 2px; }
.spot-intro span { font-size: 13.5px; color: var(--ink-3); }
.spot-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.spot-li { display: flex; flex-direction: column; min-width: 110px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--card); text-decoration: none; color: inherit; }
.spot-li:hover, .spot-li:focus-visible { border-color: var(--leather); }
.spot-li b { font-size: 15px; }
.spot-li span { font-size: 13px; color: var(--ink-3); }
.spot-li em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--leather-dark); }
.spot-h { font-size: 30px; }
.spot-acts { gap: 8px; flex-wrap: wrap; }
.spot-pull { border-color: var(--brass); background: #FFFBF2; margin-top: 14px; }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.spot-card { display: flex; flex-direction: column; gap: 6px; }
.spot-ph { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: #F4F5F7; aspect-ratio: 1; cursor: zoom-in; display: flex; align-items: center; justify-content: center; }
.spot-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-t { font-size: 13px; line-height: 1.3; }
.spot-t .small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); }
.spot-out { align-self: flex-start; }
.tag-spot:empty { display: none; }
.tag-spot { margin: 12px 0 4px; }
.spot-q { margin-bottom: 6px; }
.spot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.spot-chips button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px; font: 600 14px var(--font-body); color: var(--ink); cursor: pointer; min-height: 40px; }
.spot-chips button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.spot-chips .spot-none { font-weight: 500; color: var(--ink-3); }
.spot-prev { margin: 10px 0 14px; }
.scan-box { position: relative; background: #000; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 4 / 3; margin: 10px 0; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-aim { position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.scan-log { list-style: none; padding: 0; margin: 8px 0; max-height: 160px; overflow: auto; font-size: 14px; }
.scan-log li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.scan-log li.scan-new { font-size: 17px; font-weight: 700; padding: 8px 0; }
.scan-log li.scan-new.ok { color: #1E7B4A; }
.scan-log li.scan-new.bad { color: #B3261E; }
.scan-box::after { content: ''; position: absolute; inset: 0; border: 0 solid transparent; border-radius: inherit; pointer-events: none; }
.scan-box.scan-ok::after { animation: scanFlash .7s ease-out; --flash: #2BB673; }
.scan-box.scan-bad::after { animation: scanFlash .9s ease-out; --flash: #E5484D; }
@keyframes scanFlash { 0% { border-width: 10px; border-color: var(--flash); background: color-mix(in srgb, var(--flash) 22%, transparent); } 100% { border-width: 10px; border-color: transparent; background: transparent; } }
/* phones: the search box in a stacked toolbar is one line tall (its flex size had turned into height) */
@media (max-width: 760px) {
  .toolbar input[type=search] { flex: 0 0 auto; }
  .spot-panel h2 { font-size: 17px; }
  .spot-panel > .row:first-child { flex-wrap: wrap; gap: 10px; }
  .spot-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
  .spot-li { min-width: 0; padding: 8px 10px; border-radius: var(--radius-s); }
  .spot-li b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .spot-li span, .spot-li em { font-size: 12px; }
  .spot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .spot-h { font-size: 26px; }
  .spot-acts { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; width: 100%; margin-top: 10px; }
  .spot-acts .btn { padding: 8px 10px; font-size: 14px; white-space: nowrap; }
  .spot-t { font-size: 12.5px; }
  .spot-out { min-height: 34px; font-size: 13px; padding: 4px 10px; }
}

/* Spending: time range + custom dates */
.sp-range { gap: 10px; flex-wrap: wrap; align-items: center; }
.sp-custom { gap: 6px; align-items: center; }
.sp-custom input[type=date] { width: auto; }
@media (max-width: 700px) { .sp-range .seg { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; } .sp-range .seg button { white-space: nowrap; } }
.sp-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.sp-th { width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #F4F5F7; cursor: zoom-in; }
.sp-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-th:hover, .sp-th:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.sp-noph { margin-top: 4px; }
@media (max-width: 700px) { .sp-th { width: 54px; height: 54px; } }
/* Shows and bins */
.sb-panel { margin-bottom: 14px; }
.sb-panel summary { cursor: pointer; font-size: 15px; }
.sb-back { border: 2px solid var(--brass, #C9A227); }
.sb-group { margin: 10px 0; }
.sb-group h3 { font-size: 14px; margin: 0 0 6px; display: flex; gap: 6px; align-items: center; }
.sb-bags { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-bag { width: 76px; padding: 0; border: 2px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; display: flex; flex-direction: column; align-items: stretch; cursor: pointer; }
.sb-bag img, .sb-bag .inv-noimg { width: 100%; height: 72px; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.sb-bag b { font-size: 11.5px; padding: 3px 0; text-align: center; }
.sb-back .sb-bag[aria-pressed="false"] { opacity: .35; }
.sb-back .sb-bag[aria-pressed="true"] { border-color: var(--ink); }
.sb-chips .sb-scan { font-weight: 700; }
/* Scan a bag, tap its bin */
.bm-top { display: flex; gap: 12px; align-items: flex-start; }
.bm-img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: 0 0 auto; }
.bm-sku { font-size: 20px; }
.bm-q { margin: 16px 0 8px; }
.bm-bins { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.bm-bins button { min-height: 52px; font-size: 16px; font-weight: 700; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.bm-bins button.on { border-color: var(--ink); background: #F1F2F4; }
.bm-bins .bm-new { font-weight: 600; color: var(--ink-3); border-style: dashed; }
.tv-pool select { margin-left: 6px; }
.tv-pool { color: #F4F1EA; display: flex; align-items: center; background: rgba(30,43,69,.85); padding: 4px 10px; border-radius: 8px; }
.pp-elsewhere { display:block; color:#9a5b00; margin-top:2px; }
.pp-sect { margin: 18px 0 8px; font-size: 1.05rem; }
.pill.pp-bin { background: #E8F0FB; color: #1E4C8F; border-color: #BCD2F0; }
.pill.pp-auc { background: #F4F1EA; color: #6B5B3E; }
.addon-list { display: grid; gap: 8px; }
.addon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line, #E4DED2); border-radius: 10px; }
.addon-w { min-width: 9em; }
.warn-t { color: #A1461F; }

/* Inventory tabs and Add-ons */
.inv-tabs { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 4px; margin-bottom: 14px; }
.inv-tabs a { padding: 7px 16px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.inv-tabs a[aria-current=page] { background: var(--ink); color: #fff; }
.ao-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ao-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ao-card h3 { margin: 0 0 2px; font-size: 17px; }
.ao-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ao-left { text-align: right; white-space: nowrap; }
.ao-left b { font-family: var(--font-display); font-size: 28px; font-variant-numeric: tabular-nums; }
.ao-left .muted { white-space: normal; display: block; max-width: 11em; }
.ao-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ao-nums em { font-style: normal; color: var(--ink-3); margin-right: 4px; }
.ao-acts { gap: 8px; flex-wrap: wrap; margin-top: auto; }
.ao-buy { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.ao-buy label, #aoF > label { display: block; }
.ao-buy input, #aoF > label > input { width: 100%; box-sizing: border-box; }
.ao-buys { list-style: none; padding: 0; margin: 0 0 8px; }
.ao-buys li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: center; }
@media (max-width: 600px) { .ao-list { grid-template-columns: 1fr; } }

/* Early Payout progress */
.payout { margin-bottom: 18px; }
.payout-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.payout-num { text-align: right; }
.payout-num b { display: block; font-family: var(--font-display); font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.payout-num span { color: var(--ink-3); font-size: 13px; }
.payout-bar { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 10px; }
.payout-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2E8B57, #48B07A); }
.payout-line { margin: 0 0 8px; }
.payout-reqs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.payout-reqs li span[aria-hidden] { display: inline-block; width: 1.1em; color: var(--ink-3); font-weight: 700; }
.payout-reqs li.ok span[aria-hidden] { color: #2E8B57; }
@media (max-width: 600px) { .payout-num { text-align: left; } }

/* TV: sales toward 1,000 (Early Payout), and the big moment every 50 */
.tv-goal { display: flex; align-items: center; gap: 1.6vw; background: #1C2740; border-radius: 1.4vw; padding: 1.4vh 2vw; font-size: 1.7vw; color: #C9D1E0; }
.tv-goal-n b { color: #F4F1EA; font-size: 2.4vw; font-variant-numeric: tabular-nums; }
.tv-goal-bar { flex: 1; height: 1.4vh; min-height: 8px; background: #0F1626; border-radius: 99px; overflow: hidden; }
.tv-goal-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2E8B57, #5FD39A); }
.tv-goal-next { white-space: nowrap; }
.tv-goal.close { box-shadow: 0 0 0 3px #F2C14E inset; }
.tv-goal.close .tv-goal-next { color: #F2C14E; font-weight: 700; }
.tv-party { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(10, 15, 28, .82); cursor: pointer; animation: tvPartyIn .4s ease-out; }
.tv-party-card { text-align: center; color: #F4F1EA; font-family: 'Bricolage Grotesque', system-ui, sans-serif; animation: tvPartyPop .7s cubic-bezier(.2, 1.6, .4, 1); }
.tv-party-n { font-size: 22vw; line-height: .9; font-weight: 800; color: #F2C14E; font-variant-numeric: tabular-nums; text-shadow: 0 1vw 3vw rgba(0,0,0,.4); }
.tv-party-t { font-size: 8vw; font-weight: 800; letter-spacing: .04em; }
.tv-party-s { font-size: 2.6vw; color: #C9D1E0; margin-top: 1vh; }
.tv-party-bits i { position: absolute; top: -4vh; width: 1vw; height: 2.2vh; border-radius: 2px; animation: tvConfetti 3.2s linear infinite; }
@keyframes tvConfetti { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes tvPartyIn { from { opacity: 0; } }
@keyframes tvPartyPop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tv-party-bits { display: none; } .tv-party-card, .tv-party { animation: none; } }

/* Inventory: what's on the shelf is worth */
.inv-value { display: flex; flex-wrap: wrap; gap: 12px 40px; background: var(--ink); color: #F4F1EA; border-radius: var(--radius-m); padding: 16px 22px; margin-bottom: 12px; text-decoration: none; }
.inv-value span { display: block; font-size: 13px; opacity: .75; }
.inv-value b { display: block; font-family: var(--font-display); font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.inv-value em { font-style: normal; font-size: 12.5px; opacity: .7; }
/* the add-on form: each label over its box, the $ boxes short, the checkbox beside its words */
#aoF label.small { display: grid; gap: 4px; margin-bottom: 10px; }
#aoF .pp-dollar input { width: 110px; }
#aoF label.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
#aoF label.check input { width: auto; flex: none; margin-top: 3px; }
/* Split one bag into two pieces */
.split-ph { width: 100%; max-height: 220px; object-fit: contain; border-radius: var(--radius-s); background: #f4f4f4; margin-bottom: 12px; }
.split-row { margin: 0 0 12px; }
.split-row b { display: block; margin-bottom: 6px; font-size: 14px; }
.split-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.split-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 15px; cursor: pointer; }
.split-chips button[aria-pressed="true"] { background: var(--ink, #1d2a44); color: #fff; border-color: transparent; }
.split-go { width: 100%; padding: 14px; font-size: 16px; margin-top: 4px; }
.mail-hit-btns { display: flex; gap: 6px; flex-wrap: wrap; }
/* the reload button only shows when FlipLedger is opened from the home-screen icon (no Safari controls there) */
.reload-btn { display: none; font-size: 18px; line-height: 1; padding-left: 12px; padding-right: 12px; }
.standalone .reload-btn { display: inline-flex; }
.topbar-btns { display: flex; gap: 8px; align-items: center; }

/* ---- tidier Mail day and Inventory ---- */
.mail-untag { margin: -4px 0 12px; }
.mail-untag summary { cursor: pointer; list-style: none; padding: 4px 0; }
.mail-untag summary::-webkit-details-marker { display: none; }
.mail-untag[open] { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 8px 12px 12px; }
.mail-coming { margin-top: 14px; grid-column: 1 / -1; background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
.mail-coming > summary { cursor: pointer; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius, 12px); }
.mail-coming[open] > summary { margin-bottom: 12px; }
.bp-notit { margin: 14px 0 6px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-s, 8px); display: grid; gap: 6px; }
.bp-notit input { width: 100%; font-size: 16px; }
.inv-sum { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius, 12px); overflow: hidden; margin-bottom: 12px; }
.inv-sum > a { padding: 12px 14px; color: inherit; text-decoration: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.inv-sum > a:first-child { border-left: 0; }
.inv-sum span { font-size: 12.5px; color: var(--ink-3, #667); }
.inv-sum b { font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; }
.inv-sum em { font-style: normal; font-size: 12.5px; color: var(--ink-3, #667); }
.inv-sum .warn b { color: var(--warn, #b45309); }
.inv-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
/* Inventory: "Find a bag" box at the very top (typing folds the summary, buttons and totes away) */
.inv-find { position: relative; margin: 4px 0 16px; }
.inv-find input[type=search] { width: 100%; font-size: 17px; padding: 13px 48px 13px 14px; border-radius: var(--radius-m); }
.inv-find input[type=search]::-webkit-search-cancel-button { display: none; }
.inv-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 18px; cursor: pointer; }
.inv-clear:hover { background: #EEF0F3; }
.inv-clear:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.inv-clear[hidden], #invRest[hidden] { display: none; }
.inv-quick .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; line-height: 1.2; }
.btn-stack { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.btn-stack small { font-size: .78em; font-weight: 500; opacity: .75; margin-top: 2px; }
.inv-more { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 720px) {
  .inv-sum { grid-template-columns: 1fr 1fr 1fr; }
  .inv-sum-hero { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .inv-sum > a:nth-child(2) { border-left: 0; }
  .inv-quick .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

/* ---------- multi-seller: menu, lock screen, Set up, My account ---------- */
body.booting .side a, body.booting .tabbar a, body.booting .tabbar button { visibility: hidden; }
.side a[hidden], .tabbar a[hidden] { display: none; }

.lock { position: fixed; inset: 0; z-index: 1000; background: var(--paper); display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.lock-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px 22px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 6px 24px rgba(30,43,69,.10); display: grid; gap: 14px; }
.lock-card p { color: var(--ink-2); font-size: 16px; }
.lock-btn { min-height: 48px; justify-content: center; text-decoration: none; display: inline-flex; align-items: center; font-size: 16px; }

.su-card { margin-bottom: 16px; }
.su-card > h2 { margin-bottom: 6px; }
.su-card p { margin-bottom: 10px; }
.su-h3 { margin: 14px 0 6px; }
.su-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.su-input { min-height: 44px; width: 100%; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; color: var(--ink); font: inherit; }
.su-copy { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 8px 0; }
.su-addr { flex: 1 1 220px; min-width: 0; display: block; padding: 10px 12px; background: #F3F4F7; border: 1px solid var(--line); border-radius: var(--radius-s); font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; word-break: break-all; }
.su-steps { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 12px; }
.su-steps li { padding-left: 2px; overflow-wrap: anywhere; }
.su-codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; min-height: 44px; }
.su-code { font: 700 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.su-msg { min-height: 1.4em; margin: 10px 0 0; }
.su-msg.good { color: var(--profit); }
.su-msg.bad { color: var(--loss); }
.su-foot { margin: 8px 0 24px; }
.su-foot a { display: inline-block; padding: 12px 0; }
.home-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; justify-content: space-between; background: #FBF3E6; border: 1px solid var(--brass); border-radius: var(--radius-m); padding: 12px 14px; margin-bottom: 14px; color: var(--ink); text-decoration: none; }
a.home-banner { display: grid; gap: 2px; }
.home-banner b { font-size: 16px; }
.home-banner span { color: var(--ink-2); }
.home-banner .hb-text { flex: 1 1 220px; font-weight: 600; color: var(--ink); }

.home-banner .hb-actions { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.hb-how { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; font-weight: 600; }
.home-banner.hb-email { border-color: var(--profit); background: #EEF7F0; }
.su-phone { margin-top: 12px; }
.gm-big { display: flex; justify-content: center; width: 100%; min-height: 60px; font-size: 19px; font-weight: 700; }
.gm-line { margin-top: 10px; }
.gm-on { overflow-wrap: anywhere; margin-bottom: 4px; }
.gm-addr { overflow-wrap: anywhere; }
.gm-found { font: 700 20px var(--font-display); color: var(--profit); margin: 6px 0 10px; }
.gm-fwd { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 4px; }
.gm-fwd[open] > summary { margin-bottom: 8px; }
.ac-gm-state { overflow-wrap: anywhere; margin-bottom: 4px; }
.ac-gm-delayed { margin: 2px 0 6px; font-weight: 600; }
.home-banner.hb-gmail { border-color: var(--loss); background: #FBEEEE; }
.home-banner.hb-quiet { align-items: stretch; }
.hb-quiet .su-copy { flex: 1 1 100%; margin: 0; }
.hb-quiet .su-input { flex: 1 1 160px; width: auto; }
.su-fold { margin: 6px 0 12px; }
.su-fold summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.su-fold .su-steps { margin: 0 0 6px; }
.su-mail { margin-top: 10px; overflow-wrap: anywhere; }
.su-drag { display: none; margin-left: 8px; }
@media (hover: hover) and (pointer: fine) { .su-drag { display: inline; } }
main.drop-on { outline: 3px dashed var(--brass); outline-offset: -8px; border-radius: var(--radius-m); }
main.drop-on::after { content: "Drop your Whatnot files to load them"; position: fixed; left: 50%; top: 18px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); font-weight: 600; pointer-events: none; z-index: 60; }

.ob-rcpt { display: grid; gap: 10px; background: #F3F4F7; border-radius: var(--radius-s); padding: 12px; margin-bottom: 12px; }
.ob-rcpt p { margin: 0; }
.ob-rcpt .btn { display: flex; justify-content: center; min-height: 48px; }
.ob-count { font: 700 17px var(--font-display); color: var(--leather); margin: 4px 0 10px; }
.ob-snap { width: 100%; min-height: 64px; justify-content: center; font-size: 18px; display: inline-flex; align-items: center; gap: 8px; }
.ob-form { display: grid; gap: 8px; }
.ob-form label { font-weight: 600; margin-top: 4px; }
.ob-photo { width: 100%; max-height: 260px; object-fit: contain; background: #F3F4F7; border-radius: var(--radius-s); }
.ob-cost { display: flex; align-items: center; gap: 8px; }
.ob-cost span { font-weight: 600; font-size: 18px; }
.ob-cost input { flex: 1; min-width: 0; }
.ob-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.ob-saved { text-align: center; display: grid; gap: 8px; padding: 6px 0; }
.ob-fl { font: 700 54px/1.05 var(--font-display); letter-spacing: .02em; color: var(--ink); background: #F3F4F7; border: 2px dashed var(--leather); border-radius: var(--radius-m); padding: 16px 8px; overflow-wrap: anywhere; }
.ob-end { display: grid; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ob-skipnote { margin-top: 8px; }

.ac-plan { display: grid; gap: 2px; margin-bottom: 12px; }
.ac-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 4px; }
.ac-facts dt { color: var(--ink-2); }
.ac-facts dd { margin: 0; }
.ac-invoices { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.ac-invoices li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ac-inv-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.ac-inv-st { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.ac-inv-st.is-paid { color: var(--profit); background: #EAF4EC; }
.ac-inv-st.is-due { color: var(--loss); background: #FBEAE7; }
.ac-inv-links { grid-column: 1 / -1; display: flex; gap: 16px; font-size: 15px; }
.ac-bill-note { margin: 10px 0 0; font-size: 14px; }
@media (min-width: 640px) { .ac-invoices li { grid-template-columns: 9em 6em auto 1fr; } .ac-inv-links { grid-column: auto; justify-content: flex-end; } }
.ac-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-inv-btns { margin: 10px 0; }
#acInvite .su-input { font-size: 16px; }
.ac-danger { border-color: #E3B7B7; }
.ac-del-btns { margin-top: 14px; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .su-card .su-btn, .ob-end .su-btn { min-height: 48px; }
  .su-copy .su-btn, .ac-btns .su-btn { flex: 1 1 140px; }
  .ob-fl { font-size: 48px; }
}
.lock-own { font-size: 15px; } .lock-link { background: none; border: 0; padding: 12px 6px; min-height: 44px; color: var(--focus); font: 600 15px var(--font-body); cursor: pointer; text-decoration: underline; }

/* Reprint tags */
.head-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.reprint .rp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.reprint .rp-list { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.reprint .rp-day { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); padding: 10px 2px 4px; }
.reprint .rp-row { display: grid; grid-template-columns: 24px 48px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line, #e5e7eb); cursor: pointer; min-height: 44px; }
.reprint .rp-row input { width: 20px; height: 20px; margin: 0; }
.reprint .rp-row img, .reprint .rp-ph { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--soft, #f3f4f6); display: grid; place-items: center; }
.reprint .rp-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reprint .rp-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.reprint .rp-st { font-size: 12px; font-weight: 600; }
.reprint .rp-ok { color: #15803d; } .reprint .rp-bad { color: #b91c1c; } .reprint .rp-wait { color: #b45309; }
.reprint .rp-go { position: sticky; bottom: 0; background: inherit; padding-top: 8px; }
.reprint .rp-go .btn { width: 100%; }

/* ---------- friendly error pages (src/errorpage.js) and the "couldn't load" card ---------- */
body.errpage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.errpage main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px 22px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 6px 24px rgba(30,43,69,.10); }
.errpage .err-brand { font: 700 15px var(--font-display); color: var(--leather); letter-spacing: .02em; margin-bottom: 14px; }
.errpage h1 { font-size: 24px; margin-bottom: 10px; }
.errpage .err-msg { color: var(--ink-2); margin-bottom: 18px; }
.errpage .err-go { display: block; background: var(--leather); color: #fff; text-decoration: none; font: 600 17px var(--font-body); border-radius: var(--radius-m); padding: 15px 18px; }
.errpage .err-go:hover { background: var(--leather-dark); }
.load-fail { text-align: center; padding: 28px 18px; }
.load-fail h2 { margin-bottom: 8px; }
.load-fail p { margin: 0 auto 16px; max-width: 420px; }
.load-fail .btn { min-height: 44px; padding-left: 22px; padding-right: 22px; }

/* ---------- first minute (multi-seller): Home's first-visit cards, Know your number, the upload reveal ---------- */
.fm { display: grid; gap: 12px; margin-bottom: 18px; }
.fm-card { margin: 0; }
.fm-card h2 { margin-bottom: 6px; }
.fm-card p { margin: 0 0 12px; }
.fm .fm-btn { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; max-width: 420px; min-height: 48px; font-size: 16px; }
.fm-know { border: 2px solid var(--leather); background: #FBF6F0; }
.fm-know h2 { font-size: 24px; }
.fm-know p { font-size: 16px; color: var(--ink-2); }
.fm-know .fm-go { background: var(--leather); border-color: var(--leather); min-height: 56px; font-size: 18px; }
.fm-know .fm-go:hover { background: var(--leather-dark); }
.fm-gmail { border-color: var(--ink); }
.fm-example { display: grid; justify-items: start; gap: 4px; }
.fm-example p { margin: 0; }
.fm-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 12px 14px; background: #F3F4F7; border-radius: var(--radius-m); }
.fm-line .spin { display: inline-block; width: 14px; height: 14px; }
.fm-found { background: #EEF7F0; border: 1px solid var(--profit); }
.fm-found b { flex: 1 1 200px; font-size: 16px; }
.fm-mini { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--leather); border-radius: var(--radius-m); background: #FBF6F0; color: var(--ink); text-decoration: none; }
.fm-mini span { color: var(--leather-dark); font-weight: 600; }

.kn { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 520px; }
.kn > * { min-width: 0; }
.kn-photo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.kn-img { width: 100%; max-height: 120px; object-fit: contain; background: #F3F4F7; border-radius: var(--radius-s); }
.kn-label { font-weight: 600; margin-top: 6px; }
.kn-label-sm { font-size: 14px; }
.kn-money { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 0 14px; background: #fff; }
.kn-money:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(30,43,69,.15); }
.kn-money span { font: 700 26px var(--font-display); color: var(--ink-3); }
.kn-money input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; padding: 10px 0; font: 700 34px/1.2 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.kn-target span { font-size: 18px; }
.kn-target input { font-size: 20px; padding: 8px 0; min-height: 44px; }
.kn-out { min-height: 64px; margin-top: 6px; }
.kn-out p { margin: 0 0 6px; }
.kn-big { font: 600 20px/1.3 var(--font-display); }
.kn-big b { font-size: 28px; color: var(--leather-dark); white-space: nowrap; }
.kn-be { color: var(--ink-2); }
.kn-ladder { width: 100%; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.kn-ladder td, .kn-ladder th { padding: 8px 10px; }
.kn-ladder td:last-child, .kn-ladder th:last-child { text-align: right; }
.kn-ladder tr.on td { font-weight: 700; background: #FBF6F0; }
.kn-save { min-height: 52px; font-size: 17px; }
.kn-note { margin: 0; }
.kn-saved { text-align: center; display: grid; gap: 8px; padding: 6px 0; }
.kn-saved p { margin: 0; }
.kn-ok { font: 700 24px var(--font-display); color: var(--profit); }
.kn-fl { font: 700 40px/1.1 var(--font-display); letter-spacing: .02em; }
.kn-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.kn-btns .btn { display: flex; align-items: center; justify-content: center; min-height: 48px; }

.reveal { margin-bottom: 18px; border: 2px solid var(--profit); }
.rv-top h2 { min-width: 0; }
.rv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rv-x { flex: none; width: 44px; height: 44px; margin: -10px -12px 0 0; border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.rv-when { margin: 0 0 10px; }
.rv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.rv-grid div { background: #F3F4F7; border-radius: var(--radius-s); padding: 10px 12px; min-width: 0; }
.rv-grid span { display: block; font-size: 13px; color: var(--ink-3); }
.rv-grid b { font: 700 22px var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rv-fees { background: #FBEEEE !important; }
.rv-fees b { color: var(--loss); }
.rv-best, .rv-profit { margin: 0 0 6px; }
#suReveal .reveal { margin: 14px 0 0; }
a.su-wn-open { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; max-width: 420px; min-height: 52px; font-size: 17px; background: var(--leather); border-color: var(--leather); }
.su-wn-open:hover { background: var(--leather-dark); }
.su-wn-line { margin: 8px 0 4px; }
@media (max-width: 760px) { .rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fm .fm-btn { max-width: none; } }

/* ---------- Help chat (help.js; multi-seller mode only) ---------- */
.help-root { font: 15px/1.45 var(--font-body); color: var(--ink); }
.help-btn { position: fixed; right: 20px; bottom: 20px; z-index: 1010; width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0;
  background: var(--leather); color: #fff; font: 700 15px/1 var(--font-body); box-shadow: 0 4px 14px rgba(30,43,69,.28); cursor: pointer; }
.help-btn:hover { background: var(--leather-dark); }
.help-dot { position: absolute; top: 1px; right: 1px; width: 14px; height: 14px; border-radius: 50%; background: #E0464B; border: 2px solid #fff; }
.help-dot[hidden], .help-root.open .help-btn, .help-panel[hidden], .help-aim[hidden], .help-draw[hidden], .help-chip[hidden], .help-note[hidden] { display: none; }
.help-panel { position: fixed; right: 20px; bottom: 20px; z-index: 1020; width: 380px; max-width: calc(100vw - 32px); height: min(600px, calc(100dvh - 40px));
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(30,43,69,.25); overflow: hidden; }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px 16px; border-bottom: 1px solid var(--line); }
.help-x { width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--ink-2); cursor: pointer; border-radius: 8px; }
.help-x:hover { background: #F3F4F7; }
.help-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.help-empty { margin: auto; text-align: center; color: var(--ink-2); max-width: 260px; }
.help-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.help-msg.seller { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.help-msg.ai, .help-msg.team, .help-wait { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.help-msg.team { border-color: var(--leather); }
.help-who { display: block; font-size: 12px; font-weight: 600; color: var(--leather); margin-bottom: 2px; }
.help-wait { color: var(--ink-3); letter-spacing: .1em; }
.help-compose { padding: 10px 12px 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.help-compose textarea { width: 100%; min-height: 64px; max-height: 160px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); font: inherit; color: var(--ink); background: #fff; }
.help-chip { display: flex; align-items: center; justify-self: start; max-width: 100%; min-width: 0; background: #FBEFE4; color: var(--leather-dark);
  border: 1px solid var(--leather); border-radius: 999px; padding-left: 12px; font-size: 14px; font-weight: 600; }
.help-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.help-chip button { flex: none; width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; border-radius: 999px; }
.help-pic { display: flex; align-items: center; gap: 10px; }
.help-pic input { width: 22px; height: 22px; margin: 0; accent-color: var(--leather); flex: none; }
.help-pic label { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-size: 14.5px; }
.help-note { font-size: 14px; color: var(--ink-2); }
.help-acts { display: flex; gap: 8px; }
.help-acts .btn { flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.help-aim { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 10px); z-index: 1025; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 0 0 0 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(30,43,69,.3); max-width: calc(100vw - 24px); white-space: nowrap; font-weight: 600; }
.help-aim button { min-height: 44px; padding: 0 16px; border: 0; border-left: 1px solid rgba(255,255,255,.25); background: none; color: #fff; font: 600 15px var(--font-body); cursor: pointer; border-radius: 0 999px 999px 0; }
html.help-aiming, html.help-aiming body * { cursor: crosshair !important; }
.help-pointed { outline: 3px solid #E0464B !important; outline-offset: 2px !important; }
.help-draw { position: fixed; inset: 0; z-index: 1030; background: rgba(20,28,45,.94); color: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 12px); }
.help-draw-tip { text-align: center; font-size: 15px; }
.help-draw-stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.help-draw canvas { touch-action: none; background: #fff; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.4); cursor: crosshair; }
.help-draw canvas[hidden] { display: none; }
.help-draw-acts { display: flex; gap: 10px; width: 100%; max-width: 420px; }
.help-draw-acts .btn { flex: 1; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
/* the picture of the screen: private spots (buyer names) go black, pictures inside them vanish */
html.fl-snap [data-private], html.fl-snap [data-private] * { background: #000 !important; color: #000 !important; border-color: #000 !important; text-shadow: none !important; }
html.fl-snap [data-private] img, html.fl-snap [data-private] canvas, html.fl-snap [data-private] svg, html.fl-snap [data-private] video { visibility: hidden !important; }
body.has-help .toast { right: 88px; }
body.tv-mode .help-root { display: none; }
@media print { .help-root { display: none !important; } }
@media (max-width: 760px) {
  .help-btn { right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); width: 52px; height: 52px; font-size: 14px; }
  body.has-help .toast { right: 76px; }
  .help-panel { left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: calc(100dvh - 48px - env(safe-area-inset-top)); border-radius: 16px 16px 0 0;
    border-left: 0; border-right: 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
}

/* ---------- LootDock theme (seller app only: the server adds data-brand to <html> in multi mode) ----------
   Colors and the display font come from the LootDock logo: black hull, gold trim, red flag, deep-red "Dock",
   teal sea, on a parchment page. Heather's single-seller app never gets data-brand, so none of this reaches it. */
html[data-brand="lootdock"] {
  --ink: #141414;
  --ink-2: #3D3934;
  --ink-3: #6B655C;
  --paper: #F6F1E6;
  --card: #FFFDF8;
  --line: #E3DACA;
  --leather: #C8161D;      /* flag red */
  --leather-dark: #8E0E12; /* "Hoy" red */
  --brass: #F2B705;        /* gold trim */
  --sea: #13939A;          /* the waves */
  --profit: #0F7A63;
  --loss: #B3141B;
  --focus: #13939A;
  --font-brand: "Rye", Georgia, serif;
}
html[data-brand="lootdock"] h1 { font-family: var(--font-brand); font-weight: 400; letter-spacing: .01em; }
html[data-brand="lootdock"] .btn:hover { background: var(--leather-dark); border-color: var(--leather-dark); color: #fff; }
html[data-brand="lootdock"] .side { border-right: 3px solid var(--brass); }
html[data-brand="lootdock"] .side a { color: #D9D2C3; }
html[data-brand="lootdock"] .side a.on { background: rgba(242,183,5,.16); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
html[data-brand="lootdock"] .side-foot .muted { color: #A39C8E; }
html[data-brand="lootdock"] .brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-brand); font-weight: 400; color: var(--brass); letter-spacing: .01em; }
html[data-brand="lootdock"] .brand svg { display: none; }
html[data-brand="lootdock"] .brand::before { content: ""; flex: none; width: 36px; height: 28px; background: url(/brand/mark.png) center / contain no-repeat; }
html[data-brand="lootdock"] .badge { background: var(--brass); color: var(--ink); }
html[data-brand="lootdock"] h1.brand-logo { margin: 0 auto 10px; line-height: 0; }
html[data-brand="lootdock"] h1.brand-logo img { width: 260px; max-width: 80%; height: auto; }
@media (max-width: 760px) {
  html[data-brand="lootdock"] .topbar { border-bottom: 3px solid var(--brass); }
  html[data-brand="lootdock"] .topbar .brand::before { width: 30px; height: 24px; }
}

/* Bigger logo: the full LootDock logo heads the desktop menu; the phone's top bar gets a larger ship */
html[data-brand="lootdock"] .side .brand { font-size: 0; justify-content: center; margin: -6px 0 14px; padding: 0; }
html[data-brand="lootdock"] .side .brand::before { width: 196px; height: 152px; background-image: url(/brand/logo.png); }
@media (max-width: 760px) {
  html[data-brand="lootdock"] .topbar { padding-top: calc(env(safe-area-inset-top) + 6px); padding-bottom: 6px; }
  html[data-brand="lootdock"] .topbar .brand { font-size: 23px; gap: 10px; }
  html[data-brand="lootdock"] .topbar .brand::before { width: 52px; height: 40px; }
}
html[data-brand="lootdock"] h1.brand-logo img { width: 320px; }

/* Receipts from a picture: the Add items button, and Inventory's Add a receipt (assign each line to an item) */
.qa-rcpt { background: #FBF3E6; border: 1px dashed var(--brass); border-radius: var(--radius-m); padding: 10px 12px; margin: 4px 0 12px; }
.qa-rcpt p { margin: 6px 0 0; }
.qa-rcpt .warn { color: #9a3412; }
.qa-rc-pics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.qa-rc-pics:empty { display: none; }
.qa-rc-pics img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.rc-noimg { width: 44px; height: 44px; border-radius: 8px; background: var(--line); display: block; flex: none; }
.rm-q { margin: 14px 0 8px; }
.rm-lines { display: grid; gap: 10px; margin: 0 0 12px; }
.rm-line { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; background: var(--card); }
.rm-head { display: flex; gap: 10px; align-items: center; }
.rm-head img, .rm-head .rc-noimg { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.rm-find { margin: 10px 0 6px; font-size: 16px; }
.rm-opts { display: grid; gap: 6px; }
.rm-opt { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.rm-opt:hover, .rm-opt:focus-visible { border-color: var(--leather); }
.rm-opt img, .rm-opt .rc-noimg { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; }
.rm-more { margin: 8px 0 0; font-size: 14px; }
.rm-chosen { margin: 8px 0 0; }
.rm-line .linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--leather); text-decoration: underline; cursor: pointer; }
.su-steps .su-note { display: block; margin-top: 6px; font-size: 13px; color: var(--muted, #6b6b6b); }
.su-steps .su-codebox { margin: 8px 0; }

/* Printer switch (her own app, two or more Macs): which Mac has the label printer, one tap to move it */
.pr-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 12px 0; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.pr-switch .pr-now { font-size: 14px; color: var(--ink-2); }
.pr-switch .pr-now b { color: var(--ink); }
.pr-switch .seg button:disabled { opacity: .55; cursor: progress; }
.pr-switch .pr-short { display: none; }
@media (max-width: 560px) { .pr-switch .pr-full { display: none; } .pr-switch .pr-short { display: inline; } }

/* Requested in chat: the numbers viewers asked for, most asked first */
.tv-req { display: flex; flex-wrap: wrap; align-items: center; gap: 1vh 1.2vw; }
.tv-req .tv-lbl { margin-right: .6vw; }
.tv-req .req-chip { display: inline-flex; align-items: baseline; gap: .5vw; background: #1C2740; border: 2px solid #E9C46A; border-radius: 1vw; padding: .6vh 1.4vw; font-size: 3vw; line-height: 1.1; }
.tv-req .req-chip i { font-style: normal; font-size: 1.8vw; color: #E9C46A; }
.tv-req .req-chip em { font-style: normal; font-size: 1.5vw; color: #AEB8CC; }
.req-panel { padding: 10px 14px; }
.req-panel .req-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 10px; margin: 2px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.req-panel .req-chip i { font-style: normal; font-size: 12px; color: var(--ink-3); }

/* a newer version is out and the page is busy (live show): one tap to refresh */
.upd-note { position: fixed; right: 16px; bottom: 16px; z-index: 50; padding: 10px 16px; border: 0; border-radius: 999px; background: #E9C46A; color: #1B2333; font: inherit; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.25); cursor: pointer; }

/* Find by photo (Inventory): bags in stock that look like the photo, with number, bin and Print its tag */
.fbp h2 { margin: 0 0 10px; }
.fbp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.fbp-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--card); }
.fbp-card.first { border-color: var(--accent, #c9a227); box-shadow: 0 0 0 1px var(--accent, #c9a227); }
.fbp-img { flex: none; width: 96px; height: 96px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--line); cursor: zoom-in; }
.fbp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fbp-sku { font-size: 18px; letter-spacing: .02em; }
.fbp-txt { min-width: 0; }

.bs-foot .bs-personal { width: auto; font-size: 14px; padding: 8px 12px; margin-top: 10px; }

/* Dashboard: Customize */
.dash-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dsec { margin-top: 18px; border: 2px dashed var(--line); border-radius: var(--radius-m); padding: 8px; }
.dsec > section { margin-top: 8px !important; }
.dsec-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px; }
.dash-add { margin-top: 18px; }
.dash-none { margin-top: 18px; }

/* Biggest Booty: the best flip ever, in gold, with sparkles */
.booty-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.booty-body { display: flex; gap: 18px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.booty-frame { position: relative; flex: none; width: 168px; height: 168px; padding: 6px; border-radius: 14px;
  background: linear-gradient(135deg, #f7e08a, #c9962b 35%, #fff2b8 55%, #b07d1e 80%, #f3d36b);
  box-shadow: 0 0 0 1px #8a5d10, 0 0 22px rgba(233, 196, 106, .55); }
.booty-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; background: #fff; }
.booty-noimg { display: grid; place-items: center; font-size: 48px; }
.booty-frame .spark { position: absolute; color: #fff6c9; font-style: normal; line-height: 1; text-shadow: 0 0 6px #ffd76a, 0 0 12px #e9c46a;
  animation: twinkle 2.4s ease-in-out infinite; pointer-events: none; }
.booty-frame .spark:nth-of-type(1) { top: -10px; left: 14px; font-size: 18px; }
.booty-frame .spark:nth-of-type(2) { top: 20px; right: -11px; font-size: 14px; animation-delay: .4s; }
.booty-frame .spark:nth-of-type(3) { bottom: -9px; right: 30px; font-size: 20px; animation-delay: .9s; }
.booty-frame .spark:nth-of-type(4) { bottom: 26px; left: -10px; font-size: 13px; animation-delay: 1.3s; }
.booty-frame .spark:nth-of-type(5) { top: -7px; right: 26px; font-size: 11px; animation-delay: 1.7s; }
.booty-frame .spark:nth-of-type(6) { bottom: -6px; left: 40px; font-size: 10px; animation-delay: 2s; }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@media (prefers-reduced-motion: reduce) { .booty-frame .spark { animation: none; opacity: .9; } }
.booty-txt { flex: 1 1 200px; min-width: 0; }
.booty-title { font-weight: 700; font-size: 18px; }
.booty-nums { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 18px; margin-top: 10px; justify-content: start; font-size: 13px; color: var(--ink-2); }
.booty-nums b { display: block; font-size: 20px; color: var(--ink); }
.booty-nums .win b { color: #2e7d4f; }

/* Booty leaderboard */
.lb { list-style: none; margin: 8px 0 0; padding: 0; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.lb li:first-child { border-top: 0; }
.lb-n { flex: none; width: 24px; text-align: center; font-weight: 700; color: var(--ink-3); }
.lb-first .lb-n { color: #b07d1e; }
.lb-img { flex: none; width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--line); }
.lb-first .lb-img { box-shadow: 0 0 0 2px #e9c46a; }
.lb-img.booty-noimg { font-size: 20px; }
.lb-t { flex: 1; min-width: 0; }
.lb-t .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-p { flex: none; color: #2e7d4f; }

/* Kids' pay (Heather's app): each helper's card, the cleaning link, the 🧽 pill on a bag */
.kp-list { display: grid; gap: 14px; margin-bottom: 14px; }
.kp-card h2 { margin: 0; font-size: 22px; }
.kp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.kp-owed { text-align: right; }
.kp-owed b { display: block; font-size: 28px; line-height: 1.1; color: var(--profit); font-variant-numeric: tabular-nums; }
.kp-owed.neg b { color: var(--loss); }
.kp-owed span { font-size: 12.5px; color: var(--ink-3); }
.kp-sub { margin: 6px 0 12px; }
.kp-acts { gap: 8px; flex-wrap: wrap; }
.kp-more { margin-top: 14px; border-top: 1px solid #EEF0F3; padding-top: 10px; }
.kp-h3 { font-size: 15px; margin: 14px 0 6px; }
.kp-paid { list-style: none; padding: 0; margin: 0; }
.kp-paid li { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #EEF0F3; }
.kp-paid li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.kp-add, .kp-link { margin-bottom: 14px; }
.kp-add form input { flex: 1 1 180px; }
.kp-link .row input { flex: 1 1 220px; min-width: 0; }
.kp-qr { width: 180px; max-width: 60%; margin: 10px 0; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line, #E3DACA); }
.kp-qr svg { width: 100%; height: auto; display: block; }
.kp-who { display: grid; gap: 10px; }
.kp-who label { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.kp-who input { width: 20px; height: 20px; }
.pill-clean { border: 0; cursor: pointer; background: #E4F1E9; color: #1F6B4A; font: inherit; font-size: 12px; margin-top: 3px; }
.pill-clean:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ao-helper { display: inline-flex; align-items: center; gap: 6px; }
.ao-helper select { max-width: 160px; }
