/* Веб-версия O. Message. Оформление повторяет приложение (app/lib/ui): те же цвета, размеры, шрифт Onest и значки Phosphor. */
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/onest-cyrillic-wght-normal.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-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/onest-latin-wght-normal.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; }
@font-face { font-family: PhR; font-display: block; src: url(/web/icons/ph-r.woff2) format("woff2"); }
@font-face { font-family: PhB; font-display: block; src: url(/web/icons/ph-b.woff2) format("woff2"); }
@font-face { font-family: PhF; font-display: block; src: url(/web/icons/ph-f.woff2) format("woff2"); }

/* Цвета — OColors из app/lib/ui/theme.dart. */
:root {
  --accent: #2563eb; --accent2: #7155f5; --blue: var(--accent); --violet: var(--accent2); --logo: #2660e0;
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
  --bg: #fff; --canvas: #f3f5fa; --surface: #fff; --alt: #f3f5fa; --hover: #f1f4f9; --line: #e7eaf2;
  --text: #0b1030; --text2: #5f6b85; --text3: #98a1b6; --danger: #e5484d; --success: #18a058;
  --soft: color-mix(in srgb, var(--accent) 10%, #fff); --chat: #eef2f9; --pattern: rgba(11, 16, 48, .05);
  --in: #fff; --out: var(--accent); --out2: var(--accent2); --meta-in: #8d96ab; --meta-out: rgba(255, 255, 255, .74);
  --service: rgba(255, 255, 255, .88); --service-text: #5f6b85; --badge-muted: #b6bdcc; --online: #22c55e; --field: #f1f4f9;
  --seg: #e7ebf3; --seg-on: #fff; --sh: 11, 16, 48; --sha: .1; --menu: #fff; --toast: #0b1030; --dim: rgba(5, 8, 28, .42);
  --shadow: 0 20px 50px -22px rgba(11, 16, 48, .3); --ease: cubic-bezier(.16, 1, .3, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --card-shadow: 0 10px 28px -6px rgba(var(--sh), var(--sha)), 0 1px 3px rgba(var(--sh), calc(var(--sha) * .5));
  --pop-shadow: 0 14px 36px -8px rgba(var(--sh), calc(var(--sha) * 1.8)), 0 1px 4px rgba(var(--sh), calc(var(--sha) * .7));
  --glow: 0 9px 22px -6px color-mix(in srgb, var(--accent) 34%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #4f86ff; --accent2: #8e78ff; --logo: #4f86ff;
    --bg: #0b0e17; --canvas: #080a11; --surface: #11141f; --alt: #1a1e2c; --hover: #171b28; --line: #222738;
    --text: #f1f3f9; --text2: #9aa3ba; --text3: #626b83; --danger: #ff6166; --success: #3dd68c;
    --soft: color-mix(in srgb, var(--accent) 17%, #0b0e17); --chat: #070910; --pattern: rgba(255, 255, 255, .032);
    --in: #1a1e2c; --out: #2561e4; --out2: #4525e4; --meta-in: #7e879e; --service: rgba(26, 30, 44, .86); --service-text: #c3c9d9;
    --badge-muted: #464d62; --online: #3dd68c; --field: #181c29; --seg: #11141f; --seg-on: #1a1e2c; --sh: 0, 0, 0; --sha: .5;
    --menu: #1a1e2c; --toast: #2a3044; --dim: rgba(5, 8, 28, .62); --shadow: 0 20px 50px -22px #000; color-scheme: dark; }
}
:root[data-theme="dark"] { --accent: #4f86ff; --accent2: #8e78ff; --logo: #4f86ff;
  --bg: #0b0e17; --canvas: #080a11; --surface: #11141f; --alt: #1a1e2c; --hover: #171b28; --line: #222738;
  --text: #f1f3f9; --text2: #9aa3ba; --text3: #626b83; --danger: #ff6166; --success: #3dd68c;
  --soft: color-mix(in srgb, var(--accent) 17%, #0b0e17); --chat: #070910; --pattern: rgba(255, 255, 255, .032);
  --in: #1a1e2c; --out: #2561e4; --out2: #4525e4; --meta-in: #7e879e; --service: rgba(26, 30, 44, .86); --service-text: #c3c9d9;
  --badge-muted: #464d62; --online: #3dd68c; --field: #181c29; --seg: #11141f; --seg-on: #1a1e2c; --sh: 0, 0, 0; --sha: .5;
  --menu: #1a1e2c; --toast: #2a3044; --dim: rgba(5, 8, 28, .62); --shadow: 0 20px 50px -22px #000; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.45 Onest, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow: hidden; position: relative; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--blue); }
#root { height: 100%; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text2); } .small { font-size: 13px; } .center { text-align: center; } .accent { color: var(--blue); }

.mark { width: 30px; height: 30px; flex: none; }
.mark { fill: var(--logo); }
.ico { display: inline-grid; place-items: center; width: 22px; height: 22px; }
.ico svg { width: 100%; height: 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 14px;
  background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 12px 26px -12px rgba(37, 99, 235, .7); transition: transform .25s var(--spring); }
.btn:active { transform: scale(.96); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text2); transition: background .15s; }
.icon-btn:hover { background: var(--alt); }

/* Загрузка */
.splash { height: 100%; display: grid; place-items: center; }
/* «Волна» (выбор владельца, вариант 6 из design/logo-animations): от точки знака расходятся круги. */
.spin { width: 72px; height: 72px; overflow: visible; }
.spin .ping { fill: none; stroke: var(--logo); stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: 0;
  transform-origin: 90.71px 91.74px; animation: ping 1s cubic-bezier(.33, 1, .68, 1) infinite; }
.spin .p2 { animation-delay: .32s; }
.spin .dot { transform-origin: 90.71px 91.74px; animation: pulse 1s ease-in-out infinite; }
@keyframes ping { 0% { opacity: .6; transform: scale(1); } 90%, 100% { opacity: 0; transform: scale(4.3); } }
@keyframes pulse { 0%, 30%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } }
.skeleton { background: linear-gradient(90deg, var(--alt) 25%, var(--canvas) 50%, var(--alt) 75%); background-size: 300% 100%; animation: shimmer 1.4s infinite; border-radius: 22px; }
@keyframes shimmer { to { background-position: -150% 0; } }
.qr-skel { width: 100%; aspect-ratio: 1; } .skeleton.line { height: 16px; width: 60%; margin: 18px auto 0; border-radius: 8px; }
.dots { display: inline-flex; gap: 4px; margin-right: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: hop 1.1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Экран входа */
.login { position: relative; height: 100%; overflow: auto; display: grid; grid-template-columns: 1fr 420px; gap: 56px; align-items: center;
  padding: 40px max(24px, calc((100vw - 1100px) / 2)); }
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--canvas); }
.aurora i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(80px); opacity: .28; }
.aurora i:nth-child(1) { background: var(--blue); left: -18vmax; top: -22vmax; animation: drift 20s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: var(--violet); right: -20vmax; top: 10vmax; animation: drift 24s ease-in-out infinite alternate-reverse; }
.aurora i:nth-child(3) { background: #38bdf8; left: 25vmax; bottom: -30vmax; opacity: .14; animation: drift 28s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(7vmax, 5vmax) scale(1.1); } }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.login h1 .grad { white-space: nowrap; }
.login h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -.04em; margin: 36px 0 16px; font-weight: 800; }
.login .lead { color: var(--text2); font-size: 17px; max-width: 480px; margin: 0 0 26px; }
.login .steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; max-width: 480px; }
.login .steps li { display: flex; gap: 12px; align-items: flex-start; }
.login .steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 13px; }
.login .steps span { padding-top: 3px; }
.login-intro > * { animation: rise .7s var(--ease) both; }
.login-intro > *:nth-child(2) { animation-delay: .06s; } .login-intro > *:nth-child(3) { animation-delay: .12s; }
.login-intro > *:nth-child(4) { animation-delay: .18s; } .login-intro > *:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.login-card { background: var(--surface); border-radius: 32px; padding: 26px; box-shadow: var(--shadow); animation: rise .8s .15s var(--ease) both; min-height: 300px; }
.qr { border-radius: 26px; padding: 6px; box-shadow: 0 18px 40px -16px rgba(37, 99, 235, .45); background: #fff; animation: zoom .5s var(--ease); }
.qr svg { display: block; width: 100%; height: auto; }
@keyframes zoom { from { opacity: 0; transform: scale(.94); } }
.emoji { display: flex; justify-content: center; gap: 10px; margin: 8px 0 12px; }
.emoji span { width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px; border-radius: 18px; background: var(--soft);
  animation: popin .45s var(--spring) both; }
@keyframes popin { from { opacity: 0; transform: scale(.5) translateY(8px); } }
.login-card .muted.small { margin-top: 14px; }
.confirm { text-align: center; padding: 24px 6px; }
.confirm h2 { margin: 14px 0 8px; font-size: 24px; letter-spacing: -.03em; }
.waiting { display: inline-flex; align-items: center; margin-top: 20px; color: var(--text2); font-weight: 600; }
.fail { text-align: center; padding: 26px 10px; display: grid; gap: 10px; justify-items: center; }
.fail.full { height: 100%; align-content: center; }
.fail b { font-size: 19px; } .fail p { margin: 0 0 8px; color: var(--text2); }
/* Вход через Telegram: кнопка под QR-кодом (на телефоне — над ним) и ожидание «Запустить» */
.login .steps-title { margin: 0 0 12px; font-weight: 700; color: var(--text); max-width: 480px; }
.login .steps-title[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text3); font-size: 13px; margin: 18px 0 14px; text-align: center; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tgbtn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 22px; border-radius: 28px;
  background: linear-gradient(180deg, #2aabee, #1f97d4); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none;
  box-shadow: 0 14px 28px -14px rgba(31, 151, 212, .85), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .25s var(--spring), box-shadow .25s; }
.tgbtn:hover { transform: translateY(-1px); box-shadow: 0 18px 32px -14px rgba(31, 151, 212, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tgbtn:active { transform: scale(.97); }
.tgbtn:focus-visible { outline: 3px solid color-mix(in srgb, #2aabee 55%, transparent); outline-offset: 3px; }
.tgbtn i { display: grid; place-items: center; } .tgbtn svg { width: 26px; height: 26px; display: block; }
.tgbtn.tgbtn-soft { height: 46px; margin-top: 18px; font-size: 15px; background: color-mix(in srgb, #2aabee 12%, var(--surface)); color: #168acd; box-shadow: none; }
.tgbtn.tgbtn-soft svg { width: 22px; height: 22px; }
.login-card .tgnote { margin-top: 10px; }
.tgwait { text-align: center; padding: 14px 4px 4px; display: grid; justify-items: center; }
.tgwait h2 { margin: 18px 0 8px; font-size: 24px; letter-spacing: -.03em; }
.tgwait p { margin: 0; max-width: 320px; }
.tgwait .waiting { margin-top: 16px; }
.tgmark { position: relative; width: 78px; height: 78px; color: #229ed9; animation: popin .45s var(--spring) both; }
.tgmark svg { width: 100%; height: 100%; display: block; }
.tgmark::before, .tgmark::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #2aabee; opacity: 0; animation: tgping 2s ease-out infinite; }
.tgmark::after { animation-delay: 1s; }
@keyframes tgping { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.75); } }
.tgqr { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; text-align: left; margin-top: 18px; padding: 12px; border-radius: 20px; background: var(--alt); width: 100%; box-sizing: border-box; }
.tgqr .qr { padding: 3px; border-radius: 14px; box-shadow: none; animation: none; }
.tgqr small { font-size: 13px; line-height: 1.4; }
.linkbtn { margin-top: 14px; padding: 8px 14px; border: 0; background: none; color: var(--text2); font: inherit; font-weight: 600; cursor: pointer; border-radius: 10px; }
.linkbtn:hover { color: var(--text); background: var(--hover); }
@media (prefers-reduced-motion: reduce) { .tgmark::before, .tgmark::after { animation: none; } }

/* ================= Приложение: каркас, как в app/lib/ui (телефон — одна панель, широкое окно — две) ================= */
:root { --pat: var(--pat-l); --bub-sh: 0 1.5px 5px rgba(11, 16, 48, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pat: var(--pat-d); --bub-sh: none; } }
:root[data-theme="dark"] { --pat: var(--pat-d); --bub-sh: none; }
body { font-size: 14.5px; line-height: 1.43; -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.oi { font-family: PhR; font-style: normal; font-weight: 400; font-size: 24px; line-height: 1; display: inline-block; flex: none; letter-spacing: 0;
  -webkit-font-smoothing: antialiased; text-rendering: auto; user-select: none; -webkit-user-select: none; }
.oi-b { font-family: PhB; } .oi-f { font-family: PhF; }
.ico { display: inline-grid; place-items: center; }
.accent { color: var(--accent) !important; }

.app { height: 100%; display: grid; grid-template-columns: clamp(300px, 33%, 400px) minmax(0, 1fr); position: relative; overflow: hidden; overflow: clip; background: var(--surface); } /* clip: фокус или прокрутка к кнопке во время въезда экрана не сдвигают всё вбок */
.side { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); position: relative; }
.side.canvas { background: var(--canvas); }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; animation: pagein .38s var(--ease); }
@keyframes pagein { from { opacity: 0; transform: translateY(1.2%); } }
.top { height: 62px; flex: none; display: flex; align-items: center; padding: 0 6px 0 18px; }
.top .ttl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 20.5px; line-height: 1.2; font-weight: 800; letter-spacing: -.6px; white-space: nowrap; }
.top .ttl.big { font-size: 21px; }
.top .ttl .mark { width: 26px; height: 26px; }
.top.search { padding: 0 12px 0 4px; }
.ib { width: 48px; height: 48px; flex: none; display: grid; place-items: center; color: var(--text2); position: relative; }
.ib::before { content: ""; position: absolute; inset: 4px; border-radius: 12px; transition: background .14s; }
.ib:hover::before { background: color-mix(in srgb, var(--text) 5%, transparent); } .ib:active::before { background: color-mix(in srgb, var(--text) 8%, transparent); }
.ib .oi { position: relative; } .ib.dark { color: var(--text); } .ib.acc { color: var(--accent); }
.sf { flex: 1; min-width: 0; height: 44px; border-radius: 14px; background: var(--field); display: flex; align-items: center; }
.sf > .oi { width: 44px; text-align: center; font-size: 20px; color: var(--text3); }
.sf input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 15.5px Onest, sans-serif; color: var(--text); padding: 0 12px 0 0; }
.sf input::placeholder, .fwrap textarea::placeholder, .inp::placeholder { color: var(--text3); }
.sf-pad { padding: 4px 14px 8px; display: flex; }

/* Вкладки над личными чатами (FolderTabs) и переключатель разделов (SegmentTabs) */
.ftabs { height: 44px; flex: none; display: flex; overflow-x: auto; padding: 0 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); scrollbar-width: none; }
.ftabs::-webkit-scrollbar, .games::-webkit-scrollbar { display: none; }
.ftab { position: relative; flex: none; display: flex; align-items: center; padding: 0 11px; border-radius: 12px; font-size: 15px; letter-spacing: -.1px; font-weight: 500; color: var(--text2); white-space: nowrap; }
.ftab.on { font-weight: 700; color: var(--accent); }
.ftab::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 0; height: 3px; transform: translateX(-50%); border-radius: 3px 3px 0 0; background: var(--grad); transition: width .24s var(--ease); }
.ftab.on::after { width: 28px; } .ftab.arch { padding: 0 13px; } .ftab.arch.on::after { width: 24px; } .ftab.arch .oi { font-size: 21px; }
.ftab em { margin-left: 6px; min-width: 19px; height: 19px; padding: 0 5.5px; border-radius: 10px; background: var(--badge-muted); color: #fff; font: normal 700 11.5px/19px Onest, sans-serif; text-align: center; }
.ftab.on em { background: var(--accent); }
.seg { height: 48px; flex: none; margin: 0 12px 8px; padding: 4px; border-radius: 16px; background: var(--seg); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.seg.m14 { margin: 0 14px 8px; }
.seg button { border-radius: 12px; font-size: 13.5px; font-weight: 500; color: var(--text2); transition: background .24s, color .14s; }
.seg button.on { font-weight: 600; color: var(--text); background: var(--seg-on); box-shadow: 0 2px 8px rgba(var(--sh), calc(var(--sha) * .8)); }
.seg .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 5px; transform: translateY(-6px); }

/* Список чатов (ChatTile) */
.list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 0 92px; overscroll-behavior: contain; }
.list.flat { padding-bottom: 28px; }
.tile { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 14px; position: relative; }
.tile.enter { animation: rise .46s var(--ease) both; }
@media (hover: hover) { .tile:hover, .urow:hover, .crow:hover, .mrow:hover { background: color-mix(in srgb, var(--text) 4%, transparent); } }
.tile:active { background: color-mix(in srgb, var(--text) 7%, transparent); }
.tile.sel { background: var(--soft); }
.tile-b { flex: 1; min-width: 0; }
.tile-1 { display: flex; align-items: center; }
.tile-1 b { font-size: 16px; line-height: 1.25; font-weight: 600; letter-spacing: -.15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-1 .kind { font-size: 15px; color: var(--text3); margin-right: 5px; } .tile-1 .ver { font-size: 15px; color: var(--accent); margin-left: 4px; } .tile-1 .mut { font-size: 14px; color: var(--text3); margin-left: 5px; }
.tile-1 .sp { flex: 1; min-width: 8px; }
.tile-1 time { flex: none; font-size: 12.5px; color: var(--text3); } .tile-1 time.hot { color: var(--accent); font-weight: 600; }
.tk { font-size: 16px; color: var(--text3); margin-right: 4px; } .tk.read { color: var(--accent); }
.req { flex: none; margin-left: 6px; padding: 2px 7px; border-radius: 8px; background: var(--soft); color: var(--accent); font: 600 11.5px/1.2 Onest, sans-serif; }
.tile-2 { display: flex; align-items: center; margin-top: 4px; font-size: 14.5px; line-height: 1.43; color: var(--text2); }
.tile-2 .prev { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prev em { font-style: normal; color: var(--text); } .prev.typing { color: var(--accent); font-weight: 500; }
.tile-2 .pin { font-size: 15px; color: var(--text3); margin-left: 8px; }
.cb { flex: none; min-width: 22px; height: 22px; margin-left: 8px; padding: 0 6.5px; border-radius: 11px; background: var(--accent); color: #fff; font: normal 700 12.5px/22px Onest, sans-serif;
  text-align: center; font-variant-numeric: tabular-nums; }
.cb.muted { background: var(--badge-muted); }
.arch-ic { width: 54px; height: 54px; border-radius: 50%; background: var(--alt); display: grid; place-items: center; color: var(--text2); flex: none; } .arch-ic .oi { font-size: 25px; }

.av { position: relative; flex: none; border-radius: 50%; color: #fff; font-weight: 600; line-height: 1; letter-spacing: -.2px; display: grid; place-items: center; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0; transition: opacity .24s; } .av img.on { opacity: 1; }
.av.saved { background: var(--grad) !important; }
.av.online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: var(--dot, 14px); height: var(--dot, 14px); box-sizing: border-box; border-radius: 50%; background: var(--online);
  box-shadow: 0 0 0 2.2px var(--surface); animation: popin .38s var(--spring); }
.ring { flex: none; border-radius: 50%; background: var(--grad); padding: 2.5px; } .ring > i { display: block; border-radius: 50%; background: var(--surface); padding: 2.5px; }
.ring.big { padding: 3px; } .ring.big > i { padding: 3px; background: var(--canvas); }

.fab { position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 58px; height: 58px; border-radius: 20px; background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 9px 22px -6px color-mix(in srgb, var(--accent) 38%, transparent); transition: transform .26s var(--spring); }
.fab .oi { font-size: 26px; } .fab:active { transform: scale(.94); }
.fab.green { width: 56px; height: 56px; border-radius: 50%; background: var(--success); box-shadow: 0 3px 8px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .16); }

/* Нижняя панель (_BottomBar) */
.tabbar { flex: none; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); }
.tabbar button { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .26s var(--spring); }
.tabbar button:active { transform: scale(.92); }
.tabbar .pill { position: relative; width: 30px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: width .38s var(--ease), background .38s var(--ease); }
.tabbar .on .pill { width: 54px; background: var(--soft); }
.tabbar .oi { color: var(--text2); } .tabbar .on .oi { color: var(--accent); animation: tabpop .24s var(--spring); }
@keyframes tabpop { from { transform: scale(.7); } }
.tabbar span { margin-top: 4px; max-width: 100%; padding: 0 2px; font-size: 11.5px; line-height: 1.2; letter-spacing: -.2px; font-weight: 500; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabbar .on span { font-weight: 700; color: var(--accent); }
.tb { position: absolute; top: -6px; left: 33px; box-sizing: content-box; min-width: 9px; height: 15px; padding: 0 3px; border-radius: 10px; background: var(--accent); border: 2px solid var(--surface);
  color: #fff; font: normal 700 11px/15px Onest, sans-serif; text-align: center; animation: popin .38s var(--spring); }
.tb:empty { display: none; }

/* Карточки и строки (Group, MenuRow), заголовки разделов */
.grp { margin: 0 14px; background: var(--surface); border-radius: 20px; overflow: hidden; }
.grp + .grp, .pcard + .grp, .grp + .sect + .grp, .acts + .grp { margin-top: 14px; } .grp + .sect { margin-top: 0; }
.mrow { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 10px 16px; text-align: left; }
.mrow + .mrow::before { content: ""; position: absolute; left: 68px; right: 0; top: 0; height: 1px; background: color-mix(in srgb, var(--line) 80%, transparent); }
.bare > .mrow + .mrow::before { display: none; }
.itile { width: 36px; height: 36px; flex: none; border-radius: 10.8px; display: grid; place-items: center; background: color-mix(in srgb, var(--t) 12%, transparent); color: var(--t); }
.itile .oi { font-size: 19.4px; }
.mrow > .oi:first-child { width: 36px; text-align: center; color: var(--text2); }
.mrow-t { flex: 1; min-width: 0; } .mrow-t b { display: block; font-size: 16px; line-height: 1.3; font-weight: 500; overflow-wrap: anywhere; }
.mrow-t small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.3; color: var(--text2); }
.mrow .val { flex: none; max-width: 46%; margin-left: -4px; font-size: 15px; color: var(--text2); text-align: right; }
.mrow .chev { margin-left: -10px; font-size: 18px; color: var(--text3); }
.mrow.danger b, .mrow.danger > .oi:first-child { color: var(--danger); }
.sect { padding: 22px 22px 8px; font-size: 13.5px; font-weight: 600; letter-spacing: .1px; color: var(--text2); }
.hint { margin: 0; padding: 8px 22px 4px; font-size: 13px; line-height: 1.4; color: var(--text2); }
.pcard { display: flex; align-items: center; gap: 14px; width: calc(100% - 28px); margin: 4px 14px 14px; padding: 16px 12px 16px 16px; border-radius: 24px; background: var(--surface); text-align: left; }
.pcard .t { flex: 1; min-width: 0; } .pcard b { display: block; font-size: 20.5px; line-height: 1.43; font-weight: 700; letter-spacing: -.4px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard small { display: block; font-size: 14.5px; line-height: 1.43; letter-spacing: .2px; color: var(--text2); } .pcard small:first-of-type { font-weight: 500; }
.pcard .chev { font-size: 19px; color: var(--text3); }
.sw { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; border-radius: 16px; background: color-mix(in srgb, var(--text3) 45%, var(--surface)); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.sw::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.sw:checked { background: var(--accent); } .sw:checked::after { transform: translateX(20px); }

/* Кнопки и поля */
.bbtn { height: 54px; padding: 0 24px; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: var(--glow); display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16.5px; font-weight: 600; letter-spacing: -.15px; transition: transform .26s var(--spring); }
.bbtn:active { transform: scale(.972); } .bbtn .oi { font-size: 21px; } .bbtn.wide { display: flex; width: 100%; } .bbtn:disabled { opacity: .6; }
.tbtn { padding: 11px 14px; border-radius: 12px; color: var(--accent); font-size: 15px; font-weight: 600; } .tbtn.danger { color: var(--danger); }
.inp { display: block; width: 100%; border: 0; outline: 0; border-radius: 16px; padding: 15px 16px; background: var(--field); color: var(--text); font: 16px/1.3 Onest, sans-serif; resize: none; box-shadow: inset 0 0 0 1.6px transparent; transition: box-shadow .14s; }
.inp:focus { box-shadow: inset 0 0 0 1.6px var(--accent); }
.form { padding: 4px 14px 0; display: grid; gap: 12px; } .form label > span { display: block; margin: 0 8px 6px; font-size: 13.5px; font-weight: 600; color: var(--text2); }
.pillbtn { flex: none; height: 34px; padding: 0 16px; border-radius: 17px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.pillbtn.soft { min-width: 78px; padding: 0 12px; background: var(--soft); color: var(--accent); }

/* Пустое состояние (EmptyState) */
.es { margin: auto; padding: 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.es-i { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--soft) 40%, transparent); }
.es-i > i { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--soft) 75%, transparent); }
.es-i > i > i { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow); color: #fff; } .es-i .oi { font-size: 34px; }
.es b { margin-top: 20px; font-size: 19px; font-weight: 700; letter-spacing: -.3px; } .es p { margin: 8px 0 0; max-width: 320px; font-size: 14.5px; line-height: 1.45; color: var(--text2); }
.es .bbtn { margin-top: 22px; } .es .tbtn { margin-top: 6px; }
.note { padding: 40px 32px 24px; text-align: center; color: var(--text2); font-size: 14.5px; line-height: 1.4; } .note .oi { display: block; margin: 0 auto 12px; font-size: 44px; color: var(--text3); }
.dots i { background: var(--accent); }

/* Вложенные экраны (pageBar): телефон — на весь экран, широкое окно — карточка 480×720 */
.subs { position: absolute; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; overflow: clip; }
.sub { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; background: var(--surface); animation: subin .38s var(--ease); }
.sub.canvas { background: var(--canvas); } .sub.out { animation: subout .22s ease-in forwards; }
@keyframes subin { from { transform: translateX(100%); } } @keyframes subout { to { transform: translateX(100%); } }
.pbar { height: 60px; flex: none; display: flex; align-items: center; padding: 0 4px; }
.pbar > b { flex: 1; min-width: 0; margin-left: 4px; font-size: 19px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.sub-body > * { flex: none; }

/* Профиль человека и сообщества */
.ph { padding: 6px 20px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ph b { margin-top: 14px; font-size: 23px; line-height: 1.2; font-weight: 800; letter-spacing: -.5px; overflow-wrap: anywhere; } .ph b .oi { font-size: 20px; color: var(--accent); margin-left: 4px; vertical-align: -2px; }
.ph small { margin-top: 4px; font-size: 14.5px; color: var(--text2); } .ph small.accent { font-weight: 500; }
.acts { display: flex; padding: 0 10px; }
.act { flex: 1; min-width: 0; margin: 0 4px; padding: 11px 0; border-radius: 16px; background: var(--surface); color: var(--accent); display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.urow, .crow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 16px; text-align: left; }
.urow .t, .crow .t { flex: 1; min-width: 0; } .urow b { display: block; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow small, .crow small { display: flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--text2); } .urow small.accent { color: var(--accent); }
.urow .role { flex: none; padding: 3px 8px; border-radius: 9px; background: var(--soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }
.urow input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.crow { gap: 13px; padding: 9px 6px 9px 16px; } .crow b { display: block; font-size: 16.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow small { margin-top: 3px; } .crow small .oi { font-size: 16px; } .crow.missed b, .crow.missed small { color: var(--danger); }
.crow .t { text-align: left; }
.sbtn { display: flex; align-items: center; gap: 11px; width: calc(100% - 28px); margin: 0 14px 10px; padding: 12px 14px; border-radius: 14px; background: var(--canvas); color: var(--text2); font-size: 15.5px; text-align: left; flex: none; }
.sbtn .oi { font-size: 22px; }
.qrbox { margin: 8px auto 0; width: min(260px, 70%); padding: 14px; border-radius: 24px; background: #fff; box-shadow: var(--card-shadow); } .qrbox svg { display: block; width: 100%; height: auto; }

/* Вкладка «Приложения» */
.shelf { margin: 0 14px 12px; background: var(--surface); border-radius: 20px; overflow: hidden; }
.shelf-h { display: flex; align-items: center; padding: 12px 8px 8px 14px; font-size: 16.5px; font-weight: 800; letter-spacing: -.3px; }
.shelf-h span { flex: 1; } .shelf-h button { display: flex; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--accent); letter-spacing: 0; } .shelf-h button .oi { font-size: 18px; }
.svc { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 12px 12px 14px; text-align: left; }
.svc img { width: 54px; height: 54px; border-radius: 13px; flex: none; object-fit: cover; } .svc .t { flex: 1; min-width: 0; }
.svc b { display: block; font-size: 16px; font-weight: 700; } .svc small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--text2); }
.games { display: flex; overflow-x: auto; padding: 0 8px 10px; scrollbar-width: none; } .games.all { flex-wrap: wrap; padding: 4px 8px 10px; row-gap: 12px; }
.game { width: 76px; flex: none; display: flex; flex-direction: column; align-items: center; text-align: center; }
.game img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; } .game b { margin-top: 6px; max-width: 100%; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game small { max-width: 100%; font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; }
.arow + .arow::before { content: ""; position: absolute; left: 72px; right: 0; top: 0; height: 1px; background: var(--line); }
.arow img, .arow .aic { width: 46px; height: 46px; border-radius: 12.4px; flex: none; object-fit: cover; } .arow .aic { display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 16.5px; }
.arow .t { flex: 1; min-width: 0; } .arow b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; }
.arow small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--text2); }
.foot { padding: 14px 28px 0; font-size: 12.5px; line-height: 1.4; color: var(--text3); text-align: center; }

/* ================= Переписка ================= */
.main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background-color: var(--chat); background-image: var(--pat); background-size: 496px 496px; }
.nochat { margin: auto; display: grid; justify-items: center; gap: 4px; color: var(--text2); animation: rise .6s var(--ease); }
.nochat-logo { width: 104px; height: 104px; border-radius: 50%; background: var(--in); display: grid; place-items: center; box-shadow: var(--card-shadow); margin-bottom: 14px; }
.nochat-logo .mark { width: 50px; height: 50px; } .nochat b { color: var(--text); font-size: 18px; }
.chead { height: 60px; flex: none; display: flex; align-items: center; padding: 0 2px 0 4px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chead .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 6px; border-radius: 12px; text-align: left; }
.chead .who .t { min-width: 0; } .chead b { display: flex; align-items: center; font-size: 16.5px; line-height: 1.2; font-weight: 600; letter-spacing: -.15px; }
.chead b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chead b .ver { font-size: 16px; color: var(--accent); margin-left: 4px; } .chead b .mut { font-size: 14px; color: var(--text3); margin-left: 5px; }
.chead small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.25; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-open { flex: none; height: 34px; margin: 0 4px; padding: 0 14px; border-radius: 17px; background: var(--soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 44px 0 8px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.feed > :first-child { margin-top: auto; } .feed > .loading, .feed > .echat { margin: auto; }
.echat { max-width: 300px; padding: 22px 22px 20px; border-radius: 24px; background: var(--in); box-shadow: var(--card-shadow); text-align: center; font-size: 14.5px; line-height: 1.42; font-weight: 500; }
.echat i.c { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%; background: var(--soft); color: var(--accent); display: grid; place-items: center; } .echat .oi { font-size: 28px; }
.pillrow { display: flex; justify-content: center; margin: 6px 24px; flex: none; }
.spill { padding: 5px 12px; border-radius: 14px; background: var(--service); box-shadow: 0 2px 8px rgba(var(--sh), calc(var(--sha) * .5)); color: var(--service-text); font-size: 12.5px; line-height: 1.25; font-weight: 600; text-align: center; }
.msg { position: relative; flex: none; display: flex; padding: 2px 10px 0; }
.msg.first { padding-top: 6px; } .msg.last { padding-bottom: 1px; } .msg.out { justify-content: flex-end; }
.msg.g { padding-left: 0; } .gav { width: 46px; flex: none; display: flex; align-items: flex-end; padding-left: 10px; }
.msg.new .bub { animation: msgin .36s var(--ease); } .msg.out.new .bub { transform-origin: bottom right; } .msg.in.new .bub { transform-origin: bottom left; }
@keyframes msgin { from { opacity: 0; transform: scale(.86); } }
.bub { position: relative; min-width: 0; max-width: min(calc((100% - 4px) * .82), 440px); padding: 8px 13px; border-radius: 20px; background: var(--in); box-shadow: var(--bub-sh);
  font-size: 16px; line-height: 1.34; overflow-wrap: anywhere; }
.msg.g .bub { max-width: min(calc((100% - 60px) * .82), 440px); }
.msg.in .bub { border-bottom-left-radius: 7px; } .msg.in:not(.first) .bub { border-top-left-radius: 7px; } .msg.in.last .bub { border-bottom-left-radius: 6px; }
.msg.out .bub { border-bottom-right-radius: 7px; background: linear-gradient(180deg, var(--out2), var(--out)) fixed; color: #fff; box-shadow: none; }
.msg.out:not(.first) .bub { border-top-right-radius: 7px; } .msg.out.last .bub { border-bottom-right-radius: 6px; }
.msg.out a { color: #fff; text-decoration: underline; } .msg.in a { color: var(--accent); text-decoration: none; }
.txt { white-space: pre-wrap; }
.meta { position: absolute; right: 13px; bottom: 8px; display: flex; align-items: center; font-size: 11.5px; line-height: 1.2; color: var(--meta-in); white-space: nowrap; pointer-events: none; }
.msg.out .meta { color: var(--meta-out); } .meta .oi { font-size: 15px; margin-left: 3px; } .meta .oi.sm { font-size: 13px; margin: 0 3px 0 0; } .meta .read { color: #fff; } .meta .err { color: var(--danger); }
.ghost { display: inline-block; height: 1px; visibility: hidden; font-size: 11.5px; line-height: 1; white-space: nowrap; padding-left: 10px; vertical-align: bottom; }
.ghost.t { padding-right: 19px; }
.who { display: block; margin-bottom: 2px; font-size: 13.5px; line-height: 1.43; font-weight: 600; }
.fwd { margin-bottom: 3px; font-size: 13.5px; line-height: 1.25; color: var(--accent); } .fwd b { font-weight: 600; } .msg.out .fwd { color: var(--meta-out); }
.quote { --q: var(--accent); position: relative; display: block; margin: 2px 0 6px; padding: 5px 9px 6px 11px; border-radius: 9px; overflow: hidden; background: color-mix(in srgb, var(--q) 10%, transparent); }
.quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--q); }
.quote b { display: block; font-size: 13.5px; line-height: 1.25; font-weight: 600; color: var(--q); } .quote span { display: block; font-size: 14px; line-height: 1.3; opacity: .86; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.out .quote { --q: #fff; background: rgba(255, 255, 255, .16); }
.msg.media .bub { padding: 3px; max-width: min(calc((100% - 4px) * .82), 346px); }
.pic { position: relative; display: block; width: 340px; max-width: 100%; border-radius: 17px; overflow: hidden; background: #1c1c22 center/cover; }
.msg.in.media:not(.first) .pic { border-top-left-radius: 4px; } .msg.out.media:not(.first) .pic { border-top-right-radius: 4px; }
.msg.media.cap .pic { border-bottom-left-radius: 7px; border-bottom-right-radius: 7px; }
.msg.in.media:not(.cap) .pic { border-bottom-left-radius: 4px; } .msg.in.media.last:not(.cap) .pic { border-bottom-left-radius: 3px; }
.msg.out.media:not(.cap) .pic { border-bottom-right-radius: 4px; } .msg.out.media.last:not(.cap) .pic { border-bottom-right-radius: 3px; }
.pic + .pic { margin-top: 2px; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; } .pic img.on { opacity: 1; }
.playbtn { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center; }
.pic .dur { position: absolute; left: 6px; top: 6px; padding: 2.5px 7px; border-radius: 10px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 11.5px; line-height: 1.2; }
.msg.media .cap-t { padding: 6px 10px 5px; } .msg.media .reacts { padding: 0 10px 6px; margin-top: 0; } .msg.media .who, .msg.media .fwd, .msg.media .quote { margin: 4px 10px 5px; }
.msg.media:not(.cap) .meta { right: 10px; bottom: 10px; padding: 3px 7px; border-radius: 11px; background: rgba(0, 0, 0, .45); color: #fff; } .msg.media:not(.cap) .meta .read { color: #fff; }
.ftile { display: flex; align-items: center; gap: 10px; padding: 2px 0; min-width: 0; text-align: left; color: inherit; }
.fc { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; } .fc .oi { font-size: 22px; }
.msg.out .fc { background: #fff; color: var(--accent); }
.ftile .t { min-width: 0; } .ftile b { display: block; font-size: 15px; line-height: 1.25; font-weight: 600; } .ftile small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--meta-in); } .msg.out .ftile small { color: var(--meta-out); }
.vtile { display: flex; align-items: center; gap: 10px; width: 230px; max-width: 100%; }
.vtile .t { flex: 1; min-width: 0; } .wave { height: 26px; display: flex; align-items: center; gap: 2px; overflow: hidden; cursor: pointer; }
.wave i { flex: none; width: 3px; min-height: 3px; border-radius: 1.5px; background: var(--accent); opacity: .28; } .wave i.p { opacity: 1; }
.msg.out .wave i { background: #fff; opacity: .38; } .msg.out .wave i.p { opacity: 1; }
.vtile small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--meta-in); } .msg.out .vtile small { color: var(--meta-out); }
.reacts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; padding-right: 46px; }
.reacts button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 7px; border-radius: 15px; background: color-mix(in srgb, var(--accent) 11%, transparent); font-size: 15px; line-height: 1.2; }
.reacts button b { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.reacts button.me { background: var(--accent); } .reacts button.me b { color: #fff; }
.msg.out .reacts button { background: rgba(255, 255, 255, .2); } .msg.out .reacts button b { color: #fff; } .msg.out .reacts button.me { background: #fff; } .msg.out .reacts button.me b { color: var(--accent); }
.ccard { flex: none; align-self: flex-start; display: flex; align-items: center; gap: 11px; margin: 4px 12px; padding: 9px 14px 9px 9px; border-radius: 19px; background: var(--in); box-shadow: 0 1px 6px rgba(var(--sh), calc(var(--sha) * .4)); text-align: left; }
.ccard.out { align-self: flex-end; background: linear-gradient(90deg, var(--out), var(--out2)); color: #fff; }
.ccard i.c { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); } .ccard i.c .oi { font-size: 21px; }
.ccard.out i.c { background: rgba(255, 255, 255, .2); color: #fff; } .ccard.miss i.c { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.ccard b { display: block; font-size: 15px; line-height: 1.25; font-weight: 600; } .ccard.miss b { color: var(--danger); } .ccard small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--text2); } .ccard.out small { color: rgba(255, 255, 255, .78); }
.geo { display: flex; flex-direction: column; gap: 3px; width: 300px; max-width: 100%; color: inherit; text-decoration: none !important; }
.geo .geomap { position: relative; display: block; height: 150px; border-radius: 14px; overflow: hidden; margin-bottom: 5px; background: linear-gradient(135deg, #e8eef8, #dce6f5); }
.geo .geomap img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; } .geo .geomap img.on { opacity: 1; }
.geo .geopin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; background: var(--accent); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.geo b { font-weight: 600; } .geo small { opacity: .75; font-size: 13.5px; }
.down { position: absolute; right: 14px; bottom: 78px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); box-shadow: var(--pop-shadow); color: var(--text2); display: grid; place-items: center; animation: popin .3s var(--spring); }
.down .oi { font-size: 22px; } .down[hidden] { display: none; }
@media (pointer: coarse) { .bub { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }

/* Поле ввода (composer) */
.comp { flex: none; display: flex; align-items: flex-end; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.clipb { width: 44px; height: 44px; flex: none; margin: 0 2px 1px 0; border-radius: 50%; display: grid; place-items: center; color: var(--text2); } .clipb .oi { font-size: 25px; }
.fwrap { flex: 1; min-width: 0; min-height: 46px; display: flex; align-items: flex-end; padding: 0 2px 0 16px; border-radius: 23px; background: var(--field); border: 1.3px solid var(--field); transition: border-color .14s; }
.fwrap:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.fwrap textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: none; padding: 11.2px 0; max-height: 150px; font: 16px/1.3 Onest, sans-serif; color: var(--text); }
.fwrap button { flex: none; padding: 9px; color: var(--text2); display: grid; } .fwrap button .oi { font-size: 25px; } .fwrap button.on { color: var(--accent); }
.rb { width: 46px; height: 46px; flex: none; margin-left: 8px; border-radius: 50%; background: var(--field); color: var(--text2); display: grid; place-items: center; transition: transform .2s var(--spring); }
.rb.on { background: var(--grad); color: #fff; box-shadow: 0 7px 17px -5px color-mix(in srgb, var(--accent) 34%, transparent); animation: rbpop .2s var(--spring); } .rb.on .oi { font-size: 22px; }
.rb:active { transform: scale(.9); } .rb.del { margin: 0 8px 0 0; color: var(--danger); }
@keyframes rbpop { from { transform: scale(.5); } }
.rec { flex: 1; min-width: 0; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 23px; background: var(--field); font-size: 15.5px; font-weight: 500; overflow: hidden; }
.rec .rd { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--danger); animation: blink 1s ease-in-out infinite; } @keyframes blink { 50% { opacity: .25; } }
.rec .bars { flex: 1; height: 26px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; } .rec .bars i { flex: none; width: 3px; border-radius: 2px; background: var(--accent); }
.ctx { flex: none; display: flex; align-items: center; padding: 8px 4px 0 16px; background: var(--surface); border-top: 1px solid var(--line); animation: fade .24s; }
.ctx[hidden] { display: none; } .ctx + .comp { border-top: 0; }
.ctx > .oi { font-size: 23px; color: var(--accent); } .ctx > u { width: 3px; height: 34px; margin: 0 10px 0 12px; border-radius: 2px; background: var(--accent); flex: none; }
.ctx .t { flex: 1; min-width: 0; } .ctx b { display: block; font-size: 14px; font-weight: 600; color: var(--accent); line-height: 1.3; } .ctx span { display: block; font-size: 14px; line-height: 1.3; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx .ib .oi { font-size: 21px; }
.emo { flex: none; height: 290px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); align-content: start; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); }
.emo button { height: 42px; font-size: 26px; line-height: 1; border-radius: 10px; } .emo button:active { background: var(--field); }
.comp:has(+ .emo) { padding-bottom: 8px; }
.bar { flex: none; min-height: 58px; display: grid; place-items: center; padding: 0 14px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); color: var(--text2); text-align: center; }
.bar .tbtn { font-size: 16px; }
.reqbar { flex: none; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.reqbar p { margin: 0 0 10px; text-align: center; font-size: 13.5px; line-height: 1.4; color: var(--text2); }
.reqbar div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .reqbar button { height: 48px; border-radius: 16px; font-size: 16px; font-weight: 600; background: var(--accent); color: #fff; }
.reqbar button.no { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); } .reqbar button:disabled { opacity: .6; }
.mini-bar { flex: none; padding: 8px 10px 0; background: var(--surface); border-top: 1px solid var(--line); } .mini-bar + .ctx, .mini-bar + .comp, .mini-bar + .ctx + .comp { border-top: 0; }
.mini-bar button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; background: var(--soft); color: var(--accent); font-weight: 700; font-size: 15px; text-align: left; }
.mini-bar span { flex: 1; } .mini-bar .aicon { flex: none; } .mini-bar .oi { font-size: 18px; }

/* Всплывающее меню, нижний лист, диалог, сообщение внизу */
.cm-back { position: fixed; inset: 0; z-index: 70; background: rgba(5, 8, 28, .1); }
.cm, .cm-re { position: fixed; z-index: 71; background: var(--menu); box-shadow: var(--pop-shadow); animation: cmin .24s var(--ease); }
@keyframes cmin { from { opacity: 0; transform: scale(.86); } }
.cm { min-width: 210px; max-width: 290px; padding: 6px; border-radius: 18px; }
.cm button { display: flex; align-items: center; gap: 13px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: 15.5px; line-height: 1.25; font-weight: 500; white-space: nowrap; }
.cm button .oi { font-size: 21px; color: var(--text2); } .cm button.danger, .cm button.danger .oi { color: var(--danger); }
.cm button:hover, .bs-i:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.cm-re { display: flex; align-items: center; padding: 5px 6px; border-radius: 26px; }
.cm-re button { width: 40px; height: 40px; border-radius: 50%; font-size: 25px; line-height: 1.1; animation: popin .3s var(--spring) both; } .cm-re button.on { background: var(--soft); }
.bs-back { position: fixed; inset: 0; z-index: 75; display: flex; align-items: flex-end; justify-content: center; background: var(--dim); opacity: 0; transition: opacity .2s; }
.bs-back.on { opacity: 1; }
.bs { width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow-y: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding-bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .32s var(--ease); }
.bs-back.on .bs { transform: none; }
.bs::before { content: ""; display: block; width: 40px; height: 4.5px; margin: 10px auto 12px; border-radius: 3px; background: color-mix(in srgb, var(--text3) 45%, transparent); }
.bs h3 { margin: 0; padding: 4px 22px 10px; font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.bs-i { display: flex; align-items: center; gap: 16px; width: calc(100% - 16px); margin: 0 8px; padding: 12.5px 14px; border-radius: 14px; text-align: left; font-size: 16px; font-weight: 500; }
.bs-i .oi { font-size: 23px; color: var(--text2); } .bs-i span { flex: 1; } .bs-i.cur { background: var(--soft); font-weight: 600; } .bs-i.cur .oi { color: var(--accent); } .bs-i .ck { font-size: 20px; }
.bs-i.danger, .bs-i.danger .oi { color: var(--danger); }
.bs .pad { padding: 0 22px 8px; }
.dlg-back { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 24px 28px; background: rgba(5, 8, 28, .36); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); animation: fade .2s; }
.dlg { width: 100%; max-width: 400px; padding: 24px 24px 20px; border-radius: 28px; background: var(--surface); animation: dlgin .26s var(--ease); }
@keyframes dlgin { from { opacity: 0; transform: scale(.955); } }
.dlg h3 { margin: 0; font-size: 19.5px; line-height: 1.25; font-weight: 700; letter-spacing: -.3px; } .dlg p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--text2); }
.dlg .inp { margin-top: 14px; }
.dlg-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.dlg-acts button { height: 48px; border-radius: 16px; font-size: 16px; font-weight: 600; background: var(--alt); color: var(--text); } .dlg-acts .ok { background: var(--accent); color: #fff; } .dlg-acts .ok.danger { background: var(--danger); }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 120; width: max-content; max-width: min(460px, calc(100vw - 32px)); padding: 13px 18px; border-radius: 16px; background: var(--toast); color: #fff;
  box-shadow: var(--pop-shadow); font-size: 14.5px; line-height: 1.35; font-weight: 500; text-align: center; opacity: 0; transform: translate(-50%, 22px); transition: all .32s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(4, 6, 12, .96); animation: fade .2s; }
.lightbox img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; }
.lightbox-bar { position: absolute; top: calc(6px + env(safe-area-inset-top)); left: 4px; right: 4px; display: flex; justify-content: space-between; } .lightbox-bar .ib, .lightbox-bar .icon-btn { color: #fff; }

/* Экран звонка */
.call { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; padding: calc(24px + env(safe-area-inset-top)) 14px calc(36px + env(safe-area-inset-bottom)); background: var(--grad); color: #fff; animation: fade .24s; }
.call-rv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
.call-lv { position: absolute; right: 14px; top: calc(14px + env(safe-area-inset-top)); z-index: 2; width: 108px; height: 152px; border-radius: 22px; border: 2px solid rgba(255, 255, 255, .55); object-fit: cover; background: #0b1030; display: none; transform: scaleX(-1); }
.call.cam .call-lv { display: block; }
.call-who { position: relative; z-index: 1; margin-top: auto; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 2 0 auto; justify-content: flex-end; }
.call-who .hold { padding: 5px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.call-who b { margin-top: 22px; font-size: 27px; line-height: 1.25; font-weight: 700; letter-spacing: -.4px; } .call-who span { margin-top: 8px; max-width: 340px; font-size: 16.5px; line-height: 1.35; color: rgba(255, 255, 255, .9); }
.call-gap { flex: 3 0 20px; }
.call-acts { position: relative; z-index: 1; width: 100%; max-width: 440px; display: flex; justify-content: space-evenly; align-items: flex-start; }
.cbtn { width: 104px; display: flex; flex-direction: column; align-items: center; gap: 9px; color: rgba(255, 255, 255, .92); font-size: 13px; line-height: 1.2; text-align: center; }
.cbtn i.c { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); color: #fff; transition: transform .2s var(--spring); } .cbtn i.c .oi { font-size: 30px; }
.cbtn:active i.c { transform: scale(.93); } .cbtn.on i.c { background: #fff; color: var(--accent); } .cbtn.red i.c { background: var(--danger); } .cbtn.green i.c { background: var(--success); }
.call.video { background: #000; padding-left: 0; padding-right: 0; } .call.video .call-rv { display: block; }
.call.video::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 190px; z-index: 1; background: linear-gradient(rgba(6, 9, 26, .62), transparent); pointer-events: none; }
.call.video::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 300px; background: linear-gradient(transparent, rgba(6, 9, 26, .72)); pointer-events: none; }
.call.video .call-who { position: absolute; left: 16px; top: calc(12px + env(safe-area-inset-top)); margin: 0; align-items: flex-start; text-align: left; } .call.video .call-who .hold { display: none; }
.call.video .call-who b { margin: 0; font-size: 18px; letter-spacing: -.2px; } .call.video .call-who span { margin-top: 2px; font-size: 14px; font-weight: 500; }
.call.video .call-acts { position: absolute; z-index: 2; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: auto; max-width: min(460px, calc(100% - 16px)); padding: 13px 6px 11px; border-radius: 32px;
  background: rgba(14, 18, 40, .46); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .16); }
.call.video .cbtn { width: 72px; gap: 6px; font-size: 11.5px; line-height: 1.15; font-weight: 500; } .call.video .cbtn i.c { width: 54px; height: 54px; background: rgba(255, 255, 255, .17); } .call.video .cbtn i.c .oi { font-size: 26px; }
.call.video .cbtn.on i.c { background: #fff; color: #0b1030; } .call.video .cbtn.red i.c { width: 62px; height: 62px; margin-top: -4px; background: var(--danger); } .call.video .cbtn.red i.c .oi { font-size: 30px; }

/* Телефон: одна панель, чат и вложенные экраны — на весь экран поверх нижней панели */
@media (max-width: 759px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side, .main { grid-area: 1 / 1; } .side { border-right: 0; transition: transform .38s var(--ease); }
  .main { z-index: 10; transform: translateX(100%); transition: transform .38s var(--ease); visibility: hidden; }
  .app.chat-open .main { transform: none; visibility: visible; } .app.chat-open .side { transform: translateX(-30%); }
}
/* Широкое окно */
@media (min-width: 760px) {
  .chead .back { display: none; } .chead { padding-left: 8px; }
  .bub { max-width: min(calc((100% - 4px) * .72), 540px); font-size: 15px; } .msg.g .bub { max-width: min(calc((100% - 60px) * .72), 540px); }
  .feed { padding-left: max(0px, calc((100% - 860px) / 2)); padding-right: max(0px, calc((100% - 860px) / 2)); }
  .comp, .ctx, .mini-bar, .reqbar { padding-left: max(8px, calc((100% - 860px) / 2)); padding-right: max(8px, calc((100% - 860px) / 2)); }
  .fab { display: none; }
  .subs.has { pointer-events: auto; background: var(--dim); animation: fade .2s; }
  .sub { inset: auto; left: 50%; top: 50%; width: 480px; height: min(720px, calc(100% - 48px)); margin: 0; transform: translate(-50%, -50%); border-radius: 24px; overflow: hidden; box-shadow: var(--pop-shadow); animation: cardin .28s var(--ease); }
  .sub.out { animation: fadeout .18s forwards; }
  @keyframes cardin { from { opacity: 0; transform: translate(-50%, -47%); } } @keyframes fadeout { to { opacity: 0; } }
  .bs-back { align-items: center; } .bs { max-width: 420px; border-radius: 28px; transform: scale(.955); } .bs::before { visibility: hidden; margin: 4px auto; }
  .list::-webkit-scrollbar, .feed::-webkit-scrollbar, .sub-body::-webkit-scrollbar { width: 9px; }
  .list::-webkit-scrollbar-thumb, .feed::-webkit-scrollbar-thumb, .sub-body::-webkit-scrollbar-thumb { border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; background-color: color-mix(in srgb, var(--text3) 38%, transparent); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Окно установки приложения */
.sheet-back { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 10, 17, .5);
  backdrop-filter: blur(6px); animation: fade .25s ease both; }
.sheet { width: 100%; max-width: 420px; max-height: 100%; overflow: auto; background: var(--surface); border-radius: 28px; padding: 26px; box-shadow: var(--shadow); animation: rise .5s var(--ease) both; }
.sheet h2 { margin: 0 0 18px; font-size: 24px; letter-spacing: -.03em; font-weight: 800; }
.sheet .steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.sheet .steps li { display: flex; gap: 12px; align-items: flex-start; }
.sheet .steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 13px; }
.sheet .steps span { padding-top: 3px; }
.sheet .btn.wide { width: 100%; padding: 15px; border-radius: 16px; font-size: 16px; margin-bottom: 16px; }
.sheet-close { width: 100%; margin-top: 14px; padding: 13px; border-radius: 14px; background: var(--alt); color: var(--text); font-weight: 600; }
@keyframes fade { from { opacity: 0; } }

/* Видеоплеер */
.vp { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; outline: none; user-select: none; -webkit-user-select: none; }
.vp:not(.on-ui) { cursor: none; }
.vp-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.vp-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vp-top, .vp-bottom { position: absolute; left: 0; right: 0; opacity: 0; pointer-events: none; transition: opacity .18s; }
.vp.on-ui .vp-top, .vp.on-ui .vp-bottom { opacity: 1; pointer-events: auto; }
.vp-top { top: 0; display: flex; align-items: center; gap: 6px; padding: 10px 12px 26px; background: linear-gradient(rgba(0, 0, 0, .7), transparent); }
.vp-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.vp-bottom { bottom: 0; padding: 30px 14px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.vp button { color: #fff; }
.vp-top > button, .vp-row > button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.vp-top > button:hover, .vp-row > button:hover, .vp-speed:hover { background: rgba(255, 255, 255, .14); }
.vp-row { display: flex; align-items: center; gap: 2px; }
.vp-gap { flex: 1; }
.vp-row > button.vp-time { width: auto; border-radius: 10px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-speedbox { position: relative; }
.vp-speed { min-width: 46px; height: 40px; border-radius: 20px; padding: 0 8px; font-weight: 700; font-size: 14px; }
.vp-speed.fast { color: #8ab4ff; }
.vp-menu { position: absolute; right: 0; bottom: 46px; display: none; flex-direction: column; min-width: 150px; padding: 6px; border-radius: 14px; background: rgba(22, 24, 34, .97);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6); }
.vp-menu.on { display: flex; }
.vp-menu button { text-align: left; padding: 8px 12px; border-radius: 9px; font-size: 14px; }
.vp-menu button:hover { background: rgba(255, 255, 255, .12); }
.vp-vol { width: 86px; accent-color: #fff; height: 4px; }
@media (max-width: 560px) { .vp-vol { display: none; } }
.vp-bar { position: relative; height: 26px; cursor: pointer; touch-action: none; }
.vp-track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.vp-bar:hover .vp-track { top: 10px; height: 6px; border-radius: 3px; }
.vp-track i { position: absolute; left: 0; top: 0; bottom: 0; }
.vp-loaded { background: rgba(255, 255, 255, .45); }
.vp-played { background: #fff; }
.vp-knob { position: absolute; top: 13px; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; }
.vp-tip { position: absolute; bottom: 30px; width: max-content; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; pointer-events: none; padding: 4px 8px;
  border-radius: 9px; background: rgba(16, 16, 20, .92); font-size: 12.5px; }
.vp-tip.on { display: flex; }
.vp-tip video { display: none; height: 104px; max-width: 240px; border-radius: 6px; margin-bottom: 4px; background: #000; }
.vp-tip.pic { padding: 4px 4px 3px; border: 1.5px solid #fff; }
.vp-tip.pic video { display: block; }
.vp-cap { padding: 0 2px 8px; font-size: 14.5px; line-height: 1.35; max-height: 4.1em; overflow: hidden; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.vp-cap button { color: #8ab4ff; font-weight: 600; }
.vp-big { position: absolute; width: 72px; height: 72px; border-radius: 50%; background: rgba(0, 0, 0, .5); display: none; place-items: center; }
.vp-big.on { display: grid; }
.vp-big .ico { width: 38px; height: 38px; }
.vp-spin { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; display: none;
  animation: vp-spin .8s linear infinite; pointer-events: none; }
.vp-spin.on { display: block; }
.vp-spin.on ~ .vp-big { display: none; }
@keyframes vp-spin { to { transform: rotate(360deg); } }
.vp-hud, .vp-pill { position: absolute; padding: 9px 14px; border-radius: 22px; background: rgba(0, 0, 0, .72); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .15s; }
.vp-hud { top: 16%; }
.vp-pill { bottom: 150px; font-weight: 400; font-size: 13.5px; }
.vp-pill b { font-weight: 700; }
.vp-hud.on { opacity: 1; }
.vp-pill.on { opacity: 1; pointer-events: auto; }
.vp .oi { font-size: 24px; } .vp-big .oi { font-size: 38px; } .playbtn .oi { font-size: 24px; }
/* Мелкая подгонка под снимки приложения */
i, em { font-style: normal; }
.list.flat, .list.calls { padding-top: 0; } .list.calls { padding-bottom: 96px; }
.pcard { margin-top: 4px; }
.top .ttl.big { padding-top: 2px; }
.shelf-h:has(button) { padding: 13px 4px 10px 14px; } .shelf-h button { gap: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .itile { background: color-mix(in srgb, var(--t) 18%, transparent); color: color-mix(in srgb, var(--t) 72%, #fff); } }
:root[data-theme="dark"] .itile { background: color-mix(in srgb, var(--t) 18%, transparent); color: color-mix(in srgb, var(--t) 72%, #fff); }
/* Полоса прокрутки — тонкая, как в приложении; на телефоне с сенсорным экраном поле поиска не меньше 16px (иначе Safari приближает страницу). */
.list::-webkit-scrollbar, .feed::-webkit-scrollbar, .sub-body::-webkit-scrollbar, .emo::-webkit-scrollbar, .bs::-webkit-scrollbar { width: 9px; }
.list::-webkit-scrollbar-thumb, .feed::-webkit-scrollbar-thumb, .sub-body::-webkit-scrollbar-thumb, .emo::-webkit-scrollbar-thumb, .bs::-webkit-scrollbar-thumb { border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; background-color: color-mix(in srgb, var(--text3) 38%, transparent); }
@supports not selector(::-webkit-scrollbar) { .list, .feed, .sub-body, .emo, .bs { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text3) 38%, transparent) transparent; } }
@media (pointer: coarse) { .sf input { font-size: 16px; } .list::-webkit-scrollbar, .feed::-webkit-scrollbar, .sub-body::-webkit-scrollbar { width: 0; } }
/* Экран входа на узком экране: всё в столбик, QR-код на всю ширину */
@media (max-width: 900px) {
  .login { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 22px 20px 40px; }
  .login > *, .login-intro > * { flex: none; }
  .login-intro { display: contents; }
  .login .brand { order: 1; align-self: flex-start; }
  .login h1 { order: 2; margin: 22px 0 10px; font-size: 34px; }
  .login .lead { order: 3; font-size: 16px; margin: 0 0 20px; max-width: none; }
  .login-card { order: 4; width: 100%; max-width: 340px; align-self: center; padding: 18px; border-radius: 28px; min-height: 0; margin-bottom: 26px; }
  .login .steps-title, .login .steps { order: 5; max-width: none; }
  .login-intro > .muted { order: 6; }
}
.geo .text { white-space: pre-wrap; }

/* Аудиоплеер: плитка трека, мини-плеер под шапкой, большой плеер */
.wave { touch-action: none; }
.achip { margin-left: 8px; padding: 1px 6px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 28%, transparent); vertical-align: 1px; }
.msg.out .achip { color: #fff; background: rgba(255, 255, 255, .26); }
.achip[hidden] { display: none; }
.aspin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; animation: aspin .8s linear infinite; }
@keyframes aspin { to { transform: rotate(360deg); } }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: none; }
.eq i { width: 2.5px; height: 24%; border-radius: 1.5px; background: var(--accent); }
.play .eq i { animation: aeq 1s ease-in-out infinite alternate; }
@keyframes aeq { from { height: 24%; } to { height: 100%; } }
.atile { display: flex; align-items: center; gap: 9px; width: 252px; max-width: 100%; text-align: left; }
.atile .t { flex: 1; min-width: 0; cursor: pointer; }
.atile b { display: flex; align-items: center; gap: 7px; font-size: 15px; line-height: 1.25; font-weight: 600; }
.atile b span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atile small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--meta-in); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.msg.out .atile small { color: var(--meta-out); }
.atile .wave, .atile .eq { display: none; } .atile.on .wave { display: flex; margin-top: 4px; } .atile.on .eq { display: inline-flex; }
.msg.out .atile .eq i { background: #fff; }
.atile .acov { position: relative; width: 46px; height: 46px; background: none; }
.atile .acov::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); z-index: 0; }
.msg.out .atile .acov::before { background: #fff; }
.atile .acov::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(currentColor var(--p, 0%), color-mix(in srgb, currentColor 28%, transparent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); opacity: 0; transition: opacity .2s; }
.atile.on .acov::after { opacity: 1; }
.atile .acov { color: var(--accent); } .msg.out .atile .acov { color: #fff; }
.atile .acov > * { position: relative; z-index: 1; color: #fff; font-size: 20px; } .msg.out .atile .acov > * { color: var(--accent); }

.aisle { position: fixed; z-index: 40; top: calc(env(safe-area-inset-top) + 66px); left: 10px; right: 10px; max-width: 460px; margin: 0 auto; display: flex; align-items: center; gap: 4px; padding: 6px 4px 6px 6px;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 26px -8px rgba(11, 16, 48, .28); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
  opacity: 0; translate: 0 -26px; scale: .86; transition: opacity .26s, translate .42s cubic-bezier(.34, 1.56, .64, 1), scale .42s cubic-bezier(.34, 1.56, .64, 1), transform .24s; }
.aisle.on { opacity: 1; translate: 0 0; scale: 1; }
.aisle.hid { opacity: 0; pointer-events: none; }
@media (min-width: 760px) { .aisle { left: auto; right: 16px; width: 372px; margin: 0; top: 70px; } }
.aisle .t { flex: 1; min-width: 0; margin-left: 5px; display: grid; }
.aisle .t b { font-size: 14.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aisle .t small { font-size: 12px; color: var(--text2); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.aisle .eq { margin: 0 4px; height: 13px; }
.aisle .achip, .afull .achip { margin: 0; padding: 5px 7px; min-width: 34px; border-radius: 11px; font-size: 12px; color: var(--text2); background: var(--alt); }
.aisle .achip.act, .afull .achip.act { color: var(--accent); background: var(--soft); }
.aib { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text); font-size: 20px; }
.aib:hover { background: var(--hover); } .aib.dim { color: var(--text2); font-size: 19px; } .aib.xl { width: 52px; height: 52px; font-size: 28px; } .aib.off { opacity: .35; } .aib.act { color: var(--accent); }
.acov.sm, .acov.big { position: relative; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.acov.sm { width: 36px; height: 36px; margin: 4px; border-radius: 50%; font-size: 17px; }
.acov.sm::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--accent) var(--p, 0%), color-mix(in srgb, var(--accent) 16%, transparent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); }

.afull-back { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background .26s; }
.afull-back.on { background: rgba(0, 0, 0, .45); }
.afull { --glow: var(--accent); position: relative; width: 100%; max-width: 460px; padding: 10px 20px calc(16px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background:
  radial-gradient(120% 300px at 50% 120px, color-mix(in srgb, var(--glow) 26%, transparent), transparent 70%), var(--surface);
  display: flex; flex-direction: column; align-items: center; box-shadow: 0 14px 44px rgba(0, 0, 0, .28); translate: 0 18%; opacity: 0; transition: translate .38s cubic-bezier(.16, 1, .3, 1), opacity .26s; user-select: none; -webkit-user-select: none; }
.afull-back.on .afull { translate: 0 0; opacity: 1; }
@media (min-width: 760px) { .afull-back { align-items: center; } .afull { width: 392px; border-radius: 30px; translate: 0 0; scale: .92; transition: scale .38s cubic-bezier(.16, 1, .3, 1), opacity .26s; } .afull-back.on .afull { scale: 1; } }
.afull .hd { align-self: stretch; display: flex; align-items: center; touch-action: none; }
.afull .cnt { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text2); }
.acov.big { width: min(224px, 30vh); height: min(224px, 30vh); margin-top: 10px; border-radius: 32px; font-size: 76px; box-shadow: 0 16px 34px -6px color-mix(in srgb, var(--c2) 55%, transparent);
  scale: .88; transition: scale .42s cubic-bezier(.34, 1.56, .64, 1); }
.afull.play .acov.big { scale: 1; }
.afull.swap .acov.big { animation: aswap .38s cubic-bezier(.16, 1, .3, 1); }
@keyframes aswap { from { opacity: 0; transform: scale(.9); } }
.acov.big .eq { position: absolute; bottom: 12%; height: 16%; gap: 5px; } .acov.big .eq i { width: 6px; border-radius: 3px; background: rgba(255, 255, 255, .9); }
.afull .ttl { margin-top: 18px; font-size: 20px; font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.afull .art { margin-top: 4px; font-size: 14.5px; color: var(--text2); }
.afull .wbox { align-self: stretch; margin-top: 16px; } .afull .wave { justify-content: space-between; }
.afull .wave i { flex: 1; max-width: 4px; }
.afull .tm { align-self: stretch; display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--text2); font-variant-numeric: tabular-nums; }
.afull .tm button { color: inherit; font: inherit; }
.afull .ctl { align-self: stretch; display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.afull .spd { position: relative; width: 52px; } .afull .achip.lg { width: 100%; }
.amenu { position: absolute; left: 0; bottom: 40px; display: none; flex-direction: column; min-width: 150px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .3); z-index: 2; }
.amenu.on { display: flex; } .amenu button { text-align: left; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; } .amenu button:hover { background: var(--hover); }
.aplay { width: 70px; height: 70px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 30px; background: var(--grad); box-shadow: 0 8px 20px -4px color-mix(in srgb, var(--accent) 60%, transparent); transition: scale .14s; }
.aplay:active { scale: .92; }
.afull .low { align-self: stretch; display: flex; align-items: center; gap: 6px; margin-top: 12px; } .afull .gap { flex: 1; }
.asleep { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 14px; font-size: 12.5px; font-weight: 600; color: var(--text2); background: var(--alt); }
.asleep .oi { font-size: 17px; } .asleep.act { color: var(--accent); background: var(--soft); }
@media (prefers-reduced-motion: reduce) { .play .eq i { animation: none; height: 60%; } .aisle, .afull, .acov.big { transition: opacity .2s; } }
.aisle .oi, .afull .oi, .atile .acov .oi { font-size: inherit; }
.asleep { flex-direction: row; white-space: nowrap; width: auto; } .asleep .oi { display: inline-block; }
.cimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.atile .acov .cimg { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; z-index: 1; filter: brightness(.65); }
.atile.apic .acov > .oi, .atile.apic .acov > .aspin, .msg.out .atile.apic .acov > .oi { z-index: 2; color: #fff; }
.acov.sm .cimg { border-radius: 50%; } .acov.big { overflow: hidden; }
.play .acov.sm .cimg { animation: aspin 14s linear infinite; }
/* Аудиоплеер: громкость, очередь, переход к сообщению */
.avolbox { display: none; align-items: center; gap: 6px; margin-left: 8px; flex: 1; min-width: 0; max-width: 150px; color: var(--text2); }
@media (hover: hover) and (pointer: fine) { .avolbox { display: flex; } }
.avi { display: grid; place-items: center; font-size: 18px; cursor: pointer; }
.avol { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 16px; margin: 0; background: none; cursor: pointer; }
.avol::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--v, 100%), var(--line) var(--v, 100%)); }
.avol::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line); } .avol::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--accent); }
.avol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: var(--accent); }
.avol::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--accent); }
.aqueue { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); border-radius: inherit; background: var(--surface);
  opacity: 0; translate: 0 24px; pointer-events: none; transition: opacity .22s, translate .3s cubic-bezier(.16, 1, .3, 1); }
.aqueue.on { opacity: 1; translate: 0 0; pointer-events: auto; }
.aqhd { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px 12px; } .aqhd b { font-size: 18px; font-weight: 700; }
.aqlist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.aqrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border-radius: 14px; text-align: left; }
.aqrow:hover { background: var(--hover); } .aqrow.on { background: var(--soft); } .aqrow.on .aqt b { color: var(--accent); }
.aqc { position: relative; width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; overflow: hidden; color: #fff; font-size: 19px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.aqt { flex: 1; min-width: 0; display: grid; } .aqt b { font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aqt small { font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.msg.aflash { animation: aflash 1.4s ease-out; } @keyframes aflash { 0%, 35% { filter: brightness(1.18); transform: scale(1.015); } }
.atile small { display: flex; align-items: baseline; } .atile .al { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.avolbox { flex: none; width: 118px; } .avol { outline: none; }
.atile .acov > .cimg { position: absolute; }
.atile small .ghost, .atile small .achip { flex: none; }
.aib.dim.act { color: var(--accent); background: var(--soft); }
.afull .low { flex-wrap: wrap; } .avolbox { order: 9; flex: 1 0 100%; width: auto; max-width: none; margin: 10px 0 0; }
/* Редактор фото */
.pe { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #0b0d12; color: #fff; user-select: none; -webkit-user-select: none; animation: pein .2s ease-out; }
@keyframes pein { from { opacity: 0; transform: scale(.98); } }
.pe-top { display: flex; align-items: center; gap: 6px; height: 54px; padding: calc(env(safe-area-inset-top)) 10px 0 6px; box-sizing: content-box; } .pe-top .gap { flex: 1; }
.pe-ib { width: 44px; height: 44px; display: grid; place-items: center; font-size: 23px; color: #fff; border-radius: 50%; } .pe-ib:disabled { opacity: .25; }
.pe-done { height: 40px; padding: 0 18px; border-radius: 20px; background: #4c82f7; color: #fff; font-size: 15px; font-weight: 600; } .pe-done:disabled { opacity: .5; }
.pe-cv { flex: 1; min-height: 0; width: 100%; touch-action: none; }
.pe-panel { align-self: center; width: 100%; max-width: 560px; padding: 8px 12px 4px; display: flex; flex-direction: column; gap: 8px; min-height: 92px; box-sizing: border-box; }
.pe-row { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pe-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 14px; background: #232833; color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pe-chip.on { background: #4c82f7; } .pe-chip .oi { font-size: 18px; }
.pe-hint { color: #9aa3b5; font-size: 12.5px; line-height: 1.25; }
.pe-colors { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.pe-col { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); box-sizing: border-box; } .pe-col.on { border: 3px solid #4c82f7; }
.pe-size { flex: 1; min-width: 60px; max-width: 150px; accent-color: #4c82f7; }
.pe-text { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 12px; border: 0; outline: none; background: #232833; color: #fff; font: inherit; font-size: 15px; }
.pe-tabs { align-self: center; width: 100%; max-width: 560px; display: flex; gap: 6px; padding: 0 8px calc(6px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.pe-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0; border-radius: 16px; color: #9aa3b5; font-size: 11.5px; font-weight: 600; }
.pe-tab .oi { font-size: 22px; } .pe-tab.on { background: #232833; color: #fff; }

/* ================= Мини-приложения: значок, лист согласия; «Для бизнеса» (biz.js, как ui/screens/business.dart) ================= */
:root { --warn: #e08a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --warn: #fbbf24; } }
:root[data-theme="dark"] { --warn: #fbbf24; }
/* Значок сервиса (MiniAppIcon): буквы на плитке, поверх — картинка; у владельца (BizAppIcon) — цветная плитка */
.aicon, .bicon { position: relative; flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 700; line-height: 1; letter-spacing: -.2px; }
.aicon { background: var(--field); color: var(--text2); } .bicon { color: #fff; }
.aicon img, .bicon img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover; opacity: 0; transition: opacity .2s; }
.aicon img.on, .bicon img.on { opacity: 1; }
/* Лист согласия и лист бизнеса по ссылке (miniAppConsent) */
.mc { padding: 2px 24px 8px; display: flex; flex-direction: column; text-align: center; }
.mc-ic { display: flex; justify-content: center; } .mc-ic .aicon { box-shadow: 0 6px 20px rgba(var(--sh), calc(var(--sha) * 1.4)); }
.mc h2 { margin: 16px 0 0; font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -.4px; overflow-wrap: anywhere; }
.mc p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--text2); overflow-wrap: anywhere; }
.mc-list { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--field); display: grid; gap: 10px; text-align: left; }
.mc-row { display: flex; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.3; } .mc-row .oi { font-size: 20px; color: var(--accent); }
.mc-go { display: grid; place-items: center; height: 50px; margin-top: 18px; border-radius: 16px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; transition: transform .26s var(--spring); }
.mc-go:active { transform: scale(.98); }
.mc-no { height: 48px; margin-top: 8px; border-radius: 16px; background: var(--alt); color: var(--text); font-size: 15.5px; }
.mc small { margin-top: 10px; font-size: 12.5px; line-height: 1.35; color: var(--text3); }
.mc-err { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); } .mc-err .oi { font-size: 32px; }
.mc > .note { padding: 36px 0 28px; }
@media (min-width: 760px) { .bs.mc-box { max-width: 400px; } .mc { padding-top: 14px; } }
/* Раздел «Для бизнеса»: карточки (_Card), строки, плашки */
.bz-anim > * { animation: rise .42s var(--ease) both; }
.bz-anim > :nth-child(2) { animation-delay: .045s; } .bz-anim > :nth-child(3) { animation-delay: .09s; } .bz-anim > :nth-child(4) { animation-delay: .135s; }
.bz-anim > :nth-child(5) { animation-delay: .18s; } .bz-anim > :nth-child(n+6) { animation-delay: .225s; }
.bz-page .hint + .grp { margin-top: 12px; }
.bz-card { padding: 16px; }
.bz-hero { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.bz-hero > i { width: 54px; height: 54px; flex: none; border-radius: 17px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); } .bz-hero > i .oi { font-size: 28px; }
.bz-hero b { display: block; font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -.3px; }
.bz-hero p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--text2); }
.bz-tool, .bz-row { gap: 16px; padding: 11px 12px 11px 16px; }
.bz-tools > .mrow + .mrow::before { left: 74px; } .bz-list > .mrow + .mrow::before { left: 76px; }
.bz-tool .mrow-t b, .bz-row .mrow-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.bz-tool .mrow-t small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
.bz-pill { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-size: 13.5px; font-weight: 700; }
.mrow-t .bz-st { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.bz-st > i { flex: none; width: 8px; height: 8px; border-radius: 50%; } .bz-st > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-st.ok > i { background: var(--success); } .bz-st.wait > i { background: var(--warn); } .bz-st.bad > i { background: var(--danger); }
.bz-add { width: 44px; height: 44px; flex: none; border-radius: 11.4px; display: grid; place-items: center; background: var(--soft); color: var(--accent); } .bz-add .oi { font-size: 22px; }
.bz-create > b { flex: 1; font-size: 16px; font-weight: 600; color: var(--accent); }
.bz-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 20px 20px; }
.bz-rings { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--soft) 40%, transparent); }
.bz-rings > i { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--soft) 75%, transparent); }
.bz-rings > i > i { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); } .bz-rings .oi { font-size: 28px; }
.bz-empty > b { margin-top: 14px; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.bz-empty > p { margin: 6px 0 18px; font-size: 14.5px; line-height: 1.45; color: var(--text2); }
.bz-retry { display: grid; justify-items: center; gap: 10px; text-align: center; } .bz-retry p { margin: 0; font-size: 14.5px; color: var(--text2); }
.bz-how { list-style: none; padding: 14px 16px; display: grid; gap: 12px; }
.bz-how li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--text2); }
.bz-how li > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-size: 13px; font-weight: 800; }
.bz-how li > span { padding-top: 3px; } .bz-how strong { color: var(--text); font-weight: 700; }
/* Форма: фото, название, пара слов о деле */
.bz-form { padding: 8px 16px 0; display: flex; flex-direction: column; }
.bz-photowrap, .bz-center { display: flex; justify-content: center; } .bz-center { margin-top: 8px; }
.bz-photo { position: relative; flex: none; border-radius: 24px; transition: transform .26s var(--spring); } .bz-photo:active { transform: scale(.95); }
.bz-photo0 { width: 92px; height: 92px; border-radius: 23.9px; display: grid; place-items: center; background: var(--soft); color: var(--accent); } .bz-photo0 .oi { font-size: 34px; }
.bz-cam { position: absolute; right: -4px; bottom: -4px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 0 0 3px var(--ring, var(--canvas)); }
.bz-cam .oi { font-size: 15px; }
.bz-note { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--text3); text-align: center; }
.bz-form label { display: block; margin-top: 20px; } .bz-form label + label { margin-top: 16px; }
.bz-form label > span { display: block; margin: 0 0 6px 4px; font-size: 13.5px; font-weight: 600; color: var(--text2); }
.bz-form label > small { display: block; margin: 6px 4px 0; font-size: 12.5px; line-height: 1.35; color: var(--text3); }
.bz-form .inp { background: var(--surface); padding: 14px; } .bz-form .bz-name { font-weight: 600; }
.bz-form > .bbtn { margin-top: 24px; } .bz-form > .bbtn + .bz-note { margin-top: 10px; }
/* Ключ подключения */
.bz-keyhead { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 24px 18px; }
.bz-keyic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); animation: popin .45s var(--spring) both; } .bz-keyic .oi { font-size: 34px; }
.bz-keyhead b { margin-top: 14px; font-size: 21px; line-height: 1.25; font-weight: 800; letter-spacing: -.4px; }
.bz-keyhead p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--text2); overflow-wrap: anywhere; }
.bz-keycard { display: flex; align-items: center; gap: 4px; padding: 12px 6px 12px 16px; }
.bz-key { flex: 1; min-width: 0; font: 400 15.5px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace; letter-spacing: .2px; word-break: break-all; user-select: all; -webkit-user-select: all; }
.bz-pad { padding: 12px 14px 0; }
.bz-notice { display: flex; gap: 10px; align-items: flex-start; margin: 14px 14px 0; padding: 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.bz-notice > .oi { font-size: 21px; color: var(--warn); } .bz-notice > div { flex: 1; min-width: 0; }
.bz-notice b { display: block; font-size: 14.5px; line-height: 1.3; font-weight: 700; } .bz-notice p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--text2); }
.bz-notice.danger { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); } .bz-notice.danger > .oi { color: var(--danger); }
.bz-nacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* Кнопки плашки — FilledButton и OutlinedButton приложения: скругление 16, у обведённой текст основного цвета */
:root { --outline: #d9deea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --outline: #30364a; } }
:root[data-theme="dark"] { --outline: #30364a; }
.bz-nbtn { height: 38px; padding: 0 14px; border-radius: 16px; font-size: 15px; font-weight: 600; } .bz-nbtn.fill { background: var(--accent); color: #fff; }
.bz-nbtn.line { box-shadow: inset 0 0 0 1.4px var(--outline); color: var(--text); }
.bz-end { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; } .bz-end > * { flex: none; }
.bz-softbtn { width: 100%; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--soft); color: var(--accent); font-size: 15.5px; font-weight: 700; }
.bz-softbtn .oi { font-size: 19px; }
/* Карточка мини-приложения */
.bz-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 18px 18px; margin-top: 4px; }
.bz-head > b { margin-top: 12px; font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -.4px; overflow-wrap: anywhere; }
.bz-head > p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--text2); overflow-wrap: anywhere; }
.bz-chip { --chip: 12%; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 12px; padding: 6px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.3; font-weight: 700; }
.bz-chip .oi { font-size: 16px; } .bz-chip > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-chip.ok { color: var(--success); background: color-mix(in srgb, var(--success) var(--chip), transparent); }
.bz-chip.wait { color: var(--warn); background: color-mix(in srgb, var(--warn) var(--chip), transparent); }
.bz-chip.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) var(--chip), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bz-chip { --chip: 18%; } }
:root[data-theme="dark"] .bz-chip { --chip: 18%; }
.bz-linkcard { padding: 12px; }
.bz-linkf { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; background: var(--field); }
.bz-linkf .oi { font-size: 18px; color: var(--text3); } .bz-linkf span { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.bz-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.bz-act { height: 64px; min-width: 0; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--soft); color: var(--accent); transition: transform .26s var(--spring); }
.bz-act:active { transform: scale(.96); } .bz-act .oi { font-size: 22px; }
.bz-act span { max-width: 100%; padding: 0 4px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--text3); text-align: center; }
/* QR-код (_BizQrDialog) */
.bz-qrdlg { max-width: 380px; padding: 22px 20px 12px; text-align: center; }
.bz-qrcard { display: flex; flex-direction: column; align-items: center; padding: 18px 18px 16px; border-radius: 28px; background: var(--grad); color: #fff; }
.bz-qr { width: min(224px, 100%); border-radius: 10%; overflow: hidden; background: #fff; } .bz-qr svg { display: block; width: 100%; height: auto; }
.bz-qrcard b { margin-top: 12px; max-width: 100%; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -.2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bz-qrcard span { margin-top: 2px; font-size: 13.5px; color: rgba(255, 255, 255, .88); }
.bz-qrlink { margin: 12px 0 0; font-size: 13.5px; color: var(--text2); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.bz-qbtns { display: grid; gap: 8px; margin-top: 14px; }
.bz-qbtn { height: 48px; padding: 0 16px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600; }
.bz-qbtn .oi { font-size: 19px; } .bz-qbtn.soft { background: var(--soft); color: var(--accent); } .bz-qbtn.fill { background: var(--accent); color: #fff; font-weight: 700; }
.bz-qbtn:disabled { opacity: .6; } .bz-qclose { margin-top: 4px; }
.dlg-back:has(.bz-qrdlg) { padding: 24px 22px; }
.bz-drop { color: var(--text2); }

/* ================= Второй номер «как вторая SIM-карта»: метка номера у чата и экран «Мои номера» (ui/screens/numbers2.dart) ================= */
/* Метка у личного чата (LineTagChip) — чей это номер: в списке чатов, в шапке чата и в журнале звонков.
   Размеры как у метки «запрос»; серая, а у чата моего второго номера — янтарная (warning, подложка 16 %).
   Когда в строке тесно (длинная своя подпись), метка сжимается охотнее имени. */
.ltag { flex: 0 3 auto; min-width: 0; max-width: 150px; margin-left: 6px; padding: 2px 7px; border-radius: 8px; background: color-mix(in srgb, var(--text3) 16%, transparent); color: var(--text2);
  font: 600 11.5px/1.2 Onest, sans-serif; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltag.two { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chead b .ltag { max-width: 130px; }
.crow-1 { display: flex; align-items: center; min-width: 0; } .crow-1 b { min-width: 0; } .crow-1 .ltag { max-width: 120px; }
/* «Мои номера»: карточка на номер — цифра на плитке (первый — синяя, второй — оранжевая), подпись, номер, «скопировать» и «подписать» */
.ncard { display: flex; align-items: center; margin: 0 14px 12px; padding: 14px 8px 14px 16px; border-radius: 20px; background: var(--surface); }
.ncard:first-child { margin-top: 6px; }
.ncard .nn { width: 44px; height: 44px; flex: none; margin-right: 14px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  font-size: 19px; line-height: 1; font-weight: 800; }
.ncard.two .nn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.ncard .t { flex: 1; min-width: 0; }
.ncard small { display: block; font-size: 13.5px; line-height: 1.3; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ncard b { display: block; margin-top: 2px; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }
.nissue { padding: 4px 14px 0; }
.nhint { padding: 14px 26px 0; line-height: 1.45; color: var(--text3); }
/* Переключатель номера в «Моей ссылке»: подписи свои, длинная обрезается */
.seg.cut button { min-width: 0; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Опросы, кружки, истории (polls.js, rounds.js, stories.js) — с версии 1.32 ---------- */
:root { --pl-track: color-mix(in srgb, var(--accent) 6.5%, transparent); --pl-bar: color-mix(in srgb, var(--accent) 15%, transparent); --pl-top: color-mix(in srgb, var(--accent) 28%, transparent);
  --pl-goodbar: color-mix(in srgb, var(--success) 20%, transparent); --pl-badbar: color-mix(in srgb, var(--danger) 16%, transparent);
  --rn-track: color-mix(in srgb, var(--accent) 20%, transparent); --rn-shadow: 0 9px 22px -6px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .1); --st-old: #c9d0de; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --pl-track: rgba(255, 255, 255, .055); --pl-bar: color-mix(in srgb, var(--accent) 24%, transparent); --pl-top: color-mix(in srgb, var(--accent) 42%, transparent);
    --pl-goodbar: color-mix(in srgb, var(--success) 30%, transparent); --pl-badbar: color-mix(in srgb, var(--danger) 28%, transparent);
    --rn-track: color-mix(in srgb, var(--accent) 26%, transparent); --rn-shadow: 0 9px 22px -6px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .3); --st-old: #4a5268; }
}
:root[data-theme="dark"] { --pl-track: rgba(255, 255, 255, .055); --pl-bar: color-mix(in srgb, var(--accent) 24%, transparent); --pl-top: color-mix(in srgb, var(--accent) 42%, transparent);
  --pl-goodbar: color-mix(in srgb, var(--success) 30%, transparent); --pl-badbar: color-mix(in srgb, var(--danger) 28%, transparent);
  --rn-track: color-mix(in srgb, var(--accent) 26%, transparent); --rn-shadow: 0 9px 22px -6px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .3); --st-old: #4a5268; }
.pc [hidden], .sc [hidden], .sv [hidden], .rr [hidden], .pv [hidden], .round [hidden], .sts[hidden], .fwrap button[hidden] { display: none !important; }

/* Опрос в пузыре: цвета входящего (светлая подложка) и исходящего (цветной переход) сообщения — _Tone в polls.dart */
.poll { --pf: var(--text); --pd: var(--text2); --pm: var(--accent); --pom: #fff; --ptrack: var(--pl-track); --pbar: var(--pl-bar); --ptop: var(--pl-top);
  --pgood: var(--success); --pongood: #fff; --pbad: var(--danger); --ponbad: #fff; --pgoodbar: var(--pl-goodbar); --pbadbar: var(--pl-badbar); --pgoodtext: var(--success); --pring: var(--in);
  width: 340px; max-width: 100%; color: var(--pf); }
.msg.out .poll { --pf: #fff; --pd: var(--meta-out); --pm: #fff; --pom: var(--out); --ptrack: rgba(255, 255, 255, .13); --pbar: rgba(255, 255, 255, .19); --ptop: rgba(255, 255, 255, .33);
  --pgood: #fff; --pongood: #138a4a; --pbad: #fff; --ponbad: #d93a40; --pgoodbar: rgba(255, 255, 255, .34); --pbadbar: rgba(255, 255, 255, .13); --pgoodtext: #fff; --pring: rgba(255, 255, 255, .85); }
.msg.pmsg .bub { padding: 9px 13px 8px; }
.pl-q { font-size: 16.5px; line-height: 1.25; font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-kind { display: flex; gap: 5px; margin: 4px 0 9px; font-size: 12.5px; line-height: 1.25; color: var(--pd); } .pl-kind .oi { font-size: 15px; }
.pl-o { position: relative; display: flex; align-items: flex-start; width: 100%; margin-bottom: 6px; padding: 8px 10px; border-radius: 12px; background: var(--ptrack); overflow: hidden; text-align: left; color: inherit; font: inherit; }
button.pl-o:active { filter: brightness(.94); }
.pl-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 0 7px 7px 0; background: var(--pbar); transition: width .52s var(--ease), background .22s; }
.pl-bar.ptop { background: var(--ptop); } .pl-bar.good { background: var(--pgoodbar); } .pl-bar.bad { background: var(--pbadbar); } .pl-bar.pale { opacity: .55; }
.pl-lead { position: relative; width: 42px; height: 22px; flex: none; display: flex; align-items: center; }
.pl-mark { width: 21px; height: 21px; flex: none; box-sizing: border-box; border-radius: 50%; border: 1.7px solid var(--pd); color: var(--pom); display: grid; place-items: center; transition: background .14s, border-color .14s; }
.pl-mark.sq { border-radius: 6px; } .pl-mark .oi { font-size: 13px; transform: scale(0); transition: transform .22s var(--spring); }
.pl-mark.on { background: var(--pm); border-color: var(--pm); } .pl-mark.on .oi { transform: none; }
.pl-mark.idle { border-width: 1.6px; border-color: color-mix(in srgb, var(--pd) 40%, transparent); }
.pl-badge { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; } .pl-badge .oi { font-size: 12px; } .pl-badge.big { width: 21px; height: 21px; }
.pl-badge.mk { background: var(--pm); color: var(--pom); } .pl-badge.good { background: var(--pgood); color: var(--pongood); } .pl-badge.bad { background: var(--pbad); color: var(--ponbad); }
.pl-pc { font-size: 14px; line-height: 1.5; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; } .pl-pc.ptop { color: var(--pm); } .pl-pc.good { color: var(--pgoodtext); }
.pl-t { position: relative; flex: 1; min-width: 0; padding-top: 1px; }
.pl-text { display: block; font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; } .pl-o.strong .pl-text { font-weight: 600; }
.pl-sub { display: flex; align-items: flex-start; gap: 6px; margin-top: 3px; font-size: 12.5px; line-height: 1.25; color: var(--pd); } .pl-sub > span:last-child { padding-top: 1px; }
.pl-faces { display: flex; flex: none; } .pl-faces .av { box-shadow: 0 0 0 1px var(--pring); } .pl-faces .av + .av { margin-left: -5px; }
.pl-tail { position: relative; flex: none; height: 20px; margin: 1px 0 0 8px; display: grid; place-items: center; } .pl-tail .aspin { width: 16px; height: 16px; border-width: 2px; color: var(--pm); }
.pl-dim { font-size: 12.5px; font-weight: 600; color: var(--pd); }
.pl-vote { display: block; width: 100%; height: 40px; margin: 2px 0 4px; border-radius: 12px; background: var(--pm); color: var(--pom); font-size: 14.5px; font-weight: 600; transition: background .16s, color .16s; }
.pl-vote:disabled { background: var(--ptrack); color: var(--pd); cursor: default; }
.pl-exp { display: flex; gap: 8px; margin: 1px 0 5px; padding: 8px 11px 9px 10px; border-radius: 12px; background: var(--ptrack); font-size: 14.5px; line-height: 1.35; } .pl-exp .oi { margin-top: 1px; font-size: 17px; color: var(--pm); }
.pl-blind { display: flex; gap: 6px; margin: 1px 0 4px; font-size: 12.5px; line-height: 1.3; color: var(--pd); } .pl-blind .oi { margin-top: 1px; font-size: 15px; }
.pl-foot { margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--pd); } .pl-foot-t { overflow-wrap: anywhere; }
.pl-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; margin-top: 2px; }
.pl-link { padding: 5px 0; font-size: 13.5px; line-height: 1.2; font-weight: 600; color: var(--pm); } .pl-link:disabled { opacity: .5; cursor: default; } .pl-links .ghost { height: 15px; }
/* Лист «Кто голосовал» и «Просмотры» */
.pv-sub { margin: 0; padding: 0 22px 10px; font-size: 14px; line-height: 1.35; color: var(--text2); }
.pv-list .urow { gap: 13px; padding: 7px 22px; } .pv-list .urow b { font-weight: 500; }
.pv-date { flex: none; font-size: 13px; color: var(--text3); } .pv-like { font-size: 17px; color: #ff4d6d; }
.pv-more { padding: 18px 0; text-align: center; } .pv-more .dots { margin: 0; }
.pv-err { padding: 10px 22px 12px; text-align: center; font-size: 14.5px; line-height: 1.4; color: var(--text2); } .pv-err p { margin: 0 0 4px; }
/* Экран «Новый опрос» */
.sub.pc .sub-body { padding-bottom: 0; }
.pc-pad { padding: 4px 18px; } .pc-opts { padding: 1px 0; }
.pc-q { display: block; width: 100%; border: 0; outline: 0; resize: none; background: none; padding: 12px 0; color: var(--text); font: 600 17.5px/1.3 Onest, sans-serif; }
.pc-q.sm { font-weight: 400; font-size: 16px; line-height: 1.35; } .pc-q::placeholder, .pc-in::placeholder { color: var(--text3); font-weight: 400; }
.pc-row { position: relative; display: flex; align-items: center; padding: 0 4px 0 6px; }
.pc-row + .pc-row::before, .pc-per::before { content: ""; position: absolute; left: 54px; right: 0; top: 0; height: 1px; background: color-mix(in srgb, var(--line) 80%, transparent); }
.pc-per { position: relative; } .pc-per::before { left: 68px; }
.pc-mark { flex: none; padding: 12px; border-radius: 50%; display: grid; cursor: default; } .pc-mark.quiz { cursor: pointer; }
.pc-mark .pl-mark { --pd: var(--text3); --pm: var(--accent); --pom: #fff; } .pc-mark.quiz .pl-mark { --pd: var(--text2); --pm: var(--success); }
.pc-in { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 12px 0; color: var(--text); font: 16px/1.3 Onest, sans-serif; }
.pc-row .ib { width: 44px; height: 44px; color: var(--text3); }
.pc .mrow.off { opacity: .5; } .pc .mrow .sw:disabled { cursor: default; }
.pc-send { position: sticky; bottom: 0; z-index: 1; margin-top: auto; padding: 20px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--canvas) 26%); }
.pc-send .bbtn .oi { font-size: 20px; }
/* Лист скрепки */
.att { padding: 0 6px 4px; } .att .mrow { border-radius: 14px; } .att .mrow:hover { background: var(--hover); }

/* Кружок: без пузыря, круг с обложкой, кольцо хода, значок посередине (round_tile.dart) */
.rn-col { min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; } .msg.out .rn-col { align-items: flex-end; }
.bub.rn-head { max-width: 250px; margin: 0 7px 1px; padding: 6px 11px 2px; border-radius: 16px; }
.round { --d: min(240px, 62vw); position: relative; flex: none; width: calc(var(--d) + 14px); height: calc(var(--d) + 27px); }
.msg.new .round { animation: msgin .36s var(--ease); }
.rn-disc { position: absolute; left: 7px; top: 7px; width: var(--d); height: var(--d); border-radius: 50%; overflow: hidden; isolation: isolate; background: radial-gradient(circle at 35% 30%, #343848, #14151b); box-shadow: var(--rn-shadow); }
.rn-disc::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); pointer-events: none; }
.rn-tiny { position: absolute; inset: -8%; background: center / cover; filter: blur(12px); }
.rn-disc img, .rn-v, .rn-v video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rn-disc img { opacity: 0; transition: opacity .25s; } .rn-disc img.on { opacity: 1; }
.rn-shade { position: absolute; inset: 0; z-index: 2; background: radial-gradient(circle, rgba(0, 0, 0, .2), rgba(0, 0, 0, .08) 75%); pointer-events: none; transition: opacity .22s; } .round.play .rn-shade { opacity: 0; }
.rn-ring { position: absolute; left: 0; top: 0; width: calc(var(--d) + 14px); height: calc(var(--d) + 14px); pointer-events: none; opacity: 0; transition: opacity .2s; } .round.on .rn-ring { opacity: 1; }
.rn-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.rn-ring circle { fill: none; stroke-width: 1.2; } .rn-ring .t { stroke: var(--rn-track); }
.rn-ring .p { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 0 1; transition: stroke-dasharray .26s linear; } .rn-ring .p.zero { opacity: 0; }
.rn-badge { position: absolute; left: calc(var(--d) / 2 - 20px); top: calc(var(--d) / 2 - 20px); width: 54px; height: 54px; border-radius: 50%; background: rgba(0, 0, 0, .42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  color: #fff; display: grid; place-items: center; pointer-events: none; transition: opacity .15s, transform .15s; }
.rn-badge .oi { margin-left: 2px; font-size: 25px; } .rn-badge .aspin { width: 26px; height: 26px; } .rn-badge.off { opacity: 0; transform: scale(.7); }
.rn-dur, .msg .round .meta { position: absolute; bottom: 0; padding: 3.5px 8px; border-radius: 11px; background: var(--service); color: var(--service-text); font-size: 11.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rn-dur { left: 7px; } .msg .round .meta { right: 7px; } .msg .round .meta .read { color: var(--accent); }
.rmsg .reacts { margin: 5px 7px 0; padding-right: 0; }
/* Запись кружка */
.rr { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(20px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  background: rgba(8, 10, 17, .94); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .2s; }
.rr-stage { --d: min(300px, 74vw, 46vh); position: relative; flex: none; width: calc(var(--d) + 14px); height: calc(var(--d) + 14px); }
.rr-disc { position: absolute; inset: 7px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 35% 30%, #343848, #14151b); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }
.rr-v { display: block; width: 100%; height: 100%; object-fit: cover; } .rr-v.mir { transform: scaleX(-1); }
.rr-ring { opacity: 1; } .rr-ring .t { stroke: rgba(255, 255, 255, .18); } .rr-ring .p { stroke: #5b9bff; }
.rr-time { margin-top: 22px; display: flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rr-time .rd { width: 10px; height: 10px; border-radius: 50%; background: #ff5a66; opacity: .3; } .rr.recording .rr-time .rd { opacity: 1; animation: blink 1s ease-in-out infinite; }
.rr-note { margin: 6px 0 0; font-size: 14.5px; text-align: center; color: rgba(255, 255, 255, .72); }
.rr-acts { margin-top: 34px; display: flex; justify-content: center; gap: 22px; }
.rr-b { width: 96px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; line-height: 1.2; color: rgba(255, 255, 255, .86); }
.rr-b i { width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; transition: transform .2s var(--spring); } .rr-b i .oi { font-size: 26px; }
.rr-b:active i { transform: scale(.92); } .rr-b.no i { color: #ff6b78; } .rr-b.go i { background: var(--grad); box-shadow: var(--glow); } .rr-b:disabled { opacity: .45; }

/* Истории: полоса над личными чатами (row.dart, ring.dart) */
.sts { height: 104px; flex: none; display: flex; overflow-x: auto; padding: 6px 6px 4px; scrollbar-width: none; overscroll-behavior-x: contain; } .sts::-webkit-scrollbar { display: none; }
.st-i { width: 78px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; transition: transform .2s var(--spring); } .st-i:active { transform: scale(.93); }
.st-i > span:last-child { max-width: 100%; padding: 0 1px; font-size: 12px; line-height: 1.25; font-weight: 500; letter-spacing: -.25px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-i.new > span:last-child { font-weight: 600; color: var(--text); }
.st-i.enter { animation: stin .42s var(--ease) backwards; } @keyframes stin { from { opacity: 0; transform: translateX(14px) scale(.9); } }
.st-ring { position: relative; flex: none; display: grid; place-items: center; } .st-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-ring .old { stroke: var(--st-old); } .st-ring .g1 { stop-color: var(--accent); } .st-ring .g2 { stop-color: var(--accent2); }
.st-plus { position: absolute; right: 1px; bottom: 1px; width: 23px; height: 23px; box-sizing: border-box; border-radius: 50%; background: var(--grad); border: 2.2px solid var(--surface); color: #fff; display: grid; place-items: center; }
.st-plus .oi { font-size: 12.5px; } .st-ring.add .av { margin: 5.4px; }
/* Цитата «История» у сообщения-ответа (quote.dart) */
.quote.sq { display: flex; align-items: center; gap: 9px; max-width: 100%; padding: 5px 10px 6px 11px; text-align: left; font: inherit; color: inherit; }
.sq-pic { width: 28px; height: 38px; flex: none; border-radius: 6px; background: color-mix(in srgb, var(--q) 22%, transparent) center / cover; color: var(--q); display: grid; place-items: center; } .sq-pic .oi { font-size: 17px; }
.quote .sq-t { min-width: 0; opacity: 1; overflow: visible; } .quote .sq-t span { opacity: .86; }
/* Просмотр историй на весь экран (viewer.dart): на телефоне — весь экран, в широком окне — карточка 9:16 со стрелками */
.sv { --sv-dim: 1; position: fixed; inset: 0; z-index: 66; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, var(--sv-dim)); color: #fff; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; animation: fade .2s; }
.sv.out { opacity: 0; pointer-events: none; transition: opacity .18s; }
.sv-card { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; }
.sv-media { position: absolute; inset: 0; overflow: hidden; } .sv-media.fromr { animation: svr .28s var(--ease); } .sv-media.froml { animation: svl .28s var(--ease); }
@keyframes svr { from { opacity: .4; transform: translateX(12%) scale(.94); } } @keyframes svl { from { opacity: .4; transform: translateX(-12%) scale(.94); } }
.sv-blur { position: absolute; inset: -10%; background: center / cover; filter: blur(28px) brightness(.7); }
.sv-media img, .sv-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s; }
.sv-media.cover img, .sv-media.cover video { object-fit: cover; } .sv-media .on { opacity: 1; } .sv-media .sv-poster { transition-duration: .12s; }
.sv-shade { position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .6), transparent 20%, transparent 62%, rgba(0, 0, 0, .7)); pointer-events: none; transition: opacity .15s; }
.sv-touch { position: absolute; inset: 0; touch-action: none; cursor: pointer; }
.sv-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(8px + env(safe-area-inset-top)) 4px 0 8px; pointer-events: none; transition: opacity .15s; }
.sv-segs { height: 2.6px; margin-right: 4px; display: flex; gap: 3.5px; } .sv-segs.many { gap: 2px; }
.sv-segs i { flex: 1; min-width: 0; border-radius: 2px; background: rgba(255, 255, 255, .34); overflow: hidden; } .sv-segs b { display: block; width: 0; height: 100%; background: #fff; } .sv-segs .done b { width: 100% !important; }
.sv-head { margin-top: 8px; padding-left: 4px; display: flex; align-items: center; } .sv-head .av { margin-right: 10px; } .sv-head .t { flex: 1; min-width: 0; }
.sv-head b { display: block; font-size: 15px; line-height: 1.25; font-weight: 600; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-head small { display: block; font-size: 12.5px; line-height: 1.3; color: rgba(255, 255, 255, .74); }
.sv-hb { width: 40px; height: 40px; flex: none; border-radius: 50%; color: #fff; display: grid; place-items: center; pointer-events: auto; } .sv-hb .oi { font-size: 22px; } .sv-hb:hover { background: rgba(255, 255, 255, .12); }
.sv-bot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; transition: opacity .15s; }
.sv-cap { padding: 0 6px 12px; font-size: 15.5px; line-height: 1.38; font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }
.sv-bar { display: flex; align-items: flex-end; gap: 8px; } .sv-bar > * { pointer-events: auto; }
.sv-field { flex: 1; min-width: 0; min-height: 46px; display: flex; align-items: center; padding: 0 16px; border-radius: 23px; background: rgba(0, 0, 0, .28); border: 1.1px solid rgba(255, 255, 255, .42); }
.sv-field textarea { flex: 1; min-width: 0; max-height: 96px; border: 0; outline: 0; resize: none; background: none; padding: 12px 0; color: #fff; caret-color: #fff; font: 15.5px/1.3 Onest, sans-serif; user-select: text; -webkit-user-select: text; }
.sv-field textarea::placeholder { color: rgba(255, 255, 255, .72); }
.sv-act { width: 46px; height: 46px; flex: none; border-radius: 50%; background: rgba(0, 0, 0, .28); color: #fff; display: grid; place-items: center; transition: transform .2s var(--spring); } .sv-act:active { transform: scale(.86); }
.sv-act .oi { font-size: 25px; } .sv-act.liked { color: #ff4d6d; } .sv-act.send { background: var(--grad); } .sv-act.send .oi { font-size: 20px; } .sv-act .aspin { width: 18px; height: 18px; border-width: 2.2px; }
.sv-views { height: 44px; padding: 0 15px; border-radius: 22px; background: rgba(255, 255, 255, .16); color: #fff; display: flex; align-items: center; gap: 7px; font-size: 15px; }
.sv-views b { font-weight: 600; } .sv-views .oi { font-size: 20px; } .sv-views .lk { margin-left: 5px; font-size: 18px; color: #ff4d6d; }
.sv-bar .sv-left { margin: 0 6px 13px auto; font-size: 13px; color: rgba(255, 255, 255, .74); pointer-events: none; }
.sv-card.hold .sv-top, .sv-card.hold .sv-bot, .sv-card.hold .sv-shade { opacity: 0; }
.sv-spin, .sv-fail, .sv-pause, .sv-heart { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; }
.sv-spin.on { opacity: 1; transition: opacity .2s .3s; } .sv-spin .aspin { display: block; width: 34px; height: 34px; color: rgba(255, 255, 255, .7); }
.sv-fail { width: min(320px, 80%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 14.5px; line-height: 1.4; color: rgba(255, 255, 255, .7); } .sv-fail.on { opacity: 1; } .sv-fail .oi { font-size: 34px; }
.sv-pause { width: 68px; height: 68px; border-radius: 50%; background: rgba(0, 0, 0, .45); display: grid; place-items: center; } .sv-pause.on { opacity: 1; } .sv-pause .oi { font-size: 30px; }
.sv-heart .oi { font-size: 112px; color: #ff4d6d; text-shadow: 0 0 24px rgba(0, 0, 0, .4); } .sv-heart.on { animation: svheart .9s var(--ease) forwards; }
@keyframes svheart { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.3); } 40% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 55% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, calc(-50% - 16px)) scale(1); } }
.sv-arrow, .sv-x { display: none; }
@media (min-width: 760px) {
  .poll { width: 380px; } .sts { padding: 6px 8px 4px; }
  .sv { gap: 18px; background: rgba(5, 7, 15, calc(.9 * var(--sv-dim))); }
  .sv-card { flex: none; width: auto; height: min(920px, calc(100vh - 40px), calc((100vw - 176px) * 16 / 9)); aspect-ratio: 9 / 16; border-radius: 22px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6); }
  .sv-arrow, .sv-x { flex: none; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; transition: opacity .2s; }
  .sv-arrow .oi { font-size: 23px; } .sv-arrow.off { opacity: 0; pointer-events: none; } .sv-arrow:hover, .sv-x:hover { background: rgba(255, 255, 255, .2); }
  .sv-x { position: absolute; right: 14px; top: 14px; width: 42px; height: 42px; } .sv-x .oi { font-size: 21px; }
  .sv-top { padding-top: 8px; } .sv-bot { padding-bottom: 12px; }
}
/* Экран «Новая история» */
.sc-prev { position: relative; align-self: center; width: min(236px, 56%); aspect-ratio: 9 / 16; margin: 4px 0 14px; border-radius: 18px; overflow: hidden; background: #0b0d12; box-shadow: var(--card-shadow); }
.sc-prev img, .sc-prev video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sc-chip { position: absolute; right: 10px; bottom: 10px; height: 32px; padding: 0 12px; border-radius: 16px; background: rgba(0, 0, 0, .5); color: #fff; display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.sc-chip .oi { font-size: 16px; } .sc-chip.l { right: auto; left: 10px; font-weight: 500; }
.sc .inp { background: var(--surface); } .sc .sect { padding-top: 16px; }
.sc-who b { font-weight: 600; color: var(--text); } .sc-link { font-size: inherit; font-weight: 600; color: var(--accent); }
.sc-send { padding: 14px 14px 0; }
