/* Shared surface contract: all floating surfaces use the same material. */
:root{--surface-glass:rgba(241,245,250,.84);--surface-ink:#263448;--surface-muted:#526174;--surface-accent:var(--pg-accent);--surface-edge:rgba(255,255,255,.85);--surface-shadow:inset 0 1px 0 #ffffff80,0 18px 48px #15243b30}
body.dark{--surface-glass:rgba(30,40,56,.88);--surface-ink:#eef3fb;--surface-muted:#bcc9db;--surface-accent:var(--pg-accent);--surface-edge:rgba(190,210,240,.3);--surface-shadow:inset 0 1px 0 #ffffff14,0 18px 48px #0005}
body :is(dialog:not(#directory),#dm-board,#dm-profile-popover,#message-arrival-bubble,.editor-category-options,.editor-background-options,.unified-select-menu,.room-text-popover),body.dark :is(dialog:not(#directory),#dm-board,#dm-profile-popover,#message-arrival-bubble,.editor-category-options,.editor-background-options,.unified-select-menu,.room-text-popover){background:var(--surface-glass)!important;color:var(--surface-ink)!important;border-color:var(--surface-edge)!important;box-shadow:var(--surface-shadow)!important;backdrop-filter:blur(22px) saturate(115%)!important;-webkit-backdrop-filter:blur(22px) saturate(115%)!important;--room-ink:var(--surface-ink);--room-muted:var(--surface-muted);--room-blue:var(--surface-accent)}
:is(dialog:not(#directory),#dm-board,#dm-profile-popover,#message-arrival-bubble,.editor-category-options,.editor-background-options,.unified-select-menu,.room-text-popover) :is(small,footer,.arrival-copy span,.dm-time,.room-subtitle,.room-message time,.token-body footer,[role=status]){color:var(--surface-muted)!important}
:is(.editor-category-options,.editor-background-options,.unified-select-menu) button{color:var(--surface-ink)!important;text-shadow:none!important}
:is(.editor-category-options,.editor-background-options,.unified-select-menu) button:is(:hover,:focus-visible){background:#8096c52b!important;color:var(--surface-ink)!important}
:is(dialog:not(#directory),#dm-board,#dm-profile-popover,#message-arrival-bubble,.editor-category-options,.editor-background-options,.unified-select-menu,.room-text-popover) :is(input,textarea)::placeholder{color:var(--surface-muted)!important;opacity:1}
:is(dialog:not(#directory),#dm-board,#dm-profile-popover,#message-arrival-bubble,.editor-category-options,.editor-background-options,.unified-select-menu,.room-text-popover) button:not(:disabled):is(.room-icon-menu,.room-invite-close,.dm-profile-close,.create-close){color:var(--surface-muted)!important;opacity:1}
#message-arrival-bubble::before{background:var(--surface-glass)!important;border-color:var(--surface-edge)!important}
.party.custom-background::after{background:linear-gradient(180deg,rgba(8,17,29,.62),rgba(8,17,29,.72))!important}
.party.custom-background :is(h3,p,.meta,.party-category,.party-privacy){color:#fff!important;opacity:1}
.party .vacant{border-color:#73849c!important;color:#52647e!important;background:#f2f5fae0}
.party.custom-background .vacant{border-color:#d0dcf0!important;color:#fff!important;background:#1c2b42b8}
#party-window-dock .dock-custom .dock-card-face{background-image:linear-gradient(180deg,#101c32d9,#101c3270),var(--dock-photo)!important;color:#fff!important}
#party-window-dock .dock-card-face b{font-size:calc(11px * var(--pg-ts,1));line-height:1.45;text-shadow:none!important}
#party-window-dock .dock-card-title{display:none!important}

/* 2026-10-03 Claude: a closed custom select draws no menu (a closed 1,187 px menu pushed phone screens sideways), and an open one stays inside the screen. */
details.unified-select:not([open])>.unified-select-menu{display:none!important}
.unified-select-menu{max-width:calc(100vw - 24px)}
