/* Full-width chrome sits in front of the rail and navigation surfaces. */
.chrome-layer{position:fixed;left:0;right:0;height:48px;background:var(--toolbar);pointer-events:none;z-index:40}
#top-chrome-layer{top:var(--upper-open);box-shadow:var(--toolbar-shadow-down)}
#bottom-chrome-layer{bottom:var(--lower-open);box-shadow:var(--toolbar-shadow-up)}
#world-corner{position:fixed;left:0;top:var(--upper-open);width:var(--rail-width);height:48px;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;z-index:51;color:var(--ink)}
#world-corner svg{width:28px;height:28px}
#profile{position:fixed;left:0;bottom:var(--lower-open);width:var(--rail-width);height:48px;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;z-index:51;color:var(--muted)}
#profile svg{width:24px;height:24px}
#rail{top:calc(48px + var(--upper-open));bottom:calc(48px + var(--lower-open));z-index:21;padding:0;overflow:hidden}
#community-icons{max-height:calc(100% - 128px)}
.rail-bottom{padding-bottom:12px}
#navigator{top:calc(48px + var(--upper-open));bottom:calc(48px + var(--lower-open));z-index:20;box-shadow:var(--column-shadow)}
#nav-tools-bar,#nav-profile-bar{display:none;position:fixed;left:var(--rail-width);width:var(--nav-width);height:48px;min-height:48px;z-index:51;background:transparent;box-shadow:none;border:0}
#nav-tools-bar{top:var(--upper-open)}
#nav-profile-bar{bottom:var(--lower-open)}
body.in-community:not(.nav-collapsed) #nav-tools-bar,body.in-community:not(.nav-collapsed) #nav-profile-bar{display:flex}
#topbar,#bottom-bar,body.chat-pullouts.upper-extended #topbar,body.chat-pullouts.lower-extended #bottom-bar{background:transparent;box-shadow:none;border:0;z-index:51;padding:0;gap:0}
#topbar .top-actions{margin-left:auto;gap:6px;padding-right:4px}
#room-heading{padding:0 10px}
#menu{display:flex;min-width:24px;width:24px;height:32px;align-items:center;justify-content:center;font:18px/1 system-ui;color:var(--muted);border-radius:4px;margin-right:4px}
#menu:after{display:none}
#menu svg{display:none}
.shell-grip{width:32px;min-width:32px;flex-shrink:0}
#top-pull,#top-pull-right,#bottom-pull,#bottom-pull-right,.composer-pull{touch-action:none;cursor:ns-resize;height:48px}
#top-pull:after,#top-pull-right:after,#bottom-pull:after,#bottom-pull-right:after,.composer-pull:after{width:12px;height:14px;background:repeating-linear-gradient(90deg,currentColor 0 1px,transparent 1px 5px)}
#bottom-bar .text-button{margin-left:auto}
#bottom-bar .local-label{margin-left:auto}
#bottom-bar #breadcrumb{padding-left:10px}
#bottom-bar #bottom-pull-right{margin-left:8px}
body.chat-room #bottom-bar>*{visibility:hidden}
body.chat-room #bottom-bar>#bottom-pull{visibility:hidden;pointer-events:none}
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer,body.chat-room.lower-extended #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer{z-index:52;background:transparent;box-shadow:none;padding:0 32px;border-radius:0;gap:0}
.composer-pull{position:absolute;top:0;width:32px;min-width:32px}
.composer-pull-left{left:0;right:auto}
.composer-pull-right{right:0;left:auto}
body.upper-extended #top-chrome-layer{border-radius:0}
body.lower-extended #bottom-chrome-layer{border-radius:0}
/* The fifth column reserves chrome-sized caps and never overlaps content. */
#scroll-column{position:fixed;top:0;bottom:0;right:0;width:var(--scroll-width);padding-top:calc(48px + var(--upper-open));padding-bottom:calc(48px + var(--lower-open));z-index:30;pointer-events:none;background:transparent}
#scroll-column>.scroll-track{pointer-events:auto;left:0!important}
#workspace{margin-right:var(--scroll-width)}
#discover-view{padding-right:var(--edge-space)}
.chat-history{padding-right:var(--edge-space)}
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer{right:var(--scroll-width)}
@media(max-width:760px){
 #nav-tools-bar,#nav-profile-bar{display:none!important}
 body.in-community.nav-open #nav-tools-bar,body.in-community.nav-open #nav-profile-bar{display:flex!important}
 #nav-tools-bar,#nav-profile-bar{z-index:56}
 #close-nav{top:50px}
 #topbar #menu{display:flex}
 .shell-grip{width:26px;min-width:26px}
 body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer{padding:0 26px}
 .composer-pull{width:26px;min-width:26px}
 .chat-history{padding-right:var(--edge-space)}
 #room-heading{padding:0 5px}
 #topbar .top-actions{padding:0}
 #search-form{margin-left:3px;margin-right:3px}
 #topbar .wordmark{display:none}
}

