:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #17191e;
  --panel-2: #20232a;
  --line: #2d3038;
  --text: #f5f2eb;
  --muted: #999da8;
  --accent: #e7ff55;
  --accent-ink: #171900;
  --telegram: #4fa8e8;
  --field: #0f1013;
  --topbar: #17191ef2;
  --danger: #ff7979;
  --pattern: #ffffff08;
  --app-height: 100dvh;
  --viewport-offset-top: 0px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f1eee5;
  --panel: #fffdf7;
  --panel-2: #ece8dd;
  --line: #d2ccbd;
  --text: #24231f;
  --muted: #706d64;
  --accent: #6d39ff;
  --accent-ink: #fff;
  --telegram: #0878b9;
  --field: #fff;
  --topbar: #fffdf7eb;
  --danger: #c73030;
  --pattern: #00000009;
}
[data-theme="terminal"] {
  color-scheme: dark;
  --bg: #001408;
  --panel: #001d0c;
  --panel-2: #052a14;
  --line: #0b6331;
  --text: #a8ffbd;
  --muted: #5cb276;
  --accent: #3cff6f;
  --accent-ink: #001408;
  --telegram: #59ffa9;
  --field: #001006;
  --topbar: #001d0cf2;
  --danger: #ff6580;
  --pattern: #3cff6f0b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; overscroll-behavior: none; }
body { background: var(--bg); color: var(--text); min-height: 100svh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.loading-view { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; min-height: var(--app-height, 100dvh); padding: max(22px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow-y: auto; background: radial-gradient(circle at 50% 15%, color-mix(in srgb, var(--accent) 13%, var(--bg)) 0, var(--bg) 48%); }
.loading-card { width: min(100%, 520px); padding: clamp(24px, 7vw, 44px); text-align: center; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 30px 90px #000a; }
.loading-card h1 { margin: 8px 0 10px; font-size: clamp(28px, 8vw, 44px); line-height: 1; letter-spacing: -.045em; }
.loading-card .eyebrow { margin-top: 22px; }
.loading-machine { position: relative; width: 112px; height: 88px; margin: 0 auto; display: grid; place-items: center; }
.loading-machine span { display: grid; place-items: center; width: 76px; height: 76px; color: var(--accent); font-size: 66px; line-height: 1; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 40%, transparent)); animation: loader-crank 1.25s linear infinite; }
.loading-machine i { position: absolute; right: -18px; bottom: -2px; color: var(--danger); font: 900 13px/1 ui-monospace, monospace; transform: rotate(-8deg); opacity: .8; }
@keyframes loader-crank { to { transform: rotate(360deg); } }
.loading-view[data-mode="whitelist"] .loading-machine span, .loading-view[data-mode="offline"] .loading-machine span { animation-duration: 3.2s; }
.loading-view[data-mode="whitelist"] .loading-card { border-color: #f24545; box-shadow: 0 0 0 5px #f2454518, 0 30px 90px #000b; }
.rkn-stamp { width: fit-content; margin: 22px auto 10px; padding: 9px 13px; color: #ff6767; border: 3px double #ff6767; border-radius: 5px; font: 950 12px/1 ui-monospace, monospace; letter-spacing: .08em; transform: rotate(-2deg); }
.loading-footnote { margin: 10px 0 18px; color: var(--muted); font-size: 12px; font-weight: 750; }
.loading-card .action-button { width: 100%; margin-top: 16px; }
.update-banner { position: fixed; z-index: 200; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 20px; padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left)); color: #160800; background: #ff5c35; border-bottom: 3px solid #180800; box-shadow: 0 8px 30px #0009; }
.update-banner > div { display: grid; gap: 2px; max-width: 720px; }
.update-banner strong { font-size: 13px; letter-spacing: .06em; }
.update-banner span { font-size: 12px; font-weight: 750; line-height: 1.3; }
.update-banner a { flex: 0 0 auto; padding: 10px 14px; color: #fff; background: #180800; border: 2px solid #fff5; border-radius: 9px; font-size: 11px; font-weight: 950; text-decoration: none; white-space: nowrap; box-shadow: 3px 3px 0 #fff5; }
.update-banner a[aria-disabled="true"] { opacity: .65; pointer-events: none; }
.android-pwa-nag { position: fixed; z-index: 360; inset: 0; display: grid; place-items: center; padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: #000b; backdrop-filter: blur(7px); }
.android-pwa-nag-card { position: relative; width: min(92vw, 540px); min-height: 290px; display: grid; place-items: center; align-content: center; gap: 18px; padding: 72px 54px; color: #fff6ed; background: linear-gradient(145deg, #3a0905, #130000 62%, #2d1700); border: 3px solid #ff5c35; border-radius: 20px; box-shadow: 0 0 0 6px #ff5c3522, 0 34px 100px #000e; text-align: center; transform: rotate(-.6deg); }
.android-pwa-nag-card > span { color: #ff9d70; font: 950 9px/1.3 ui-monospace, monospace; letter-spacing: .13em; }
.android-pwa-nag-card > strong { font-size: clamp(24px, 7vw, 38px); line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.android-pwa-nag-card > a { display: block; width: 100%; padding: 15px 14px; color: #1b0600; background: #ff9d32; border: 2px solid #fff5; border-radius: 8px; box-shadow: 5px 5px 0 #fff3; font-size: 12px; font-weight: 950; text-decoration: none; }
.android-pwa-nag-card > small { color: #d6957f; font-size: 10px; font-weight: 800; }
.android-pwa-nag-close { position: fixed; z-index: 3; left: 0; top: 0; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; color: #fff; background: #160300; border: 2px solid #ff805e; border-radius: 50%; box-shadow: 0 8px 24px #000b; font-size: 30px; font-weight: 950; line-height: 1; touch-action: manipulation; will-change: transform; }
[data-theme="terminal"] .android-pwa-nag-card, [data-theme="terminal"] .android-pwa-nag-card > a, [data-theme="terminal"] .android-pwa-nag-close { border-radius: 2px; }
.muted { color: var(--muted); line-height: 1.5; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 11px; letter-spacing: .16em; margin: 0 0 8px; }
.error { min-height: 1.2em; color: var(--danger); font-size: 13px; }
.login-view { min-height: var(--app-height, 100dvh); display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--accent) 14%, var(--bg)) 0, transparent 42%); }
.login-card { width: min(100%, 390px); background: rgba(23,25,30,.94); border: 1px solid var(--line); padding: 36px; border-radius: 24px; box-shadow: 0 26px 70px #0008; }
.login-card h1 { font-size: 42px; margin: 8px 0 4px; letter-spacing: -.05em; }
.brand-mark { position: relative; width: 54px; height: 54px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border-radius: 16px; font-weight: 950; transform: rotate(-4deg); }
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; }
.unread-badge { position: absolute; z-index: 2; right: -9px; top: -8px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--panel); border-radius: 999px; color: #fff; background: #f04455; box-shadow: 0 3px 10px #0007; font: 900 10px/1 ui-sans-serif, system-ui, sans-serif; transform: rotate(4deg); }
label { display: grid; gap: 7px; color: #cacdd4; font-size: 13px; margin-top: 17px; }
input, textarea, select { width: 100%; color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 11px; padding: 13px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #e7ff5519; }
.login-card > button, .user-form > button { width: 100%; border: 0; background: var(--accent); color: var(--accent-ink); padding: 14px; border-radius: 11px; font-weight: 800; margin-top: 20px; }
.chat-view { position: relative; height: var(--app-height, 100dvh); display: grid; grid-template-rows: 64px auto auto minmax(0, 1fr) auto auto auto; max-width: 1000px; margin: auto; border-inline: 1px solid var(--line); background: var(--panel); overflow: hidden; transform: translateY(var(--viewport-offset-top, 0px)); }
.topbar { grid-row: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--topbar); backdrop-filter: blur(14px); }
.brand, .top-actions { display: flex; align-items: center; gap: 12px; }
.brand > div:last-child { display: grid; }
.brand small, #connection-state { color: var(--muted); font-size: 11px; margin-top: 2px; }
#connection-state.online { color: var(--accent); }
#current-user { font-size: 13px; color: #c5c8cf; }
.icon-button { border: 1px solid var(--line); color: var(--text); background: var(--panel-2); border-radius: 9px; width: 36px; height: 36px; font-size: 20px; }
.busted-gear { position: relative; transform: rotate(-14deg); color: var(--accent); text-shadow: 2px 1px 0 color-mix(in srgb, var(--danger) 65%, transparent); }
.busted-gear::after { content: "╱"; position: absolute; right: 4px; top: -3px; color: var(--danger); font-size: 12px; font-weight: 900; transform: rotate(25deg); }
.busted-gear:hover { transform: rotate(18deg) scale(1.06); transition: transform .18s ease; }
.mention-center-button { position: relative; color: var(--telegram); font-size: 18px; font-weight: 950; }
.mention-center-badge { position: absolute; right: -7px; top: -7px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--panel); border-radius: 999px; color: #111600; background: var(--accent); box-shadow: 0 3px 10px #0008; font: 950 9px/1 ui-sans-serif, system-ui, sans-serif; }
.logout-button { border: 1px solid #ff797955; color: #ff9a9a; background: #ff797910; border-radius: 9px; height: 36px; padding: 0 12px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.logout-button:hover { background: #ff797920; border-color: #ff797988; }
.install-promo { grid-row: 2; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 14px; color: #241200; border-bottom: 2px solid #301800; background: #ffb13b; box-shadow: 0 6px 18px #0004; z-index: 3; }
.install-promo.hidden { display: none; }
.install-promo-icon { font-size: 24px; transform: rotate(-12deg); }
.install-promo > div { min-width: 0; display: grid; gap: 2px; }
.install-promo strong { font-size: 10px; letter-spacing: .08em; }
.install-promo small { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.install-promo a { padding: 8px 10px; color: #fff; border-radius: 8px; background: #241200; font-size: 10px; font-weight: 950; text-decoration: none; white-space: nowrap; }
.pinned-bar { grid-row: 3; min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 30px; align-items: stretch; min-height: 44px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--topbar)); box-shadow: 0 5px 14px #0003; z-index: 2; }
.pinned-bar.hidden { display: none; }
.pin-nav, .pin-remove, .pin-current { border: 0; color: var(--text); background: transparent; }
.pin-nav { color: var(--muted); font-size: 25px; }
.pin-nav:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pin-current { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 8px; text-align: left; }
.pin-current:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pin-icon { font-size: 18px; transform: rotate(-12deg); }
.pin-copy { min-width: 0; display: grid; gap: 2px; }
.pin-copy strong { overflow: hidden; color: var(--accent); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pin-copy small { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pin-count { align-self: start; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 800; }
.pin-remove { width: 32px; color: var(--muted); font-size: 21px; }
.pin-remove:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.messages { grid-row: 4; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 16px clamp(10px, 3vw, 28px); display: flex; flex-direction: column; gap: 10px; background-color: var(--bg); background-image: radial-gradient(circle at 12% 4%, color-mix(in srgb, var(--telegram) 9%, transparent), transparent 38%), radial-gradient(circle at 88% 94%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 42%), radial-gradient(var(--pattern) 1px, transparent 1px); background-size: auto, auto, 22px 22px; }
.load-more { align-self: center; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
.unread-divider { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 10px; font-weight: 950; letter-spacing: .09em; }
.unread-divider::before, .unread-divider::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.message { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; max-width: 82%; min-width: 0; align-self: flex-start; }
.message.web { align-self: flex-end; grid-template-columns: minmax(0, 1fr); }
.message.web .avatar { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #2c3038; color: var(--telegram); font-weight: 800; font-size: 12px; cursor: pointer; }
.avatar img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.bubble { min-width: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px 15px 15px 15px; padding: 7px 10px 5px; box-shadow: 0 4px 14px #0002; overflow: hidden; }
.web .bubble { background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 16px 4px 16px 16px; }
.message.mentioned .bubble { border: 2px solid var(--accent); box-shadow: 0 0 0 4px #e7ff5520, 0 8px 28px #0006; }
.message.mentioned { animation: mention-in .35s ease-out; }
.message.jump-highlight .bubble { animation: jump-highlight 3s ease-out; }
@keyframes jump-highlight { 0%, 22% { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent), 0 8px 28px #0006; } 100% { } }
.message.media-only .bubble { padding: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.message.media-only .message-meta { padding: 0 2px 3px; }
.message.media-only .attachment { margin-top: 0; }
@keyframes mention-in { from { transform: translateY(5px); opacity: .7; } }
.message-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.forward-origin { display: flex; align-items: center; gap: 6px; margin: -2px -4px 8px; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--telegram) 25%, transparent); border-radius: 9px; color: var(--telegram); background: color-mix(in srgb, var(--telegram) 8%, transparent); text-decoration: none; }
.forward-origin:hover { border-color: color-mix(in srgb, var(--telegram) 65%, transparent); background: color-mix(in srgb, var(--telegram) 13%, transparent); }
.forward-origin.static { cursor: default; }
.forward-origin span { font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.forward-origin strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.forward-origin i { margin-left: auto; font-size: 11px; font-style: normal; }
.sender { color: var(--telegram); font-size: 13px; }
.sender-line { min-width: 0; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.transport-badge { padding: 2px 5px; border: 1px dashed color-mix(in srgb, var(--accent) 65%, var(--line)); border-radius: 4px; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); font: 850 8px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; white-space: nowrap; }
.web .sender { color: var(--accent); }
.mention-badge { color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 2px 6px; font-size: 8px; font-weight: 900; letter-spacing: .06em; }
time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; margin: 6px 0 3px; line-height: 1.42; }
.tg-text-segment { white-space: pre-wrap; }
.tg-code, .tg-pre { padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--field) 82%, #000); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tg-pre { white-space: pre-wrap; }
.tg-spoiler { border-radius: 4px; color: transparent; background: color-mix(in srgb, var(--muted) 45%, var(--panel)); cursor: pointer; user-select: none; }
.tg-spoiler.revealed { color: inherit; background: color-mix(in srgb, var(--muted) 14%, transparent); user-select: text; }
.tg-blockquote { display: block; margin: 7px 0; padding: 7px 10px; border-left: 4px solid var(--telegram); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--telegram) 9%, transparent); white-space: pre-wrap; }
.tg-blockquote.expandable { border-left-style: double; }
.body:empty { display: none; }
.message-link { color: var(--telegram); font-weight: 650; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.mention-link { display: inline; margin: 0; padding: 0; border: 0; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.web .message-link { color: var(--accent); }
.link-previews { clear: both; }
.link-previews:empty { display: none; }
.link-previews.loading { min-height: 3px; margin-top: 9px; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--telegram), transparent); background-size: 200% 100%; animation: preview-loading 1.2s linear infinite; }
@keyframes preview-loading { to { background-position: -200% 0; } }
.link-preview { display: grid; grid-template-columns: minmax(128px, 42%) minmax(0, 1fr); margin-top: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: color-mix(in srgb, var(--panel) 72%, #000); text-decoration: none; }
.link-preview:hover { border-color: color-mix(in srgb, var(--telegram) 65%, var(--line)); }
.link-preview img { width: 100%; height: 100%; min-height: 92px; aspect-ratio: 16 / 9; object-fit: cover; background: #090909; }
.link-preview > span { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 12px; }
.link-preview small { overflow: hidden; color: #ff5757; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.link-preview strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.link-preview em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .05em; }
.store-preview { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.store-preview:hover { border-color: var(--accent); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 16%, transparent); }
.store-preview small { color: var(--accent); }
.store-preview em { color: color-mix(in srgb, var(--accent) 78%, var(--muted)); }
.reactions { position: relative; clear: both; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.reaction-list { display: contents; }
.reaction-pill { min-width: 0; min-height: 32px; display: inline-grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: color-mix(in srgb, var(--panel) 72%, transparent); font-size: 12px; cursor: default; }
.reaction-pill strong { font-size: 12px; white-space: nowrap; }
.reaction-pill small { max-width: 220px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.reaction-pill.own { border-color: var(--telegram); background: color-mix(in srgb, var(--telegram) 18%, var(--panel)); }
.reaction-pill.own { color: var(--telegram); font-weight: 900; }
.receipt-row { clear: both; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; min-height: 0; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .025em; }
.delivery-status { color: color-mix(in srgb, var(--accent) 72%, var(--muted)); }
.delivery-status.failed { color: var(--danger); cursor: pointer; }
.delivery-status.queued { color: #e5aa42; }
.read-receipts { display: inline-flex; align-items: center; gap: 4px; color: var(--telegram); cursor: default; }
.read-receipts .reader-faces { display: inline-flex; flex-direction: row-reverse; margin-left: 2px; }
.read-receipts .reader-face { width: 17px; height: 17px; display: grid; place-items: center; overflow: hidden; margin-left: -4px; border: 1px solid var(--panel-2); border-radius: 50%; color: var(--telegram); background: var(--field); font-size: 6px; font-weight: 950; cursor: pointer; }
.read-receipts .reader-face img { width: 100%; height: 100%; object-fit: cover; }
.message.outbox { opacity: .82; }
.message.outbox .bubble { border-style: dashed; }
.message-actions { float: right; display: flex; justify-content: flex-end; gap: 9px; }
.message-actions button { opacity: 0; border: 0; background: transparent; color: var(--muted); padding: 3px 0 0 7px; font-size: 11px; }
.message-actions .delete-button { color: color-mix(in srgb, var(--danger) 78%, var(--muted)); }
.message:hover .message-actions button { opacity: 1; }
.quoted { display: -webkit-box; width: 100%; text-align: left; margin-top: 5px; padding: 6px 8px; border: 0; border-left: 3px solid var(--accent); border-radius: 4px; color: color-mix(in srgb, var(--text) 82%, var(--muted)); background: color-mix(in srgb, var(--field) 62%, var(--telegram) 8%); font-family: ui-serif, Georgia, serif; font-size: 11px; font-style: italic; line-height: 1.3; white-space: normal; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
[data-theme="terminal"] .quoted { color: var(--text); background: #0008; border: 1px solid var(--line); border-left: 3px solid var(--accent); font-family: inherit; }
.attachment { margin-top: 8px; }
.attachment img, .attachment video { display: block; width: 100%; max-width: min(520px, 100%); max-height: 480px; border-radius: 10px; object-fit: cover; }
.attachment .sticker-media { width: min(260px, 68vw); height: min(260px, 68vw); object-fit: contain; border-radius: 0; background: transparent; }
.sticker-lottie { overflow: hidden; }
.sticker-lottie svg, .sticker-lottie img { display: block; width: 100%; height: 100%; object-fit: contain; }
.attachment.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; overflow: hidden; border-radius: 11px; }
.attachment.media-grid > * { min-width: 0; height: clamp(120px, 24vw, 250px); }
.attachment.media-grid img, .attachment.media-grid video { width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: cover; }
.media-tile { display: block; width: 100%; max-width: min(520px, 100%); padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: #090a0c; cursor: zoom-in; }
.media-tile img { transition: transform .18s ease; }
.media-tile:hover img { transform: scale(1.015); }
.video-tile { position: relative; max-width: min(520px, 100%); }
.media-expand { position: absolute; right: 7px; top: 7px; width: 34px; height: 34px; border: 1px solid #fff5; border-radius: 9px; color: #fff; background: #000a; font-size: 18px; backdrop-filter: blur(8px); }
.attachment audio { width: min(360px, 100%); }
.video-note-wrap { position: relative; width: min(280px, 72vw); aspect-ratio: 1; overflow: hidden; border: 4px solid color-mix(in srgb, var(--telegram) 55%, var(--line)); border-radius: 50%; background: #050607; box-shadow: 0 9px 30px #0005; }
.attachment .video-note { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; object-fit: cover; background: #050607; cursor: pointer; }
.video-note-toggle { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 58px; height: 58px; padding: 0 0 0 4px; transform: translate(-50%, -50%); border: 1px solid #fff7; border-radius: 50%; color: #fff; background: #050607a8; box-shadow: 0 8px 24px #0008; font-size: 23px; backdrop-filter: blur(10px); transition: opacity .18s, transform .18s; }
.video-note-toggle.playing { opacity: 0; padding-left: 0; font-size: 16px; }
.video-note-wrap:hover .video-note-toggle.playing, .video-note-toggle.playing:focus-visible { opacity: .82; }
.video-note-controls { position: absolute; left: 12%; right: 12%; bottom: 8%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid #fff3; border-radius: 999px; color: #fff; background: #050607a8; box-shadow: 0 4px 16px #0006; font-size: 10px; font-variant-numeric: tabular-nums; backdrop-filter: blur(10px); }
.video-note-controls input { width: 100%; height: 14px; min-height: 0; margin: 0; padding: 0; accent-color: var(--telegram); cursor: pointer; }
.video-note-sound { width: 23px; height: 23px; padding: 0; border: 0; color: #fff; background: transparent; font-size: 13px; }
.transcription { clear: both; display: grid; gap: 5px; margin-top: 9px; padding: 9px 11px; border-left: 3px solid var(--telegram); border-radius: 7px; background: color-mix(in srgb, var(--telegram) 10%, var(--panel-2)); }
.transcription strong { color: var(--telegram); font-size: 9px; letter-spacing: .07em; }
.transcription p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
.transcription.failed { border-color: var(--danger); }
.transcription.failed strong { color: var(--danger); }
.file-link { color: var(--text); display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid #ffffff18; border-radius: 10px; text-decoration: none; }
.reply-bar { grid-row: 5; display: flex; justify-content: space-between; align-items: center; background: var(--panel-2); border-top: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 8px 16px; }
.reply-bar > div { display: grid; min-width: 0; }
.reply-bar small { color: var(--muted); }
#reply-preview { color: #bbbfc8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 70vw; }
.edit-bar { border-left-color: var(--telegram); }
#edit-preview { max-width: 70vw; overflow: hidden; color: var(--telegram); text-overflow: ellipsis; white-space: nowrap; }
.composer { grid-row: 7; min-height: 72px; display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.attach-button { display: grid; place-items: center; flex: 0 0 44px; height: 44px; margin: 0; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 24px; cursor: pointer; }
.attach-button input { display: none; }
.composer-tools { position: relative; flex: 0 0 44px; }
.composer-tools-menu { position: absolute; z-index: 45; left: 0; bottom: calc(100% + 9px); display: grid; width: 230px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 96%, transparent); box-shadow: 0 18px 50px #0009; backdrop-filter: blur(16px); }
.composer-tool-item { width: 100%; display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 12px; border: 0; border-radius: 9px; color: var(--text); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.composer-tool-item:hover { color: var(--accent-ink); background: var(--accent); }
.composer-tool-item input { display: none; }
.format-toolbar { order: 1; display: flex; gap: 3px; margin: 0 0 5px 2px; overflow-x: auto; scrollbar-width: none; }
.format-toolbar::-webkit-scrollbar { display: none; }
.format-toolbar button { flex: 0 0 auto; min-width: 28px; height: 25px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: color-mix(in srgb, var(--field) 86%, transparent); font-size: 10px; }
.format-toolbar button:hover, .format-toolbar button.active { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.sticker-panel { position: absolute; z-index: 38; left: 14px; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); display: grid; grid-template-rows: auto minmax(0, 1fr); height: min(470px, calc(var(--app-height, 100dvh) - 145px)); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--panel) 97%, transparent); box-shadow: 0 24px 70px #000b; backdrop-filter: blur(18px); }
.sticker-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sticker-panel > header > div { display: grid; }
.sticker-panel header strong { color: var(--accent); font-size: 12px; letter-spacing: .08em; }
.sticker-panel header small { color: var(--muted); font-size: 10px; }
.sticker-panel header button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--panel-2); font-size: 22px; }
.sticker-catalog { min-height: 0; overflow-y: auto; padding: 8px 12px 18px; overscroll-behavior: contain; }
.sticker-catalog section + section { margin-top: 16px; }
.sticker-catalog h4 { position: sticky; z-index: 1; top: -8px; margin: 0 -4px 5px; padding: 8px 4px 5px; color: var(--muted); background: var(--panel); font-size: 10px; letter-spacing: .05em; }
.sticker-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.sticker-grid button { aspect-ratio: 1; min-width: 0; padding: 3px; border: 1px solid transparent; border-radius: 10px; background: transparent; }
.sticker-grid button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.sticker-grid button.sending { opacity: .45; transform: scale(.9); }
.sticker-grid img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sticker-empty { padding: 30px 16px; color: var(--muted); text-align: center; }
.recording-panel { position: absolute; z-index: 55; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); color: var(--text); background: color-mix(in srgb, var(--topbar) 96%, #000); backdrop-filter: blur(22px); }
.recording-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recording-panel > header > div { display: grid; }
.recording-panel header strong { color: var(--accent); font-size: 13px; letter-spacing: .08em; }
.recording-panel header small { margin-top: 4px; color: var(--muted); }
.recording-panel header time { color: var(--text); font-size: 28px; font-variant-numeric: tabular-nums; font-weight: 900; }
.recording-stage { display: grid; place-items: center; min-height: 0; padding: 20px; }
.recording-stage video { width: min(560px, 82vw, 65vh); height: min(560px, 82vw, 65vh); aspect-ratio: 1; border: 6px solid var(--accent); border-radius: 50%; object-fit: cover; background: #000; box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 10%, transparent), 0 25px 70px #000a; }
.recording-voice-pulse { position: relative; display: grid; place-items: center; width: min(340px, 68vw); aspect-ratio: 1; border-radius: 50%; color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); animation: record-pulse 1.5s ease-out infinite; }
.recording-voice-pulse span { font-size: clamp(60px, 15vw, 100px); }
.recording-voice-pulse i { position: absolute; bottom: 24%; width: 6px; height: 15%; border-radius: 99px; background: var(--accent-ink); animation: record-bars .7s ease-in-out infinite alternate; }
.recording-voice-pulse i:nth-of-type(1) { margin-left: -30px; animation-delay: -.2s; }.recording-voice-pulse i:nth-of-type(3) { margin-left: 30px; animation-delay: -.4s; }
@keyframes record-pulse { 70% { box-shadow: 0 0 0 35px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes record-bars { to { height: 5%; } }
.recording-panel > footer { display: flex; justify-content: center; gap: 10px; }
.recording-panel footer button { min-height: 48px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: var(--panel-2); font-weight: 850; }
.recording-panel footer .recording-stop { color: #fff; border-color: #dc394d; background: #dc394d; }
.recording-panel footer .recording-send { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.compose-field { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.compose-editor { position: relative; order: 2; min-width: 0; border-radius: 11px; background: var(--field); }
.compose-editor textarea, .composer-format-preview { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
textarea { position: relative; z-index: 2; resize: none; max-height: 140px; min-height: 44px; padding: 11px 13px; line-height: 1.35; background: transparent; }
.composer-format-preview { position: absolute; z-index: 1; inset: 0; overflow: hidden; padding: 11px 13px; border: 1px solid transparent; border-radius: 11px; color: var(--text); font-size: inherit; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.composer-format-preview .message-link { font-weight: inherit; }
.composer-format-preview .tg-code, .composer-format-preview .tg-pre { padding: 0; border-radius: 2px; font-family: inherit; }
.composer-format-preview .tg-blockquote { display: inline; margin: 0; padding: 0; border: 0; border-radius: 2px; font-style: italic; }
.compose-editor.has-format-preview textarea { color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--text); }
.compose-editor.has-format-preview textarea::selection { color: var(--text); -webkit-text-fill-color: var(--text); background: color-mix(in srgb, var(--telegram) 55%, transparent); }
.compose-editor.has-format-preview textarea::placeholder { color: var(--muted); -webkit-text-fill-color: var(--muted); }
html[data-platform="android"] .compose-editor { order: 1; }
html[data-platform="android"] .format-toolbar { order: 2; margin: 5px 0 0 2px; }
.pending-files { order: 3; display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--accent); font-size: 11px; }
.pending-files span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-files button { flex: 0 0 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--danger); background: transparent; }
.upload-progress { order: 4; display: grid; gap: 3px; margin-top: 5px; }
.upload-progress > span { height: 4px; overflow: hidden; border-radius: 99px; background: var(--line); }
.upload-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .12s linear; }
.upload-progress small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.compose-field { position: relative; }
.viewer-open { overflow: hidden; }
.media-viewer { position: fixed; z-index: 300; inset: 0; display: grid; grid-template: 58px minmax(0, 1fr) / 64px minmax(0, 1fr) 64px; color: #fff; background: #020304f2; backdrop-filter: blur(16px); }
.media-viewer > header { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; min-width: 0; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); border-bottom: 1px solid #ffffff1c; background: #08090bd9; }
.media-viewer header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-viewer header span { color: #aeb3bd; font-size: 12px; white-space: nowrap; }
.media-viewer header a { margin-left: auto; color: var(--accent); font-size: 11px; font-weight: 900; text-decoration: none; }
.media-viewer header button { width: 38px; height: 38px; border: 1px solid #ffffff2e; border-radius: 10px; color: #fff; background: #ffffff0d; font-size: 25px; }
.media-stage { grid-column: 2; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; }
.media-stage img, .media-stage video { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.media-nav { align-self: center; width: 48px; height: 64px; margin: 8px; border: 1px solid #ffffff24; border-radius: 14px; color: #fff; background: #ffffff0b; font-size: 45px; }
.media-nav.prev { grid-column: 1; }
.media-nav.next { grid-column: 3; }
.typing-state { grid-row: 6; min-height: 0; height: 0; overflow: hidden; padding: 0 16px; color: var(--muted); background: var(--panel); font-size: 11px; font-style: italic; transition: height .18s ease, padding .18s ease; }
.typing-state.active { height: 25px; padding-top: 6px; }
.mention-menu { position: absolute; z-index: 8; left: 0; right: 0; bottom: calc(100% + 8px); max-height: 280px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 18px 50px #0008; backdrop-filter: blur(16px); }
.mention-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; border-radius: 9px; color: var(--text); background: transparent; text-align: left; }
.mention-menu button:hover, .mention-menu button.active { color: var(--accent-ink); background: var(--accent); }
.mention-menu button > span:first-child { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--telegram); background: var(--panel-2); font-size: 10px; font-weight: 900; }
.mention-menu button > span:last-child { display: grid; min-width: 0; }
.mention-menu small { color: var(--muted); }
.mention-menu button:hover small, .mention-menu button.active small { color: inherit; opacity: .7; }
.send-button { flex: 0 0 44px; height: 44px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 19px; font-weight: 900; }
.send-button:disabled { opacity: .5; cursor: wait; }
dialog { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 32px); color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
dialog::backdrop { background: #000b; backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; }
.dialog-head h2 { margin: 0; }
.user-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.user-form .checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.users-list { display: grid; gap: 8px; margin-top: 18px; }
.user-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px; background: var(--panel-2); border-radius: 10px; }
.user-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.user-row-actions select { width: min(230px, 38vw); padding: 7px 9px; font-size: 12px; }
.user-row small { color: var(--muted); display: block; }
.user-row button { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; padding: 6px 9px; }
.user-row-actions .reset-password-button { border-color: #ff8a8a66; color: #ff9b9b; }
.user-row-actions .reset-password-button:hover { color: #210000; background: #ff8a8a; }
.user-row-actions .admin-role-button { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }
.user-row-actions .admin-role-button:hover { color: var(--accent-ink); background: var(--accent); }
.temporary-password-mark { margin-left: 6px; color: var(--danger); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.admin-section-title { margin: 20px 0 0; }
.admin-activity-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 18px; padding: 13px 14px; border: 1px solid var(--accent); border-radius: 12px; color: var(--text); background: color-mix(in srgb, var(--accent) 7%, transparent); text-decoration: none; }
.admin-activity-link > span:first-child { font-size: 28px; }
.admin-activity-link > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.admin-activity-link small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-activity-link b { color: var(--accent); font-size: 10px; }
.admin-activity-link:hover { color: var(--accent-ink); background: var(--accent); }
.admin-activity-link:hover small, .admin-activity-link:hover b { color: inherit; }
.boob-admin { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.boob-admin-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.boob-admin-head h3 { margin: 0; font-size: 22px; }
.boob-admin-head > strong { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 11px; }
.boob-admin > .muted { margin: 12px 0 15px; font-size: 11px; }
.boob-upload-button { display: grid; place-items: center; min-height: 48px; margin: 0; border: 1px dashed var(--accent); border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); font-weight: 900; cursor: pointer; }
.boob-upload-button:hover { color: var(--accent-ink); background: var(--accent); }
.boob-upload-button input { display: none; }
.boob-upload-status { display: grid; gap: 5px; margin-top: 11px; }
.boob-upload-status > span { height: 6px; overflow: hidden; border-radius: 999px; background: var(--field); }
.boob-upload-status i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .15s ease; }
.boob-upload-status small, .boob-library-empty { color: var(--muted); font-size: 11px; }
.boob-library-empty { padding: 20px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.boob-library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.boob-library-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); }
.boob-library-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--field); }
.boob-library-card footer { display: grid; gap: 2px; padding: 7px 8px; }
.boob-library-card footer strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.boob-library-card footer small { color: var(--muted); font-size: 8px; }
.boob-library-delete { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border: 1px solid #ff909077; border-radius: 8px; color: #fff; background: #190606d9; font-size: 15px; backdrop-filter: blur(8px); }
.boob-library-delete:hover { background: var(--danger); }
.settings-dialog { width: min(560px, calc(100% - 24px)); }
.task-settings-button { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.my-task-count { min-width: 24px; padding: 4px 7px; border-radius: 999px; color: var(--accent-ink); background: var(--accent); font-size: 10px; text-align: center; }
.my-tasks-dialog { width: min(650px, calc(100% - 24px)); }
.my-tasks-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 15px 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--field); }
.my-tasks-toolbar label { display: flex; align-items: center; gap: 7px; }.my-tasks-toolbar input { width: auto; }.my-tasks-toolbar span { color: var(--muted); font-size: 10px; }
.my-tasks-list { display: grid; gap: 9px; max-height: min(58vh, 620px); overflow-y: auto; }
.my-task-card { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--panel-2); }
.my-task-card.status-analyzed { border-left-color: #c87aff; }.my-task-card.status-in_progress { border-left-color: var(--telegram); }.my-task-card.status-done { border-left-color: var(--muted); opacity: .72; }
.my-task-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }.my-task-card header strong { color: var(--accent); font-size: 11px; }.my-task-card header span { padding: 4px 7px; border: 1px solid currentColor; color: var(--muted); font-size: 8px; font-weight: 950; }.my-task-card.status-analyzed header span { color: #c87aff; }.my-task-card.status-in_progress header span { color: var(--telegram); }.my-task-card.status-new header span { color: #e5c94d; }
.my-task-card h3 { margin: 0; color: var(--text); font-size: 16px; }.my-task-card details summary { color: var(--muted); font-size: 10px; cursor: pointer; }.my-task-card details p { margin: 8px 0 0; padding: 10px; border-left: 2px solid var(--line); color: var(--text); font-size: 12px; white-space: pre-wrap; }.my-task-card time { color: var(--muted); font-size: 9px; }
.my-tasks-empty { padding: 35px 18px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }.create-dick-task { width: 100%; margin-top: 14px; }
[data-theme="terminal"] .my-task-card, [data-theme="terminal"] .my-task-count, [data-theme="terminal"] .my-tasks-toolbar { border-radius: 2px; }
.password-dialog { width: min(520px, calc(100% - 24px)); }
.mentions-dialog { width: min(690px, calc(100% - 24px)); }
.mention-center-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 6px 0 16px; }
.mention-center-toolbar p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.mention-center-toolbar b { color: var(--telegram); }
.mention-center-toolbar button { min-height: 38px; font-size: 10px; }
.mention-center-list { display: grid; gap: 8px; }
.mention-center-item { width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: var(--panel-2); text-align: left; }
.mention-center-item:hover { border-color: var(--telegram); }
.mention-center-item.unviewed { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); box-shadow: inset 3px 0 0 var(--accent); }
.mention-center-avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; color: var(--telegram); background: var(--field); font-size: 11px; font-weight: 900; }
.mention-center-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mention-center-copy { min-width: 0; display: grid; gap: 4px; }
.mention-center-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mention-center-meta strong { color: var(--telegram); font-size: 12px; }
.mention-center-reason { padding: 3px 6px; border-radius: 999px; color: var(--accent-ink); background: var(--accent); font-size: 8px; font-weight: 950; letter-spacing: .04em; text-transform: uppercase; }
.mention-center-preview { overflow: hidden; color: var(--text); font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.mention-center-item time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.mention-center-empty { padding: 28px 18px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); font-size: 12px; text-align: center; }
.mention-center-more { width: 100%; margin-top: 10px; }
.password-dialog form { display: grid; }
.password-dialog .action-button { margin-top: 22px; }
.password-dialog[data-forced="true"] { border-color: var(--danger); box-shadow: 0 24px 90px #000c, 0 0 50px color-mix(in srgb, var(--danger) 18%, transparent); }
.forced-password-warning { display: grid; gap: 4px; margin: 8px 0 2px; padding: 12px 13px; border: 1px solid var(--danger); border-radius: 11px; color: #ffd5d5; background: color-mix(in srgb, var(--danger) 11%, var(--panel-2)); }
.forced-password-warning strong { color: var(--danger); font-size: 10px; letter-spacing: .07em; }
.forced-password-warning span { font-size: 11px; line-height: 1.35; }
.settings-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-section h3 { margin: 0 0 9px; }
.settings-section p { margin: 6px 0 12px; }
.notification-mode-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 9px; }
.notification-mode-picker button { min-height: 38px; padding: 7px; border: 1px solid var(--line); color: var(--muted); background: var(--field); font-size: 10px; font-weight: 850; }
.notification-mode-picker button.active { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.online-button { position: relative; color: var(--accent); font-size: 15px; }
.online-list { display: grid; gap: 7px; margin-top: 14px; }
.online-person { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); color: var(--text); background: var(--panel-2); text-align: left; }
.online-person-avatar, .profile-avatar { display: grid; place-items: center; overflow: hidden; color: var(--accent-ink); background: var(--accent); font-weight: 950; }
.online-person-avatar { width: 44px; height: 44px; border-radius: 13px; }
.online-person-avatar img, .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.online-person-copy { min-width: 0; display: grid; gap: 2px; }
.online-person-copy small, .online-person > small { color: var(--muted); font-size: 9px; }
.online-person > small.online { color: var(--accent); }
.user-profile-card { display: grid; justify-items: center; gap: 9px; padding: 24px 12px 10px; text-align: center; }
.profile-avatar { width: 112px; height: 112px; border-radius: 30px; font-size: 30px; }
.user-profile-card h3 { margin: 7px 0 0; font-size: 24px; }
.user-profile-card p { margin: 0; color: var(--muted); }
.profile-badge { padding: 5px 9px; border: 1px solid var(--accent); color: var(--accent); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.user-profile-card .profile-status { max-width: 420px; padding: 10px 14px; border-left: 3px solid var(--line); color: var(--text); font-style: italic; }
.user-profile-state { margin-top: 5px; padding: 6px 10px; border: 1px solid var(--line); font-size: 10px; font-weight: 900; }
.user-profile-state.online { color: var(--accent); border-color: var(--accent); }
.profile-editor-dialog { width: min(560px, calc(100vw - 24px)); }
.profile-editor-dialog form { display: grid; gap: 14px; }
.profile-editor-dialog label { display: grid; gap: 7px; color: var(--muted); font-weight: 800; }
.profile-editor-dialog input, .profile-editor-dialog textarea { width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--field); font: inherit; resize: vertical; }
.profile-editor-avatar-row { display: flex; align-items: center; gap: 16px; }
.profile-editor-avatar-row > div { display: grid; gap: 7px; align-items: start; }
.profile-avatar-pick { cursor: pointer; }
.text-button { border: 0; color: var(--muted); background: transparent; text-align: left; text-decoration: underline; cursor: pointer; }
[data-theme="terminal"] .profile-editor-dialog input, [data-theme="terminal"] .profile-editor-dialog textarea { border-radius: 2px; }
.theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-picker button, .action-button { min-height: 44px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; color: var(--text); background: var(--panel-2); font-weight: 750; }
.theme-picker button.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.action-button { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.action-button:disabled { opacity: .45; cursor: not-allowed; }
.action-button.secondary { color: var(--text); background: var(--panel-2); border-color: var(--line); }
.apk-download { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; }
.apk-download b { font-size: 17px; }
.android-download > small { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.ios-app-note b { color: var(--danger); }
.install-help { font-size: 12px; }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--field); }
.version-row code { color: var(--accent); font-size: 14px; font-weight: 900; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 11px 16px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink); background: var(--accent); box-shadow: 0 14px 40px #0008; font-size: 13px; font-weight: 800; text-align: center; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
[data-theme="terminal"] .brand-mark { border-radius: 2px; transform: none; box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
[data-theme="terminal"] .bubble, [data-theme="terminal"] input, [data-theme="terminal"] textarea, [data-theme="terminal"] select, [data-theme="terminal"] button { border-radius: 2px; }
[data-theme="terminal"] .brand strong::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
[data-theme="light"] .login-card { box-shadow: 0 26px 70px #5c574733; }
[data-theme="light"] .reply-bar { background: #f2eee4; }
@media (max-width: 620px) {
  .loading-card { border-radius: 20px; }
  .loading-machine { transform: scale(.9); }
  .update-banner { align-items: stretch; gap: 8px; flex-direction: column; }
  .update-banner > div { gap: 1px; }
  .update-banner strong { font-size: 12px; }
  .update-banner span { font-size: 11px; }
  .update-banner a { align-self: stretch; padding: 9px 12px; text-align: center; }
  .android-pwa-nag-card { min-height: min(420px, calc(var(--app-height, 100dvh) - 42px)); padding: 68px 32px; }
  button, .attach-button { touch-action: manipulation; }
  input, textarea, select { font-size: 16px; }
  #current-user { display: none; }
  .chat-view { width: 100%; max-width: none; border: 0; grid-template-rows: calc(58px + env(safe-area-inset-top)) auto auto minmax(0, 1fr) auto auto auto; }
  .topbar { min-width: 0; padding: env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
  .brand { min-width: 0; gap: 9px; }
  .brand > div:last-child { min-width: 0; }
  .brand strong { font-size: 14px; }
  .brand small { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
  .top-actions { gap: 7px; }
  .logout-button { height: 34px; padding: 0 10px; font-size: 10px; }
  .icon-button { width: 34px; height: 34px; }
  .install-promo { grid-template-columns: auto minmax(0, 1fr); gap: 5px 9px; padding: 7px max(9px, env(safe-area-inset-right)) 7px max(9px, env(safe-area-inset-left)); }
  .install-promo-icon { grid-row: 1 / 3; }
  .install-promo small { white-space: normal; line-height: 1.25; }
  .install-promo a { grid-column: 2; justify-self: start; padding: 5px 8px; }
  .pinned-bar { grid-template-columns: 26px minmax(0, 1fr) auto 26px; min-height: 40px; }
  .pin-current { gap: 5px; padding: 4px; }
  .pin-icon { font-size: 16px; }
  .pin-copy small { font-size: 11px; }
  .pin-remove { width: 29px; }
  .messages { padding: 9px max(7px, env(safe-area-inset-right)) 12px max(7px, env(safe-area-inset-left)); gap: 8px; }
  .message { grid-template-columns: 36px minmax(0, 1fr); gap: 6px; max-width: 97%; }
  .message.web { max-width: 89%; }
  .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 10px; }
  .bubble { min-width: 0; padding: 6px 8px 4px; border-radius: 3px 13px 13px 13px; }
  .web .bubble { border-radius: 14px 3px 14px 14px; }
  .message-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; }
  .forward-origin { margin-bottom: 7px; }
  .sender { min-width: 0; overflow-wrap: anywhere; line-height: 1.15; }
  .mention-badge { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  time { grid-column: 2; grid-row: 1; }
  .body { font-size: 15px; line-height: 1.4; }
  .link-preview { grid-template-columns: 120px minmax(0, 1fr); }
  .link-preview img { min-height: 86px; }
  .link-preview > span { padding: 8px 9px; }
  .quoted { max-width: 100%; }
  .attachment img, .attachment video { max-height: 55dvh; }
  .attachment.media-grid > * { height: clamp(110px, 38vw, 190px); }
  .media-viewer { grid-template: calc(54px + env(safe-area-inset-top)) minmax(0, 1fr) / 42px minmax(0, 1fr) 42px; }
  .media-viewer > header { gap: 8px; }
  .media-viewer header strong { font-size: 12px; }
  .media-viewer header a { font-size: 9px; }
  .media-nav { width: 36px; height: 54px; margin: 3px; padding: 0; font-size: 34px; }
  .message-actions button { opacity: .72; min-height: 20px; padding-top: 2px; font-size: 10px; }
  .body { margin-block: 4px 2px; }
  .receipt-row { margin-top: 3px; }
  .reply-bar { padding: 7px max(10px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)); }
  .composer { min-height: 50px; gap: 6px; padding: 5px max(7px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left)); }
  .sticker-panel { left: max(7px, env(safe-area-inset-left)); right: max(7px, env(safe-area-inset-right)); bottom: calc(63px + env(safe-area-inset-bottom)); height: min(58vh, calc(var(--app-height, 100dvh) - 125px)); border-radius: 16px; }
  .sticker-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .composer-tools-menu { bottom: calc(100% + 7px); }
  .attach-button, .send-button { flex-basis: 38px; width: 38px; height: 38px; border-radius: 10px; }
  textarea { min-height: 38px; padding: 7px 9px; line-height: 1.3; }
  dialog { width: 100%; max-width: none; height: var(--app-height, 100dvh); max-height: none; margin: 0; border: 0; border-radius: 0; padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow-y: auto; }
  .dialog-head { position: sticky; top: calc(-1 * max(18px, env(safe-area-inset-top))); z-index: 2; margin: calc(-1 * max(18px, env(safe-area-inset-top))) calc(-1 * max(14px, env(safe-area-inset-right))) 0 calc(-1 * max(14px, env(safe-area-inset-left))); padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left)); background: var(--topbar); backdrop-filter: blur(12px); }
  .dialog-head h2 { font-size: 28px; }
  .user-form { grid-template-columns: 1fr; }
  .user-row { flex-direction: column; align-items: stretch; }
  .user-row-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .user-row-actions select { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .user-row-actions .reset-password-button { white-space: normal; }
  .boob-admin-head { align-items: start; flex-direction: column; }
  .boob-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .login-view { padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); place-items: center; }
  .login-card { width: 100%; padding: 26px 22px; border-radius: 20px; }
  .login-card h1 { font-size: clamp(36px, 12vw, 44px); }
  .theme-picker { grid-template-columns: 1fr; }
  .mention-center-toolbar { grid-template-columns: 1fr; }
  .mention-center-toolbar button { width: 100%; }
  .mention-center-item { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 10px; }
  .mention-center-avatar { width: 36px; height: 36px; border-radius: 10px; }
  .mention-center-item time { grid-column: 3; grid-row: 1; justify-self: end; }
}

@media (max-width: 350px) {
  .logout-button { max-width: none; padding-inline: 7px; font-size: 9px; }
  .brand small { max-width: 108px; }
  .message { max-width: 98%; }
  .message.web { max-width: 92%; }
  .messages { padding-inline: 6px; }
  .top-actions { gap: 4px; }
  .brand { gap: 6px; }
  .brand-mark.small { width: 30px; height: 30px; }
  .icon-button { width: 32px; height: 32px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .chat-view { grid-template-rows: 50px auto auto minmax(0, 1fr) auto auto auto; }
  .topbar { padding-top: 0; }
  .brand-mark.small { width: 32px; height: 32px; }
  .messages { padding-block: 8px; }
  .composer { min-height: 52px; padding-block: 4px; }
  .attach-button, .send-button { height: 42px; }
}
