/* ONEHUB / Atelier UI — v0.12.1
   A visual-only enhancement layer. No fonts, frameworks, images, animation loops,
   canvas, telemetry or new requests. Source-of-truth controls remain in index.html.
*/
:root {
  color-scheme:dark;
  --dark:#0a0c12;
  --side:#11141d;
  --chat:#151923;
  --line:#292e3b;
  --text:#f1f1f7;
  --muted:#9398a9;
  --cyan:#9b8df5;
  --pink:#c3adff;
  --premium:#ae9af7;
  --premium-soft:rgba(174,154,247,.12);
  --success:#80dbbd;
  --control:#222634;
  --control-border:#343949;
  --card:#1a1e2a;
  font: 13px/1.5 'Segoe UI Variable','Segoe UI',system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}
html,body {height:100%;min-height:100%;background:#0a0c12;color:var(--text)}
body {font-size:13px;letter-spacing:.003em}
button,input,textarea,select {font:inherit}
button {color:inherit;touch-action:manipulation}
button:focus-visible,summary:focus-visible,a:focus-visible,
input:focus-visible,textarea:focus-visible,select:focus-visible {outline:2px solid #c7b7ff;outline-offset:2px}
button:hover {filter:none}
button:disabled {opacity:.46;cursor:not-allowed}
::selection {background:#554c7f;color:#fff}
* {scrollbar-width:thin;scrollbar-color:#35394a transparent}
input,textarea,select {background:#171b26!important;color:#f4f2fc!important;border:1px solid #343848!important;border-radius:10px!important;min-height:38px;outline:none}
input::placeholder,textarea::placeholder {color:#7f8496}
input:focus,textarea:focus,select:focus {border-color:#9284e5!important;box-shadow:0 0 0 3px rgba(165,147,246,.11)}
input[type=checkbox],input[type=range] {min-height:auto;accent-color:#b3a1fb}
button:not(.primary):not(.send):active {opacity:.84}
.eyebrow,.section-label {letter-spacing:.15em;font-weight:750;color:#858b9e;font-size:10px}
.muted,.aside-tip {color:#858b9d}

/* Authentication / entrance */
.auth {grid-template-columns:minmax(0,1.12fr) minmax(390px,.88fr);min-height:100vh;
 background:radial-gradient(circle at 22% 40%,rgba(135,106,224,.13),transparent 34%),
 radial-gradient(circle at 69% 77%,rgba(105,115,157,.06),transparent 34%),#0d0f16}
.hero {padding:clamp(40px,6vw,106px);position:relative;isolation:isolate}
.hero:after {content:"";position:absolute;bottom:6%;left:9%;width:clamp(140px,22vw,320px);aspect-ratio:1;border:1px solid rgba(202,183,255,.09);border-radius:50%;z-index:-1;box-shadow:0 0 0 50px rgba(187,167,255,.018),0 0 0 100px rgba(187,167,255,.014);pointer-events:none}
.hero-top {display:flex;align-items:center;gap:13px;color:#e6e0f8;letter-spacing:.22em;font-size:11px;font-weight:800;margin-bottom:clamp(65px,10vh,130px)}
.hero-top i {font-style:normal;color:#5e6173;margin:0 5px}
.hero-icon {display:grid;place-items:center;width:48px;height:48px;flex-shrink:0;border:1px solid #71669e;border-radius:15px;background:linear-gradient(145deg,#302948,#151823);color:#ded4ff;font-size:32px;margin:0;box-shadow:0 12px 28px #0005}
.hero>.eyebrow {font-size:10px;color:#aa9de4}
.hero h1 {font-size:clamp(53px,5.2vw,87px);line-height:1.08;margin:16px 0 24px;letter-spacing:-.061em;font-weight:750;max-width:750px}
.hero h1 em {background:linear-gradient(105deg,#e7dcff,#b0a3f4 63%,#91bac4);-webkit-background-clip:text;background-clip:text}
.hero>p {font-size:17px;max-width:480px;line-height:1.75;color:#a0a3b5;margin:0}
.hero .pills {margin-top:28px;gap:8px}
.hero .pills span {background:rgba(211,201,255,.045);border:1px solid rgba(214,199,255,.13);color:#bdb4d3;padding:7px 12px;border-radius:20px;font-size:11px}
.hero .pills span::before {content:'✧';color:#a796e9;margin-right:7px}
.hero-proof {display:flex;align-items:center;gap:12px;margin-top:clamp(42px,8vh,100px);color:#dcd6ed}
.hero-proof-mark {display:grid;place-items:center;width:36px;height:36px;border:1px solid #393449;border-radius:11px;color:#b4a7ee;font-size:20px}
.hero-proof>span:last-child {display:grid;gap:1px}
.hero-proof strong {font-size:12px;font-weight:650}
.hero-proof small {color:#85899e;font-size:11px;margin:0}
.hero>small {display:block;margin-top:25px;max-width:480px;color:#72768a;line-height:1.65}
.auth-card {background:linear-gradient(155deg,#1a1b29,#141721 80%);border:1px solid #363446;box-shadow:0 35px 90px #0007,0 1px 0 #ffffff09 inset;border-radius:25px;width:min(448px,85%);padding:40px}
.brand {display:flex;align-items:center;gap:10px;font-size:16px;letter-spacing:.18em;color:#f1edf9;margin-bottom:32px}
.brand-glyph {font-size:27px;color:#cabafd;letter-spacing:0;line-height:1}
.brand-edition {font-size:9px;border:1px solid #454056;border-radius:5px;padding:3px 6px;letter-spacing:.12em;color:#aaa2bf;margin-left:auto}
.auth-card h2 {font-size:29px;letter-spacing:-.035em;margin:6px 0 7px;font-weight:700}
.auth-help {font-size:13px;line-height:1.65}
.auth-card form {margin:25px 0 18px;gap:17px}
.auth-card form label {font-weight:650;font-size:12px;color:#c2c1cd}
.auth-card form input {padding:12px 13px;border-radius:11px!important}
.primary {background:#b6a4f6;color:#161323;border:1px solid #c2b3ff;border-radius:11px;font-weight:750;padding:11px 16px}
.primary:hover {background:#cbbdff}
.auth-links button,.auth-card details button {color:#c4b1ff;font-weight:600}
.auth-card details {border-top:1px solid #363543}

/* Desktop canvas: subtle depth, crisp separation, no animation */
.layout {height:100vh;height:100dvh;grid-template-columns:72px 252px minmax(370px,1fr) 228px;
 gap:0;overflow:hidden;background:#0b0e15}
.rail {padding:17px 9px;background:#0b0e15;border-right:1px solid #242734;gap:12px;align-items:center}
.mark {height:48px;width:48px;border-radius:16px;background:linear-gradient(145deg,#403560,#1d1b2e);color:#dbcaff;border:1px solid #675b8c;font-size:29px;box-shadow:0 5px 18px #0005}
.community-rail {gap:10px;width:100%;align-items:center;padding:4px 0 0}
.community-rail button,.add {height:46px;width:46px;border-radius:16px;background:#1d2230;border:1px solid #303545;color:#cad0e1;font-size:13px;font-weight:780;letter-spacing:.015em}
.community-rail button:hover,.add:hover {background:#2a2b3c;border-color:#655c83;color:#fff}
.community-rail button.selected {background:#62508f;border:1px solid #ae98ef;color:#fff;box-shadow:0 4px 15px #43357465}
.add {font-size:23px;color:#a99ced;background:#1b1929;border-style:dashed;border-color:#524b70}
.rail i {width:9px;height:9px;box-shadow:0 0 0 5px rgba(130,211,179,.07);background:#706f7d;margin-bottom:9px}
.rail i.online {background:#84d9ba}
.sidebar {background:#11141c;border-right:1px solid #292c38}
.sidebar>header.community-heading {padding:25px 19px 21px;border-color:#292c37;min-height:94px;height:94px;display:flex;flex-direction:column;justify-content:center;gap:7px}
.community-heading .eyebrow {font-size:9px;color:#8b8da3}
.community-title {display:flex;align-items:center;justify-content:space-between;gap:8px}
.community-title strong {font-size:17px;font-weight:730;letter-spacing:-.025em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.community-chev {font-size:20px;color:#9a9cae;font-weight:400}
.side-scroll {padding:19px 11px 12px}
.section-label {margin:9px 10px 10px;font-size:9px;line-height:1.8;min-height:18px;color:#858a9d}
.section-label button {font-size:15px;line-height:14px;color:#969cb2;float:right;font-weight:650;min-width:15px;padding:0 2px}
.section-label button:hover {color:#dad0ff}
#channels,#voice-channels,.direct-chats {padding:0 2px;gap:3px}
.category-heading {color:#878c9e;padding:10px 9px 5px}
.channel-item,.voice-channel,.direct-item {min-height:39px;padding:9px 11px;border-radius:10px;color:#9fa3b4;font-weight:550;font-size:12.5px;letter-spacing:.005em;gap:10px}
.channel-item:before {color:#777b92;font-size:21px;font-weight:450}
.channel-item:hover,.voice-channel:hover,.direct-item:hover {background:#1e2330;color:#f0edff}
.channel-item.active,.voice-channel.active,.direct-item.active {background:#29283d;color:#f6f3ff;box-shadow:inset 3px 0 #b09bf9}
.channel-item.active:before {color:#c8b9ff}
.channel-item.has-unread {color:#eee9fe}
.channel-unread {background:#a99af2;color:#161321;font-size:10px;border-radius:6px;min-width:18px}
.voice-label {margin-top:22px}
.voice-panel {border:1px solid #37364b;background:#1a1c2c;border-radius:12px;margin:10px 3px;padding:12px}
.voice-panel strong {color:#c5b6ff}
.voice-buttons button {border:1px solid #3a3e53;background:#282d3e;color:#e9e8f2;border-radius:8px;min-height:31px}
.voice-buttons button.on {background:#574363;border-color:#a882c1}
.voice-buttons #voice-leave {background:#543044;border-color:#704158}
#voice-rejoin {background:#273d3a}
.voice-device-label {color:#a3a9bc}
#voice-mic,#voice-hotkey,#voice-output {background:#171b26!important;border-color:#393e52!important}
.voice-state {color:#abb4d1}
.presence-hint {display:flex;align-items:center;gap:8px;margin:1px 9px 15px;color:#85899c;font-size:11px}
.presence-dot {width:7px;height:7px;border-radius:50%;background:#83dab9}
.profile {background:#171a25;border-top:1px solid #30313f;gap:10px;min-height:74px;padding:13px 11px}
.profile .avatar {background:linear-gradient(145deg,#686092,#32344e);color:#f1eaff;border-radius:12px;width:40px;height:40px}
.profile strong {font-size:12px;color:#ececf4;font-weight:720}
.profile small {color:#a1a6ba;font-size:10px}
.profile button {color:#969caf;font-size:19px;border-radius:8px;width:25px;height:32px;padding:0}
.profile button:hover {background:#272a38;color:#e0d4ff}

/* Conversation canvas */
.chat {position:relative;background:#161a25;min-width:0;isolation:isolate}
.chat:before {content:"";position:absolute;top:70px;left:0;right:0;height:240px;pointer-events:none;background:radial-gradient(ellipse at 48% 0%,rgba(152,137,205,.043),transparent 68%);z-index:-1}
.chat-header {min-height:94px;height:94px;padding:0 24px;border-bottom:1px solid #2c303b;gap:15px;background:#171a24}
.current {gap:13px;min-width:160px}
.current-icon {display:grid;place-items:center;width:40px;height:40px;border-radius:12px;border:1px solid #484057;background:#2c2940;color:#c5b5ff!important;font-size:25px!important;line-height:1}
.current-stack {display:flex;flex-direction:column;gap:2px;min-width:0}
.current-eyebrow {color:#858a9e;font-size:9px;letter-spacing:.15em;font-weight:760}
.current strong {font-size:18px;letter-spacing:-.025em;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.actions {gap:8px;flex-wrap:nowrap;min-width:0}
.actions button {display:flex;gap:7px;align-items:center;justify-content:center;white-space:nowrap;min-height:36px;background:#232733;border:1px solid #353949;color:#cdd0db;border-radius:10px;padding:8px 11px;font-size:12px;font-weight:600}
.actions button:hover {border-color:#675c8d;background:#2a2b3d;color:#fff}
.actions svg,.compose svg {width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.actions #create-invite {color:#211c31;background:#bcabf7;border-color:#c9bafd;font-weight:750}
.actions #create-invite:hover {background:#d1c3ff}
#live-state {font-size:11px;font-weight:660;color:#9fa6ba;display:inline-flex;align-items:center;white-space:nowrap;margin-right:5px}
#live-state::before {content:"";width:6px;height:6px;border-radius:50%;background:#86d9b6;display:inline-block;margin-right:7px}
.header-more {position:relative;border:0;margin:0;padding:0;z-index:12;flex-shrink:0}
.header-more summary {display:grid;place-items:center;cursor:pointer;list-style:none;background:#242735;border:1px solid #3b3c50;border-radius:10px;height:36px;width:38px;font-size:21px;line-height:1;color:#cecae2;letter-spacing:.04em}
.header-more summary::-webkit-details-marker {display:none}
.header-more[open] summary {border-color:#7b6daa;color:#fff}
.header-more-menu {position:absolute;top:44px;right:0;min-width:200px;padding:7px;background:#202330;border:1px solid #414357;border-radius:14px;box-shadow:0 18px 55px #000b;display:flex;flex-direction:column;z-index:40;gap:2px}
.header-more-menu .menu-caption {padding:9px 9px 7px;color:#9599ab;font-size:9px;font-weight:800;letter-spacing:.14em}
.actions .header-more-menu button {justify-content:flex-start;text-align:left;background:transparent;border:0;width:100%;min-height:34px;font-weight:550;padding:7px 10px}
.actions .header-more-menu button:hover {background:#343347}
.actions #notifications-toggle.enabled {border-color:transparent;background:rgba(151,134,224,.15);color:#d2c4ff}
.messages {padding:26px 28px 18px;gap:3px;position:relative}
.welcome {margin-top:auto;padding-bottom:30px;max-width:670px}
.welcome-icon {width:70px;height:70px;border-radius:22px;background:linear-gradient(145deg,#4a3e70,#2a2b40);border:1px solid #69608b;color:#d4c6ff;font-size:39px;box-shadow:0 20px 60px #0003}
.welcome h2 {font-size:30px;letter-spacing:-.045em;line-height:1.2;margin:22px 0 8px;font-weight:760}
.welcome p {font-size:13px;color:#a1a6b9;line-height:1.7}
.msg {padding:9px 9px 9px 7px;border-radius:11px;gap:13px}
.msg:hover {background:#202533}
.msg-name {font-size:13px;font-weight:720;color:#f5efff}
.msg-time {font-size:10px;color:#83899f}
.msg-body {color:#d6d9e3;line-height:1.65;font-size:13px}
.msg button {background:#303244;color:#d3d3e3;border-radius:7px;border:1px solid #414355;padding:4px 7px}
.msg button:hover {background:#3e3d56}
.msg .avatar {background:#47415e;color:#e1d8fc}
.message-extras .reaction-chip,.message-extras .attachment-download {background:#272a3c;border:1px solid #3d4055;border-radius:8px;color:#dad7ee}
.message-extras .reaction-chip.selected {background:#514773;border-color:#9482d6}
.reaction-options {background:#2c3042;border:1px solid #454358;border-radius:9px}
.search-hit {outline:2px solid #b4a1ff;background:#2b2941}
.load-earlier {background:#282b3c;border:1px solid #42445a;color:#d7ccff;border-radius:9px}
.compose {padding:14px 22px 16px;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;background:linear-gradient(180deg,transparent,#151923 24%)}
.compose textarea {height:51px;background:#252a38!important;border:1px solid #363b4c!important;color:#eeeef6!important;border-radius:12px!important;resize:none;min-height:51px;padding:15px;line-height:1.35}
.compose textarea:focus {border-color:#8e81ce!important;background:#282d3e!important}
.compose #attach-button {grid-column:1;background:#252938;border:1px solid #383e4e;border-radius:12px;color:#bfc2d1;display:grid;place-items:center;padding:0}
.compose #attach-button:hover {background:#303344;color:#fff;border-color:#62597e}
.compose #attach-button svg {width:18px;height:18px}
.compose .send {grid-column:4;border-radius:12px;background:#b9a6f5;color:#1c1730;display:grid;place-items:center}
.compose .send:hover {background:#ccbdff}
.compose .send svg {width:18px;height:18px;stroke-width:1.9}
.compose small {grid-column:1/-1;font-size:10px;color:#747a8e;padding:0 2px}
.compose-privacy-dot {display:inline-block;width:6px;height:6px;background:#84c8b0;border-radius:50%;margin-right:5px}
.compose-dotsep {margin:0 4px;color:#575b6a}

/* Member roster */
.members {background:#12151e;border-left:1px solid #292c39;padding:0 12px 18px;display:flex;flex-direction:column;overflow:auto}
.members-heading {padding:26px 11px 16px;border-bottom:1px solid #2a2d39;margin-bottom:11px;display:grid;gap:6px}
.members-heading .eyebrow {font-size:9px}
.members-heading strong {font-weight:720;font-size:16px;letter-spacing:-.025em}
.members-heading small {font-size:11px;color:#7f879b}
.member-header-dot {display:inline-block;width:7px;height:7px;background:#82d8b5;border-radius:50%;vertical-align:middle;margin-left:5px}
.member {padding:9px 8px;margin:2px 0;gap:10px;border-radius:11px;min-height:51px}
.member:hover {background:#1e222d}
.member .avatar {height:35px;width:35px;border-radius:11px;background:#363e57;color:#e0e6ff;font-size:11px}
.member strong {font-size:12px;color:#eceef7;font-weight:670}
.member small {color:#9297a8;font-size:10px}
.member-game {color:#b3a4e5!important}
.members-foot {margin-top:auto;border:1px solid #2e2c40;border-radius:12px;padding:12px 10px;background:#1b1b29;color:#d1c7f2;display:flex;gap:10px;align-items:center;font-size:11px}
.members-foot-icon {display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#302c46;color:#b5a3f7;font-size:18px}
.members-foot>span:last-child {display:flex;flex-direction:column;gap:2px;font-weight:650}
.members-foot small {display:block;color:#81859a;font-size:10px;font-weight:400}
.flag-small {background:#2b2b3b;border-color:#3f3c50;color:#c5c4d6}

/* Dialog system / overlays */
dialog {background:linear-gradient(165deg,#212431,#171a25);color:#f4f1fa;border:1px solid #424256;border-radius:19px;box-shadow:0 28px 100px #000a;padding:26px;max-height:min(90vh,900px);overflow:auto}
dialog::backdrop {background:rgba(5,6,11,.78)}
dialog h2 {font-size:22px;letter-spacing:-.03em;margin:0 0 10px;font-weight:750}
dialog h3 {font-size:14px;color:#e5dffa}
dialog button:not(.primary) {background:#2a2d3b;color:#d5d4e3;border:1px solid #444355;border-radius:9px;padding:8px 12px}
dialog button:not(.primary):hover {background:#37364b;border-color:#776895}
dialog .primary,dialog button.primary {background:#b6a3f6!important;color:#191528!important;border-color:#b8aaf0!important;font-weight:750}
dialog input,dialog textarea,dialog select {background:#171b26!important;color:#faf8ff!important;border:1px solid #424353!important;border-radius:9px!important}
.search-result,.engagement-card,.friend-row {background:#242838;border-color:#414557;border-radius:12px;color:#e7e7f2}
.search-result:hover {background:#323446}
.search-result small,.engagement-card small {color:#a4a6b9}
.report-evidence {background:#1c2030}
.search-dialog,.engagement-dialog,.organize-dialog {border-radius:19px}
.search-dialog {width:min(650px,calc(100vw - 28px));max-height:min(82vh,720px);overflow:auto}
.search-dialog .search-results:empty {display:none;margin:0}
.search-dialog .search-bar {align-items:stretch}
.search-dialog .search-bar button {min-width:92px;white-space:nowrap}
.msg-buttons {flex-wrap:wrap;justify-content:flex-end;max-width:100%}
.chat-header .current {min-width:0}
.chat-header .current strong {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-header .actions {min-width:0;flex-wrap:wrap;justify-content:flex-end}
#toast {border:1px solid #544d76;background:#343047;box-shadow:0 10px 40px #0008;color:#f3efff;border-radius:12px;padding:13px 18px;bottom:140px;z-index:50}

/* Density behaviors: prioritize chat space and usable controls */
@media (max-width:1390px){
 .layout {grid-template-columns:68px 234px minmax(345px,1fr) 206px}
 .chat-header {padding:0 16px}
 .actions {gap:6px}
 .actions button {padding:7px 9px}
 .members {padding-left:8px;padding-right:8px}
}
@media (max-width:1180px){
 .layout {grid-template-columns:68px 234px minmax(330px,1fr)}
 .members {display:none}
 .members.expanded {display:flex;position:fixed;right:0;top:94px;bottom:0;width:225px;z-index:20;box-shadow:-15px 20px 50px #0009;background:#171a23}
 .header-members {display:flex!important}
}
@media (max-width:860px){
 .layout {grid-template-columns:60px 210px minmax(290px,1fr)}
 .rail {padding:12px 5px}
 .mark,.community-rail button,.add {width:43px;height:43px}
 .chat-header {height:76px;min-height:76px;padding:0 14px}
 .sidebar>header.community-heading {min-height:76px;height:76px;padding:12px}
 .current {gap:9px;min-width:0}
 .current-icon {width:34px;height:34px;font-size:20px!important}
 .current strong {font-size:15px}
 .actions #live-state,.actions .header-invite span,.actions .header-members span,.actions .header-search span {display:none}
 .actions svg {height:18px;width:18px}
 .actions button {padding:8px;min-width:35px}
 .members.expanded {top:76px}
 .messages {padding:18px 14px 10px}
 .compose {padding:10px 12px 12px}
}
@media (max-width:620px){
 .auth {grid-template-columns:1fr}
 .hero {padding:38px 26px}
 .hero-top {margin-bottom:28px}
 .hero h1 {font-size:49px}
 .hero-proof {margin-top:25px}
 .auth-card {width:calc(100% - 40px);margin:15px auto 30px;padding:28px}
 .layout {grid-template-columns:50px 160px minmax(220px,1fr)}
 .chat-header {padding:0 9px}
 .community-title strong {font-size:14px}
 .actions {gap:3px}
 .actions button {min-width:32px;min-height:33px}
 .actions .header-search {display:none}
 .side-scroll {padding:14px 4px}
 .profile {gap:5px;padding:7px}
 .profile .avatar {width:28px;height:28px}
 .profile strong {font-size:10px}
 .current-eyebrow {display:none}
 .compose textarea {font-size:12px}
}
@media (prefers-reduced-motion:reduce){*,*:before,*:after {scroll-behavior:auto!important}}
/* Override legacy global <details> spacing for the compact header menu. */
.header-more {border-top:0!important;margin-top:0!important;padding-top:0!important;color:inherit}

/* v0.13: opt-in gamer hotkey affordance, no animation or oversized checkbox. */
#global-ptt-label {display:flex;align-items:center;gap:8px;line-height:1.4;flex-wrap:wrap;}
#voice-global-ptt {width:16px;height:16px;min-width:16px;padding:0;margin:0;flex:0 0 16px;}
#global-ptt-label small {color:#8b91a5;font-weight:400;}

/* v0.14: optional distraction-free gaming view — CSS only, no timers. */
.header-focus {background:#2b2840!important;border:1px solid #655b87!important;color:#d9cdff!important;white-space:nowrap;font-weight:650}
.header-focus[aria-pressed="true"] {background:#40355f!important;border-color:#a897e8!important}
.focus-mode .layout {grid-template-columns:65px 230px minmax(330px,1fr)}
.focus-mode .members {display:none!important}
.focus-mode .header-invite,.focus-mode .header-members {display:none!important}
.focus-mode .chat {background:#11141d}
.focus-mode .msg {padding:6px 8px}
.focus-mode .chat-header {border-color:#222535}
@media(max-width:1080px){.focus-mode .layout {grid-template-columns:60px 210px minmax(300px,1fr)}}
@media(max-width:750px){.focus-mode .layout {grid-template-columns:50px 150px minmax(250px,1fr)}.header-focus{padding:6px!important;font-size:11px}}

/* v0.16: joining is cancellable, without animations or additional polling. */
.voice-buttons button:disabled {opacity:.45;cursor:not-allowed}
.voice-panel #voice-leave {border-color:#8e7184}

/* ONEHUB v0.17: one-window responsive Atelier shell (no JS animation/polling).
   Primary voice actions remain visible while channel lists scroll independently. */
html,body {width:100%;overflow-x:hidden}
.layout {height:100vh;height:100dvh;min-height:0;max-width:100vw;min-width:0}
.layout > * {min-width:0;min-height:0}
.sidebar {min-height:0;overflow:hidden}
.sidebar .side-scroll {min-height:0;overflow-y:auto;overscroll-behavior:contain;flex:1 1 auto}
.chat {min-height:0;overflow:hidden}
.chat-header {min-width:0;height:66px;min-height:66px;padding:0 16px;justify-content:flex-start;gap:11px}
.chat-header .current {display:flex;flex:1 1 0%;min-width:0;gap:10px;overflow:hidden}
.chat-header .current-stack {min-width:0;max-width:100%;overflow:hidden}
.chat-header .current .current-eyebrow {font-size:9px;line-height:1.3;letter-spacing:.14em;color:#9398aa;font-weight:750;display:block;white-space:nowrap}
.chat-header .current .current-icon {flex-shrink:0;font-size:22px!important}
.chat-header .current strong {font-size:15px;line-height:1.3;max-width:100%;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-header .actions {flex:0 0 auto;gap:6px;min-width:0}
.chat-header .actions button {min-height:34px}
.sidebar>header.community-heading {height:66px;min-height:66px;padding:12px 16px}
.sidebar-toggle {display:grid;place-items:center;flex:0 0 34px;height:34px;padding:6px;border:1px solid #363a4e;background:#25283a;color:#c2b8e1;border-radius:10px;cursor:pointer}
.sidebar-toggle:hover {background:#37334c;border-color:#8273b7}
.sidebar-toggle svg {width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.messages {min-height:0;flex:1 1 0%;overflow:auto;overscroll-behavior:contain;padding:15px 18px}
.compose {flex:0 0 auto;padding:10px 16px 12px}
.compose textarea {min-height:42px;height:46px}
.members {min-height:0;overflow-y:auto}
/* Channels and voice controls no longer fight for the same vertical scroll space. */
.sidebar>.voice-panel {flex:0 0 auto;margin:7px 10px 8px;min-width:0;padding:11px 11px 9px;max-height:min(390px,58dvh);overflow-y:auto;overscroll-behavior:contain;border-color:#55496f;background:#1d1e30;box-shadow:0 4px 18px #0002}
.sidebar>.voice-panel>strong {font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar>.voice-panel #voice-peers {font-size:10px;margin:3px 0 1px;padding:0;line-height:1.3}
.sidebar>.voice-panel #voice-connection {font-size:10px;line-height:1.4;margin:3px 0 8px;max-height:42px;overflow-y:auto}
.sidebar>.voice-panel .voice-buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.sidebar>.voice-panel .voice-buttons button {min-width:0;min-height:32px;padding:5px 4px;font-size:11px}
.sidebar>.voice-panel .voice-advanced {border-top:1px solid #343449;margin-top:9px;padding:0;color:#b7b4cf}
.sidebar>.voice-panel .voice-advanced summary {padding:8px 0 4px;cursor:pointer;list-style:revert;font-size:10px;line-height:1.3;font-weight:650}
.sidebar>.voice-panel .voice-advanced-content {display:grid;gap:4px;padding:4px 0 6px}
.sidebar>.voice-panel .voice-advanced-content select,.sidebar>.voice-panel .voice-advanced-content button {min-width:0;max-width:100%;width:100%;font-size:11px;min-height:30px}
.sidebar>.voice-panel .voice-advanced-content .voice-device-label {margin:4px 0 1px;font-size:10px}
.sidebar>.voice-panel .voice-advanced-content .aside-tip {padding:2px 0;margin:0;font-size:10px}
.sidebar>.voice-panel .voice-advanced-content #global-ptt-label input {width:16px}
.profile {min-height:56px;padding:8px;flex:0 0 auto}
.compose {grid-template-columns:47px minmax(0,1fr) auto 47px;align-items:stretch}
.compose #role-mention-open {min-width:0;white-space:nowrap;padding:8px 10px}
.profile .avatar {height:34px;width:34px}
/* Explicit collapsed desktop navigation, with no hidden content loaded in background. */
body.sidebar-collapsed .sidebar {display:none!important}
body.sidebar-collapsed .layout {grid-template-columns:72px minmax(0,1fr) 228px}
body.focus-mode.sidebar-collapsed .layout {grid-template-columns:65px minmax(0,1fr)}
@media (max-width:1390px) {
 body.sidebar-collapsed .layout {grid-template-columns:68px minmax(0,1fr) 206px}
 .chat-header .actions {gap:5px}
}
@media (max-width:1180px) {
 .layout {grid-template-columns:68px 234px minmax(0,1fr)}
 body.sidebar-collapsed .layout {grid-template-columns:68px minmax(0,1fr)}
 .chat-header .actions .header-search span,.chat-header .actions .header-invite span,.chat-header .actions .header-members span {display:none}
 .chat-header .actions button {padding:7px 9px}
 .chat-header .actions #live-state {margin-right:2px}
 .members.expanded {top:66px}
}
@media (max-width:860px) {
 .layout {grid-template-columns:60px 205px minmax(0,1fr)}
 body.sidebar-collapsed .layout,body.focus-mode.sidebar-collapsed .layout {grid-template-columns:60px minmax(0,1fr)}
 .chat-header {height:62px;min-height:62px;padding:0 10px;gap:7px}
 .sidebar>header.community-heading {height:62px;min-height:62px}
 .chat-header .current strong {font-size:14px}
 .chat-header .actions #live-state {display:none}
 .chat-header .current .current-icon {width:32px;height:32px}
 .chat-header .actions .header-focus {font-size:11px;padding:6px!important}
 .members.expanded {top:62px}
}
@media (max-width:760px) {
 .layout,body.sidebar-collapsed .layout,body.focus-mode .layout,body.focus-mode.sidebar-collapsed .layout {grid-template-columns:52px minmax(0,1fr)}
 .sidebar {display:none!important}
 body.sidebar-open .sidebar {display:flex!important;position:fixed;top:0;bottom:0;left:52px;width:min(255px,calc(100vw - 52px));z-index:32;box-shadow:12px 0 40px #0009}
 .chat-header .current .current-eyebrow {display:none}
 .chat-header .actions .header-focus {display:none}
 .chat-header .actions .header-search {display:none}
 .chat-header .current {gap:6px}
 .compose {padding:8px 9px}
 .messages {padding:12px 10px}
 .members.expanded {top:62px}
 .chat-header .actions {gap:4px}
 .chat-header .actions button {min-width:36px;padding:7px 8px}
 .compose {grid-template-columns:42px minmax(0,1fr) auto 42px}
 .compose textarea {min-width:0;font-size:13px}
 .compose #role-mention-open {font-size:0;width:42px;padding:8px 0}
 .compose #role-mention-open::before {content:'@';font-size:16px}
}
@media (max-height:610px) {
 .sidebar>.voice-panel {max-height:min(250px,47dvh);padding:7px 9px}
 .sidebar>.voice-panel .voice-advanced-content {max-height:155px;overflow-y:auto}
 .sidebar>.voice-panel .voice-buttons button {min-height:29px}
 .sidebar>header.community-heading {min-height:56px;height:56px}
 .profile {min-height:46px}
 .chat-header {height:56px;min-height:56px}
 .compose textarea {min-height:38px;height:40px}
}

.channel-item:before {content:none!important}

/* ONEHUB v0.37 · compact channel replies, accessible and keyboard-friendly */
.compose .reply-banner {grid-column:1/-1;display:flex;align-items:center;gap:12px;min-width:0;padding:8px 12px;border-left:3px solid #bca9f0;background:#242334;border-radius:8px;color:#e9e2ff;font-size:12px}
.compose .reply-banner[hidden] {display:none}
.reply-banner-label {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.compose .reply-cancel {color:#f4eaff;border:1px solid #5c557a;background:#373046;border-radius:7px;padding:6px 10px;white-space:nowrap;cursor:pointer}
.msg .reply-quote {display:block;text-align:left;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-left:2px solid #a997d9;background:#242637;color:#c7c0dc;font-size:11px;padding:4px 8px;margin:4px 0 7px;border-radius:5px}
.msg button.reply-quote:hover {background:#333148;color:#fff}
.msg .reply-quote:focus-visible,.compose .reply-cancel:focus-visible {outline:2px solid #d3c1ff;outline-offset:2px}

/* ONEHUB v0.39: bounded, on-demand channel thread panel. */
.thread-dialog{width:min(620px,calc(100vw - 28px));max-height:min(88vh,900px);padding:20px;background:#11141d;color:#eee9f8;border:1px solid #605274;border-radius:18px;box-shadow:0 25px 90px #000b}
.thread-dialog::backdrop{background:#05060bca}
.thread-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.thread-heading h2{font-size:19px;margin:0;color:#e8ddfb}
.thread-close{border:1px solid #51465e;background:#1d1a27;border-radius:9px;min-width:34px;min-height:34px}
.thread-status{color:#aa9fbd;font-size:12px;margin:8px 0}
.thread-messages{max-height:min(53vh,520px);overflow-y:auto;display:grid;gap:9px;padding:4px 2px 12px}
.thread-entry{border:1px solid #333041;background:#191823;border-radius:12px;padding:11px 13px;overflow-wrap:anywhere}
.thread-entry.thread-root{border-color:#726287;background:#242032}
.thread-entry strong{font-size:12px;color:#d9caed}
.thread-entry-body{margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.thread-parent{display:block;color:#aa9dbb;margin-top:5px}
.thread-entry-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;color:#91859d}
.thread-entry-footer button{border:1px solid #4b3e5c;border-radius:9px;padding:5px 9px;background:#221d30;font-size:11px}
.thread-compose{display:grid;gap:9px;border-top:1px solid #393047;padding-top:12px}
.thread-target{font-size:12px;color:#c5afd9}
.thread-compose textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:62px}
.thread-compose button{justify-self:end}
.thread-unavailable{color:#a99ab8;font-size:12px}
@media(max-width:650px){.thread-dialog{padding:12px}.thread-messages{max-height:44vh}}

/* v0.40 bounded thread navigation — no infinite-scroll background fetches. */
.thread-pages{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0}
.thread-pages button{background:#241f30;border:1px solid #665275;color:#eee0f0;border-radius:9px;padding:7px 10px;min-height:34px;cursor:pointer}
.thread-pages button:disabled{opacity:.45;cursor:default}
.thread-parent-link{display:block;text-align:left;margin-top:6px;padding:3px 0;border:0;background:transparent;color:#c3a6e3;text-decoration:underline;overflow-wrap:anywhere;cursor:pointer}
.thread-parent-link:focus-visible,.thread-pages button:focus-visible{outline:2px solid #d2aa63;outline-offset:2px}
.thread-entry-footer{flex-wrap:wrap}
@media(max-width:650px){.thread-pages button{flex:1 1 auto;font-size:12px}}

/* v0.42: manual, opt-in activity center in the established Obsidian & Gold UI. */
.thread-follow-bar,.thread-activity-actions,.thread-activity-entry-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.thread-follow-bar{margin:7px 0 10px}
.thread-follow-bar button,.thread-activity-actions button,.thread-activity-entry-actions button{background:#231d2b;color:#f0e8f5;border:1px solid #675777;border-radius:9px;padding:8px 11px;cursor:pointer}
.thread-follow-bar button:disabled,.thread-activity-entry-actions button:disabled{opacity:.45;cursor:default}
.thread-follow-count{color:#c4afda;font-size:12px}
.thread-activity-dialog{max-width:600px}
.thread-activity-list{display:grid;gap:9px;max-height:55vh;overflow-y:auto}
.thread-activity-entry{display:grid;gap:8px;background:#1b1925;border:1px solid #52435e;border-radius:12px;padding:12px}
.thread-activity-info{display:grid;gap:3px}.thread-activity-info small{color:#bcaccb}
.thread-follow-bar button:focus-visible,.thread-activity-dialog button:focus-visible{outline:2px solid #d2aa63;outline-offset:2px}

/* v0.43 — lightweight opt-in in-app thread activity controls */
.thread-notification-prefs{display:grid;gap:9px;padding:11px 13px;margin:9px 0 12px;border:1px solid #60516a;border-radius:11px;background:#201b29}
.thread-notification-prefs legend{padding:0 6px;font-weight:700;color:#ead4a5}
.thread-notification-prefs label{display:flex;align-items:center;gap:9px;line-height:1.4;color:#e8deed;font-size:13px}
.thread-notification-prefs input{accent-color:#bd9859;flex:none;width:17px;height:17px}
.thread-notification-prefs input:focus-visible{outline:2px solid #edc87e;outline-offset:2px}
.thread-pref-status{color:#bfb0cb;font-size:12px}

/* v0.44: per-thread mute and manual filtering, preserving Obsidian & Gold. */
.thread-filter-label{display:flex;align-items:center;gap:10px;margin:12px 0;color:#d6c4e4;font-size:13px}
.thread-filter{flex:1;max-width:200px;min-width:0;padding:8px 11px;background:#211c2b;color:#f0e8f5;border:1px solid #705c75;border-radius:9px}
.thread-filter:focus-visible{outline:2px solid #d2aa63;outline-offset:2px}
.thread-follow-bar button[aria-pressed="true"],.thread-activity-entry-actions button[aria-pressed="true"]{border-color:#c29a57;color:#f4d99a}

/* v0.45 — pinned followed threads and optional per-thread snooze. */
.thread-snooze-select{max-width:155px;min-width:0;padding:8px 9px;background:#211c2b;color:#f0e8f5;border:1px solid #705c75;border-radius:9px}
.thread-snooze-select:focus-visible{outline:2px solid #d2aa63;outline-offset:2px}
.thread-snooze-select:disabled{opacity:.5}
/* v0.47 daily quiet-hours controls: keep native time pickers readable on small screens. */
.thread-quiet-hours input[type="time"]{width:min(100%,150px);height:36px;min-width:120px;color:#f0e8f5;background:#241e2d;border:1px solid #675777;border-radius:8px;padding:5px 8px;accent-color:auto}
.thread-quiet-hours input[type="checkbox"]{width:17px;height:17px}
.thread-quiet-hours button{width:fit-content;max-width:100%;padding:7px 11px;color:#f0e8f5;background:#2b2232;border:1px solid #806e80;border-radius:8px;cursor:pointer}
.thread-quiet-hours button:disabled{opacity:.5;cursor:default}
.thread-quiet-hours input:focus-visible,.thread-quiet-hours button:focus-visible{outline:2px solid #edc87e;outline-offset:2px}
.thread-quiet-hours .thread-pref-status{overflow-wrap:anywhere}

/* v0.48: bounded, scrollable and keyboard accessible private activity history. */
.thread-history-list{max-height:30vh}
.thread-history-list .thread-activity-entry-actions{justify-content:flex-start}
.thread-activity-dialog #thread-history-heading{margin:16px 0 6px;color:#ecd5a1;font-size:17px}
@media(max-width:650px){.thread-history-list{max-height:28vh}}

/* v0.50 microphone processing: intentionally matches restrained Obsidian & Gold. */
.voice-noise-card{display:grid;gap:.42rem;padding:.85rem;margin:.7rem 0;border:1px solid rgba(214,180,110,.3);border-radius:12px;background:linear-gradient(130deg,rgba(200,168,89,.09),rgba(13,15,22,.45));}
.voice-noise-title{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.3rem;color:#e6cf93;}
.voice-noise-title small{color:#bcb8ab;font-size:.72rem}
.voice-noise-card select{max-width:100%;min-width:0;width:100%;background:#141824;color:#f3ecdc;border:1px solid #665a3a;border-radius:7px;padding:.4rem}
.voice-noise-card .aside-tip{line-height:1.45;overflow-wrap:anywhere}
.voice-mic-check{display:grid;gap:.38rem;padding:.8rem;margin:.5rem 0;border:1px solid rgba(214,180,110,.3);border-radius:12px;background:rgba(13,15,22,.6)}
.voice-mic-check .voice-noise-title{color:#e6cf93}
.voice-mic-check meter{display:block;width:100%;height:15px;accent-color:#d8b86b}
.voice-mic-check output{color:#e2cc94;font-variant-numeric:tabular-nums}
.voice-mic-check .aside-tip{line-height:1.4;overflow-wrap:anywhere}
.voice-mic-check button[aria-pressed="true"]{border-color:#d8b86b;color:#f5dfa2}


/* v0.57 guided local microphone setup. Follows Obsidian & Gold. */
.voice-calibration-actions{display:flex;flex-wrap:wrap;gap:6px}
.voice-calibration-actions button{flex:1 1 105px;min-height:35px;border-radius:8px;color:#f2e5c8;background:#211d27;border:1px solid #8a7446;padding:7px 8px;cursor:pointer}
.voice-calibration-actions button:disabled{opacity:.42;cursor:default}
.voice-calibration-actions button:focus-visible{outline:2px solid #eac783;outline-offset:2px}
.voice-calibration #voice-calibration-status{min-height:2.4em;overflow-wrap:anywhere}

/* v0.58 opt-in, session-only level comparison. */
.voice-calibration-comparison{display:grid;gap:7px;padding:10px;margin-top:9px;border:1px solid #665838;border-radius:9px;background:#191821}
.voice-calibration-comparison strong{color:#e9ce93}
.voice-calibration-comparison button{justify-self:start;min-height:34px;border:1px solid #8a7446;background:#211d27;border-radius:8px;color:#f2e5c8;padding:6px 12px;cursor:pointer}
.voice-calibration-comparison button:disabled{opacity:.42;cursor:default}
.voice-calibration-comparison button:focus-visible{outline:2px solid #eac783;outline-offset:2px}
.voice-calibration-comparison small{white-space:normal;overflow-wrap:anywhere}

.voice-compare-scroller{max-width:100%;overflow-x:auto}
.voice-compare-scroller table{width:100%;border-collapse:collapse;text-align:left;font-size:12px;min-width:355px;color:#e8ddc6}
.voice-compare-scroller th,.voice-compare-scroller td{padding:6px 4px;border-bottom:1px solid #47402e}
.voice-compare-scroller th{font-weight:600;color:#d6b779}

/* v0.59 microphone setup guidance — calm, compact, readable */
.voice-mic-advice{border:1px solid #635235;border-radius:10px;background:rgba(181,146,75,.07);padding:9px 12px;margin:8px 0;max-height:240px;overflow:auto;color:#e9dfcb;font-size:12px;line-height:1.55}
.voice-mic-advice p{margin:0 0 7px;overflow-wrap:anywhere}
.voice-mic-advice p:last-child{margin-bottom:0}
/* v0.60 optional local Voice Changer; uses the existing Obsidian & Gold palette. */
.voice-noise-card .voice-effect-card{display:grid;gap:.32rem;margin:.3rem 0;padding:.65rem;border:1px solid rgba(214,180,110,.22);border-radius:9px;background:rgba(12,16,24,.6);min-width:0}
.voice-noise-card .voice-effect-card .voice-device-label{margin:0;color:#e7d39d}
.voice-noise-card .voice-effect-card select{min-width:0;width:100%;font-size:.8rem}
.voice-noise-card .voice-effect-card .aside-tip{line-height:1.4;font-size:.69rem}

/* v0.61 Voice Changer Studio: compact gold-highlighted intensity/preview controls */
.voice-effect-card input[type="range"]{width:100%;accent-color:#ddbd78;cursor:pointer}
.voice-effect-card output{float:right;color:#f0d6a0;font-variant-numeric:tabular-nums}
.voice-effect-card button{background:#27212c;color:#f3dfaa;border:1px solid #9c8550;border-radius:8px;padding:.5rem .7rem;cursor:pointer}
.voice-effect-card button[disabled]{cursor:not-allowed;opacity:.46}
.voice-effect-card button[aria-pressed="true"]{background:#453620;box-shadow:inset 0 0 0 1px #bf9b59}

/* v0.64 personal Voice Changer studio presets */
.voice-slot-studio{display:grid;gap:8px;margin:10px 0;padding:12px;border:1px solid var(--border,#61563b);border-radius:12px}.voice-slot-actions{display:flex;gap:6px;flex-wrap:wrap}.voice-slot-actions button{flex:1;min-width:88px}.voice-slot-studio select{width:100%;min-height:38px}

/* v0.65 accessible unread DM counters and blocked-user manager */
.dm-unread-count{margin-left:auto;min-width:20px;padding:2px 5px;border:1px solid currentColor;border-radius:20px;text-align:center;font-variant-numeric:tabular-nums}.blocked-users-section{margin:16px 0 8px;padding-top:12px;border-top:1px solid var(--border,#4d4943)}.blocked-users-section h3{margin:0 0 7px}

/* v0.117 DM header profile link */
.dm-profile-link{cursor:pointer;text-decoration:underline;text-decoration-color:rgba(204,174,114,.4);text-underline-offset:3px}.dm-profile-link:hover{text-decoration-color:#d5b273;color:#ffebba}

/* v0.68 privacy-aware friend profile card */
.friend-profile-dialog{max-width:min(500px,92vw);width:100%;padding:22px;border-radius:16px}.friend-profile-body{display:grid;gap:10px;margin-bottom:16px}.friend-profile-body h2,.friend-profile-body h3,.friend-profile-body p{margin:0;overflow-wrap:anywhere}

/* v0.70 — private DM reactions: polished, keyboard-accessible Obsidian & Gold. */
.dm-reaction-bar{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.dm-reaction-chip,.dm-react-picker button{border:1px solid rgba(204,174,114,.35);border-radius:999px;background:#1d1b25;color:#f1e8d8;min-height:30px;padding:4px 10px;font:inherit;cursor:pointer}
.dm-reaction-chip[aria-pressed="true"]{background:#46371e;border-color:#d5b273;color:#ffebba;box-shadow:inset 0 0 0 1px rgba(240,202,128,.2)}
.dm-react-trigger[aria-expanded="true"]{border-color:#d5b273;color:#ffebba}
.dm-react-picker:not([hidden]){display:flex;gap:5px;flex-wrap:wrap;align-items:center;padding:7px;border:1px solid #74613b;background:linear-gradient(135deg,#201d28,#15151b);border-radius:12px;max-width:100%;box-shadow:0 6px 18px rgba(0,0,0,.2)}
.dm-react-picker button{font-size:17px;min-width:37px;min-height:37px;padding:5px}
.dm-reaction-chip:hover,.dm-react-picker button:hover{border-color:#ddbd78;background:#332b29}
.dm-reaction-chip:focus-visible,.dm-react-picker button:focus-visible,.dm-react-trigger:focus-visible{outline:2px solid #eac783;outline-offset:2px}
@media(max-width:650px){.dm-react-picker{width:100%}.dm-react-picker button{flex:1}}

/* v0.71 · Quiet, accessible saved-DM collection · Obsidian & Gold */
#dm-saved-open{border:1px solid rgba(210,178,114,.22);border-radius:8px;background:transparent;color:#d9bc80;min-width:30px;min-height:28px;cursor:pointer}
#dm-saved-open:hover,#dm-saved-open:focus-visible{background:rgba(210,178,114,.12);border-color:#dfbd78}
.dm-saved-dialog{max-width:min(680px,94vw);width:100%;background:#13141d;color:#f4efe7;border:1px solid #584831;border-radius:16px;box-shadow:0 20px 65px rgba(0,0,0,.55)}
.dm-saved-list{max-height:min(60vh,520px);overflow:auto;display:grid;gap:10px;padding:6px 0 12px}
.dm-saved-item{background:linear-gradient(125deg,#1d202a,#1c1b23);border:1px solid rgba(219,183,116,.25);border-radius:12px;padding:14px;display:grid;gap:7px;overflow-wrap:anywhere}
.dm-saved-item strong{color:#f7dfaa;font-weight:650}.dm-saved-item small,.dm-saved-status{color:#a6afc2}
.dm-saved-item p{margin:0;white-space:pre-wrap;color:#e5e6ee;line-height:1.45}
.dm-saved-actions{display:flex;gap:8px;flex-wrap:wrap}.dm-saved-actions button,.dm-save-trigger{background:#242330;color:#ead3a6;border:1px solid rgba(220,183,120,.4);border-radius:9px;min-height:32px;padding:5px 10px;cursor:pointer}
.dm-saved-actions button:hover,.dm-save-trigger:hover{background:#383025}.dm-save-trigger[aria-pressed="true"]{color:#ffe6a4;background:#44351d}
.dm-saved-actions button:focus-visible,.dm-save-trigger:focus-visible,#dm-saved-open:focus-visible{outline:2px solid #f5d58e;outline-offset:3px}
/* v0.72 group DMs: keyboard-first, elegant and compact Obsidian & Gold studio. */
.group-dm-launcher{border:1px solid rgba(210,178,114,.26);border-radius:8px;background:#22202b;color:#ead3a6;padding:4px 9px;margin:0 5px;font-weight:650;cursor:pointer}
.group-dm-dialog{width:min(1040px,96vw);max-width:96vw;max-height:92vh;padding:22px;background:linear-gradient(132deg,#12131b,#1a1822);color:#f4efe8;border:1px solid #766344;border-radius:18px;box-shadow:0 28px 86px #000b}
.group-dm-dialog::backdrop{background:#030407bd;backdrop-filter:blur(5px)}
.group-dm-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.group-dm-heading h2{margin:4px 0;color:#f4e2bd}.group-dm-heading .eyebrow{font-size:11px;color:#cbac70;letter-spacing:.15em}
.group-dm-close{background:transparent;border:1px solid #7c6d54;border-radius:10px;color:#e8d7ba;cursor:pointer;padding:8px 12px}.group-dm-status{min-height:18px;font-size:12px;color:#b8c3d2}
.group-dm-layout{display:grid;grid-template-columns:minmax(205px,32%) minmax(0,1fr);gap:16px;min-height:410px}
.group-dm-sidebar{min-width:0;padding:12px;background:#11131b;border:1px solid #3a342f;border-radius:12px}.group-dm-primary{background:linear-gradient(120deg,#cbaa69,#dfc68d);color:#201c18;border:1px solid #e6ce99;border-radius:9px;padding:9px 13px;font-weight:750;cursor:pointer}
.group-dm-list{display:grid;align-content:start;gap:6px;margin-top:12px;max-height:54vh;overflow-y:auto}.group-dm-list>button{display:grid;text-align:left;background:#1b1d27;border:1px solid #373544;color:#f3e8d2;border-radius:9px;padding:10px;cursor:pointer}.group-dm-list>button small{font-size:11px;color:#abb3c4;margin-top:3px}.group-dm-list>button.group-dm-selected{border-color:#d3ae65;background:#2b2631}.group-dm-empty,.group-dm-welcome{color:#adb7c9;line-height:1.6;font-size:14px}
.group-dm-create{margin-top:12px;padding:12px;border:1px solid #615237;border-radius:10px;display:grid;gap:8px;background:#23202a}.group-dm-create[hidden]{display:none}.group-dm-create label{display:grid;gap:5px;font-size:12px;color:#d7bf90}.group-dm-create input:not([type=checkbox]){padding:8px;background:#11131a;color:#f6e5bd;border:1px solid #655c50;border-radius:8px;width:100%}.group-dm-friend-choices{max-height:120px;overflow-y:auto}.group-dm-friend{display:flex!important;gap:5px;align-items:center;padding:5px 0;color:#eee!important}
.group-dm-conversation{min-width:0;display:flex;flex-direction:column;background:#11121a;border:1px solid #37323a;border-radius:12px;padding:12px}.group-dm-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid #38333c}.group-dm-toolbar h3{margin:0;color:#ffe4af}.group-dm-meta{color:#c9b38f;font-size:12px}.group-dm-options{margin-left:auto;position:relative;font-size:12px;color:#d4b77c}.group-dm-options summary{cursor:pointer}.group-dm-controls{display:flex;flex-wrap:wrap;gap:6px;padding-top:7px}.group-dm-controls button{border:1px solid #79633f;background:#2d2930;color:#e7d8bf;border-radius:7px;padding:6px;cursor:pointer}
.group-dm-history{min-height:200px;max-height:48vh;flex:1;overflow:auto;display:grid;align-content:start;gap:7px;padding:12px 2px}.group-dm-message{padding:11px 13px;border:1px solid #373543;border-radius:12px;background:#1b1d27;overflow-wrap:anywhere}.group-dm-message-meta{display:flex;flex-wrap:wrap;gap:14px;color:#d8bd84;font-size:12px}.group-dm-message-meta time{color:#8f9bad}.group-dm-message p{white-space:pre-wrap;margin:6px 0 0;color:#eaeaf2;line-height:1.45;font-size:13px}.group-dm-compose{display:flex;gap:9px;align-items:stretch;border-top:1px solid #38333c;padding-top:12px}.group-dm-compose textarea{flex:1;min-width:0;resize:vertical;max-height:130px;min-height:44px;background:#161821;color:#fff;border:1px solid #76613b;border-radius:10px;padding:10px}
.group-dm-dialog button:focus-visible,.group-dm-dialog input:focus-visible,.group-dm-dialog textarea:focus-visible,.group-dm-launcher:focus-visible{outline:2px solid #e7c577;outline-offset:2px}
@media(max-width:670px){.group-dm-dialog{padding:12px}.group-dm-layout{grid-template-columns:1fr}.group-dm-sidebar{max-height:34vh;overflow:auto}.group-dm-history{max-height:34vh}.group-dm-compose{flex-wrap:wrap}.group-dm-compose button{width:100%}}
.group-dm-pending{margin-top:12px;display:grid;gap:7px}.group-dm-invite{display:grid;gap:5px;background:#2b261f;border:1px solid #836c3d;border-radius:10px;padding:10px}.group-dm-invite strong{color:#ffe2a4}.group-dm-invite small{color:#b9b4b0}.group-dm-invite-actions{display:flex;gap:6px}.group-dm-invite-actions button{border:1px solid #b18f51;border-radius:7px;background:#382e26;color:#f3dba7;padding:6px 9px;cursor:pointer}
.group-dm-controls{display:grid;gap:8px;min-width:min(300px,65vw);max-width:420px}.group-dm-management-row{display:flex;gap:6px;align-items:center}.group-dm-management-row[hidden]{display:none}.group-dm-management-row input,.group-dm-management-row select{min-width:0;flex:1;color:#f8e5c5;background:#171821;border:1px solid #79633f;border-radius:7px;padding:7px}.group-dm-management-row button{flex-shrink:0}

/* v0.117 group DM member panel */
.group-dm-member-toggle{cursor:pointer;text-decoration:underline;text-decoration-color:rgba(204,174,114,.3);text-underline-offset:2px}.group-dm-member-toggle:hover{color:#ffebba;text-decoration-color:#d5b273}
.group-dm-member-panel{display:grid;gap:4px;padding:8px 0}.group-dm-member-panel[hidden]{display:none}
.group-dm-member-row{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:1px solid transparent;border-radius:8px;padding:6px 8px;color:#f1e8d8;font:inherit;cursor:pointer}.group-dm-member-row:hover{background:#2b261f;border-color:#836c3d}.group-dm-member-row:focus-visible{outline:2px solid #eac783;outline-offset:2px}
.group-dm-member-avatar{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#382e26;color:#d5b273;font-size:12px;font-weight:600;flex-shrink:0}

/* ONEHUB v0.73 — accessible, subdued group-message reactions. */
.group-dm-reactions{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:9px}
.group-dm-reaction-pill,.group-dm-reaction-choices button{background:#252631;border:1px solid #61513b;border-radius:999px;color:#f2e3c9;padding:4px 9px;font-size:12px;cursor:pointer;min-height:29px}
.group-dm-reaction-pill[aria-pressed="true"]{border-color:#e1bb73;color:#ffdf9d;background:#413527}
.group-dm-reaction-picker{position:relative;font-size:12px;color:#cba96e}
.group-dm-reaction-picker summary{border:1px solid #655439;border-radius:999px;padding:5px 10px;cursor:pointer;list-style:none}
.group-dm-reaction-picker summary::-webkit-details-marker{display:none}
.group-dm-reaction-choices{position:absolute;z-index:3;left:0;bottom:calc(100% + 5px);background:#191c27;border:1px solid #846a40;border-radius:12px;padding:8px;display:flex;gap:5px;box-shadow:0 10px 30px #0008}
.group-dm-reaction-picker:not([open]) .group-dm-reaction-choices{display:none}
.group-dm-reaction-pill:focus-visible,.group-dm-reaction-picker summary:focus-visible,.group-dm-reaction-choices button:focus-visible{outline:2px solid #f0cb84;outline-offset:2px}

/* v0.75 — Group DMs live in the global Home conversation canvas, never a modal. */
.group-dm-main[hidden]{display:none!important}
body.viewing-group .chat-header,body.viewing-group #messages,
body.viewing-group #compose,body.viewing-group #load-earlier,
body.viewing-group #voice-stage,body.viewing-group #control-room,
body.viewing-group #home-dashboard{display:none!important}
body.viewing-group .members{display:none!important}
body.viewing-group #group-dms-view:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden;
 padding:clamp(12px,2.1vw,26px);background:linear-gradient(150deg,#0d0d14 0%,#15121c 85%);color:#f2e8d6}
.group-dm-main .group-dm-heading{flex-shrink:0;padding:6px 4px 14px;border-bottom:1px solid #3a3030;align-items:center}
.group-dm-main .group-dm-heading h2{font-size:clamp(19px,2.1vw,26px);line-height:1.2}
.group-dm-main .group-dm-status{flex-shrink:0;margin:9px 4px;color:#aebaca}
.group-dm-main .group-dm-layout{flex:1;min-height:0;overflow:hidden;grid-template-columns:minmax(178px,27%) minmax(0,1fr);gap:12px}
.group-dm-main .group-dm-sidebar{overflow-y:auto;min-height:0}
.group-dm-main .group-dm-conversation{min-height:0;overflow:hidden}
.group-dm-main .group-dm-history{min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain}
.group-dm-main .group-dm-list{max-height:none;overflow:visible}
.group-dm-main .group-dm-create{max-width:100%}
.group-dm-main .group-dm-controls{max-width:min(380px,65vw);min-width:0}
.group-dm-main .group-dm-reaction-picker summary{display:inline-flex}
.group-dm-main button:focus-visible,.group-dm-main summary:focus-visible,
.group-dm-main textarea:focus-visible,.group-dm-main input:focus-visible,
.group-dm-main select:focus-visible{outline:2px solid #e6c27d;outline-offset:2px}
@media(max-width:670px){body.viewing-group #group-dms-view:not([hidden]){padding:9px}
 .group-dm-main .group-dm-layout{grid-template-columns:1fr;grid-template-rows:minmax(108px,26%) minmax(0,1fr);gap:7px}
 .group-dm-main .group-dm-sidebar{max-height:none;padding:8px}
 .group-dm-main .group-dm-conversation{padding:9px}
 .group-dm-main .group-dm-history{max-height:none}
 .group-dm-main .group-dm-compose{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;align-items:end}
 .group-dm-main .group-dm-compose button{width:100%;grid-column:1/-1}
 .group-dm-main .group-dm-compose textarea{width:100%;min-width:0;grid-column:1/-1}
 .group-dm-main .group-dm-compose input[type=file]{max-width:100px}
 .group-dm-main .group-dm-heading{padding:0 1px 8px}
}

/* v0.76 — persistent account-wide group inbox, distinct from community channels. */
.home-group-section{margin:12px 0 0;padding:0 3px;min-width:0}
.section-label-groups{float:none!important;display:flex;align-items:center;gap:8px;min-height:30px;margin:12px 3px 7px;padding:0 3px;letter-spacing:.11em}
.section-label-groups button{float:none;margin-left:auto;min-width:27px;min-height:27px;border:1px solid #5b4930;border-radius:8px;background:#221c18;color:#f0d5a0;cursor:pointer}
.section-label-groups button:hover{border-color:#caa864;background:#34291d}
.home-group-badge,.home-group-unread-count{color:#211911;background:#dfbb75;border-radius:999px;font-weight:800;font-size:10px;min-width:19px;min-height:19px;padding:2px 5px;text-align:center;font-variant-numeric:tabular-nums}
.home-group-badge[hidden],.home-group-invites[hidden]{display:none!important}
.home-group-inbox{display:grid;gap:3px;min-width:0}
.home-group-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;column-gap:8px;row-gap:2px;width:100%;min-height:43px;padding:7px 10px;border:1px solid transparent;border-radius:10px;background:transparent;color:#e6d5b4;text-align:left;cursor:pointer}
.home-group-item:hover{background:#211e23;border-color:#514631}
.home-group-item.active{background:linear-gradient(90deg,#2c241a,#191820);border-color:#8d6b38;box-shadow:inset 3px 0 #dbb66d}
.home-group-name{grid-column:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:650}
.home-group-members{grid-column:1;font-size:10px;color:#a99c9a}
.home-group-unread-count{grid-column:2;grid-row:1/3;align-self:center}
.home-group-invites,.home-group-all{display:block;width:100%;padding:8px 10px;border:1px solid #59472e;border-radius:9px;background:#201b18;color:#e5c995;text-align:left;cursor:pointer;font-size:11px;margin:5px 0}
.home-group-invites{background:#33271d;border-color:#a3834e;font-weight:750}
.home-group-all{background:transparent;border-color:transparent;color:#c2a978}
.home-group-all:hover,.home-group-invites:hover{background:#35291e;border-color:#b19257}
.home-group-empty{font-size:11px;line-height:1.45;color:#988f99;padding:5px 10px;margin:0}
.home-group-item:focus-visible,.home-group-invites:focus-visible,.home-group-all:focus-visible,.section-label-groups button:focus-visible{outline:2px solid #e9c578;outline-offset:2px}

/* v0.77 — account-wide People dashboard and privacy-conscious profile studio. */
.home-requests-section[hidden]{display:none!important}
.home-requests-list{display:grid;gap:9px}
.home-section-description{color:#b5aaa3;font-size:12px;margin:-3px 0 11px}
.home-request-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;background:linear-gradient(105deg,#24201e,#1a1922);border:1px solid #6e593a;border-radius:13px;min-width:0}
.home-request-identity{display:flex;align-items:center;gap:11px;min-width:0}
.home-request-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.home-request-actions button{border-radius:9px;min-height:36px;padding:8px 13px}
.home-friends-heading{display:flex;align-items:end;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:8px 0 12px}
.home-friends-heading h2{margin:0}
.home-friend-search-label{font-size:11px;color:#d6c5ab;display:grid;gap:5px;min-width:min(240px,100%)}
.home-friend-search-label input{background:#17171e;border:1px solid #61513a;border-radius:9px;color:#f4e8d7;padding:10px 12px;min-height:40px;max-width:100%}
.home-friend-search-label input:focus-visible,.home-request-actions button:focus-visible{outline:2px solid #f0cb82;outline-offset:2px}
.profile-studio{width:min(460px,calc(100vw - 30px));max-height:min(82vh,720px);position:relative;padding:0!important;background:#14141c;color:#f4e9d9;border:1px solid #947346;border-radius:21px;box-shadow:0 28px 110px #000b;overflow-y:auto}
.profile-studio::backdrop{background:#030406bb;backdrop-filter:blur(5px)}
.profile-studio-close{position:absolute;top:12px;right:12px;z-index:2;border:1px solid #5b4b38;background:#28232a;color:#e6d6b9;border-radius:9px;width:34px;height:34px;cursor:pointer}
.profile-studio .friend-profile-body{display:grid;gap:16px;margin:0;padding:0 22px 22px}
.profile-studio-hero{padding:35px 0 16px;display:flex;align-items:center;gap:15px;border-bottom:1px solid #494032;min-width:0}
.profile-studio-avatar{width:66px;height:66px;flex:0 0 66px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(140deg,#e2c582,#946f3c);color:#14120e;font-weight:900;font-size:23px}
.profile-studio-identity{min-width:0}.profile-studio-kicker{font-size:9px;color:#d7b774;letter-spacing:.14em;font-weight:800}.profile-studio-identity h2{color:#fce9bf;font-size:23px;margin:7px 0 2px;overflow-wrap:anywhere}.profile-studio-identity p{margin:0}
.profile-studio-presence{display:flex;flex-wrap:wrap;gap:7px;align-items:center;background:#1e1d27;border:1px solid #3b3540;border-radius:12px;padding:11px 12px;font-size:12px;color:#c9c3bc}
.profile-studio-presence strong{color:#f0e2c9}.profile-studio-presence-dot{width:10px;height:10px;border-radius:99px;background:#747780}.profile-studio-presence-dot[data-status="available"]{background:#59c7a2}.profile-studio-presence-dot[data-status="away"]{background:#e6bd72}.profile-studio-presence-dot[data-status="busy"]{background:#e87b7b}
.profile-studio-status{flex-basis:100%;margin:2px 0 0!important;color:#aeb8c6}
.profile-studio-about{display:grid;gap:7px}.profile-studio-about h3{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#c6a973}.profile-studio-about p{font-size:13px;color:#e3d6ca;line-height:1.6;white-space:pre-wrap}
.profile-studio-actions{display:flex;justify-content:flex-end;gap:10px}.profile-studio-actions button{min-height:39px;padding:8px 16px;border-radius:9px;border:1px solid #755b36;background:#2b2524;color:#f2dfb8;cursor:pointer}.profile-studio-actions button.home-primary{background:#d9b976;color:#211914}
.profile-studio button:focus-visible{outline:2px solid #f4d28c;outline-offset:3px}
@media(max-width:600px){.home-request-card{align-items:stretch;flex-direction:column}.home-request-actions{justify-content:flex-end}.home-friends-heading{align-items:stretch;flex-direction:column}.home-friend-search-label{width:100%}.profile-studio .friend-profile-body{padding:0 16px 17px}}

/* v0.79: account-safe, consent-based group ownership handover */
.group-dm-owner-offer{border:1px solid #93713c;background:linear-gradient(120deg,rgba(183,138,69,.15),rgba(24,24,29,.95));border-radius:10px;padding:12px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:#f4dbac}
.group-dm-owner-offer strong{flex-basis:100%;font-size:12px;letter-spacing:.015em}
.group-dm-owner-offer[hidden],.group-dm-management-row[hidden]{display:none!important}
.group-dm-owner-offer button:focus-visible,.group-dm-management-row button:focus-visible,.group-dm-management-row select:focus-visible{outline:2px solid #d5b76e;outline-offset:3px}
@media(max-width:780px){.group-dm-management-row{flex-wrap:wrap}.group-dm-management-row select{flex-basis:100%}.group-dm-owner-offer button{min-height:36px}}

/* v0.80: compact, keyboard-friendly group message controls and invite administration. */
.group-dm-pending-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-top:1px solid #494034;flex-wrap:wrap}
.group-dm-invite-admin>strong{font-size:12px;color:#d6b776}
.group-dm-message-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.group-dm-message-actions button,.group-dm-edit button{border:1px solid #75603d;background:#2d2930;color:#f1dcae;border-radius:7px;padding:5px 9px;font-size:12px;cursor:pointer}
.group-dm-edit{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.group-dm-edit textarea{flex:1 1 100%;min-height:60px;resize:vertical;border-radius:8px;border:1px solid #bf9e5c;background:#161821;color:#fff;padding:9px}
.group-dm-message-actions button:focus-visible,.group-dm-edit :focus-visible,.group-dm-pending-row button:focus-visible{outline:2px solid #e1bb72;outline-offset:2px}
.group-dm-edited{color:#a89b87;font-size:11px}

/* v0.82: reauthenticate device revocation; never hide the confirmation field. */
.security-dialog .session-reauth{display:grid;gap:.5rem;max-width:32rem;margin:1rem 0;color:var(--text-secondary,#b8ad97);font-size:.86rem}
.security-dialog #session-confirm-password{width:100%;min-width:0;box-sizing:border-box;border:1px solid rgba(207,174,113,.34);border-radius:10px;background:#121319;color:#f4eddf;padding:.75rem .9rem}
.security-dialog #session-confirm-password:focus-visible{outline:2px solid #d6b772;outline-offset:2px}
.role-mention{display:inline-block;padding:0 .3rem;border:1px solid currentColor;border-radius:.35rem;background:rgba(201,162,39,.1);font-weight:700}.role-mention-list{display:grid;gap:.5rem;margin:1rem 0}.role-mention-option{text-align:left}
.events-calendar{margin:12px 0 18px;padding:12px;background:#171a24;border:1px solid #414557;border-radius:12px}.events-calendar-heading{display:block;margin-bottom:10px;color:#d4b678}.events-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.events-calendar-day,.events-calendar-empty,.events-calendar-cell{min-height:28px;display:grid;place-items:center;font-size:12px}.events-calendar-day{color:#a4a6b9}.events-calendar-cell{border:1px solid #303645;border-radius:6px;color:#e7e7f2}.events-calendar-cell.has-events{background:#3a3020;border-color:#d4b678;color:#f6d994;font-weight:700}
 .command-menu{display:flex;flex-direction:column;position:absolute;z-index:20;left:0;right:0;bottom:100%;max-height:18rem;overflow:auto;background:var(--panel,#161616);border:1px solid var(--gold,#c9a227);border-radius:8px;padding:.35rem;box-shadow:0 8px 24px #0008}.command-menu-item{display:block;width:100%;padding:.55rem .7rem;text-align:left;color:inherit;background:transparent;border:0;border-radius:5px;cursor:pointer}.command-menu-item:hover,.command-menu-item:focus{background:#c9a22733;outline:2px solid var(--gold,#c9a227)}
 #compose{position:relative}
.developer-portal{width:min(58rem,calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto}.developer-portal form{display:grid;grid-template-columns:minmax(10rem,1fr) minmax(14rem,2fr) minmax(12rem,1fr) auto;gap:.65rem}.developer-subscriptions,.developer-deliveries{display:grid;gap:.65rem;margin:.75rem 0 1rem}.developer-portal .audit-row{overflow-wrap:anywhere}@media(max-width:700px){.developer-portal{width:calc(100vw - 1rem);margin:.5rem}.developer-portal form{grid-template-columns:1fr}.developer-portal button,.developer-portal input,.developer-portal select{min-height:2.75rem}}
