/* «Учёт» — mobile first, light and dark */
:root {
  --bg: #f2f3f7;
  --bg-glass: rgba(242, 243, 247, .84);
  --surface: #ffffff;
  --surface-2: #f4f5f8;
  --line: #e4e6ed;
  --text: #14161b;
  --muted: #626977;
  --faint: #969ca8;
  --primary: #3d4fd8;
  --primary-ink: #ffffff;
  --primary-soft: #e9ecfc;
  --green: #12803e;
  --green-soft: #e3f4e9;
  --red: #c22a2a;
  --red-soft: #fbeaea;
  --amber: #8f5400;
  --amber-soft: #fff1d6;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 2px 10px rgba(17, 24, 39, .06);
  --shadow-lg: 0 14px 36px rgba(17, 24, 39, .22);
  --card-line: transparent;
  --toast: #1b1e25;
  --toast-link: #aab5ff;
  --radius: 18px;
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f13;
    --bg-glass: rgba(13, 15, 19, .84);
    --surface: #171a20;
    --surface-2: #20242c;
    --line: #2b3039;
    --text: #eceef3;
    --muted: #a2a8b4;
    --faint: #6f7582;
    --primary: #8794ff;
    --primary-ink: #0d0f13;
    --primary-soft: #252a4f;
    --green: #52d283;
    --green-soft: #14291c;
    --red: #ff7d7d;
    --red-soft: #351a1c;
    --amber: #f3b84c;
    --amber-soft: #302512;
    --shadow: none;
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, .6);
    --card-line: #23272f;
    --toast: #2c313b;
    --toast-link: #aab5ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.noscroll, html.noscroll body { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { letter-spacing: -.01em; }
.i { width: 22px; height: 22px; flex: none; display: block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.plus { color: var(--green); }
.minus { color: var(--red); }
.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 16px; }
.noscript { padding: 24px; text-align: center; }

