:root{--night:#0b1423;--navy:#101d30;--navy2:#15253c;--panel:#101b2d;--edge:#26384e;--text:#edf3ff;--muted:#8ea4bb;--accent:#46bde8;--lime:#54df9a;--danger:#ff877b;--ring:rgba(76,185,227,.42)}
*{box-sizing:border-box}html,body{height:100%;width:100%;margin:0}html{background:var(--night)}body{color:var(--text);font:15px/1.45 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;overscroll-behavior:none}.app-shell{height:100dvh;min-height:360px;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% -30%,#1b344e 0%,transparent 65%),var(--night);overflow:hidden}
button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}.hidden{display:none!important}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.topbar{flex:0 0 auto;display:flex;justify-content:space-between;gap:24px;padding:13px clamp(14px,3vw,30px);background:#0d1828;border-bottom:1px solid var(--edge);align-items:center}.brand{display:flex;align-items:center;gap:11px;flex:0 0 auto}.brand-logo{width:56px;height:56px;object-fit:cover;border-radius:14px;box-shadow:0 5px 18px rgba(0,0,0,.25)}.brand-type{display:flex;flex-direction:column}.brand-name{font-weight:950;font-size:25px;letter-spacing:-1.3px;line-height:1}.brand-name .green{color:#71e86c}.brand-name .blue{color:#43acff}.brand-name .red{color:#ff6565}.brand-name .yellow{color:#ffde45}.brand-tagline{font-size:11px;color:#9caec4;margin-top:5px;letter-spacing:.02em}.top-actions{display:flex;align-items:end;gap:12px;flex:1;max-width:650px;min-width:0}.control{display:flex;flex-direction:column;gap:5px;min-width:0}.control label{font-size:11px;font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:#8499ae}.group-room{flex:1.25}.group-nick{flex:.85}select,input{width:100%;min-width:0;height:40px;padding:0 12px;border:1px solid #37495f;border-radius:10px;background:#16263b;color:var(--text)}select{white-space:nowrap;text-overflow:ellipsis}select option,select optgroup{background:#17273a;color:#eff7ff}.nick-wrap{display:flex;min-width:0;position:relative}.nick-wrap input{padding-right:44px}.icon-btn{width:36px;height:32px;border:0;border-radius:7px;background:#263d56;color:#b6c9dc;position:absolute;right:4px;top:4px;font-size:19px}.icon-btn:hover{color:white;background:#315677}
.contextbar{flex:0 0 auto;display:flex;align-items:center;gap:14px;background:var(--navy2);padding:11px clamp(14px,3vw,30px);border-bottom:1px solid var(--edge);min-height:65px}.current-room{display:flex;align-items:center;gap:10px;min-width:0}.hash-icon{width:36px;height:36px;display:grid;place-items:center;border:1px solid #365675;background:#1b354f;color:#83cfff;border-radius:11px;font-size:24px;font-weight:750}.room-summary{display:flex;flex-direction:column;min-width:0}.room-summary strong{font-size:16px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-summary small{color:var(--muted);font-size:11px;line-height:1.3}.connection{display:flex;align-items:center;gap:6px;color:#adc1d3;font-size:12px;margin-left:auto;white-space:nowrap}.status-dot{height:8px;width:8px;border-radius:50%;background:#7890a9;display:inline-block;box-shadow:0 0 0 3px rgba(134,151,173,.12)}.status-dot.live{background:var(--lime);box-shadow:0 0 0 3px rgba(84,223,154,.12)}.status-dot.connecting{background:#ffd27b;box-shadow:0 0 0 3px rgba(255,210,123,.12)}.status-dot.error{background:#fb827d;box-shadow:0 0 0 3px rgba(251,130,125,.12)}.context-buttons{display:flex;gap:7px}.mini-btn{display:inline-flex;gap:5px;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap;height:35px;padding:0 11px;background:#1d3046;border:1px solid #3b526a;color:#cfdeeb;border-radius:9px;font-size:12px;font-weight:640}.mini-btn:hover{background:#284462;color:#fff}
.chat-area{position:relative;flex:1 1 auto;min-height:0;width:100%;overflow:hidden}.native-view{height:100%;position:relative;display:flex;flex-direction:column;max-width:1100px;margin:0 auto}.chat-intro{display:flex;gap:12px;align-items:center;padding:16px 28px 14px;color:#c5d6e6;border-bottom:1px solid rgba(96,128,162,.19)}.chat-intro .intro-mark{height:42px;width:42px;border-radius:12px;display:grid;place-items:center;color:#5de8ad;background:#1a3c41;border:1px solid #2b605e;font-size:27px;font-weight:750}.chat-intro strong{display:block;font-size:14px}.chat-intro p{color:var(--muted);font-size:12px;margin:3px 0 0}.messages{flex:1;overflow:auto;overscroll-behavior:contain;padding:12px clamp(15px,3vw,28px) 36px;scrollbar-color:#36536e transparent;scrollbar-width:thin}.chat-line{display:flex;align-items:baseline;gap:11px;margin:0;min-height:29px;padding:4px 0;overflow-wrap:anywhere}.chat-line .stamp{flex:0 0 42px;color:#5f748e;font:11px/1.5 ui-monospace,"SFMono-Regular",Consolas,monospace}.chat-line .who{flex:0 0 132px;max-width:132px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:750;color:#a6cef7}.chat-line .chat-text{white-space:pre-wrap;min-width:0;flex:1;color:#e4edf8}.chat-line.notice,.chat-line.event{color:#88a1ba;font-size:12px}.chat-line.notice .chat-text,.chat-line.event .chat-text{color:#92a9bd}.chat-line.error .chat-text{color:#ff9b92}.chat-line.me .who{color:#61dda0}.jump-bottom{position:absolute;right:20px;bottom:22px;display:none;align-items:center;justify-content:center;height:42px;width:42px;background:#1e4561;border:1px solid #487e9c;color:white;border-radius:50%;box-shadow:0 5px 24px #071021;font-size:24px}.jump-bottom.visible{display:flex}
.composer{background:#101d30;border-top:1px solid #2c4056;padding:12px clamp(14px,3vw,30px) calc(10px + env(safe-area-inset-bottom))}.input-row{display:flex;align-items:end;gap:10px;max-width:1100px;margin:0 auto}.input-row textarea{display:block;resize:none;flex:1;min-width:0;max-height:190px;overflow:auto;min-height:79px;padding:12px 14px;border:1px solid #3b5670;border-radius:12px;background:#17283e;color:#eaf4ff;line-height:1.5;outline:0;scrollbar-width:thin}.input-row textarea:focus{border-color:#5ab9dc;box-shadow:0 0 0 3px var(--ring)}.input-row textarea::placeholder{color:#8097ac}.send-btn{width:48px;height:48px;border:0;border-radius:12px;background:linear-gradient(135deg,#40d4c4,#269fd9);color:#042035;display:grid;place-items:center;flex:0 0 48px;box-shadow:0 4px 12px rgba(12,117,166,.2)}.send-btn:enabled:hover{filter:brightness(1.1)}.bottom-hint{max-width:1100px;margin:7px auto 0;display:flex;justify-content:space-between;gap:10px;color:#839bb1;font-size:11px;line-height:1.4}.hosted-view{height:100%;width:100%;position:relative;display:flex;flex-direction:column}.hosted-view iframe{width:100%;min-height:0;flex:1;border:0;background:#f1f3f6}.hosted-note{font-size:11px;color:#c1d1de;padding:8px 16px;background:#1b3046;border-top:1px solid #32445a;text-align:center}
@media(max-width:680px){.topbar{padding:8px 12px;gap:9px;align-items:stretch}.brand{gap:6px}.brand-logo{width:41px;height:41px;border-radius:11px}.brand-name{font-size:17px;letter-spacing:-.8px}.brand-tagline{display:none}.brand-type{justify-content:center}.top-actions{gap:7px;align-items:center}.control{gap:3px}.control label{font-size:9px}.control select,.control input{height:36px;padding:0 8px;border-radius:8px;font-size:12px}.nick-wrap input{padding-right:30px}.icon-btn{height:28px;width:26px;top:4px;right:4px;font-size:14px}.group-room{flex:1.3}.group-nick{flex:1}.contextbar{padding:8px 12px;gap:9px;min-height:58px}.hash-icon{height:32px;width:32px;font-size:23px}.room-summary strong{font-size:13px}.room-summary small{font-size:10px}.connection{font-size:10px}.context-buttons{gap:4px}.mini-btn{width:32px;padding:0;font-size:17px}.mini-btn span{display:none}.chat-intro{padding:12px 14px}.messages{padding:10px 14px 24px}.chat-line{gap:7px;min-height:29px}.chat-line .stamp{flex-basis:35px;font-size:10px}.chat-line .who{flex-basis:80px;max-width:80px;font-size:12px}.chat-line .chat-text{font-size:13px}.composer{padding:9px 10px calc(7px + env(safe-area-inset-bottom))}.input-row textarea{min-height:70px;font-size:16px}.bottom-hint{font-size:10px}.key-hint{display:none}.hosted-note{font-size:10px;padding:7px 10px}}
@media(max-width:380px){.brand-tagline{display:none}.brand-logo{width:36px;height:36px}.brand-name{font-size:15px}.topbar{gap:7px}.control select,.control input{font-size:11px}.contextbar{gap:6px}.connection{font-size:0}.status-dot{height:9px;width:9px}.mini-btn{width:30px}}
@media(prefers-reduced-motion:no-preference){.status-dot.connecting{animation:pulse 1.5s infinite}@keyframes pulse{50%{opacity:.4}}}
