[hidden] { display: none !important; }
:root {
  --bg: #f4f5f9; --surface: #ffffff; --surface2: #eef0f5; --surface3: #e4e7ef; --line: #e6e8ef;
  --text: #121521; --text2: #4a5065; --muted: #8a90a2;
  --accent: #4f5dff; --accent2: #7b5cff; --accent-soft: #eceeff; --on-accent: #fff;
  --green: #12a150; --green-soft: #e3f6eb; --amber: #c77700; --amber-soft: #fff2dc; --red: #e0352b; --red-soft: #fde7e5;
  --shadow: 0 1px 2px rgba(18,21,33,.04), 0 4px 16px rgba(18,21,33,.06);
  --shadow-lg: 0 10px 40px rgba(18,21,33,.18);
  --r: 18px; --r-sm: 12px;
  --sb: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-top, 0px);
  --tabbar: calc(64px + var(--sb));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f14; --surface: #181a22; --surface2: #22252f; --surface3: #2c303c; --line: #262934;
    --text: #f1f2f6; --text2: #b8bcca; --muted: #7d8294;
    --accent: #7584ff; --accent2: #9a7bff; --accent-soft: #23264a;
    --green: #3ccf7c; --green-soft: #15301f; --amber: #f2a93b; --amber-soft: #352710; --red: #ff6b61; --red-soft: #3a1a18;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0f14; --surface: #181a22; --surface2: #22252f; --surface3: #2c303c; --line: #262934;
  --text: #f1f2f6; --text2: #b8bcca; --muted: #7d8294;
  --accent: #7584ff; --accent2: #9a7bff; --accent-soft: #23264a;
  --green: #3ccf7c; --green-soft: #15301f; --amber: #f2a93b; --amber-soft: #352710; --red: #ff6b61; --red-soft: #3a1a18;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", Roboto, "Segoe UI", sans-serif;
  min-height: 100dvh; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--text); }
svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 640px; margin: 0 auto; }
.pressable { transition: transform .12s ease, background-color .15s; }
.pressable:active { transform: scale(.97); }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  padding: calc(var(--st) + 12px) 16px 10px; }
.header-row { display: flex; align-items: center; gap: 8px; }
.header h1 { font-size: 28px; line-height: 1.15; margin: 0; flex: 1; font-weight: 800; letter-spacing: -.6px; }
.header .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); color: var(--text2); flex: none; }
.round-btn svg { width: 20px; height: 20px; }
.searchbar { margin-top: 12px; display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 0 12px; box-shadow: var(--shadow); }
.searchbar svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.searchbar input { flex: 1; background: none; border: 0; outline: 0; height: 44px; min-width: 0; }
.searchbar .clear { color: var(--muted); width: 28px; height: 28px; display: grid; place-items: center; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--surface); color: var(--text2); font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: var(--shadow); }
.chip .c { font-size: 12px; color: var(--muted); font-weight: 600; }
.chip.on { background: var(--text); color: var(--bg); }
.chip.on .c { color: inherit; opacity: .7; }
.chip svg { width: 16px; height: 16px; }

/* ---------- Hero summary ---------- */
.hero-card { margin: 6px 16px 14px; border-radius: 22px; padding: 18px 18px 16px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.hero-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -70px; top: -90px; background: rgba(255,255,255,.12); }
.hero-card .lbl { font-size: 13px; opacity: .85; }
.hero-card .big { font-size: 32px; font-weight: 800; letter-spacing: -.8px; margin: 2px 0 14px; }
.hero-card .big small { font-size: 16px; font-weight: 600; opacity: .85; margin-left: 4px; }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; z-index: 1; }
.hero-grid div { background: rgba(255,255,255,.16); border-radius: 12px; padding: 8px 10px; }
.hero-grid b { display: block; font-size: 16px; }
.hero-grid span { font-size: 12px; opacity: .85; }

