:root {
  --ink:#23233b; --muted:#66677f; --line:#e8e7f1; --paper:#fff;
  --accent:#584cc4; --accent-strong:#483baa; --tint:#eeecff; --canvas:#f6f6fb;
  font:15px/1.55 Inter,"Segoe UI","Microsoft YaHei","PingFang SC",sans-serif;
  color:var(--ink); background:var(--canvas); color-scheme:light;
}
*, *::before, *::after {box-sizing:border-box}
body {margin:0}
button,input,textarea {font:inherit}
button {cursor:pointer}
button:disabled {cursor:default}
button:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
input,textarea {min-width:0}
input::placeholder,textarea::placeholder {color:#78788c}
button svg,[data-icon] svg {width:20px;height:20px;display:block;flex-shrink:0}
[hidden] {display:none!important}
h1,h2,p {margin:0}
.button,.icon-button {border:0;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}
.button {min-height:42px;padding:8px 15px;font-weight:650}
.primary {background:var(--accent);color:white}
.primary:hover:not(:disabled) {background:var(--accent-strong)}
.primary:disabled {background:#e5e2f5;color:#666083}
.secondary {background:white;color:var(--accent-strong);border:1px solid #dcd8f6}
.secondary:hover {background:var(--tint)}
.text-button {color:var(--accent-strong);background:transparent}
.text-button:hover:not(:disabled) {background:var(--tint)}
.text-button:disabled {color:var(--muted)}
.icon-button {width:38px;height:38px;flex:0 0 38px;padding:0}
.quiet {color:#68677e;background:transparent}
.quiet:hover {color:var(--accent-strong);background:var(--tint)}
.brand-mark {display:inline-grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:11px;background:var(--accent);color:white;font-weight:800;letter-spacing:-.13em;padding-right:.12em;font-size:22px}
.bsip-home {display:inline-flex;align-items:center;flex:none;min-height:44px;color:inherit;font-size:15px;font-weight:800;letter-spacing:-.055em;line-height:1;text-decoration:none;white-space:nowrap}
.bsip-home:hover {text-decoration:underline;text-underline-offset:.2em}
.bsip-home:focus-visible {outline:2px solid currentColor;outline-offset:3px}
.startup {padding:32px;color:var(--muted)}
.entry {--entry-edge:clamp(36px,5vw,78px);position:relative;min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(0,1fr) minmax(430px,1.07fr)}
.entry-home {position:absolute;z-index:3;inset-block-start:20px;inset-inline-start:var(--entry-edge);color:#fff}
.entry-side {isolation:isolate;position:relative;display:flex;flex-direction:column;min-height:100%;overflow:hidden;padding:var(--entry-edge);padding-top:calc(var(--entry-edge) + 34px);color:white;background:radial-gradient(ellipse at 78% 90%,#5946a7 0%,#362874 37%,transparent 75%),#252048}
.entry-brand,.sidebar-brand,.login-mark {display:flex;gap:11px;align-items:center;font-size:19px;font-weight:760;letter-spacing:-.035em}
.entry-brand .brand-mark {background:#b8adff;color:#221a54}
.entry-intro {position:relative;z-index:2;margin-top:auto;margin-bottom:clamp(185px,34vh,325px)}
.entry-intro h1 {font-size:clamp(45px,5.8vw,92px);font-weight:780;letter-spacing:-.08em;line-height:1.15}
.entry-intro p {margin-top:20px;color:#e2dbfa;font-size:clamp(15px,1.55vw,22px)}
.entry-art {position:absolute;bottom:-10px;right:-34px;width:min(85%,520px);height:min(46vh,372px);display:grid;place-items:center;pointer-events:none}
.orbit {position:absolute;border:1px solid #f7efff3c;border-radius:50%;width:91%;height:69%;transform:rotate(-29deg)}
.orbit-two {width:106%;height:83%;transform:rotate(-20deg);opacity:.65}
.speech {position:absolute;display:flex;align-items:center;box-shadow:0 27px 55px #17103757;isolation:isolate}
.speech::after {content:"";position:absolute;width:30px;height:30px;background:inherit;z-index:-1;bottom:-9px;transform:rotate(45deg);border-radius:5px}
.speech-main {background:#cfc5ff;width:46%;height:27%;border-radius:34px;gap:13px;justify-content:center;transform:rotate(-12deg);left:14%;bottom:26%;color:#4d3e98}
.speech-main::after {left:22px}
.speech-main i {display:block;width:9px;height:9px;border-radius:50%;background:currentColor}
.speech-reply {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding-left:18%;gap:9px;background:#8c77eb;width:44%;height:27%;border-radius:33px;transform:rotate(9deg);right:16%;bottom:44%}
.speech-reply::after {right:27px}
.speech-reply span {display:block;background:#e4d9ff;height:5px;width:55%;border-radius:9px}
.speech-reply span+span {width:33%}
.entry-form {display:grid;place-items:center;padding:clamp(25px,8vw,115px);background:linear-gradient(150deg,#fff 24%,#f3f1ff 100%)}
.login-card {width:100%;max-width:380px}
.login-mark {margin-bottom:38px}
.login-card h2 {font-size:33px;line-height:1.25;letter-spacing:-.045em}
.form-subtitle {margin:11px 0 28px;color:var(--muted);overflow-wrap:anywhere}
.login-card label,.dialog-form label {display:block;font-size:13px;font-weight:700;margin-bottom:8px}
.login-card input,.dialog-form input {width:100%;background:#fff;border:1px solid #dcdbe9;border-radius:11px;padding:13px 14px;color:var(--ink)}
.login-card form>.primary {display:flex;justify-content:space-between;width:100%;min-height:48px;margin-top:14px}
.form-note,.composer-hint {color:var(--muted);font-size:12px;margin-top:13px}
.form-error {padding:10px 12px;color:#862a34;background:#fff0f1;border:1px solid #f3cfd4;border-radius:8px;margin-top:14px;font-size:13px}
.code-fields {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
.code-fields input {padding:0;height:61px;text-align:center;font:700 29px/1 Consolas,"Courier New",monospace;font-variant-numeric:slashed-zero tabular-nums;text-transform:uppercase;letter-spacing:0}
.verify-actions {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px;margin-top:12px}
.verify-actions .button {padding-inline:8px}
.workspace {width:100%;height:100vh;height:100dvh;display:grid;grid-template-columns:clamp(265px,29vw,345px) minmax(0,1fr);background:#f9f8fd}
.sidebar {display:flex;min-width:0;min-height:0;flex-direction:column;background:white;border-right:1px solid var(--line)}
.sidebar-brand {padding:21px 24px;border-bottom:1px solid #f0eff6}
.sidebar-brand .bsip-home {margin-inline-start:2px}
.sidebar-title {display:flex;align-items:center;justify-content:space-between;padding:24px 19px 12px 23px}
.sidebar-title h1 {font-size:27px;letter-spacing:-.06em}
.new-button {background:var(--tint);color:var(--accent-strong)}
.new-button:hover {background:#ded9ff}
.sidebar-actions {display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;padding:0 15px 15px}
.sidebar-actions .button {font-size:13px;padding-inline:10px}
.sidebar-actions svg,.filter svg {width:16px;height:16px}
.filter {display:flex;align-items:center;gap:8px;background:#f5f4fa;border:1px solid #efedf7;padding:0 9px;border-radius:10px;color:var(--muted)}
.filter input {min-width:0;width:100%;border:0;background:transparent;font-size:13px;padding:5px 0}
.conversations {flex:1 1 auto;min-height:0;overflow:auto;padding:1px 10px 12px}
.conversation {position:relative;min-width:0;width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) auto;grid-template-rows:22px 22px;align-items:center;column-gap:10px;padding:9px 10px;margin:2px 0;background:transparent;border:1px solid transparent;border-radius:12px;text-align:left;color:inherit}
.conversation:hover {background:#f6f5fb}
.conversation[aria-current="true"] {background:#eeebff;border-color:#e3dcff}
.conversation .avatar {grid-row:1/3}
.conversation-name,.conversation-preview {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;min-width:0}
.conversation-name {font-size:14px;font-weight:700;white-space:pre}
.conversation-preview bdi {white-space:pre}
.conversation-preview,.conversation-time {font-size:12px;color:var(--muted)}
.conversation-time {justify-self:end}
.badge {background:var(--accent);color:white;font-size:11px;border-radius:15px;min-width:19px;height:19px;padding:0 5px;display:inline-grid;place-items:center;justify-self:end}
.avatar {--av-color:#4c397d;--av-bg:#e8e0fa;background:var(--av-bg);color:var(--av-color);display:inline-grid;flex:0 0 39px;width:39px;height:39px;place-items:center;border-radius:13px;font-size:13px;font-weight:800;letter-spacing:-.03em}
.avatar[data-palette="1"] {--av-color:#285a72;--av-bg:#deeff7}
.avatar[data-palette="2"] {--av-color:#865616;--av-bg:#fbedd0}
.avatar[data-palette="3"] {--av-color:#8b3f5f;--av-bg:#f8e2ed}
.avatar[data-palette="4"] {--av-color:#2c6559;--av-bg:#dff2ea}
.avatar[data-palette="group"] {--av-color:#4b3aab;--av-bg:#e4ddff}
.avatar {position:relative}
.avatar > img {position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;object-fit:cover}
button.avatar {border:0;padding:0}
button.avatar:hover:not(:disabled) {box-shadow:0 0 0 3px var(--tint)}
.profile {display:flex;align-items:center;gap:9px;padding:14px 15px;border-top:1px solid var(--line)}
.profile-trigger {display:flex;align-items:center;gap:9px;flex:1;min-width:0;padding:4px;border:0;border-radius:12px;background:transparent;color:inherit;text-align:left}
.profile-trigger:hover {background:var(--tint)}
.profile-info {min-width:0;flex:1}
.profile-info strong {display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:pre}
.profile-info small {display:block;color:var(--muted);font-size:11px}
.idle {display:grid;place-content:center;justify-items:center;text-align:center;min-width:0;padding:18px;background:radial-gradient(ellipse at 50% 56%,#eeebfb,transparent 63%),#f9f8fd}
.empty-mark {padding:18px;border:1px solid #e4dff7;border-radius:21px;background:white;color:var(--accent);margin-bottom:15px;box-shadow:0 12px 30px #47328616}
.empty-mark svg {width:29px;height:29px}
.idle h2 {font-size:24px;letter-spacing:-.04em}
.idle p {color:var(--muted);margin:7px 0 19px}
.sidebar-note,.thread-status,.people-note {color:var(--muted);padding:16px 11px;text-align:center;font-size:13px}
.thread {min-height:0;min-width:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;position:relative}
.thread-top {min-width:0}
.group-strip {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:4px clamp(10px,2.35vw,30px);border-bottom:1px solid var(--line);background:white}
.group-link {justify-content:flex-start;min-width:0;min-height:34px;padding:4px 8px;gap:7px;color:var(--accent-strong);background:transparent;font-size:12px;white-space:nowrap}
.group-link:hover,.group-link:focus-visible {background:var(--tint)}
.group-link span {min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:400;color:var(--muted)}
.group-pinned {grid-column:1 / -1;background:#f5f3ff}
.thread-header {display:flex;align-items:center;gap:11px;padding:16px clamp(13px,2.35vw,30px);border-bottom:1px solid var(--line);background:#fff}
.thread-mobile-brand {display:none}
#thread-pin[aria-pressed="true"] {color:var(--accent);background:var(--tint)}
.conversation-name .conversation-pin {display:inline-flex;width:13px;height:13px;margin-inline-end:4px;vertical-align:middle;color:#6556a1}
.presence-label {display:flex;align-items:center;gap:5px}
.presence-icon {display:inline-block;position:relative;flex:0 0 auto;width:10px;height:10px;border-radius:50%;background:#abb0bc;vertical-align:middle}
.presence-icon[data-mode="online"] {background:#22a06b}
.presence-icon[data-mode="dnd"] {background:#c73e53}
.presence-icon[data-mode="dnd"]::after {content:"";position:absolute;inset:4px 2px;border-radius:3px;background:#fff}
.presence-icon[data-mode="away"] {background:#ca8509}
.presence-icon[data-mode="away"]::after {content:"";position:absolute;width:4px;height:4px;top:2px;left:4px;border-left:1px solid #fff;border-bottom:1px solid #fff}
.presence-icon[data-mode="busy"] {background:#b95125}
.presence-icon[data-mode="busy"]::after {content:"";position:absolute;inset:3px;border-radius:50%;background:#fff}
.presence-icon[data-mode="offline"],.presence-icon[data-mode="invisible"] {background:transparent;border:1.5px solid #8991a1}
.profile-presence {margin:14px 0 0;padding:0;border:0;min-width:0}
.profile-presence legend {font-size:13px;font-weight:650;margin-bottom:7px}
.presence-options {display:flex;flex-wrap:wrap;gap:6px}
.presence-options label {display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid var(--line);border-radius:8px;cursor:pointer;font-size:12px}
.presence-options label:has(input:checked) {background:var(--tint);border-color:#c8c0ea}
.presence-options input {margin:0;accent-color:#6651b0}
#profile-card-presence {margin:4px 0 0;font-size:12px;color:var(--muted)}
.thread-heading {flex:1;min-width:0}
.thread-heading h2 {font-size:19px;white-space:pre;text-align:left;text-overflow:ellipsis;overflow:hidden;letter-spacing:-.035em}
.thread-heading p {font-size:12px;color:var(--muted)}
.back-button {display:none;color:var(--accent)}
.message-scroll {min-height:0;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain;padding:0 clamp(12px,4.2vw,66px) 21px;background:#f9f8fd}
.older-wrap {text-align:center;min-height:15px}
.older-wrap .button {font-size:12px;margin:7px auto 5px}
.date-line {margin:16px 0;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted);font-size:12px}
.date-line::before,.date-line::after {content:"";width:32px;height:1px;background:#dedbea}
.message {display:flex;gap:8px;align-items:flex-end;margin:10px 0}
.message .avatar {width:30px;flex-basis:30px;height:30px;border-radius:10px;font-size:11px}
.message-body {max-width:min(80%,650px);min-width:0}
.message-author {display:block;font-size:12px;line-height:1.25;font-weight:650;color:#5a5a75;margin:0 0 4px 2px;white-space:pre-wrap;overflow-wrap:anywhere}
button.message-author {border:0;padding:0;background:transparent;text-align:left}
button.message-author:hover {color:var(--accent-strong);text-decoration:underline;text-underline-offset:2px}
.bubble {display:block;width:fit-content;max-width:100%;padding:9px 12px;margin:0;background:#fff;border:1px solid #eeecf5;border-radius:13px 13px 13px 3px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink)}
.message-meta {display:flex;align-items:center;gap:6px;margin:3px 0 0 2px}
.message time {display:block;color:var(--muted);font-size:10px}
.message.mine {justify-content:flex-end}
.message.mine .bubble {margin-inline-start:auto;background:#e9e4ff;border-color:#e3dcff;border-radius:13px 13px 3px 13px}
.message.mine .message-meta {justify-content:flex-end}
.message-read {font-size:11px;color:var(--muted);white-space:nowrap}
.message-read[data-seen="true"] {color:var(--accent-strong);font-weight:650}
.message.recalled .bubble {background:transparent;border-color:transparent;color:var(--muted);font-size:12px}
.recall-message {border:0;border-radius:5px;background:transparent;color:var(--accent-strong);font-size:11px;padding:2px 4px}
.recall-message:hover,.recall-message:focus-visible {background:var(--tint)}
.recall-message[aria-disabled="true"] {color:var(--muted);cursor:wait}
.group-message-tools {display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px}
.group-mark {border-radius:4px;padding:1px 4px;background:var(--tint);color:var(--accent-strong);font-size:10px;white-space:nowrap}
.group-message-action {display:inline-grid;place-items:center;min-width:27px;min-height:25px;padding:0 4px;border:0;border-radius:5px;background:transparent;color:var(--accent-strong);line-height:1}
.group-message-action:hover,.group-message-action:focus-visible {background:var(--tint)}
@media (pointer:coarse) {
  .recall-message {min-height:26px;padding-inline:7px}
}
.composer {position:relative;padding:12px clamp(13px,3vw,38px) 10px;background:#fff;border-top:1px solid var(--line)}
.composer-field {display:flex;align-items:flex-end;gap:8px}
.composer textarea {flex:1;min-width:0;min-height:42px;max-height:120px;resize:none;border:1px solid #e3e0ed;border-radius:11px;background:#faf9fd;padding:9px 12px;color:var(--ink);line-height:1.5}
.composer .send {min-width:79px}
.composer .send svg {width:16px;height:16px}
.composer-hint {margin-top:5px;font-size:10px}
.media-composer-tools {display:flex;align-items:center;gap:4px;margin-top:4px}
.media-composer-tools .composer-hint {margin:0 0 0 auto}
.media-tool {min-height:30px;padding:4px 10px;color:#4e4085;font-size:12px;border-radius:7px}
.media-tool:hover:not(:disabled),.media-small:hover:not(:disabled) {background:#eee9fa}
.media-compose-status {margin:0 0 6px;color:var(--muted);font-size:12px}
.media-pending {display:flex;flex-wrap:wrap;gap:5px;margin:0 0 6px}
.media-draft-item {display:flex;min-width:0;max-width:100%;align-items:center;gap:6px;padding:2px 4px 2px 8px;border:1px solid #e6e1f2;border-radius:8px;background:#f8f6fc;font-size:12px}
.media-draft-item bdi {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.media-small {flex-shrink:0;min-height:28px;padding:3px 7px;border-radius:6px;color:#4e4085;font-size:11px}
.message-assets {display:grid;min-width:0;gap:6px;justify-items:start}
.mine .message-assets {justify-items:end}
.media-asset {min-width:0;max-width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.media-image {display:block;max-width:min(100%,26rem);max-height:min(46vh,23rem);width:auto;height:auto;object-fit:contain;border-radius:10px;background:#eeebf6}
.media-sticker .media-image {max-width:min(100%,8rem);max-height:8rem;background:none}
.media-download {display:flex;min-width:0;max-width:min(100%,26rem);flex-direction:column;gap:3px;padding:8px 11px;border:1px solid #e6e0f1;border-radius:10px;background:var(--paper);color:#4e4085;text-decoration:none;overflow-wrap:anywhere}
.media-download:hover {background:#eee9fa}
.media-download small,.media-usage-name small,.media-help {color:var(--muted);font-size:12px}
.media-missing {display:inline-block;padding:6px 9px;border:1px solid #eee8f7;border-radius:8px;background:#faf8fd;color:var(--muted);font-size:12px}
.media-profile-actions {display:flex;gap:8px;flex-wrap:wrap;padding:0 16px 13px}
.media-danger {color:#9a2e4e;background:#fcf0f4;border-color:#f0d6df}
.media-danger:hover:not(:disabled) {background:#f8e2ea}
.media-dialog {width:min(580px,calc(100vw - 24px))}
.media-stack {display:grid;gap:9px;min-width:0}
.media-stack h3,.media-usage h3 {margin:0;font-size:15px}
.media-help {margin:0;line-height:1.55}
.media-usage {display:grid;gap:6px;padding:10px;border:1px solid #e9e2f5;border-radius:12px}
.media-usage > p {margin:0}
.media-usage progress {width:100%;height:9px;accent-color:#6a54a6}
.media-usage-row {display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid #eee9f5}
.media-usage-name {display:grid;min-width:0;gap:3px;font-size:13px;overflow-wrap:anywhere}
.media-usage-row > button {flex-shrink:0}
.media-library {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(92px,100%),1fr));gap:6px}
.media-library-item,.media-emoji-choice {display:grid;min-width:0;gap:4px;justify-items:center;grid-template-rows:auto minmax(20px,auto);padding:6px;border:1px solid #e9e2f5;border-radius:8px;background:#fbf9fe;color:var(--ink);font-size:12px;text-align:center;overflow-wrap:anywhere}
.media-emoji-choice:hover:not(:disabled) {background:#efe8fb}
.media-library .media-sticker .media-image {width:56px;height:56px}
.media-library-item bdi,.media-emoji-choice bdi {min-width:0;max-width:100%}
.media-library-item .button {min-height:27px;padding:3px 6px;font-size:11px}
.media-report label {font-size:13px;font-weight:650}
.media-report textarea {width:100%;resize:vertical;padding:8px 10px;border:1px solid #dedbf0;border-radius:9px;background:var(--paper);color:var(--ink)}
.media-report input[type=file] {min-width:0;max-width:100%;font-size:12px}
.media-notice-list {margin:8px 0 14px;padding-left:21px;line-height:1.65;overflow-wrap:anywhere}
@media(pointer:coarse) {
  .media-tool {min-height:36px}
  .media-small {min-height:32px}
}
.mention-picker {position:absolute;z-index:4;inset:auto auto calc(100% + 6px) clamp(13px,3vw,38px);width:min(340px,calc(100% - 26px));padding:4px;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 22px #27234c24}
.mention-options {max-height:min(240px,35vh);overflow-y:auto;overscroll-behavior:contain}
.mention-option {display:flex;align-items:center;gap:8px;padding:6px 9px;min-height:42px;border-radius:8px;cursor:pointer}
.mention-option:hover,.mention-option[aria-selected="true"] {background:#f1edff}
.mention-option-avatar {display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;background:#ece4ff;color:#5239a1;font-size:12px;font-weight:700}
.mention-option-name {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:pre;font-size:13px;font-weight:650}
.mention-option-uid,.mention-guidance {font-size:12px;color:var(--muted)}
.mention-guidance {padding:8px}
.message-mention {display:inline;padding:1px 3px;border:0;border-radius:4px;background:#ece6fe;color:#4b358f;font:inherit;font-weight:700;white-space:pre-wrap;overflow-wrap:anywhere;text-align:start;cursor:pointer}
.message-mention:hover {text-decoration:underline}
.message-mention.mention-self {background:#5740a3;color:#fff}
.mention-notice {color:#503c95;font-weight:700}
.group-muted {padding:8px 10px;margin-bottom:8px;border-radius:9px;background:#fff5e4;color:#78511d;font-size:12px}
.composer textarea[readonly] {color:var(--muted);background:#f4f3f8}
.unread-jump {position:absolute;z-index:1;right:18px;bottom:78px;justify-self:end;background:white;border:1px solid #ddd8f4;color:var(--accent-strong);box-shadow:0 6px 25px #6b57b132;font-size:12px;min-height:35px}
.dialog {position:fixed;width:min(460px,calc(100% - 26px));max-width:none;max-height:min(730px,calc(100dvh - 28px));border:1px solid #e6e2f2;border-radius:17px;padding:19px;margin:auto;color:var(--ink);box-shadow:0 24px 90px #231b4c3f;overscroll-behavior:contain}
.dialog::backdrop {background:#23203865;backdrop-filter:blur(2px)}
.dialog-header {display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:15px}
.dialog-header h2 {font-size:21px;letter-spacing:-.035em}
.dialog-header p {font-size:13px;color:var(--muted);margin-top:3px}
.dialog-form input {font-size:14px;padding:10px 11px}
.dialog-form label>input {display:block;margin-top:7px}
.dialog-form label+label {margin-top:13px}
.dialog-form>.primary,#member-dialog>.primary {width:100%;margin-top:10px}
.people {max-height:230px;overflow:auto;margin-top:8px;border:1px solid var(--line);border-radius:11px}
.person {width:100%;display:flex;align-items:center;gap:9px;text-align:left;padding:8px;border:0;border-bottom:1px solid var(--line);color:var(--ink);background:#fff;overflow:hidden}
button.person:hover {background:#f5f3ff}
.person:last-child {border-bottom:0}
.person-name {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:pre}
.person .avatar {height:32px;width:32px;flex-basis:32px;border-radius:10px;font-size:11px}
.person-state {font-size:11px;color:var(--accent-strong);white-space:nowrap}
.group-member-row {display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--line)}
.group-member-row:last-child {border-bottom:0}
.group-member-row .person {flex:1;min-width:0;border:0}
.group-manage {flex:none;min-width:44px;min-height:34px;margin-right:4px;padding:4px 7px;font-size:12px}
.group-panel-stack {display:grid;gap:10px}
.group-actions {display:flex;justify-content:flex-end;flex-wrap:wrap;gap:7px}
.group-actions .button {min-height:38px;padding-inline:11px;font-size:13px}
.group-danger {color:#a43145;background:#fff0f2}
.group-danger:hover,.group-danger:focus-visible {background:#ffe1e7}
.group-panel-help {font-size:13px;color:var(--muted)}
.group-message-card {background:#f8f7fd;border:1px solid var(--line);border-radius:10px;padding:9px 11px}
.group-card-meta {display:flex;align-items:center;flex-wrap:wrap;gap:4px 9px;color:var(--muted);font-size:11px}
.group-card-author {max-width:100%;min-height:28px;display:inline-block;padding:2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.group-message-text,.group-announcement-text {white-space:pre-wrap;overflow-wrap:anywhere}
.group-announcement-text {padding:10px 11px;border-radius:10px;background:var(--canvas)}
.group-announcement-form {display:grid;gap:7px}
.group-announcement-form label {font-size:13px;font-weight:650}
.group-announcement-form textarea {width:100%;min-height:100px;resize:vertical;padding:8px 10px;border:1px solid #dedbf0;border-radius:9px;color:var(--ink);background:var(--paper)}
.group-char-count {text-align:right;font-size:11px;color:var(--muted)}
#group-panel-error {margin-top:10px}
.chips {display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
.chip {border:0;border-radius:20px;background:var(--tint);color:var(--accent-strong);padding:5px 9px;font-size:12px;text-align:left;overflow-wrap:anywhere;max-width:100%}
.chip bdi {white-space:pre-wrap}
.member-list {max-height:300px}
.sidebar-title-actions {display:flex;align-items:center;gap:7px}
.sidebar-title-actions .friends-button {min-height:35px;padding:5px 10px;font-size:12px;white-space:nowrap}
.friends-list-title {margin:13px 0 0;font-size:13px}
.person-label {display:grid;gap:2px;flex:1;min-width:0}
.person-label .person-name {display:block}
.person-identity {overflow:hidden;text-overflow:ellipsis;white-space:pre;font-size:11px;color:var(--muted)}
.friend-action {min-height:32px;padding:4px 8px;font-size:12px;white-space:nowrap}
.friend-action[aria-disabled="true"] {opacity:.65;cursor:wait}
#edit-group-nickname {width:100%;margin-top:10px}
.visually-hidden {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.profile-dialog {width:min(500px,calc(100% - 26px));padding:20px}
.profile-header {align-items:center;margin-bottom:12px}
.profile-loading {padding:28px 8px;text-align:center;color:var(--muted)}
.profile-card {overflow:hidden;border:1px solid #e6e1f6;border-radius:15px;background:var(--paper)}
.profile-card-head {display:flex;align-items:center;gap:15px;padding:20px;background:linear-gradient(121deg,#eae4fb,#f6f3ff 72%,#f8f7fe)}
.profile-avatar {width:72px;height:72px;flex-basis:72px;border-radius:24px;border:2px solid #fff;font-size:23px;box-shadow:0 4px 12px #47328624}
.profile-card-name {min-width:0}
.profile-card-name h3 {margin:0;font-size:clamp(19px,5vw,25px);line-height:1.25;letter-spacing:-.025em;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}
.profile-avatar-actions {display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:9px}
.profile-avatar-actions .button {min-height:32px;padding:4px 8px;font-size:12px}
.profile-avatar-error {margin:10px 16px 0}
.profile-identity {display:grid;gap:10px;margin:0;padding:15px 18px}
.profile-identity > div {display:grid;grid-template-columns:68px minmax(0,1fr);align-items:baseline;gap:9px}
.profile-identity dt,.profile-bio h4 {color:var(--muted);font-size:13px;font-weight:650}
.profile-identity dd {margin:0;font-size:14px;overflow-wrap:anywhere}
#profile-uid {font-variant-numeric:tabular-nums;font-weight:650}
.profile-bio {margin:0 18px 15px;padding-top:12px;border-top:1px solid var(--line)}
.profile-bio h4 {margin:0 0 4px}
.profile-bio p {white-space:pre-wrap;overflow-wrap:anywhere}
.profile-form,.profile-groups {margin-top:20px}
.profile-form h3,.profile-groups h3 {margin:0 0 10px;font-size:15px}
.profile-form label,.nickname-dialog label {display:block;font-size:13px;font-weight:650;margin-bottom:4px}
.profile-form input,.profile-form textarea,.nickname-dialog input {display:block;width:100%;border:1px solid #dedbf0;border-radius:9px;padding:8px 10px;color:var(--ink);background:var(--paper);font-size:14px}
.profile-form textarea {resize:vertical;min-height:74px;max-height:190px}
.profile-field-hint {color:var(--muted);font-size:12px;margin:4px 0 10px}
.profile-bio-count {text-align:right;margin-bottom:0}
.profile-feedback {margin-top:8px;font-size:13px;color:var(--accent-strong)}
.profile-feedback:empty {margin-top:0}
.profile-group-row {width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px;color:var(--ink);text-align:left;border:1px solid var(--line);border-bottom-width:0;background:var(--paper)}
.profile-group-row:hover {background:#f9f7ff}
.profile-group-row:first-child {border-radius:9px 9px 0 0}
.profile-group-row:last-child {border-radius:0 0 9px 9px;border-bottom-width:1px}
.profile-group-row:only-child {border-radius:9px}
.profile-group-row strong,.profile-group-row small {display:block;overflow-wrap:anywhere}
.profile-group-row small,.profile-groups-empty {color:var(--muted);font-size:13px}
.profile-group-row small {text-align:left;white-space:pre-wrap}
.profile-group-row .profile-group-action {color:var(--accent-strong);font-size:13px;font-weight:650}
.toast {position:fixed;z-index:3;right:20px;top:16px;max-width:min(410px,calc(100% - 40px));border-radius:10px;padding:11px 14px;background:#31304f;color:white;box-shadow:0 6px 24px #2a234d30;font-size:13px}
@media (prefers-reduced-motion:no-preference) {
  .entry-form {overflow-x:clip}
}
@supports (transition-behavior:allow-discrete) and (overlay:auto) {
  @media (prefers-reduced-motion:no-preference) {
    .dialog[data-motion-kind] {
      --dialog-enter:translateY(10px);
      --dialog-exit:translateY(6px);
      --dialog-in-time:180ms;
      opacity:0;
      transform:var(--dialog-exit);
      pointer-events:none;
      transition-property:opacity,transform,overlay,display;
      transition-duration:130ms;
      transition-timing-function:cubic-bezier(.2,.7,.25,1);
      transition-behavior:allow-discrete;
    }
    .dialog[data-motion-kind="direct"] {
      --dialog-enter:translateY(-9px);
      --dialog-exit:translateY(-5px);
      --dialog-in-time:155ms;
    }
    .dialog[data-motion-kind="group"] {
      --dialog-enter:translateY(15px) scale(.972);
      --dialog-exit:translateY(7px) scale(.988);
      --dialog-in-time:215ms;
      transform-origin:center 80%;
    }
    .dialog[data-motion-kind="invite"] {
      --dialog-enter:translateX(15px);
      --dialog-exit:translateX(7px);
    }
    .dialog[data-motion-kind="members"] {
      --dialog-enter:scale(.986);
      --dialog-exit:scale(.993);
      --dialog-in-time:165ms;
    }
    .dialog[data-motion-kind="profile"] {
      --dialog-enter:translateY(12px) scale(.985);
      --dialog-exit:scale(.99);
      --dialog-in-time:190ms;
      transform-origin:center 35%;
    }
    .dialog[data-motion-kind="nickname"] {
      --dialog-enter:translateX(13px);
      --dialog-exit:translateX(6px);
      --dialog-in-time:160ms;
    }
    .dialog[data-motion-kind][open] {
      opacity:1;
      transform:none;
      pointer-events:auto;
      transition-duration:var(--dialog-in-time);
    }
    .dialog[data-motion-kind]::backdrop {
      opacity:0;
      pointer-events:none;
      transition-property:opacity,overlay,display;
      transition-duration:130ms;
      transition-timing-function:ease-out;
      transition-behavior:allow-discrete;
    }
    .dialog[data-motion-kind][open]::backdrop {opacity:1;pointer-events:auto}
    @starting-style {
      .dialog[data-motion-kind][open] {opacity:0;transform:var(--dialog-enter)}
      .dialog[data-motion-kind][open]::backdrop {opacity:0}
    }
  }
}
@media (max-width:740px) {
  .entry {--entry-edge:26px;grid-template-columns:minmax(0,1fr)}
  .entry-side {display:none}
  .entry-home {inset-block-start:10px;color:var(--ink)}
  .entry-form {padding:60px var(--entry-edge) 26px}
  .login-mark {margin-bottom:25px}
  .workspace {grid-template-columns:minmax(0,1fr)}
  .workspace[data-mobile="list"] .thread,.workspace[data-mobile="chat"] .sidebar,.workspace .idle {display:none}
  .sidebar {border-right:0}
  .sidebar-brand {padding:15px 17px}
  .sidebar-title {padding-top:17px}
  .thread-mobile-brand {display:block;padding-inline:14px;background:var(--paper);border-bottom:1px solid var(--line)}
  .thread-header {padding:10px}
  .back-button {display:inline-flex}
  .composer {padding-bottom:max(9px,env(safe-area-inset-bottom))}
  .message-scroll {padding-inline:11px}
  .message-body {max-width:84%}
  .group-message-action {min-width:34px;min-height:30px}
  .composer-hint {display:none}
  .unread-jump {bottom:67px}
}
@media (max-width:380px) {
  .profile-dialog {padding:14px}
  .profile-card-head {gap:10px;padding:13px}
  .profile-avatar {width:58px;height:58px;flex-basis:58px;border-radius:18px;font-size:19px}
  .profile-identity {padding:12px}
}
/* Keep both real mobile panels mounted only while the selected one moves. */
@media (max-width:740px) and (prefers-reduced-motion:no-preference) {
  .workspace[data-mobile-motion] {
    overflow:hidden;
    overflow:clip;
    isolation:isolate;
    grid-template-rows:minmax(0,1fr);
  }
  .workspace[data-mobile-motion] > :is(.sidebar,.thread) {grid-area:1 / 1}
  .workspace[data-mobile-motion] > .sidebar:not([hidden]) {display:flex}
  .workspace[data-mobile-motion] > .thread:not([hidden]) {
    display:grid;
    z-index:1;
    background:#f9f8fd;
    box-shadow:-12px 0 28px #211a3b1a;
  }
  .workspace[data-mobile-motion="open"] > .sidebar,
  .workspace[data-mobile-motion="back"] > .thread {pointer-events:none}
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after {transition:none!important;scroll-behavior:auto!important} }

.admin-trigger {flex:none;padding-inline:6px;font-size:12px}
.admin-dialog {width:min(650px,calc(100% - 24px))}
.admin-nav,.admin-toolbar,.admin-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.admin-nav {padding-bottom:12px;border-bottom:1px solid var(--line)}
.admin-nav .button,.admin-toolbar .button,.admin-actions .button {min-height:35px;padding:5px 10px;font-size:13px}
.admin-nav [aria-pressed=true],.admin-toolbar [aria-pressed=true] {background:var(--tint);color:var(--accent-strong);border-color:#bcb5ef}
.admin-toolbar {margin-top:12px}
.admin-toolbar>p {flex:1;min-width:96px}
.admin-search {display:flex;gap:8px;align-items:center;width:100%}
.admin-search input,.admin-confirm input {min-width:0;min-height:35px;flex:1;padding:6px 9px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--paper)}
.admin-list {display:grid;gap:8px;margin-top:12px}
.admin-card {min-width:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper);overflow-wrap:anywhere}
.admin-card-title {margin:0;font-size:14px;line-height:1.35}
.admin-card>.button,.admin-actions {margin-top:8px}
.admin-caption {color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.admin-dialog>p {margin-top:8px}
.admin-body-text {margin-top:6px;white-space:pre-wrap;overflow-wrap:anywhere}
.admin-more {width:100%;margin-top:10px}
.admin-confirm {display:grid;gap:6px;padding:10px;margin-top:8px;border-radius:8px;background:var(--canvas)}
.admin-confirm .admin-actions {justify-content:flex-end;margin-top:0}
.admin-assets {display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.admin-asset-link {color:var(--accent-strong);overflow-wrap:anywhere;max-width:100%}
.admin-image {display:block;max-width:min(200px,100%);max-height:160px;object-fit:contain;border-radius:7px}
@media (max-width:440px) {
  .admin-nav {gap:5px}
  .admin-nav .button {padding-inline:7px;font-size:12px}
}
