:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f0f1f4; --surface-3: #e8eaee;
  --text: #1c1c1e; --text-2: #6b6d76; --text-3: #9a9ca5;
  --line: #e3e5ea; --line-soft: #eceef2;
  --brand: #0fd2f1; --brand-soft: #e4f8fc; --brand-text: #0b7d91; --brand-ink: #062e36;
  --btn-blue: #2f6fed; --btn-blue-hover: #2559c9;
  --success: #1a9d55; --success-soft: #e8f6ee;
  --danger: #d0453b; --danger-soft: #fdeceb;
  --warn: #b7791f; --warn-soft: #fdf3e3;
  /* 阅后即焚：暖橙火焰色，双方气泡统一使用，一眼可辨 */
  --burn-bg: #fff4e6; --burn-border: #f0c294; --burn-ink: #7a4212;
  --burn-accent: #cf6417; --burn-chip: #fce4c9; --burn-track: #f3dcc0; --burn-fill: #e2701a;
  --nc0:#0b7d91; --nc1:#0e9f8e; --nc2:#8258d6; --nc3:#c07a12; --nc4:#d1567a; --nc5:#3a7fb5;
  --off: #9a9ca5; --off-bg: #eceef2;
  --bubble-me: #0fd2f1; --bubble-me-text: #062e36;
  --radius-card: 18px; --radius-md: 12px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,22,30,.04), 0 8px 28px rgba(20,22,30,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #121214; --surface: #1c1c1f; --surface-2: #242428; --surface-3: #2c2c31;
  --text: #f2f2f5; --text-2: #a0a1ab; --text-3: #71727c;
  --line: #303036; --line-soft: #292930;
  --brand: #0fd2f1; --brand-soft: #123c44; --brand-text: #5fe1f5; --brand-ink: #062e36;
  --btn-blue: #2f6fed; --btn-blue-hover: #2559c9;
  --success: #4cd07d; --success-soft: #173021;
  --danger: #ff6b61; --danger-soft: #341d1c;
  --warn: #e0a94a; --warn-soft: #332813;
  --burn-bg: #3a2a1a; --burn-border: #6e4a24; --burn-ink: #ffd9ae;
  --burn-accent: #ffae63; --burn-chip: #4d3520; --burn-track: #52381f; --burn-fill: #ff9d4d;
  --nc0:#5fe1f5; --nc1:#4fd6c2; --nc2:#b18bff; --nc3:#e6b04f; --nc4:#f38bab; --nc5:#6fb2e8;
  --off: #71727c; --off-bg: #2c2c31;
  --bubble-me: #0aa8c4; --bubble-me-text: #062e36;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.22);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 var(--font); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-text); text-decoration: none; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-3); font-size: 15px; }

.card { background: var(--surface); border: .5px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.card.list-card { overflow: hidden; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.tiny { font-size: 12px; }
.sec-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.btn { border: .5px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 9px 15px; font-size: 13px; transition: .15s; white-space: nowrap; flex-shrink: 0; }
.btn:hover { border-color: var(--brand); color: var(--brand-text); }
.btn-primary { background: var(--btn-blue); border-color: var(--btn-blue); color: #fff; }
.btn-primary:hover { background: var(--btn-blue-hover); border-color: var(--btn-blue-hover); color: #fff; opacity: 1; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { opacity: .9; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; min-width: 44px; }
.btn svg { vertical-align: middle; }
.field { width: 100%; padding: 12px 14px; border: .5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); outline: none; transition: .15s; font-size: 14px; }
.field:focus { border-color: var(--brand); background: var(--surface); }
textarea.field { resize: vertical; min-height: 80px; }
.label { display: block; font-size: 12px; color: var(--text-2); margin: 0 0 6px; }
.form-row { margin-bottom: 15px; }
.form-err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 2px 0 8px; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.6; }
hr.sep { border: 0; border-top: .5px solid var(--line-soft); margin: 16px 0; }

.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 500; color: #fff; }
.nc0{background:var(--nc0)} .nc1{background:var(--nc1)} .nc2{background:var(--nc2)} .nc3{background:var(--nc3)} .nc4{background:var(--nc4)} .nc5{background:var(--nc5)}
.avatar.off, .avatar.is-off { background: var(--off-bg); color: var(--off); }
.avatar-presence { position: relative; display: inline-flex; flex: none; }
.avatar-presence .presence { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); background: var(--off); }
.avatar-presence .presence.on { background: var(--success); }
.conv.active .presence { border-color: var(--brand-soft); }
.nick { font-weight: 500; }
.nc-t0{color:var(--nc0)} .nc-t1{color:var(--nc1)} .nc-t2{color:var(--nc2)} .nc-t3{color:var(--nc3)} .nc-t4{color:var(--nc4)} .nc-t5{color:var(--nc5)}
.nick.off, .is-off .nick { color: var(--off); }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--off); }
.dot.on { background: var(--success); }
.badge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 12px; line-height: 19px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: .5px solid var(--line); border-radius: 22px; padding: 4px 12px 4px 4px; font-size: 12px; }
.pill .avatar { width: 22px; height: 22px; font-size: 12px; }

