:root{color-scheme:dark;--bg: #0a0a0c;--panel: #121214;--panel-elevated: #1c1c1e;--border: #2c2c2e;--text: #f5f5f7;--muted: #8e8e93;--accent: #0a84ff;--accent-soft: rgba(10, 132, 255, .14);--sent: #0a84ff;--received: #3a3a3c;--danger: #ff453a;--success: #30d158;--sidebar-width: 340px;--tapback-mine: #0a84ff;--tapback-theirs: #636366;--tapback-ring: #1c1c1e;font-family:SF Pro Text,Segoe UI,system-ui,-apple-system,sans-serif;line-height:1.45;font-weight:400;color:var(--text);background:var(--bg)}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{min-width:320px}button,input,textarea{font:inherit}button{cursor:pointer}.app-shell{display:grid;grid-template-columns:var(--sidebar-width) 1fr;height:100%;background:radial-gradient(ellipse at top left,rgba(40,60,100,.25),transparent 50%),radial-gradient(ellipse at bottom right,rgba(20,30,50,.4),transparent 45%),var(--bg)}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.app-shell.show-thread .sidebar{display:none}}.sidebar{border-right:1px solid var(--border);background:#121214eb;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);display:flex;flex-direction:column;min-height:0}.main-pane{display:flex;flex-direction:column;min-height:0;background:transparent}.thread-shell{display:flex;flex-direction:column;flex:1;min-height:0}.message-list-content{display:flex;flex-direction:column;gap:8px;min-height:min-content}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border);background:#121214d9;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.panel-title{margin:0;font-size:1.1rem;font-weight:600}.muted{color:var(--muted)}.chat-list{overflow:auto;flex:1}.chat-item{width:100%;border:0;background:transparent;color:inherit;text-align:left;padding:12px 16px 12px 12px;border-bottom:1px solid rgba(44,44,46,.7);display:flex;align-items:center;gap:10px}.chat-item.unread .chat-item-title{font-weight:700}.chat-unread-dot{width:10px;height:10px;border-radius:50%;background:#0a84ff;flex-shrink:0;margin-left:2px}.chat-item-content{min-width:0;flex:1;display:grid;gap:4px}.chat-item:hover,.chat-item.active{background:var(--accent-soft)}.chat-item-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline}.chat-item-title{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-item-time{color:var(--muted);font-size:.75rem;flex-shrink:0}.chat-item-preview{color:var(--muted);font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-item-meta{color:var(--muted);font-size:.78rem}.message-list{flex:1;overflow-x:hidden;overflow-y:auto;padding:20px;min-height:0;touch-action:pan-y}.message-list-slide{padding-right:64px;transition:transform .38s cubic-bezier(.25,.46,.45,.94);will-change:transform}.message-list.dragging-times .message-list-slide{transition:none}.message-stack-wrap{position:relative;display:flex;align-items:flex-end;width:100%}.message-stack-wrap.from-me{justify-content:flex-end}.message-stack-wrap.from-them{justify-content:flex-start}.message-stack-wrap .message-stack{width:100%}.message-stack-wrap.system{justify-content:center;flex-wrap:wrap}.message-stack-wrap.system .message-time-edge{position:static;width:auto;margin-top:4px;text-align:center}.message-time-edge{position:absolute;right:-58px;bottom:8px;width:54px;font-size:.68rem;line-height:1.2;color:#ffffff6b;opacity:var(--time-reveal, 0);white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none}.message-stack{display:flex;flex-direction:column;gap:4px}.message-stack.from-me{align-items:flex-end}.message-stack.from-them{align-items:flex-start}.message-stack .group-sender-name{margin-bottom:2px;padding-left:4px}.message-stack .message-row{width:100%}.message-row{display:flex}.message-row.from-me{justify-content:flex-end}.message-bubble-wrap{position:relative;max-width:min(72%,640px);display:flex;flex-direction:column;margin-bottom:2px}.message-bubble-wrap.has-tapbacks{margin-bottom:10px}.group-sender-name{font-size:.72rem;font-weight:600;margin-bottom:3px;padding-left:4px;letter-spacing:.01em}.message-row.from-me .message-bubble-wrap{align-items:flex-end}.message-row.from-them .message-bubble-wrap{align-items:flex-start}.message-bubble{padding:10px 14px;border-radius:18px;white-space:pre-wrap;word-break:break-word;position:relative}.message-row.from-me .message-bubble{background:var(--sent);color:#fff;border-bottom-right-radius:5px}.message-row.from-them .message-bubble{background:var(--received);border-bottom-left-radius:5px}.message-bubble.media-bubble{padding:0;overflow:hidden}.message-bubble.image-bubble{background:transparent;padding:0}.message-row.from-me .message-bubble.image-bubble,.message-row.from-them .message-bubble.image-bubble{background:transparent}.message-text{white-space:pre-wrap}.muted-inline{opacity:.8;font-style:italic}.message-edited{margin-top:4px;font-size:.7rem;opacity:.75}.message-meta{display:none}.delivery-receipt{font-size:.72rem;color:var(--muted);margin-top:2px}.system-line{align-self:center;color:var(--muted);font-size:.82rem;padding:4px 0}.tapback-stack{position:absolute;display:flex;align-items:center;z-index:2;pointer-events:none;bottom:-8px}.tapback-stack.on-them{right:6px;flex-direction:row}.tapback-stack.on-me{left:6px;flex-direction:row-reverse}.tapback{position:relative;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 4px #00000059;border:2px solid var(--tapback-ring);flex-shrink:0}.tapback-stack .tapback:not(:first-child){margin-left:-9px}.tapback-stack.on-me .tapback:not(:first-child){margin-left:0;margin-right:-9px}.tapback.mine{background:var(--tapback-mine)}.tapback.theirs{background:var(--tapback-theirs)}.tapback-emoji{font-size:13px;line-height:1;display:block}.reply-quote{border-left:3px solid rgba(255,255,255,.35);padding:5px 8px;margin-bottom:6px;border-radius:6px;background:#00000024;font-size:.84rem;color:#ffffffc7;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.35}.message-row.from-me .reply-quote{border-left-color:#ffffff73;background:#0000001a}.reaction-menu{position:fixed;z-index:50;background:#2c2c2ef5;border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:10px;box-shadow:0 12px 40px #00000073;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);min-width:260px}.reaction-menu-tapbacks{display:flex;gap:4px;justify-content:space-between;margin-bottom:8px}.tapback-choice{width:38px;height:38px;border:0;border-radius:999px;background:transparent;font-size:1.25rem}.tapback-choice:hover{background:#ffffff1a}.reaction-menu-actions{display:grid;gap:4px}.reaction-menu-actions button{border:0;background:transparent;color:var(--text);text-align:left;padding:8px 10px;border-radius:10px}.reaction-menu-actions button:hover{background:#ffffff14}.attachment{margin-top:0}.attachment img,.attachment video{display:block;max-width:min(280px,72vw);max-height:320px;border-radius:12px;background:#000}.clickable-image{cursor:zoom-in}.image-lightbox-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:#000000e0;display:grid;place-items:center;padding:24px}.image-lightbox-img{max-width:min(92vw,1100px);max-height:88vh;width:auto;height:auto;object-fit:contain;border-radius:8px;box-shadow:0 12px 48px #00000073}.image-lightbox-close{position:fixed;top:16px;right:18px;z-index:1001;border:0;background:#ffffff1f;color:#fff;width:40px;height:40px;border-radius:50%;font-size:1.5rem;line-height:1;cursor:pointer}.attachment.video video{width:100%;height:auto}.attachment-loading{font-size:.85rem;padding:8px 0}.attachment.sticker img{max-width:140px;max-height:140px;background:transparent}.attachment-link{display:inline-block;margin-top:4px;border:0;background:transparent;color:inherit;text-decoration:underline;opacity:.9;padding:0;font-size:.85rem}.edit-box textarea{width:100%;min-height:72px;border-radius:10px;border:1px solid rgba(255,255,255,.2);background:#0003;color:inherit;padding:8px;resize:vertical}.edit-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}.compose-box{border-top:1px solid var(--border);padding:12px 16px;background:#121214f0;display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"attach field send" "error error error";gap:10px;align-items:end}.compose-attach{grid-area:attach;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:999px;font-size:1.35rem;line-height:1;padding:0;align-self:center}.compose-box textarea{grid-area:field;width:100%;resize:none;min-height:42px;max-height:160px;border-radius:20px;border:1px solid var(--border);background:var(--panel-elevated);color:var(--text);padding:10px 14px}.compose-box textarea:focus,.compose-box textarea:focus-visible{outline:none;border-color:var(--border);box-shadow:none}.compose-send{grid-area:send;height:42px;min-width:72px;border-radius:20px}.compose-error{grid-area:error}.primary-button,.secondary-button,.ghost-button{border-radius:12px;border:1px solid transparent;padding:10px 16px}.primary-button{background:var(--accent);color:#fff}.secondary-button{background:var(--panel-elevated);color:var(--text);border-color:var(--border)}.ghost-button{background:transparent;color:var(--muted);border-color:var(--border)}.primary-button:disabled,.secondary-button:disabled,.ghost-button:disabled{opacity:.55;cursor:not-allowed}.empty-state{min-height:100%;display:grid;place-items:center;padding:24px}.status-bar{display:flex;align-items:center;gap:8px;font-size:.85rem;color:var(--muted)}.status-dot{width:8px;height:8px;border-radius:999px;background:var(--muted)}.status-dot.online{background:var(--success)}.status-dot.offline{background:var(--danger)}.error-banner{background:#ff453a1f;border:1px solid rgba(255,69,58,.35);color:#ffb4ae;border-radius:12px;padding:10px 12px;font-size:.92rem;margin:8px 12px}.thread-error{margin:0 20px 8px}.new-chat-bar{padding:12px 18px;border-bottom:1px solid var(--border);display:grid;grid-template-columns:1fr auto;gap:8px}.new-chat-bar input{border-radius:12px;border:1px solid var(--border);background:var(--panel-elevated);color:var(--text);padding:10px 12px;width:100%}.gate-screen{position:relative;min-height:100%;display:grid;place-items:center;padding:32px 20px;overflow:hidden;isolation:isolate}.gate-welcome{background:#000;color:#fff}.gate-locked{background:#0a0000;color:#fff;animation:gate-lock-enter .55s cubic-bezier(.22,1,.36,1) both}@keyframes gate-lock-enter{0%{background:#000;filter:brightness(1)}18%{background:#3d0000;filter:brightness(1.35)}to{background:#0a0000;filter:brightness(1)}}.gate-grid{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);background-size:48px 48px;-webkit-mask-image:radial-gradient(ellipse 70% 60% at 50% 45%,#000 20%,transparent 75%);mask-image:radial-gradient(ellipse 70% 60% at 50% 45%,#000 20%,transparent 75%);animation:gate-grid-breathe 8s ease-in-out infinite;pointer-events:none}@keyframes gate-grid-breathe{0%,to{opacity:.35}50%{opacity:.65}}.gate-noise{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.045;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");pointer-events:none}.gate-line{position:absolute;left:50%;width:min(420px,72vw);height:1px;background:#fff;transform:translate(-50%) scaleX(0);transform-origin:center;opacity:.55;pointer-events:none}.gate-line-top{top:18%;animation:gate-line-draw 1.4s cubic-bezier(.16,1,.3,1) .15s both}.gate-line-bottom{bottom:18%;animation:gate-line-draw 1.4s cubic-bezier(.16,1,.3,1) .35s both}@keyframes gate-line-draw{0%{transform:translate(-50%) scaleX(0);opacity:0}to{transform:translate(-50%) scaleX(1);opacity:.55}}.gate-lock-pulse{position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(circle at 50% 42%,rgba(255,40,40,.22) 0%,transparent 58%);animation:gate-lock-pulse 2.8s ease-in-out infinite;pointer-events:none}@keyframes gate-lock-pulse{0%,to{opacity:.45}50%{opacity:.9}}.gate-inner{position:relative;z-index:1;text-align:center;max-width:440px}.gate-mark{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:28px;animation:gate-mark-in .9s cubic-bezier(.16,1,.3,1) both}@keyframes gate-mark-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.gate-mark-bar{display:block;width:28px;height:1px;background:#fff;animation:gate-bar-pulse 2.4s ease-in-out infinite}.gate-mark-dot{display:block;width:5px;height:5px;border-radius:50%;background:#fff;animation:gate-dot-blink 2.4s step-end infinite}@keyframes gate-bar-pulse{0%,to{transform:scaleX(1);opacity:1}50%{transform:scaleX(1.6);opacity:.35}}@keyframes gate-dot-blink{0%,45%{opacity:1}50%,95%{opacity:.15}}.gate-title{margin:0;font-size:clamp(2.4rem,7vw,3.6rem);font-weight:500;letter-spacing:-.04em;line-height:1;display:flex;justify-content:center;gap:.28em;flex-wrap:wrap}.gate-welcome .gate-title-word{display:inline-block;animation:gate-word-rise .85s cubic-bezier(.16,1,.3,1) both}.gate-welcome .gate-title-word:nth-child(1){animation-delay:.2s}.gate-welcome .gate-title-word:nth-child(2){animation-delay:.32s}@keyframes gate-word-rise{0%{opacity:0;transform:translateY(14px);filter:blur(4px)}to{opacity:1;transform:translateY(0);filter:blur(0)}}.gate-title-lock{display:block;color:#ff3b30;animation:gate-lock-shake .5s cubic-bezier(.36,.07,.19,.97) .12s both}@keyframes gate-lock-shake{0%,to{transform:translate(0)}20%{transform:translate(-3px)}40%{transform:translate(3px)}60%{transform:translate(-2px)}80%{transform:translate(2px)}}.gate-tagline{margin:14px 0 0;font-size:.82rem;letter-spacing:.28em;text-transform:uppercase;color:#ffffff6b;animation:gate-fade-in .8s ease .55s both}.gate-rule{width:32px;height:1px;background:#fff;margin:26px auto 0;animation:gate-rule-grow .7s cubic-bezier(.16,1,.3,1) .7s both}@keyframes gate-rule-grow{0%{transform:scaleX(0);opacity:0}to{transform:scaleX(1);opacity:.7}}.gate-hint{margin:18px 0 0;font-size:.88rem;color:#ffffff61;animation:gate-fade-in .8s ease .85s both}@keyframes gate-fade-in{0%{opacity:0}to{opacity:1}}.gate-lock-badge{display:inline-block;margin-bottom:20px;padding:6px 14px;border:1px solid #ff3b30;color:#ff3b30;font-size:.68rem;font-weight:600;letter-spacing:.32em;text-transform:uppercase;animation:gate-badge-in .45s cubic-bezier(.16,1,.3,1) .08s both}@keyframes gate-badge-in{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}.gate-lock-notice{margin:16px 0 0;font-size:1rem;font-weight:500;color:#fff;line-height:1.45;animation:gate-fade-in .5s ease .2s both}.gate-lock-detail{margin:12px 0 0;font-size:.88rem;color:#ff7878bf;line-height:1.5;animation:gate-fade-in .5s ease .35s both}.gate-auth{margin-top:18px;animation:gate-fade-in .35s ease both}.gate-auth-input{width:min(240px,70vw);padding:10px 12px;border:1px solid rgba(255,255,255,.18);border-radius:8px;background:#ffffff0a;color:#fff;font:inherit;letter-spacing:.08em;text-align:center}.gate-auth-input:focus{outline:none;border-color:#ffffff73}.gate-auth-error{margin:10px 0 0;font-size:.82rem;color:#ff453a}.welcome-screen{min-height:100%;display:grid;place-items:center;padding:32px 20px;background:#000;color:#fff}.welcome-inner{text-align:center;max-width:420px}.welcome-brand{margin:0;font-size:clamp(2rem,5vw,3rem);font-weight:500;letter-spacing:-.03em}.welcome-sub{margin:14px 0 0;color:#ffffff73;line-height:1.5}
