/* BiarBy — палитра сохранена: изумрудный #2ecc71, тёмный #27ae60, светлый #68c398, фон #f5f6fa */
:root {
  --accent: #2ecc71; --accent-d: #27ae60; --accent-l: #68c398; --accent-bg: rgba(46, 204, 113, .12);
  --bg: #f5f6fa; --panel: #ffffff; --panel2: #f0f3f1; --text: #1c2b22; --muted: #7b8a82; --line: #e4eae6;
  --in: #ffffff; --out: #d6f5e2; --out-text: #123221; --danger: #e74c3c; --warn: #f39c12;
  --shadow: 0 6px 24px rgba(20, 50, 35, .14); --radius: 14px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1411; --panel: #151f1a; --panel2: #1b2822; --text: #e6f0ea; --muted: #8aa196; --line: #24332b;
  --in: #1d2a24; --out: #1d6b43; --out-text: #f1fff7; --shadow: 0 6px 24px rgba(0, 0, 0, .5); color-scheme: dark;
  --accent-bg: rgba(46, 204, 113, .16);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0d1411; --panel: #151f1a; --panel2: #1b2822; --text: #e6f0ea; --muted: #8aa196; --line: #24332b;
    --in: #1d2a24; --out: #1d6b43; --out-text: #f1fff7; --shadow: 0 6px 24px rgba(0, 0, 0, .5); color-scheme: dark;
    --accent-bg: rgba(46, 204, 113, .16);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 var(--font); overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-d); }
[hidden] { display: none !important; }
#app { height: 100dvh; height: 100svh; }
@supports (height: 100dvh) { #app { height: 100dvh; } }
.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 16px; height: 16px; } .ic.lg { width: 28px; height: 28px; }

/* загрузка */
.boot { height: 100%; display: grid; place-items: center; }
.boot-logo { width: 72px; height: 72px; border-radius: 20px; background: var(--accent) url(/assets/img/icon.svg) center/cover; animation: pulse 1.2s infinite ease-in-out; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .7; } }

/* кнопки/поля */
.btn { border: 0; background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 600; transition: background .15s, transform .05s; }
.btn:hover { background: var(--accent-d); } .btn:active { transform: scale(.97); }
.btn.ghost { background: var(--accent-bg); color: var(--accent-d); } .btn.ghost:hover { background: rgba(46, 204, 113, .22); }
.btn.danger { background: var(--danger); } .btn.block { width: 100%; } .btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--accent-bg); color: var(--accent-d); } .icon-btn.on { color: var(--accent-d); }
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin: 0 0 4px 2px; }
.input, textarea.input, select.input { width: 100%; border: 1.5px solid var(--line); background: var(--panel); border-radius: 12px; padding: 11px 13px; outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin: 4px 2px 0; } .err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 2px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex: none; transition: background .2s; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--accent); } .switch input:checked::after { transform: translateX(18px); }
.sw-t small { display: block; color: var(--muted); font-size: 12px; }

/* аватары */
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-l) center/cover no-repeat; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; position: relative; user-select: none; overflow: visible; }
.avatar.s { width: 32px; height: 32px; font-size: 13px; } .avatar.m { width: 40px; height: 40px; } .avatar.l { width: 96px; height: 96px; font-size: 34px; } .avatar.xl { width: 120px; height: 120px; font-size: 42px; }
.avatar .dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--panel); }

