/* Desktop workspace and responsive authentication, using Clochat's native palette. */
:root { color-scheme: dark; --elevated: #242d26; --field: #161c18; --outgoing: #304b39; --focus: #b2d3ad; --sidebar-width: 360px; --rail-width: 76px; }
html, body, #root { height: 100%; }
body { font-size: 15px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button, a, label.attach { -webkit-tap-highlight-color: transparent; }
button, .attach { cursor: pointer; touch-action: manipulation; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
input, textarea { caret-color: var(--accent2); }
::selection { background: #436a4e; color: var(--text); }
* { scrollbar-width: thin; scrollbar-color: #3d4b40 transparent; }
a { color: var(--accent2); text-underline-offset: 4px; }
svg { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.brand-mark { display: block; width: 44px; height: 44px; border-radius: 13px; }
.field { background: var(--field); border-color: var(--line); color: var(--text); border-radius: 14px; min-height: 48px; }
.primary { min-height: 52px; background: var(--accent); color: var(--text); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.primary svg, .text-button svg { width: 20px; height: 20px; }
.ghost { background: var(--elevated); }
.icon { color: var(--muted); display: inline-grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 10px; border-radius: 14px; }
.icon svg { width: 22px; height: 22px; }
.text-button { border: 0; padding: 8px 0; background: transparent; color: var(--accent2); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.form-error { color: var(--danger); font-size: 13px; line-height: 1.5; min-height: 0; margin: 0; }
.form-error:not(:empty) { margin: 12px 0; }
.field-label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.field-label span { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
/* Authentication */
.auth-page { min-height: 100dvh; max-width: 1280px; margin: auto; padding: 32px 60px 24px; display: flex; flex-direction: column; }
.auth-header, .auth-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.auth-brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; color: var(--text); font-size: 22px; font-weight: 650; letter-spacing: -.025em; }
.brand-web { margin-left: 8px; color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.language-button { border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 9px 14px; color: var(--muted); font-size: 13px; }
.auth-layout { flex: 1; display: grid; grid-template-columns: 1fr 420px; align-items: center; gap: 64px; padding: 56px 0; }
.auth-intro { max-width: 530px; padding-bottom: 36px; }
.auth-intro h1 { font-size: clamp(36px, 3.8vw, 53px); line-height: 1.13; font-weight: 650; letter-spacing: -.035em; margin: 0 0 24px; }
.auth-intro h1 span { color: var(--accent2); }
.auth-intro > p { font-size: 17px; color: var(--muted); max-width: 350px; line-height: 1.7; margin: 0; }
.auth-privacy { display: flex; align-items: flex-start; gap: 14px; margin-top: 64px; }
.auth-privacy > svg { width: 22px; height: 22px; margin-top: 3px; color: var(--accent2); }
.auth-privacy strong, .auth-privacy span { display: block; }
.auth-privacy strong { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.auth-privacy span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-card { background: var(--panel); border-radius: 24px; padding: 32px; }
.auth-card h2 { font-size: 25px; line-height: 1.25; font-weight: 650; letter-spacing: -.025em; margin: 0 0 8px; }
.auth-description { color: var(--muted); margin: 0 0 26px; font-size: 14px; line-height: 1.6; }
.auth-methods { background: var(--bg); padding: 4px; border-radius: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; }
.auth-methods button { border: 0; border-radius: 10px; padding: 10px 8px; background: transparent; color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-methods svg { width: 17px; height: 17px; }
.auth-methods button[aria-pressed="true"] { background: var(--elevated); color: var(--text); }
.qr-code { width: 248px; height: 248px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #fff; color: #101411; display: grid; place-items: center; }
.qr-code img { display: block; width: 248px; height: 248px; }
.qr-loading { font-size: 13px; }
.qr-status { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 22px; min-height: 18px; }
.qr-renew { color: #101411; background: #fff; border: 0; width: 100%; height: 100%; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.qr-renew svg { width: 32px; height: 32px; }
.qr-steps { counter-reset: steps; list-style: none; padding: 0; margin: 0; font-size: 13px; display: grid; gap: 12px; }
.qr-steps li { counter-increment: steps; display: flex; gap: 12px; align-items: center; }
.qr-steps li::before { content: counter(steps); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--elevated); color: var(--accent2); flex-shrink: 0; font-size: 12px; font-weight: 600; }
.auth-help { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 16px 0 20px; }
.auth-card .phrase-field { resize: vertical; min-height: 146px; line-height: 1.7; }
.auth-submit { width: 100%; justify-content: space-between; padding: 14px 18px; margin-top: 8px; }
.app-link-fallback .primary { display: flex; justify-content: space-between; text-decoration: none; padding: 14px 18px; }
.auth-create { text-align: center; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; color: var(--muted); font-size: 13px; }
.auth-create button { margin-left: 4px; font-size: 13px; }
.auth-back { margin-bottom: 22px; font-size: 13px; }
.auth-footer { color: var(--muted); font-size: 12px; padding-top: 12px; }
.auth-footer a { color: var(--muted); text-decoration: none; }
.recovery-words { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 24px 0; }
.recovery-words > div { background: var(--field); padding: 10px; border-radius: 10px; font-size: 14px; overflow-wrap: anywhere; }
.recovery-words span { color: var(--muted); font-size: 11px; margin-right: 10px; display: inline-block; width: 14px; }
.save-phrase { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 16px; cursor: pointer; }
.save-phrase input { accent-color: var(--accent2); width: 18px; height: 18px; flex-shrink: 0; margin: 2px 0 0; }
.link-approval { width: min(100%, 420px); margin: auto; text-align: center; padding: 48px 0; }
.link-approval h1 { font-size: 30px; letter-spacing: -.025em; }
.link-approval .primary, .link-approval > .text-button { width: 100%; margin-top: 20px; }
.auth-symbol { background: var(--elevated); border-radius: 20px; padding: 20px; width: 80px; height: 80px; margin: 0 auto 24px; color: var(--accent2); }
.auth-symbol svg { width: 40px; height: 40px; }
#linkDetail { background: var(--panel); padding: 18px; border-radius: 14px; font-size: 14px; }
.boot-error { max-width: 400px; padding: 24px; margin: 20vh auto; text-align: center; }
/* Workspace */
.workspace { display: grid; grid-template-columns: var(--rail-width) var(--sidebar-width) minmax(0,1fr); width: 100%; height: 100dvh; overflow: hidden; }
.workspace-nav { border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 8px 18px; }
.rail-brand { display: block; margin-bottom: 20px; }
.rail-brand .brand-mark { width: 42px; height: 42px; }
.rail-button { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 5px; padding: 12px 4px; border: 0; border-radius: 14px; background: transparent; width: 58px; color: var(--muted); }
.rail-button svg { width: 23px; height: 23px; }
.rail-button span { font-size: 10px; }
.rail-button.active { color: var(--accent2); background: var(--panel); }
.rail-spacer { flex: 1; }
.rail-caption { color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.chat-sidebar { min-width: 0; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); overflow: hidden; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 23px 20px 18px; }
.sidebar-header h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.03em; margin: 0; font-weight: 650; }
.sidebar-header > div { display: flex; gap: 4px; }
.compose-button { color: var(--accent2); background: var(--elevated); }
.sidebar-header .mobile-profile { display: none; }
.sidebar-search { display: flex; align-items: center; gap: 10px; margin: 0 16px 18px; background: var(--bg); border-radius: 13px; padding: 0 12px; min-height: 44px; }
.sidebar-search > svg { width: 18px; height: 18px; color: var(--muted); }
.sidebar-search input { width: 100%; min-width: 0; background: transparent; border: 0; color: var(--text); padding: 12px 0; font-size: 13px; outline-offset: 0; }
.sidebar-search input::placeholder { color: var(--muted); }
.sidebar-search:focus-within { outline: 1px solid var(--accent2); }
.sidebar-search input:focus-visible { outline: none; }
.sidebar-search kbd { white-space: nowrap; color: var(--muted); font: 10px inherit; }
.chat-filters { display: flex; gap: 6px; padding: 0 16px 14px; }
.chat-filters button { font-size: 12px; font-weight: 500; border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 7px 11px; }
.chat-filters button.active { background: var(--elevated); color: var(--accent2); }
.chat-rows { overflow-y: auto; flex: 1; padding: 0 8px 8px; }
.chat-rows .chat { width: 100%; border: 0; border-radius: 14px; background: transparent; color: var(--text); text-align: left; padding: 13px 12px; gap: 13px; min-height: 80px; }
.chat-rows .chat.selected { background: #304333; }
.chat-avatar { flex-shrink: 0; }
.avatar { background: #304333; color: var(--accent2); font-weight: 600; width: 49px; height: 49px; font-size: 18px; flex-shrink: 0; }
.avatar svg { width: 22px; height: 22px; }
.chatmain, .chathead, .chathead2, .chatlast { display: block; }
.chathead, .chathead2 { display: flex; align-items: center; }
.chathead { gap: 6px; }
.chathead b { font-weight: 600; font-size: 14px; }
.chathead2 { margin-top: 6px; gap: 8px; }
.chat-time { font-size: 10px; font-variant-numeric: tabular-nums; }
.chatlast { font-size: 13px; line-height: 1.3; }
.badge { background: var(--accent2); color: var(--bg); font-size: 11px; font-weight: 650; }
.chat-marker { color: var(--muted); display: inline-flex; }
.chat-marker svg { width: 12px; height: 12px; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; padding: 15px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.connection-dot { height: 6px; width: 6px; border-radius: 50%; background: var(--muted); }
.connection-dot.connected { background: var(--accent2); }
.sidebar-account { margin-left: auto; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.list-empty { display: flex; align-items: center; flex-direction: column; text-align: center; padding: 48px 20px; color: var(--muted); }
.list-empty > svg { width: 32px; height: 32px; margin-bottom: 16px; }
.list-empty strong { font-size: 14px; font-weight: 500; color: var(--text); }
.list-empty p { font-size: 12px; line-height: 1.6; margin: 8px 0 0; }
#result:not(:empty) { padding: 0 16px 12px; }
#result .card { margin: 0; border: 0; background: var(--elevated); padding: 12px; }
.workspace-main { min-width: 0; min-height: 0; overflow: hidden; position: relative; }
.workspace-main .app { max-width: none; min-height: 0; height: 100%; display: flex; flex-direction: column; transition: none; will-change: auto; }
.workspace-main .top { flex-shrink: 0; position: relative !important; height: 80px; padding: 0 24px; background: var(--bg); border-bottom-color: var(--line); backdrop-filter: none; }
.workspace-main .top .title { justify-self: start; text-align: left; align-items: flex-start; padding: 0 12px; }
.title-name { font-weight: 600; font-size: 16px; }
.title-status { font-weight: 400; font-size: 12px; margin-top: 3px; }
.title-text { display: flex; flex-direction: column; }
.workspace-main .title-shield { display: none; }
.workspace-main .content { flex: 1; min-height: 0; padding: 24px 32px; overflow-y: auto; }
.workspace-main .content > .profile, .workspace-main .content > .settings-group, .workspace-main .content > .card { max-width: 640px; margin-left: auto; margin-right: auto; }
.workspace-main .tabs { display: none; }
.conversation-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 100%; padding: 24px; }
.conversation-empty .brand-mark { width: 90px; height: 90px; border-radius: 26px; margin-bottom: 28px; }
.conversation-empty h2 { font-size: 25px; font-weight: 550; line-height: 1.25; letter-spacing: -.025em; margin: 0 0 12px; }
.conversation-empty p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 28px; }
.conversation-empty .primary { min-height: 46px; font-size: 13px; padding: 12px 20px; }
.empty-privacy { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 7px; margin-top: 56px; }
.empty-privacy svg { width: 13px; height: 13px; }
.home-screen > .top { display: none; }
.home-screen > .content { padding: 0; }
/* Independent message scrolling keeps composer and chat list stable. */
.workspace-main .app.chat-screen .content { display: flex; flex-direction: column; overflow: hidden; padding: 0; background: var(--bg); }
.workspace-main .messages { flex: 1 1 auto; overflow-y: auto; padding: 28px max(24px, calc((100% - 850px) / 2)); gap: 5px; contain: none; scroll-padding-block: 20px; }
.workspace-main .messages::before { content: ''; flex: 1 0 0; }
.workspace-main .messages > * { flex-shrink: 0; }
.workspace-main .msg { max-width: min(78%, 520px) !important; font-size: 14px; padding: 9px 13px; line-height: 1.5; background: var(--in); }
.workspace-main .msg.mine { background: var(--outgoing); }
.msgmeta { color: #c2ccc3; font-size: 10px; font-variant-numeric: tabular-nums; }
.tick { display: inline-flex; align-items: center; width: 20px; vertical-align: middle; color: #d0d8d1; }
.tick svg { width: 20px; height: 12px; }
.tick.read { color: #80d6ff; }
.workspace-main .composer { position: relative; inset: auto !important; flex-shrink: 0; margin: 0; padding: 14px max(24px, calc((100% - 850px) / 2)) 24px; max-width: none; width: 100%; background: var(--bg); border: 0; gap: 10px; align-items: flex-end; }
.workspace-main .composer .field { background: #1c231e; border: 1px solid var(--line); border-radius: 17px; min-height: 48px; padding: 12px 16px; font-size: 14px; }
.workspace-main .attach, .workspace-main .send { width: 48px; height: 48px; border-radius: 15px; flex-shrink: 0; display: grid; place-items: center; color: var(--accent2); background: var(--elevated); border: 0; }
.workspace-main .send { background: var(--accent); color: var(--text); }
.workspace-main .attach { font-size: 27px; }
.workspace-main .send svg { width: 23px; height: 23px; }
.e2e-notice { background: transparent; border: 0; margin: 0 auto 24px; max-width: 430px; font-size: 12px; }
.e2e-notice-text b { font-size: 12px; font-weight: 500; }
.e2e-notice-text span { font-size: 11px; }
.settings-row-icon { background: var(--elevated) !important; color: var(--accent2); }
.settings-row-icon svg { stroke: var(--accent2); }
.sheet { align-items: center; justify-content: center; padding: 24px; }
.sheet-card { background: var(--panel); max-width: 440px; border-radius: 22px; padding: 24px; max-height: 85dvh; }
.sheet-card h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 12px; }
.grab { display: none; }
.sheet-dismiss { position: absolute; top: 16px; right: 16px; }
.sheet-card { position: relative; }
.sheet-card > h2, .sheet-card > h3 { padding-right: 36px; }
.upload-preview { left: calc(var(--rail-width) + var(--sidebar-width) + 24px); right: 24px; width: auto; max-width: 650px; margin-left: auto; bottom: 92px; background: var(--panel); }
.down { right: 32px !important; bottom: 110px !important; left: auto !important; }
.date-divider { align-self: center; color: var(--muted); font-size: 11px; padding: 5px 12px; margin: 14px 0; background: var(--panel); border-radius: 9px; }
@media (hover: hover) { .icon:hover, .rail-button:hover { background: var(--elevated); color: var(--text); } .chat-rows .chat:hover { background: var(--elevated); } .chat-rows .chat.selected:hover { background: #304333; } .primary:not(:disabled):hover { background: #507b5c; } .text-button:hover { color: var(--text); } .chat-filters button:hover { background: var(--elevated); } }
@media (min-width: 1600px) { :root { --sidebar-width: 390px; } }
@media (min-width: 760px) {
  .auth-page { padding-block: 22px 16px; }
  .auth-layout { padding-block: 20px; }
  .auth-card { padding: 24px; }
  .auth-description { margin-bottom: 16px; }
  .auth-methods { margin-bottom: 16px; }
  .qr-auth-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: center; gap: 16px; }
  .qr-code, .qr-code img { width: 180px; height: 180px; }
  .qr-status { margin: 10px 0 0; font-size: 11px; line-height: 1.5; }
  .qr-steps { gap: 14px; font-size: 12px; }
  .qr-steps li { gap: 8px; align-items: flex-start; }
  .qr-steps li::before { width: 20px; height: 20px; font-size: 11px; }
  .auth-help { margin-block: 12px; line-height: 1.5; }
  .auth-create { margin-top: 14px; padding-top: 10px; }
  .auth-create button { padding-block: 6px; }
  .auth-privacy { margin-top: 40px; }
}
@media (min-width: 760px) and (max-height: 700px) {
  .auth-page { padding-block: 14px 10px; }
  .auth-layout { padding-block: 12px; }
  .auth-card { padding: 20px; }
  .auth-card h2 { font-size: 22px; }
  .auth-intro h1 { font-size: clamp(30px, 3.4vw, 44px); }
  .auth-intro { padding-bottom: 0; }
  .auth-privacy { margin-top: 28px; }
  .qr-auth-body { grid-template-columns: 160px minmax(0, 1fr); }
  .qr-code, .qr-code img { width: 160px; height: 160px; }
  .auth-description, .auth-methods { margin-bottom: 12px; }
  .auth-create { margin-top: 10px; padding-top: 6px; }
  .auth-footer { padding-top: 4px; }
}
@media (max-width: 1100px) { :root { --sidebar-width: 310px; --rail-width: 68px; } .auth-page { padding-inline: 32px; } .auth-layout { gap: 36px; grid-template-columns: minmax(0, 1fr) 390px; } .sidebar-header { padding-inline: 16px; } }
@media (max-width: 759px) {
  .workspace { grid-template-columns: minmax(0,1fr); }
  .workspace-nav { display: none; }
  .workspace.show-list .workspace-main, .workspace.show-detail .chat-sidebar { display: none; }
  .chat-sidebar { border: 0; }
  .sidebar-header { padding: calc(18px + env(safe-area-inset-top)) 20px 18px; }
  .sidebar-header h1 { font-size: 30px; }
  .sidebar-header .mobile-profile { display: inline-grid; }
  .sidebar-search kbd { display: none; }
  .chat-rows .chat { padding: 14px 12px; min-height: 84px; }
  .chathead b { font-size: 16px; }
  .chatlast { font-size: 14px; }
  .sidebar-footer { padding-bottom: calc(15px + env(safe-area-inset-bottom)); }
  .workspace-main .top { height: calc(66px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; }
  .workspace-main .top .title { padding: 0 6px; }
  .workspace-main .content { padding: 16px; }
  .workspace-main .messages { padding: 18px 14px; }
  .workspace-main .msg { font-size: 15px; max-width: 86% !important; }
  .workspace-main .composer { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); gap: 7px; }
  .workspace-main .composer .field { font-size: 16px; }
  .workspace-main .attach, .workspace-main .send { width: 44px; height: 46px; }
  .workspace-main .composer .field { min-height: 46px; padding-inline: 12px; }
  .auth-page { padding: 24px 20px 20px; }
  .auth-layout { display: block; padding: 44px 0 32px; max-width: 420px; margin: auto; width: 100%; }
  .auth-intro { display: none; }
  .auth-card { padding: 28px 24px; border-radius: 22px; }
  .auth-brand { font-size: 21px; }
  .auth-footer { font-size: 10px; }
  .auth-steps { font-size: 13px; }
  .sheet { align-items: flex-end; padding: 0; }
  .sheet-card { max-width: none; border-radius: 22px 22px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .upload-preview { left: 12px; right: 12px; }
  .empty-privacy { max-width: 260px; }
}
@media (max-width: 360px) { .auth-page { padding-inline: 14px; } .auth-card { padding: 24px 18px; } .auth-footer { flex-direction: column; gap: 8px; } .qr-code, .qr-code img { width: 230px; height: 230px; } .language-button { padding: 8px 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media (prefers-contrast: more) { :root { --line: #647467; --muted: #c0ccc1; } .tick.read { color: #ade6ff; } }
/* Keep auxiliary message controls inside the conversation column. */
.workspace-main .reply-bar { position: relative; inset: auto !important; max-width: none; width: 100%; margin: 0; background: var(--panel); flex-shrink: 0; padding-inline: 24px; }
.workspace-main .app.chat-screen.has-reply .content { padding-bottom: 0 !important; }
.workspace-main .pinned-msg-bar { position: relative; inset: auto !important; flex-shrink: 0; background: var(--panel); }
.menu-sheet .sheet-dismiss { width: 36px; height: 36px; padding: 8px; display: grid; text-align: center; }
html.clo-keyboard-open .workspace { height: var(--clo-vvh); }
html.clo-keyboard-open .workspace-main .app.chat-screen .content { height: auto !important; max-height: none !important; overflow: hidden !important; padding-bottom: 0 !important; }
html.clo-keyboard-open .workspace-main .composer { position: relative !important; inset: auto !important; max-width: none !important; padding-block: 8px !important; }
@media (min-width: 760px) { .clo-selection-toolbar { left: calc(var(--rail-width) + var(--sidebar-width)) !important; } .msg[data-msg] { user-select: text !important; -webkit-user-select: text !important; } }
.clo-selection-toolbar { background: var(--panel) !important; border-color: var(--line) !important; }
.clo-selection-btn, .clo-selection-x { background: var(--elevated) !important; }
.clo-selection-counter { color: var(--accent2) !important; }
.clo-selection-btn.is-danger { background: #71343c !important; }
.workspace-main .messages { padding-right: max(24px, calc((100% - 850px) / 2)) !important; }
@media (max-width: 759px) { .workspace-main .messages { padding-right: 14px !important; } }
.chat-loading { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

[hidden] { display: none !important; }
.workspace-main .app:not(.chat-screen) #more { display: none; }
@media (max-width: 759px) { .auth-card .field { font-size: 16px; } }
/* A narrow desktop panel still uses a compact sign-in layout. Touch devices
   retain the larger phone QR layout above. */
@media (hover: hover) and (pointer: fine) and (min-width: 400px) and (max-width: 759px) {
  .auth-page { padding: 16px 20px 12px; }
  .auth-layout { padding-block: 20px 16px; }
  .auth-card { padding: 24px; }
  .auth-description, .auth-methods { margin-bottom: 16px; }
  .qr-auth-body { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; align-items: center; }
  .qr-code, .qr-code img { width: 160px; height: 160px; }
  .qr-status { margin: 10px 0 0; font-size: 11px; line-height: 1.5; }
  .qr-steps { font-size: 12px; gap: 12px; }
  .qr-steps li { gap: 8px; align-items: flex-start; }
  .qr-steps li::before { width: 20px; height: 20px; font-size: 11px; }
  .auth-help { margin-block: 12px; line-height: 1.5; }
  .auth-create { margin-top: 14px; padding-top: 10px; }
  .auth-create button { padding-block: 6px; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 400px) and (max-width: 759px) and (max-height: 760px) {
  .auth-page { padding-block: 12px 10px; }
  .auth-layout { padding-block: 8px; }
  .auth-card { padding: 20px; }
  .auth-description, .auth-methods { margin-bottom: 12px; }
  .qr-auth-body { grid-template-columns: 144px minmax(0, 1fr); }
  .qr-code, .qr-code img { width: 144px; height: 144px; }
  .auth-footer { padding-top: 4px; }
}