/* loading */
.boot, .center-msg { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.center-msg h2 { margin: 8px 0 0; font-size: 20px; }
.center-msg p { margin: 0 0 8px; max-width: 360px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* buttons */
.btn {
  min-height: 52px; border: 0; border-radius: 14px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; text-decoration: none; line-height: 1.2;
}
.btn .i { width: 20px; height: 20px; }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:active { filter: brightness(.94); }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.ghost:active { filter: brightness(.96); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.link { background: transparent; color: var(--primary); min-height: 44px; }
.btn.link.danger { color: var(--red); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 14px; background: transparent;
  display: grid; place-items: center; color: var(--text); flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.95); }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon-btn.sm .i { width: 18px; height: 18px; }

/* home */
.home-head { padding-top: env(safe-area-inset-top); }
.head-in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 44px; height: 44px; display: block; }
.brand .logo svg, .hero-ic svg { width: 100%; height: 100%; display: block; }
.brand b { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: 13px; }
.home { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.sec { font-size: 15px; color: var(--muted); font-weight: 700; margin: 12px 4px 10px; }
.projects { display: grid; gap: 10px; margin-bottom: 14px; }
.proj {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--card-line); background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 12px 16px 16px; color: var(--text);
}
.proj:active { transform: scale(.995); }
.proj > .i { color: var(--faint); width: 20px; height: 20px; }
.proj-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.proj-main b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-total { text-align: right; flex: none; display: flex; flex-direction: column; }
.proj-total small { font-size: 12px; color: var(--muted); }
.proj-total b { font-size: 17px; }
.proj.gone { opacity: .75; }
.hero { text-align: center; padding: 28px 8px 8px; }
.hero-ic { width: 72px; height: 72px; display: block; margin: 0 auto 16px; }
.hero h2 { font-size: 24px; margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0 auto 22px; max-width: 420px; }
.home .btn.link { margin-top: 6px; }

/* project top bar */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); padding-top: env(safe-area-inset-top); }
@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .top { background: var(--bg-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
}
.top-in { display: flex; align-items: center; gap: 4px; height: 58px; max-width: 600px; margin: 0 auto; padding: 0 8px; }
.top-title { flex: 1; min-width: 0; padding: 0 4px; }
.top-title h1 { margin: 0; font-size: 18px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  height: 38px; border: 0; border-radius: 999px; padding: 0 14px 0 11px; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 14px;
}
.pill .i { width: 19px; height: 19px; }
.banner { margin: 6px 0 4px; padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: 14px; font-weight: 600; }

.page { padding-top: 6px; padding-bottom: calc(var(--tabbar) + 100px + env(safe-area-inset-bottom)); }

/* tab bar + floating button */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-in { max-width: 600px; margin: 0 auto; height: var(--tabbar); display: grid; grid-template-columns: repeat(4, 1fr); }
.tab {
  border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 12px; font-weight: 650; color: var(--faint);
}
.tab .i { width: 24px; height: 24px; }
.tab.on { color: var(--primary); }
.fab {
  position: fixed; z-index: 31;
  right: max(16px, calc((100vw - 600px) / 2 + 16px));
  bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom));
  height: 56px; border: 0; border-radius: 18px; padding: 0 20px 0 16px;
  display: flex; align-items: center; gap: 8px;
  background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 16px; box-shadow: var(--shadow-lg);
}
.fab:active { transform: scale(.97); }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 650;
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.total { padding: 18px; }
.total .label { color: var(--muted); font-size: 14px; font-weight: 650; }
.total .big { font-size: 36px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 4px 0 14px; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.split > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.k { font-size: 13px; color: var(--muted); font-weight: 650; }
.split .v { font-size: 18px; font-weight: 750; overflow-wrap: anywhere; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.act {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 68px; text-align: left;
  border: 1px solid var(--card-line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  color: var(--text);
}
.act:active { transform: scale(.98); }
.act > span:last-child { font-weight: 750; font-size: 17px; line-height: 1.2; }
.act small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.ic, .act .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ic.g { background: var(--green-soft); color: var(--green); }
.ic.b { background: var(--primary-soft); color: var(--primary); }
.ic.r { background: var(--red-soft); color: var(--red); }
.ic.n { background: var(--surface-2); color: var(--muted); }

.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.mini .card { padding: 12px 14px; text-align: left; color: var(--text); min-width: 0; }
.mini button.card:active { transform: scale(.98); }
.mini .v { font-size: 18px; font-weight: 750; margin: 2px 0; overflow-wrap: anywhere; }
.mini .s { font-size: 12px; color: var(--muted); }

.sec-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 6px; }
.sec-row h2 { font-size: 16px; margin: 0; }
.sec-row .btn.link { min-height: 36px; padding: 0 6px; font-size: 15px; }

/* lists */
.list { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list.flat { box-shadow: none; border: 1px solid var(--line); }
.row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border: 0; background: transparent; text-align: left; color: var(--text);
}
.row + .row { border-top: 1px solid var(--line); }
.row:active { background: var(--surface-2); }
.row .ic { width: 38px; height: 38px; }
.row .ic .i { width: 20px; height: 20px; }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { flex: none; text-align: right; font-weight: 750; }
.row .end.zero { color: var(--faint); font-weight: 600; }
.day { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 6px 8px; font-size: 13px; font-weight: 750; color: var(--muted); }
.day:first-of-type { padding-top: 4px; }
.more { margin-top: 14px; }

.ava {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 16px;
}
.ava.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }
.c0 { background: #e8ecfd; color: #2c45c4; } .c1 { background: #e3f4ea; color: #137440; }
.c2 { background: #fdece3; color: #a8461b; } .c3 { background: #f1e7fc; color: #7330b8; }
.c4 { background: #e2f2f6; color: #0f6a80; } .c5 { background: #fcf1d8; color: #8a5c08; }
.c6 { background: #fce6ee; color: #a92a5c; } .c7 { background: #eceef2; color: #4b5260; }
@media (prefers-color-scheme: dark) {
  .c0 { background: #232a52; color: #a9b4ff; } .c1 { background: #16301f; color: #7ee0a2; }
  .c2 { background: #3a2418; color: #ffb48a; } .c3 { background: #2f2242; color: #d3a8ff; }
  .c4 { background: #14303a; color: #7fd4ea; } .c5 { background: #352a12; color: #f2c766; }
  .c6 { background: #3a1a27; color: #ff9cc3; } .c7 { background: #262a33; color: #b9bfcb; }
}

.search { position: relative; margin-bottom: 12px; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 20px; height: 20px; pointer-events: none; }
.search .input { padding-left: 44px; background: var(--surface); }
.items-sum { font-size: 14px; color: var(--muted); margin: 0 4px 10px; }
.empty-line { text-align: center; color: var(--muted); padding: 24px 0; margin: 0; }

.empty { text-align: center; padding: 30px 18px 20px; color: var(--muted); }
.empty .em-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow); display: grid; place-items: center; margin: 0 auto 12px; color: var(--faint); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.empty p { margin: 0 auto; max-width: 380px; font-size: 15px; }

/* notes */
.notes { display: grid; gap: 10px; }
.note-card {
  display: block; width: 100%; text-align: left; padding: 14px 16px; color: var(--text);
  border: 1px solid var(--card-line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.note-card .nt { font-weight: 750; font-size: 16px; margin-bottom: 4px; overflow-wrap: anywhere; }
.note-card .nb {
  color: var(--muted); font-size: 15px; white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.note-card .nm { margin-top: 8px; font-size: 12px; color: var(--faint); }

/* sheets */
#sheets { position: relative; z-index: 50; }
.sheet-wrap { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(8, 10, 14, .48); animation: fade .18s ease; }
.sheet {
  position: relative; width: 100%; max-width: 600px; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  animation: up .24s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain;
}
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 6px; }
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -6px 8px 0; }
.sh-head h2 { font-size: 20px; margin: 0; }
.sheet p { margin: 0 0 14px; }
.sheet.full { height: 100%; max-height: 100%; border-radius: 0; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); align-self: flex-start; }
.sheet.full .ed-bar { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet.full .grab { display: none; }
.sheet.full .sheet-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { border-radius: 22px; max-height: 88vh; padding-bottom: 20px; }
  .sheet.full { height: min(760px, 88vh); max-height: 88vh; border-radius: 22px; padding-top: 6px; align-self: center; }
  .grab { display: none; }
}
@keyframes up { from { transform: translateY(28px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* forms */
.field { display: block; margin-bottom: 12px; min-width: 0; }
.lbl { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 50px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  border-radius: 12px; padding: 0 14px; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder { color: var(--faint); }
.input.big { height: 62px; font-size: 26px; font-weight: 750; }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 36px;
}
input[type="date"].input { min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: flex; gap: 6px; }
.stepper .input { text-align: center; padding: 0 6px; min-width: 0; }
.stepper button {
  width: 44px; height: 50px; flex: none; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: 22px; font-weight: 600; color: var(--text);
}
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; margin: 4px 0 16px; }
.seg button { border: 0; background: transparent; height: 40px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); padding: 0 2px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .seg button.on { background: #2e333d; } }
.err { color: var(--red); font-weight: 600; font-size: 14px; margin: -2px 0 12px !important; }
.hint { color: var(--amber); background: var(--amber-soft); font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: 10px; margin: -2px 0 12px !important; }
.gain { color: var(--green); background: var(--green-soft); font-size: 14px; font-weight: 650; padding: 9px 12px; border-radius: 10px; margin: -2px 0 12px !important; }
.form-btns { display: grid; gap: 4px; margin-top: 4px; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.qchips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* item picker */
.pick-in { position: relative; }
.sugg { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 236px; overflow-y: auto; background: var(--surface); }
.sugg:empty { display: none; }
.sugg button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 14px; border: 0; background: transparent; text-align: left; color: var(--text);
}
.sugg button + button { border-top: 1px solid var(--line); }
.sugg button:hover, .sugg button:active { background: var(--surface-2); }
.sugg button > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sugg .new { color: var(--primary); }
.sugg .new span { display: flex; align-items: center; gap: 6px; }
.picked { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.picked .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.picked .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked .s { font-size: 13px; color: var(--muted); }
.picked .ava { width: 36px; height: 36px; border-radius: 11px; }
.picked select { height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 8px; font-size: 14px; }

/* item sheet */
.item-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.item-head .main { flex: 1; min-width: 0; }
.item-head h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.item-head .muted { font-size: 14px; }
.stock { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); margin-bottom: 12px; }
.stock .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.stock.neg .v { color: var(--red); }
.stock.zero .v { color: var(--faint); }
.stock .r { text-align: right; }
.stock .v2 { font-size: 16px; font-weight: 700; }
.btn-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.btn-row3 .btn { padding: 0 8px; font-size: 15px; gap: 6px; }
.sub-h { font-size: 15px; color: var(--muted); margin: 16px 2px 8px; }

/* share */
.share-hero { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin: 6px 0 12px; }
.share-hero .i { width: 28px; height: 28px; }
.linkbox { display: flex; gap: 8px; margin-bottom: 10px; }
.linkbox .input { font-size: 14px; color: var(--muted); }
.linkbox .btn { flex: none; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.warn-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 6px 0 0 !important; }
.warn-note .i { width: 18px; height: 18px; margin-top: 1px; }
.join-name { font-size: 22px; font-weight: 800; margin: 0 0 6px !important; overflow-wrap: anywhere; }

/* menu */
.menu { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.mrow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 4px; border: 0; background: transparent; text-align: left; font-weight: 600; color: var(--text); border-radius: 10px; }
.mrow:hover { background: var(--surface-2); }
.mrow .i { color: var(--muted); }
.mrow.danger, .mrow.danger .i { color: var(--red); }
.mrow > span { display: flex; flex-direction: column; }
.mrow-sub { font-weight: 500; margin-top: 2px; }

/* note editor */
.ed-bar { display: flex; align-items: center; gap: 8px; margin: 4px -6px 4px -10px; }
.ed-bar .ed-status { flex: 1; text-align: center; }
.ed-title { border: 0; background: transparent; font-size: 22px; font-weight: 800; padding: 8px 0; outline: none; width: 100%; color: var(--text); }
.ed-body { flex: 1; min-height: 240px; border: 0; background: transparent; resize: none; outline: none; font-size: 17px; line-height: 1.5; padding: 4px 0 20px; width: 100%; color: var(--text); }
.ed-title::placeholder, .ed-body::placeholder { color: var(--faint); }

/* toasts */
#toasts {
  position: fixed; left: 0; right: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px;
  bottom: calc(24px + env(safe-area-inset-bottom)); padding: 0 16px; pointer-events: none;
}
/* in a project the toast sits above the floating + button, so «Отменить» is never tapped by mistake */
body.in-project #toasts { bottom: calc(var(--tabbar) + 84px + env(safe-area-inset-bottom)); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 560px;
  background: var(--toast); color: #fff; border-radius: 14px; padding: 12px 12px 12px 16px;
  box-shadow: var(--shadow-lg); font-size: 15px; font-weight: 550; animation: up .2s ease;
}
.toast button { border: 0; background: transparent; color: var(--toast-link); font-weight: 750; padding: 4px 6px; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 359px) {
  .pill span { display: none; }
  .pill { padding: 0 10px; }
  .total .big { font-size: 30px; }
}
