/* Conciella — tokens and patterns from DESIGN.md. */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #E9EBEF; --line: #E1E3E7; --ink: #13151F; --muted: #5F636F;
  --accent: #524FDD; --accent-ink: #FFFFFF; --accent-soft: #E5EAFF; --accent-text: #4641C7;
  --brand-navy: #292A71; /* logo tile only (DESIGN.md, Brand); the same in dark mode */
  --ok: #197037; --ok-soft: #DCF7E1; --warn: #845B00; --warn-soft: #FEEEC1; --bad: #BA2B2E; --bad-soft: #FFE7E4;
  --ok-fill: #298646; --on-ok: #FFFFFF; --paper: #FBFBF8; --photo: #26272E; --photo-line: #26272E;
  --dash: #D5D8DE; --skel: #E4E6EB; --off: #D5D8DE;
  --bar: rgba(246, 247, 249, 0.82); --bar-line: rgba(19, 21, 31, 0.07);
  --scrim: rgba(19, 21, 31, 0.45); --shadow: rgba(19, 21, 31, 0.12); --acc-shadow: rgba(82, 79, 221, 0.30);
  --glass: rgba(255, 255, 255, 0.92); --glass-line: rgba(255, 255, 255, 0.6);
  --toast-bg: #13151F; --toast-fg: #FFFFFF; --toast-act: #B5BFFF; --scan-glow: rgba(82, 79, 221, 0.55);
  --back1: #E9EBEF; --back2: #DFE1E6;
  /* shop badge tints: never brand colours, never the accent hue */
  --b-rose: #FBE3EF; --b-rose-i: #8A2456; --b-teal: #CAF1F2; --b-teal-i: #005C62; --b-amber: #F4E6CA; --b-amber-i: #664700;
  --b-orange: #FFE9D6; --b-orange-i: #7A3E00; --b-green: #DDF3E4; --b-green-i: #1F5E36; --b-blue: #E3ECFB; --b-blue-i: #1E3F7A;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C0D11; --surface: #17181D; --surface-2: #212229; --line: #292B31; --ink: #F2F3F6; --muted: #A1A4AE;
    --accent: #8893FA; --accent-ink: #0F0E39; --accent-soft: #252855; --accent-text: #B5BFFF;
    --ok: #7CD591; --ok-soft: #17321E; --warn: #F2CD6F; --warn-soft: #37290A; --bad: #FB9890; --bad-soft: #451E1C;
    --ok-fill: #6FD087; --on-ok: #062911; --paper: #F3F2EE; --photo: #22232A; --photo-line: #2E3037;
    --dash: #2E3037; --skel: #1E1F25; --off: #3A3C44;
    --bar: rgba(23, 24, 29, 0.84); --bar-line: rgba(255, 255, 255, 0.07);
    --scrim: rgba(0, 0, 0, 0.62); --shadow: rgba(0, 0, 0, 0.5); --acc-shadow: rgba(0, 0, 0, 0.4);
    --glass: rgba(23, 24, 29, 0.9); --glass-line: rgba(255, 255, 255, 0.08);
    --toast-bg: #F2F3F6; --toast-fg: #13151F; --toast-act: #4641C7; --scan-glow: rgba(136, 147, 250, 0.6);
    --back1: #1A1B20; --back2: #141519;
    --b-rose: #3A1A2C; --b-rose-i: #F5B3D3; --b-teal: #023538; --b-teal-i: #8CDEE2; --b-amber: #392C0C; --b-amber-i: #E6CA91;
    --b-orange: #3A2410; --b-orange-i: #F7C38F; --b-green: #14321F; --b-green-i: #9EDDB3; --b-blue: #18263F; --b-blue-i: #A9C4F2;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C0D11; --surface: #17181D; --surface-2: #212229; --line: #292B31; --ink: #F2F3F6; --muted: #A1A4AE;
  --accent: #8893FA; --accent-ink: #0F0E39; --accent-soft: #252855; --accent-text: #B5BFFF;
  --ok: #7CD591; --ok-soft: #17321E; --warn: #F2CD6F; --warn-soft: #37290A; --bad: #FB9890; --bad-soft: #451E1C;
  --ok-fill: #6FD087; --on-ok: #062911; --paper: #F3F2EE; --photo: #22232A; --photo-line: #2E3037;
  --dash: #2E3037; --skel: #1E1F25; --off: #3A3C44;
  --bar: rgba(23, 24, 29, 0.84); --bar-line: rgba(255, 255, 255, 0.07);
  --scrim: rgba(0, 0, 0, 0.62); --shadow: rgba(0, 0, 0, 0.5); --acc-shadow: rgba(0, 0, 0, 0.4);
  --glass: rgba(23, 24, 29, 0.9); --glass-line: rgba(255, 255, 255, 0.08);
  --toast-bg: #F2F3F6; --toast-fg: #13151F; --toast-act: #4641C7; --scan-glow: rgba(136, 147, 250, 0.6);
  --back1: #1A1B20; --back2: #141519;
  --b-rose: #3A1A2C; --b-rose-i: #F5B3D3; --b-teal: #023538; --b-teal-i: #8CDEE2; --b-amber: #392C0C; --b-amber-i: #E6CA91;
  --b-orange: #3A2410; --b-orange-i: #F7C38F; --b-green: #14321F; --b-green-i: #9EDDB3; --b-blue: #18263F; --b-blue-i: #A9C4F2;
}

