:root{color-scheme:dark;--bg:#091322;--panel:#112137;--edge:#29405b;--ink:#eef5ff;--muted:#9fb2c9;--blue:#2d91ff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Segoe UI,Arial,sans-serif;font-size:15px}.app{width:min(880px,100%);margin:auto;min-height:100dvh;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom)}header{display:flex;align-items:center;gap:10px;min-height:68px;border-bottom:1px solid var(--edge)}.brand{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:700;margin-right:auto;color:var(--ink);text-decoration:none}.brand small{font-size:9px;letter-spacing:1px;color:var(--blue)}button,input,select,textarea{font:inherit;color:var(--ink);border:1px solid var(--edge);background:var(--panel);border-radius:9px}button{min-height:42px;padding:8px 12px;cursor:pointer}button:disabled{opacity:.45;cursor:wait}button:hover:not(:disabled){border-color:var(--blue)}a{color:#78bdff}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #91c7ff;outline-offset:2px}.primary{background:var(--blue);color:#fff;border-color:var(--blue);font-weight:600}input,textarea,select{padding:11px;min-width:0;font-size:16px}textarea{resize:none}h1{font-size:30px;letter-spacing:-1px}h2{font-size:20px;margin:0}p{line-height:1.6}.fine{font-size:12px;color:var(--muted)}#notice{font-size:12px;min-height:20px;margin:8px 0;color:#b7d5f6}.login-card{max-width:440px;margin:40px auto;padding:25px;border:1px solid var(--edge);border-radius:18px;background:var(--panel)}.login-card label{display:block;margin:15px 0 7px}.login-card input,.login-card .primary{width:100%}.login-card .primary{margin-top:20px}.eyebrow{color:#78bdff;font-size:11px;letter-spacing:2px}main{flex:1;display:flex;flex-direction:column;min-height:0}.screen{flex:1;padding:18px 0}.section-top{display:flex;align-items:center;gap:15px;justify-content:space-between}.section-top h1{margin:0}.section-top p{font-size:12px;color:var(--muted);margin:5px 0}.inline{display:flex;gap:8px;margin:18px 0}.inline input{flex:1}.list{display:grid;gap:8px;margin:16px 0}.contact,.room-entry{border:1px solid var(--edge);background:var(--panel);border-radius:12px;padding:13px;display:flex;align-items:center;gap:10px}.contact .name{flex:1;min-width:0;overflow-wrap:anywhere}.avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;background:#233c5a;display:flex;align-items:center;justify-content:center;flex-shrink:0}.name small{display:block;font-size:11px;color:var(--muted)}.dot{color:#48d6a4}.dot.Away{color:#e8bd59}.dot.Busy{color:#f17c87}.dot.Offline{color:#8b9bb0}.room-entry{width:100%;text-align:left}.room-entry span{flex:1}.room-entry small{color:var(--muted)}.bottom-nav{display:flex;gap:10px;align-items:center;justify-content:center;padding:12px 0;border-top:1px solid var(--edge);margin-top:auto}.bottom-nav button,.bottom-nav a{flex:1;text-align:center}.bottom-nav a{text-decoration:none;font-size:13px}.chat-screen{height:calc(100dvh - 154px);min-height:350px;display:flex;flex-direction:column;padding:12px 0 0}.history{flex:1;min-height:120px;overflow:auto;overscroll-behavior:contain;padding:10px 0}.message-row{display:flex;gap:8px;padding:8px 4px;align-items:flex-start}.message-row .bubble{background:var(--panel);padding:9px 12px;border-radius:11px;flex:1;min-width:0;font-size:14px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.message-row strong{color:#8fc9ff;font-size:12px;margin-right:7px}.message-row small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.message-row.own .bubble{background:#153357}#room-tools{display:flex;gap:6px;padding:8px 0}#room-tools button{font-size:12px;flex:1}.composer{display:flex;align-items:center;gap:6px;padding:8px 0}.composer textarea{flex:1;max-height:100px}.composer button{width:40px;min-width:40px;padding:6px}#speaker-strip{border-top:1px solid var(--edge);padding:8px 0;display:flex;align-items:center;gap:10px;font-size:12px}#speaker{flex:1;overflow-wrap:anywhere}#mic.talking{background:#c93650}dialog{background:var(--panel);color:var(--ink);border:1px solid var(--edge);border-radius:16px;width:min(480px,calc(100% - 28px));max-height:80dvh;padding:20px}dialog::backdrop{background:#0009}#panel-body{margin-top:15px}.panel-row{padding:10px 0;border-bottom:1px solid var(--edge);display:flex;align-items:center;gap:10px}.panel-row span{flex:1}#rules-text{white-space:pre-wrap;overflow-wrap:anywhere}#panel-body label{display:block;margin:12px 0 6px}#panel-body select{width:100%}#panel-body input[type=range]{width:100%}[hidden]{display:none!important}@media(max-width:480px){.app{padding-left:10px;padding-right:10px}.brand{font-size:18px}.brand small{font-size:8px}header button{font-size:11px;padding:7px}.login-card{margin:24px 0;padding:20px}.chat-screen{height:calc(100dvh - 152px)}.composer{gap:4px}.composer button{width:34px;min-width:34px}.composer textarea{padding:10px 7px}.contact button{font-size:12px;padding:7px}.contact{gap:7px;padding:10px}.inline button{font-size:12px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
#self-profile{display:flex;align-items:center;gap:10px;background:transparent;border:0;padding:0;text-align:left}.owner-name{color:#ff8192!important;font-weight:700}.owner-name::before{content:'♛ ';color:#ff8192}.presence-change .avatar{animation:presence-glow 2s ease-out}.dot.Invisible{color:#8b9bb0}@keyframes presence-glow{0%{box-shadow:0 0 0 1px #6cd6ae}35%{box-shadow:0 0 13px 3px #6cd6ae88}100%{box-shadow:none}}#friend-search,#room-search{width:100%;margin-top:10px}.chat-tools{display:flex;gap:8px;align-items:center}.chat-tools input{flex:1;min-width:0;font-size:14px;padding:8px}.chat-tools button{font-size:12px}.composer button{min-width:36px;width:36px}.composer textarea{min-height:42px}#message-counter{margin:0;text-align:right;font-size:11px}#composer-hint{margin:3px 0 8px}#room-tools{flex-wrap:wrap}#room-tools button{min-width:35px;flex:1;padding:6px}#room-tools #bell,#room-tools #room-feedback,#room-tools #room-admin{flex:0 0 36px}#panel-body>button{display:block;width:100%;margin:7px 0;text-align:left}#panel-body label,#account-dialog label{display:block;margin:10px 0}#panel-body label input:not([type=checkbox]),#panel-body select,#panel-body textarea,#account-dialog input{display:block;width:100%;margin-top:5px}#panel-body input[type=checkbox]{margin-left:10px}.report-context{white-space:pre-wrap;max-height:120px;overflow:auto;overflow-wrap:anywhere;border:1px solid var(--edge);padding:8px;font-size:11px}#pinned-topic{margin:3px 0;padding:6px 8px;border-left:2px solid var(--blue)}.panel-row>div{flex:1;overflow-wrap:anywhere}.message-row{user-select:text}.message-row .bubble{cursor:context-menu}#friends h3{font-size:12px;color:var(--muted);margin:8px 0 0}@media(max-width:360px){.composer button{min-width:32px;width:32px}.brand small{display:none}header{gap:5px}}@media(prefers-reduced-motion:reduce){.presence-change .avatar{animation:none}}
.contact{--status-glow:#6cd6ae88}.contact[data-presence=Offline]{--status-glow:#8b9bb088}.contact[data-presence=Busy]{--status-glow:#f17c8788}.contact[data-presence=Away]{--status-glow:#e8bd5988}@keyframes presence-glow{0%{box-shadow:0 0 0 1px var(--status-glow)}35%{box-shadow:0 0 13px 3px var(--status-glow)}100%{box-shadow:none}}
.panel-row .avatar{flex:0 0 34px;width:34px;min-width:34px;max-width:34px;height:34px;min-height:34px;max-height:34px;aspect-ratio:1;overflow:hidden}

#connection-status{margin:0;padding:8px 10px;border:1px solid #a47835;background:#362b1b;color:#ffdda3;border-radius:9px;font-size:12px}
#room-tools #bell,#room-tools #room-feedback,#room-tools #room-admin{flex:0 1 auto;min-width:65px}
#presence[data-presence=Online]{border-color:#48d6a4;color:#48d6a4}#presence[data-presence=Away]{border-color:#e8bd59;color:#e8bd59}#presence[data-presence=Busy]{border-color:#f17c87;color:#f17c87}#presence[data-presence=Invisible]{border-color:#8b9bb0;color:#8b9bb0}
#new-messages{margin-left:auto;background:#2464a5;border-color:#79bcff;font-size:12px}#history{overflow-anchor:none}.composer{flex-shrink:0}.bottom-nav{flex-shrink:0}
@media(max-width:600px){.chat-screen{height:calc(var(--visible-height,100dvh) - 190px);min-height:240px}.keyboard-open .app{min-height:var(--visible-height,100dvh)}.keyboard-open .chat-screen{height:calc(var(--visible-height,100dvh) - 122px);min-height:150px}.keyboard-open .bottom-nav,.keyboard-open #composer-hint,.keyboard-open #chat-subtitle,.keyboard-open #room-tools{display:none}.keyboard-open #notice:empty{display:none}.keyboard-open .history{min-height:30px}.keyboard-open .chat-screen{padding-top:4px}.keyboard-open .section-top h2{font-size:16px}.keyboard-open .section-top button{min-height:32px;padding:4px 10px}}

#speaker-strip{flex-shrink:0}#speaker-avatar:empty{display:none}#speaker-avatar .avatar{width:30px;height:30px;flex:0 0 30px}.speaking #speaker-avatar{border-radius:50%;box-shadow:0 0 0 2px #48d6a4}#speaker{font-size:11px}#voice-connect{font-size:11px;padding:6px;min-height:36px}#mic.available{color:#48d6a4}#mic.waiting{color:#e8bd59}#mic.talking{background:#c93650;color:white}#room-tools #queue-button{flex:1 1 100px}.composer{flex-wrap:wrap}.composer textarea{flex:1 1 100px;min-width:90px}@media(max-width:600px){.composer #mic{order:1}.composer #mute{order:2}.composer #audio-settings{order:3}.composer #send{order:4}.chat-screen{height:calc(var(--visible-height,100dvh) - 190px)}.keyboard-open #speaker-strip{padding:3px 0}.keyboard-open #speaker-avatar{display:none}.keyboard-open #speaker{font-size:10px}.keyboard-open .composer button{min-width:32px;width:32px;min-height:36px}.keyboard-open .composer textarea{min-height:36px}}

@media(max-width:600px){.composer{gap:4px;flex-wrap:nowrap}.composer button{width:30px;min-width:30px;min-height:42px;padding:4px}.composer textarea{flex:1 1 70px;min-width:65px}.keyboard-open .composer button{width:30px;min-width:30px}}

@media(max-width:600px){#room-tools{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}#room-tools button{grid-column:span 2;min-width:0!important;font-size:11px;padding:6px 3px}#room-tools #queue-button,#room-tools #rules-button{grid-column:span 3}#room-tools:has(#room-admin:not([hidden])) button{grid-column:span 2}.composer textarea{height:42px;line-height:22px;padding:9px 7px;overflow-y:auto}.composer #mic,.composer #mute,.composer #audio-settings{font-size:17px}}

#voice-meter{display:flex;align-items:center;justify-content:center;gap:3px;height:26px;width:32px;flex:0 0 32px}#voice-meter i{display:block;width:3px;height:3px;border-radius:3px;background:#7591a5;transition:height 90ms ease,background 120ms ease}#voice-meter.active i{background:#48d6a4}@media(prefers-reduced-motion:reduce){#voice-meter i{transition:none}}

#room-tools{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;padding:6px 0}#room-tools button,#room-tools #queue-button{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:10px;font-size:12px}#room-tools svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#room-tools button[data-count]::after{content:attr(data-count);position:absolute;right:-2px;top:-3px;min-width:16px;height:16px;padding:0 3px;border-radius:8px;background:#24466a;color:#eef5ff;font-size:10px;line-height:16px}@media(max-width:600px){#room-tools{display:flex;gap:8px}#room-tools button,#room-tools #queue-button{flex:0 0 42px;width:42px;height:42px;min-height:42px;padding:9px}.keyboard-open #room-tools{display:none}}

.motion-emoji{display:inline-flex;width:24px;height:24px;vertical-align:middle;align-items:center;justify-content:center;transform-origin:50% 50%}.motion-emoji svg,.motion-emoji img{width:100%;height:100%;object-fit:contain}.emoji-play{animation:emoji-lift 1.2s ease-in-out 2}.emoji-play.heart{animation:emoji-heart 1.2s ease-in-out 2}.emoji-play.lean{animation:emoji-lean 1.2s ease-in-out 2}.emoji-play .emoji-eyes{transform-origin:50px 40px;animation:emoji-blink 2.4s linear 1}.emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(42px,1fr));gap:5px;margin-top:12px;max-height:45dvh;overflow:auto}.emoji-grid button{height:42px;padding:5px}.emoji-grid .motion-emoji{width:28px;height:28px}@keyframes emoji-lift{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2.5%) scale(1.035)}}@keyframes emoji-heart{0%,100%{transform:scale(1)}50%{transform:scale(1.1)}}@keyframes emoji-lean{0%,50%,100%{transform:rotate(0) scale(1)}25%{transform:rotate(-4deg) scale(1.035)}75%{transform:rotate(4deg) scale(1.035)}}@keyframes emoji-blink{0%,25%,34%,100%{transform:scaleY(1)}29%{transform:scaleY(.08)}}@media(prefers-reduced-motion:reduce){.motion-emoji,.motion-emoji .emoji-eyes{animation:none!important}}

