/* LABELY — дизайн-система Mini App.
   Идея: «ярлык». Тёмная: космос + зелёный неон. Светлая: молочный + сине-голубой неон; янтарный стикер; контракты — билеты с перфорацией; деньги — крупные числа. */

:root {
  --bg: #F8F7F2; --surface: #FFFFFF; --fill: #EFEEE8; --ink: #0B1530; --ink-2: #4A5878; --ink-3: #8390AB; --line: #E6E4DA;
  --brand: #0A6CFF; --brand-deep: #0A47D6; --brand-soft: #E0F0FF; --on-brand: #FFFFFF;
  --sticker: #FFB938; --sticker-soft: #FFF0CC; --sticker-ink: #6B4300;
  --ok: #1E8A45; --ok-soft: #DDF4E4; --bad: #D4372F; --bad-soft: #FFE5E1; --warn: #A15A06; --warn-soft: #FFEFD0;
  --info: #0A6CFF; --info-soft: #E0F0FF; --muted: #55617F; --muted-soft: #EDEBE3;
  --ink-card: #0B1F4D;
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow-1: 0 1px 2px rgba(16,32,31,.05), 0 8px 24px -12px rgba(16,32,31,.18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", var(--font);
  --safe-t: max(calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px)), env(safe-area-inset-top, 0px));
  --safe-b: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #07090C; --surface: #0F1319; --fill: #171C23; --ink: #E9EEF3; --ink-2: #9CA6B4; --ink-3: #6A7482; --line: #212832;
  --brand: #2BFF88; --brand-deep: #0F5A3A; --brand-soft: #10261D; --on-brand: #03110A;
  --sticker-soft: #2E2610; --sticker-ink: #E8C36A;
  --ok: #46D39A; --ok-soft: #10281F; --bad: #F0675F; --bad-soft: #35191A; --warn: #E3A33E; --warn-soft: #302410;
  --info: #62B5EE; --info-soft: #0F2234; --muted: #9CA6B4; --muted-soft: #1A1F27;
  --ink-card: #111823;
  --shadow-1: 0 0 0 1px rgba(255,255,255,.035), 0 10px 28px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
#root { max-width: 560px; margin: 0 auto; min-height: var(--tg-viewport-stable-height, 100dvh); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; border-radius: 8px; }

