:root { color-scheme: dark; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-synthesis: none; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
html,body { margin:0; min-height:100%; }
body { background: radial-gradient(ellipse 90% 70% at 15% 0%, #233556 0, #101b2c 63%, #0c1421 100%); color: #f4f6fb; }
button,input,textarea { font: inherit; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.46; }
[hidden] { display:none !important; }
.shell { min-height:100dvh; display:flex; flex-direction:column; max-width:900px; margin:0 auto; padding:clamp(15px, 4vw, 32px); }
.masthead { display:flex; gap:14px; align-items:center; margin:8px 0 25px; }
.brand-mark { position:relative; width:38px; height:38px; border:2px solid #6deac4; border-radius:12px; transform:rotate(45deg); }
.brand-mark span { position:absolute; height:2px; width:20px; left:6px; top:11px; background:#6deac4; }
.brand-mark span:last-child { top:20px; width:13px; }
.eyebrow { color:#7fe8c5; font-size:10px; font-weight:800; letter-spacing:2.6px; }
h1 { font-size:24px; line-height:1.05; letter-spacing:-.6px; margin:3px 0 0; }
.dot { color:#6deac4; }
.private-label { margin-left:auto; color:#abc2d5; border:1px solid #3c536c; padding:8px 12px; border-radius:100px; font-size:12px; }
.panel { background: rgba(15, 28, 47, .89); border:1px solid #32465f; box-shadow: 0 25px 90px #02071055; border-radius:22px; }
.welcome { text-align:center; padding:clamp(40px,8vw,82px) 20px; margin:auto 0; }
.logo-lock { font-size:48px; color:#7becc7; margin:0 auto 5px; }
h2 { font-size:clamp(29px,5vw,44px); letter-spacing:-1.5px; margin:12px 0; }
.welcome p { color:#b1c1d2; font-size:16px; line-height:1.7; margin:0 auto 26px; max-width:470px; }
.button { border:1px solid transparent; border-radius:12px; background:#253a54; color:#f0f8ff; font-weight:700; padding:13px 17px; white-space:nowrap; }
.button.primary { background:#79e9c8; color:#10273a; font-size:16px; padding:16px 22px; }
.button.secondary { background:#2c536a; border-color:#5b9fac; }
.button.subtle { border-color:#38506b; background:transparent; color:#d5e5f1; padding:9px 13px; }
.button:hover:not(:disabled) { filter:brightness(1.1); }
.feature-row { display:flex; gap:12px 22px; justify-content:center; flex-wrap:wrap; font-size:12px; color:#96b6b5; margin-top:35px; }
.feature-row span::before { content:'✓ '; color:#7cebc5; }
.chat { overflow:hidden; display:flex; flex-direction:column; flex:1; min-height:480px; max-height:calc(100dvh - 140px); }
.chat-topbar { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:17px 21px; border-bottom:1px solid #2b4156; }
.room-info { display:flex; gap:15px; align-items:center; }
.avatar-group { display:flex; padding-right:9px; }
.avatar { width:34px; height:34px; border:2px solid #102136; border-radius:50%; background:#72cfb9; color:#13313d; font-size:14px; display:grid; place-items:center; font-weight:800; }
.avatar.second { background:#e9b98b; margin-left:-10px; }
.room-title { font-size:16px; font-weight:800; }
.small-muted { color:#9cb4c7; font-size:12px; }
.invite-area { margin:14px 18px; padding:16px; border:1px solid #2a4e59; background:#163543; border-radius:14px; }
.invite-title { font-weight:800; font-size:14px; }
.invite-area p { font-size:13px; line-height:1.5; color:#bad0cf; margin:6px 0 11px; }
.invite-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.invite-controls .button { padding:9px 13px; font-size:13px; }
.manual-link { margin-top:9px; width:100%; background:#0c202c; border:1px solid #507b85; color:#f3fbfc; border-radius:8px; padding:11px; }
.messages { min-height:150px; flex:1; overflow-y:auto; padding:12px 22px 18px; display:flex; flex-direction:column; gap:10px; overscroll-behavior:contain; }
.empty-state { margin:auto; text-align:center; color:#c0d0df; }
.empty-state p { font-weight:700; margin:5px 0; }
.empty-state small { color:#8ba2b6; }
.empty-symbol { font-size:35px; color:#6deac4; }
.message { width:fit-content; max-width:min(85%,620px); background:#253a54; border:1px solid #365675; padding:10px 13px; border-radius:14px 14px 14px 3px; overflow-wrap:anywhere; }
.message.mine { align-self:flex-end; background:#246259; border-color:#379580; border-radius:14px 14px 3px 14px; }
.msg-by { font-size:11px; color:#8fedcf; font-weight:700; margin-bottom:4px; }
.msg-text { white-space:pre-wrap; font-size:14px; line-height:1.5; }
.msg-time { color:#b8c8d2; font-size:10px; text-align:right; margin-top:5px; }
.system-message { align-self:center; text-align:center; color:#9bb1c7; font-size:12px; padding:6px 10px; }
.composer { padding:14px; border-top:1px solid #2d415b; background:#112139; }
.nickname { display:block; width:min(200px,100%); border:1px solid #314c65; border-radius:9px; background:#172f47; color:#fff; padding:9px 11px; font-size:12px; margin-bottom:9px; }
.send-row { display:flex; gap:8px; }
textarea { flex:1; min-width:0; resize:none; background:#1e3249; border:1px solid #38546e; border-radius:12px; color:#fff; padding:13px; min-height:46px; max-height:110px; }
textarea::placeholder,input::placeholder { color:#8ba3b8; }
.send { font-size:18px; background:#79e9c8; color:#123243; padding:8px 15px; }
footer { color:#8aa1b5; font-size:11px; line-height:1.5; margin:18px auto 0; text-align:center; }
.sr-only {position:absolute; width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
@media (max-width:520px) { .shell { padding:12px; } .masthead { margin:8px 0 14px; } .private-label { display:none; } .chat { max-height:calc(100dvh - 112px); border-radius:16px; } .chat-topbar { padding:13px; } .invite-area { margin:10px; padding:12px; } .messages { padding:10px 12px; } .composer { padding:10px; } .message { max-width:92%; } }

.chat-actions { display:flex; align-items:center; gap:6px; }
.retention-note { font-size:12px !important; color:#91dbc4 !important; }
@media (max-width:520px) { .chat-actions .button { padding:8px; font-size:11px; } }

/* Ephemeral presence and typing feedback, scoped to the private chat. */
.peer-presence { display:flex; align-items:center; gap:7px; margin:4px 0 3px; font-size:12px; font-weight:600; color:#a8bed0; }
.presence-dot { display:inline-block; width:8px; height:8px; flex-shrink:0; border-radius:50%; background:#8795a7; box-shadow:0 0 0 2px #ffffff14; }
.presence-dot.online { background:#61ebb0; box-shadow:0 0 0 3px #61ebb022; }
.presence-dot.away { background:#f0ba64; box-shadow:0 0 0 3px #f0ba6420; }
.presence-dot.offline { background:#8e9bb0; }
.typing-indicator { display:flex; align-items:center; gap:8px; min-height:28px; padding:0 20px 10px; color:#84dac3; font-size:12px; font-weight:600; }
.typing-dots { display:inline-flex; gap:3px; align-items:center; }
.typing-dots span { width:5px; height:5px; background:currentColor; border-radius:50%; opacity:.35; animation:typing-pulse 1.15s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay:.15s; }
.typing-dots span:nth-child(3) { animation-delay:.3s; }
@keyframes typing-pulse { 0%,70%,100% { opacity:.3; transform:translateY(0); } 35% { opacity:1; transform:translateY(-3px); } }
@media (prefers-reduced-motion:reduce) { .typing-dots span { animation:none; opacity:.75; } }
@media (max-width:520px) { .typing-indicator { padding:0 12px 9px; } }
