/* Page-level hierarchy. Keep canvas geometry and plan artwork independent. */
/* Activity sections must grow when statuses or the latest result wrap. */
@media(min-width:1001px){
 body #appView #workspaceGenerationQueue{display:flex;flex-direction:column;gap:8px;overflow-y:auto;}
 body #appView #workspaceGenerationQueue>div{flex:0 0 auto;min-width:0;}
 body #appView #workspaceGenerationQueue>.workspace-queued-list{flex:1 0 24px;}
}
body #appView #workspaceGenerationQueue .workspace-latest-result{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;padding:4px 0 8px;border-bottom:1px solid var(--border);}
body #appView #workspaceGenerationQueue .workspace-latest-result small{font-size:10px;color:var(--muted);}
body #appView #workspaceGenerationQueue .workspace-latest-result a{min-width:0;padding:0;line-height:1.5;font-size:12px;overflow-wrap:anywhere;}
body #appView #workspaceGenerationQueue .workspace-current-job{overflow:visible;}
body #appView #workspaceGenerationQueue .workspace-job.current .workspace-job-title{height:auto;min-height:24px;}
body #appView #workspaceGenerationQueue .workspace-job.current .workspace-job-status{height:auto;min-height:16px;white-space:normal;line-height:1.5;}
body #appView #workspaceGenerationQueue .workspace-job.current .idle-progress{display:none;}
body #appView #workspaceGenerationQueue .workspace-current-resume{position:static;margin-top:4px;}
body #appView #workspaceGenerationQueue .workspace-job.current:has(.workspace-current-resume) .workspace-job-status{padding-right:0;}
body #appView #workspaceGenerationQueue .workspace-queue-policy{height:auto;min-height:0;}
body #appView #workspaceMain {padding-top:18px;}
body #appView .context-bar {margin-bottom:14px;padding-bottom:10px;}
body #appView .view>.page-head {padding:0 0 14px;margin:0 0 16px;gap:16px;border-bottom:1px solid var(--border);}
body #appView .view>.page-head h1 {font-size:26px;line-height:1.2;letter-spacing:-.6px;margin:0 0 6px;}
body #appView .view>.page-head p {font-size:13px;line-height:1.5;margin:4px 0;max-width:72ch;}
body #appView .view:not(#planView) h2 {font-size:18px;line-height:1.35;margin:0 0 10px;}
body #appView .view:not(#planView) h3 {font-size:15px;line-height:1.4;}
body #appView .view :is(.notice,.policy-strip) {font-size:13px;font-weight:400;line-height:1.5;padding:12px 14px;margin:12px 0;}
body #appView .view .notice strong {font-size:13px;}
body #appView :is(#settingsView,#legalView,#teamView,#discordView) :is(.card,.form-card)>p {font-size:13px;line-height:1.55;font-weight:400;margin:8px 0 12px;}
body #appView .view :is(.identity-row,.integration-identity) {padding:12px;gap:12px;min-height:0;}
body #appView .view .identity-row b {font-size:14px;line-height:1.4;}
body #appView .view :is(.pf-help-disclosure,.context-help) {padding:0;margin:10px 0;font-size:13px;}
body #appView .view .pf-help-disclosure>summary {padding:11px 14px;margin:0;font-size:12px;}
body #appView .view :is(.card,.form-card)>:last-child {margin-bottom:0;}
body #appView #homeView .stats-grid {margin-bottom:20px;}
body #appView #homeView .stat {padding:14px;}
body #appView #homeView .stat strong {font-size:24px;}
body #appView #homeView .setup-track {gap:16px;margin-top:14px;}
body #appView #homeView .setup-step {gap:10px;padding-top:14px;}
body #appView #homeView .setup-step small {min-height:0;margin-top:0;line-height:1.5;}
body #appView #homeView .home-production-links {padding:16px 0;}
body #appView #setsView .campaign-intro {padding:14px;margin:12px 0;gap:16px;}
body #appView #setsView .campaign-example-stage {height:110px;min-height:0;}
body #appView #setsView .campaign-example-art {max-height:100px;width:auto;}
body #appView #setsView .campaign-list-heading {margin:16px 0 10px;}
body #appView #createView .step-head {padding:14px 24px 10px;}
body #appView #createView .source-method {padding:14px;min-height:0;}
body #appView #settingsView .form-card {margin-bottom:14px;}
body #appView #helpView .card {padding:16px;margin-bottom:14px;}
body #appView #helpView :is(p,li) {font-size:14px;line-height:1.55;}
body #appView #discordView .billing-payment-list {padding:10px 0;margin:0;border-bottom:1px solid var(--border);}
body #appView .view :is(.table-wrap,.table-shell) {overflow-x:auto;}
body #appView #designList .design-with-thumbnail {padding:14px;row-gap:7px;}
body #appView #designList .design-with-thumbnail :is(h3,p) {margin:0;font-size:13px;line-height:1.5;}
body #appView #designList .design-with-thumbnail h3 {font-size:15px;}
body #appView #designList .design-with-thumbnail .title-row p {font-size:12px;margin-top:3px;}
body #appView #discordView .two-col {align-items:start;}
body #appView #discordView .two-col>.card {height:auto;min-height:0;}
body #appView #discordView .card p {font-size:13px;line-height:1.5;margin:8px 0 12px;}
body #appView #discordView .card select {margin-bottom:10px;}
/* Use the existing navigation and activity toggles throughout tablet widths. */
@media(max-width:1000px){
 body #appView.app-shell>.shell {display:block;grid-template-columns:minmax(0,1fr);}
 body #appView.app-shell>.shell>#workspaceMain {width:100%;margin:0;padding:18px 18px 80px;}
 body #appView .pf-menu-button {display:inline-flex;align-items:center;justify-content:center;min-width:38px;}
 body:not(.pf-navigation-open) #appView .sidebar.app-rail.m5-rail {display:none!important;}
 body.pf-navigation-open #appView .sidebar.app-rail.m5-rail {display:block!important;position:fixed!important;inset:150px auto 68px 0!important;width:min(285px,90vw)!important;height:auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;z-index:60;}
 body #appView #workspaceGenerationQueue {position:fixed;left:10px;right:10px;bottom:10px;top:auto;width:auto;height:48px;min-height:48px;max-height:48px;display:block;padding:0 12px;}
 body #appView #workspaceGenerationQueue:not(.mobile-activity-expanded)>:not(.generation-queue-heading) {display:none;}
 body #appView #workspaceGenerationQueue .generation-queue-heading {height:46px;}
 body #appView #workspaceGenerationQueue .activity-desktop-heading {display:none;}
 body #appView #workspaceGenerationQueue .activity-mobile-toggle {display:flex;align-items:center;gap:10px;width:100%;height:44px;margin:0;padding:0;border:0;background:transparent;}
 body #appView #workspaceGenerationQueue .activity-mobile-toggle span {flex:1;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
 body #appView #workspaceGenerationQueue.mobile-activity-expanded {height:auto;max-height:65dvh;min-height:0;display:flex;flex-direction:column;gap:8px;padding:0 12px 12px;overflow-y:auto;}
 body #appView .topbar.m5-topbar {height:auto;min-height:76px;flex-wrap:wrap;gap:10px;padding:12px 18px;}
 body #appView .topbar .top-actions {display:flex;flex-wrap:wrap;gap:8px;width:100%;min-width:0;}
 body #appView #workspaceSwitcher {flex:1 0 210px;min-width:210px;max-width:300px;}
 body #appView #workspaceSelectWrap {min-width:170px;flex:1 0 170px;}
 body #appView #workspaceSelect {width:100%;min-width:170px;}
 body #appView .view .two-col {grid-template-columns:minmax(0,1fr);}
}
#discordActivityList,#discordPrivateActivity{max-height:320px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}

