/* Keep wide data inside its scroll region, never in the page layout. */
body.workspace-theme .cosmic-viewport > *, body.workspace-theme .cosmic-table-card { min-width:0; max-width:100%; box-sizing:border-box; }
body.workspace-theme :is(.table-wrapper,.table-wrapper-internal) { max-width:100%; min-width:0; overflow:auto; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; }
.design-upload { display:grid; gap:8px; margin:10px 0 18px; }
.design-upload input { width:100%; min-width:0; font-size:16px; }
.design-upload p { margin:0; font-size:12px; line-height:1.5; color:#b9c0c9; }
.design-avatar-preview { width:64px; height:64px; object-fit:cover; border-radius:16px; }
.table-scroll-hint { display:none; }
@media(max-width:768px) {
 body.workspace-theme #publicView { width:100%; padding:20px 14px; box-sizing:border-box; }
 body.workspace-theme .cosmic-viewport { display:grid; width:100%; grid-template-columns:minmax(0,1fr); gap:18px; }
 body.workspace-theme .cosmic-viewport > * { width:100%; grid-column:1; }
 body.workspace-theme :is(.cosmic-header,.cosmic-login-card,.cosmic-table-card) { padding:22px 18px; min-height:0; }
 body.workspace-theme .cosmic-title { font-size:clamp(26px,7vw,38px); line-height:1.12; white-space:normal !important; overflow-wrap:anywhere; letter-spacing:.3px; }
 body.workspace-theme .cosmic-title span { display:block; margin-top:6px; }
 body.workspace-theme :is(.cosmic-subtitle,.cosmic-table-card h2) { font-size:22px; line-height:1.2; white-space:normal; overflow-wrap:anywhere; }
 body.workspace-theme .cosmic-description { font-size:14px; line-height:1.6; }
 body.workspace-theme #publicView :is(input,button) { max-width:100%; box-sizing:border-box; }
 body.workspace-theme #publicView input { font-size:16px; min-width:0; }
 body.workspace-theme #publicView p { white-space:normal; overflow-wrap:anywhere; }
 body.workspace-theme #publicTableContainer { width:100%; max-height:60dvh !important; }
 body.workspace-theme #publicTableContainer table { min-width:680px; }
 .table-scroll-hint { display:block; font-size:12px; color:#c7b09c; margin:8px 0; }
 body.workspace-theme .top-bar.glass-panel { display:grid; grid-template-columns:40px minmax(0,1fr) 38px; grid-template-rows:auto auto; gap:8px; padding:10px 12px !important; min-height:0 !important; }
 body.workspace-theme .top-bar-right { display:contents; }
 body.workspace-theme .top-bar .top-title { display:none; }
 body.workspace-theme .top-bar-right > .cosmic-search-wrapper { grid-column:1/-1; grid-row:1; min-width:0; max-width:none; width:100%; }
 body.workspace-theme .top-bar #globalSearchInput { height:42px; font-size:16px; padding-right:8px; }
 body.workspace-theme .workspace-menu-toggle { grid-column:1; grid-row:2; width:40px; height:38px; padding:8px; }
 body.workspace-theme .collaboration-controls { grid-column:2; grid-row:2; gap:5px; margin:0; }
 body.workspace-theme .workspace-profile { grid-column:3; grid-row:2; margin:0; }
 body.workspace-theme .header-tool { min-height:38px; padding:7px 9px; font-size:12px; }
 body.workspace-theme .user-avatar { width:34px; height:34px; }
 body.workspace-theme :is(.app-view,.tables-col,.content-grid,.glass-panel) { min-width:0; }
 body.workspace-theme .modal-content { max-width:100%; box-sizing:border-box; }
}