/* Helper card colours (DESIGN.md): same depth, different hue. */
.hc-0 { --card: #292A71; --card-line: #292A71; --card-m: #CACFEC; --card-av: #C3CDFF; --card-av-i: #23255E; --card-ring: #434993; --card-deco: #343880; --card-tile: #34367F; }
.hc-1 { --card: #004E52; --card-line: #004E52; --card-m: #BEDBDC; --card-av: #94E6E0; --card-av-i: #00363A; --card-ring: #20696D; --card-deco: #00595D; --card-tile: #125A5E; }
.hc-2 { --card: #52284F; --card-line: #52284F; --card-m: #E2CCDF; --card-av: #EFC4EA; --card-av-i: #411F3E; --card-ring: #6C4869; --card-deco: #5C355A; --card-tile: #5E375B; }
.hc-3 { --card: #213D74; --card-line: #213D74; --card-m: #C8D5EC; --card-av: #B8D5FF; --card-av-i: #162C55; --card-ring: #425A89; --card-deco: #2E497C; --card-tile: #304B7E; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hc-0 { --card: #232363; --card-line: #303475; --card-m: #C7CCE8; --card-av: #B3BEFF; --card-ring: #3D4285; --card-deco: #2C2E6F; --card-tile: #2E3075; }
  :root:not([data-theme="light"]) .hc-1 { --card: #003F42; --card-line: #044F53; --card-m: #B8D4D5; --card-av: #80DED7; --card-ring: #225C60; --card-deco: #00474A; --card-tile: #0A4E51; }
  :root:not([data-theme="light"]) .hc-2 { --card: #452142; --card-line: #563052; --card-ring: #5D3E5B; --card-deco: #4F2D4C; --card-tile: #533150; }
  :root:not([data-theme="light"]) .hc-3 { --card: #183060; --card-line: #274172; --card-ring: #364B74; --card-deco: #233A68; --card-tile: #263D6B; }
}
:root[data-theme="dark"] .hc-0 { --card: #232363; --card-line: #303475; --card-m: #C7CCE8; --card-av: #B3BEFF; --card-ring: #3D4285; --card-deco: #2C2E6F; --card-tile: #2E3075; }
:root[data-theme="dark"] .hc-1 { --card: #003F42; --card-line: #044F53; --card-m: #B8D4D5; --card-av: #80DED7; --card-ring: #225C60; --card-deco: #00474A; --card-tile: #0A4E51; }
:root[data-theme="dark"] .hc-2 { --card: #452142; --card-line: #563052; --card-ring: #5D3E5B; --card-deco: #4F2D4C; --card-tile: #533150; }
:root[data-theme="dark"] .hc-3 { --card: #183060; --card-line: #274172; --card-ring: #364B74; --card-deco: #233A68; --card-tile: #263D6B; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent-text); }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.num, .amt, .money { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nobar { scrollbar-width: none; }
.nobar::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }
body.locked { overflow: hidden; }
/* v2.0.2.2 iPhones and iPads (index.html sets the class): <body> scrolls, the window stays put, so fixed bars stay at
   the bottom even when iOS 26 gets the viewport wrong after the keyboard closes. Other phones and computers: as before. */
html.ios-scroll { height: 100%; overflow: hidden; }
html.ios-scroll body { height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: none; }
html.ios-scroll body.locked { overflow: hidden; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen { padding: calc(18px + var(--safe-t)) 16px calc(112px + var(--safe-b)); display: flex; flex-direction: column; gap: 22px; font-variant-numeric: tabular-nums; }
.screen.tight { gap: 16px; }
.screen.bare { padding-bottom: calc(40px + var(--safe-b)); }
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
.page-title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.sec-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.group-title { margin: 6px 4px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.link { font-size: 14px; font-weight: 600; color: var(--accent-text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; background: none; border: 0; }
.muted { color: var(--muted); }
.meta { font-size: 13px; color: var(--muted); }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- buttons ---------- */
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; padding: 0; color: var(--ink); text-decoration: none; }
.btn {
  min-height: 52px; border: 0; border-radius: 18px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; font-weight: 600; background: var(--surface-2); color: var(--ink); text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 17px; min-height: 56px; }
.btn.primary:disabled { background: var(--surface-2); color: var(--muted); }
.btn.soft { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.ok { background: var(--ok-fill); color: var(--on-ok); font-weight: 700; }
.btn.small { min-height: 44px; border-radius: 14px; font-size: 15px; padding: 0 14px; }
.btn.pill { border-radius: 999px; min-height: 44px; font-size: 14px; font-weight: 700; padding: 0 16px; }
.btn.wide { width: 100%; }
.btn.ghost { background: var(--surface); }
.btn:disabled { opacity: 0.6; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- surfaces & lists ---------- */
.card { background: var(--surface); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.list { background: var(--surface); border-radius: 20px; padding: 2px 14px; }
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; width: 100%; background: none; border: 0; text-align: left; color: var(--ink); text-decoration: none; min-height: 64px; }
.item .t { font-size: 15px; font-weight: 600; }
.item .m { font-size: 13px; color: var(--muted); }
.item .right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.item .amt { font-size: 15px; font-weight: 700; white-space: nowrap; }
.item .amt.in { color: var(--accent-text); }
.loose .item { padding: 10px 0; }
.loose .item .t { font-size: 16px; }
.loose .item .amt { font-size: 16px; font-weight: 600; }
.settings-list { background: var(--surface); border-radius: 20px; display: flex; flex-direction: column; }
.srow { border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 52px; width: 100%; text-align: left; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.srow + .srow, .srow + .sblock, .sblock + .srow, .sblock + .sblock { border-top: 1px solid var(--line); }
.srow .v { color: var(--muted); font-weight: 400; }
.srow.danger { color: var(--bad); justify-content: center; font-weight: 600; font-size: 16px; }
.sblock { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.chev { flex: none; color: var(--muted); }

/* ---------- badges, pills, avatars ---------- */
.badge { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: 0.01em; }
.badge.lg { width: 44px; height: 44px; font-size: 13px; }
.badge.sm { width: 30px; height: 30px; font-size: 11px; }
.tone-rose { background: var(--b-rose); color: var(--b-rose-i); } .tone-teal { background: var(--b-teal); color: var(--b-teal-i); }
.tone-amber { background: var(--b-amber); color: var(--b-amber-i); } .tone-orange { background: var(--b-orange); color: var(--b-orange-i); }
.tone-green { background: var(--b-green); color: var(--b-green-i); } .tone-blue { background: var(--b-blue); color: var(--b-blue-i); }
.tone-acc { background: var(--accent-soft); color: var(--accent-text); } .tone-grey { background: var(--surface-2); color: var(--ink); }
.pill { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pill.new { background: var(--surface-2); color: var(--muted); }
.pill.check, .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.flag, .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.acc { background: var(--accent-soft); color: var(--accent-text); }
.pill.lg { font-size: 12px; padding: 4px 10px; }
.soon { font-size: 11px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; margin-left: 4px; display: inline-block; vertical-align: 1px; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--card-av); color: var(--card-av-i); position: relative; }
.avatar.photo > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.xxl { width: 96px; height: 96px; font-size: 36px; }
.badge.cat svg { display: block; }
.avatar.md { width: 38px; height: 38px; font-size: 15px; }
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }
.avatar.xl { width: 46px; height: 46px; font-size: 17px; }
.avatar.owner { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.avatar .job { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }

/* ---------- chips & segmented ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); padding: 0 14px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.warn[aria-pressed="true"] { background: var(--warn); color: var(--bg); }
.chip.outline { background: var(--surface); border: 1px solid var(--line); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
.chip-sep { flex: none; width: 1px; background: var(--line); margin: 6px 2px; }
/* Задачи: Филтър on its own row under the chips; with a filter on it reads what is on, with ✕ to clear it */
#k-frow { display: flex; }
#k-frow[hidden] { display: none; }
.fpill { display: inline-flex; align-items: stretch; max-width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); overflow: hidden; }
.fpill button { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 700; padding: 0 14px; }
.fpill .ellip { min-width: 0; }
.fpill.on { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-text); }
.fpill.on #k-filter { padding-right: 6px; }
.fpill #k-fclear { flex: none; padding: 0 12px 0 8px; min-width: 40px; justify-content: center; }
@media (max-width: 350px) { #k-screen > .row .btn.pill { padding: 0 12px; } }
/* Срокове filter rows: a little more compact; a chosen outline chip reads as chosen */
.chips.dfl .chip { min-height: 40px; padding: 0 13px; }
.chip.warn[aria-checked="true"] { background: var(--warn); color: var(--bg); }
#d-kinds .chip[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; }
.seg button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; font-size: 14px; font-weight: 500; color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--surface); box-shadow: 0 1px 3px var(--shadow); font-weight: 700; }

/* ---------- switch ---------- */
.switch { width: 56px; height: 44px; flex: none; border: 0; background: none; position: relative; padding: 0; }
.switch::before { content: ''; position: absolute; left: 2px; top: 6px; width: 52px; height: 32px; border-radius: 999px; background: var(--off); transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 9px; left: 5px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: left .15s; }
.switch[aria-checked="true"]::before { background: var(--accent); }
.switch[aria-checked="true"]::after { left: 25px; }
.switch[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  min-height: 52px; width: 100%; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 0 14px;
  font-size: 16px; color: var(--ink); outline: none;
}
.input:focus { border-color: var(--accent); }
.input.invalid, .inbox.invalid { border: 2px solid var(--bad); }
.inbox { display: flex; align-items: center; gap: 10px; min-height: 52px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 0 12px; }
.inbox:focus-within { border-color: var(--accent); }
.inbox input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 600; color: var(--ink); padding: 12px 0; }
.inbox input[type="date"] { -webkit-appearance: none; appearance: none; min-height: 48px; text-align: left; }
.inbox input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.inbox.big { min-height: 64px; border-radius: 16px; padding: 8px 16px; align-items: baseline; }
.inbox.big input { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; padding: 0; }
.inbox.big .cur { font-size: 22px; font-weight: 600; color: var(--muted); }
.inbox svg { flex: none; color: var(--muted); }
.inbox.invalid svg { color: var(--bad); }
.search { display: flex; align-items: center; gap: 10px; min-height: 46px; border-radius: 14px; background: var(--surface-2); padding: 0 14px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); padding: 10px 0; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.banner { display: flex; align-items: flex-start; gap: 10px; border-radius: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.banner svg { flex: none; margin-top: 1px; }
.banner.acc { background: var(--accent-soft); color: var(--ink); }
.banner.acc svg { color: var(--accent-text); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.banner b { font-weight: 700; }
.banner .stack { display: flex; flex-direction: column; gap: 2px; }
.banner .stack b { font-size: 15px; }
.skel { border-radius: 14px; background: var(--skel); }

/* ---------- tab bar & bottom bars ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(66px + var(--safe-b)); padding: 6px 4px calc(var(--safe-b) + 4px);
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--bar-line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 560px; margin: 0 auto;
}
@media (min-width: 561px) { .tabbar { left: 50%; transform: translateX(-50%); width: 560px; } }
.tab { text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; min-width: 0; }
.tab span.ic { width: 56px; max-width: 100%; height: 30px; border-radius: 999px; display: grid; place-items: center; }
.tab[aria-current="page"] { color: var(--accent-text); font-weight: 700; }
.tab[aria-current="page"] span.ic { background: var(--accent-soft); }
.tab .lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(14px + var(--safe-b));
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--bar-line);
  display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 0 auto;
}
@media (min-width: 561px) { .bottombar { left: 50%; transform: translateX(-50%); width: 560px; } }

/* ---------- owner home ---------- */
.topline { display: flex; align-items: center; gap: 10px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 6px; }
.hero .lbl { font-size: 14px; font-weight: 500; color: var(--muted); }
.big-money { display: flex; align-items: baseline; justify-content: center; gap: 4px; font-variant-numeric: tabular-nums; }
.big-money .w { font-size: 64px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.big-money .f { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; color: var(--muted); }
.big-money.neg .w { color: var(--bad); }
.hero .bar { width: 230px; max-width: 80%; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.hero .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.actions.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; } /* v1.4.4.1: + Срокове */
.action { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; text-align: center; }
.action .circ { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; position: relative; background: var(--surface-2); color: var(--ink); }
.action .circ.acc { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px var(--acc-shadow); }
.action .circ.soft { background: var(--accent-soft); color: var(--accent-text); }
.action .count { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }

.cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.wcard {
  flex: 0 0 min(300px, 82vw); scroll-snap-align: start; scroll-margin-left: 16px; height: 188px; border: 1px solid var(--card-line); border-radius: 28px; background: var(--card);
  color: #FFFFFF; padding: 18px; text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; text-align: left;
}
.wcard .deco { position: absolute; right: -50px; top: -60px; color: var(--card-deco); pointer-events: none; }
.wcard > span { position: relative; }
.wcard .who { display: flex; align-items: center; gap: 10px; }
.wcard .who b { font-size: 15px; font-weight: 700; display: block; }
.wcard .who small { font-size: 12px; color: var(--card-m); display: block; }
.wcard .bal small { font-size: 12px; color: var(--card-m); display: block; }
.wcard .bal b { font-size: 34px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; display: block; white-space: nowrap; }
.wcard .foot { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.wcard .foot .pct { color: var(--card-m); }
.wcard .foot .cnt { margin-left: auto; font-weight: 700; color: var(--card-m); white-space: nowrap; }
.wcard .foot .cnt.amber { color: #F2CD6F; }
.wcard .foot .cnt.green { color: #94E7B1; }
.wcard .flag { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.16); color: #FFFFFF; border-radius: 999px; padding: 3px 9px; }
.wcard.add { background: none; border: 2px dashed var(--dash); color: var(--muted); align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600; }
.wcard.add .circ { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots span { height: 6px; width: 6px; border-radius: 999px; background: var(--dash); transition: width .2s; }
.dots span.on { width: 18px; background: var(--ink); }

/* ---------- records ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles .carry { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.tiles .carry b { color: var(--ink); font-weight: 650; white-space: nowrap; text-align: right; }
.tile { background: var(--surface); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.tile .lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tile .lbl i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.tile .lbl i.acc { background: var(--accent-soft); color: var(--accent-text); }
.tile b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.day { display: flex; flex-direction: column; gap: 8px; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 4px 0; }
.day-head h2 { font-size: 15px; font-weight: 700; }
.empty { padding: 40px 12px; text-align: center; display: flex; flex-direction: column; gap: 6px; color: var(--muted); align-items: center; }
.empty b { font-size: 17px; font-weight: 700; color: var(--ink); }

/* ---------- sheets (dialog) ---------- */
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: calc(100vh - 40px - var(--safe-t)); max-height: calc(100dvh - 40px - var(--safe-t)); padding: 0; border: 0;
  border-radius: 28px 28px 0 0; background: var(--bg); color: var(--ink); box-shadow: 0 -10px 40px var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet:focus { outline: none; }
dialog.sheet::backdrop { background: var(--scrim); }
dialog.sheet.full { max-height: 100vh; max-height: 100dvh; height: 100vh; height: 100dvh; border-radius: 0; }
dialog.sheet .grab { align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--dash); margin-top: 8px; flex: none; }
dialog.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 0; flex: none; }
dialog.sheet .sheet-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
dialog.sheet .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
dialog.sheet .sheet-body > * { flex-shrink: 0; }
dialog.sheet .sheet-foot { flex: none; padding: 12px 16px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
dialog.sheet .sheet-body:last-child { padding-bottom: calc(24px + var(--safe-b)); }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-up .22s cubic-bezier(0.2, 0.8, 0.2, 1); }
  dialog.sheet[open]::backdrop { animation: fade .22s ease; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* give money */
.people-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.person-opt { min-height: 64px; border: 2px solid transparent; border-radius: 18px; background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-align: left; color: var(--ink); }
.person-opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.person-opt b { font-size: 16px; font-weight: 700; display: block; }
.person-opt small { font-size: 12px; color: var(--muted); display: block; }
.amount-show { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0; }
.amount-show .val { display: flex; align-items: baseline; gap: 6px; }
.amount-show .val.pre > span { order: -1; } /* £ before the number (v2.0.2) */
.amount-show label.val.pre input { text-align: left; }
.amount-show .val b { font-size: 56px; font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.amount-show .val span { font-size: 30px; font-weight: 600; color: var(--muted); }
.amount-show label.val { border-bottom: 2px solid var(--accent); padding: 0 8px 4px; }
.amount-show label.val input { width: 190px; max-width: 60vw; border: 0; outline: none; background: transparent; text-align: right; font-size: 52px; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); padding: 0; }
.amount-show label.val input::placeholder { color: var(--muted); opacity: 0.55; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.quick button { min-width: 68px; min-height: 44px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 15px; font-weight: 700; padding: 0 14px; }
.quick button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.form-group { background: var(--surface); border-radius: 18px; display: flex; flex-direction: column; }
.form-group > label { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.form-group > label + label { border-top: 1px solid var(--line); }
.form-group > label > svg { flex: none; color: var(--muted); }
.form-group input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--ink); padding: 12px 0; }
.form-group input[type="date"] { -webkit-appearance: none; appearance: none; font-weight: 600; text-align: right; min-height: 44px; }
.form-group input[type="date"]::-webkit-date-and-time-value { text-align: right; }
.form-group .k { flex: 1; font-size: 15px; color: var(--muted); }
.recent { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.recent::-webkit-scrollbar { display: none; }
.recent button { flex: none; min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 6px 12px; color: var(--ink); }
.recent b { font-size: 14px; font-weight: 700; }
.recent small { font-size: 12px; color: var(--muted); }
.success { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 12px; text-align: center; }
.success .tick { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.success h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.success p { font-size: 15px; color: var(--muted); }
.success .btns { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 14px; }

/* ---------- review ---------- */
.review { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(14px + var(--safe-t)) 16px calc(16px + var(--safe-b)); gap: 0; }
.review-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.review-head .mid { flex: 1; display: flex; flex-direction: column; align-items: center; }
.review-head .mid b { font-size: 17px; font-weight: 700; }
.segs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding-bottom: 14px; }
.segs span { height: 4px; border-radius: 999px; background: var(--back2); }
.segs span.done { background: var(--ink); }
.segs span.on { background: var(--accent); }
.rv-stack { position: relative; flex: 0 0 auto; height: min(560px, calc(100vh - 290px)); height: min(560px, calc(100dvh - 290px)); min-height: 280px; }
.rv-stack .back { position: absolute; top: 0; border-radius: 30px; }
.rv-stack .back.b2 { left: 20px; right: 20px; bottom: -20px; background: var(--back2); }
.rv-stack .back.b1 { left: 10px; right: 10px; bottom: -10px; background: var(--back1); }
.rcard {
  position: absolute; inset: 0; border-radius: 30px; background: var(--photo); border: 1px solid var(--photo-line); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  box-shadow: 0 18px 40px var(--shadow); color: #FFFFFF; will-change: transform;
}
.rcard .rtop { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 16px 18px; z-index: 2; background: linear-gradient(var(--photo) 55%, transparent); }
.rcard .rtop small { font-size: 12px; color: #C4C6CF; display: block; }
.rcard .rtop b { font-size: 15px; font-weight: 700; display: block; }
.rcard .typed { display: flex; flex-direction: column; align-items: flex-end; }
.rcard .typed b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.rcard > .photo { position: absolute; left: 0; right: 0; top: 66px; bottom: 0; display: flex; align-items: flex-start; justify-content: center; padding: 10px 16px 120px; }
.rcard > .photo img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45); pointer-events: none; background: var(--paper); }
.rcard > .photo .gone { margin-top: 40px; color: #C4C6CF; font-size: 14px; text-align: center; padding: 0 24px; }
.rcard .expand { position: absolute; top: 78px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.16); color: #FFFFFF; display: grid; place-items: center; z-index: 3; }
.stamp { position: absolute; top: 84px; border-radius: 10px; padding: 4px 10px; font-size: 20px; font-weight: 800; letter-spacing: 0.04em; opacity: 0; z-index: 3; pointer-events: none; }
.stamp.okst { left: 18px; transform: rotate(-14deg); border: 3px solid #7CD591; color: #7CD591; background: rgba(10, 30, 18, 0.6); }
.stamp.flagst { right: 18px; transform: rotate(14deg); border: 3px solid #FB9890; color: #FB9890; background: rgba(40, 10, 8, 0.6); }
.aipanel { position: absolute; left: 10px; right: 10px; bottom: 10px; border-radius: 22px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--glass-line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); z-index: 2; max-height: 45%; overflow-y: auto; }
.aipanel .k { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.aipanel .k svg { color: var(--accent-text); }
.aipanel .v { font-size: 15px; font-weight: 700; }
.aipanel .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.review-btns { display: flex; align-items: flex-start; justify-content: center; gap: 28px; padding-top: 30px; }
.rbtn { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 0; min-width: 72px; }
.rbtn .c { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.rbtn.flag { color: var(--bad); } .rbtn.flag .c { background: var(--bad-soft); }
.rbtn.ok { color: var(--ok); } .rbtn.ok .c { background: var(--ok-fill); color: var(--on-ok); }
.rbtn.again { color: var(--muted); font-weight: 600; padding-top: 8px; } .rbtn.again .c { width: 48px; height: 48px; background: var(--surface-2); color: var(--ink); }
.rbtn:disabled { opacity: 0.5; }
.swipe-hint { text-align: center; font-size: 13px; color: var(--muted); padding-top: 10px; }

/* ---------- toast ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(96px + var(--safe-b)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
#toasts.high { bottom: calc(24px + var(--safe-b)); }
.toast { pointer-events: auto; width: 100%; max-width: 528px; min-height: 52px; border-radius: 16px; background: var(--toast-bg); color: var(--toast-fg); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; box-shadow: 0 10px 30px var(--shadow); font-size: 14px; font-weight: 600; }
.toast span { flex: 1; padding: 12px 0; }
.toast button { min-height: 44px; border: 0; background: none; color: var(--toast-act); font-size: 15px; font-weight: 700; padding: 0 12px; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: sheet-up .2s ease; } }
/* width: auto, not the toast's 100%: with left and right set, 100% pushed it 32px past the screen and cut off Обнови */
#update-bar { position: fixed; left: 16px; right: 16px; top: calc(10px + var(--safe-t)); z-index: 75; margin: 0 auto; width: auto; }
dialog.sheet.nomodal { z-index: 55; }
.scrim { position: fixed; inset: 0; z-index: 54; background: var(--scrim); }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 70; padding: calc(6px + var(--safe-t)) 16px 6px; background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 13px; font-weight: 700; }

/* ---------- helper home ---------- */
.hello { display: flex; align-items: center; gap: 12px; }
.hello b { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; display: block; }
.mycard { position: relative; overflow: hidden; border-radius: 30px; background: var(--card); border: 1px solid var(--card-line); color: #FFFFFF; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.mycard .deco { position: absolute; right: -70px; top: -80px; color: var(--card-deco); pointer-events: none; }
.mycard > div { position: relative; }
.mycard .lbl { font-size: 15px; font-weight: 500; color: var(--card-m); }
.mycard .big-money { justify-content: flex-start; }
.mycard .big-money .w { font-size: 56px; }
.mycard .big-money .f { font-size: 30px; color: var(--card-m); }
.mycard .tiles .tile { background: var(--card-tile); border-radius: 16px; padding: 10px 12px; gap: 2px; }
.mycard .tile small { font-size: 12px; color: var(--card-m); }
.mycard .tile b { font-size: 16px; font-weight: 700; letter-spacing: 0; white-space: normal; }
.big-action { min-height: 64px; border-radius: 20px; font-size: 19px; box-shadow: 0 8px 20px var(--acc-shadow); }
.bottombar.duo { flex-direction: row; align-items: stretch; gap: 10px; }
.bottombar.duo .big-action { flex: 1; min-width: 0; }
.count-action { flex: none; width: 96px; min-height: 64px; border-radius: 20px; flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 13px; font-weight: 700; line-height: 1.1; }

/* ---------- new expense ---------- */
.xhead { display: flex; align-items: center; gap: 8px; }
.xhead h1 { flex: 1; text-align: center; font-size: 17px; font-weight: 700; }
.xhead .sp { width: 44px; flex: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.steps li .d { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.steps li.done { color: var(--ok); }
.steps li.done .d { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.steps li.on { color: var(--ink); }
.steps li.on .d { border-color: var(--accent); }
.steps li.bad { color: var(--bad); }
.steps li.bad .d { border-color: var(--bad); }
.pbar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; position: relative; }
.pbar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: var(--accent); transition: width .2s; }
.pbar.busy i { width: 35% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { left: -35%; } to { left: 100%; } }
.shot { position: relative; min-height: 128px; border-radius: 20px; background: var(--photo); overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 0 14px; color: #FFFFFF; }
.shot .pic { width: 92px; height: 118px; margin-top: 22px; transform: rotate(-3deg); background: var(--paper); border-radius: 3px; flex: none; position: relative; overflow: hidden; }
.shot .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .scan { position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); box-shadow: 0 0 12px 3px var(--scan-glow); top: 0; }
@media (prefers-reduced-motion: no-preference) { .shot .scan { animation: scan 1.6s ease-in-out infinite alternate; } }
@keyframes scan { from { top: 0; } to { top: calc(100% - 3px); } }
.shot .info { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shot .info b { font-size: 14px; font-weight: 600; }
.shot .info small { font-size: 12px; color: #C4C6CF; }
.shot .retake { align-self: flex-start; min-height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #FFFFFF; font-size: 14px; font-weight: 600; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; }
.shot .retake[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.camera { min-height: 220px; border-radius: 24px; border: 2px dashed var(--dash); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink); font-size: 17px; font-weight: 700; text-align: center; padding: 20px; }
.camera .circ { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 8px 20px var(--acc-shadow); }
.camera small { font-size: 13px; font-weight: 500; color: var(--muted); }
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cats button { min-height: 64px; border: 2px solid transparent; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); padding: 6px 4px; }
.cats button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.cats button:disabled { opacity: 0.45; }
.fields { display: flex; flex-direction: column; gap: 14px; border: 0; margin: 0; padding: 0; min-width: 0; }
.amt-hint { font-size: 13px; font-weight: 600; color: var(--warn); }

/* ---------- people ---------- */
.acc-item { background: var(--surface); border-radius: 22px; overflow: hidden; }
.acc-item.off { opacity: 0.75; }
.acc-head { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; color: var(--ink); }
.acc-head b { font-size: 17px; font-weight: 700; display: block; }
.acc-head .chev { transition: transform .2s; }
.acc-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acc-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 16px; }
.perm { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.perm + .perm { border-top: 1px solid var(--line); }
.perm .ic { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.perm b { font-size: 15px; font-weight: 600; }
.perm small { font-size: 13px; color: var(--muted); display: block; }
.add-row { border: 2px dashed var(--dash); border-radius: 22px; background: none; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; color: var(--ink); width: 100%; }
.add-row b { font-size: 16px; font-weight: 700; display: block; }
.add-row small { font-size: 13px; color: var(--muted); display: block; }
.add-row .circ { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.btn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- receipt detail & viewer ---------- */
.thumb { position: relative; display: block; width: 100%; height: 200px; border: 0; padding: 0; border-radius: 20px; overflow: hidden; background: var(--photo); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.thumb .cta { position: absolute; left: 12px; bottom: 12px; background: rgba(0, 0, 0, 0.62); color: #FFFFFF; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 6px; }
.photo-gone { border-radius: 20px; background: var(--surface-2); color: var(--muted); padding: 18px; font-size: 14px; text-align: center; }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15px; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv dt, .kv .k { color: var(--muted); }
.kv dd, .kv .v { margin: 0; font-weight: 600; text-align: right; }
.flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.flags li { border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 600; background: var(--warn-soft); color: var(--warn); }
.flags li.bad { background: var(--bad-soft); color: var(--bad); }
.tech { font-size: 12px; color: var(--muted); word-break: break-word; }
.viewer { position: fixed; inset: 0; z-index: 80; background: #0B0B0E; display: flex; flex-direction: column; }
dialog.viewer { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: #FFFFFF; }
dialog.viewer:not([open]) { display: none; }
dialog.viewer::backdrop { background: #0B0B0E; }
.viewer .vbar { display: flex; gap: 8px; justify-content: flex-end; padding: calc(10px + var(--safe-t)) 12px 10px; }
.viewer .vbtn { min-height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #FFFFFF; font-size: 14px; font-weight: 700; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; }
.viewer .vscroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; justify-content: center; align-items: flex-start; padding: 0 0 calc(20px + var(--safe-b)); }
.viewer img { width: 100%; height: auto; max-width: 900px; background: #FFFFFF; }
.viewer.fit .vscroll { align-items: center; }
.viewer.fit img { width: auto; max-width: 100%; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); }

/* ---------- tasks (v1.3) ---------- */
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.struck { text-decoration: line-through; color: var(--muted); }
.task-row .t { font-weight: 600; }
.task-row .m { display: block; }
.task-big { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
textarea.input.task-text { min-height: 96px; padding: 12px 14px; line-height: 1.4; resize: vertical; }
.input[type="date"], .input[type="time"] { -webkit-appearance: none; appearance: none; text-align: left; }
.tcard { background: var(--surface); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; border: 2px solid transparent; }
.tcard .tt { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.tcard.late { border-color: var(--bad-soft); }
.tcard.focus { border-color: var(--accent); }
.tcard .btn { min-height: 52px; }
.done-tasks summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.done-tasks summary::-webkit-details-marker { display: none; }
.done-tasks summary::after { content: '▾'; font-size: 12px; }
.done-tasks[open] summary::after { content: '▴'; }
.push-ask { gap: 14px; }
.push-ask b { font-size: 16px; }
.push-ask .bell { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.bell-on { display: inline-grid; place-items: center; vertical-align: 1px; color: var(--accent-text); }

/* v1.3.1 tasks */
.action .count.bad { background: var(--bad); color: #FFFFFF; }
.avs { display: inline-flex; flex: none; align-items: center; padding-left: 8px; }
.avs .av { position: relative; margin-left: -10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.avs .av .avatar { width: 30px; height: 30px; font-size: 12px; }
.avs .av.done .avatar { opacity: .55; }
.avs .av i { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok-fill); color: var(--on-ok); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.avs .av.more { width: 30px; height: 30px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.task-row .m svg { vertical-align: -1px; }
.mini { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ok); display: grid; place-items: center; padding: 0; }
.person .pill { flex: none; }
.chips.recent { margin: 0; padding: 0; }
.chips.recent .chip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.days .chip { padding: 0; min-height: 44px; border-radius: 12px; }
.days[hidden] { display: none; }
.tbtns { display: flex; gap: 10px; align-items: stretch; }
.tbtns .grow { flex: 1; min-width: 0; }
.reply-btn { flex: none; min-width: 72px; flex-direction: column; gap: 2px; padding: 6px 10px; font-size: 12px; font-weight: 700; line-height: 1.1; }
.my-reply { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 4px 10px; }
#nt-hour[hidden], #nt-hour-f[hidden], #nt-when-f[hidden], #nt-date-f[hidden] { display: none; }

/* v1.3.2 helper tabs */
.phead { display: flex; align-items: center; gap: 12px; }
.phead .page-title { margin: 0; }
.phead .meta { display: block; margin-top: 2px; }
.me-btn { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; flex: none; }
.me-btn .dots { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.tabbar.helper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tabbar.helper .tab { font-size: 12px; }
.tab span.ic { position: relative; }
.tcount { position: absolute; top: -4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bar, var(--bg)); }
.tcount.bad { background: var(--bad); color: #FFFFFF; }
.helper-page.with-tabs { padding-bottom: calc(96px + var(--safe-b)); }
.helper-page.with-actions { padding-bottom: calc(120px + var(--safe-b)); }
.helper-page.with-tabs.with-actions { padding-bottom: calc(186px + var(--safe-b)); }
.bottombar.above-tabs { bottom: calc(66px + var(--safe-b)); padding-bottom: 12px; border-top: 1px solid var(--bar-line); }
#toasts.above-actions:not(.high) { bottom: calc(176px + var(--safe-b)); }
.tasks-sec { display: flex; flex-direction: column; gap: 10px; }
.tcard { position: relative; overflow: hidden; gap: 8px; padding: 14px 14px 14px 18px; border: 0; }
.tcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: transparent; }
.tcard.new::before { background: var(--accent); }
.tcard.late::before { background: var(--bad); }
.tcard.replied::before { background: var(--warn); }
.tcard.late { border-color: transparent; }
.tcard .tbody { border: 0; background: none; padding: 0; margin: 0; text-align: left; color: inherit; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tcard .tt { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcard.long .tt { -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.tcard.long .tbody::after { content: attr(data-more); order: 1; font-size: 14px; font-weight: 700; color: var(--accent-text); margin-top: -2px; }
.tcard .tbody .row { order: 2; }
.tcard .btn { min-height: 48px; }
.tcard .reply-btn { min-height: 48px; }
.task-big { max-height: 50vh; overflow-y: auto; }
.tick-soft { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin-bottom: 6px; }

/* v1.3.3 helper Начало */
.hsec { gap: 10px; padding: 14px; }
.hsec-head { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 40px; }
.hsec-head b { font-size: 17px; font-weight: 700; }
.hic { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.hlist { display: flex; flex-direction: column; }
.hrow { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 0 8px 12px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; }
.hrow::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--line); }
.hrow.new::before { background: var(--accent); }
.hrow.late::before { background: var(--bad); }
.hrow .t { display: block; font-size: 15px; font-weight: 600; }
.hrow .m { display: block; font-size: 13px; color: var(--muted); }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minicard { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; border-radius: 26px; background: var(--card); border: 1px solid var(--card-line); color: #FFFFFF; padding: 18px 20px; text-decoration: none; }
.minicard .deco { position: absolute; right: -50px; top: -60px; color: var(--card-deco); pointer-events: none; }
.minicard > span { position: relative; }
.minicard .lbl { font-size: 14px; font-weight: 500; color: var(--card-m); }
.minicard .mbal .w { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.minicard .mbal .f { font-size: 22px; font-weight: 600; color: var(--card-m); }
.minicard .msub { font-size: 13px; color: var(--card-m); }
.minicard .mgo { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; margin-top: 6px; }
.hactions { display: flex; gap: 10px; align-items: stretch; }
.hactions .big-action { flex: 1; min-width: 0; min-height: 60px; }

/* v1.3.4 */
.bottombar[hidden] { display: none; }
.task-row.pick { position: relative; padding-left: 40px; }
.task-row.pick::before { content: ''; position: absolute; left: 4px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.task-row.pick[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
.selecting { padding-bottom: calc(186px + var(--safe-b)); }
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 4px; }
.photo-pick .avatar.owner, .photo-pick .avatar { width: 96px; height: 96px; font-size: 36px; }
.me-btn .avatar.owner { pointer-events: none; }

/* ---------- login ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b)); max-width: 440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-navy); color: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 8px 20px rgba(41, 42, 113, 0.28); }
.brand b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; display: block; }
.brand .wordmark img { height: 24px; width: auto; display: block; margin: 2px 0 6px -1px; }
.brand .wordmark .wm-d { display: none; }
:root[data-theme="dark"] .brand .wordmark .wm-l { display: none; }
:root[data-theme="dark"] .brand .wordmark .wm-d { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .wordmark .wm-l { display: none; }
  :root:not([data-theme="light"]) .brand .wordmark .wm-d { display: block; }
}
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth .lang-row { position: absolute; top: calc(14px + var(--safe-t)); right: 16px; }
/* a long form (sign-up, v2.0.1) starts at the top: keep the logo clear of the language button */
.auth .lang-row + .brand { margin-top: 40px; }

/* install sheet */
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.steps-list li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 14px; font-size: 15px; }
.steps-list li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.steps-list svg { flex: none; color: var(--accent-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (max-height: 700px) {
  .review-btns { padding-top: 24px; }
  .rbtn .c { width: 56px; height: 56px; }
  .rbtn.again .c { width: 44px; height: 44px; }
  .swipe-hint { display: none; }
}
@media (max-width: 360px) {
  .big-money .w { font-size: 52px; }
  .big-money .f { font-size: 28px; }
  .page-title { font-size: 26px; }
  .review-btns { gap: 16px; }
}

/* v1.3.5 — money requests, owed balances */
.wcard .flag.ask { background: #FFFFFF; color: var(--accent-text); }
.owed-hint { display: block; margin-top: 6px; font-size: 13px; opacity: 0.85; }
.ask-open { background: none; border: 0; padding: 0; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.ask-open .t { font-weight: 600; font-size: 16px; }
.ask-open .m, .ask-row .m { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-row { gap: 10px; flex-wrap: wrap; }
.ask-row .m { white-space: normal; }
.ask-btns { flex-basis: 100%; display: flex; gap: 8px; justify-content: flex-end; }
.ask-row .t { display: block; font-weight: 600; }
.ask-row .btn.pill { flex: none; }
.people-pick small.acc { color: var(--accent-text); font-weight: 600; }

/* v1.4.0 — Списъци */
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chips.wrap .chip[aria-checked="true"], .chips.wrap .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.avatar.xs { width: 26px; height: 26px; font-size: 11px; box-shadow: 0 0 0 2px var(--surface); }
.faces { display: inline-flex; flex: none; }
.faces .avatar + .avatar { margin-left: -8px; }
.ltile { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 26px; line-height: 1; }
.ltile.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.ltile.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 34px; }
.lcards { display: flex; flex-direction: column; gap: 10px; }
.lcard { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; min-height: 76px; background: var(--surface); border-radius: 20px; color: var(--ink); text-decoration: none; }
.lcard b { display: block; font-size: 17px; font-weight: 700; }
.lcard .m { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.lcount { flex: none; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.lcard .chev, .send-row .chev { color: var(--muted); flex: none; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.emoji-grid button { height: 44px; border: 0; border-radius: 12px; background: var(--surface-2); font-size: 22px; padding: 0; }
.emoji-grid button[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.tone-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.tone-pick button { width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; }
.tone-pick button[aria-checked="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.pthumb { width: 48px; height: 48px; flex: none; border-radius: 12px; overflow: hidden; background: #FFFFFF; display: grid; place-items: center; border: 1px solid var(--line); padding: 0; }
.pthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pthumb.emoji { background: var(--surface-2); border: 0; font-size: 24px; }
.pthumb.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.list-screen { gap: 14px; }
.list-screen.with-tabs { padding-bottom: calc(96px + var(--safe-b)); }
.lhead { display: flex; align-items: center; gap: 10px; }
.lhead h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; min-width: 0; }
.send-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border: 0; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); font-size: 15px; font-weight: 600; text-align: left; width: 100%; }
.send-row .ic { display: grid; place-items: center; }
.addbar { display: flex; gap: 8px; align-items: center; position: sticky; top: calc(8px + var(--safe-t)); z-index: 5; }
.addbar .inbox { background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); }
.fav-btn { width: 52px; height: 52px; font-size: 22px; background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); }
.suggest { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; padding: 4px 6px; margin-top: -6px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1); }
.suggest .srow { gap: 10px; }
.suggest small { color: var(--muted); font-size: 12px; font-weight: 500; }
.qty { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; vertical-align: 1px; }
.igroups { display: flex; flex-direction: column; gap: 16px; }
.igroup { display: flex; flex-direction: column; gap: 6px; }
.ghead { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 4px; text-transform: none; }
.ghead .n { font-weight: 600; color: var(--muted); opacity: 0.8; }
.igroup .sec-head { align-items: center; }
.irow { display: flex; align-items: center; gap: 4px; min-height: 72px; }
.irow + .irow { border-top: 1px solid var(--line); }
/* v1.7.3: the whole row is the tick (the circle is only a sign); ⓘ on the right opens the card */
.irow .tick { width: 34px; flex: none; display: grid; place-items: center; }
.irow .tick span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.irow .ibody[aria-pressed="true"] .tick span { background: var(--ok-fill); border-color: var(--ok-fill); color: var(--on-ok); }
.irow .ibody { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 8px 0; text-align: left; color: var(--ink); }
.irow .pthumb { width: 56px; height: 56px; border-radius: 14px; }
.irow .pthumb.emoji { font-size: 30px; }
.irow .iinfo { width: 44px; height: 44px; flex: none; border: 0; border-radius: 999px; background: none; color: var(--muted); display: grid; place-items: center; margin-right: -6px; }
.irow .t { display: block; font-size: 17px; font-weight: 600; }
.irow .m { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.irow.done .t { text-decoration: line-through; color: var(--muted); }
.irow.done .pthumb { opacity: 0.55; }
.all-done { flex-direction: row; align-items: center; gap: 12px; }
.frow { display: flex; align-items: center; gap: 4px; }
.frow + .frow { border-top: 1px solid var(--line); }
.frow .fbody { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 10px 0; text-align: left; color: var(--ink); min-height: 64px; }
.frow .t { display: block; font-size: 15px; font-weight: 600; }
.frow .m { display: block; font-size: 13px; color: var(--muted); }
.icon-btn.ghost { background: none; color: var(--muted); }
.tick-box { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; background: none; padding: 0; }
.tick-box.sq { border-radius: 8px; }
[aria-pressed="true"] > .tick-box, .tick-box[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.pick-row .tick-box { margin-left: auto; }
.item-photo { width: 100%; max-height: 46vh; object-fit: contain; background: #FFFFFF; border-radius: 18px; border: 1px solid var(--line); }
.item-note { font-size: 16px; line-height: 1.45; margin: 0; }
.pphoto { width: 92px; height: 92px; flex: none; border-radius: 18px; background: var(--surface-2); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; cursor: pointer; }
.pphoto img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; }
.pphoto small { font-size: 12px; font-weight: 600; }
.cat-emoji { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 19px; }
.import-how { display: flex; flex-direction: column; gap: 10px; }
.ibig { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--surface); border: 0; text-align: left; color: var(--ink); cursor: pointer; width: 100%; }
.ibig .ic { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.ibig b { display: block; font-size: 16px; }
.ibig small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.importing { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 12px; text-align: center; }
.importing small { color: var(--muted); }
.importing .spin { width: 34px; height: 34px; border: 3.5px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.rvrow { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 6px 0; }
.rvrow + .rvrow { border-top: 1px solid var(--line); }
.rvrow.off .grow, .rvrow.off .pthumb { opacity: 0.4; }
.rvrow .t { display: block; font-size: 15px; font-weight: 600; }
.rvrow .m { display: block; font-size: 13px; color: var(--muted); }
.rvrow button.pthumb { cursor: pointer; }
.cat-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--surface-2); font-size: 19px; padding: 0; }
.hrow.lrow { padding-left: 0; }
.hrow.lrow::before { display: none; }

/* v1.4.1 — search, scan, ask, missing, urgent, prices, offline */
.pill.amber { background: var(--warn-soft); color: var(--warn); }
.pill.sm { font-size: 10px; padding: 1px 6px; vertical-align: 2px; }
.lflags { display: flex; gap: 6px; margin-top: 4px; }
.irow.urgent .tick span { border-color: var(--bad); }
.irow.missing .t { color: var(--muted); }
.irow .m.alt { color: var(--accent-text); }
.irow .ibody .pill { display: inline-block; margin-top: 4px; }
.price { flex: none; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; align-self: center; }
.estimate { display: flex; align-items: center; gap: 6px; margin: -4px 4px 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.li-money { display: flex; flex-direction: column; gap: 10px; }
.li-money:empty { display: none; }
.li-money .banner { align-items: center; }
.askbox { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: var(--surface-2); }
.askbox .m { font-size: 13px; color: var(--muted); }
.okc { color: var(--ok); } .badc { color: var(--bad); }
.item-note.alt { color: var(--accent-text); font-weight: 600; }
.credit { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.list-result { gap: 4px; text-align: left; }
.list-result .m { font-size: 14px; color: var(--muted); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.pcard { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 0; border-radius: 16px; background: var(--surface); text-align: left; color: var(--ink); min-width: 0; }
.pcard .pimg { aspect-ratio: 1; border-radius: 12px; background: #FFFFFF; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.pcard img { width: 100%; height: 100%; object-fit: contain; }
.pcard .pname { font-size: 13px; font-weight: 600; line-height: 1.25; }
.pcard small { font-size: 11px; color: var(--muted); }
.pcard .psrc { color: var(--accent-text); font-weight: 600; }
.scanbox { position: relative; border-radius: 20px; overflow: hidden; background: #000000; aspect-ratio: 4 / 3; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanframe { position: absolute; left: 12%; right: 12%; top: 32%; bottom: 32%; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); }
.scanframe.qr { left: 22%; right: 22%; top: 18%; bottom: 18%; } /* a square for a QR (v2.0.0) */
/* v2.0.0 signing in: the QR and code an owner shows, the helper remembered on a phone */
.pairqr { display: flex; justify-content: center; padding: 8px; background: #fff; border-radius: 16px; }
.pairqr svg { width: min(240px, 70vw); height: auto; display: block; }
.paircode { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: 0.08em; margin: 4px 0 0; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.who-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 4px; }
.auth-links .link { cursor: pointer; }
.urgent-add { color: var(--bad); }

/* v1.4.1.1: pictures while typing, tap the emoji, *Добави снимки* */
.spin.sm { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
.webpics { border-top: 1px solid var(--line); padding: 8px 6px 6px; display: flex; flex-direction: column; gap: 8px; }
.webpics .lbl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.wp-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wp-row::-webkit-scrollbar { display: none; }
.wp { flex: none; width: 92px; display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; background: none; text-align: left; color: var(--ink); scroll-snap-align: start; }
.wp .pimg { width: 92px; height: 92px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.wp img { width: 100%; height: 100%; object-fit: contain; }
.wp > span:not(.pimg) { font-size: 12px; font-weight: 600; line-height: 1.25; }
.wp small { font-size: 11px; color: var(--muted); }
.wp:active .pimg { transform: scale(0.96); }
.addpic { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.addpic-b { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; border: 2px solid var(--surface); }
.frow.bp { gap: 8px; padding: 8px 0; }
.bp-arrow { color: var(--muted); font-size: 14px; }
.bp-pic { position: relative; width: 48px; height: 48px; flex: none; border-radius: 12px; border: 2px solid var(--line); background: #FFFFFF; padding: 0; overflow: hidden; opacity: 0.45; }
.bp-pic.on { border-color: var(--accent); opacity: 1; }
.bp-pic img { width: 100%; height: 100%; object-fit: contain; }
.bp-tick { position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: none; place-items: center; }
.bp-pic.on .bp-tick { display: grid; }
.frow.bp small { display: block; color: var(--muted); font-size: 12px; }

/* v1.4.1.4: AI picture, Търси в Google */
.ai-spark { font-size: 34px; line-height: 1; }
.wp.ai .pimg, .pcard.ai .pimg { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.bp-pic .ai-spark { font-size: 22px; display: grid; place-items: center; width: 100%; height: 100%; }
.wp.more .pimg { background: var(--surface-2); border-style: dashed; }
.g-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 20px; color: var(--accent-text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.wp.more.busy .g-ic { animation: spin .9s linear infinite; }
.pphoto .ai-spark + small { font-size: 11px; color: var(--muted); }
.gbtn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 12px; border: 0; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); font-size: 15px; font-weight: 700; text-align: left; }
.gbtn .g-ic { width: 32px; height: 32px; font-size: 16px; flex: none; }
.gbtn small { color: var(--accent-text); opacity: 0.75; font-size: 12px; font-weight: 600; flex: none; }
.gbtn:disabled { opacity: 0.7; }
/* v1.4.1.7: the picture fills its square whole (a grid with a centred item let tall pictures spill and get cut) */
.wp .pimg, .pcard .pimg, .pthumb { position: relative; }
.wp .pimg > img, .pcard .pimg > img, .pthumb > img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.pthumb > img { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.wp.broken, .pcard.broken { display: none; }

/* v1.4.2: simpler lists — header, product card, quick strip, catalogue */
.lttl { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lsub { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; color: var(--accent-text); font-size: 13px; font-weight: 600; text-align: left; max-width: 100%; min-height: 24px; }
.lsub .faces .av { width: 20px; height: 20px; font-size: 10px; }
.pcard-sheet .sheet-body { gap: 12px; }
.pc-head { display: flex; gap: 12px; align-items: center; }
.pc-photo { width: 84px; height: 84px; flex: none; border-radius: 18px; border: 1px solid var(--line); background: #FFFFFF; padding: 0; overflow: hidden; position: relative; display: grid; place-items: center; color: var(--accent-text); }
.pc-photo img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.pc-photo.empty { background: var(--accent-soft); border-style: dashed; display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; }
.pc-photo.empty small { font-size: 12px; font-weight: 600; }
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pc-name { border: 0; background: none; font: inherit; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); padding: 4px 6px; border-radius: 10px; width: 100%; }
.pc-note { border: 0; background: none; font: inherit; font-size: 15px; color: var(--accent-text); padding: 4px 6px; border-radius: 10px; width: 100%; }
.pc-note::placeholder { color: var(--accent-text); opacity: 0.75; }
.pc-name:focus, .pc-note:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
.pc-star { width: 48px; height: 48px; flex: none; border: 0; border-radius: 14px; background: var(--surface-2); font-size: 26px; line-height: 1; color: var(--muted); }
.pc-star.on { color: #F5A623; background: var(--warn-soft); }
.pc-rows .srow .v { color: var(--muted); font-size: 15px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-qty { gap: 6px; }
.pc-qty input { width: 84px; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; font: inherit; font-size: 15px; background: var(--surface); color: var(--ink); }
.pc-qty .step { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--surface-2); font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1; }
.v-input { border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); text-align: right; width: 55%; padding: 6px 0; }
.v-input:focus { outline: none; }
.danger-text { color: var(--bad); }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 4px 2px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.check-row.top { align-items: flex-start; font-size: 14px; line-height: 1.4; }
.check-row.top input { flex: none; margin-top: 1px; }
.check-row a { color: var(--accent); font-weight: 600; }
.cat-emoji { font-size: 20px; width: 28px; text-align: center; }
/* quick strip */
.qstrip { display: flex; flex-direction: column; gap: 6px; padding: 8px 6px 6px; }
.qstrip .lbl { color: var(--muted); font-size: 12px; font-weight: 700; }
.wp.qk .pimg { width: 76px; height: 76px; }
.wp.qk { width: 76px; }
.wp .emo, .ccard .emo { font-size: 30px; position: absolute; inset: 0; display: grid; place-items: center; }
.wp.qk.on .pimg { border: 2px solid var(--ok-fill); }
.qk-tick { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-fill); color: var(--on-ok); display: grid; place-items: center; z-index: 1; }
/* catalogue */
.ctabs { display: flex; gap: 8px; }
.ctabs .chip { display: inline-flex; gap: 6px; align-items: center; }
.ctabs .chip[aria-selected="true"] { background: var(--accent); color: #FFFFFF; }
.ctabs .n { font-size: 12px; opacity: 0.75; }
.cgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ccard { position: relative; min-width: 0; }
.cbody { width: 100%; display: flex; flex-direction: column; gap: 4px; border: 0; background: none; padding: 0; text-align: left; color: var(--ink); }
.cimg { position: relative; aspect-ratio: 1; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); overflow: hidden; display: block; }
.cimg img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.ccard.on .cimg { border: 2px solid var(--ok-fill); }
.cbadge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: var(--ok-fill); color: var(--on-ok); font-size: 11px; font-weight: 700; z-index: 1; }
.cname { font-size: 13px; font-weight: 600; line-height: 1.25; }
.cstar { color: #F5A623; margin-right: 2px; }
.ccard small { font-size: 12px; color: var(--muted); }
.cmore { position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--ink); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); z-index: 2; }
@media (max-width: 340px) { .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v1.4.3 Срокове */
.dic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.dic.tone-bad { background: var(--bad-soft); color: var(--bad); }
.dic.tone-warn { background: var(--warn-soft); color: var(--warn); }
.dic.tone-new { background: var(--surface-2); color: var(--muted); }
.hrow.drow { width: 100%; background: none; border: 0; border-radius: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; padding-right: 0; }
.hrow.drow.dsoon::before { background: var(--warn); }
.hrow.drow .pill { flex: none; }
.hrow.drow .btn { flex: none; }
.dcar { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; color: var(--ink); min-width: 0; font: inherit; }
.hsec-head .chip.outline { min-height: 36px; }
.car-pick { margin-top: -4px; }

/* v1.4.3.2 Настройки menu */
.srow { padding-top: 8px; padding-bottom: 8px; }
.smenu .srow > .grow { flex: 1 0 auto; }
.smenu .srow > .v { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
/* v1.4.3.3 Срокове layout */
.dtabs { display: flex; overflow-x: auto; scrollbar-width: none; } /* v1.4.4.3: each tab as wide as its words (long labels never overlap); scrolls sideways if the four don't fit */
.dtabs::-webkit-scrollbar { display: none; }
.dtabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; white-space: nowrap; }
.dtabs .n { font-size: 11px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--surface-2); color: var(--muted); display: inline-grid; place-items: center; }
.dtabs button[aria-checked="true"] .n { background: var(--accent-soft); color: var(--accent-text); }
.dcard { flex-direction: row; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--ink); }
.dcard b { font-size: 16px; display: block; }
.dcard .meta { display: block; }
.dnext { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); margin-top: 4px; }
.ddot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line); }
.ddot.tone-bad { background: var(--bad); } .ddot.tone-warn { background: var(--warn); } .ddot.tone-acc { background: var(--accent); }
.dpills { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.plate { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.hrow.dkm .btn { min-height: 38px; font-size: 14px; }
.dcard .dnext b { display: inline; font-size: 13px; font-weight: 700; }
.dnote { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dnote .bad { color: var(--bad); font-weight: 700; }
.hlist > .hrow:first-child { border-top: 0; }
.hsec-head + .hlist > .hrow:first-child { border-top: 1px solid var(--line); }
.hrow.dkm::before { display: none; }
.hrow.dkm { padding-left: 0; }
/* v1.4.3.4 folding sections on Начало */
.fold-head { width: 100%; border: 0; background: none; padding: 0; text-align: left; font: inherit; cursor: pointer; }
.fold-head .pill { flex: none; }
.fold-chev { transition: transform 0.2s ease; display: inline-flex; }
.fold.open .fold-chev { transform: rotate(180deg); }
.fold-body { display: flex; flex-direction: column; gap: 10px; }
.fold-body[hidden] { display: none; }
.fold-body > .link { align-self: flex-start; }
.fold-body .list, .fold-body .loose { margin: 0 -4px; }
@media (prefers-reduced-motion: reduce) { .fold-chev { transition: none; } }
.folds { display: flex; flex-direction: column; gap: 12px; }
#r-cats .chip[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#r-cats .chip { gap: 6px; }
#r-kinds[hidden] { display: none; }

/* Staging copy (v1.4.3.7): a strip at the top so it is never mistaken for the real app. */
.stagebar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 9999; pointer-events: none;
  padding: calc(env(safe-area-inset-top) + 1px) 10px 2px; border-radius: 0 0 8px 8px;
  background: #e8590c; color: #fff; font: 700 10px/1.3 system-ui, sans-serif; letter-spacing: .08em; }

/* Catalogue as a list (v1.4.4.1): picture, name and note, a tick or + on the right; and the grid / list switch. */
.vseg { display: flex; flex: none; background: var(--surface-2); border-radius: 14px; padding: 3px; gap: 2px; }
.vseg button { width: 40px; height: 40px; border: 0; border-radius: 11px; background: none; color: var(--muted); display: grid; place-items: center; }
.vseg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.clist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.crow { position: relative; display: flex; align-items: center; }
.crow + .crow { border-top: 1px solid var(--line); }
.crow .cbody { flex: 1; width: auto; min-width: 0; flex-direction: row; align-items: center; gap: 12px; padding: 8px 12px; min-height: 64px; }
.crow .cimg { width: 48px; height: 48px; flex: none; border-radius: 12px; aspect-ratio: auto; }
.crow .cimg img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.crow .cimg .emo { font-size: 24px; position: absolute; inset: 0; display: grid; place-items: center; }
.crow .cname { display: block; font-size: 15px; font-weight: 600; }
.crow small { display: block; font-size: 13px; color: var(--muted); }
.crow .ctick { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.crow.on .ctick { background: var(--ok-fill); color: var(--on-ok); }
.crow .cmore { position: static; flex: none; margin-right: 8px; box-shadow: none; background: var(--surface-2); }

/* The car's picture (v1.4.4.1): a wide photo at the top of its page, a small one on its card. */
.carpic { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 10; }
.carpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carpic .icon-btn { position: absolute; right: 10px; bottom: 10px; background: rgba(255, 255, 255, 0.92); color: #13151F; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.dcard .hic.dphoto { width: 52px; height: 52px; border-radius: 14px; padding: 0; overflow: hidden; background: var(--surface-2); }
.dcard .hic.dphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Deadline rows (v1.4.4.3): name and "in 3 days" on one line, the details under them across the whole row. */
.drow .dtop { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.drow .dtop .pill { margin-top: 1px; }
.drow .dtop .t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.drow .dtop .pill { flex: none; }
.drow .m { margin-top: 2px; }
@media (max-width: 360px) { .dtabs button { padding: 0 6px; font-size: 13px; } }

/* Хора → Собственици (v1.4.7) */
.olist { padding: 4px 6px; gap: 0; }
.orow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.orow + .orow { border-top: 1px solid var(--line); }
.orow.off { opacity: .6; }
/* Owner Начало without money (v1.4.8): a greeting instead of the cash hero */
.ohello { display: flex; flex-direction: column; gap: 2px; padding: 8px 2px 4px; }
.ohello .page-title { margin: 0; }
/* Меню (v1.5.0) */
.mcard { flex-direction: row; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 14px; }
.mcard b { font-size: 16px; display: block; }
.mweek { gap: 8px; }
.mweek b { font-size: 16px; }
.mday { gap: 0; padding: 12px 14px; }
.mday.today { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.mdhead { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.mdhead b { font-size: 15px; }
.mslot { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; }
.mslot .mlbl { flex: none; width: 76px; font-size: 13px; color: var(--muted); font-weight: 600; }
.mslot .mval { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mslot .mval b { font-weight: 600; font-size: 15px; }
.mslot .mval i { color: var(--muted); }
.mslot .mwarn { color: var(--warn); flex: none; display: inline-flex; }
.rlist { display: flex; flex-direction: column; }
.rrow { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.rrow:first-child { border-top: 0; }
.rmain { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 10px 0; text-decoration: none; color: var(--ink); }
.rthumb { flex: none; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rwarn { display: block; font-size: 12px; color: var(--warn); font-weight: 600; }
.star { color: var(--muted); display: inline-grid; place-items: center; }
.star.on { color: #E8A317; }
.star.on svg { fill: currentColor; }
/* v2.0.2.5 the children's runs: Начало's *Деца днес*, *Тази седмица*, the driver's card */
.runs { display: flex; flex-direction: column; gap: 2px; }
.card.runs { padding: 6px 14px; }
.run { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.run:last-child { border-bottom: 0; }
.run > .num { width: 48px; flex: none; font-size: 16px; }
.run.done > .grow, .run.skipped > .grow { opacity: .55; }
.run.skipped .ellip { text-decoration: line-through; }
.run .place-line { min-height: 30px; }
.run-ok { color: var(--good); flex: none; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; flex: none; }
.wk-days { flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; }
.wk-days .chip { display: inline-flex; align-items: center; justify-content: center; flex-direction: column; min-height: 58px; min-width: 44px; padding: 6px 8px; gap: 0; line-height: 1.15; position: relative; }
.wk-days .chip span { font-size: 12px; font-weight: 500; }
.wk-days .chip b, .wk-days .chip span { color: inherit; }
.wk-days .chip[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.wk-days .chip.no-runs:not([aria-selected="true"]) { opacity: .6; }
.wk-days .dot { position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.week-card { display: flex; flex-direction: row; align-items: center; text-align: left; gap: 12px; text-decoration: none; color: inherit; padding: 14px 16px; }
/* v2.0.2.5 a child's schedule */
.sched-act .tbody { border: 0; background: none; padding: 0; font: inherit; color: inherit; width: 100%; }
.sched-days { display: flex; flex-direction: column; gap: 6px; }
.sched-day { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }
.sched-day small { grid-column: 2; }
.sched-leave { gap: 10px; margin-top: 6px; }
.sched-leave .input { width: 128px; flex: none; }
/* v2.0.2.4 a place: the 📍 line, its sheet with Google Maps / Waze, the *Къде* row */
.place-line { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding: 0 2px; border: 0; background: none; color: var(--accent-text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; align-self: flex-start; text-align: left; }
.place-line.sm { min-height: 32px; font-size: 14px; }
.place-line svg { flex: none; }
.tcard .tplace { margin: -10px 14px -4px -4px; }
.place-addr { margin: 0; font-size: 16px; line-height: 1.4; }
.place-go { display: flex; gap: 10px; margin-top: 4px; }
.place-go .btn { flex: 1; justify-content: center; text-decoration: none; }
.srow.place-pick { min-height: 52px; background: var(--surface); border-radius: var(--r-md, 14px); }
/* v2.0.2.3 ★ under a new task's text, and on suggestion chips */
.nt-fav { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: -12px 0 -6px; padding: 0 2px; font-weight: 600; }
.chips.recent .chip .star { flex: none; }
/* the whole suggestion, on up to two lines (not cut off) */
/* v2.0.3.2 the ★ tasks in one sideways row; while typing, up to 3 like it (they may wrap to two lines) */
#nt-sug .chip { max-width: 240px; min-height: 44px; padding: 0 12px; border-radius: 16px; }
#nt-sug .chip .t2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#nt-sug.match { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
#nt-sug.match .chip { max-width: 100%; height: auto; padding: 7px 12px; white-space: normal; text-align: left; line-height: 1.25; }
#nt-sug.match .chip .t2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#nt-fav-hint { margin: -8px 4px 0; }
#nt-fav-hint svg { vertical-align: -2px; }
/* four short choices in a row fit 320 px on one line each */
.sheet-body .seg button { padding: 0 4px; line-height: 1.2; }
.tcard:not(.long) .tbody { cursor: default; }
/* v2.0.3.3 the date in our words ("вт, 10 ное."); the phone's own picker opens under it */
.date-face { position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.date-face input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; -webkit-appearance: none; appearance: none; }
#nt-leave-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
#nt-leave-add svg { vertical-align: -3px; }
.sheet-body .seg:has(> button:nth-child(4)) button { white-space: nowrap; font-size: 13px; }
.task-row[data-task] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center; }
.task-row[data-task] > .tav { grid-row: 1 / span 3; display: flex; }
.task-row[data-task] > .t { grid-column: 2; }
.task-row[data-task] > .right { grid-column: 3; grid-row: 1; align-self: start; }
.task-row[data-task] > .m { grid-column: 2 / 4; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper .icon-btn { width: 36px; height: 36px; min-height: 36px; font-size: 20px; font-weight: 700; }
.stepper b { min-width: 86px; text-align: center; font-size: 14px; }
.ilist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ilist li { display: flex; align-items: center; gap: 10px; min-height: 40px; border-top: 1px solid var(--line); padding: 4px 0; }
.ilist li:first-child { border-top: 0; }
.ilist .iq { flex: none; min-width: 76px; color: var(--muted); font-weight: 600; font-size: 14px; }
.slist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
/* Cook mode (v1.5.2): a tapped step is done; a step with a time has a timer chip */
.slist.cook li { cursor: pointer; padding: 4px 0; -webkit-tap-highlight-color: transparent; }
.slist.cook li > span.grow { display: inline; }
.slist.cook li.done { color: var(--muted); }
.slist.cook li.done > .grow { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.tchip { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; vertical-align: middle; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mrow { display: flex; align-items: center; gap: 6px; }
.mrow > .mitem { flex: 1; min-width: 0; }
.mlink { flex: none; width: 44px; height: 44px; margin-right: 6px; border-radius: 12px; border: 1px dashed var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; overflow: hidden; padding: 0; }
.mlink.on { border-style: solid; color: var(--accent-text); background: var(--accent-soft); }
.mlink img { width: 100%; height: 100%; object-fit: cover; }
.mlinked { display: block; color: var(--accent-text) !important; }
.ilist .ithumb { flex: none; width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.tchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#print-root { display: none; }
@media print {
  @page { margin: 14mm; }
  body.printing { background: #fff !important; color: #000 !important; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; font-family: Onest, system-ui, sans-serif; font-size: 12pt; line-height: 1.45; color: #000; }
  #print-root h1 { font-size: 20pt; margin: 0 0 6pt; }
  #print-root h2 { font-size: 13pt; margin: 14pt 0 4pt; }
  #print-root .pmeta, #print-root .pfoot { color: #555; font-size: 10pt; }
  #print-root .pfoot { margin-top: 18pt; }
  #print-root .ppic { width: 100%; max-height: 70mm; object-fit: cover; border-radius: 6pt; }
  #print-root ul, #print-root ol { margin: 0; padding-left: 18pt; }
  #print-root .pingr, #print-root .pcheck { list-style: none; padding-left: 0; columns: 2; column-gap: 18pt; }
  #print-root .pcheck li { break-inside: avoid; padding: 2pt 0; }
  #print-root li { break-inside: avoid; }
  #print-root .pweek { width: 100%; border-collapse: collapse; table-layout: fixed; }
  #print-root .pweek th, #print-root .pweek td { border: 1px solid #999; padding: 8pt 6pt; vertical-align: top; text-align: left; font-size: 11pt; }
  #print-root .pweek thead th { background: #eee; }
  #print-root .pweek tbody th { width: 24%; }
}
.mitem .box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; color: var(--bg); }
.mitem[aria-checked="true"] .box { background: var(--accent); border-color: var(--accent); }
.mitem[disabled] { opacity: .55; }
#mn-filters .chip[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* v1.5.1: the cook's proposals, кой го обича, photos to read */
.mslot.prop .mval b, .mslot.prop .mval i { color: var(--accent-text); }
.mslot.prop { background: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--accent-soft) 55%, transparent) 8px 10px); }
.mslot .ptag { display: block; font-size: 11px; font-weight: 600; color: var(--accent-text); margin-top: 2px; }
.mprop { gap: 10px; border: 1.5px dashed var(--accent); }
.mprop.ok { border-style: solid; border-color: var(--accent-soft); }
[data-love][aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-soft); }
.shots { display: flex; gap: 8px; flex-wrap: wrap; }
.shots:empty { display: none; }
.shot { position: relative; width: 88px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot .icon-btn { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; min-height: 30px; background: rgba(0,0,0,.55); color: #fff; }

/* ---------- visits (v1.6.0): a checklist with big ticks ---------- */
.vcheck { min-height: 52px; padding: 8px 12px; background: var(--surface); border-radius: 14px; margin-top: 6px; font-size: 16px; }
.vcheck .t { white-space: normal; }
.vcheck .tickbox { width: 30px; height: 30px; flex: none; border-radius: 9px; border: 2px solid var(--muted); display: grid; place-items: center; color: var(--on-ok); }
.vcheck.on .tickbox { background: var(--ok-fill); border-color: var(--ok-fill); }
.vcheck.on .t { color: var(--muted); text-decoration: line-through; }
.vcheck:disabled { opacity: 1; }
#nt-kind { margin-bottom: 2px; }

/* ---------- Деца (v1.6.1): the emergency card ---------- */
.calls { display: flex; flex-direction: column; gap: 8px; }
.btn.call { justify-content: flex-start; gap: 12px; min-height: 60px; padding: 8px 16px; text-decoration: none; background: var(--surface); color: var(--ink); border-radius: 16px; }
.btn.call small { color: var(--muted); font-weight: 500; font-size: 13px; }
.btn.call.soft { min-height: 52px; margin-top: 4px; }
.btn.call.sos { background: var(--bad); color: var(--bg); }
.btn.call.sos small { color: var(--bg); opacity: 0.85; }
.alarm { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--bad-soft); color: var(--bad); font-size: 16px; line-height: 1.35; }
.alarm svg { flex: none; margin-top: 1px; }
.chip[data-crit][aria-checked="true"] { background: var(--bad); color: var(--bg); }

/* ---------- Деца — the day log (v1.6.2) ---------- */
.kgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px 4px; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: center; }
.kbtn > span { font-size: 26px; line-height: 1; }
.kbtn.bad { background: var(--bad-soft); color: var(--bad); }
.kbtn:disabled { opacity: 0.45; }
.klog { align-items: flex-start; gap: 10px; min-height: 0; padding: 10px 0; }
.klog + .klog { border-top: 1px solid var(--line); }
.klog .ktime { flex: none; width: 44px; color: var(--muted); font-size: 14px; padding-top: 2px; }
.klog .kemoji { flex: none; font-size: 18px; }
.klog.urgent .t { color: var(--bad); font-weight: 600; }
.klog.gone .t { text-decoration: line-through; color: var(--muted); }
.klog[data-entry] { cursor: pointer; }

/* ---------- Записи · Статистика (v1.7.0) ---------- */
.seg a.segl { display: grid; place-items: center; min-height: 40px; border-radius: 11px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.seg a.segl[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px var(--shadow); font-weight: 700; }
.scard { gap: 10px; }
.scard .hic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.hic.sm { width: 30px; height: 30px; }
.slist { display: flex; flex-direction: column; }
.srow2 { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--ink); text-decoration: none; }
.srow2 + .srow2 { border-top: 1px solid var(--line); }
.srow2 .pill.sm { margin-left: 4px; }
.sbar { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); margin: 6px 0 4px; overflow: hidden; }
.sbar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.schart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; height: 120px; margin-top: 6px; }
.scol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-size: 11px; }
.scol i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: var(--surface-2); }
.scol.on i { background: var(--accent); }
.scol.on span { color: var(--ink); font-weight: 600; }
.icon-btn.sm { width: 36px; height: 36px; flex: none; }
.scard .chips.wrap { flex-wrap: wrap; overflow: visible; } .scard .chip { white-space: normal; max-width: 100%; height: auto; min-height: 32px; text-align: left; }
.scard a.chip { text-decoration: none; color: var(--ink); }

/* ---------- Desktop (v1.7.1): 1024 px and wider — laptops, desktops, an iPad held sideways. ----------
   Below 1024 px nothing here applies: the phone layout stays exactly as it is.
   The tab bar becomes a sidebar on the left with the wordmark; the page gets wider (Начало and Статистика widest); sideways strips (helper cards, chips) lay out instead of scrolling; sheets are centred
   windows (Esc closes them, as <dialog> does). */
.nav-brand { display: none; }
@media (min-width: 1024px) {
  :root { --side: 248px; --page: 760px; --page-wide: 1040px; }
  body:has(.tabbar) { padding-left: var(--side); }
  #app:has(.tabbar) { max-width: var(--page); }
  #app:has(.tabbar):is([data-screen="home"], [data-screen="stats"]) { max-width: var(--page-wide); }
  #app:has(.tabbar) > .screen { padding-top: 32px; padding-left: 32px; padding-right: 32px; padding-bottom: 64px; }

  /* the sidebar */
  .tabbar, .tabbar.helper { left: 0; top: 0; bottom: 0; right: auto; transform: none; width: var(--side); max-width: none; height: 100vh; height: 100dvh; margin: 0;
    padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--bar-line); background: var(--surface);
    -webkit-backdrop-filter: none; backdrop-filter: none; overflow-y: auto; }
  .nav-brand { display: block; padding: 6px 12px 26px; }
  .nav-brand img { height: 28px; width: auto; display: block; }
  .nav-brand .wm-d { display: none; }
  :root[data-theme="dark"] .nav-brand .wm-l { display: none; }
  :root[data-theme="dark"] .nav-brand .wm-d { display: block; }
  .tab, .tabbar.helper .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 14px; font-size: 15px; }
  .tab span.ic { width: 26px; height: 26px; flex: none; }
  .tab[aria-current="page"] { background: var(--accent-soft); }
  .tab[aria-current="page"] span.ic { background: none; }
  .tab .lab { max-width: none; }
  .tcount { top: -7px; right: -9px; }

  /* things fixed to the screen keep clear of the sidebar */
  body:has(.tabbar) #toasts { left: var(--side); }
  body:has(.tabbar) #toasts:not(.above-actions) { bottom: 24px; }
  body:has(.tabbar) #update-bar { left: calc(var(--side) + 16px); }
  body:has(.tabbar) .offline { left: var(--side); }
  body:has(.tabbar) .bottombar { left: var(--side); right: 0; transform: none; width: auto; max-width: var(--page); margin: 0 auto; border-radius: 22px 22px 0 0; border: 1px solid var(--bar-line); border-bottom: 0; }
  .bottombar.above-tabs { bottom: 0; padding-bottom: calc(14px + var(--safe-b)); }

  /* sideways strips lay out */
  .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); overflow: visible; scroll-snap-type: none; margin: 0; padding: 0; }
  .cards > .wcard { flex: none; }
  .cards + .dots { display: none; }
  .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }

  /* Статистика: the cards two by two */
  #st-root { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  #st-root > :not(.scard) { grid-column: 1 / -1; }

  /* sheets: centred windows */
  dialog.sheet { inset: 0; margin: auto; width: calc(100% - 48px); max-width: 560px; height: fit-content; max-height: 86vh; max-height: 86dvh; border-radius: 24px; box-shadow: 0 24px 60px var(--shadow); }
  dialog.sheet.full { max-width: 760px; height: 90vh; height: 90dvh; max-height: 90dvh; border-radius: 24px; }
  dialog.sheet .grab { display: none; }

  @media (hover: hover) {
    .tab:not([aria-current="page"]):hover { background: var(--surface-2); color: var(--ink); }
    .wcard:hover { filter: brightness(1.06); }
  }
}
@media (min-width: 1024px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-brand .wm-l { display: none; }
  :root:not([data-theme="light"]) .nav-brand .wm-d { display: block; }
}

/* ---------- Split view (v1.7.2): 1280 px and wider. ----------
   Записи and Задачи keep a panel on the right: the sheet a row opens docks there (ui.js, sheet) and another row swaps
   it; with nothing open the panel says what to pick. Списъци and Настройки are two columns: the lists | the open list,
   the menu | the open group (main.js, showTwo). */
.pane-empty { display: none; }
@media (min-width: 1280px) {
  :root { --pane: 420px; --app-off: max(0px, (100% - var(--side) - var(--page-wide)) / 2); }
  #app:has(.tabbar)[data-split="1"] { max-width: var(--page-wide); }
  #app:has(.tabbar)[data-split="1"] > .screen { padding-right: calc(32px + var(--pane) + 24px); }
  #app:has(.tabbar)[data-split="1"]::after { content: attr(data-pane-hint); position: fixed; top: 24px; bottom: 24px; right: calc(var(--app-off) + 32px); width: var(--pane);
    box-sizing: border-box; border: 2px dashed var(--line); border-radius: 24px; display: grid; place-items: center; text-align: center; padding: 32px; color: var(--muted); font-size: 15px; font-weight: 600; pointer-events: none; }
  dialog.sheet.docked { position: fixed; top: 24px; bottom: 24px; left: auto; right: calc(var(--app-off) + 32px); width: var(--pane); max-width: var(--pane); height: auto; max-height: none; margin: 0;
    z-index: 30; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 10px 30px var(--shadow); }
  dialog.sheet.docked .grab { display: none; }
  #app[data-split="1"] .bottombar { left: calc(var(--side) + var(--app-off)); right: calc(var(--app-off) + 32px + var(--pane) + 24px); width: auto; max-width: none; margin: 0; }

  #app:has(.lsplit) { max-width: var(--page-wide); }
  .lsplit { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 8px; align-items: start; }
  .lsp-a { position: sticky; top: 0; max-height: 100vh; max-height: 100dvh; overflow-y: auto; scrollbar-width: thin; }
  .lsplit .screen { padding: 32px 16px 64px; }
  .lsp-a > .screen { padding-left: 32px; }
  .lsp-b > .screen { padding-right: 32px; }
  .lsp-b .tabbar { display: none; }
  .lsp-a .lcard[aria-current] { box-shadow: 0 0 0 2px var(--accent); }
  .lsp-a .srow[aria-current] { background: var(--accent-soft); }
  .lsp-b #s-back, .lsp-b .lhead > a.icon-btn:first-child { display: none; } /* the left column is the way back */
  .pane-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; margin: 32px 32px 0 16px; min-height: 60vh;
    border: 2px dashed var(--line); border-radius: 24px; color: var(--muted); font-size: 15px; font-weight: 600; text-align: center; padding: 32px; }
}

/* ---------- v1.7.3: the list in the shop ----------
   Two views, remembered on the phone: *Плочки* (big pictures, three in a row, the default) and *Списък*. The whole item
   ticks; a ticked one stays where it is during the visit, greyed with a big tick. *В количката* folds into one line. */
.lbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px 2px 0; min-height: 44px; }
.lleft { font-size: 14px; font-weight: 700; color: var(--muted); }
.itiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.itile { position: relative; min-width: 0; }
.itile .tbody { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 12px;
  border: 2px solid transparent; border-radius: 18px; background: var(--surface); color: var(--ink); text-align: center; }
.itile .pthumb.big { width: 100%; max-width: 96px; height: auto; aspect-ratio: 1 / 1; border-radius: 14px; font-size: 46px; }
.itile .tname { font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.itile .tnote { font-size: 12px; color: var(--muted); max-width: 100%; }
.itile .tflag { font-size: 11px; font-weight: 800; color: var(--bad); text-transform: uppercase; letter-spacing: .03em; }
.itile .tqty { margin-top: -2px; max-width: 100%; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text);
  font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itile .tmore { position: absolute; top: 2px; right: 2px; width: 36px; height: 36px; border: 0; border-radius: 999px; background: none; color: var(--muted); display: grid; place-items: center; }
.itile .pill { font-size: 11px; }
.itile.urgent .tbody { border-color: var(--bad); }
.itile.done .tbody { background: transparent; border-color: var(--line); }
.itile.done .pthumb { opacity: 0.35; }
.itile.done .tname { color: var(--muted); text-decoration: line-through; }
.itile .tdone { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); width: 46px; height: 46px; border-radius: 50%; background: var(--ok-fill); color: var(--on-ok);
  display: grid; place-items: center; box-shadow: 0 4px 12px var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .itile .tdone { animation: pop .18s ease-out; } }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.cart .cartbar { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 14px; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); text-align: left; font-size: 15px; }
.cminis { display: flex; flex: none; }
.cminis .pthumb.sm { width: 34px; height: 34px; border: 2px solid var(--surface); opacity: 0.7; }
.cminis .pthumb.sm + .pthumb.sm { margin-left: -10px; }
.cart.open { gap: 8px; }
.suggest .wp-row.hits { padding: 4px 2px 8px; }
@media (min-width: 1024px) { .itiles { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); } }

/* v1.7.3.1: *Изпрати на:* — the helpers as one-tap chips under the list's title; on Списъци, *Изпрати* on unsent lists */
.who { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 0; padding: 2px 16px; }
.who::-webkit-scrollbar { display: none; }
.who .lbl { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.wchip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; }
.wchip .avatar.xs { width: 32px; height: 32px; font-size: 14px; }
.wchip.on { border-color: var(--ok-fill); background: var(--ok-soft); }
.wchip.on > svg { color: var(--ok-fill); }
.sendpill { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; }
@media (min-width: 1024px) { .who { flex-wrap: wrap; overflow: visible; margin: -4px 0 0; padding: 0; } }
.pill.fresh { background: var(--accent); color: var(--accent-ink); }
.itile .tnew { position: absolute; top: 6px; left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; }
/* v2.0.1 the helper notice, before the app */
.auth.notice { justify-content: flex-start; }
.notice-part { display: flex; gap: 12px; align-items: flex-start; }
.notice-part .ic { flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.notice-part b { display: block; font-size: 15px; }
.notice-part p { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.photo-ask { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
/* v2.0.2.1 a task translated on tap */
.tr-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; align-self: flex-start; padding: 2px 4px; }
.tcard .tr-link { margin: -10px 14px -4px; }

/* v2.0.3: an AI-made product picture says so on itself (EU AI Act, Art. 50) */
.ai-tag { position: absolute; right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 5px; background: rgba(17, 18, 24, 0.66); color: #FFFFFF; font: 700 9px/1 var(--font, system-ui), system-ui, sans-serif; font-style: normal; letter-spacing: 0.02em; pointer-events: none; }
.pthumb.sm .ai-tag { display: none; }
.pc-photo .ai-tag { right: 6px; bottom: 6px; font-size: 10px; }

/* The child's week as a table (8 Nov 2026): a row per day, a column per activity; scrolls sideways inside its box */
.sched-table { overflow-x: auto; border-radius: 22px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.sched-table table { border-collapse: collapse; min-width: 100%; font-size: 14px; }
.sched-table th, .sched-table td { padding: 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.sched-table tr:last-child th, .sched-table tr:last-child td { border-bottom: 0; }
.sched-table thead th { padding: 10px 10px 6px; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.sched-table tbody th { padding: 10px 6px 10px 12px; font-weight: 700; width: 1%; white-space: nowrap; position: sticky; left: 0; background: var(--surface); }
.sched-table td button { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 44px; padding: 8px 10px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.sched-table td b { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.sched-table td small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sched-table td.none { padding: 10px; color: var(--muted); }

/* v2.0.3.4 the menu: an empty meal she can fill says so; the cook's empty days at the end fold; a cart per ingredient */
.mslot .madd { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.mfold { flex-direction: row; align-items: center; gap: 10px; text-align: left; width: 100%; border: 1px dashed var(--line); background: transparent; cursor: pointer; font: inherit; color: inherit; }
.ilist .imiss { width: 40px; height: 40px; background: var(--accent-soft); color: var(--accent-text); }
.ilist .imiss.done { color: var(--ok, #1a7f4b); }
.btn svg { flex: none; }
/* v2.0.3.5 the meal picker and the approval: pictures; the meal's own recipes first; ✕ sends a dish back */
.add-row.slim { padding: 10px 14px; border-radius: 18px; }
.add-row.slim .circ { width: 40px; height: 40px; }
#sl-rows .srow.pick { gap: 12px; padding-top: 8px; padding-bottom: 8px; }
#sl-rows .rthumb, .ap-row .rthumb { width: 44px; height: 44px; border-radius: 10px; }
#sl-rows .pick-h { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 8px 14px 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ap-row { gap: 8px; }
.ap-row .rmain { padding: 0; }
.ap-row.off .rmain { opacity: .5; }
.ap-row.off .rmain .ellip { text-decoration: line-through; }

/* ---------- v2.0.4.1 Абонамент ---------- */
a.banner { text-decoration: none; align-items: center; }
a.banner .grow { flex: 1; min-width: 0; }
.bill-status { gap: 4px; }
.bill-status.paused, .bill-status.past_due { background: var(--warn-soft); }
.bill-plans { display: flex; flex-direction: column; gap: 8px; }
.bill-plan { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; color: var(--ink); font: inherit; cursor: pointer; min-height: 64px; }
.bill-plan[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.bill-plan .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bill-plan b { font-size: 16px; }
.bill-plan .price { flex: none; font-size: 18px; font-weight: 700; text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.bill-plan .price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.bill-terms { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); line-height: 1.4; }