/* Workspace reading rhythm. Keep Studio's canvas and tool geometry separate. */
body #appView .view:not(#studioView) {min-width:0;padding:8px 0 24px;}
body #appView .view>.page-head {align-items:flex-start;gap:12px 20px;}
body #appView .view>.page-head>div:first-child {min-width:0;flex:1;}
body #appView .view>.page-head h1 {font-size:24px;letter-spacing:-.45px;}
body #appView .view>.page-head .eyebrow {font-size:10px;letter-spacing:1.2px;margin:0 0 6px;}
body #appView .view>.page-head p:not(.eyebrow) {font-weight:400;color:#b4c8d2;max-width:68ch;}
body #appView .view>.page-head>button {flex:0 0 auto;max-width:240px;}
body #appView .view :is(.page-actions,.head-actions) {display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
body #appView .view:not(#studioView) :is(.card,.form-card) {border-radius:9px;box-shadow:none;}
body #appView .view:not(#studioView) :is(.card,.form-card)>p {font-size:13px;line-height:1.6;font-weight:400;}
body #appView .view :is(.pf-help-disclosure,.context-help) {background:transparent;border-color:#29424f;box-shadow:none;}
body #appView .view .pf-help-disclosure>summary {padding:9px 12px;font-weight:500;}
body #appView .view :is(.two-col,.settings-grid) {gap:14px;align-items:start;}
body #appView #generateView .generate-design-panel {align-items:start;gap:10px 20px;}
body #appView #generateView #loadGenerateRowsBtn {align-self:start;min-height:36px;height:auto;}
body #appView #generateView .generate-design-field {align-self:start;}
body #appView #setsView .campaign-intro {grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:12px 0;}
body #appView #setsView .campaign-intro p {font-size:13px;line-height:1.55;font-weight:400;}
body #appView #setsView .campaign-format-key {min-width:0;}
body #appView #designList .design-with-thumbnail {padding:12px;}
body #appView #planView .billing-tabs {margin-block:16px;}
body #appView #planView .billing-tabs button {font-size:13px;padding:10px 12px;}
body #appView #appFooter {margin-top:28px;padding-top:20px;}
@media(min-width:1001px){
 body #appView #workspaceMain {padding:18px 28px 28px;}
 body #appView .sidebar.app-rail.m5-rail {bottom:330px;}
 body #appView #workspaceGenerationQueue {height:310px;min-height:0;max-height:310px;flex-basis:310px;gap:6px;padding:10px;scrollbar-gutter:stable;border-color:#315361;box-shadow:0 4px 16px #0003;}
 body #appView #workspaceGenerationQueue .workspace-latest-result {padding-bottom:6px;}
 body #appView .sidebar.app-rail .nav-category {margin-bottom:8px;}
 body #appView .sidebar.app-rail .nav-category>.nav {min-height:36px;padding-block:8px;}
 body #appView .sidebar.app-rail .nav-category>summary {padding-block:7px;}
}
@media(max-width:700px){
 body #appView .view>.page-head {flex-wrap:wrap;}
 body #appView .view>.page-head>div:first-child {flex-basis:100%;}
 body #appView .view>.page-head h1 {font-size:22px;}
 body #appView #setsView .campaign-intro {grid-template-columns:minmax(0,1fr);}
 body #appView .view :is(button,input,select) {min-height:44px;}
}
/* Keep format previews within their grid cells at intermediate desktop widths. */
body #appView #setsView .demo-platform-grid{grid-template-columns:repeat(4,minmax(0,1fr));min-width:0}
body #appView #setsView .demo-platform-grid .demo-thumb{max-width:100%;min-width:0;justify-self:center;}
body #appView #scheduleForm .form-grid>label:first-child,
body #appView #scheduleForm .schedule-design-field{grid-column:1/-1;}
body #appView #scheduleDesignList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:230px;overflow-y:auto;}
body #appView #scheduleDesignList>label{min-width:0;margin:0;}
@media(max-width:700px){body #appView #scheduleDesignList{grid-template-columns:1fr}body #appView #setsView .demo-platform-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
body #appView #planView{gap:0;}
body #appView .view>.page-head>.status-chip{margin-top:0;align-self:flex-start;}

/* Stable activity summary: details belong on the jobs and plans pages. */
body #appView #workspaceGenerationQueue {border:1px solid #00b8cf;box-shadow:0 0 0 1px #00b8cf18;scrollbar-gutter:auto;}
body #appView #workspaceGenerationQueue .workspace-current-job {height:112px;min-height:112px;max-height:112px;justify-content:flex-start;padding-top:4px;}
body #appView #workspaceGenerationQueue .workspace-job-title strong {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
body #appView #workspaceGenerationQueue .workspace-job-status {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body #appView #workspaceGenerationQueue .activity-summary-row {display:flex;align-items:center;justify-content:space-between;gap:8px;height:30px;min-height:30px;font-size:12px;border-top:1px solid #294552;}
body #appView #workspaceGenerationQueue .activity-summary-row a {font-weight:700;padding:0;}
body #appView #workspaceGenerationQueue .activity-details-link {display:flex;align-items:center;min-height:36px;font-size:12px;margin-top:auto;}
@media(min-width:1001px){
 body #appView #agencyNav {bottom:298px;}
 body #appView #workspaceGenerationQueue {height:278px;min-height:278px;max-height:278px;flex-basis:278px;overflow:visible;gap:6px;padding:10px;}
}
@media(max-width:1000px){
 body #appView #workspaceGenerationQueue.mobile-activity-expanded {height:298px;min-height:298px;max-height:298px;overflow:visible;gap:4px;}
 body #appView #workspaceGenerationQueue .activity-details-link {min-height:44px;}
}

body #appView #workspaceGenerationQueue .workspace-avatar-detail {display:block;font-size:11px;line-height:16px;min-height:32px;max-height:32px;overflow:hidden;overflow-wrap:anywhere;color:var(--muted);}
