/* Project hub: category rail + breadcrumb directory. Editor styles remain separate. */
body.c05-hub-page {
  --hub-surface: var(--xc-surface);
  --hub-ink: var(--xc-text);
  --hub-muted: var(--xc-muted);
  --hub-line: var(--xc-line);
  --hub-accent: var(--xc-gold);
  --hub-selected: var(--xc-gold-soft-bg);
  --hub-sidebar: 268px;
  --hub-content-max: 2400px;
  --hub-page-gutter: clamp(20px, 2vw, 40px);
  --hub-top-space: clamp(24px, 2vw, 32px);
}
body.c05-hub-page .canvas-gate .studio-proj-workspace.gate-has-rail {
  left: max(88px, calc((100% - var(--hub-content-max)) / 2)) !important;
  right: max(var(--hub-page-gutter), calc((100% - var(--hub-content-max)) / 2)) !important;
  top: var(--hub-top-space) !important; bottom: 36px !important;
  width: auto !important; max-width: none !important; margin: 0 !important;
  padding: 0 !important;
  grid-template-columns: var(--hub-sidebar) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important; gap: 24px !important;
}
body.c05-hub-page #gateProjectRail {
  margin: 0; padding: 0; gap: 0;
  min-width: 0; min-height: 0; overflow: hidden;
  background: transparent !important;
  border: 0 !important; border-right: 1px solid var(--hub-line) !important; border-radius: 0 !important;
  box-shadow: none !important; backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.c05-hub-page [hidden] { display: none !important; }