/* ---------- List ---------- */
.list { padding: 0 16px calc(var(--tabbar) + 24px); display: flex; flex-direction: column; gap: 10px; }
.card-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 10px; background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow); width: 100%; text-align: left; }
.card-item.retired { opacity: .72; }
.thumb { width: 58px; height: 58px; border-radius: 14px; flex: none; overflow: hidden; display: grid; place-items: center;
  font-weight: 700; font-size: 22px; color: var(--accent); background: var(--accent-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-main { flex: 1; min-width: 0; }
.ci-name { font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-meta { color: var(--muted); font-size: 13px; margin-top: 2px; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.ci-meta span { overflow: hidden; text-overflow: ellipsis; }
.ci-right { text-align: right; flex: none; }
.ci-price { font-weight: 700; font-size: 15px; }
.ci-pm { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.using { color: var(--green); background: var(--green-soft); }
.pill.sold { color: var(--amber); background: var(--amber-soft); }
.pill.broken { color: var(--red); background: var(--red-soft); }
.group-t { font-size: 13px; font-weight: 600; color: var(--muted); margin: 8px 4px 0; }

.empty { text-align: center; color: var(--muted); padding: 40px 24px; }
.empty .ill { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 28px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty .ill svg { width: 46px; height: 46px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 18px; }
.skel { height: 78px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--tabbar); padding-bottom: var(--sb);
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 88px 1fr; align-items: center; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); height: 100%; justify-content: center; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--accent); }
.tab-add { justify-self: center; width: 58px; height: 58px; border-radius: 20px; margin-top: -26px; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 45%, transparent); }
.tab-add svg { width: 28px; height: 28px; }

/* ---------- Pages (overlay) ---------- */
.page { position: fixed; inset: 0; background: var(--bg); z-index: 30; overflow-y: auto; -webkit-overflow-scrolling: touch; animation: pagein .26s cubic-bezier(.2,.8,.2,1); }
@keyframes pagein { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.page.up { animation: pageup .28s cubic-bezier(.2,.8,.2,1); }
@keyframes pageup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.navbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 4px; padding: calc(var(--st) + 6px) 8px 6px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.navbar h2 { flex: 1; font-size: 17px; margin: 0; text-align: center; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-btn { min-width: 64px; height: 40px; padding: 0 10px; border-radius: 12px; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.nav-btn.plain { color: var(--text2); font-weight: 500; }
.nav-btn svg { width: 22px; height: 22px; }
.page-body { padding: 4px 16px calc(110px + var(--sb)); }

/* ---------- Form ---------- */
.group { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px 14px; margin-bottom: 14px; }
.group-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 18px 6px 8px; }
.f { padding: 10px 0; border-bottom: 1px solid var(--line); }
.f:last-child { border-bottom: 0; }
.f > label, .f .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.f input, .f textarea, .f select { width: 100%; background: transparent; border: 0; outline: 0; padding: 4px 0; min-height: 30px; font-size: 17px; }
.f textarea { resize: none; min-height: 52px; }
.f input::placeholder, .f textarea::placeholder { color: var(--muted); opacity: .7; }
.f .hint { font-size: 12px; color: var(--accent); margin-top: 2px; min-height: 16px; }
.money-wrap { display: flex; align-items: center; gap: 6px; }
.money-wrap span { color: var(--muted); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row2 .f { border-bottom: 0; }
.row2-wrap { border-bottom: 1px solid var(--line); }
.mini-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mini-chip { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--surface2); color: var(--text2); font-weight: 500; }
.mini-chip.on { background: var(--accent); color: #fff; }
.mini-chip.add { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }

.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ptile { position: relative; aspect-ratio: 1; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; border: 2px dashed var(--surface3); }
.ptile svg { width: 30px; height: 30px; color: var(--accent); }
.ptile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ptile.has { border: 0; }
.ptile .rm { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: none; place-items: center; z-index: 2; }
.ptile .rm svg { width: 16px; height: 16px; color: #fff; }
.ptile.has .rm { display: grid; }
.ptile .tag { position: absolute; left: 8px; bottom: 8px; z-index: 2; font-size: 12px; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.55); color: #fff; display: none; }
.ptile.has .tag { display: block; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface2); padding: 4px; border-radius: 14px; margin: 6px 0 4px; }
.seg button { height: 40px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--text2); }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); }
.seg button.on[data-v="using"] { color: var(--green); }
.seg button.on[data-v="sold"] { color: var(--amber); }
.seg button.on[data-v="broken"] { color: var(--red); }

.sticky-save { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 12px 16px calc(12px + var(--sb));
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.btn { height: 52px; border-radius: 16px; font-weight: 700; font-size: 16px; background: var(--surface2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.ghost { background: transparent; color: var(--red); font-weight: 600; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; }
.btn svg { width: 20px; height: 20px; }

/* ---------- Calc / stats ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.tile .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 18px; font-weight: 800; margin-top: 4px; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s { font-size: 12px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); flex: none; }
.kv .v { font-weight: 600; text-align: right; word-break: break-word; }
.bar-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.bar-row:last-child { border-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.bar-top .k { color: var(--muted); font-size: 13px; }
.bar { height: 8px; border-radius: 4px; background: var(--surface2); margin-top: 7px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.rank { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.rank:last-child { border-bottom: 0; }
.rank .n { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }
.rank .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

/* ---------- Detail ---------- */
.d-hero { position: relative; aspect-ratio: 1 / .85; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); font-size: 72px; font-weight: 800; overflow: hidden; }
.d-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, var(--bg), transparent); }
.d-float { position: fixed; top: calc(var(--st) + 10px); z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.45);
  color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.d-float svg { width: 22px; height: 22px; }
.d-float.l { left: 12px; } .d-float.r { right: 12px; }
.d-head { padding: 0 16px; margin-top: -40px; position: relative; z-index: 2; }
.d-head h3 { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.d-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tag-soft { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface2); color: var(--text2); }
.receipt-tile { display: flex; align-items: center; gap: 12px; padding: 12px 0; width: 100%; text-align: left; }
.receipt-tile img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }

/* ---------- Settings ---------- */
.set-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; }
.set-item:last-child { border-bottom: 0; }
.set-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; }
.set-ic svg { width: 18px; height: 18px; }
.set-item .t { flex: 1; font-weight: 550; }
.set-item .t small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.set-item .chev { color: var(--muted); width: 18px; height: 18px; }

