:root {
  --hdr: #d62839; --red: #d62839; --red-d: #b71f2f; --red-bg: #fde8ea; --amber: #b45309; --amber-bg: #fef3c7; --ok: #15803d; --ok-bg: #dcfce7; --blue: #1d4ed8; --blue-bg: #dbeafe;
  --bg: #f4f4f6; --card: #ffffff; --text: #141416; --sub: #6b6b73; --line: #e4e4e8; --field: #f4f4f6; --press: #ececf0;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 8px rgba(0,0,0,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --red: #ec4253; --red-d: #d63243; --hdr: #a81d2c; --red-bg: #3a1519; --amber: #fbbf24; --amber-bg: #3a2c0a; --ok: #4ade80; --ok-bg: #0f2f1b; --blue: #93c5fd; --blue-bg: #172554;
    --bg: #0d0d0f; --card: #1c1c1f; --text: #f3f3f5; --sub: #9a9aa3; --line: #2c2c31; --field: #26262a; --press: #2a2a2f; --shadow: none; color-scheme: dark; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); min-height: 100vh; }
body.flow { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.boot { display: grid; place-items: center; height: 80vh; }
.boot img { border-radius: 18px; }
header.top { position: sticky; top: 0; z-index: 5; background: var(--hdr); color: #fff; padding: calc(env(safe-area-inset-top) + 10px) 16px 12px; display: flex; align-items: center; gap: 10px; min-height: 56px; }
header.top h1 { font-size: 20px; margin: 0; flex: 1; font-weight: 700; letter-spacing: -.2px; }
header.top .logo { width: 30px; height: 30px; border-radius: 8px; background: #fff url(/icon-maskable-192.png) center/cover; }
header.top .hb { background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 12px; min-height: 40px; padding: 0 14px; font-weight: 600; cursor: pointer; }
main { padding: 14px 14px 20px; max-width: 640px; margin: 0 auto; }
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.card h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .4px; color: var(--sub); margin: 0; padding: 14px 16px 6px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h2 .n { background: var(--red); color: #fff; border-radius: 999px; font-size: 13px; padding: 1px 8px; letter-spacing: 0; }
.card.alert h2 { color: var(--red); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px; border-top: 1px solid var(--line); cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.card > .row:first-of-type, .card h2 + .row { border-top: 1px solid var(--line); }
.row:active, .row.pressed { background: var(--press); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row .s { color: var(--sub); font-size: 14px; margin-top: 2px; }
.row .chev { color: var(--sub); font-size: 22px; line-height: 1; }
.row.dim .t { color: var(--sub); }
.qty { font-size: 24px; font-weight: 700; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.qty small { display: block; font-size: 12px; font-weight: 500; color: var(--sub); }
.qty.zero { color: var(--sub); }
.qty.low { color: var(--red); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; white-space: nowrap; }
.tag.exp { background: var(--red); color: #fff; }
.tag.soon7 { background: var(--red-bg); color: var(--red); }
.tag.soon30 { background: var(--amber-bg); color: var(--amber); }
.tag.low { background: var(--red-bg); color: var(--red); }
.tag.starter { background: var(--field); color: var(--sub); font-weight: 600; }
.tag.type { background: var(--field); color: var(--text); }
.big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 68px; border: 0; border-radius: 18px; background: var(--red); color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(214,40,57,.28); margin-bottom: 12px; }
.big:active { background: var(--red-d); transform: scale(.99); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); border: 0; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; padding: 8px 4px; }
.act .e { font-size: 24px; }
.act:active { background: var(--press); }
.act .soon { font-size: 11px; color: var(--sub); font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 10px; }
.seg button { border: 0; background: none; min-height: 48px; border-radius: 11px; font-weight: 700; font-size: 17px; cursor: pointer; color: var(--sub); }
.seg button[aria-pressed="true"] { background: var(--red); color: #fff; }
.search { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 0 14px; margin-bottom: 10px; font-size: 17px; }
.empty { padding: 18px 16px; color: var(--sub); text-align: center; }
.note { font-size: 14px; color: var(--sub); padding: 12px 16px; border-top: 1px solid var(--line); }
.note b { color: var(--text); }
.linkbtn { display: block; width: 100%; min-height: 56px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--red); font-weight: 700; font-size: 17px; cursor: pointer; }
.linkbtn:active { background: var(--press); }
.btn { min-height: 52px; border-radius: 14px; border: 0; padding: 0 18px; font-weight: 700; font-size: 17px; cursor: pointer; background: var(--field); width: 100%; }
.btn.red { background: var(--red); color: #fff; }
.btn.danger { background: none; color: var(--red); border: 1.5px solid var(--red); }
.btn:active { filter: brightness(.94); }
.btn:disabled { opacity: .45; }
.stack { display: grid; gap: 10px; }
form.f { padding: 6px 16px 16px; }
label.fl { display: block; font-size: 14px; color: var(--sub); font-weight: 600; margin: 12px 0 6px; }
label.fl i { font-style: normal; font-weight: 400; }
input.in, select.in, textarea.in { width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); padding: 10px 14px; font-size: 17px; }
textarea.in { min-height: 84px; resize: vertical; }
input.in:focus, textarea.in:focus, select.in:focus, .search:focus { outline: 2px solid var(--red); outline-offset: -1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.step { display: flex; align-items: center; gap: 0; border-radius: 12px; background: var(--field); border: 1px solid var(--line); overflow: hidden; }
.step button { width: 48px; min-height: 48px; border: 0; background: none; font-size: 24px; font-weight: 600; cursor: pointer; color: var(--red); }
.step button:active { background: var(--press); }
.step input { width: 46px; border: 0; background: none; text-align: center; font-size: 19px; font-weight: 700; min-height: 48px; padding: 0; -moz-appearance: textfield; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step.wide input { flex: 1; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; min-height: 66px; border-top: 1px solid var(--line); }
.pick .main { flex: 1; min-width: 0; cursor: pointer; padding: 4px 0; }
.pick.on { background: var(--red-bg); }
.pick.on .step { background: var(--card); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.savebar .btn { max-width: 612px; margin: 0 auto; display: block; min-height: 58px; font-size: 19px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 62px; font-size: 13px; font-weight: 600; color: var(--sub); }
.tabs a .ti { font-size: 22px; line-height: 1.1; filter: grayscale(1); opacity: .7; }
.tabs a.on { color: var(--red); }
.tabs a.on .ti { filter: none; opacity: 1; }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: 12px; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: #222; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; max-width: 92vw; z-index: 20; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.kv { display: flex; padding: 12px 16px; border-top: 1px solid var(--line); gap: 12px; }
.kv > span:first-child { color: var(--sub); width: 96px; flex: none; }
.kv > span:last-child { flex: 1; font-weight: 600; word-break: break-word; }
.login { max-width: 380px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 56px) 22px 30px; text-align: center; }
.login img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 6px 20px rgba(214,40,57,.3); }
.login h1 { margin: 18px 0 4px; font-size: 30px; }
.login p { color: var(--sub); margin: 0 0 22px; }
.pin { text-align: center; font-size: 30px !important; letter-spacing: 10px; font-weight: 700; min-height: 62px !important; }
.msg { color: var(--red); font-weight: 600; min-height: 24px; margin: 10px 0; }
.list-edit .le { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 16px; border-top: 1px solid var(--line); min-height: 56px; }
.list-edit .le span { flex: 1; }
.list-edit .le button { width: 48px; height: 48px; border: 0; background: none; font-size: 22px; color: var(--sub); cursor: pointer; }
.addline { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.addline .btn { width: auto; }
.when { font-variant-numeric: tabular-nums; }
.soonbox { padding: 18px 16px; text-align: center; }
.soonbox .e { font-size: 54px; }
.pick.on .tag.soon7, .pick.on .tag.low { background: var(--card); }
.pin::placeholder { letter-spacing: 0; font-size: 18px; font-weight: 500; }

/* v2: call types, delete, prices */
.tag.emva { background: var(--red); color: #fff; }
.tag.priv { background: var(--blue-bg); color: var(--blue); }
.ctype { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ctype button { min-height: 84px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; }
.ctype button b { font-size: 22px; font-weight: 800; }
.ctype button small { font-size: 13px; color: var(--sub); font-weight: 600; }
.ctype .emva[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.ctype .priv[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (prefers-color-scheme: dark) { .ctype .priv[aria-pressed="true"] { background: #2563eb; border-color: #2563eb; } }
.ctype button[aria-pressed="true"] small { color: rgba(255,255,255,.85); }
.ctype button:active { transform: scale(.98); }
.row .trash { flex: none; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 12px; background: none; font-size: 20px; cursor: pointer; opacity: .75; }
.row .trash:active { background: var(--red-bg); opacity: 1; }
.row .ck { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; }
.row .ck.on { background: var(--red); border-color: var(--red); }
.row.picked { background: var(--red-bg); }
.selbtn { margin-left: 8px; border: 0; background: var(--field); color: var(--red); font-weight: 700; font-size: 15px; border-radius: 999px; min-height: 34px; padding: 0 14px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.hsub { margin-left: auto; font-weight: 600; text-transform: none; letter-spacing: 0; }
.seg.three { grid-template-columns: 1fr 1fr 1fr; }
.seg.three button { font-size: 16px; }
.tot2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 16px 12px; }
.tot2 button { border: 1px solid var(--line); background: var(--field); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; cursor: pointer; text-align: left; }
.tot2 b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tot2 small { color: var(--sub); font-size: 13px; }
.kv.mrow { align-items: center; }
.kv.mrow > span:first-child { width: auto; flex: 1; color: var(--text); }
.kv.mrow small { display: block; font-size: 13px; color: var(--sub); font-weight: 500; margin-top: 2px; }
.kv.mrow > b { font-variant-numeric: tabular-nums; font-size: 18px; }
.kv.wide > span:first-child { width: auto; flex: 1; color: var(--text); }
.kv.wide > span:last-child { flex: none; }
.pick .t { font-weight: 600; }
.pick .s { color: var(--sub); font-size: 14px; margin-top: 2px; }
.totrow { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-top: 2px solid var(--line); font-weight: 700; }
.totrow b { font-size: 22px; font-variant-numeric: tabular-nums; }
.qty.money { font-size: 18px; min-width: 64px; }
.dollar { position: relative; }
.dollar span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sub); font-weight: 600; pointer-events: none; }
.dollar input { padding-left: 28px !important; }
.warn { color: var(--amber); font-weight: 600; }
.card h2 .opt { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; }
.savebar.two-b { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.savebar.two-b .btn { margin: 0; }
.kv .s { color: var(--sub); font-weight: 500; font-size: 14px; }

/* v3: where it was bought + 🛒 Buy */
a.buy { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--blue-bg); color: var(--blue); font-weight: 700; font-size: 15px; white-space: nowrap; }
a.buy:active { opacity: .7; }
.row .s.from { font-size: 13px; margin-top: 1px; }
.row a.buy { margin-right: -4px; }
.buyline { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.buyline .main { flex: 1; min-width: 0; }
.buyline .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buyline .s { color: var(--sub); font-size: 14px; margin-top: 2px; }
.urlrow { display: flex; gap: 8px; align-items: center; }
.urlrow .in { flex: 1; min-width: 0; }
.minf { display: flex; align-items: center; gap: 8px; }
.minf label { flex: none; font-size: 15px; font-weight: 600; color: var(--sub); }
.minf .in { flex: 1; min-width: 0; }

/* v4 photos */
.th { flex: none; position: relative; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--press); color: var(--sub); display: grid; place-items: center; }
.th svg { width: 22px; height: 22px; opacity: .55; }
.th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.th.has svg { visibility: hidden; }
.th.has { box-shadow: inset 0 0 0 1px var(--line); }
.th.has img { border-radius: 10px; }
.pick .th { cursor: pointer; }
.row .ck + .th { margin-left: -2px; }
.photo { padding: 14px 16px; }
.pbig { position: relative; width: min(100%, 240px); aspect-ratio: 1 / 1; margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--press); color: var(--sub); display: grid; place-items: center; }
.pbig svg { width: 64px; height: 64px; opacity: .45; }
.pbig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pbig.has svg { visibility: hidden; }
.pacts { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.pacts .btn { flex: 0 1 auto; width: auto; min-width: 120px; padding-left: 18px; padding-right: 18px; }

/* v5: category filter */
.filt { display: flex; gap: 8px; margin-bottom: 10px; }
.filt .search { margin: 0; flex: 1 1 42%; min-width: 0; }
.filt.in-card { padding: 0 16px 10px; }
.catsel { flex: 1 1 58%; min-width: 0; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 0 30px 0 12px; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.filt.in-card .catsel, .filt.in-card .search { background-color: var(--field); }
.catsel.on { border-color: var(--red); color: var(--red); }
.catsel:focus { outline: 2px solid var(--red); outline-offset: -1px; }
select.in#fCat { -webkit-appearance: none; appearance: none; color: var(--text); }
.list-edit .le.cat { padding: 6px 4px 6px 12px; gap: 6px; }
.list-edit .le.cat input.in { min-height: 44px; padding: 8px 10px; flex: 1; min-width: 0; }
.list-edit .le input.in.emo, .list-edit .addline input.in.emo { flex: 0 0 48px; width: 48px; text-align: center; padding: 8px 4px; font-size: 20px; }
.list-edit .le.cat .cnt { flex: 0 0 auto; color: var(--sub); font-size: 13px; min-width: 18px; text-align: right; }
.list-edit .le.cat button { width: 40px; }
.addline input.in { min-width: 0; }
.addline input.in:not(.emo) { flex: 1; }
.cats-main { padding-bottom: 96px; }

/* v6: unit price on list rows, delete link in the item sheet, full count */
.row .pr { flex: none; text-align: right; font-size: 14px; font-weight: 600; color: var(--sub); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15; }
.row .pr small { display: block; font-size: 11px; font-weight: 500; }
.row .pr + .qty { min-width: 36px; }
#valNote b { color: var(--text); font-weight: 700; }
#valNote span { color: var(--sub); }
.dellink { display: block; margin: 18px auto 8px; padding: 10px 16px; border: 0; background: none; color: var(--red); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cnt { padding: 10px 14px 12px 16px; border-top: 1px solid var(--line); }
.cnt.on { background: var(--red-bg); }
.cnt .ctop { display: flex; align-items: center; gap: 10px; }
.cnt .ctop .th { width: 36px; height: 36px; }
.cnt .main { flex: 1; min-width: 0; }
.cnt .t { font-weight: 600; }
.cnt .s { color: var(--sub); font-size: 13px; margin-top: 1px; }
.cpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.cbox .cl { font-size: 13px; font-weight: 600; margin: 0 0 4px 2px; }
.cbox .cl span { color: var(--sub); font-weight: 500; }
.cbox .step { width: 100%; }
.cbox .step input { flex: 1; min-width: 0; }
.cbox .step button { width: 44px; }
.cbox.ch .step { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.cbox.ch .cl { color: var(--red); }
.row.rv { cursor: default; }
.rv .ft { flex: none; text-align: right; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv .ft .o { color: var(--sub); text-decoration: line-through; }
.rv .ft b { font-size: 22px; }
.rv .ft small { display: block; font-size: 12px; font-weight: 700; }
.rv .ft small.up { color: var(--ok); }
.rv .ft small.dn { color: var(--red); }
.selbtn { white-space: nowrap; flex: none; }

/* v7: the 'open in browser' fallback link inside the toast */
.toast.show a.ext { pointer-events: auto; color: #fff; text-decoration: underline; display: inline-block; padding: 4px 2px; }

/* v8 activity log */
.logseg{display:flex;gap:6px;flex-wrap:wrap}
.logseg button{flex:1 1 auto;min-height:40px;border-radius:10px;border:1px solid var(--line);background:transparent;color:inherit;font:inherit;font-weight:600;padding:6px 10px}
.logseg button.on{background:var(--red);border-color:var(--red);color:#fff}
.logrow{padding:10px 2px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.logrow:last-child{border-bottom:0}
.logrow .lt{font-size:13px;color:var(--sub)}
.logrow .lm{font-size:15px;margin-top:2px}
.logrow .ls{font-size:12px;color:var(--sub);margin-top:2px}
.logrow.bad .lm{color:var(--red);font-weight:600}
.logrow.warn .lm{color:var(--amber)}
.note.over { color: var(--amber); background: var(--amber-bg); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; border: 0; font-size: 14px; }

/* v8 desktop (Shia, Nov 12: "I use it on the computer too"): left sidebar, wider page, Kit alerts beside the list. Phone layout unchanged. */
@media screen and (min-width: 1000px) {
  :root { --kw: 232px; }
  body:has(#tabs:not([hidden])) { padding-left: var(--kw); padding-bottom: 32px; }
  .tabs { top: 0; bottom: 0; right: auto; width: var(--kw); display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line); padding: 84px 12px 12px; }
  .tabs::before { content: "KitCheck"; position: absolute; top: 22px; left: 24px; font-size: 24px; font-weight: 800; color: var(--red); letter-spacing: -.3px; }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 50px; padding: 0 14px; font-size: 17px; border-radius: 12px; }
  .tabs a:hover { background: var(--press); }
  .tabs a.on { background: var(--red-bg); }
  .tabs a .ti { font-size: 22px; }
  .tabs .badge { position: static; margin-left: auto; }
  header.top { padding-left: 28px; padding-right: 28px; }
  main { max-width: 1120px; padding: 24px 28px 40px; }
  body[data-r=calls] main, body[data-r=more] main, body[data-r=log] main, body[data-r=shop] main, body[data-r=cats] main, body[data-r=lists] main, body[data-r=pin] main { max-width: 860px; }
  body[data-r=item] main, body[data-r=use] main, body[data-r=restock] main, body[data-r=add] main, body[data-r=scan] main, body[data-r=call] main, body[data-r=count] main { max-width: 780px; }
  body[data-r=kit] main::after { content: ""; display: block; clear: both; }
  body[data-r=kit] main > #expCard, body[data-r=kit] main > #lowCard { float: left; clear: left; width: 40%; }
  body[data-r=kit] main:has(> #expCard, > #lowCard) > :not(#expCard):not(#lowCard) { margin-left: calc(40% + 22px); width: calc(60% - 22px); box-sizing: border-box; }
  .savebar .btn { max-width: 724px; }
  .toast { bottom: 40px; }
  body:has(#tabs:not([hidden])) .toast { left: calc(50% + var(--kw) / 2); }
  .row, .pick, .tabs a, .btn, .big, button { cursor: pointer; }
}

/* v9: search */
header.top .hs { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; cursor: pointer; }
header.top .hs:active { background: rgba(255,255,255,.3); }
.sbar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; margin: 0 0 12px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); box-shadow: var(--shadow); font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
.sbar .si { font-size: 20px; }
.sbar .sk { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sbar:active { background: var(--press); }
.gsearch { position: relative; }
.gsearch .search { padding-right: 46px; border-width: 2px; border-color: var(--red); }
.gsearch .gx { position: absolute; right: 6px; top: 2px; width: 44px; height: 44px; border: 0; background: none; color: var(--sub); font-size: 18px; cursor: pointer; }
.gchips { gap: 5px; margin-bottom: 10px; flex-wrap: nowrap; }
.chip.sm { min-height: 38px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
.gcount { color: var(--sub); font-size: 14px; margin: 0 4px 8px; }
.gnote { border: 0; text-align: center; background: none; font-size: 13px; }
mark { background: var(--amber-bg); color: inherit; border-radius: 3px; padding: 0 1px; }

/* v9: category chip bar */
.catbar { display: flex; gap: 6px; overflow-x: auto; margin: 0 -14px 10px; padding: 2px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.catbar::-webkit-scrollbar { display: none; }
.cc { flex: none; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.cc b { margin-left: 3px; font-size: 12px; font-weight: 700; color: var(--sub); }
.cc.z { opacity: .55; }
.cc[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; opacity: 1; }
.cc[aria-pressed="true"] b { color: #fff; opacity: .85; }
.filt.cbwrap { flex-direction: column; gap: 0; }
.filt.cbwrap .catbar { margin: 8px -16px 0; padding: 2px 16px; }
.filt.cbwrap .search { margin-bottom: 0; flex: none; width: 100%; background-color: var(--field); }
.filt.in-card.cbwrap { padding-bottom: 12px; }
.gsearch + .gchips { margin-top: 0; }
@media screen and (min-width: 1000px) { .catbar { flex-wrap: wrap; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } .filt.cbwrap .catbar { margin-left: 0; margin-right: 0; padding: 2px 0; } }

.wn { border: 1.5px solid var(--accent, #0a6cff); }
.wn h2 { margin: 0 0 6px; }
.wn ul { margin: 0 0 4px; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.wn li { margin: 3px 0; }
.wn .linkbtn { color: inherit; min-height: 44px; border-top: 1px solid var(--line); }

/* v9.2 needs restock */
.pend .prow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.pend .prow:first-of-type { border-top: 0; }
.pend .pt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pend .pt b { font-size: 16px; overflow-wrap: anywhere; }
.pend .pt small { color: var(--sub); font-size: 13px; }
.pend .pbtn { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--ok-bg); color: var(--ok); font-weight: 800; font-size: 15px; cursor: pointer; }
.pend .pbtn:active { filter: brightness(.94); }
.pend .pbtn:disabled { opacity: .5; }
.pend .pnote { color: var(--sub); font-size: 12.5px; padding-top: 8px; border-top: 1px solid var(--line); }
.pend .linkbtn { min-height: 44px; }
