@import url("/static/css/xc-design-tokens.css?v=20261011-m16");
/* Shared workspace geometry and menus. Existing page themes and routes are retained. */
:root {
  --xc-page-w: min(1920px, calc(100vw - 48px)); --xc-page-pad: 24px;
  --xc-title: 20px; --xc-lead: 14px; --xc-body: 14px; --xc-meta: 12.5px;
}
/* Native menus need an opaque surface; translucent page tokens render white on Windows. */
html select { color-scheme: light; }
html select :is(option,optgroup) {
  background-color: #f7f4ee !important;
  color: #26211a !important;
}
html select option:checked {
  background-color: #eadfc8 !important;
  color: #26211a !important;
}
html select option:disabled {
  background-color: #f7f4ee !important;
  color: #817b72 !important;
}
html:is(.theme-dark,.studio-theme-dark) select { color-scheme: dark !important; }
html:is(.theme-dark,.studio-theme-dark) select :is(option,optgroup) {
  background-color: #252629 !important;
  color: #f0efeb !important;
}
html:is(.theme-dark,.studio-theme-dark) select option:checked {
  background-color: #414348 !important;
  color: #f6e8b6 !important;
}
html:is(.theme-dark,.studio-theme-dark) select option:disabled {
  background-color: #252629 !important;
  color: #96979c !important;
}
:root, html.theme-dark, html.studio-theme-dark { --xc-topbar-h: var(--xc-measured-topbar-h,86px); }
html.studio-shell-on:not(.studio-canvas-full) { --xc-topbar-h: var(--xc-measured-topbar-h,86px); }
body.xc-home { --xc-page-w: min(1920px, calc(100vw - 48px)); }
body.xc-home .wb-page, body.xc-activity .wb-page, .wb-page, body.xc-team .scene, body.xc-account .shell, .xc-help-wrap, .gal-wrap, .mg-wrap,
.xc-film .film-wrap, .page > .wrap, body.xc-api .wrap, body.xc-typed .wrap,
body.xc-api .api-shell,
.xc-assemble .asm-gate-panel, .xc-autoscript .as-gate-panel,
.canvas-gate .studio-proj-layout, .canvas-gate .studio-proj-topbar {
  width: min(var(--xc-page-w), calc(100% - 32px)) !important;
  max-width: var(--xc-page-w) !important; margin-inline: auto;
}
.xc-home .wb-sec-head h2 { font-size: 19px; }
.xc-home .wb-qcard h5, .xc-home .wb-skill .t { font-size: 15px; line-height: 1.45; }
.xc-home .wb-qcard p, .xc-home .wb-skill .d { font-size: 13px; line-height: 1.65; }
.xc-home .wb-qcard, .xc-home .wb-skill { border-radius: 12px; }
.xc-home .wb-btn { min-height: 38px; font-size: 13px; }
.xc-header { background: #fdfcf9; backdrop-filter: none; -webkit-backdrop-filter: none; }
html:is(.theme-dark,.studio-theme-dark) .xc-header { background: #1b1d21; }
.xc-header-actions :is(.xc-mobile-tools-toggle, .xc-mobile-tools) { display: none; }
.xc-nav { flex: 1 1 auto; }
.xc-pill-menu {
  --workshop-menu-bg: #fdfcf9; --workshop-menu-text: #27241e; --workshop-menu-muted: #686154;
  position: fixed; left: var(--xc-menu-left,12px); top: var(--xc-menu-top,80px);
  box-sizing: border-box; width: min(570px, calc(100vw - 24px)); max-height: var(--xc-menu-space,calc(100dvh - 100px));
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  background: var(--workshop-menu-bg); color: var(--workshop-menu-text);
  border: 1px solid rgba(130,116,87,.24); box-shadow: 0 14px 42px rgba(57,45,21,.14);
  padding: 12px; backdrop-filter: none;
}
.xc-pill-menu::-webkit-scrollbar { display: none; }
html:is(.theme-dark,.studio-theme-dark) .xc-pill-menu {
  --workshop-menu-bg: #1b1d21; --workshop-menu-text: #f0ede5; --workshop-menu-muted: #b4b0a6;
  border-color: #383b41; box-shadow: 0 16px 48px rgba(0,0,0,.3);
}
.xc-nav-dropdown[open] .xc-pill-menu { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.xc-pill-menu-head { grid-column: 1 / -1; border-bottom-color: rgba(130,116,87,.24); padding: 8px 10px 14px; }
.xc-pill-menu-head b { font-size: 15px; }
.xc-pill-menu-head small, .xc-pill-menu > :is(a,button) small { color: var(--workshop-menu-muted); font-size: 12px; line-height: 1.5; }
.xc-pill-menu > :is(a,button) { min-width: 0; min-height: 62px; padding: 10px; color: var(--workshop-menu-text); text-align: left; }
.xc-pill-menu > :is(a,button) b { font-size: 14px; }
.xc-pill-menu > :is(a,button) > span { min-width: 0; }
.xc-pill-menu > a > i, .xc-pill-menu .xc-menu-icon { color: #8a6d1f; background: rgba(138,109,31,.08); border-color: rgba(138,109,31,.2); }
html:is(.theme-dark,.studio-theme-dark) .xc-pill-menu > a > i,
html:is(.theme-dark,.studio-theme-dark) .xc-pill-menu .xc-menu-icon { color: #e4d49e; }
.xc-pill-menu > :is(a,button):hover { background: rgba(138,109,31,.1); }
.xc-pill-menu > :is(a,button):focus-visible { outline: 2px solid #9b7a28; outline-offset: -2px; }
@media (max-width: 1500px) {
  .xc-header { flex-wrap: wrap; }
  .xc-brand-badge { display: none; }
  .xc-header-actions { gap: 5px; }
  .xc-header-actions .xc-top-btn { padding: 7px 10px; }
  .xc-nav { order: 3; flex-basis: 100%; margin-left: 0; overflow-x: auto; overflow-y: hidden; }
  .xc-nav-item { padding: 7px 12px; }
}
@media (max-width: 1100px) {
  .xc-header-actions { flex: 1 1 0; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
  .xc-header-actions .xc-activity-btn > span, #theme-toggle-label { display: none; }
}
@media (max-width: 900px) {
  .xc-header-actions > [data-system-announcements] { display: none !important; }
}
@media (max-width: 640px) {
  :root, body.xc-home { --xc-page-w: calc(100vw - 24px); --xc-page-pad: 12px; }
  .xc-pill-menu { position: fixed; left: 12px; top: var(--xc-menu-top,80px); width: calc(100vw - 24px); }
  .xc-pill-menu > :is(a,button) { gap: 7px; padding: 8px; min-height: 58px; }
  .xc-pill-menu > :is(a,button) b { font-size: 13px; }
  .xc-pill-menu > :is(a,button) small { font-size: 11px; }
  .studio-xc-wrap { padding: 8px 8px 4px; }
  .xc-header { gap: 6px; padding: 6px 8px; }
  .xc-header-actions { gap: 4px; }
  .xc-header-actions .xc-top-btn { padding: 5px 7px; min-height: 32px; }
  .xc-header-actions .xc-credits { order: 1; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 100%; }
  .xc-header-actions .xc-credits-label { display: inline; font-size: 10px; }
  .xc-header-actions .xc-credits-val { font-size: 12px; }
  .xc-header-actions .xc-credits-team { gap: 3px; padding-inline-start: 5px; margin-inline-start: 0; }
  .xc-header-actions .xc-credits-recharge { padding: 5px 8px; margin-inline-start: 0; }
  .xc-brand-badge { display: none !important; }
  .xc-header-actions .xc-activity-btn > span, #theme-toggle-label { display: none; }
  .xc-brand .xc-starlet { display: none; }
  .xc-header-actions .xc-mobile-tools-toggle { display: inline-flex; }
  .xc-header-actions .xc-mobile-tools:not([hidden]) {
    position: absolute; top: calc(100% + 4px); right: 0;
    z-index: 35; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
    width: min(300px, 100%); max-height: calc(100dvh - var(--xc-topbar-h) - 12px);
    overflow: auto; padding: 8px; box-sizing: border-box;
    background: var(--xc-surface); border: 1px solid var(--xc-line);
    border-radius: 12px; box-shadow: 0 14px 34px rgb(0 0 0 / .2);
  }
  .xc-header-actions .xc-mobile-tools > :is(a, button) { min-height: 40px; }
  .xc-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; min-width: 0; overflow: visible; }
  .xc-nav > .xc-nav-dropdown { min-width: 0; }
  .xc-nav .xc-nav-item {
    min-height: 36px; justify-content: center; padding: 4px 2px; gap: 3px;
    font-size: clamp(11px, 3.4vw, 13px); text-align: center;
  }
  #icpBadge {
    left: 10px !important; right: 10px !important; bottom: max(2px, env(safe-area-inset-bottom)) !important;
    z-index: 10 !important; font-size: 10px !important; line-height: 13px !important; text-align: center; overflow-wrap: anywhere;
  }
  body.xc-home > #icpBadge { position: static !important; padding: 8px 12px max(12px, env(safe-area-inset-bottom)); }
  body:has(> #icpBadge) > #xcAppVersion { display: none; }
  html.studio-shell-on body :is(#studioAgentPanel, #projectAgentPanel, #agentPanel).agent-panel.open {
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 0 !important;
    z-index: 10060 !important;
  }
  html.studio-shell-on body.studio-shell-tool { height: 100dvh; }
  html.studio-shell-on iframe.studio-tool-frame { height: calc(100dvh - var(--xc-topbar-h)) !important; }
}
@media (max-width: 379px) {
  .xc-nav .xc-nav-caret { display: none; }
}

/* The project gate uses the same outer width as the other workspace pages. */
body.xc-canvas .canvas-gate .studio-proj-workspace,
body.xc-canvas .canvas-gate .studio-proj-workspace.gate-has-rail {
  width: min(var(--xc-page-w), calc(100% - 32px)) !important;
  max-width: var(--xc-page-w) !important; box-sizing: border-box;
  padding-inline: 0 !important;
}
.canvas-gate .studio-proj-workspace :is(.studio-proj-layout,.studio-proj-topbar) {
  width: 100% !important; max-width: none !important;
}
@media (max-width: 900px) {
  .studio-proj-workspace:not(.gate-has-rail) > .studio-proj-main { grid-column: 1; grid-row: 2; }
}
