:root{font:15px/1.5 'Segoe UI',sans-serif;color:#202036;background:#f5f5fb;--accent:#6650df;--muted:#78778b;--line:#e9e7f2}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{border:0;border-radius:12px;padding:10px 16px;background:#efedf9;color:#423880;cursor:pointer}button:hover{background:#e3ddfb}button:disabled{opacity:.5;cursor:wait}button.primary{color:white;background:var(--accent)}button.danger{color:#b52343;background:#ffedf0}button.ghost{background:transparent;padding:6px 10px}input,textarea,select{border:1px solid #dcd8eb;border-radius:12px;padding:11px;background:white;color:inherit;max-width:100%}textarea{resize:vertical;min-height:90px;width:100%}input:focus,textarea:focus{outline:2px solid #b5a7fb}h1{font-size:28px;margin:0 0 22px}h2{font-size:21px;margin:0 0 14px}h3{margin:0}p{white-space:pre-wrap;overflow-wrap:anywhere}small,.muted{color:var(--muted)}a{color:var(--accent)}.layout{display:grid;grid-template-columns:220px minmax(0,1fr);height:100vh}.sidebar{background:white;border-right:1px solid var(--line);padding:30px 18px;display:flex;flex-direction:column;gap:8px}.brand{font-weight:900;font-size:24px;color:var(--accent);letter-spacing:1px;margin:0 12px 30px}.sidebar button{text-align:left;background:transparent;color:#535165}.sidebar button.active{background:#eee9ff;color:var(--accent);font-weight:650}.sidebar .bottom{margin-top:auto}.content{padding:32px 40px;overflow:auto}.column{max-width:800px;margin:auto}.card{background:white;border:1px solid var(--line);border-radius:20px;padding:22px;margin-bottom:18px}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.between{justify-content:space-between}.grow{flex:1;min-width:0}.avatar{height:42px;width:42px;border-radius:50%;object-fit:cover;background:#eee9ff;display:inline-grid;place-items:center;color:var(--accent);font-weight:700;flex:none}.avatar.large{height:88px;width:88px;font-size:28px}.feed-media{display:block;width:100%;max-height:550px;object-fit:contain;background:#f7f7fb;border-radius:14px;margin:16px 0;cursor:zoom-in;aspect-ratio:1/1}.cover{width:100%;height:190px;object-fit:cover;border-radius:16px}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.login{max-width:430px;margin:10vh auto;padding:38px}.login input{display:block;width:100%;margin:14px 0}.login h1{color:var(--accent)}.error{color:#b52343}.loading{text-align:center;padding:80px;color:var(--muted)}.empty{padding:50px 20px;text-align:center;color:var(--muted)}.list-row{width:100%;text-align:left;display:flex;gap:12px;align-items:center;background:white;padding:16px;border-bottom:1px solid var(--line);border-radius:0}.list-row:hover{background:#f5f2ff}.badge{border-radius:20px;background:var(--accent);color:white;padding:2px 9px;font-size:12px}.chat{display:flex;flex-direction:column;height:calc(100vh - 64px);max-width:1000px;margin:auto}.chat-header{padding:12px 0 18px;border-bottom:1px solid var(--line)}.messages{flex:1;overflow:auto;padding:20px 16px;display:flex;flex-direction:column;gap:10px;scroll-behavior:auto;overscroll-behavior:contain}.bubble{max-width:76%;align-self:flex-start;background:white;border-radius:18px 18px 18px 5px;padding:12px 16px;box-shadow:0 2px 5px #29234407;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;background:#e8e2ff;border-radius:18px 18px 5px 18px}.bubble p{margin:5px 0}.bubble .feed-media{width:300px;max-width:100%;height:220px;aspect-ratio:auto;margin:4px 0}.bubble .meta{text-align:right;font-size:11px;color:#817793}.bubble audio{max-width:100%;width:280px}.quote{display:block;border-left:3px solid #8b76e9;font-size:13px;text-align:left;padding:5px 10px;width:100%}.chat-compose{background:white;padding:14px;border:1px solid var(--line);border-radius:18px}.chat-compose textarea{min-height:46px;height:46px;max-height:180px;border:0;padding:10px}.date-chip{align-self:center;color:#766694;background:#eeebf7;border-radius:20px;padding:3px 12px;font-size:12px;position:sticky;top:0}.highlight{outline:3px solid #a08aec}.typing{min-height:22px;font-size:13px;color:var(--accent)}dialog{border:0;border-radius:22px;box-shadow:0 15px 70px #15112b44;max-width:min(720px,90vw);width:540px;max-height:88vh;padding:26px;color:inherit}dialog::backdrop{background:#15112b77}dialog input,dialog textarea{display:block;width:100%;margin:12px 0}dialog .scroll{max-height:55vh;overflow:auto}.gallery{width:95vw;max-width:95vw;height:92vh;max-height:92vh;background:#161521;color:white;display:flex;flex-direction:column}.gallery:not([open]){display:none}.gallery-stage{flex:1;overflow:hidden;display:grid;place-items:center;touch-action:none}.gallery-stage img,.gallery-stage video{max-width:100%;max-height:74vh;object-fit:contain}.call{background:#161521;color:white;width:90vw;max-width:1100px;height:90vh}.call-grid{height:calc(100% - 110px);display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}.call-tile{background:#282538;border-radius:18px;position:relative;overflow:hidden;display:grid;place-items:center}.call-tile video{width:100%;height:100%;object-fit:cover;position:absolute}.call-tile span{position:absolute;bottom:12px;left:15px;text-shadow:0 1px 4px black}.call .actions{justify-content:center}.progress{margin-top:12px;width:100%}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#302849;color:white;border-radius:14px;padding:12px 20px;max-width:80vw;z-index:1000;display:none}.story-strip{display:flex;gap:12px;overflow:auto;padding:4px 0 20px}.story-strip button{min-width:80px}.spacer{height:16px}@media(max-width:1000px){.layout{grid-template-columns:180px 1fr}.content{padding:24px}.sidebar{padding:25px 10px}.brand{font-size:20px}}

.chat[data-theme="blue"] .messages{background:#edf5ff}.chat[data-theme="mint"] .messages{background:#eaf8f0}.chat[data-theme="rose"] .messages{background:#fff0f5}.chat[data-theme="dark"] .messages{background:#222132}.chat[data-theme="dark"] .bubble{background:#343148;color:#f8f6ff}.chat[data-theme="dark"] .bubble.mine{background:#51416e}