/* каркас */
.auth { min-height: 100%; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--accent-bg), transparent 60%), var(--bg); overflow: auto; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border-radius: 22px; padding: 28px 24px; box-shadow: var(--shadow); }
.auth-logo { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 12px; background: var(--accent) url(/assets/img/icon.svg) center/cover; }
.auth h1 { text-align: center; margin: 0 0 4px; font-size: 24px; } .auth .sub { text-align: center; color: var(--muted); margin: 0 0 20px; }
.auth .alt { text-align: center; margin-top: 14px; color: var(--muted); } .auth .alt a { cursor: pointer; font-weight: 600; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.shell { display: flex; height: 100%; overflow: hidden; position: relative; background: var(--bg); }
.side { width: 380px; max-width: 100%; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; flex: none; z-index: 2; padding-top: var(--sat); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--bg); padding-top: var(--sat); }
.main.empty { align-items: center; justify-content: center; color: var(--muted); text-align: center; background: radial-gradient(circle at 50% 40%, var(--accent-bg), transparent 55%), var(--bg); }
.main.empty .big { width: 96px; height: 96px; border-radius: 28px; background: var(--accent) url(/assets/img/icon.svg) center/cover; margin: 0 auto 14px; opacity: .9; }
@media (max-width: 820px) {
  .side { width: 100%; border: 0; }
  .main { position: absolute; inset: 0; transform: translateX(100%); transition: transform .26s cubic-bezier(.3, .8, .3, 1); z-index: 3; }
  .shell.chat-open .main { transform: none; }
  .main.empty { display: none; }
}
.top { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 58px; }
.search { flex: 1; position: relative; } .search .ic { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search input { width: 100%; border: 0; background: var(--panel2); border-radius: 22px; padding: 10px 14px 10px 40px; outline: none; }
.search input:focus { box-shadow: 0 0 0 2px var(--accent); }
.chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.chip { border: 0; background: var(--panel2); color: var(--muted); padding: 6px 13px; border-radius: 16px; white-space: nowrap; font-size: 13px; font-weight: 600; }
.chip.on { background: var(--accent); color: #fff; } .chip .n { margin-left: 5px; opacity: .85; }

.clist { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.ci { display: flex; gap: 12px; padding: 9px 12px; align-items: center; cursor: pointer; position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ci:hover { background: var(--panel2); } .ci.on { background: var(--accent-bg); }
.ci.pin { background: color-mix(in srgb, var(--panel2) 60%, transparent); }
.ci .b { flex: 1; min-width: 0; }
.ci .l1, .ci .l2 { display: flex; align-items: center; gap: 6px; } .ci .l2 { margin-top: 2px; color: var(--muted); }
.ci .nm { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ci .tm { font-size: 12px; color: var(--muted); flex: none; } .ci .pv { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ci .pv .who { color: var(--text); } .ci .pv .typing { color: var(--accent-d); }
.badge { background: var(--accent); color: #fff; border-radius: 11px; min-width: 22px; height: 22px; padding: 0 7px; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.badge.mut { background: var(--muted); }
.lock-i { color: var(--accent-d); display: inline-block; vertical-align: -3px; }
.sec-h { padding: 12px 14px 4px; font-size: 12px; color: var(--accent-d); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.empty-note { padding: 40px 20px; text-align: center; color: var(--muted); }
.fab { position: absolute; right: 18px; bottom: calc(18px + var(--sab)); width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(39, 174, 96, .5); display: grid; place-items: center; z-index: 5; }
.fab:hover { background: var(--accent-d); }
.conn { background: var(--warn); color: #fff; text-align: center; font-size: 12px; padding: 3px; }

/* заголовок чата */
.chead { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 58px; cursor: pointer; }
.chead .t { flex: 1; min-width: 0; } .chead .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.chead .st { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chead .st.on { color: var(--accent-d); }
.back { display: none; } @media (max-width: 820px) { .back { display: inline-grid; } }
.pinbar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); cursor: pointer; }
.pinbar .bar { width: 3px; align-self: stretch; background: var(--accent); border-radius: 2px; }
.pinbar .tx { flex: 1; min-width: 0; font-size: 13px; } .pinbar .tx b { color: var(--accent-d); display: block; font-size: 12px; } .pinbar .tx span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { padding: 8px 14px; font-size: 13px; background: color-mix(in srgb, var(--warn) 18%, var(--panel)); border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.banner.info { background: var(--accent-bg); } .banner .btn { padding: 4px 12px; font-size: 13px; border-radius: 9px; }

/* сообщения */
.msgs { flex: 1; overflow-y: auto; padding: 8px 10px 12px; overscroll-behavior: contain; position: relative; scroll-behavior: auto; }
.msgs-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; }
.day { align-self: center; background: color-mix(in srgb, var(--panel) 85%, transparent); color: var(--muted); font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 12px; margin: 10px 0 6px; position: sticky; top: 4px; z-index: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.sys { align-self: center; color: var(--muted); font-size: 13px; padding: 4px 12px; margin: 4px 0; text-align: center; }
.mrow { display: flex; gap: 8px; margin-top: 2px; align-items: flex-end; max-width: 100%; position: relative; }
.mrow.out { justify-content: flex-end; } .mrow.first { margin-top: 8px; }
.mrow.sel .bubble { outline: 2px solid var(--accent); } .mrow.sel { background: var(--accent-bg); border-radius: 10px; }
.mrow.flash .bubble { animation: flash 1.2s; } @keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } }
.sel-box { display: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); align-self: center; flex: none; margin: 0 4px; }
.selecting .sel-box { display: block; } .mrow.sel .sel-box { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/70% no-repeat; border-color: var(--accent); }
.bubble { max-width: min(78%, 560px); background: var(--in); border-radius: 16px; padding: 6px 10px 5px; position: relative; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .1); word-wrap: break-word; overflow-wrap: anywhere; min-width: 70px; }
.mrow.out .bubble { background: var(--out); color: var(--out-text); border-bottom-right-radius: 5px; } .mrow.in .bubble { border-bottom-left-radius: 5px; }
.bubble .au { font-weight: 700; font-size: 13px; color: var(--accent-d); cursor: pointer; margin-bottom: 1px; } .bubble .au .rl { font-weight: 500; color: var(--muted); font-size: 11px; margin-left: 4px; }
.bubble .tx { white-space: pre-wrap; } .bubble .tx a { word-break: break-all; }
.bubble .meta { float: right; margin: 6px 0 -3px 10px; font-size: 11px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; height: 16px; } .mrow.out .bubble .meta { color: color-mix(in srgb, var(--out-text) 65%, transparent); }
.bubble .meta .ic { width: 15px; height: 15px; stroke-width: 2.4; } .bubble .meta .rd { color: var(--accent-d); } .mrow.out .bubble .meta .rd { color: #2a8; }
:root[data-theme="dark"] .mrow.out .bubble .meta .rd { color: #8fe9b8; }
.bubble.stk { background: transparent !important; box-shadow: none; padding: 0; } .bubble.stk img { width: 170px; height: 170px; display: block; }
.bubble.stk .meta { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .38); color: #fff !important; padding: 0 7px; border-radius: 10px; margin: 0; }
.rq { border-left: 3px solid var(--accent); background: var(--accent-bg); border-radius: 4px 8px 8px 4px; padding: 3px 8px; margin: 2px 0 4px; font-size: 13px; cursor: pointer; overflow: hidden; }
.rq b { color: var(--accent-d); display: block; font-size: 12px; } .rq span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.fwd { font-size: 12px; color: var(--accent-d); font-weight: 600; margin-bottom: 2px; }
.lockedmsg { color: var(--muted); font-style: italic; display: flex; align-items: center; gap: 6px; cursor: pointer; } .lockedmsg small { display: block; font-style: normal; }
.react { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; clear: both; }
.react button { border: 0; background: var(--accent-bg); border-radius: 12px; padding: 1px 8px; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; } .react button.me { background: var(--accent); color: #fff; }
.mimg { display: block; max-width: 100%; max-height: 360px; border-radius: 10px; cursor: zoom-in; background: var(--panel2); min-width: 120px; min-height: 80px; object-fit: cover; }
.mfile { display: flex; gap: 10px; align-items: center; padding: 4px 2px; cursor: pointer; min-width: 190px; } .mfile .fi { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; } .mfile small { color: var(--muted); display: block; }
.voice { display: flex; gap: 10px; align-items: center; min-width: 210px; } .voice .pb { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; display: grid; place-items: center; flex: none; }
.voice .wv { flex: 1; height: 26px; background: repeating-linear-gradient(90deg, var(--accent-l) 0 2px, transparent 2px 5px); border-radius: 3px; position: relative; opacity: .8; overflow: hidden; } .voice .wv i { position: absolute; inset: 0 auto 0 0; background: var(--accent-d); mix-blend-mode: multiply; width: 0; opacity: .5; } .voice small { color: var(--muted); font-size: 11px; min-width: 32px; text-align: right; }
.msg-video { max-width: 100%; max-height: 340px; border-radius: 10px; display: block; background: #000; }
.typing-dots span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin: 0 1px; animation: dot 1.1s infinite; } .typing-dots span:nth-child(2) { animation-delay: .15s; } .typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.jump { position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 4; color: var(--muted); }
.jump .badge { position: absolute; top: -8px; right: -4px; } .loadmore { align-self: center; color: var(--muted); font-size: 12px; padding: 8px; }

/* композер */
.composer { background: var(--panel); border-top: 1px solid var(--line); padding: 8px 10px calc(8px + var(--sab)); position: relative; }
.crow { display: flex; align-items: flex-end; gap: 6px; max-width: 820px; margin: 0 auto; }
.cinput { flex: 1; background: var(--panel2); border-radius: 22px; padding: 9px 14px; max-height: 160px; min-height: 40px; overflow-y: auto; outline: none; border: 0; resize: none; line-height: 1.35; display: block; }
.send { background: var(--accent); color: #fff; border-radius: 50%; width: 42px; height: 42px; border: 0; display: grid; place-items: center; flex: none; } .send:hover { background: var(--accent-d); }
.cbar { display: flex; align-items: center; gap: 10px; max-width: 820px; margin: 0 auto 6px; padding: 2px 4px; } .cbar .bar { width: 3px; align-self: stretch; background: var(--accent); border-radius: 2px; } .cbar .tx { flex: 1; min-width: 0; font-size: 13px; } .cbar .tx b { color: var(--accent-d); display: block; } .cbar .tx span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.readonly { text-align: center; padding: 14px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: calc(14px + var(--sab)); }
.rec { display: flex; align-items: center; gap: 12px; flex: 1; padding: 0 8px; color: var(--danger); font-weight: 600; } .rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.attach-prev { display: flex; gap: 8px; overflow-x: auto; max-width: 820px; margin: 0 auto 8px; } .attach-prev .ap { position: relative; width: 74px; height: 74px; border-radius: 10px; background: var(--panel2) center/cover; flex: none; display: grid; place-items: center; font-size: 11px; text-align: center; padding: 4px; overflow: hidden; } .attach-prev .ap button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; line-height: 1; padding: 0; }
.selbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + var(--sab)); background: var(--panel); border-top: 1px solid var(--line); } .selbar .cnt { flex: 1; font-weight: 600; }
.drop { position: absolute; inset: 0; background: var(--accent-bg); border: 3px dashed var(--accent); display: grid; place-items: center; font-size: 20px; font-weight: 700; color: var(--accent-d); z-index: 20; pointer-events: none; }

/* панели эмодзи/стикеров */
.panel-pop { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 4px); max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); height: 320px; display: flex; flex-direction: column; z-index: 10; overflow: hidden; }
.pp-tabs { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; } .pp-tabs button { border: 0; background: transparent; border-radius: 10px; padding: 4px 8px; flex: none; min-width: 38px; height: 38px; display: grid; place-items: center; } .pp-tabs button.on { background: var(--accent-bg); } .pp-tabs img { width: 28px; height: 28px; object-fit: contain; }
.pp-body { flex: 1; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; align-content: start; } .pp-body button { border: 0; background: transparent; font-size: 24px; border-radius: 8px; padding: 3px 0; } .pp-body button:hover { background: var(--accent-bg); }
.pp-body.stk { grid-template-columns: repeat(4, 1fr); gap: 6px; } .pp-body.stk button { padding: 2px; } .pp-body.stk img { width: 100%; aspect-ratio: 1; object-fit: contain; }
@media (max-width: 820px) { .panel-pop { max-width: none; } }

/* меню/модалки */
.ctx { position: fixed; z-index: 100; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; max-width: 280px; animation: pop .12s ease-out; border: 1px solid var(--line); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.ctx .row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 9px 12px; border-radius: 9px; text-align: left; } .ctx .row:hover { background: var(--accent-bg); } .ctx .row.danger { color: var(--danger); } .ctx .row .ic { color: var(--muted); } .ctx .row.danger .ic { color: var(--danger); }
.ctx .sep { height: 1px; background: var(--line); margin: 4px 6px; } .ctx .emo { display: flex; justify-content: space-around; padding: 4px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; } .ctx .emo button { border: 0; background: transparent; font-size: 22px; padding: 3px 5px; border-radius: 8px; } .ctx .emo button:hover { background: var(--accent-bg); }
.scrim { position: fixed; inset: 0; background: rgba(8, 20, 14, .5); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 14px; animation: fade .15s; } @keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: 20px; width: 100%; max-width: 440px; max-height: min(92dvh, 760px); display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; animation: pop .16s ease-out; }
.modal.wide { max-width: 560px; } .modal .mh { display: flex; align-items: center; gap: 8px; padding: 12px 8px 10px 18px; border-bottom: 1px solid var(--line); } .modal .mh h3 { margin: 0; flex: 1; font-size: 17px; } .modal .mb { padding: 14px 18px; overflow-y: auto; flex: 1; overscroll-behavior: contain; } .modal .mf { padding: 10px 18px 16px; display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 560px) { .scrim { align-items: flex-end; padding: 0; } .modal { border-radius: 20px 20px 0 0; max-width: none; max-height: 94dvh; } }
.tabs { display: flex; gap: 4px; background: var(--panel2); padding: 3px; border-radius: 12px; margin-bottom: 14px; } .tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--muted); } .tabs button.on { background: var(--panel); color: var(--accent-d); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.lrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; } .lrow .b { flex: 1; min-width: 0; } .lrow .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lrow .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lrow.click { cursor: pointer; border-radius: 10px; padding: 8px; margin: 0 -8px; } .lrow.click:hover { background: var(--panel2); }
.tag { font-size: 11px; background: var(--accent-bg); color: var(--accent-d); padding: 1px 8px; border-radius: 9px; font-weight: 700; } .tag.own { background: var(--accent); color: #fff; }
.prof { text-align: center; padding: 6px 0 12px; } .prof .avatar { margin: 0 auto 10px; } .prof h2 { margin: 0; } .prof .un { color: var(--muted); } .prof .bio { margin-top: 8px; white-space: pre-wrap; }
.sect { margin: 16px 0 6px; font-size: 12px; font-weight: 700; color: var(--accent-d); text-transform: uppercase; letter-spacing: .04em; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .kv span:first-child { color: var(--muted); }
.safety { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .06em; text-align: center; padding: 12px; background: var(--panel2); border-radius: 12px; line-height: 1.8; word-spacing: 6px; user-select: all; }
.pick { max-height: 200px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 12px; padding: 2px 10px; margin-top: 8px; } .pick .lrow { cursor: pointer; } .chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .chosen .tag { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.perm-grid { display: grid; gap: 2px; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 120; display: flex; align-items: center; justify-content: center; } .lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; } .lightbox .x { position: absolute; top: calc(10px + var(--sat)); right: 12px; color: #fff; background: rgba(255, 255, 255, .15); }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(86px + var(--sab)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 200; pointer-events: none; }
.toast { background: #25342c; color: #fff; padding: 10px 18px; border-radius: 22px; box-shadow: var(--shadow); max-width: 90vw; animation: pop .15s; pointer-events: auto; } .toast.err { background: var(--danger); }
.qr { display: block; margin: 8px auto; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-bg); border-top-color: var(--accent); animation: rot .8s linear infinite; margin: 20px auto; } @keyframes rot { to { transform: rotate(360deg); } }
.prog { height: 3px; background: var(--accent-bg); border-radius: 2px; overflow: hidden; margin-top: 4px; } .prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