/* ---------- Sheet / dialog ---------- */
.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(8,10,20,.45); animation: fade .2s; display: flex; align-items: flex-end; justify-content: center; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 24px 24px 0 0; padding: 8px 16px calc(16px + var(--sb)); box-shadow: var(--shadow-lg);
  animation: sheetin .28s cubic-bezier(.2,.8,.2,1); max-height: 88dvh; overflow-y: auto; }
@keyframes sheetin { from { transform: translateY(100%); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface3); margin: 4px auto 12px; }
.sheet h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; text-align: center; }
.sheet p { margin: 0 0 16px; color: var(--text2); text-align: center; }
.sheet .opts { display: flex; flex-direction: column; margin: 8px 0 12px; }
.sheet .opt { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 550; text-align: left; }
.sheet .opt:last-child { border-bottom: 0; }
.sheet .opt.on { color: var(--accent); }
.sheet .opt svg { width: 20px; height: 20px; }
.sheet .acts { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 8px; }
.sheet .input { width: 100%; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 14px; font-size: 17px; outline: 0; margin-bottom: 12px; }
.sheet .input:focus { border-color: var(--accent); }
.sheet .lbl { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px 2px; display: block; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(600px 400px at 80% -10%, color-mix(in srgb, var(--accent2) 30%, transparent), transparent),
  radial-gradient(500px 400px at -10% 110%, color-mix(in srgb, var(--accent) 25%, transparent), transparent), var(--bg); }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-card img { width: 88px; height: 88px; border-radius: 24px; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.login-card h1 { font-size: 26px; margin: 18px 0 4px; font-weight: 800; letter-spacing: -.5px; }
.login-card p { color: var(--muted); margin: 0 0 24px; }
.login-card .input { width: 100%; height: 54px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 16px; font-size: 17px; outline: 0; }
.login-card .input:focus { border-color: var(--accent); }
.err { color: var(--red); font-size: 14px; min-height: 22px; margin: 8px 0; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px); transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 14px; z-index: 100; font-size: 14px; font-weight: 600; max-width: 90vw; box-shadow: var(--shadow-lg); animation: toastin .25s; }
@keyframes toastin { from { transform: translate(-50%, 10px); opacity: 0; } }
.viewer { position: fixed; inset: 0; background: #000; z-index: 80; display: grid; place-items: center; animation: fade .2s; }
.viewer img { max-width: 100%; max-height: 100%; }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.d-hero.noimg { aspect-ratio: auto; height: calc(var(--st) + 190px); font-size: 64px; }
.card-item.is-broken .ci-name, .strike { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.inbox-banner { display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 6px 16px 12px; padding: 12px 14px; border-radius: var(--r);
  background: #fff1ec; color: #c2410c; text-align: left; box-shadow: var(--shadow); }
:root[data-theme="dark"] .inbox-banner { background: #3a1e12; color: #ff9a6b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .inbox-banner { background: #3a1e12; color: #ff9a6b; } }
.inbox-banner .ib-ic { width: 36px; height: 36px; border-radius: 10px; background: #ee4d2d; color: #fff; display: grid; place-items: center; flex: none; }
.inbox-banner .ib-ic svg { width: 20px; height: 20px; }
.inbox-banner .t { flex: 1; } .inbox-banner small { display: block; opacity: .8; font-size: 13px; }
.inbox-banner .chev { width: 18px; height: 18px; }
.pend { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; margin-bottom: 12px; }
.pend-top { display: flex; gap: 12px; align-items: center; }
.pend-name { font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pend-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 12px; }
.pend-acts .btn { height: 44px; font-size: 15px; }
/* compact header */
.sb-bg { position: fixed; top: 0; left: 0; right: 0; height: var(--st); background: var(--bg); z-index: 11; }
.title-row { display: flex; align-items: center; gap: 8px; padding: calc(var(--st) + 12px) 16px 4px; }
.title-row h1 { font-size: 28px; line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -.6px; }
.title-row .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.sticky-bar { position: sticky; top: var(--st); z-index: 10; display: flex; gap: 10px; align-items: center; padding: 8px 16px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); }
.sticky-bar .searchbar { margin-top: 0; flex: 1; min-width: 0; }
.filter-btn { position: relative; width: 44px; height: 44px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text2); flex: none; }
.filter-btn svg { width: 22px; height: 22px; }
.filter-btn.on { background: var(--text); color: var(--bg); }
.filter-btn .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.active-f { padding: 0 16px; }
.active-f .chips { padding: 0 0 10px; }
.active-f .chip svg { width: 14px; height: 14px; }
.seg4 { grid-template-columns: repeat(4, 1fr); }
.seg4 button { height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; font-size: 13px; }
.seg4 button small { font-size: 11px; color: var(--muted); font-weight: 600; }
.seg button.on[data-v="all"] { color: var(--accent); }
.sheet .mini-chips .mini-chip { font-size: 14px; padding: 7px 12px; }
