:root {
  --bg: #0d0f17;
  --panel: #151826;
  --panel2: #1b1f31;
  --line: #262b42;
  --text: #e8eaf6;
  --muted: #8a90ad;
  --accent: #7c5cff;
  --accent2: #00d4ff;
  --danger: #ff5c7a;
  --like: #ff4f87;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
.logo { font-weight: 800; font-size: 24px; letter-spacing: -.5px; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.auth-card .logo { font-size: 34px; display: block; margin-bottom: 4px; }
.auth-home { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.auth-card input[name="name"] { margin-top: 4px; }
.auth-card p.sub { margin: 0 0 20px; color: var(--muted); }
.auth-card input { width: 100%; padding: 12px 14px; margin-bottom: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; outline: none; }
.auth-card input:focus { border-color: var(--accent); }
.auth-card .btn { width: 100%; padding: 12px; }
.auth-card .check { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.auth-card .check input { width: auto; margin: 0; }
.auth-card .legal-box { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.auth-card .legal-box summary { cursor: pointer; }
.auth-card .legal-copy { margin-top: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.auth-card .legal-copy p { margin: 0 0 8px; }
.auth-card .legal-copy p:last-child { margin-bottom: 0; }
.auth-switch { margin-top: 16px; text-align: center; color: var(--muted); }
.auth-switch a { cursor: pointer; }
.err { color: var(--danger); min-height: 20px; margin: 0 0 8px; font-size: 14px; }

/* layout */
.shell { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; gap: 0; min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); }
.nav .logo { padding: 0 12px 14px; }
.nav a, .nav button.link { display: block; text-align: left; background: none; border: 0; padding: 11px 14px; border-radius: 12px; color: var(--text); font-size: 17px; }
.nav a:hover, .nav button.link:hover { background: var(--panel); text-decoration: none; }
.nav a.active { font-weight: 700; background: var(--panel); }
.nav .spacer { flex: 1; }
.nav .who { color: var(--muted); padding: 8px 14px; font-size: 14px; }
.main { border-right: 1px solid var(--line); min-width: 0; }
.side { padding: 18px 16px; position: sticky; top: 0; height: 100vh; overflow: auto; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(13,15,23,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 19px; }
.back { background: none; border: 0; font-size: 20px; padding: 4px 8px; border-radius: 8px; }
.back:hover { background: var(--panel); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 14px; background: none; border: 0; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }

/* composer */
.composer { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cbody { flex: 1; min-width: 0; }
.composer textarea { width: 100%; resize: none; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 18px; min-height: 52px; }
.composer textarea::placeholder { color: var(--muted); }
.crow { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.count { color: var(--muted); font-size: 13px; }
.count.warn { color: var(--danger); }
.btn { background: linear-gradient(90deg, var(--accent), #5b8cff); border: 0; color: #fff; font-weight: 700; padding: 9px 18px; border-radius: 999px; }
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost.on { background: var(--panel2); }

/* posts */
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; text-transform: uppercase; }
.avatar.big { width: 76px; height: 76px; font-size: 32px; }
.post { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.post:hover { background: rgba(255,255,255,.02); }
.post.focus { cursor: default; font-size: 17px; background: var(--panel); }
.post .pbody { flex: 1; min-width: 0; }
.phead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.phead .name { font-weight: 700; color: var(--text); }
.phead .meta { color: var(--muted); font-size: 14px; }
.ptext { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; margin: 2px 0 8px; }
.pactions { display: flex; gap: 26px; color: var(--muted); }
.pactions button, .pactions a { background: none; border: 0; padding: 4px 6px; margin-left: -6px; border-radius: 8px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.pactions button:hover, .pactions a:hover { background: var(--panel2); text-decoration: none; color: var(--text); }
.pactions .like.on { color: var(--like); }
.pactions .del:hover { color: var(--danger); }

/* profile */
.profile { padding: 20px 18px; border-bottom: 1px solid var(--line); }
.profile .row { display: flex; justify-content: space-between; align-items: flex-start; }
.profile h2 { margin: 10px 0 0; font-size: 22px; }
.profile .bio { margin: 8px 0; }
.profile .stats { display: flex; gap: 18px; color: var(--muted); }
.profile .stats b { color: var(--text); }

/* side */
.search input { width: 100%; padding: 11px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; outline: none; }
.search input:focus { border-color: var(--accent); }
.card { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.card h3 { margin: 0 0 10px; font-size: 17px; }
.muted { color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.newbar { display: block; width: 100%; padding: 12px; background: var(--panel2); border: 0; border-bottom: 1px solid var(--line); color: var(--accent2); font-weight: 600; }
.guest-shell { max-width: 1120px; grid-template-columns: minmax(0, 1fr) 300px; }
.guest-header { grid-column: 1 / -1; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(16px); }
.guest-header .logo { font-size: 25px; }
.guest-header > div { display: flex; gap: 8px; }
.guest-tagline { color: var(--muted); }
.guest-main { min-height: 75vh; }
.guest-feed-status { padding: 8px 18px; color: var(--muted); font-size: 12px; }
.guest-join { margin: 14px 4px; font-size: 13px; }
.public-post .phead { align-items: center; }
.handle { color: var(--muted); font-size: 13px; font-weight: 400; }
.public-actions { margin-top: 8px; font-size: 13px; }
.chat-recipient { position: relative; flex: 1; min-width: 0; }
.chat-recipient input { width: 100%; }
.chat-user-suggestions { position: absolute; z-index: 8; top: calc(100% + 5px); left: 0; right: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
.chat-user-suggestions[hidden] { display: none; }
.chat-user-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.chat-user-option:hover { background: var(--panel2); }
.chat-user-option .avatar { width: 36px; height: 36px; font-size: 14px; }
.chat-user-option span { display: grid; }
.chat-user-option small { color: var(--muted); }
.chat-user-empty { padding: 12px; color: var(--muted); }
.chat-start { display: flex; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-start input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; }
.chat-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--text); }
.chat-list-row:hover { background: var(--panel2); text-decoration: none; }
.chat-list-main { flex: 1; min-width: 0; display: grid; }
.chat-list-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-meta { display: grid; justify-items: end; gap: 6px; font-size: 12px; }
.chat-unread { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-on, #fff); text-align: center; }
.chat-back-link { display: inline-block; padding: 8px 18px; }
.chat-status { padding: 4px 18px; color: var(--muted); font-size: 12px; }
.chat-thread { display: flex; flex-direction: column; gap: 8px; min-height: 38vh; max-height: 58vh; overflow-y: auto; padding: 12px 18px; }
.chat-message { display: flex; max-width: 82%; }
.chat-message.own { align-self: flex-end; justify-content: flex-end; }
.chat-bubble { min-width: 88px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; background: var(--panel); overflow-wrap: anywhere; }
.chat-message.own .chat-bubble { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.chat-sender { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; }
.chat-text { white-space: pre-wrap; }
.chat-bubble time { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; text-align: right; }
.chat-composer { position: sticky; bottom: 0; background: var(--panel); }
.chat-composer textarea { font-size: 16px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.4); }

/* mobile */
@media (max-width: 900px) {
  .guest-shell { grid-template-columns: minmax(0, 1fr); }
  .guest-header { grid-column: 1; padding: 10px 14px; }
  .guest-tagline { display: none; }
  .guest-shell .side { display: block; position: static; height: auto; padding: 8px 14px 80px; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { border-right: 0; padding-bottom: 64px; }
  .nav { position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; justify-content: space-around; padding: 6px; border-right: 0; border-top: 1px solid var(--line); background: var(--bg); }
  .nav .logo, .nav .spacer, .nav .who { display: none; }
  .nav a, .nav button.link { padding: 10px 12px; font-size: 15px; }
}

/* ---------- настройки и админ-панель ---------- */
.nav .ic { display: inline-block; width: 1.7em; }
.auth-card .note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.toast.ok { background: var(--accent); }
.panel { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel h2 { margin: 0 0 8px; font-size: 18px; }
.panel ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.panel li { margin: 6px 0; }
.panel li b { color: var(--text); }
.legal-copy { color: var(--muted); line-height: 1.5; }
.legal-copy p { margin: 0 0 8px; }
.inline-link { text-decoration: underline; }
.tabs a { flex: 1; padding: 14px 10px; text-align: center; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; white-space: nowrap; }
.tabs a:hover { text-decoration: none; background: rgba(255,255,255,.02); }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs { overflow-x: auto; }
.admin-live { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; color: var(--muted); font-size: 13px; }
.admin-live .error { color: var(--danger); }
.admin-preview { padding: 0; }
.admin-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 8px; }
.admin-preview-heading h2 { margin: 0; }
.admin-preview-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tile b { display: block; font-size: 26px; }
.tile span { color: var(--muted); font-size: 13px; }
.tile.warn b { color: var(--danger); }
.arow { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.arow .main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.arow .ptext { margin: 4px 0 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel2); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.badge.red { background: rgba(255,92,122,.15); color: var(--danger); }
.badge.green { background: rgba(0,212,255,.12); color: var(--accent2); }
.badge.violet { background: rgba(124,92,255,.2); color: #b5a3ff; }
.verified { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent2); color: #071019; font-size: 11px; font-weight: 900; line-height: 1; vertical-align: middle; }
.panel form[data-official-announcement] textarea { width: 100%; min-height: 96px; resize: vertical; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 12px; font: inherit; }
.panel form[data-official-announcement] .actions { justify-content: space-between; align-items: center; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.filters input, .filters select { flex: 1 1 140px; min-width: 0; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 9px 12px; font: inherit; outline: none; }
.filters input:focus, .filters select:focus { border-color: var(--accent); }
.filter-reset { display: inline-flex; align-items: center; padding: 0 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.filter-reset:hover { color: var(--accent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.kv { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.ev-bad { color: var(--danger); }

.shell.admin-mode { grid-template-columns: 232px minmax(0, 1fr); }
.shell.admin-mode > .side { display: none; }
.shell.admin-mode > .main { border-right: 0; }
.admin-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: calc(100vh - 54px); }
.admin-menu { position: sticky; top: 56px; align-self: start; display: grid; align-content: start; gap: 18px; min-width: 0; max-height: calc(100vh - 56px); overflow-y: auto; padding: 24px 12px 20px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 45%, var(--panel)); }
.admin-menu-group { display: grid; gap: 3px; }
.admin-menu-label { padding: 0 11px 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.admin-menu a { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 11px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: color .15s ease, background .15s ease; }
.admin-menu a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.admin-menu a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--panel)); }
.admin-menu-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: none; font-size: 17px; }
.admin-menu .admin-back-link { align-self: end; margin-top: 2px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; padding-top: 14px; }
.admin-content { min-width: 0; padding: 0 24px 40px; }
.admin-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0 18px; border-bottom: 1px solid var(--line); }
.admin-page-heading h1 { margin: 4px 0 3px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(24px, 3vw, 31px); letter-spacing: -.035em; }
.admin-page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-eyebrow { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.admin-eyebrow span { margin: 0 5px; color: var(--accent); }
.admin-refresh-button { flex: none; min-height: 36px; }
.admin-live { justify-content: flex-start; min-height: 40px; padding: 8px 0 10px; font-size: 11px; }
.admin-live-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent); }
.admin-live.error .admin-live-dot { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 13%, transparent); }
.admin-overview-section { margin: 12px 0 24px; }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 8px 0 12px; }
.admin-section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.admin-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; }
.admin-stat { display: grid; min-width: 0; gap: 8px; padding: 14px 15px; color: var(--text); text-decoration: none; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.admin-stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); box-shadow: 0 10px 26px rgba(31, 51, 39, .09); text-decoration: none; }
.admin-stat > span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.admin-stat b { font-size: 25px; line-height: 1; }
.admin-stat > small { color: var(--accent); font-size: 10px; font-weight: 700; }
.admin-stat.warn b { color: var(--danger); }
.admin-stat.warn > small { color: var(--danger); }
.admin-retention { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.admin-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-shortcuts a { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 1px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.admin-shortcuts a:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--panel)); text-decoration: none; }
.admin-shortcuts a > span { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 11%, var(--panel)); color: var(--accent); font-size: 18px; }
.admin-shortcuts b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shortcuts small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-preview { margin: 20px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.admin-preview .admin-preview-heading { padding: 15px 16px 12px; }
.admin-preview .admin-preview-heading > a { flex: none; font-size: 12px; font-weight: 700; }
.admin-preview .arow { padding: 12px 16px; }
.admin-preview .arow:last-of-type { border-bottom: 0; }
.official-account-card { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--panel)), var(--panel) 62%); }
.official-account-heading { display: flex; align-items: center; gap: 13px; }
.official-account-heading h2 { margin: 3px 0 2px; font-size: 20px; }
.official-account-heading a { font-size: 13px; }
.official-avatar { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 15px; background: var(--accent); color: var(--accent-on); font-size: 23px; font-weight: 800; }
.official-account-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 8px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.official-account-stats b { color: var(--text); }
.official-account-card > p { margin: 0; font-size: 12px; }
.official-settings-card { margin: 12px 0; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.official-settings-card h2 { font-size: 17px; }
.official-settings-card > p { margin: 0 0 14px; font-size: 12px; }
.official-profile-form { display: grid; gap: 12px; }
.official-profile-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.official-profile-form input, .official-profile-form textarea, form[data-official-announcement] textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; }
.official-profile-form input:focus, .official-profile-form textarea:focus, form[data-official-announcement] textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.official-profile-form textarea, form[data-official-announcement] textarea { resize: vertical; }
.official-profile-form .actions, form[data-official-announcement] .actions { align-items: center; justify-content: space-between; margin: 0; }
.official-profile-form .actions .muted { font-size: 11px; }
.official-recent-posts { margin-top: 14px; }

@media (max-width: 900px) {
  .shell.admin-mode { grid-template-columns: minmax(0, 1fr); }
  .admin-layout { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .admin-menu { position: sticky; z-index: 8; top: 52px; display: flex; align-items: center; gap: 8px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(12px); scrollbar-width: thin; }
  .admin-menu-group { display: flex; align-items: center; gap: 4px; flex: none; }
  .admin-menu-label { display: none; }
  .admin-menu a { min-height: 36px; flex: none; gap: 7px; padding: 7px 10px; background: transparent; white-space: nowrap; }
  .admin-menu-icon { width: 17px; height: 17px; font-size: 15px; }
  .admin-menu .admin-back-link { margin: 0 0 0 auto; padding: 7px 10px; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
  .admin-content { padding: 0 18px 32px; }
  .admin-page-heading { padding-top: 21px; }
  .admin-live { padding: 8px 0; }
}
@media (max-width: 520px) {
  .admin-menu a { font-size: 12px; }
  .admin-content { padding-right: 14px; padding-left: 14px; }
  .admin-page-heading { align-items: flex-start; }
  .admin-page-heading h1 { font-size: 25px; }
  .admin-page-heading p { max-width: 34ch; line-height: 1.45; }
  .admin-refresh-button { padding: 7px 9px; }
  .admin-refresh-button span { display: none; }
  .admin-stats { gap: 8px; }
  .admin-stat { padding: 12px; }
  .admin-stat b { font-size: 22px; }
  .admin-stat > span { font-size: 11px; }
  .admin-shortcuts { grid-template-columns: 1fr; }
  .admin-preview .admin-preview-heading { align-items: flex-start; padding: 14px 12px 10px; }
  .admin-preview .arow { padding-right: 12px; padding-left: 12px; }
  .official-account-stats { gap: 8px 12px; }
  .official-profile-form .actions, form[data-official-announcement] .actions { align-items: flex-end; }
}
@media (max-width: 900px) {
  .nav .lbl { display: none; }
  .nav .ic { width: auto; font-size: 22px; }
  .nav a, .nav button.link { padding: 8px 14px; }
  .arow { flex-wrap: wrap; }
  .toast { bottom: 84px; max-width: calc(100vw - 32px); text-align: center; }
}

/* защита и медиа */
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.attach{cursor:pointer;font-size:18px;margin-right:auto;padding:2px 6px}
.previews{display:flex;gap:8px;flex-wrap:wrap}
.previews:not(:empty){margin:8px 0}
.prev{position:relative;width:84px;height:84px;border-radius:10px;overflow:hidden;background:#0003}
.prev img,.prev video{width:100%;height:100%;object-fit:cover}
.prev.busy img,.prev.busy video{opacity:.4}
.prev .pct{position:absolute;inset:0;display:grid;place-items:center;font-size:13px;font-weight:600;color:#fff;text-shadow:0 1px 2px #000}
.prev .x{position:absolute;top:2px;right:2px;width:20px;height:20px;border-radius:50%;border:0;background:#000a;color:#fff;cursor:pointer;line-height:1}
.pmedia{display:grid;gap:4px;margin:8px 0;border-radius:14px;overflow:hidden;max-width:560px}
.pmedia.n2,.pmedia.n3,.pmedia.n4{grid-template-columns:1fr 1fr}
.pmedia.n3 :first-child{grid-row:span 2}
.pmedia img,.pmedia video{width:100%;height:100%;max-height:420px;object-fit:cover;background:#000;display:block}
.pmedia.n1 img,.pmedia.n1 video{object-fit:contain}

:root {
  --bg: #f5f7f4;
  --panel: #ffffff;
  --panel2: #edf2ee;
  --line: #e1e8e2;
  --text: #203128;
  --muted: #66766c;
  --accent: #16745b;
  --accent-on: #ffffff;
  --accent2: #c56b4c;
  --danger: #c74754;
  --like: #c74768;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #111a15;
  --panel: #1a261f;
  --panel2: #24332a;
  --line: #33453a;
  --text: #edf4ee;
  --muted: #a1b2a6;
  --accent: #8fd0aa;
  --accent-on: #14221a;
  --accent2: #efaa88;
  --danger: #ff7780;
  --like: #ff829e;
  color-scheme: dark;
}
html, body {
  min-height: 100%;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 12% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 34rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
button, input, textarea, select { color: var(--text); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
.logo { color: var(--accent); background: none; -webkit-text-fill-color: currentColor; font-family: Georgia, "Times New Roman", serif; letter-spacing: 0; }
.shell { max-width: 1220px; grid-template-columns: 232px minmax(0, 1fr) 300px; background: color-mix(in srgb, var(--bg) 88%, transparent); }
.nav { padding: 24px 16px; background: color-mix(in srgb, var(--bg) 94%, transparent); border-color: var(--line); }
.nav .logo { font-size: 27px; padding: 0 12px 24px; }
.nav a, .nav button.link { border-radius: 12px; padding: 12px 14px; transition: background-color .16s ease, color .16s ease, transform .16s ease; }
.nav a:hover, .nav button.link:hover { transform: translateX(2px); }
.nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--panel)); }
.nav .who { overflow-wrap: anywhere; }
.main { background: color-mix(in srgb, var(--panel) 86%, transparent); border-color: var(--line); }
.side { padding: 24px 18px; }
.topbar { background: color-mix(in srgb, var(--bg) 90%, transparent); border-color: var(--line); backdrop-filter: blur(16px); }
.topbar h1 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 700; }
.tabs button.on, .tabs a.on { border-bottom-color: var(--accent); }
.composer { border-color: var(--line); }
.composer textarea { color: var(--text); }
.btn { background: var(--accent); color: var(--accent-on); border-radius: 999px; transition: filter .16s ease, transform .16s ease; }
.btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.post { border-color: var(--line); transition: background-color .14s ease; }
.post:hover { background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.post.focus { background: var(--panel2); }
.phead .meta, .pactions { color: var(--muted); }
.pactions { justify-content: space-between; max-width: 420px; }
.pactions button, .pactions a { min-width: 36px; min-height: 32px; justify-content: center; }
.pactions .bookmark.on { color: var(--accent2); }
.profile { background: var(--panel); border-color: var(--line); }
.search input, .filters input, .filters select, .auth-card input { background: var(--panel); border-color: var(--line); color: var(--text); }
.search input:focus, .filters input:focus, .filters select:focus, .auth-card input:focus { border-color: var(--accent); }
.card, .tile { background: var(--panel); border-color: var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(31, 51, 39, .045); }
.card { padding: 17px 16px; }
.card h3 { margin-bottom: 12px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; letter-spacing: -.15px; }
.newbar { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); color: var(--accent); border-color: var(--line); cursor: pointer; }
.auth-card { background: var(--panel); border-color: var(--line); border-radius: 20px; box-shadow: 0 18px 60px rgba(35, 57, 45, .1); }
.auth-card .logo { color: var(--accent); }
.panel, .arow, .filters { border-color: var(--line); }
.badge.green { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent); }
.badge.violet { background: color-mix(in srgb, var(--accent2) 16%, var(--panel)); color: var(--accent2); }
.verified { background: var(--accent); color: var(--bg); }
.toast { background: var(--danger); border-radius: 999px; }
.toast.ok { background: var(--accent); color: var(--accent-on); }

.sug { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
.sug:last-child { padding-bottom: 0; border-bottom: 0; }
.sug .avatar { width: 38px; height: 38px; font-size: 15px; }
.sug-profile { display: grid; min-width: 0; gap: 3px; color: var(--text); text-decoration: none; }
.sug-profile:hover { color: var(--accent); text-decoration: none; }
.sug-name { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.sug-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sug-name .verified { flex: none; }
.sug-details { display: flex; min-width: 0; gap: 7px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; white-space: nowrap; }
.sug-details .handle { min-width: 0; overflow: hidden; font-size: inherit; text-overflow: ellipsis; }
.sug-followers { flex: none; }
.sug .badge { justify-self: start; max-width: 100%; margin: 1px 0 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sug-action { flex: none; min-width: 70px; min-height: 34px; padding: 6px 10px; font-size: 12px; line-height: 1.2; text-align: center; white-space: nowrap; }
.sug-action:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sug-action.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.card #suggest > .muted { display: block; padding: 8px 0 2px; font-size: 13px; line-height: 1.5; }
.guest-join { padding: 0 4px; line-height: 1.6; }

@media (max-width: 900px) {
  .shell { max-width: 680px; }
  .nav {
    left: 50%; right: auto; width: min(100%, 680px); transform: translateX(-50%);
    justify-content: flex-start; gap: 4px; padding: 7px max(10px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));
    overflow-x: auto; overscroll-behavior-x: contain; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(16px);
  }
  .nav a, .nav button.link { flex: 0 0 auto; min-width: 48px; min-height: 46px; padding: 8px 13px; }
  .nav .ic { font-size: 20px; }
  .main { background: var(--panel); }
  .side { display: none; }
  .main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .guest-header .btn { padding: 8px 12px; font-size: 13px; }
  .guest-header .logo { font-size: 22px; }
  .guest-feed-status { padding-left: 14px; padding-right: 14px; }
  .topbar { padding: 12px 15px; }
  .composer, .post { padding-left: 14px; padding-right: 14px; }
  .pactions { max-width: none; }
  .profile .stats { gap: 12px; flex-wrap: wrap; }
  .auth-card { padding: 24px 20px; }
}
@media (max-width: 380px) {
  .guest-header { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .guest-header .logo { font-size: 20px; white-space: nowrap; }
  .guest-header > div { flex: none; gap: 6px; }
  .guest-header .btn { padding: 7px 9px; font-size: 12px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.theme-switch { display: flex; gap: 8px; margin-top: 10px; }
.theme-choice[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.title-badge { background: color-mix(in srgb, var(--accent2) 14%, var(--panel)); color: var(--accent2); }
.title-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.post-limit-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
.setting-field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.setting-field input { min-width: 0; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.post-limit-settings .settings-error { grid-column: 1 / -1; color: var(--danger); margin: 0; }
.post-limit-settings .actions { grid-column: 1 / -1; }
.title-form label { display: grid; gap: 6px; flex: 1 1 220px; color: var(--muted); font-size: 13px; }
.title-form input, .site-dialog input, .site-dialog textarea { width: 100%; min-width: 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; }
.thread-node { margin-left: min(var(--indent), 56px); border-left: 1px solid var(--line); }
.thread-node > .post { padding-left: 14px; }
.thread-node > .thread-node { border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
.reply-action { color: var(--accent) !important; }
.like-count { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--muted); font-size: 14px; }
.site-dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(12, 20, 16, .58); backdrop-filter: blur(5px); }
.site-dialog { width: min(100%, 480px); max-height: min(90vh, 680px); overflow-y: auto; margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 24px 80px rgba(0, 0, 0, .28); }
.site-dialog h2 { margin: 0 0 8px; font-size: 20px; font-family: Georgia, "Times New Roman", serif; }
.site-dialog p { margin: 0 0 16px; color: var(--muted); }
.site-dialog .dialog-error:not([hidden]) { color: var(--danger); margin: 0; font-size: 13px; }
.site-dialog label { display: grid; gap: 7px; margin: 14px 0; color: var(--muted); font-size: 14px; }
.site-dialog textarea { resize: vertical; }
.site-dialog .actions { justify-content: flex-end; margin: 18px 0 0; }
.external-embed { width: min(100%, 480px); aspect-ratio: 4 / 3; margin: 10px 0; overflow: hidden; border-radius: 8px; background: var(--panel2); }
.external-embed iframe, .external-embed img { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.external-embed.direct-gif { width: min(100%, 480px); max-height: 420px; aspect-ratio: auto; }
.external-embed.direct-gif img { max-height: 420px; }
.site-dialog .btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.agreement-page { max-width: 620px; }
.agreement-page h1 { margin: 10px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
.agreement-page .legal-copy { margin-bottom: 22px; }
@media (max-width: 520px) {
  .chat-start { padding: 12px 14px; }
  .chat-status { padding-left: 14px; padding-right: 14px; }
  .chat-thread { max-height: 55vh; padding: 10px 14px; }
  .chat-message { max-width: 90%; }
  .chat-composer .avatar { display: none; }
  .post-limit-settings { grid-template-columns: 1fr; }
  .thread-node { margin-left: min(var(--indent), 28px); }
  .site-dialog { padding: 18px; }
  .title-form { padding-left: 14px; padding-right: 14px; }
}
.pactions .rep{opacity:.5}.pactions .rep:hover{opacity:1}

.mobile-primary-nav, .mobile-more { display: none; }
.mobile-compose { display: none; }
.compose-modal[hidden] { display: none; }
.compose-modal { position: fixed; z-index: 80; inset: 0; display: grid; align-items: end; justify-items: center; }
.compose-scrim { position: absolute; inset: 0; border: 0; background: rgba(15, 24, 19, .48); backdrop-filter: blur(3px); }
.compose-sheet { position: relative; width: min(100%, 680px); max-height: min(88vh, 760px); overflow-y: auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--panel); box-shadow: 0 -16px 60px rgba(0, 0, 0, .18); animation: compose-rise .2s ease-out; }
.compose-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compose-sheet h2 { margin: 2px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
.compose-kicker { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.compose-hint { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.compose-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel2); font-size: 24px; line-height: 1; }
.compose-modal-form { padding: 0; border: 0; }
.compose-modal-form .avatar { display: none; }
.compose-modal-form textarea { min-height: 120px; font-size: 18px; }
.compose-modal-form .crow { justify-content: flex-end; }
.compose-open { overflow: hidden; }
@keyframes compose-rise { from { opacity: .7; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.admin-row-actions { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; }
.admin-row-actions .btn { min-height: 32px; }
@media (max-width: 900px) {
  .shell { width: 100%; max-width: 680px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); }
  .nav {
    position: fixed; z-index: 20; top: auto; bottom: 0; left: 50%; right: auto;
    width: min(100%, 680px); height: calc(64px + env(safe-area-inset-bottom));
    transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch;
    gap: 4px; padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
    overflow: visible; border: 0; border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(16px);
  }
  .nav > .logo, .nav > .spacer, .nav > .who, .nav > a, .nav > button.link { display: none; }
  .mobile-primary-nav {
    display: contents;
  }
  .mobile-primary-nav a, .mobile-more > summary {
    min-width: 0; min-height: 48px; padding: 4px 2px; border-radius: 8px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px;
    color: var(--muted); font-size: 11px; line-height: 1.2; text-align: center; text-decoration: none;
  }
  .mobile-primary-nav .lbl, .mobile-more .lbl { display: block; }
  .mobile-primary-nav a.active, .mobile-more.active > summary {
    color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); font-weight: 700;
  }
  .mobile-primary-nav .ic, .mobile-more .ic { width: auto; font-size: 20px; line-height: 1; }
  .mobile-compose { position: relative; justify-self: center; align-self: center; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 15px; background: var(--accent); color: var(--accent-on); box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
  .mobile-compose span { font-size: 30px; font-weight: 400; line-height: 1; transform: translateY(-1px); }
  .mobile-compose:active { transform: scale(.94); }
  .shell.admin-mode .mobile-compose { display: none; }
  .page-composer { display: none; }
  .mobile-more { position: relative; display: block; }
  .mobile-more > summary { height: 100%; cursor: pointer; list-style: none; }
  .mobile-more > summary::-webkit-details-marker { display: none; }
  .mobile-more:not([open]) .mobile-more-menu { display: none; }
  .mobile-more-menu {
    position: absolute; right: 0; bottom: calc(100% + 10px); width: min(240px, calc(100vw - 24px));
    display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--panel); box-shadow: 0 12px 36px rgba(0, 0, 0, .2);
  }
  .mobile-more-menu a, .mobile-more-menu button {
    min-height: 44px; display: flex; align-items: center; padding: 10px 12px;
    border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 14px; text-align: left;
  }
  .mobile-more-menu a.active, .mobile-more-menu a:hover, .mobile-more-menu button:hover {
    background: var(--panel2); color: var(--accent); text-decoration: none;
  }
  .main { width: 100%; min-width: 0; min-height: 100vh; padding: 0 0 calc(76px + env(safe-area-inset-bottom)); border: 0; background: var(--panel); }
  .side { display: none; }
  .topbar { min-height: 52px; padding: 10px 14px; }
  .composer, .post { gap: 10px; padding: 12px 14px; }
  .composer textarea { min-height: 48px; font-size: 16px; }
  .pactions { max-width: none; gap: 4px; flex-wrap: wrap; }
  .pactions button, .pactions a { min-width: 40px; min-height: 40px; margin-left: 0; padding: 6px; }
  .thread-node { margin-left: 12px; }
  .thread-node > .post { padding-left: 10px; }
  .profile { padding: 16px 14px; }
  .profile h2 { overflow-wrap: anywhere; font-size: 20px; }
  .profile .stats { gap: 8px 14px; flex-wrap: wrap; font-size: 13px; }
  .panel { padding: 14px; }
  .filters { padding: 10px 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; }
  .tile { min-width: 0; padding: 10px; }
  .tile b { font-size: 22px; }
  .arow { gap: 8px; padding: 12px 14px; }
  .tabs { max-width: 100%; }
  .admin-live { padding: 10px 14px; }
  .admin-preview-heading { padding: 14px 14px 8px; }
  .admin-row-actions { width: 100%; justify-content: flex-start; }
  .auth { min-height: 100svh; align-items: start; padding: max(28px, 8svh) 16px 24px; }
  .auth-card { width: min(100%, 420px); padding: 24px 20px; }
  .auth-card input, .site-dialog input, .site-dialog textarea, .search input { font-size: 16px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: calc(100vw - 28px); text-align: center; }
}
@media (max-width: 380px) {
  .nav { padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
  .mobile-more { min-width: 0; }
  .mobile-primary-nav a, .mobile-more > summary { font-size: 10px; }
  .mobile-compose { width: 38px; height: 38px; border-radius: 14px; }
  .post .avatar { width: 36px; height: 36px; font-size: 15px; }
  .post, .composer { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .pactions button, .pactions a { min-width: 36px; }
  .thread-node { margin-left: 8px; }
  .thread-node > .post { padding-left: 8px; }
  .auth-card { padding: 22px 16px; }
}

.shell.guest-shell { max-width: 1120px; grid-template-columns: minmax(0, 1fr) 300px; }
.guest-shell .guest-header { grid-column: 1 / -1; }
.guest-main .topbar { position: relative; top: auto; }
.guest-shell .side { position: sticky; top: 72px; height: auto; max-height: calc(100vh - 72px); }
.chat-list-main small.handle { font-size: 12px; }
.profile .row { align-items: center; gap: 12px; }
@media (max-width: 900px) {
  .shell.guest-shell { width: 100%; max-width: 680px; grid-template-columns: minmax(0, 1fr); }
  .guest-shell .guest-header { grid-column: 1; }
  .guest-shell .main { padding-bottom: 18px; }
  .guest-shell .side { position: static; max-height: none; padding-bottom: 24px; }
}
@media (max-width: 520px) {
  .guest-header .btn { padding: 8px 12px; font-size: 13px; }
  .chat-start { align-items: flex-start; }
  .chat-start > .btn { flex: none; }
}
