/* Drive-style organization inside the accepted four-column shelf. */
.shelf-nav-heading{display:flex;align-items:center;gap:8px;padding:15px 12px 10px;position:relative;z-index:4}.shelf-nav-heading>span{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.shelf-nav-heading small,.shelf-tree-label{font-size:8px;letter-spacing:1.25px;color:var(--muted)}.shelf-nav-heading strong{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shelf-new-menu{position:relative;flex-shrink:0}.shelf-new-menu summary{list-style:none;cursor:pointer;background:var(--raised);border:1px solid var(--line);box-shadow:var(--control-shadow);padding:8px 10px;border-radius:7px;font-size:11px;white-space:nowrap}.shelf-new-menu summary::-webkit-details-marker{display:none}.shelf-new-menu>div{position:absolute;right:0;top:calc(100% + 5px);width:166px;display:grid;gap:2px;background:var(--surface);border:1px solid var(--line);padding:5px;border-radius:8px;box-shadow:var(--shadow);z-index:10}.shelf-new-menu button{display:flex;align-items:center;gap:9px;padding:9px 8px;font-size:11px;text-align:left;border-radius:4px}.shelf-new-menu button:hover{background:var(--inset)}.shelf-new-menu svg{width:16px;height:16px}
.board-nav-search{position:relative;padding:6px 12px 9px}.board-nav-search>span{position:absolute;left:21px;top:14px;color:var(--muted);height:15px}.board-nav-search svg{width:14px;height:14px}.board-nav-search input{padding:8px 7px 8px 28px;font-size:11px;border-radius:6px;background:var(--inset)}.shelf-quick-links{display:grid;grid-template-columns:1fr 1fr;gap:3px 5px;padding:4px 12px 10px}.shelf-quick-links button{display:flex;align-items:center;gap:8px;font-size:11px;padding:7px 8px;text-align:left;border-radius:5px;color:var(--muted)}.shelf-quick-links svg{width:15px;height:15px}.shelf-quick-links button:hover,.shelf-quick-links button.active{background:var(--inset);color:var(--ink)}.shelf-tree-label{padding:10px 14px 7px;border-top:1px solid var(--line)}.shelf-tree-board-row{display:flex;align-items:center;padding:0 9px 0 6px}.shelf-tree-toggle{height:30px;min-width:20px;font-size:15px;color:var(--muted)}.shelf-tree-root,.shelf-tree-section{display:flex;align-items:center;gap:8px;text-align:left;height:32px;padding:0 8px;border-radius:5px;color:var(--muted);min-width:0;font-size:11px}.shelf-tree-root{flex:1}.shelf-tree-root span,.shelf-tree-section span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shelf-tree-root svg,.shelf-tree-section svg{width:16px;height:16px;flex-shrink:0}.shelf-tree-root.active,.shelf-tree-section.active{background:var(--inset);color:var(--ink)}.shelf-tree-root:hover,.shelf-tree-section:hover{background:var(--inset)}.shelf-tree-section{width:calc(100% - 18px);margin:1px 9px;padding-left:calc(16px + var(--depth) * 14px)}.shelf-current-channel{width:4px;height:4px;border-radius:50%;background:var(--accent);margin-left:auto;flex-shrink:0}.shelf-sort{display:flex;align-items:center;gap:7px;padding:2px 13px 10px;font-size:10px;color:var(--muted)}.shelf-sort select{border:0;border-radius:4px;background:transparent;color:var(--ink);padding:4px;min-width:0;flex:1;font-size:10px}.shelf-sort select option{background:var(--surface)}.shelf-sort button{width:24px;height:24px;border:1px solid var(--line);border-radius:4px;background:var(--raised)}
#shelf-selection:empty{display:none}#shelf-selection{margin:2px 12px 12px;padding:10px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}.shelf-selection-heading{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin-bottom:8px}.shelf-selection-heading>button{font-size:18px;width:22px;height:22px;color:var(--muted)}.shelf-actions{display:flex;flex-wrap:wrap;gap:5px}.shelf-actions button{font-size:10px;padding:5px 7px;border:1px solid var(--line);border-radius:4px;background:var(--raised)}.shelf-actions button:disabled{opacity:.35;cursor:default}.shelf-item-details{display:grid;grid-template-columns:46px minmax(0,1fr);gap:6px;font-size:9px;margin:12px 0 0;color:var(--muted)}.shelf-item-details dd{margin:0;overflow-wrap:anywhere}.shelf-item-details dt{color:var(--ink)}#shelf-status{padding:0 13px;margin:10px 0;font-size:10px;color:var(--muted)}#shelf-status:empty{display:none}
#board-browser-scroll,body:not(.nav-open) #board-browser-scroll{padding:8px var(--edge-space) 24px}#shelf-path{display:flex;align-items:center;gap:8px;min-height:34px;margin:0 0 13px;padding-left:54px;flex-wrap:wrap;color:var(--muted);font-size:11px}#shelf-path button{font-size:11px;border-radius:4px;max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:5px 4px}#shelf-path button:hover{background:var(--inset);color:var(--ink)}#shelf-path button:last-child,#shelf-path strong{font-weight:600;color:var(--ink)}.shelf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:12px}.shelf-item{position:relative;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);user-select:none}.shelf-item.selected{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--surface))}.shelf-item:hover{border-color:var(--muted)}.shelf-grid .shelf-item{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:135px 28px 22px;overflow:hidden}.shelf-item-check{display:flex;align-items:center;justify-content:center;z-index:2}.shelf-item-check input{margin:0;accent-color:var(--accent);cursor:pointer}.shelf-grid .shelf-item-check{position:absolute;left:8px;top:8px;background:var(--surface);border-radius:4px;width:20px;height:20px}.shelf-image-preview,.shelf-generic-preview,.shelf-document-preview{grid-column:1 / -1;min-width:0;overflow:hidden;background:var(--inset);margin:7px 7px 0;border-radius:5px}.shelf-image-preview img{width:100%;height:100%;object-fit:cover;display:block}.shelf-document-preview{position:relative;padding:18px 18px 8px 36px;background:var(--bg)}.shelf-document-preview>span{position:absolute;left:12px;top:18px;color:var(--accent)}.shelf-document-preview svg{width:17px;height:17px}.shelf-document-preview pre{margin:0;white-space:pre-wrap;word-break:break-word;font:9px/1.7 system-ui;color:var(--muted)}.shelf-generic-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:var(--muted);font-size:10px}.shelf-generic-preview svg{width:38px;height:38px}.shelf-item-name{font-size:11px;font-weight:500;line-height:1.3;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 28px 0 10px;min-width:0}.shelf-grid .shelf-item-name{grid-column:1 / -1}.shelf-item-kind,.shelf-item-date,.shelf-item-size{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shelf-grid .shelf-item-kind{padding-left:10px}.shelf-grid .shelf-item-date{padding:0 28px 0 4px}.shelf-grid .shelf-item-size{display:none}.shelf-item-more{color:var(--muted);border-radius:4px;width:24px;height:24px;font-size:18px}.shelf-item-more:hover{background:var(--inset);color:var(--ink)}.shelf-grid .shelf-item-more{position:absolute;right:3px;bottom:7px}.shelf-item-star{position:absolute;right:10px;top:11px;font-size:12px;color:var(--accent)}.shelf-item-location{grid-column:1 / -1;font-size:9px;color:var(--muted);padding:0 10px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shelf-grid .shelf-item:has(.shelf-item-location){grid-template-rows:135px 28px 22px 20px}
.shelf-grid .shelf-folder{display:flex;align-items:center;gap:8px;height:58px;padding:8px 26px 8px 34px}.shelf-folder-image{display:flex;align-items:center;justify-content:center;width:24px;min-width:24px;color:var(--muted)}.shelf-folder-image svg{width:24px;height:24px}.shelf-grid .shelf-folder .shelf-item-check{top:18px;left:7px;background:transparent;width:18px}.shelf-grid .shelf-folder .shelf-item-name{flex:1;padding:0}.shelf-grid .shelf-folder .shelf-item-kind,.shelf-grid .shelf-folder .shelf-item-date,.shelf-grid .shelf-folder .shelf-item-size{display:none}.shelf-grid .shelf-folder .shelf-item-more{bottom:16px}.shelf-grid .shelf-folder .shelf-item-star{top:2px;right:6px;font-size:9px}.shelf-grid .shelf-folder .shelf-item-location{display:none}
.shelf-list{display:flex;flex-direction:column;gap:0}.shelf-list-head,.shelf-list .shelf-item{display:grid;grid-template-columns:28px 28px minmax(100px,1fr) 86px 88px 65px 28px;gap:8px;align-items:center;padding:0 7px}.shelf-list-head{font-size:10px;color:var(--muted);height:34px;border-bottom:1px solid var(--line)}.shelf-list .shelf-item{min-height:47px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}.shelf-list .shelf-item.selected,.shelf-list .shelf-item:hover{background:var(--inset)}.shelf-list-icon{display:flex;color:var(--muted)}.shelf-list-icon svg{width:20px;height:20px}.shelf-list .shelf-item-name{padding:0;font-size:11px}.shelf-list .shelf-item-star{right:33px;top:3px;font-size:8px}.shelf-list .shelf-item-location{grid-column:3 / -1;margin-top:-5px;padding:0 0 8px}.shelf-list .shelf-item-more{grid-column:7}
.shelf-empty{grid-column:1 / -1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;padding:38px 16px;color:var(--muted);font-size:11px;min-height:170px}.shelf-empty>svg{width:44px;height:44px;stroke-width:1;opacity:.55;margin-bottom:5px}.shelf-empty strong{font-size:12px;font-weight:500;color:var(--ink)}.shelf-empty button{font-size:11px;padding:8px 12px;background:var(--raised);border:1px solid var(--line);border-radius:5px;margin-top:5px}.shelf-drop-target{outline:2px solid var(--accent)!important;outline-offset:-2px;background:var(--inset)!important}
.shelf-dialog{max-width:min(440px,calc(100vw - 24px));width:400px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);padding:0;box-shadow:0 16px 60px #0006}.shelf-dialog::backdrop{background:#0005}.shelf-form{padding:18px}.shelf-form header,.shelf-context-actions header{display:flex;align-items:center;gap:12px;margin-bottom:16px}.shelf-form h2{margin:0;flex:1;font-size:16px;font-weight:600}.shelf-form [data-cancel],.shelf-context-actions [data-dismiss]{color:var(--muted)}.shelf-form header button,.shelf-context-actions header button{margin-left:auto;font-size:22px;width:26px;height:26px}.shelf-form label{display:flex;flex-direction:column;gap:7px;font-size:11px;margin-bottom:15px}.shelf-form input,.shelf-form select{width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:5px;background:var(--bg);color:var(--ink);font-size:12px}.shelf-form-error{font-size:11px;color:var(--ink);margin:5px 0 10px}.shelf-form footer{display:flex;justify-content:flex-end;gap:8px}.shelf-form footer button{padding:8px 13px;border:1px solid var(--line);background:var(--raised);border-radius:5px;font-size:11px}.shelf-form footer .primary{background:var(--ink);color:var(--surface)}.shelf-context-actions{padding:10px;display:flex;flex-direction:column;gap:3px}.shelf-context-actions header{padding:0 5px;margin-bottom:5px;font-size:12px}.shelf-context-actions>button{text-align:left;padding:9px;border-radius:4px;font-size:12px}.shelf-context-actions>button:hover{background:var(--inset)}
#file-windows{position:fixed;inset:0;pointer-events:none;z-index:35}.file-window{position:fixed;display:flex;flex-direction:column;min-width:160px;min-height:120px;max-width:100vw;max-height:100dvh;background:var(--surface);border:1px solid var(--line);border-radius:9px;box-shadow:0 12px 35px #0005;pointer-events:auto;resize:both;overflow:hidden;outline:none}.file-window:focus-within{box-shadow:0 12px 35px #0005,0 0 0 1px color-mix(in srgb,var(--accent) 45%,transparent)}.file-window-title{height:36px;min-height:36px;display:flex;align-items:center;gap:7px;padding:0 7px 0 11px;background:var(--toolbar-gloss,var(--toolbar));background-size:100% 48px;cursor:move;touch-action:none;user-select:none}.file-window-title strong{font-size:11px;font-weight:600;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-window-kind{font-size:8px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted)}.file-window-title button{width:25px;height:25px;color:var(--muted);border-radius:4px;font-size:17px;cursor:pointer}.file-window-title button:hover{background:var(--inset);color:var(--ink)}.file-window-content{flex:1;min-height:0;overflow:auto;display:flex;align-items:center;justify-content:center;background:var(--bg)}.file-window-content>img{width:100%;height:100%;object-fit:contain}.file-window-content>iframe{width:100%;height:100%;border:0}.file-window-content>video{max-width:100%;max-height:100%}.file-window-content>audio{width:calc(100% - 40px)}.floating-text-editor{width:100%;height:100%;border:0;resize:none;outline:0;background:var(--surface);color:var(--ink);padding:22px;font:13px/1.75 system-ui;tab-size:4}.file-window-status{height:24px;min-height:24px;display:flex;align-items:center;gap:15px;justify-content:space-between;padding:0 10px;border-top:1px solid var(--line);color:var(--muted);font-size:9px}.file-window-status span:last-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.floating-link{padding:25px;color:var(--accent);overflow-wrap:anywhere;font-size:13px}.file-no-preview{text-align:center;padding:25px;font-size:12px;color:var(--muted)}.file-no-preview strong{color:var(--ink)}
@media(max-width:1100px){.shelf-list-head,.shelf-list .shelf-item{grid-template-columns:28px 24px minmax(80px,1fr) 80px 60px 24px}.shelf-list .shelf-item-kind,.shelf-list-head>span:nth-child(4){display:none}.shelf-list .shelf-item-more{grid-column:6}}
@media(max-width:760px){.shelf-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}.shelf-list-head,.shelf-list .shelf-item{grid-template-columns:26px 24px minmax(0,1fr) 24px;gap:6px}.shelf-list .shelf-item-date,.shelf-list .shelf-item-size,.shelf-list-head>span:nth-child(5),.shelf-list-head>span:nth-child(6){display:none}.shelf-list .shelf-item-more{grid-column:4}.shelf-nav-heading{padding-top:14px}.file-window{resize:none}.floating-text-editor{padding:14px;font-size:14px}.file-window-kind{display:none}}

/* Communities and the add control share one complete, scrollbar-free rail list. */
#community-icons{width:100%;height:100%;min-height:0;max-height:none;flex:1;overflow-x:hidden;overflow-y:auto;scrollbar-width:none;padding:12px var(--edge-space);gap:12px;align-items:center;overscroll-behavior:contain}
#community-icons::-webkit-scrollbar{display:none}
#community-icons>.rail-button{flex:0 0 auto}
#community-icons>#add-community{margin:0}

/* The lower workspace continues the toolbar's base material as a flat surface. */
#lower-drawer{--shelf-surface:var(--toolbar-base);--surface:var(--shelf-surface);--nav:var(--shelf-surface);--inset:color-mix(in srgb,var(--ink) 5%,var(--shelf-surface));--raised:var(--shelf-surface);--control-shadow:none;background:var(--shelf-surface)}
#lower-drawer .board-browser-rail,#lower-drawer .board-browser-nav,#lower-drawer .board-browser-view{background:var(--shelf-surface);box-shadow:none}
#lower-drawer .board-browser-rail,#lower-drawer .board-browser-nav{border-right:1px solid var(--line)}
#lower-drawer .board-browser-rail button{box-shadow:none;background:transparent;border-color:transparent}
#lower-drawer .board-browser-rail button:hover{background:var(--inset)}
#lower-drawer .board-nav-search input{background:transparent;box-shadow:none;border-color:var(--line)}
#lower-drawer .shelf-item{background:transparent;border-color:transparent;border-radius:4px;box-shadow:none}
#lower-drawer .shelf-item:hover{background:var(--inset)}
#lower-drawer .shelf-item.selected{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--shelf-surface))}
#lower-drawer .shelf-document-preview{background:color-mix(in srgb,var(--shelf-surface) 70%,var(--bg));border-radius:2px}
#lower-drawer .shelf-image-preview,#lower-drawer .shelf-generic-preview{border-radius:3px}
#lower-drawer .shelf-item-check{background:transparent}
#lower-drawer .shelf-list .shelf-item{border-bottom-color:var(--line)}
#lower-drawer #shelf-selection{border-radius:4px;background:transparent}
body #mobile-navigation.nav-tab{background:var(--toolbar-base)}
#shelf-settings-nav{padding:12px 10px;display:grid;gap:4px}
.shelf-settings-link{padding:9px 12px;text-align:left;font-size:12px;color:var(--muted);border-radius:4px}
.shelf-settings-link:hover,.shelf-settings-link.active{background:var(--inset);color:var(--ink)}
.shelf-settings{padding:10px 20px 30px;max-width:600px;font-size:12px}
.shelf-settings h2{font-size:15px;font-weight:600;margin:0 0 24px}
.shelf-settings form{display:grid;gap:18px}
.shelf-settings form h2{margin-bottom:2px}
.shelf-settings label{display:grid;gap:8px;color:var(--muted);font-size:11px}
.shelf-settings input,.shelf-settings select,.shelf-settings textarea{width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:4px;background:transparent;color:var(--ink);font:12px/1.5 system-ui;box-shadow:none}
.shelf-settings select option{background:var(--toolbar-base)}
.shelf-settings textarea{resize:vertical}
.shelf-settings button[type=submit]{justify-self:start;padding:8px 14px;border:1px solid var(--line);border-radius:4px;font-size:11px}
.shelf-settings button[type=submit]:hover{background:var(--inset)}
.shelf-settings dl{display:grid;grid-template-columns:140px 1fr;gap:14px}
.shelf-settings dt{color:var(--muted)}.shelf-settings dd{margin:0}
.shelf-settings p{color:var(--muted)}.shelf-settings ul{list-style:none;padding:0;margin:15px 0}
.shelf-settings li{padding:10px 0;border-bottom:1px solid var(--line)}

/* One continuous chrome slab: the drawer is the body of the bottom toolbar. */
body.lower-extended #bottom-chrome-layer{bottom:0;height:calc(48px + var(--lower-open));z-index:24;background-position:center top;box-shadow:var(--toolbar-shadow-up)}
body.lower-extended #lower-drawer{background:transparent;border-top:0;box-shadow:none}

/* Standard Lucide glyphs share one optical size and stroke. */
#lower-drawer .board-browser-rail svg{width:28px;height:28px;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;fill:none}
#profile svg{stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;fill:none}

/* Fixed folder navigation belongs to the toolbar; only the inset files scroll. */
.shelf-toolbar{position:absolute;top:0;left:calc(var(--rail-width) + var(--nav-width));right:var(--scroll-width);height:48px;display:flex;align-items:center;gap:3px;padding:0 8px;background:var(--toolbar-base);z-index:6;border:0}
.shelf-toolbar>button,body #mobile-navigation.shelf-nav-toggle{position:static;display:flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;min-width:32px;height:32px;min-height:32px;margin:0;padding:0;border:0;border-radius:4px;background:transparent;box-shadow:none;color:var(--muted);cursor:pointer;touch-action:manipulation}
.shelf-toolbar>button:hover,body #mobile-navigation.shelf-nav-toggle:hover{background:var(--inset);color:var(--ink)}
.shelf-toolbar>button:disabled{opacity:.3;cursor:default;background:transparent}
.shelf-toolbar>button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.shelf-toolbar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.shelf-toolbar #shelf-path{flex:1;min-width:0;height:48px;min-height:48px;flex-wrap:nowrap;overflow:hidden;gap:6px;padding:0 0 0 10px;margin:0;font-size:11px}
.shelf-toolbar #shelf-path>span{flex-shrink:0;white-space:nowrap}
.shelf-toolbar #shelf-path button{max-width:180px;min-width:0;white-space:nowrap}
#lower-drawer .board-browser-view{padding:48px 8px 8px}
#lower-drawer #board-browser-scroll,body:not(.nav-open) #lower-drawer #board-browser-scroll{padding:12px;min-height:0;margin:0;border:1px solid var(--line);border-radius:5px;background:var(--bg);box-shadow:inset 0 1px 3px #00000016}
@media(min-width:761px){body.board-nav-collapsed .shelf-toolbar{left:var(--rail-width)}}
@media(max-width:760px){.shelf-toolbar{left:0;right:0}.shelf-toolbar #shelf-path{padding-left:4px;font-size:10px}.shelf-toolbar #shelf-path button{max-width:120px;font-size:10px}body.nav-open #board-navigation{top:48px}body.nav-open .board-browser-rail{padding-top:60px}.shelf-toolbar>button,body #mobile-navigation.shelf-nav-toggle{flex-basis:30px;width:30px;min-width:30px}}
/* Image previews cover the chat pane, with the original media centered. */
.file-window-title button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.file-window.cover-chat{min-width:0;min-height:0;resize:none;border:0;border-radius:0;box-shadow:none}
.file-window.cover-chat:focus-within{box-shadow:none}
.file-window.cover-chat .file-window-title{height:48px;min-height:48px;padding-left:56px;cursor:default}
.file-window.image-overlay{background:rgba(12,14,18,.91);color:#f0f1f3}
.file-window.image-overlay .file-window-title{background:transparent}
.file-window.image-overlay .file-window-title button,.file-window.image-overlay .file-window-kind{color:#c6cad1}
.file-window.image-overlay .file-window-title button:hover{background:#ffffff18;color:#fff}
.file-window.image-overlay .file-window-content{background:transparent;padding:20px 32px;overflow:hidden}
.file-window.image-overlay .file-window-content>img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 8px 30px #0004}
.file-window.image-overlay .file-window-status{background:transparent;border:0;color:#c6cad1;padding:0 24px;min-height:32px}
.file-window-status:has(.preview-save){height:40px;min-height:40px}
.preview-save{display:flex;gap:8px;align-items:center;min-width:0}.preview-save select{max-width:240px;min-width:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:5px;font-size:10px}.preview-save button{font-size:10px;white-space:nowrap;border:1px solid #ffffff35;border-radius:4px;padding:6px 9px}
body:not(.in-community) #file-windows{visibility:hidden}
@media(max-width:760px){body.nav-open #file-windows{visibility:hidden}.file-window.image-overlay .file-window-content{padding:12px}.file-window.image-overlay .file-window-status{padding:0 10px}.preview-save select{max-width:160px}.file-window-status:has(.preview-save)>span{display:none}}

/* Files meet the toolbar sides directly; only the top joins have a small curve. */
#lower-drawer .board-browser-view{padding:48px 0 0}
#lower-drawer #board-browser-scroll,body:not(.nav-open) #lower-drawer #board-browser-scroll{margin:0;padding:8px;border:0;border-radius:6px 6px 0 0;box-shadow:none}
.shelf-toolbar{gap:6px}
.shelf-toolbar>button,body #mobile-navigation.shelf-nav-toggle{flex:0 0 34px;width:34px;min-width:34px;height:34px;min-height:34px;border:1px solid var(--line);border-radius:50%;background:var(--toolbar-base);box-shadow:0 2px 5px #0003,inset 0 1px 0 #ffffff25}
.shelf-toolbar>button:hover,body #mobile-navigation.shelf-nav-toggle:hover{background:var(--toolbar-base);box-shadow:0 3px 8px #0004,inset 0 1px 0 #ffffff25}
.shelf-toolbar>button:disabled{background:var(--toolbar-base);box-shadow:0 2px 5px #0002,inset 0 1px 0 #ffffff20;opacity:.35}

/* Desktop file actions are available only through the anchored context menu. */
.shelf-context-menu{position:fixed;z-index:90;min-width:190px;max-width:min(280px,calc(100vw - 12px));max-height:calc(100dvh - 12px);overflow:auto;padding:5px;background:var(--surface);border:1px solid var(--line);border-radius:6px;box-shadow:0 6px 24px #0005;outline:0}
.context-menu-heading{max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 9px 9px;color:var(--muted);font-size:10px;border-bottom:1px solid var(--line);margin-bottom:4px}
.shelf-context-menu button{display:block;width:100%;padding:8px 10px;text-align:left;border-radius:3px;font-size:12px;color:var(--ink);white-space:nowrap}
.shelf-context-menu button:hover,.shelf-context-menu button:focus{background:var(--inset);outline:0}
.shelf-context-menu .danger{color:#c66565}.context-menu-separator{height:1px;background:var(--line);margin:4px}
.shelf-grid .shelf-item-name{padding-right:10px}.shelf-grid .shelf-item-date{padding-right:10px}.shelf-grid .shelf-folder{padding-right:12px}

/* Narrow-screen navigation overlays the retained content rather than replacing it. */
.nav-overlay-dismiss{display:none}
@media(max-width:760px){
 :root{--rail-width:min(72px,calc((100vw - 56px) / 5));--nav-width:calc(var(--rail-width) * 4)}
 body.nav-open #main,body.in-community.nav-open #main,body.nav-open #search-form,body.nav-open .board-browser-view,body.in-community.nav-open #community-pages>.community-page:not([hidden])>.chat-host>.chat-composer{visibility:visible;pointer-events:auto}
 body.nav-open #navigator{left:var(--rail-width);width:var(--nav-width);box-shadow:5px 0 14px #0003}
 body.nav-open #rail{display:flex;width:var(--rail-width)}
 body.nav-open .board-browser-rail{display:flex}
 body.nav-open #menu.nav-tab{left:calc(var(--rail-width) + var(--nav-width) - 44px)}
 .nav-overlay-dismiss{display:block;border:0;border-radius:0;padding:0;margin:0;box-shadow:none;background:#00000018;cursor:pointer;touch-action:manipulation}
 .nav-overlay-dismiss:hover{background:#00000020}
 #nav-overlay-dismiss{position:fixed;left:calc(var(--rail-width) + var(--nav-width));right:0;top:calc(48px + var(--upper-open));bottom:calc(48px + var(--lower-open));z-index:19}
 #board-nav-overlay-dismiss{position:absolute;left:calc(var(--rail-width) + var(--nav-width));right:0;top:48px;bottom:0;z-index:4}
}

@media(max-width:760px){
 body.nav-open #rail{background:var(--nav,var(--surface));border-right:1px solid var(--line);box-shadow:none}
 body.nav-open #nav-profile-bar,body.in-community.nav-open #nav-profile-bar{display:none!important}
}

/* Each mobile hemisphere owns its navigation overlay independently. */
@media(max-width:760px){
 body #lower-drawer{grid-template-columns:0 0 minmax(0,1fr) var(--scroll-width)}
 body:not(.board-nav-open) .board-browser-rail,body:not(.board-nav-open) #board-navigation{display:none}
 body.board-nav-open .board-browser-rail{display:flex;position:absolute;left:0;top:48px;bottom:0;width:var(--rail-width);padding:12px var(--edge-space);z-index:3;background:var(--toolbar-base)}
 body.board-nav-open #board-navigation{display:block;left:var(--rail-width);top:48px;bottom:0;width:var(--nav-width);box-shadow:5px 0 14px #0003}
 body .board-browser-view{visibility:visible;pointer-events:auto}
}
