/* TempChat 1.1.0 — native UI, no blur, no third-party font or emoji requests. */
.icon-button,.message-action,.random-name-button{box-sizing:border-box;display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px;aspect-ratio:1;padding:10px;flex:0 0 44px;line-height:1}
.icon-button svg,.message-action svg{display:block;width:22px;height:22px;flex:none;margin:auto;pointer-events:none}
.icon-button img{display:block;margin:auto}.button.primary,.icon-button.primary{background:var(--accent);color:var(--accent-ink)}
button,input,textarea,select,a{transition:background-color .18s,border-color .18s,color .18s,transform .18s}
button:hover:not(:disabled){filter:brightness(1.045)}button:active:not(:disabled){transform:translateY(1px)}
html:not([data-enhanced-focus="true"]) :is(input,textarea,select,button,a):focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--accent);border-color:var(--accent)}
html[data-enhanced-focus="true"] :focus-visible{outline:3px solid var(--accent)!important;outline-offset:3px!important}
html[data-high-contrast="true"]{--line:var(--ink)!important;--muted:var(--ink)!important}
html[data-high-contrast="true"] :is(.message-body,.social-person,.topic-button,.button,input,textarea,select){border:2px solid var(--ink)}
html[data-high-contrast="true"] .message-link{text-decoration:underline;text-decoration-thickness:2px}
.app-loader{position:fixed;inset:0;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:var(--bg);color:var(--ink);padding:24px;text-align:center}
body[data-surface="landing"] #chat-recents-toggle,body[data-surface="landing"] #profile-toggle,body[data-surface="landing"] #recent-rooms{display:none!important}
.welcome-actions{display:grid;gap:16px;align-content:center}.welcome-actions h2{font-size:2rem}.welcome-actions p{line-height:1.65}
#home-entry-slot[hidden]{display:none!important}body[data-surface="app"] #welcome-actions{display:none!important}
body[data-surface="app"] .brand-copy{display:none}.site-header{align-items:center}
#account-secret{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px;font-size:clamp(10px,2.6vw,14px);word-break:normal}
#account-secret>span{display:flex;gap:4px;min-width:0;align-items:center;overflow-wrap:anywhere}#account-secret small{font-size:.72em;color:var(--muted);font-variant-numeric:tabular-nums;flex:none}
#account-error:not([hidden]){color:#801e37;background:#f3c2cb;border:1px solid #ba526a;padding:14px;border-radius:14px;font-weight:600}
#account-complete{display:grid;gap:14px}#account-complete[hidden]{display:none}.account-tabs{margin-bottom:20px}
.status-editor{display:flex;align-items:center;gap:8px}.status-editor #identity-status{min-width:0;flex:1}.status-editor #identity-status-emoji{background:var(--surface);margin-right:-53px;z-index:1;flex:none}.status-editor #identity-status{padding-left:53px}
#identity-settings-form :is(select,input,textarea){margin-bottom:14px}#identity-settings-form .status-editor input{margin-bottom:0}
#identity-settings-form .status-editor{margin-bottom:20px}
.settings-page-button{display:flex;align-items:center;gap:16px}.settings-page-button>span:nth-child(2){flex:1;text-align:left}.settings-category-icon{display:grid;place-items:center;width:28px}.settings-category-icon svg{width:25px;height:25px}.settings-page-button>svg{width:20px;height:20px;flex:none}
.settings-heading,.fullscreen-heading,.room-dialog-heading,.public-profile-header{position:sticky;top:0;z-index:5;background:var(--paper)!important;color:var(--ink)}
.settings-heading h2,.fullscreen-heading h2,.room-dialog-heading h2{background:transparent!important}.catalog-selected{position:static!important;z-index:auto!important}
.settings-menu[open]{animation:settings-in .2s ease-out}.settings-pages>[data-settings-page]:not([hidden]){animation:settings-page-in .2s ease-out}
.settings-pages{overflow-x:hidden}.settings-pages form{display:grid;gap:10px}.settings-pages .status-editor{display:flex}.settings-extra{padding:20px}
.settings-pending{z-index:7;background:var(--paper)!important}.settings-extra form .button{margin-top:12px}
#settings-menu input[hidden]{display:none!important}#navigation-bottom{display:none}
#palette-carousel{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible!important;gap:10px;width:100%!important;padding:6px 2px}
#palette-window{overflow:visible!important}#palette-window::before,#palette-window::after{display:none!important}
#palette-carousel .color-choice{width:100%;height:auto;aspect-ratio:1;max-width:46px;min-width:0;min-height:0;margin:auto}
#mini-catalog-open{display:grid;place-items:center;color:var(--accent-ink)}#mini-catalog-open svg{width:22px;height:22px}
.random-theme{position:fixed;bottom:24px;right:24px;z-index:8;background:var(--accent);color:var(--button-ink)}
.theme-card-preview{background:var(--accent)}.theme-card{aspect-ratio:1}.background-motion-option{display:flex;align-items:center;gap:10px;margin-top:18px}
html[data-theme-category^="gradient"] .message.mine .message-body{background:var(--theme-gradient)!important}
html[data-theme-category^="gradient"] body{background-color:var(--bg)}
.chat-main{min-width:0;isolation:isolate}.chat-background{overflow:hidden;pointer-events:none}
.chat-background svg{position:absolute;inset:-22px;width:calc(100% + 44px);height:calc(100% + 44px);transform-origin:center;animation-duration:14s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-direction:alternate}
html[data-chat-background="cherry"] .chat-background svg{animation-name:petal-drift}
html[data-chat-background="paws"] .chat-background svg{animation-name:paw-breathe;animation-duration:10s}
html[data-chat-background="leaves"] .chat-background svg{animation-name:leaf-sway;animation-duration:12s}
html[data-chat-background="sea"] .chat-background svg{animation-name:sea-drift;animation-duration:13s}
html[data-chat-background="stars"] .chat-background svg{animation-name:star-twinkle;animation-duration:8s}
html[data-chat-background="dunes"] .chat-background svg{animation-name:dune-drift;animation-duration:16s}
html[data-chat-background="clouds"] .chat-background svg{animation-name:cloud-drift;animation-duration:20s}
html[data-chat-background="hearts"] .chat-background svg{animation-name:heart-float;animation-duration:12s}
html[data-background-motion="false"] .chat-background svg{animation:none!important}
html[data-background-paused="true"] .chat-background svg{animation-play-state:paused!important}
#preview-chat-background svg,.public-profile-color svg,.background-preview svg{animation:none!important}
#dm-shell{background:transparent}html[data-chat-background="none"] #dm-shell{background:transparent!important}html[data-chat-background="none"] #dm-background{display:none}
.message-list .message{display:flex;flex-direction:row;align-items:flex-start;width:max-content!important;max-width:82%!important;min-width:0!important;margin-left:0;margin-right:auto;gap:9px}
.message-list .message.mine{flex-direction:row-reverse;margin-left:auto;margin-right:0}
.message-list .message-content{width:max-content!important;max-width:100%!important;min-width:0;display:flex;flex-direction:column;align-items:flex-start;flex:0 1 auto}
.message-list .message.mine .message-content{align-items:flex-end}
.message-list .message-body{box-sizing:border-box;width:fit-content!important;min-width:92px!important;max-width:100%!important;padding:11px 14px;border:1px solid var(--line);font-size:var(--message-font-size,15px);line-height:1.55;overflow-wrap:anywhere;text-align:left}
.message-list .message.mine .message-text{text-align:right}.message-meta{max-width:100%;width:100%}.message-author{white-space:normal;overflow-wrap:anywhere}
.message-list .message-footer{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0;margin-top:-7px;position:relative;z-index:1}
.message-list .message-actions{display:flex;gap:4px;flex:0 0 auto;order:0;margin:0}
.message-list .message-reactions{display:flex!important;flex:1 1 0;order:1;min-width:0!important;max-width:100%;overflow-x:auto!important;overflow-y:hidden;justify-content:flex-start!important;gap:4px;padding:2px 1px 6px;scrollbar-width:thin;scroll-padding:2px;overscroll-behavior-x:contain}
.message-list .message.mine .message-reactions{order:0}.message-list .message.mine .message-actions{order:1}
.message-list .message-reactions:empty{min-width:0;padding:0}.message-list .message-action,.message-list .message-actions .icon-button{width:30px;height:30px;min-width:30px;min-height:30px;max-width:30px;max-height:30px;flex-basis:30px;padding:6px;border:1px solid var(--line);border-radius:99px;background:var(--paper)}
.message-list .message-action svg,.message-list .message-actions svg{width:16px;height:16px}
.reaction-chip{min-height:30px;flex:0 0 auto;white-space:nowrap;background:var(--paper);border:1px solid var(--line);border-radius:99px;padding:4px 9px}
.reaction-chip[aria-pressed="true"]{background:var(--surface);border-color:var(--accent)}
.message-list .message-time{display:block;font-size:10px;color:var(--muted);margin-top:3px;margin-bottom:8px;line-height:1.3;max-width:100%;text-align:left}.message.mine .message-time{text-align:right}
.message-list .reply-quote{align-self:flex-start;display:flex;flex-direction:column;max-width:min(100%,320px)!important;width:fit-content!important;min-width:0;border:1px solid var(--line);border-left:3px solid var(--accent);padding:7px 10px;margin:0 0 7px;background:var(--surface);border-radius:15px;text-align:left;line-height:1.35}
.message.mine .reply-quote{align-self:flex-end}.reply-author{white-space:normal!important;overflow-wrap:anywhere;font-size:11px;font-weight:650;max-width:100%}.reply-excerpt{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;font-size:12px;color:var(--muted)}
.message-arriving{animation:message-in .22s cubic-bezier(.2,.8,.2,1)}.message-highlight .message-body{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.composer{background:var(--paper)}.composer-row{display:flex;align-items:flex-end;gap:8px;min-width:0}.composer-row textarea{box-sizing:border-box;min-height:44px;max-height:140px;flex:1;min-width:0;padding:11px 12px;line-height:20px}.composer-row .icon-button{height:44px;min-height:44px}
.composer .reply-preview{grid-column:1/-1;display:flex;align-items:center;gap:8px}.reply-preview[hidden]{display:none!important}.reply-preview>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer-meta :is(span,button){min-height:24px;height:auto;display:inline-flex;align-items:center;justify-content:center;line-height:1.2;border-radius:99px;font-size:10px;padding:4px 16px;margin:0}
.social-person{display:flex!important;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:17px;min-width:0}.social-person[hidden]{display:none!important}
.social-person-text{flex:1!important;min-width:0!important}.social-person-text strong{display:block;overflow-wrap:anywhere}.social-person-text small{display:block;font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}.social-card-actions{display:flex!important;flex:0 0 auto;align-items:center;margin-left:auto!important;gap:6px}
#nav-profile-dock{position:relative;display:grid;grid-template-columns:minmax(0,1fr);width:100%}#nav-profile-dock #profile-toggle{max-width:none;max-height:none;width:100%;height:auto;min-height:64px;display:flex;justify-content:flex-start;gap:12px;background:none}
#nav-status-toggle{position:absolute;left:40px;top:37px;width:14px;height:14px;min-width:14px;min-height:14px;padding:0}.profile-custom-status{display:block;font-size:14px!important;line-height:1.5;max-width:100%;padding:0 12px 10px 54px;overflow-wrap:anywhere}.profile-custom-status:empty{display:none}
.nav-profile-card{padding:5px;background:var(--surface);border:1px solid var(--line);border-radius:18px;margin:12px}.navigation-profile-name{font-size:14px!important;white-space:normal;overflow-wrap:anywhere;text-align:left}
#nav-settings-dock{display:none!important}.navigation-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0}.navigation-tabs svg{width:21px;height:21px}.navigation-tabs{flex-shrink:0}
#recents-drawer[open]{animation:drawer-in .25s cubic-bezier(.2,.7,.2,1)}.navigation-drawer .navigation-body{min-height:0;flex:1;overflow-y:auto}.navigation-drawer #mobile-profile-dock{order:8}.navigation-drawer .navigation-tabs{order:9;padding-bottom:max(10px,env(safe-area-inset-bottom))}
.user-profile-dialog[open],#contacts-dialog[open]{animation:sheet-in .24s ease-out}.user-profile-dialog{transition:height .25s,border-radius .25s;overflow:hidden;max-height:90dvh}.user-profile-dialog.expanded{height:100dvh;max-height:100dvh;border-radius:0}
.public-profile-scroll{overflow:auto;min-height:0;overscroll-behavior:contain}.public-profile-color{height:125px;position:relative;overflow:hidden;background:var(--surface)!important;color:var(--accent)}.public-profile-color svg{width:100%;height:100%;position:absolute;inset:0}
.public-profile-content{position:relative;padding-top:0}.public-profile-content>#user-profile-avatar{margin-top:-36px;margin-bottom:15px;position:relative;z-index:2;width:80px;height:80px}.public-profile-content>#user-profile-avatar .avatar{width:80px;height:80px;border:5px solid var(--paper);border-radius:50%}
#user-profile-avatar>.avatar-wrap{width:80px;height:80px}#user-profile-custom{font-size:16px}.public-profile-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.public-profile-actions #user-profile-settings{margin-left:auto}
#contacts-dialog{height:72dvh;max-height:92dvh;display:flex;flex-direction:column;padding:0}#contacts-dialog:not([open]){display:none}#contacts-dialog.expanded{height:100dvh;max-height:100dvh}.contacts-search{margin:0 0 18px}.contacts-search input{flex:1;min-width:0}#contacts-body{overflow:auto;min-height:0}
#new-room-dialog{max-width:600px;max-height:95dvh;padding:0;overflow:auto}.new-room-dialog .action-card{margin:0;padding:0;border:0;background:transparent}.new-room-dialog .dialog-content{padding:22px}.new-room-dialog .room-dialog-heading{padding:20px}
.room-embed{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px 12px;min-width:min(240px,100%);max-width:320px;text-align:left;white-space:normal;padding:12px;background:var(--paper);border:1px solid var(--line);border-radius:14px;margin:10px 0 0}.room-embed img{width:40px;height:40px;grid-row:1/3}.room-embed strong{font-size:14px}.room-embed p,.room-embed small{margin:0;font-size:12px;grid-column:2}.room-embed .button{grid-column:1/-1;min-height:36px;padding:8px;text-align:center}
.copied-feedback{position:fixed;z-index:20000;transform:translate(-50%,-100%);padding:6px 10px;border-radius:99px;background:var(--ink);color:var(--paper);font-size:12px;pointer-events:none;animation:copy-up 1.45s ease both}
.mute-options{display:grid;gap:10px}.positive-text{color:var(--success,#246c56)}.feedback-admin-card{padding:16px;border:1px solid var(--line);border-radius:18px;margin:14px 0;overflow-wrap:anywhere}.feedback-admin-card pre{white-space:pre-wrap;font:inherit;line-height:1.6}.admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.admin-tabs button[aria-selected="true"]{background:var(--accent);color:var(--accent-ink)}.feedback-admin-filters{display:flex;gap:10px;flex-wrap:wrap}.feedback-admin-filters>*{min-width:130px;flex:1}.admin-feedback-meta{font-size:12px;color:var(--muted)}
@media(max-width:1099px){
 .navigation-drawer{display:flex;flex-direction:column}.navigation-drawer:not([open]){display:none}.navigation-drawer .fullscreen-heading{flex:none}.navigation-drawer .navigation-tabs{position:static;margin-top:0}.navigation-drawer #mobile-profile-dock{flex:none}
 .settings-menu{inset:0;width:100%;height:100dvh;max-height:100dvh;max-width:none;border-radius:0;margin:0;box-sizing:border-box}.settings-pages{min-height:0}
 body.account-navigation #recents-drawer{inset:0;width:100%;max-width:100%;height:var(--chat-viewport-height,100dvh);max-height:100dvh;border-radius:0}
 body[data-surface="app"] #settings-picker>button,body[data-surface="app"] .header-controls>#profile-toggle{display:none}
 .user-profile-dialog.expanded{inset:0;margin:0;width:100%;max-width:100%}.message-list{padding-left:12px;padding-right:12px}.message-list .avatar-wrap,.message-list>.message>.avatar{flex:0 0 28px;width:28px;height:28px}.message-list .avatar{width:28px;height:28px}
 .message-list .message-content{max-width:calc(100% - 37px)!important}.message-list .message{max-width:86%!important}.message-list .message-body{font-size:var(--message-font-size,15px)}
 #dm-shell{height:100%;min-height:0;display:flex;flex-direction:column}#dm-shell[hidden]{display:none}.dm-active #home-workspace{display:flex;flex:1;min-height:0}.dm-active main{display:flex;flex:1;min-height:0;padding:0}.dm-active{height:var(--chat-viewport-height,100dvh);overflow:hidden;display:flex;flex-direction:column}.dm-active #dm-scroll{flex:1;min-height:0}.dm-active .site-footer{display:none}.dm-active .composer{flex:none}.dm-active #dm-custom-status{margin:0;padding:8px 16px;background:var(--paper);font-size:15px}
 .chat-main .chat-heading{padding:14px}.user-profile-dialog{max-width:calc(100% - 20px);width:100%;padding:0}.public-profile-content{padding-left:20px;padding-right:20px}.room-dialog-heading{padding:16px;gap:12px}
}
@media(min-width:1100px){
 .message-list>.message{max-width:min(76%,600px)!important}.message-list .message-content{max-width:560px!important}.message-list .message-body{max-width:560px!important}
 .rail-heading{display:flex;align-items:center;justify-content:center;min-height:64px}.left-expanded .rail-heading,.right-expanded .rail-heading{justify-content:space-between}.rail-left .rail-tabs{margin:0!important}.rail-left .rail-tabs[hidden]{display:none}
 .desktop-workspace:not(.left-expanded) .rail-left .rail-tabs{display:none!important}.desktop-workspace:not(.right-expanded) .rail-right .rail-tabs{display:none!important}
 .background-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important}.background-dialog .catalog-content{max-width:1100px;margin:auto}
 .new-room-dialog{width:min(600px,calc(100% - 48px))}.user-profile-dialog{max-width:520px}#contacts-dialog{max-width:620px;width:calc(100% - 48px)}
}
@keyframes drawer-in{from{transform:translateX(-100%);opacity:.4}to{transform:translateX(0);opacity:1}}
@keyframes sheet-in{from{transform:translateY(45px);opacity:.5}to{transform:translateY(0);opacity:1}}
@keyframes settings-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}
@keyframes settings-page-in{from{opacity:.5;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
@keyframes message-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes copy-up{0%{opacity:0;translate:0 5px}20%{opacity:1;translate:0 -8px}80%{opacity:1}100%{opacity:0;translate:0 -18px}}
@keyframes petal-drift{0%,100%{transform:translate(-10px,-10px) rotate(-1deg)}50%{transform:translate(12px,12px) rotate(1deg)}}
@keyframes paw-breathe{0%,100%{transform:translateY(6px)}50%{transform:translateY(-7px)}}
@keyframes leaf-sway{0%,100%{transform:translateX(-6px) rotate(-2deg)}50%{transform:translateX(6px) rotate(2deg)}}
@keyframes sea-drift{0%,100%{transform:translate(-12px,-4px)}50%{transform:translate(12px,5px)}}
@keyframes star-twinkle{0%,100%{transform:translateY(-4px)}50%{transform:translateY(4px)}}
@keyframes dune-drift{0%,100%{transform:translate(-10px,-5px)}50%{transform:translate(10px,5px)}}
@keyframes cloud-drift{0%,100%{transform:translateX(-18px)}50%{transform:translateX(18px)}}
@keyframes heart-float{0%,100%{transform:translateY(9px) scale(.99)}50%{transform:translateY(-9px) scale(1.01)}}
html[data-reduce-motion="true"] :is(.message-arriving,.user-profile-dialog,.settings-menu,.navigation-drawer,.settings-pages>section,.copied-feedback){animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.message-arriving,.user-profile-dialog,.settings-menu,.navigation-drawer,.settings-pages>section,.copied-feedback{animation:none;transition:none}}
/* An explicit background opt-in can override reduced motion for backgrounds only. */
html[data-background-motion="true"] .chat-background svg{animation-duration:14s!important;animation-iteration-count:infinite!important;animation-direction:normal!important;animation-timing-function:ease-in-out!important}
html[data-background-motion="true"][data-chat-background="cherry"] .chat-background svg{animation-name:petal-drift!important}
html[data-background-motion="true"][data-chat-background="paws"] .chat-background svg{animation-name:paw-breathe!important;animation-duration:10s!important}
html[data-background-motion="true"][data-chat-background="leaves"] .chat-background svg{animation-name:leaf-sway!important;animation-duration:12s!important}
html[data-background-motion="true"][data-chat-background="sea"] .chat-background svg{animation-name:sea-drift!important;animation-duration:13s!important}
html[data-background-motion="true"][data-chat-background="stars"] .chat-background svg{animation-name:star-twinkle!important;animation-duration:8s!important}
html[data-background-motion="true"][data-chat-background="dunes"] .chat-background svg{animation-name:dune-drift!important;animation-duration:16s!important}
html[data-background-motion="true"][data-chat-background="clouds"] .chat-background svg{animation-name:cloud-drift!important;animation-duration:20s!important}
html[data-background-motion="true"][data-chat-background="hearts"] .chat-background svg{animation-name:heart-float!important;animation-duration:12s!important}

body[data-bottom-tabs=true] .navigation-drawer .navigation-tabs{order:9}#nav-profile-dock .avatar-wrap{flex:0 0 38px;width:38px;height:38px}#nav-profile-dock .avatar-wrap>img{width:38px;height:38px}#nav-profile-dock .avatar-wrap #nav-status-toggle{position:absolute;left:auto;right:-2px;top:auto;bottom:-1px;width:13px;height:13px;min-width:13px;min-height:13px;box-shadow:0 0 0 3px var(--surface)}

.message-list .message>.avatar-wrap,.message-list .message>.avatar{position:relative!important;inset:auto!important;flex:0 0 32px;width:32px;height:32px}.message-list .message>.avatar-wrap .avatar{width:32px;height:32px}.message-list .message-content:has(.reaction-chip){min-width:min(240px,63vw)}.message-list .message-content:has(.reaction-chip) .message-body{width:100%!important}
#recents-drawer .recent-heading,.rail-left .recent-heading{display:none}#recents-drawer .recent-rooms{margin-top:0;padding-top:0;border-top:0}

.chat-heading{flex-wrap:nowrap;align-items:center}.chat-title{flex:1;min-width:0}.chat-heading-actions{flex-direction:row;flex-wrap:nowrap;align-items:center;flex:0 0 auto;width:auto}.chat-heading-actions .status-pill{white-space:nowrap}
.button.primary,.icon-button.primary,.composer .send-button{color:var(--button-ink,#293038)}
.message-list .message.reply,.message-list .message.reply.mine{display:flex!important;width:max-content!important;min-width:0;max-width:82%!important;margin-left:0;margin-right:auto;gap:9px}.message-list .message.reply.mine{flex-direction:row-reverse;margin-left:auto;margin-right:0}
@media(min-width:1100px){.message-list .message.reply,.message-list .message.reply.mine{max-width:min(76%,600px)!important}.desktop-workspace:not(.left-expanded) .rail-left .discussion-heading,.chat-layout:not(.left-expanded) .rail-left .discussion-heading{display:none}.desktop-workspace:not(.right-expanded) .rail-right .social-card-actions,.chat-layout:not(.right-expanded) .rail-right .social-card-actions{display:none!important}.rail-left:not(:has([aria-expanded=true])) .discussion-heading{display:none}}
@media(max-width:1099px){.message-list .message.reply,.message-list .message.reply.mine{max-width:86%!important}.chat-heading-actions .status-pill{font-size:9px;padding:6px 8px}.chat-heading h1{font-size:20px}}

html[data-background-motion="false"] .ambient-waves .wave-layer{animation:none!important;will-change:auto!important}
html[data-background-motion="true"][data-waves-visible="true"] .ambient-waves .wave-layer{animation-name:wave-drift!important;animation-timing-function:ease-in-out!important;animation-iteration-count:infinite!important;animation-direction:alternate!important}
html[data-background-motion="true"][data-waves-visible="true"] .wave-one{animation-duration:18s!important}html[data-background-motion="true"][data-waves-visible="true"] .wave-two{animation-duration:24s!important;animation-direction:alternate-reverse!important}html[data-background-motion="true"][data-waves-visible="true"] .wave-three{animation-duration:30s!important}
html[data-background-paused="true"] .ambient-waves .wave-layer{animation-play-state:paused!important}
.participant-moderation{display:none!important}
:root{--control-size:44px}
html .icon-button,html .dialog-close,html .random-name-button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;box-sizing:border-box}
html .message-actions .icon-button{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-width:30px!important;max-height:30px!important}
html #nav-profile-dock #profile-toggle{width:100%!important;height:auto!important;max-width:none!important;max-height:none!important;min-height:54px!important}
html #nav-profile-dock #nav-status-toggle{width:13px!important;height:13px!important;min-width:13px!important;min-height:13px!important;max-width:13px!important;max-height:13px!important}
.room-dialog-heading>.dialog-close,.fullscreen-heading>.dialog-close,.settings-heading>.dialog-close{position:relative;z-index:2;flex:none}.room-dialog-heading>h2,.fullscreen-heading>h2,.settings-heading>h2{min-width:0;max-width:calc(100% - 56px);overflow-wrap:anywhere}

.copied-feedback{border:0;margin:0;width:max-content;right:auto;bottom:auto;overflow:visible}
#dm-shell .room-identity>div{min-width:0;flex:1}#dm-shell .dm-avatar-wrap{flex:0 0 40px}#dm-name{min-width:0;overflow-wrap:anywhere}.room-title-line{min-width:0}.room-title-line h1{min-width:0;overflow-wrap:anywhere}
@media(max-width:1099px){body.dm-active{width:100%;max-width:100vw}.dm-active main,.dm-active #home-workspace,.dm-active #dm-shell{width:100%;max-width:100%;min-width:0}.dm-active #dm-shell>.chat-heading{width:100%;box-sizing:border-box}.dm-active #dm-shell>.chat-heading>.icon-button{flex:none}}
.user-profile-dialog[data-profile-theme="fixed"],.user-profile-dialog[data-profile-theme="sync"]{background:var(--paper)!important;color:var(--ink)!important}.user-profile-dialog[data-profile-theme="fixed"] .public-profile-header,.user-profile-dialog[data-profile-theme="sync"] .public-profile-header{background:var(--paper)!important}

html:not([data-enhanced-focus="true"]) :is(input,textarea,select,button,a):focus-visible{box-shadow:none;border-color:var(--accent)}html:not([data-enhanced-focus="true"]) .avatar-option input:focus-visible+.avatar-choice,html:not([data-enhanced-focus="true"]) .room-icon-choice:has(input:focus-visible){outline:none;box-shadow:none;border-color:var(--accent)}body[data-page="admin"] #profile-toggle{display:none}

.message-highlight .message-body{outline:none;box-shadow:none;border-color:var(--accent)}

/* 1.1.1: shared navigation cards, stable surfaces and bottom sheets. */
#mobile-participants-dock>.dialog-content,#rail-participants-panel>.dialog-content{padding:0}
.navigation-body .participant-list{margin:0;padding:0;gap:12px}
.navigation-body .participant-list li{flex-wrap:nowrap;margin:0;width:100%;padding:12px}
.navigation-body .participant-list .participant-name{min-width:0;overflow-wrap:anywhere}
#nav-profile-dock #profile-toggle{padding:8px!important;aspect-ratio:auto;align-items:center;overflow:visible}
#nav-profile-dock .avatar-wrap{position:relative;flex:0 0 48px;width:48px;height:48px;overflow:visible;border-radius:50%}
#nav-profile-dock .avatar-wrap>img{width:48px;height:48px;margin:0!important;border-radius:50%;clip-path:none}
#nav-profile-dock .avatar-wrap #nav-status-toggle{right:0;bottom:0;left:auto;top:auto;display:block;border-radius:50%;box-shadow:none;background:none}
#nav-profile-dock #nav-status-toggle::before{display:block;width:14px;height:14px;box-sizing:border-box;border:2px solid var(--surface);box-shadow:none}
.nav-profile-text{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center;gap:4px;text-align:left}
.nav-profile-text .navigation-profile-name{padding:0;line-height:1.35;flex:none!important}
.nav-profile-text .profile-custom-status{margin:0;padding:0;text-align:left;line-height:1.35;font-size:14px!important}
#recents-drawer.navigation-initial[open]{animation:none!important}
.app-loader{opacity:1;transition:opacity .18s ease}
.app-loader-ready{opacity:0;pointer-events:none}
#user-profile-close{margin-left:auto}
.user-profile-dialog,#contacts-dialog{transition:height .42s cubic-bezier(.22,.8,.25,1),max-height .42s cubic-bezier(.22,.8,.25,1),border-radius .42s ease}
#contacts-dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:min(620px,100%);height:72dvh;max-height:92dvh;border-radius:26px 26px 0 0;box-sizing:border-box}
#contacts-dialog.expanded{height:100dvh;max-height:100dvh;border-radius:0}
html[data-theme-category^="gradient"] body{background:var(--theme-gradient);background-attachment:fixed}
html[data-theme-category^="gradient"] :is(.chat-main,#dm-shell){background:var(--theme-gradient)!important}
html[data-theme-category^="gradient"] .site-header{background:var(--paper)!important}
html[data-theme-category^="gradient"] :is(.chat-timeline,#dm-scroll){background:transparent!important}
.composer-meta .message-counter::before,.composer-meta #dm-count::before{content:'';width:14px;height:14px;flex:0 0 14px;background:currentColor;-webkit-mask:url("/assets/ui-icons/messages.svg") center/contain no-repeat;mask:url("/assets/ui-icons/messages.svg") center/contain no-repeat}
.composer-meta .character-counter::before,.composer-meta #dm-chars::before{content:'Aa';font-size:12px;font-weight:650;line-height:1}
.composer-meta :is(.message-counter,#dm-count,.character-counter,#dm-chars){gap:6px}
@media(min-width:1100px){
 .desktop-workspace:not(.left-expanded) #nav-profile-dock #profile-toggle,.chat-layout:not(.left-expanded) #nav-profile-dock #profile-toggle{justify-content:center!important;padding:0!important}
 .desktop-workspace:not(.left-expanded) .nav-profile-text,.chat-layout:not(.left-expanded) .nav-profile-text{display:none}
 .desktop-workspace:not(.left-expanded) #nav-profile-dock .avatar-wrap,.chat-layout:not(.left-expanded) #nav-profile-dock .avatar-wrap{flex-basis:36px;width:36px;height:36px}
 .desktop-workspace:not(.left-expanded) #nav-profile-dock .avatar-wrap>img,.chat-layout:not(.left-expanded) #nav-profile-dock .avatar-wrap>img{width:36px;height:36px}
}

#nav-profile-dock .avatar-wrap{align-self:center}

.participant-list .social-person-text .participant-name{display:block;font-weight:650;overflow-wrap:anywhere}
.participant-list .social-person-text .presence-status{display:block;margin:4px 0 0!important;font-size:12px}
.participant-list .participant-role:empty{display:none}
.participant-list .participant-role{flex:none;font-size:10px;color:var(--muted)}
@media(min-width:1100px){
 .right-expanded #rail-participants-panel .participant-list li{border:1px solid var(--line);border-radius:17px;padding:12px;flex-wrap:nowrap;gap:10px;background:var(--surface)}
 .right-expanded #rail-participants-panel>.dialog-content{padding:10px}
 .chat-layout:not(.right-expanded) .rail-right .social-person-text{display:none}
}

.left-expanded .nav-profile-text .profile-custom-status{display:block}

/* Demonstration controls use the live visual rules, without accepting input. */
.preview-chat :is(button,textarea):disabled{opacity:1;cursor:default}
.preview-chat .avatar-wrap{cursor:default}

/* 1.1.4 — one field border, explicit page navigation, edge-to-edge workspace. */
html :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),textarea,select):focus{outline:none!important;outline-width:0!important;box-shadow:none!important;border-color:var(--accent-ink)}
html[data-enhanced-focus="true"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),textarea,select):focus-visible{outline:none!important;outline-width:0!important;box-shadow:none!important;border:2px solid var(--ink)!important}
#topic-form{padding:16px;min-width:0}
#topic-form>input{width:100%;max-width:100%;min-width:0}
.settings-pages .settings-row .settings-chevron{display:inline-grid;background:var(--surface)}
.settings-pages .settings-row .settings-chevron svg{transform:rotate(-90deg)}
.language-options{grid-template-columns:1fr}
.language-options button{justify-content:flex-start;gap:12px}
.language-option-flag{font-size:24px;line-height:1;flex:none}
.language-option-label{min-width:0;overflow-wrap:anywhere}
.language-option-check{margin-left:auto;visibility:hidden}
.language-options button[aria-pressed="true"] .language-option-check{visibility:visible}
@media(min-width:1100px){
 body.desktop-workspace-active{display:flex;flex-direction:column;height:var(--chat-viewport-height,100dvh);min-height:0;overflow:hidden}
 body.desktop-workspace-active .site-header{flex:none;width:100%;max-width:none;margin:0;padding-inline:24px;background:var(--paper);border-bottom:1px solid var(--line)}
 body.desktop-workspace-active main{display:flex;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:0}
 body.desktop-workspace-active :is(.chat-layout,.desktop-workspace){flex:1;min-width:0;min-height:0!important;height:100%!important;gap:0}
 body.desktop-workspace-active :is(.chat-layout,.desktop-workspace)>*{min-width:0;min-height:0}
 body.desktop-workspace-active .desktop-rail{border:0!important;border-radius:0!important}
 body.desktop-workspace-active .rail-left{border-right:1px solid var(--line)!important}
 body.desktop-workspace-active .rail-right{border-left:1px solid var(--line)!important}
 body.desktop-workspace-active :is(.chat-main,#dm-shell,.workspace-empty){height:100%!important;min-height:0!important;border:0;border-radius:0}
 body.desktop-workspace-active .site-footer{display:none}
 .desktop-rail #social-content{padding:9px}
 .settings-menu[open][data-current-page="language"]{height:auto;min-height:0;max-height:calc(100dvh - 48px)}
 .settings-menu[data-current-page="language"] .settings-pages{flex:0 1 auto}
 .settings-menu[data-current-page="language"] .language-options{padding:0}
}

/* 1.1.5: closing keeps the modal/top layer alive until the transition finishes. */
#recents-drawer[data-ui-closing="true"]{animation:tc-close-drawer .18s ease-in both!important}
:is(#user-profile-dialog,#contacts-dialog)[data-ui-closing="true"]{animation:tc-close-sheet .18s ease-in both!important}
:is(#settings-menu,#profile-dialog,#emoji-dialog,#theme-catalog-dialog,#background-dialog,#appearance-preview-dialog,#add-contact-dialog,#new-room-dialog)[data-ui-closing="true"]{animation:tc-close-panel .16s ease-in both!important}
:is(#profile-dialog,#emoji-dialog,#theme-catalog-dialog,#background-dialog,#appearance-preview-dialog,#add-contact-dialog,#new-room-dialog)[open]:not([data-ui-closing="true"]){animation:settings-in .2s ease-out}
#settings-menu[data-page-direction="back"] .settings-pages>[data-settings-page]:not([hidden]){animation-name:tc-page-back}
@keyframes tc-close-drawer{to{translate:-100% 0;opacity:0}}
@keyframes tc-close-sheet{to{translate:0 45px;opacity:0}}
@keyframes tc-close-panel{to{scale:.985;opacity:0}}
@keyframes tc-page-back{from{opacity:.5;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}
@media(min-width:1100px){
 #rail-recents-panel>.discussion-heading{padding:9px;gap:12px;box-sizing:border-box}
}
html[data-reduce-motion="true"] :is(#profile-dialog,#emoji-dialog,#theme-catalog-dialog,#background-dialog,#appearance-preview-dialog,#add-contact-dialog,#new-room-dialog,#contacts-dialog),html[data-reduce-motion="true"] dialog[data-ui-closing="true"]{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){
 :is(#profile-dialog,#emoji-dialog,#theme-catalog-dialog,#background-dialog,#appearance-preview-dialog,#add-contact-dialog,#new-room-dialog,#contacts-dialog),dialog[data-ui-closing="true"]{animation:none!important;transition:none!important}
}
dialog[data-ui-closing="true"]{pointer-events:none}

/* 1.1.6 — a field and its actions share one border, never a hit area. */
html .field-actions{display:flex;align-items:center;gap:0;position:relative;min-width:0;min-height:48px;max-width:100%;padding:1px;border:1px solid var(--line);border-radius:11px;background:var(--paper)}
html .field-actions:focus-within{border-color:var(--accent-ink)}
html .field-actions>input{flex:1;width:0;min-width:0;min-height:44px;height:auto;line-height:1.5;margin:0!important;padding:10px 12px!important;background:transparent;border:0!important;border-radius:9px;box-shadow:none!important;outline:none!important}
html .field-actions>input:focus,html[data-enhanced-focus="true"] .field-actions :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),textarea,select):focus-visible{border:0!important;outline:none!important;box-shadow:none!important}
html .field-actions>.icon-button,html .status-editor.field-actions>#identity-status-emoji{position:static!important;inset:auto!important;transform:none!important;translate:none!important;flex:0 0 44px;min-width:44px;max-width:44px;width:44px;min-height:44px;max-height:44px;height:44px;margin:0!important;padding:0;border:0;border-radius:8px;background:var(--surface);color:var(--accent-ink)}
html .field-actions>.icon-button:focus-visible{outline:2px solid var(--accent-ink);outline-offset:-3px;box-shadow:none}
html[data-enhanced-focus="true"] .field-actions>.icon-button:focus-visible{outline:2px solid var(--ink)!important;outline-offset:-3px!important;box-shadow:none!important}
html .field-actions>.icon-button[aria-busy="true"]{cursor:progress}
html[data-enhanced-focus="true"] .field-actions:focus-within,html[data-high-contrast="true"] .field-actions{border:2px solid var(--ink);padding:0}
/* Apply alpha to the painted surface alone. Text and controls retain their opacity. */
:root{--chat-chrome-color:color-mix(in srgb,var(--accent) 70%,var(--paper));--chat-chrome-bg:color-mix(in srgb,var(--chat-chrome-color) 60%,transparent)}
:root[data-theme="dark"],:root[data-theme="night"]{--chat-chrome-color:color-mix(in srgb,var(--accent) 34%,var(--paper))}
.chat-main>.chat-heading,.chat-main>.room-topic-zone,.chat-main>.chat-subheading,.chat-main>.room-composer,#dm-shell>.chat-heading,#dm-form{background:var(--chat-chrome-bg)!important}
/* The same shared room components are used by the theme preview. */
.site-header{background:var(--paper)}
#chat-participants-toggle{display:none}
.settings-pending.pending-reminder{box-shadow:inset 0 0 0 2px var(--accent-ink);animation:tc-pending-reminder .34s ease-out}
#diagnostic-content{resize:vertical;min-height:175px;margin-block:12px;font-family:ui-monospace,monospace;font-size:14px;line-height:1.6}
#diagnostic-status{margin-top:12px}
.language-option-check svg{display:block}
@keyframes tc-pending-reminder{25%{translate:-3px 0}50%{translate:3px 0}75%{translate:-2px 0}}
@keyframes tc-open-right{from{translate:100% 0;opacity:0}to{translate:0 0;opacity:1}}
@keyframes tc-close-right{to{translate:100% 0;opacity:0}}
@media(max-width:1099px){
 body.chat-active .site-header>#chat-participants-toggle{display:grid;grid-column:3;grid-row:1;justify-self:end}
 #participants-dialog.participants-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(480px,100vw);max-width:100vw;height:var(--chat-viewport-height,100dvh);max-height:100dvh;padding:0;border:0;border-left:1px solid var(--line);border-radius:0;background:var(--paper);overflow:hidden;overscroll-behavior:contain}
 #participants-dialog.participants-drawer[open]{display:flex;flex-direction:column;animation:tc-open-right .25s cubic-bezier(.2,.7,.2,1)}
 #participants-dialog.participants-drawer>.room-dialog-heading{flex:none;border-bottom:1px solid var(--line);padding:18px 16px}
 #participants-dialog.participants-drawer>.dialog-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px}
 #participants-dialog[data-ui-closing="true"]{animation:tc-close-right .18s ease-in both!important}
}
html[data-reduce-motion="true"] :is(#participants-dialog,.settings-pending.pending-reminder){animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){:is(#participants-dialog,.settings-pending.pending-reminder){animation:none!important;transition:none!important}}