.composer #mic svg,.composer #mute svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.composer #mic{color:#48d6a4}.composer #mic.waiting{color:#e8bd59}.composer #mic.talking{color:#fff}.composer #mute{color:#9fb2c9}.composer #mute.listening{color:#48d6a4}

.composer #mic{position:relative}.mic-level{position:absolute;inset:auto 4px 3px;display:flex;height:14px;gap:2px;align-items:center;justify-content:center;pointer-events:none}.mic-level i{width:2px;height:2px;border-radius:2px;background:#bdded1;transition:height 90ms ease}.mic-level.active i{background:#53efb1}.mic-level.clipping i{background:#ff7078}.composer #mic.talking{background:#183b32;border-color:#48d6a4}.composer #mic.talking svg{width:16px;height:16px;transform:translateY(-4px)}@media(prefers-reduced-motion:reduce){.mic-level i{transition:none}}

.messenger-actions{display:flex;flex-direction:column;gap:8px;flex:0 0 auto;align-items:stretch}.messenger-actions #presence{width:100%;min-width:100px}.friend-toolbar{display:flex;justify-content:flex-end;gap:8px}.friend-toolbar button,#friend-add-submit{width:44px;height:44px;padding:10px;display:flex;align-items:center;justify-content:center}.friend-toolbar svg,#friend-add-submit svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.friend-toolbar button[aria-expanded=true]{border-color:var(--blue);color:#78bdff}#friend-search{width:100%;margin-top:12px}#add-form{margin:12px 0 0}#add-form input{min-width:0}#messenger>.section-top{align-items:flex-start}