body.c05-hub-page .gate-directory-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; flex-shrink: 0; }
body.c05-hub-page .gate-directory-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--hub-ink); }
body.c05-hub-page .gate-workspace-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 auto; padding: 7px; border: 0; border-radius: 8px; color: var(--hub-muted); background: transparent; cursor: pointer; }
body.c05-hub-page .gate-workspace-icon svg { width: 18px; height: 18px; }
body.c05-hub-page .gate-workspace-icon:hover { background: var(--hub-selected); color: var(--hub-ink); }
body.c05-hub-page .gate-workspace-icon:is([aria-expanded="true"], [aria-pressed="true"]) { background: var(--hub-selected); color: var(--hub-accent); }
body.c05-hub-page :is(button, a, input, select, [tabindex]):focus-visible { outline: 2px solid var(--hub-accent); outline-offset: 3px; }
body.c05-hub-page .gate-project-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; margin: 0 16px 12px; border: 1px solid var(--hub-line); border-radius: 8px; color: var(--hub-muted); flex-shrink: 0; }
body.c05-hub-page .gate-project-search svg { width: 16px; height: 16px; flex-shrink: 0; }
body.c05-hub-page .gate-project-search input { width: 100%; min-width: 0; padding: 10px 0; border: 0; background: transparent; color: var(--hub-ink); font: inherit; font-size: 13px; }
body.c05-hub-page .gate-project-search input::placeholder { color: var(--hub-muted); }
body.c05-hub-page #gateAllProjects { flex: 0 0 auto; padding: 0 10px 8px; margin: 0 6px 8px; border-bottom: 1px solid var(--hub-line); overflow: visible; }
body.c05-hub-page .gate-project-directory { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 10px 12px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--hub-line) transparent; }
body.c05-hub-page .canvas-gate .xc-pc-box { margin: 0 0 12px; padding: 0; background: transparent !important; border: 0 !important; border-radius: 0; }
body.c05-hub-page .xc-pc-box .studio-proj-rail-head { padding: 0; gap: 4px; margin: 0 0 4px; }
body.c05-hub-page .gate-directory-section-label { flex: 1; padding: 12px 8px 8px; font-size: 12px; color: var(--hub-muted); }
body.c05-hub-page .gate-project-scopes { position: absolute; left: 12px; top: calc(var(--hub-top-space) + 4px); z-index: 23; display: flex; flex-direction: column; gap: 10px; width: 50px; }
body.c05-hub-page .gate-project-scopes button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 58px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--hub-muted); font: inherit; font-size: 12px; cursor: pointer; }
body.c05-hub-page .gate-project-scopes svg { width: 20px; height: 20px; }
body.c05-hub-page .gate-project-scopes button:hover { background: var(--hub-surface); color: var(--hub-ink); }
body.c05-hub-page .gate-project-scopes button[aria-pressed="true"] { background: var(--hub-selected); color: var(--hub-accent); border-color: var(--hub-line); font-weight: 700; }
body.c05-hub-page :is(.gate-directory-breadcrumb, .gate-project-breadcrumb) { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; line-height: 1.6; }
body.c05-hub-page .gate-directory-breadcrumb { padding: 0 16px 12px; font-size: 12px; color: var(--hub-muted); flex-shrink: 0; }
body.c05-hub-page :is(.gate-directory-breadcrumb, .gate-project-breadcrumb) button { min-width: 0; max-width: 100%; padding: 3px 4px; margin: 0; border: 0; border-radius: 4px; background: transparent; color: var(--hub-muted); text-align: left; overflow-wrap: anywhere; font: inherit; cursor: pointer; }
body.c05-hub-page :is(.gate-directory-breadcrumb, .gate-project-breadcrumb) button:hover { color: var(--hub-accent); background: var(--hub-selected); }
body.c05-hub-page .gate-directory-breadcrumb [aria-current] { color: var(--hub-ink); font-weight: 600; }
body.c05-hub-page .gate-breadcrumb-separator { opacity: .55; }
body.c05-hub-page .gate-directory-folder { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--hub-ink); font: inherit; text-align: left; cursor: pointer; }
body.c05-hub-page .gate-directory-folder:hover { background: var(--hub-selected); }
body.c05-hub-page .gate-directory-folder svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--hub-accent); }
body.c05-hub-page .gate-directory-folder svg:last-child { width: 14px; color: var(--hub-muted); }
body.c05-hub-page .gate-directory-folder-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
body.c05-hub-page .gate-directory-folder small { display: block; margin-top: 3px; font-size: 11px; color: var(--hub-muted); }
body.c05-hub-page .gate-scope-content .studio-proj-list { max-height: none; overflow: visible; padding: 0; }
body.c05-hub-page .studio-proj-item { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 24px; gap: 2px 9px; padding: 7px 8px; margin: 2px 0; font-size: 13px; }
body.c05-hub-page .studio-proj-item-icon { grid-column: 1; grid-row: 1 / 3; align-self: center; color: var(--hub-accent); }
body.c05-hub-page .studio-proj-item-icon svg { width: 16px; height: 16px; }
body.c05-hub-page .studio-proj-item-name { grid-column: 2; grid-row: 1; min-width: 0; }
body.c05-hub-page .studio-proj-count:not(.studio-proj-group) { grid-column: 3; grid-row: 1 / 3; align-self: center; font-variant-numeric: tabular-nums; background: transparent; color: var(--hub-muted); }
body.c05-hub-page .studio-proj-item .studio-proj-group { grid-column: 2; grid-row: 2; width: fit-content; max-width: 100%; padding: 0; color: var(--hub-muted) !important; background: transparent !important; font-size: 10px; line-height: 1.4; font-weight: 400; }
body.c05-hub-page .studio-proj-item-menu { grid-column: 4; grid-row: 1 / 3; align-self: center; opacity: .3; }
body.c05-hub-page .studio-proj-item:is(:hover, :focus-within, .active) .studio-proj-item-menu { opacity: 1; }
body.c05-hub-page .studio-proj-empty { padding: 8px 10px 12px; }
body.c05-hub-page .studio-proj-empty-title { font-size: 12px; color: var(--hub-muted); }
body.c05-hub-page .studio-proj-empty-desc { font-size: 11px; color: var(--hub-muted); }
body.c05-hub-page .studio-proj-rail-foot { position: static; flex: 0 0 auto; padding: 8px 12px; border-top: 1px solid var(--hub-line); }
body.c05-hub-page .studio-proj-rail-foot .gate-trash-entry { background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 8px; color: var(--hub-muted); }
body.c05-hub-page .canvas-gate .studio-proj-main { min-width: 0; min-height: 0; overflow: hidden !important; padding: 8px 0 0 !important; }
body.c05-hub-page .gate-head { flex: 0 0 auto; padding: 0 0 20px; gap: 20px; }
body.c05-hub-page .gate-project-breadcrumb { font-size: 12px; color: var(--hub-muted); margin-bottom: 8px; overflow-wrap: anywhere; }
body.c05-hub-page .gate-title { font-size: 28px !important; line-height: 1.25; overflow-wrap: anywhere; }
body.c05-hub-page .gate-title-row { flex-wrap: wrap; }
body.c05-hub-page .gate-head-actions { flex-wrap: wrap; gap: 8px; }
body.c05-hub-page .xc-pc-mascot { display: none; }
body.c05-hub-page .gate-workspace-toolbar { display: flex; justify-content: flex-start; align-items: center; gap: 16px; flex: 0 0 auto; padding: 16px 0; margin: 0; border: 0; }
body.c05-hub-page .gate-workspace-toolbar .gate-dash-tab { padding: 0; flex-shrink: 0; font-size: 14px !important; }
body.c05-hub-page .gate-workspace-toolbar .gate-dash-search { display: flex; align-items: center; gap: 8px; width: 220px; min-width: 0; padding: 0 10px; border: 1px solid var(--hub-line); border-radius: 8px; background: var(--hub-surface); color: var(--hub-muted); }
body.c05-hub-page .gate-workspace-toolbar .gate-dash-search svg { width: 16px; height: 16px; flex: 0 0 auto; }
body.c05-hub-page .gate-workspace-toolbar input { width: 100%; min-width: 0; padding: 8px 0; border: 0; font: inherit; font-size: 12px; background: transparent; color: var(--hub-ink); }
body.c05-hub-page .gate-workspace-toolbar input::placeholder { color: var(--hub-muted); }
body.c05-hub-page .gate-workspace-views { display: flex; gap: 10px; align-items: center; margin-left: auto; }
body.c05-hub-page #gateCanvasSort { max-width: 120px; padding: 8px; background: var(--hub-surface); color: var(--hub-muted); border: 1px solid var(--hub-line); border-radius: 8px; font: inherit; font-size: 12px; }
body.c05-hub-page .gate-view-switch { display: flex; gap: 2px; border: 1px solid var(--hub-line); padding: 2px; border-radius: 8px; }
body.c05-hub-page .gate-view-switch .gate-workspace-icon { width: 28px; height: 28px; padding: 5px; }
body.c05-hub-page .gate-workspace-content { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; flex: 1 1 auto; gap: 24px; }
body.c05-hub-page .gate-workspace-content.has-details { grid-template-columns: minmax(0, 1fr) 250px; }
body.c05-hub-page .studio-proj-main.gate-dash .gate-dash-list { padding: 4px 4px 20px !important; margin: 0; min-width: 0; overflow: auto !important; }
body.c05-hub-page .gate-ep-group-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)) !important; gap: 20px 16px !important; }
body.c05-hub-page .gate-hist-thumb { box-shadow: none !important; transform: none !important; }
body.c05-hub-page .gate-hist-card.is-inspected .gate-hist-thumb { outline: 2px solid var(--hub-accent); outline-offset: 2px; }
body.c05-hub-page .gate-hist-title-row { gap: 6px; }
body.c05-hub-page .gate-hist-title-row .gate-hist-rename { color: var(--hub-muted); width: 26px; height: 28px; flex-basis: 26px; }
body.c05-hub-page .canvas-card-ep { color: var(--hub-muted); }
body.c05-hub-page .gate-hist-meta-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; }
body.c05-hub-page .gate-hist-meta-row .canvas-card-ep { margin: 0; min-width: 0; }
body.c05-hub-page .gate-hist-details { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 28px; padding: 4px 8px; border: 1px solid var(--hub-line); border-radius: 7px; background: var(--hub-surface); color: var(--hub-ink); font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; }
body.c05-hub-page .gate-hist-details svg { width: 14px; height: 14px; }
body.c05-hub-page .gate-hist-details:hover, body.c05-hub-page .gate-hist-details[aria-pressed="true"] { color: var(--hub-ink); background: var(--hub-surface); border-color: var(--hub-accent); }
body.c05-hub-page .gate-hist-thumb:has(.gate-hist-details) .gate-hist-name { bottom: 46px; }
body.c05-hub-page .gate-list-view .gate-ep-group-grid { display: flex; flex-direction: column; gap: 0 !important; }
body.c05-hub-page .studio-proj-main.gate-dash .gate-list-view .gate-hist-card { display: grid !important; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 20px !important; padding: 12px 4px !important; border-bottom: 1px solid var(--hub-line) !important; border-radius: 0; }
body.c05-hub-page .gate-list-view .gate-hist-thumb { width: 128px; }
body.c05-hub-page .gate-canvas-inspector { min-width: 0; min-height: 0; padding: 0 0 16px 22px; border-left: 1px solid var(--hub-line); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--hub-line) transparent; }
body.c05-hub-page .gate-inspector-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; color: var(--hub-muted); font-size: 13px; }
body.c05-hub-page .gate-inspector-cover { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--hub-selected); }
body.c05-hub-page .gate-inspector-empty { padding: 28px 8px; color: var(--hub-muted); font-size: 13px; line-height: 1.8; }
body.c05-hub-page .gate-canvas-inspector h3 { font-size: 20px; line-height: 1.5; margin: 18px 0 6px; color: var(--hub-ink); overflow-wrap: anywhere; }
body.c05-hub-page .gate-canvas-inspector dl { margin: 20px 0; }
body.c05-hub-page .gate-canvas-inspector dl div { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; font-size: 12px; }
body.c05-hub-page .gate-canvas-inspector dt { flex: 0 0 auto; color: var(--hub-muted); }
body.c05-hub-page .gate-canvas-inspector dd { margin: 0; text-align: right; color: var(--hub-ink); overflow-wrap: anywhere; }
body.c05-hub-page .gate-inspector-open { width: 100%; margin: 0 0 16px; min-height: 38px; }
body.c05-hub-page .gate-inspector-action { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--hub-ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
body.c05-hub-page .gate-inspector-action svg { width: 16px; height: 16px; color: var(--hub-muted); }
body.c05-hub-page .gate-inspector-action:hover { background: var(--hub-selected); }
body.c05-hub-page .gate-inspector-note { padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--hub-line); color: var(--hub-muted); font-size: 12px; line-height: 1.8; }
body.c05-hub-page .canvas-gate .studio-proj-workspace.gate-rail-collapsed { grid-template-columns: minmax(0, 1fr) !important; }
body.c05-hub-page .gate-rail-collapsed > #gateProjectRail { display: none !important; }
body.c05-hub-page #gateProjectRailToggle { display: none !important; }
body.c05-hub-page #gateWorkspaceScrim { position: absolute; inset: 0; border: 0; background: #17130c55; z-index: 20; }
@media (max-width: 1440px) {
  body.c05-hub-page { --hub-sidebar: 248px; }
  body.c05-hub-page .gate-workspace-content.has-details { grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; }
  body.c05-hub-page .gate-ep-group-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)) !important; }
  body.c05-hub-page .gate-workspace-toolbar { gap: 10px; }
  body.c05-hub-page .gate-workspace-toolbar .gate-dash-search { width: 180px; }
}
@media (max-width: 1180px) {
  body.c05-hub-page .gate-workspace-content.has-details { grid-template-columns: minmax(0, 1fr); }
  body.c05-hub-page .gate-canvas-inspector { position: absolute; right: 0; top: 0; bottom: 0; width: 310px; z-index: 22; padding: 20px; border: 1px solid var(--hub-line); border-radius: 12px; background: var(--hub-surface); }
  body.c05-hub-page .gate-workspace-toolbar .gate-dash-tab { display: none; }
}
@media (max-width: 760px) {
  body.c05-hub-page .canvas-gate .studio-proj-workspace.gate-has-rail { left: 12px !important; right: 12px !important; top: 60px !important; bottom: calc(8px + var(--xc-gate-footer-inset, 0px)) !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) !important; gap: 12px !important; }
  body.c05-hub-page .gate-project-scopes { top: 4px; left: 12px; right: 12px; width: auto; flex-direction: row; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--hub-line); }
  body.c05-hub-page .gate-project-scopes button { flex: 1; min-height: 44px; flex-direction: row; gap: 8px; font-size: 14px; }
  body.c05-hub-page .studio-proj-workspace.gate-has-rail > #gateProjectRail { position: absolute; left: 0; top: 0; bottom: 0; width: min(326px, calc(100% - 24px)); height: auto; max-height: none; z-index: 21; gap: 0; background: var(--hub-surface) !important; border: 1px solid var(--hub-line) !important; border-radius: 12px !important; }
  body.c05-hub-page .gate-directory-head { padding-top: 10px; }
  body.c05-hub-page .studio-proj-item { min-height: 44px; }
  body.c05-hub-page .gate-hist-details { min-height: 44px; padding-inline: 12px; }
  body.c05-hub-page .gate-hist-thumb:has(.gate-hist-details) .gate-hist-name { bottom: 60px; }
  body.c05-hub-page .studio-proj-main.gate-dash .gate-list-view .gate-hist-card { grid-template-columns: 144px minmax(0, 1fr); gap: 12px !important; }
  body.c05-hub-page .gate-list-view .gate-hist-thumb { width: 144px; }
  body.c05-hub-page .gate-directory-breadcrumb button { min-height: 36px; }
  body.c05-hub-page .studio-proj-item-menu { opacity: 1; min-height: 36px; }
  body.c05-hub-page .gate-project-search input { font-size: 16px; }
  body.c05-hub-page .studio-proj-workspace.gate-has-rail > .studio-proj-main { grid-row: 1; padding: 0 !important; overflow: hidden !important; }
  body.c05-hub-page .gate-head { flex-direction: column; align-items: stretch; padding: 0 0 12px; gap: 12px; }
  body.c05-hub-page .gate-title { font-size: 24px !important; }
  body.c05-hub-page .gate-head-actions { flex-basis: auto; gap: 8px; }
  body.c05-hub-page .gate-head-actions .gate-dash-create-btn { padding-inline: 12px !important; }
  body.c05-hub-page .gate-workspace-toolbar { padding: 12px 0; flex-wrap: wrap; gap: 8px; }
  body.c05-hub-page .gate-workspace-toolbar .gate-dash-search { width: auto; flex: 1 1 140px; }
  body.c05-hub-page .gate-workspace-toolbar input { font-size: 16px; }
  body.c05-hub-page .gate-workspace-views { gap: 4px; }
  body.c05-hub-page #gateCanvasSort { max-width: 98px; }
  body.c05-hub-page .gate-workspace-content { overflow: hidden; }
  body.c05-hub-page .gate-ep-group-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)) !important; gap: 18px 12px !important; }
  body.c05-hub-page .gate-canvas-inspector { top: 54px; width: 100%; }
  body.c05-hub-page .gate-workspace-icon, body.c05-hub-page .gate-view-switch .gate-workspace-icon { width: 38px; height: 40px; }
  body.c05-hub-page .gate-hist-cover-edit { display: inline-flex; }
}