.shell { display: grid; grid-template-columns: 68px 290px minmax(0,1fr); height: 100vh; height: 100dvh; }
.shell.with-inspector { grid-template-columns: 68px 290px minmax(0,1fr) 230px; }
.rail { background: var(--surface); border-right: .5px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0; }
.rail .logo { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 14px; }
.rail .logo img { width: 40px; height: 40px; display: block; }
.rail-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; color: var(--text-3); display: grid; place-items: center; transition: .15s; }
.rail-btn svg, .tabbar svg { width: 21px; height: 21px; display: block; }
.rail-btn:hover { background: var(--surface-2); color: var(--text); }
.rail-btn.active { background: var(--brand-soft); color: var(--brand-text); }
.rail .me-avatar { margin-top: auto; border: 0; background: transparent; padding: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; transition: .15s; }
.rail .me-avatar:hover { background: var(--surface-2); }
.rail .me-avatar .avatar { width: 34px; height: 34px; }
.sidebar { background: var(--surface); border-right: .5px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.stage { min-width: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.inspector { display: none; background: var(--surface); border-left: .5px solid var(--line); padding: 18px 16px; overflow-y: auto; }
.shell.with-inspector .inspector { display: block; }
.insp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.insp-head .sec-title { margin: 0; }
.insp-close { border: 0; background: var(--surface-2); color: var(--text-2); width: 28px; height: 28px; flex: none; border-radius: 8px; font-size: 17px; line-height: 1; display: grid; place-items: center; }
.insp-close:hover { background: var(--surface-3); color: var(--text); }
.tabbar { display: none; }

.side-head { padding: 18px 16px 13px; border-bottom: .5px solid var(--line-soft); }
.side-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.search { margin-top: 12px; }
.conv-list { overflow-y: auto; flex: 1; padding: 8px; }
.conv { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: var(--radius-md); cursor: pointer; }
.conv:hover { background: var(--surface-2); }
.conv.active { background: var(--brand-soft); }
.conv .body { flex: 1; min-width: 0; }
.conv .row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.conv .name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .summary { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.conv .time { font-size: 12px; color: var(--text-3); flex: none; }
.empty { padding: 36px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

.portal { overflow-y: auto; padding: 28px 32px 40px; }
.portal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.brand-inline { display: flex; align-items: center; gap: 11px; }
.brand-inline img { width: 32px; height: 32px; display: block; }
.portal-head h1 { font-size: 22px; font-weight: 600; margin: 0; }
.announce { background: var(--brand-soft); border-radius: var(--radius-md); padding: 13px 15px; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.announce .tag { flex: none; display: inline-flex; align-items: center; color: var(--brand-text); }
.announce .tag svg { display: block; }
.announce .txt { flex: 1; font-size: 13px; color: var(--text); }
.announce .close { border: 0; background: transparent; color: var(--text-3); font-size: 17px; }
.hero { background: var(--surface-2); border-radius: var(--radius-card); padding: 24px 26px; margin-bottom: 18px; }
.hero .num { font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -.5px; }
.hero .unit { font-size: 14px; color: var(--text-2); margin-left: 6px; }
.hero .link { font-size: 12px; color: var(--brand-text); cursor: pointer; }
.pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.pill.click { cursor: pointer; }
.pill.click:hover { border-color: var(--brand); }
.panel { padding: 20px 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.panel-head .sec-title { margin: 0; }
.panel-acts { display: flex; gap: 8px; }
.room-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
.room-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 0; border-bottom: .5px solid var(--line-soft); cursor: pointer; font-size: 13px; }
.room-row:last-child { border-bottom: 0; }
.room-row:hover { color: var(--brand-text); }
.room-stat { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.room-need-pw { display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: 11px; vertical-align: 1px; }

.chat-head { padding: 15px 22px; border-bottom: .5px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 11px; flex: none; }
.chat-head .title { font-size: 15px; font-weight: 600; }
.chat-head .peer-status { font-size: 12px; font-weight: 400; margin-left: 2px; flex: none; }
.chat-head .peer-status.on { color: var(--success); }
.chat-head .peer-status.off { color: var(--off); }
.chat-head .meta { font-size: 12px; color: var(--text-3); margin-left: auto; }
.chat-head .back { display: none; border: 0; background: transparent; font-size: 21px; color: var(--text-2); padding: 0 7px 0 0; }
.chat-head .acts { display: flex; gap: 6px; }
.msgs { flex: 1; overflow-y: auto; padding: 20px 26px; background: var(--bg); }
.msg { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.msg.mine { flex-direction: row-reverse; }
.msg .msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.msg.mine .msg-body { align-items: flex-end; }
.msg .bubble { width: fit-content; max-width: min(88%, 76vw, 1000px); background: var(--surface); border: .5px solid var(--line); border-radius: 4px 15px 15px 15px; padding: 10px 13px; font-size: 14px; box-shadow: var(--shadow); word-break: break-word; }
.msg.mine .bubble { background: var(--bubble-me); color: var(--bubble-me-text); border-color: transparent; border-radius: 15px 4px 15px 15px; }
.msg .sender { font-size: 12px; margin-bottom: 4px; }
.msg .bubble img { max-width: 100%; max-height: 260px; border-radius: 9px; display: block; cursor: zoom-in; }
.msg .bubble .burn-note { font-size: 13px; opacity: .9; }
.burn-bar { height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.burn-bar i { display: block; height: 100%; background: var(--warn); transition: width .1s linear; }
.sys-note { text-align: center; font-size: 12px; color: var(--text-3); margin: 10px 0 18px; }

/* ── 阅后即焚：特殊颜色气泡（发送方与接收方一致） ── */
.msg .bubble.burn-bubble,
.msg.mine .bubble.burn-bubble {
  background: var(--burn-bg); color: var(--burn-ink);
  border-color: var(--burn-border); box-shadow: none;
}
.msg .bubble.burn-bubble[data-act="burn-open"] { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.msg .bubble.burn-bubble[data-act="burn-open"]:hover { border-color: var(--burn-accent); box-shadow: 0 0 0 3px var(--burn-chip); }
.burn-tag { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px;
  padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--burn-chip);
  color: var(--burn-accent); font-size: 11px; font-weight: 600; letter-spacing: .2px; }
.burn-tag svg { width: 13px; height: 13px; display: block; }
.burn-content { min-width: 0; }
.burn-content img { max-width: 100%; }
.burn-locked { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500;
  border-bottom: 1px dashed var(--burn-accent); padding-bottom: 1px; }
.burn-bubble .burn-bar { background: var(--burn-track); }
.burn-bubble .burn-bar i { background: var(--burn-fill); }
.burn-timer { margin-top: 5px; font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--burn-accent); }
.burn-waiting { margin-top: 5px; font-size: 12px; color: var(--burn-accent); opacity: .85; }
.sys-note.burn-destroyed { display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--burn-accent); }
.sys-note.burn-destroyed svg { width: 14px; height: 14px; display: block; }

/* ── v3.4 消息操作：引用、撤回、本方删除 ── */
.msg .own-bubble { -webkit-touch-callout: none; user-select: none; }
.quote-block, .quote-composer { border-left: 3px solid var(--brand); background: var(--brand-soft);
  padding: 6px 9px; margin-bottom: 8px; border-radius: 4px; font-size: 12px; max-width: 100%; }
.msg.mine .quote-block { border-left-color: var(--bubble-me-text); background: rgba(255,255,255,.16); }
.quote-name { font-weight: 600; color: var(--brand-text); margin-bottom: 2px; }
.msg.mine .quote-name { color: inherit; }
.quote-text { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.mine .quote-text { color: inherit; opacity: .85; }
.quote-composer { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 9px; border-left-width: 3px; }
.quote-composer > div { min-width: 0; }
.quote-composer .close { flex: none; }
.msg .bubble.recalled-bubble { background: transparent; border-style: dashed; box-shadow: none;
  color: var(--text-3); font-size: 12px; font-style: italic; }
.msg-action-menu { position: fixed; z-index: 1200; width: 168px; padding: 5px;
  background: var(--surface); border: .5px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.2); }
.msg-action-menu button { display: block; width: 100%; border: 0; background: transparent;
  color: var(--text); text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.msg-action-menu button:hover, .msg-action-menu button:active { background: var(--surface-2); }
.msg-action-menu button.danger { color: var(--danger); }
.composer { border-top: .5px solid var(--line); background: var(--surface); padding: 11px 16px; flex: none; }
.tools { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.tool { display: inline-flex; align-items: center; gap: 5px; border: .5px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 7px 11px; font-size: 12px; color: var(--text-2); line-height: 1; transition: .15s; }
.tool svg { width: 17px; height: 17px; display: block; }
.tool:hover { border-color: var(--brand); color: var(--brand-text); }
.tool.active { background: var(--btn-blue); border-color: var(--btn-blue); color: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.tool.burn.active { background: var(--warn); border-color: var(--warn); color: #fff; box-shadow: 0 0 0 3px var(--warn-soft); }
.tools .spacer { flex: 1; }
.emoji-panel { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; padding: 9px; border: .5px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); margin-bottom: 9px; }
.emoji-panel span { text-align: center; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 6px; }
.emoji-panel span:hover { background: var(--surface-3); }
.send-row { display: flex; gap: 8px; }
.send-row .field { flex: 1; }
textarea#msgInput { height: 46px; min-height: 46px; max-height: 138px; padding: 11px 14px; line-height: 1.5; resize: none; overflow-y: auto; }

.page { overflow-y: auto; padding: 26px 30px 40px; }
.page h1 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.list-card .list-row:first-child, .list-card .list-row:last-child { border-radius: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: .5px solid var(--line-soft); background: var(--surface); cursor: pointer; }
.list-row:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.list-row:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row .body { flex: 1; min-width: 0; font-size: 14px; }
.list-row .sub { font-size: 12px; color: var(--text-3); }
.set-card { padding: 22px 24px; margin-bottom: 15px; max-width: 640px; }
.set-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--line-soft); font-size: 13px; }
.set-item:last-child { border-bottom: 0; }
.seg { display: inline-flex; border: .5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 13px; font-size: 12px; border-right: .5px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--btn-blue); color: #fff; }
.danger-zone { border-color: var(--danger); }
.danger-zone .sec-title { color: var(--danger); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface-2); border-radius: var(--radius-md); padding: 15px; }
.stat .n { font-size: 24px; font-weight: 600; }
.stat .l { font-size: 12px; color: var(--text-3); }

.mask { position: fixed; inset: 0; background: rgba(18,18,22,.46); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border: .5px solid var(--line); border-radius: var(--radius-card); box-shadow: 0 20px 60px rgba(0,0,0,.24); padding: 24px; max-height: 88vh; overflow-y: auto; }
.modal-wide { max-width: 580px; }
.wide-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: 26px; }
.wide-col { min-width: 0; }
.wide-grid .sec-title { margin-bottom: 14px; }
.pw-row { display: flex; gap: 6px; }
.pw-row .field { min-width: 0; }
.room-members { max-height: 216px; overflow-y: auto; }
.room-members .list-row { border-bottom: .5px solid var(--line-soft); }
.modal h3 { font-size: 16px; font-weight: 600; margin: 0 0 18px; }
.modal .desc { font-size: 12px; color: var(--text-3); margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
/* v3.5 重置软件：两个清理范围选项 */
.reset-choice { display: grid; gap: 10px; }
.reset-opt { display: block; width: 100%; text-align: left; padding: 13px 15px; border: .5px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.reset-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.reset-opt.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.reset-opt-title { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.reset-opt.danger .reset-opt-title { color: var(--danger); }
.reset-opt-desc { display: block; font-size: 12px; line-height: 1.6; color: var(--text-3); }
.reset-opt-desc b { color: var(--text-2); font-weight: 600; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: grid; place-items: center; z-index: 60; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 9px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 11px 19px; border-radius: 22px; font-size: 13px; z-index: 80; box-shadow: var(--shadow); }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px 32px 28px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-logo img { width: 68px; height: 68px; display: block; }
.auth-card h1 { font-size: 23px; font-weight: 600; margin: 0 0 24px; text-align: center; }
.brand-name { color: var(--text); }
.btn-back-login { display: block; width: 100%; margin-top: 10px; background: transparent; border: 0; color: var(--text-2); font-size: 13px; }
.btn-back-login:hover { color: var(--brand-text); }
.auth-tabs { display: flex; gap: 20px; margin-bottom: 20px; border-bottom: .5px solid var(--line); }
.auth-tabs button { border: 0; background: transparent; padding: 0 2px 11px; font-size: 14px; color: var(--text-3); }
.auth-tabs button.active { color: var(--text); border-bottom: 2px solid var(--btn-blue); }
.auth-card .btn-primary { width: 100%; padding: 12px; margin-top: 4px; font-size: 14px; }

@media (max-width: 900px) {
  .shell, .shell.with-inspector { grid-template-columns: minmax(0,1fr); }
  .rail, .sidebar, .inspector, .shell.with-inspector .inspector { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: .5px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 30; }
  .tabbar button { flex: 1; border: 0; background: transparent; color: var(--text-3); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0; }
  .tabbar button .ic { font-size: 20px; line-height: 1.1; display: grid; place-items: center; }
  .tabbar button.active { color: var(--brand-text); }
  .stage { padding-bottom: 62px; }
  .portal { padding: 20px 16px 30px; }
  .room-list { grid-template-columns: 1fr; }
  .panel-head { flex-wrap: wrap; }
  .modal-wide { max-width: 100%; }
  .wide-grid { grid-template-columns: 1fr; gap: 6px; }
  .pw-row { flex-wrap: wrap; }
  .room-members { max-height: 160px; }
  .page { padding: 20px 16px 30px; }
  .chat-head { padding: 12px 14px; }
  .chat-head .back { display: block; }
  .msgs { padding: 16px 14px; }
  .msg .bubble { max-width: 90%; }
  .composer { padding: 10px 12px; }
  .tool[data-act="toggle-emoji"], .emoji-panel { display: none; }
  .hero { padding: 20px; }
  .hero .num { font-size: 34px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .emoji-panel { grid-template-columns: repeat(8, 1fr); }
  .set-card { padding: 18px; max-width: 100%; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .shell { grid-template-columns: 68px 250px minmax(0,1fr); }
  .shell.with-inspector { grid-template-columns: 68px 250px minmax(0,1fr) 210px; }
}