/* ---------- каркас ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(var(--safe-t) + 8px) 16px 8px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.brandmark { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wordmark { font-family: var(--font-num); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.sandbox-chip { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; padding: 6px 11px; border-radius: 999px; background: var(--sticker-soft); color: var(--sticker-ink); font-size: 12.5px; font-weight: 700; }
.sandbox-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--sticker); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sticker) 35%, transparent); }
.screen { padding: 6px 16px calc(112px + var(--safe-b)); }
.screen.with-bar { padding-bottom: calc(132px + var(--safe-b)); }
.title { padding: 8px 0 16px; }
.title h1 { font-family: var(--font-num); font-size: 31px; line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.title p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.section { margin-top: 26px; }
.section-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-h h2 { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.stack { display: grid; gap: 12px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-2); } .small { font-size: 13px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- карточки ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-1); transition: transform .14s ease; }
.card.tappable { cursor: pointer; } .card.tappable:active { transform: scale(.985); }
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-title { font-size: 17px; font-weight: 720; letter-spacing: -.01em; line-height: 1.25; }
.card-sub { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.card-foot { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-md); min-height: 48px; padding: 0 18px;
  font-weight: 680; font-size: 16px; cursor: pointer; transition: transform .12s ease, background .15s ease, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); } .btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.s-sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 12px; }
.btn.s-lg { min-height: 56px; font-size: 17px; border-radius: 16px; }
.btn.block { width: 100%; }
.k-primary { background: var(--brand); color: #fff; } :root[data-theme="dark"] .k-primary { color: var(--on-brand); }
.k-soft { background: var(--brand-soft); color: var(--brand); }
.k-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.k-danger { background: var(--bad); color: #fff; } :root[data-theme="dark"] .k-danger { color: #1a0509; }
.iconbtn { width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--fill); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.iconbtn:active { transform: scale(.94); }

/* ---------- чипы, статусы ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 680; line-height: 1.3; white-space: nowrap; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-ok { background: var(--ok-soft); color: var(--ok); } .t-bad { background: var(--bad-soft); color: var(--bad); }
.t-warn { background: var(--warn-soft); color: var(--warn); } .t-info { background: var(--info-soft); color: var(--info); }
.t-muted { background: var(--muted-soft); color: var(--muted); } .t-brand { background: var(--brand-soft); color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid transparent; background: var(--fill); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; }
.chip.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta .pill { background: var(--fill); color: var(--ink-2); font-weight: 620; }

/* ---------- аватары ---------- */
.avatar { display: inline-grid; place-items: center; flex: none; font-weight: 800; letter-spacing: -.02em; font-family: var(--font-num); }
.a-0 { background: #DCEBFF; color: #0A47D6; } .a-1 { background: #D8F3EC; color: #0B7A57; } .a-2 { background: #FFE2DC; color: #C23B22; }
.a-3 { background: #FFEBC6; color: #8F5700; } .a-4 { background: #DCEAFF; color: #1F5BC4; } .a-5 { background: #F3E3D4; color: #8A4B14; }
:root[data-theme="dark"] .a-0 { background: #13271F; color: #5BE0A0; } :root[data-theme="dark"] .a-1 { background: #162A2A; color: #7BCFC4; }
:root[data-theme="dark"] .a-2 { background: #2C1D1B; color: #E4A596; } :root[data-theme="dark"] .a-3 { background: #2A2416; color: #DDBB7E; }
:root[data-theme="dark"] .a-4 { background: #1A2433; color: #93B1DB; } :root[data-theme="dark"] .a-5 { background: #292219; color: #D8B58C; }

/* ---------- деньги ---------- */
.money { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.money .m-dec, .money .m-cur { font-weight: 700; opacity: .6; letter-spacing: -.01em; }
.m-xl .m-int { font-size: 46px; line-height: 1; } .m-xl .m-dec { font-size: 24px; } .m-xl .m-cur { font-size: 16px; }
.m-lg .m-int { font-size: 30px; line-height: 1.05; } .m-lg .m-dec { font-size: 18px; } .m-lg .m-cur { font-size: 13px; }
.m-md .m-int { font-size: 18px; } .m-md .m-dec { font-size: 13px; } .m-md .m-cur { font-size: 12px; }
.m-sm .m-int { font-size: 15px; } .m-sm .m-dec { font-size: 12px; } .m-sm .m-cur { font-size: 11px; }
.money.pos { color: var(--ok); } .money.neg { color: var(--bad); } .money.inverse { color: #fff; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; font-size: 15px; }
.kv span { color: var(--ink-2); } .kv b { font-weight: 650; text-align: right; word-break: break-word; }

/* ---------- сегменты ---------- */
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); background: var(--fill); border-radius: 16px; padding: 4px; margin-bottom: 16px; }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 12px; background: var(--surface);
  box-shadow: 0 1px 3px rgba(16,32,31,.14); transform: translateX(calc(var(--i) * 100%)); transition: transform .24s cubic-bezier(.3,.9,.3,1); }
.seg button { position: relative; z-index: 1; min-height: 40px; border: 0; background: none; font-weight: 650; font-size: 14.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { color: var(--ink); }
.seg em { font-style: normal; font-size: 11.5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; display: inline-grid; place-items: center; }

/* ---------- списки, прогресс ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row.tappable { cursor: pointer; }
.row-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.row-main { flex: 1; min-width: 0; } .row-t { font-weight: 650; font-size: 15.5px; } .row-s { color: var(--ink-2); font-size: 13px; margin-top: 1px; }
.row-r { text-align: right; flex: none; display: grid; gap: 4px; justify-items: end; }
.progress { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 4px; transition: width .5s ease; }
.progress > i.t-brand { background: var(--brand); } .progress > i.t-ok { background: var(--ok); } .progress > i.t-warn { background: var(--warn); } .progress > i.t-bad { background: var(--bad); } .progress > i.t-info, .progress > i.t-muted { background: var(--info); }

/* ---------- пустые состояния и скелетоны ---------- */
.empty { text-align: center; padding: 36px 20px; display: grid; justify-items: center; gap: 8px; }
.empty-ico { width: 64px; height: 64px; border-radius: 22px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.empty h3 { font-size: 18px; font-weight: 720; } .empty p { color: var(--ink-2); max-width: 30ch; font-size: 15px; } .empty .btn { margin-top: 10px; }
.skel { display: block; background: linear-gradient(100deg, var(--fill) 30%, color-mix(in srgb, var(--fill) 55%, var(--surface)) 50%, var(--fill) 70%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.skel-list { display: grid; gap: 12px; }

/* ---------- кошелёк ---------- */
.wallets { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.wallets::-webkit-scrollbar { display: none; }
.wallet { position: relative; flex: 0 0 calc(100% - 26px); scroll-snap-align: center; border-radius: var(--r-xl); padding: 20px; color: #fff; background: var(--brand-deep); overflow: hidden; min-height: 214px; display: flex; flex-direction: column; }
.wallet.company { background: var(--ink-card); }
.wallet::after { content: ""; position: absolute; right: -34px; bottom: -40px; width: 190px; height: 190px; opacity: .1; transform: rotate(-12deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4 13.4 20.6a2 2 0 0 1-2.8 0L3 13V4a1 1 0 0 1 1-1h9l7.6 7.6a2 2 0 0 1 0 2.8Z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.3'/%3E%3C/svg%3E") center/contain no-repeat; pointer-events: none; }
.wallet-top { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; opacity: .9; }
.wallet-label { margin-top: 18px; font-size: 13.5px; opacity: .72; }
.wallet .money { color: #fff; }
.wallet-stats { display: flex; gap: 22px; margin-top: 14px; font-size: 13px; }
.wallet-stats > div > span:first-child { display: block; opacity: .68; margin-bottom: 2px; } .wallet-stats .money { color: #fff; }
.wallet-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 8px; position: relative; z-index: 1; }
.wallet .btn.k-primary { background: #fff; color: var(--brand-deep); } .wallet.company .btn.k-primary { color: var(--ink-card); }
.wallet .btn.k-soft { background: rgba(255,255,255,.16); color: #fff; }
.wallet .btn.k-ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.wallet .btn.k-ghost:active { background: rgba(255,255,255,.24); }
.sec-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; cursor: pointer; font: inherit; color: var(--ink); }
.sec-toggle .h { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.sec-toggle .chev { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--fill); transition: transform .2s; }
.sec-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; } .dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; } .dots i.on { width: 18px; background: var(--brand); }

/* ---------- маркет ---------- */
.offer-top { display: flex; gap: 12px; align-items: center; }
.reward { margin-top: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.reward small { color: var(--ink-2); font-size: 12.5px; display: block; margin-bottom: 4px; }
.price-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.price-chip { padding: 8px 12px; border-radius: 12px; background: var(--fill); font-size: 13px; color: var(--ink-2); }
.price-chip b { display: block; color: var(--ink); font-size: 15px; font-family: var(--font-num); }
.budget { margin-top: 12px; } .budget-l { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }

/* ---------- контракты: билет ---------- */
.ticket { position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; cursor: pointer; transition: transform .14s ease; }
.ticket:active { transform: scale(.985); }
.ticket::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--stripe, var(--ink-3)); }
.ticket[data-tone="ok"] { --stripe: var(--ok); } .ticket[data-tone="bad"] { --stripe: var(--bad); } .ticket[data-tone="warn"] { --stripe: var(--warn); } .ticket[data-tone="info"] { --stripe: var(--info); }
.ticket-top { padding: 16px 16px 16px 20px; display: flex; gap: 12px; align-items: center; }
.ticket-cut { position: relative; border-top: 2px dashed var(--line); margin: 0 20px; }
.ticket-cut::before, .ticket-cut::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.ticket-cut::before { left: -30px; } .ticket-cut::after { right: -30px; }
.ticket-bot { padding: 14px 16px 16px 20px; }
.ticket-line { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.ticket .progress { margin-top: 12px; } .ticket-note { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }

/* ---------- контракт: лента сделки ---------- */
.hero-ticket { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.hero-top { padding: 20px 20px 18px; }
.hero-top .pill { margin-bottom: 12px; }
.hero-top h1 { font-family: var(--font-num); font-size: 25px; line-height: 1.12; font-weight: 800; letter-spacing: -.025em; }
.hero-parties { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.hero-parties .arrow { color: var(--ink-3); }
.hero-bot { padding: 18px 20px 20px; }
.rail { display: grid; grid-template-columns: repeat(4, 1fr); margin: 4px 0 0; }
.rail-step { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12px; font-weight: 640; color: var(--ink-3); }
.rail-step::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; border-radius: 2px; background: var(--fill); }
.rail-step:first-child::before { display: none; }
.rail-step.done::before, .rail-step.now::before, .rail-step.warn::before, .rail-step.bad::before { background: var(--ok); }
.rail-node { position: relative; z-index: 1; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--ink-3); font-size: 12px; font-weight: 800; }
.rail-step.done { color: var(--ink); } .rail-step.done .rail-node { background: var(--ok); color: #fff; }
.rail-step.now { color: var(--ink); } .rail-step.now .rail-node { background: var(--brand); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 22%, transparent); animation: pulse 2s ease-in-out infinite; }
.rail-step.warn { color: var(--ink); } .rail-step.warn .rail-node { background: var(--warn); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--warn) 22%, transparent); }
.rail-step.bad { color: var(--ink); } .rail-step.bad .rail-node { background: var(--bad); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 22%, transparent); }
:root[data-theme="dark"] .rail-step .rail-node { color: var(--on-brand); } :root[data-theme="dark"] .rail-step.todo .rail-node { color: var(--ink-3); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 8%, transparent); } }
.hint { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); margin-top: 12px; font-size: 14.5px; }
.hint .ico { flex: none; margin-top: 1px; } .hint b { display: block; margin-bottom: 2px; font-size: 15px; }
.hint.t-info, .hint.t-ok, .hint.t-warn, .hint.t-bad, .hint.t-brand { color: var(--ink); }
.hint.t-info .ico { color: var(--info); } .hint.t-ok .ico { color: var(--ok); } .hint.t-warn .ico { color: var(--warn); } .hint.t-bad .ico { color: var(--bad); } .hint.t-brand .ico { color: var(--brand); }
.split { display: flex; height: 14px; gap: 3px; border-radius: 7px; overflow: hidden; margin: 12px 0 10px; }
.split i { display: block; min-width: 4px; } .split .s-perf { background: var(--brand); } .split .s-fee { background: var(--sticker); } .split .s-ref { background: var(--ink-3); }
.legend { display: grid; gap: 6px; } .legend div { display: flex; align-items: center; gap: 8px; font-size: 14.5px; } .legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .l-perf { background: var(--brand); } .legend .l-fee { background: var(--sticker); } .legend .l-ref { background: var(--ink-3); }
.legend span { flex: 1; color: var(--ink-2); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: -7px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline li.ok::after { border-color: var(--ok); } .timeline li.bad::after { border-color: var(--bad); } .timeline li.warn::after { border-color: var(--warn); }
.timeline b { font-size: 15px; display: block; } .timeline small { color: var(--ink-2); font-size: 12.5px; }
.tools { border: 1.5px dashed var(--sticker); background: var(--sticker-soft); color: var(--sticker-ink); border-radius: var(--r-lg); padding: 14px 16px; margin-top: 12px; }
.tools h3 { font-size: 15px; display: flex; gap: 8px; align-items: center; margin-bottom: 4px; } .tools p { font-size: 13px; opacity: .85; margin-bottom: 10px; }
.tools .btn.k-ghost { background: var(--surface); color: var(--ink); box-shadow: none; }

/* ---------- панель действий и таб-бар ---------- */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.actionbar-in { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; }
.actionbar-in .btn.k-primary, .actionbar-in .btn.k-danger { flex: 1; }
.tabbar-wrap { position: fixed; left: 0; right: 0; bottom: calc(10px + var(--safe-b)); display: flex; justify-content: center; z-index: 30; pointer-events: none; }
.tabbar { pointer-events: auto; width: min(536px, calc(100% - 24px)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 6px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 10px 30px -12px rgba(20,26,51,.3); }
.tabbar button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0 7px; border: 0; background: none; border-radius: 20px; color: var(--ink-3); font-size: 11.5px; font-weight: 650; cursor: pointer; transition: background .2s, color .2s; }
.tabbar button.on { background: var(--brand-soft); color: var(--brand); }
.tabbar .badge { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 17px; height: 17px; border-radius: 9px; padding: 0 4px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

/* ---------- формы и шторки ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(4,14,15,.58); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--surface); border-radius: 28px 28px 0 0; padding: 8px 20px calc(20px + var(--safe-b)); animation: slideup .3s cubic-bezier(.2,.9,.3,1); }
.grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 6px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; } .sheet-h h2 { font-size: 21px; font-weight: 780; letter-spacing: -.02em; }
.sheet-desc { color: var(--ink-2); margin: -4px 0 14px; font-size: 15px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.7fr; gap: 10px; margin-top: 20px; } .sheet-actions .btn { min-height: 54px; }
.field { margin-top: 14px; } .field label { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--fill); border: 1.5px solid transparent; border-radius: var(--r-md); padding: 0 14px; min-height: 52px; outline: none; transition: border-color .15s, background .15s; appearance: none; -webkit-appearance: none; }
.field textarea { padding: 14px; min-height: 96px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); background: var(--surface); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.amount, .select { position: relative; } .amount input { padding-right: 62px; font-family: var(--font-num); font-weight: 700; font-size: 20px; }
.suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 700; font-size: 14px; pointer-events: none; }
.select svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-3); } .select select { padding-right: 40px; }
.hint { }
small.hint { display: block; margin-top: 6px; color: var(--ink-3); font-size: 12.5px; }
@keyframes fade { from { opacity: 0; } } @keyframes slideup { from { transform: translateY(40px); opacity: .4; } }
.toast { position: fixed; top: calc(var(--safe-t) + 12px); left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 8px; max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 620; background: var(--ink); color: var(--bg); box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); animation: drop .3s cubic-bezier(.2,.9,.3,1); }
.toast.err { background: var(--bad); color: #fff; } .toast svg { flex: none; }
@keyframes drop { from { transform: translate(-50%, -20px); opacity: 0; } }

/* ---------- вход ---------- */
.splash { min-height: var(--tg-viewport-stable-height, 100dvh); display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 24px) 20px 40px; }
.splash-logo { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 28px; background: var(--brand-deep); transform: rotate(-6deg); box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--brand) 70%, transparent); }
.splash h1 { font-family: var(--font-num); font-size: 44px; letter-spacing: -.04em; font-weight: 850; margin-top: 22px; line-height: 1; }
.splash p.lead { margin-top: 12px; font-size: 17px; color: var(--ink-2); max-width: 30ch; }
.splash .card { margin-top: 28px; }
.quick { display: grid; gap: 8px; margin-top: 12px; }
.quick button { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--fill); border: 0; cursor: pointer; text-align: left; }
.quick b { display: block; font-size: 15.5px; } .quick span.s { color: var(--ink-2); font-size: 13px; }

/* ---------- менеджер ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-1); }
.stat .l { color: var(--ink-2); font-size: 13px; display: flex; align-items: center; gap: 6px; } .stat .v { margin-top: 6px; font-family: var(--font-num); font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.stat.wide { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.queue-kind { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.queue-kind .row-ico { width: 36px; height: 36px; border-radius: 12px; }
.sim { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- v0.4: сортировка, колокольчик, обучение, правила, аналитика ---------- */
.chip.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; white-space: nowrap; }
.sortbar { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.sortbar::-webkit-scrollbar { display: none; }
.sortbar-ico { color: var(--ink-3); display: grid; place-items: center; flex: none; }
.iconbtn.top { position: relative; width: 38px; height: 38px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; border: 0; cursor: pointer; color: var(--ink); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif:last-child { border-bottom: 0; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 7px; }
.notif.read .dot { background: transparent; }
.notif b { display: block; font-size: 15px; } .notif span.t { color: var(--ink-2); font-size: 14px; display: block; margin-top: 2px; } .notif small { color: var(--ink-3); font-size: 12px; }
.guide { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; padding: calc(var(--safe-t) + 16px) 20px calc(var(--safe-b) + 20px); }
.guide-skip { align-self: flex-end; border: 0; background: none; color: var(--ink-2); font-weight: 650; padding: 8px; cursor: pointer; }
.guide-body { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; gap: 14px; padding: 0 6px; }
.guide-ico { width: 104px; height: 104px; border-radius: 32px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.guide-body h2 { font-family: var(--font-num); font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.guide-body p { color: var(--ink-2); font-size: 16px; max-width: 420px; }
.dots { display: flex; justify-content: center; gap: 7px; margin: 10px 0 18px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .2s, background .2s; } .dots i.on { width: 24px; background: var(--brand); }
.how { display: grid; gap: 12px; }
.how-step { display: flex; gap: 12px; align-items: flex-start; }
.how-step .n { flex: none; width: 28px; height: 28px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.how-step b { display: block; font-size: 15px; } .how-step span { color: var(--ink-2); font-size: 14px; }
details.rule { border-bottom: 1px solid var(--line); padding: 12px 0; } details.rule:last-child { border-bottom: 0; }
details.rule summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
details.rule summary::-webkit-details-marker { display: none; }
details.rule p, details.rule li { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; } details.rule ul { margin: 6px 0 0; padding-left: 18px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-1); }
.metric .l { color: var(--ink-2); font-size: 12.5px; } .metric .v { font-family: var(--font-num); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-top: 2px; }
.countdown { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; }
.hist { display: grid; gap: 2px; }
.preview { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: 14px; font-weight: 600; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 14px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 640px) { body { background: color-mix(in srgb, var(--bg) 80%, var(--ink) 4%); } }

/* ---------- неоновые акценты ---------- */
.k-primary { box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
:root[data-theme="dark"] .k-primary { box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--brand) 45%, transparent); }
:root:not([data-theme="dark"]) .wallet { background: linear-gradient(135deg, #0A47D6, #0A8CFF 70%, #00C8FF); }
:root:not([data-theme="dark"]) .wallet.company { background: linear-gradient(135deg, #0B1F4D, #0A47D6); }
:root[data-theme="dark"] .wallet { background: linear-gradient(135deg, #0C1A15, #123628); box-shadow: 0 0 0 1px rgba(43,255,136,.18), 0 14px 30px -18px rgba(0,0,0,.8); }
:root[data-theme="dark"] .wallet.company { background: linear-gradient(135deg, #0D131B, #16202C); box-shadow: 0 0 0 1px rgba(98,181,238,.16), 0 14px 30px -18px rgba(0,0,0,.8); }
:root[data-theme="dark"] .wallet .btn.k-primary { background: #2BFF88; color: #03110A; }
:root:not([data-theme="dark"]) .wallet .btn.k-primary { color: #0A47D6; } :root:not([data-theme="dark"]) .wallet.company .btn.k-primary { color: #0B1F4D; }

/* ---------- профиль-теги и закреп ---------- */
.tags { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 680; line-height: 1.5; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.tag.t-prem { background: color-mix(in srgb, var(--sticker) 28%, transparent); color: var(--sticker-ink); }
.tag.t-med { background: var(--brand-soft); color: var(--brand); }
.tag.t-deal { background: var(--ok-soft); color: var(--ok); }
.tag.t-off { opacity: .75; } .tag.t-flag { padding: 2px 7px; }
.pline { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px 0 0; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.pname { font-weight: 700; }
.card.hot { position: relative; box-shadow: 0 0 0 1.5px var(--brand), 0 0 22px -10px color-mix(in srgb, var(--brand) 55%, transparent); }
.hot-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; background: var(--brand); color: var(--on-brand); }
.tag.t-m { background: var(--info-soft); color: var(--info); } .tag.t-f { background: color-mix(in srgb, #ff4fa3 18%, transparent); color: #d4237f; }
:root[data-theme="dark"] .tag.t-f { color: #ff8cc6; }
.risk-flag { margin: 4px 0 0; font-size: 13.5px; color: var(--warn); font-weight: 600; }

/* ---------- теги размещения кампании: цветная обводка по смыслу ---------- */
:root { --tg-nick: #E5640A; --tg-user: #0A8F5B; --tg-desc: #D4237F; --tg-dur: #0A6CFF; --tg-prem: #B07900; --top: #F2C230; }
:root[data-theme="dark"] { --tg-nick: #E8A63A; --tg-user: #3FE08F; --tg-desc: #E57BA8; --tg-dur: #6BB6E8; --tg-prem: #E6C54A; --top: #F2C230; }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ptag { --c: var(--brand); display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.5;
  border: 1.5px solid var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); white-space: nowrap; }
.ptag.p-NICKNAME { --c: var(--tg-nick); } .ptag.p-USERNAME { --c: var(--tg-user); } .ptag.p-DESCRIPTION { --c: var(--tg-desc); }
.ptag.p-DUR { --c: var(--tg-dur); } .ptag.p-PREM { --c: var(--tg-prem); } .ptag.p-LOW { --c: var(--warn); } .ptag.p-FULL { --c: var(--ink-3); }
.card.top { position: relative; box-shadow: 0 0 0 1.5px #F2C230, 0 0 18px -2px rgba(255, 200, 40, .5); }
.top-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; background: linear-gradient(135deg, #FFE98A 0%, #F4B400 55%, #FFD866 100%); color: #3a2800; box-shadow: 0 0 12px rgba(255, 200, 40, .6); }
.tag-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pin-until { font-size: 12.5px; color: var(--brand); font-weight: 700; margin-top: 4px; }
/* ---------- выбор часов закрепа ---------- */
.hours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.hour { padding: 9px 0; border-radius: 12px; border: 1.5px solid var(--line, rgba(128,128,128,.35)); background: transparent; color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.hour.busy { opacity: .35; text-decoration: line-through; cursor: not-allowed; } .hour.mine { border-color: var(--tg-dur); opacity: .8; }
.hour.off { opacity: .3; cursor: not-allowed; } .hour.sel { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.date-in { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line, rgba(128,128,128,.35)); background: transparent; color: var(--ink); font-size: 16px; }

/* ---------- переключатель (тумблер) ---------- */
.switch-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch-row label { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); } .switch-row .hint { grid-column: 1 / -1; }
.switch { width: 52px; height: 32px; border-radius: 999px; border: 0; padding: 3px; cursor: pointer; background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .18s; display: flex; align-items: center; }
.switch i { width: 26px; height: 26px; border-radius: 50%; background: var(--ink-3); transition: transform .18s, background .18s; }
.switch.on { background: var(--brand); box-shadow: none; } .switch.on i { transform: translateX(20px); background: var(--on-brand); }
.ptag.p-REQ { --c: var(--ink-2); } .ptag.p-REQ.bad { --c: var(--bad); }

/* ---- вкладки с прокруткой (админ-панель) */
.tabs-wrap { position: relative; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; background: var(--fill); border-radius: 16px; padding: 4px; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; scroll-snap-align: center; min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font-weight: 650; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.tabs em { font-style: normal; font-size: 11.5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; display: inline-grid; place-items: center; }
.tabs-wrap.fade-r .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); }
.tabs-wrap.fade-l .tabs { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 30px), transparent); }
.tabs-wrap.fade-l.fade-r .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }

/* ---- кейсы */
.ptag.p-CASE { --c: var(--brand); }
.casebox { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; margin-bottom: 14px; border-radius: 18px; border: 1px solid var(--brand); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; animation: boxGlow 2.8s ease-in-out infinite; }
.casebox-gift { font-size: 38px; line-height: 1; display: inline-block; animation: giftPulse 2.8s ease-in-out infinite; }
@keyframes giftPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes boxGlow { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 18px -4px var(--brand); } }
.case { display: block; }
.cwin { position: relative; overflow: hidden; border-radius: 16px; background: var(--fill); padding: 14px 0; margin-bottom: 14px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.cmark { position: absolute; z-index: 2; left: 50%; top: 4px; bottom: 4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.ctrack { display: flex; gap: 10px; will-change: transform; }
.ctrack.go { transition-property: transform; transition-timing-function: cubic-bezier(.12, .62, .08, 1); }
.ctile { flex: 0 0 auto; height: 112px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; text-align: center; }
.ctile-emoji { line-height: 1; display: grid; place-items: center; height: 56px; }
.ctile-title { font-size: 12.5px; font-weight: 650; line-height: 1.2; color: var(--ink-2); }
.ctile.t1 { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.ctile.t2 { border-color: color-mix(in srgb, var(--brand) 70%, var(--line)); }
.ctile.t3 { border-color: var(--brand); box-shadow: 0 0 14px -6px var(--brand); }
.ctile.tg { border-color: #c79bff; box-shadow: 0 0 14px -6px #c79bff; }
.cresult { text-align: center; padding: 6px 0 4px; animation: pop .5s ease both; }
.cres-emoji { font-size: 54px; line-height: 1.1; }
.cres-title { font-weight: 750; font-size: 18px; margin: 4px 0; }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .casebox, .casebox-gift { animation: none; } }

/* ---- сворачиваемые разделы, кейс */
.fold-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 18px; font-weight: 750; letter-spacing: -.01em; color: var(--ink); cursor: pointer; text-align: left; }
.fold-btn .chev { width: 8px; height: 8px; border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s; flex: none; }
.section.folded .fold-btn .chev { transform: rotate(-45deg); }
.section.folded .section-h { margin-bottom: 4px; }
.case-actions { display: flex; justify-content: center; padding: 6px 0 2px; }
.case-actions .btn { min-width: 220px; }
.gift-badge { display: inline-block; font-size: 10.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; background: #c79bff; color: #1a0f2a; margin-bottom: 3px; }
.card-sub, .card-title { overflow-wrap: anywhere; }

.sortline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 6px; flex-wrap: wrap; }
.sortline .sortbar, .sortline > div:last-child { margin: 0; }

.tag.t-gender { padding: 3px 8px; display: inline-flex; align-items: center; justify-content: center; }
.tag.t-gender svg { display: block; }

/* арбитражный чат */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding: 4px 0; }
.bub { max-width: 86%; align-self: flex-start; background: var(--fill); border-radius: 16px; padding: 8px 12px; }
.bub.me { align-self: flex-end; background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.bub.r-manager { border: 1.5px solid var(--brand); }
.bub-h { font-size: 12px; color: var(--muted, #8a8a90); margin-bottom: 2px; }
.bub-b { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.chat-in { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-in textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--fill); border: 1.5px solid transparent; border-radius: 14px; padding: 10px 12px; min-height: 64px; resize: vertical; outline: none; }
.chat-in textarea:focus { border-color: var(--brand); }

/* выбор дня закрепа без системного календаря */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 0 -4px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 auto; min-width: 58px; padding: 8px 6px; border-radius: 14px; border: 1.5px solid var(--line, rgba(128,128,128,.35)); background: transparent; color: var(--ink); text-align: center; cursor: pointer; font: inherit; }
.day b { display: block; font-size: 17px; } .day span { font-size: 12px; opacity: .7; }
.day.sel { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.bub.note { background: color-mix(in srgb, #f5c542 22%, var(--surface)); border: 1.5px dashed #d9a700; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 6px; }
.audit-json { margin-top: 6px; } .audit-json pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--fill); border-radius: 10px; padding: 8px; margin: 4px 0; max-height: 220px; overflow: auto; }