/* Reuse the shared background; side directories are transparent, overlay drawers opaque. */
html:root body.xc-canvas.c05-v2.c05-hub-page { background-color: var(--xc-bg) !important; }
body.c05-hub-page .xc-page-bg { opacity: .26; }
body.c05-hub-page #canvasGate { background: transparent !important; }
body.c05-hub-page #canvasGate .gate-panel { backdrop-filter: none; -webkit-backdrop-filter: none; }
body.c05-hub-page #canvasGate .gate-fx { display: none !important; }
body.c05-hub-page #gateProjectRail .studio-proj-item { color: var(--hub-ink) !important; }
body.c05-hub-page #gateProjectRail .studio-proj-item.active { background: var(--hub-selected) !important; border-color: transparent !important; box-shadow: none !important; }
body.c05-hub-page #gateProjectRail .studio-proj-item-name { font-weight: 500; }
body.c05-hub-page #gateCanvasSearch, body.c05-hub-page #gateProjectSearch { background: transparent !important; color: var(--hub-ink) !important; }
body.c05-hub-page #gateCanvasSearch::placeholder, body.c05-hub-page #gateProjectSearch::placeholder { color: var(--hub-muted) !important; }
body.c05-hub-page #gateDashTabs { justify-content: flex-start; }
body.c05-hub-page #gateDashTabs .gate-dash-search { min-width: 0 !important; max-width: 220px; }
body.c05-hub-page #gateDashTabs .gate-dash-search { margin-left: 0; flex: 0 1 220px; }
@media (max-width: 760px) {
  body.c05-hub-page #canvasGate .gate-head { flex-direction: column !important; flex-wrap: nowrap; align-items: stretch !important; }
  body.c05-hub-page #canvasGate .gate-head-text { flex: 0 0 auto; }
  body.c05-hub-page #canvasGate .gate-head-actions { flex: 0 0 auto; width: 100%; min-width: 0; justify-content: flex-start; flex-wrap: wrap; }
  body.c05-hub-page #gateDashTabs .gate-dash-search { flex: 1 1 140px; max-width: none; }
  body.c05-hub-page .studio-proj-workspace.gate-has-rail > #gateProjectRail { grid-area: 1 / 1 / -1 / -1; }
}