/* Square shared chrome; only the growing composer protrudes with rounded tips. */
#bottom-chrome-layer{box-shadow:var(--toolbar-shadow-up),var(--toolbar-shadow-down);border-radius:0}
#top-chrome-layer{border-radius:0}
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer{height:var(--composer-height,48px);min-height:48px;align-items:center}
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer.composer-expanded{background:var(--toolbar);border-radius:14px 14px 0 0;box-shadow:none}
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer .composer-box{height:auto;min-height:34px;align-items:flex-end}
body.chat-room .composer-box textarea{min-height:32px;max-height:160px;line-height:16px;padding:8px 4px;overflow-y:hidden}
body.chat-room .composer-box>.icon-button{margin-bottom:1px}
body.chat-room .composer-pull{height:100%}
.chat-history{padding-bottom:calc(var(--edge-space) + var(--composer-extra,0px))}

#topbar,#bottom-bar,body.chat-pullouts.upper-extended #topbar,body.chat-pullouts.lower-extended #bottom-bar{border-radius:0}

/* Project the raised rounded edge onto the chat, without side/bottom shadows. */
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer.composer-expanded:before{
 content:"";display:block;position:absolute;left:0;right:0;top:0;width:auto;height:16px;opacity:1;
 border-radius:14px 14px 0 0;background:transparent;box-shadow:var(--toolbar-shadow-up);
 clip-path:inset(-20px 0 0 0);pointer-events:none;z-index:-1;
}

/* Fixed lighting: growth adds crown material above the original 48px profile. */
:root{
 --toolbar-gloss:linear-gradient(180deg,#fff 0%,#fcfdfe 14%,#f7f8fa 38%,#f0f2f5 62%,#e9ecf0 100%);
 --toolbar-base:#e9ecf0;--toolbar-crown:#fff;--toolbar-cap:#fff;--toolbar-rim:#ffffffb3;
}
:root[data-theme=dark]{
 --toolbar-gloss:linear-gradient(180deg,#4c5055 0%,#45494e 14%,#3b3f44 38%,#33363b 62%,#2c2e31 100%);
 --toolbar-base:#2c2e31;--toolbar-crown:#4c5055;--toolbar-cap:#51565c;--toolbar-rim:#ffffff18;
}
#top-chrome-layer,#bottom-chrome-layer{
 background-color:var(--toolbar-base);background-image:var(--toolbar-gloss);
 background-position:center bottom;background-size:100% 48px;background-repeat:no-repeat;
}
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer.composer-expanded{
 background-color:var(--toolbar-crown);
 background-image:linear-gradient(var(--toolbar-cap),var(--toolbar-crown)),var(--toolbar-gloss);
 background-position:center top,center bottom;background-size:100% 12px,100% 48px;background-repeat:no-repeat;
}
body.chat-room #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer.composer-expanded:before{
 box-shadow:inset 0 1px 0 var(--toolbar-rim),var(--toolbar-shadow-up);
}