.room-heading{gap:10px;flex-wrap:wrap;align-items:center}.room-heading-text{flex:1 1 100px;min-width:0}.room-heading-text h2{overflow-wrap:anywhere}.room-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto}.room-header-actions #room-tools{padding:0;gap:6px}.room-header-actions #leave{width:42px;height:42px;padding:8px;flex-shrink:0}.room-header-actions #room-tools button,.room-header-actions #room-tools #queue-button{width:38px;height:38px;flex-basis:38px;min-height:38px;padding:8px}@media(max-width:600px){.room-heading{gap:6px}.room-heading-text{flex-basis:94px}.room-heading-text h2{font-size:18px}.room-heading-text p{font-size:10px}.room-header-actions{gap:7px}.room-header-actions #room-tools{gap:4px}.room-header-actions #room-tools button,.room-header-actions #room-tools #queue-button{width:30px;height:38px;flex-basis:30px;min-height:38px;padding:5px}.room-header-actions #room-tools svg{width:18px;height:18px}.room-header-actions #leave{width:32px;height:38px;min-height:38px;padding:5px}.keyboard-open .room-header-actions #room-tools{display:none}}@media(max-width:360px){.room-heading-text{flex-basis:100%}.room-header-actions{width:100%;justify-content:flex-end}}

.bottom-nav .home-link{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:8px 6px;border:1px solid var(--edge);border-radius:9px;background:var(--panel);color:var(--ink);font-size:12px}.home-link svg{width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.bottom-nav .home-link:hover{border-color:var(--blue)}

.bottom-nav button{position:relative}.bottom-nav button[data-unread]::after{content:attr(data-unread);position:absolute;right:3px;top:-7px;min-width:19px;height:19px;padding:0 4px;border-radius:10px;background:#2d91ff;color:white;font-size:10px;line-height:19px;font-weight:600}#connection-status{font-size:12px;line-height:1.4;padding:7px 10px;margin:6px 0;border:1px solid #65552a;border-radius:8px;background:#292519;color:#f6d88b}

.bottom-nav{align-items:stretch}.bottom-nav button,.bottom-nav .home-link{min-height:48px;font-size:12px;line-height:1.25}
/* Compact room composer: one aligned row, larger send target. */
.composer{align-items:center;gap:6px;flex-wrap:nowrap}
.composer button{height:44px;min-height:44px;width:36px;min-width:36px;padding:5px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.composer textarea{height:44px;min-height:44px;min-width:0;flex:1 1 0;padding:10px 8px;line-height:22px}
.composer #send{width:44px;min-width:44px;font-size:22px}
.composer #audio-settings{display:none}
@media(max-width:360px){.composer{gap:4px}.composer button{width:32px;min-width:32px}.composer #send{width:42px;min-width:42px}}
.keyboard-open .composer button{height:44px;min-height:44px}
.keyboard-open .composer #send{width:44px;min-width:44px}
/* Keep the conversation focused on messages and the composer. */
.chat-screen #message-counter,.chat-screen #composer-hint{display:none}

.room-activity{margin:5px 0;padding:3px 8px;font-size:12px;color:var(--muted);text-align:center}.message-row [role="button"]{cursor:pointer}

#reply-preview{display:flex;gap:8px;align-items:center;padding:6px 8px;border-left:3px solid var(--blue);background:var(--panel);border-radius:6px;font-size:12px}#reply-preview[hidden]{display:none}#reply-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#reply-cancel{min-height:30px;padding:3px 8px}#send[data-state="failed"]{border-color:#ffc17b}#send[data-state="sending"]{cursor:wait}.bubble[role="button"]{cursor:pointer}

.vuitalk-original-emoji{display:block;width:100%;height:100%;background-image:url(/assets/vuitalk-emoji-atlas-v1.png);background-size:400% 400%;background-repeat:no-repeat}.motion-emoji:has(.vuitalk-original-emoji){width:28px;height:28px}.emoji-grid .motion-emoji:has(.vuitalk-original-emoji){width:30px;height:30px}

#room-camera-toggle[aria-expanded="true"]{color:#78bdff;border-color:var(--blue)}

.panel-row .person-nick{display:flex;align-items:center;gap:6px;flex:1;min-width:0;text-align:left;border:0;background:none;padding:3px 0;font-size:13px;min-height:32px}.person-camera-badge{display:inline-flex;flex-shrink:0;color:#53d7aa}.person-camera-badge svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

#room-camera-toggle.camera-publishing{color:#53d7aa;border-color:#53d7aa}#room-camera-toggle.camera-publishing::after{content:"";position:absolute;right:3px;top:3px;width:5px;height:5px;border-radius:50%;background:#53d7aa}

#room-tools #bell.has-notice::after{content:"";position:absolute;right:3px;top:3px;width:5px;height:5px;border-radius:50%;background:#78bdff}
#speaker-strip{justify-content:center;text-align:center}#speaker-strip #speaker{flex:0 1 auto;text-align:center}#speaker-strip #voice-connect{flex-shrink:0}

.message-row .bubble,.message-row.own .bubble{background:transparent;border:0;border-radius:0;padding:3px 0}.message-heading{display:contents}.message-heading strong{display:inline;white-space:nowrap;margin-right:6px}.message-heading strong::after{content:':'}.message-heading small{display:block;float:right;margin:0 0 2px 10px;white-space:nowrap}.message-content{display:inline}.message-row{padding:5px 2px}
