@import url("/static/css/xc-hide-scroll.css?v=20261004-scrollbars-1");
/* 独立页复用星宸原顶栏（对照 xingchen/packages/shell/css/shell.css） */
:root {
  --xc-header-h: 62px;
  --xc-topbar-h: 86px;
  --xc-bg: #f4f1e9;
  --xc-stage: #f4f1e9;
}
html.studio-shell-on {
  --xc-bg: #f4f1e9;
  --xc-stage: #f4f1e9;
  --xc-header-bg: rgba(255, 255, 255, 0.8);
  --xc-line: rgba(28, 26, 23, 0.16);
  --xc-line-soft: rgba(28, 26, 23, 0.1);
  --xc-line-strong: rgba(28, 26, 23, 0.26);
  --xc-panel: rgba(255, 255, 255, 0.72);
  --xc-text: #26211a;
  --xc-muted: #6b6456;
  --xc-gold: #8a6d1f;
  --xc-gold-3: #9a854e;
  --xc-gold-soft-bg: rgba(138, 109, 31, 0.09);
  --xc-gold-soft-line: rgba(138, 109, 31, 0.38);
  --xc-gold-grad: linear-gradient(135deg, #ecd9a0, #d3ba82);
  --xc-on-gold: #14100a;
  --xc-hover: rgba(28, 26, 23, 0.05);
  --xc-danger: #d46a6a;
  --xc-header-h: 62px;
  --xc-topbar-h: 86px;
  --xc-font: "Space Grotesk", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}
html.studio-shell-on.theme-dark,
html.studio-shell-on.studio-theme-dark {
  --xc-bg: #070708;
  --xc-stage: #070708;
  --xc-header-bg: rgba(13, 13, 17, 0.72);
  --xc-line: rgba(255, 255, 255, 0.11);
  --xc-line-soft: rgba(255, 255, 255, 0.075);
  --xc-line-strong: rgba(255, 255, 255, 0.2);
  --xc-panel: rgba(255, 255, 255, 0.04);
  --xc-text: rgba(242, 241, 234, 0.92);
  --xc-muted: rgba(242, 241, 234, 0.6);
  --xc-gold: #f2e3ad;
  --xc-gold-3: #c9b88f;
  --xc-gold-soft-bg: rgba(242, 227, 173, 0.1);
  --xc-gold-soft-line: rgba(242, 227, 173, 0.35);
  --xc-gold-grad: linear-gradient(135deg, #f2e3ad, #dcc899);
  --xc-hover: rgba(255, 255, 255, 0.075);
}
html.auth-non-admin .admin-only { display: none !important; }

html.studio-shell-on body {
  padding-top: var(--xc-topbar-h);
  box-sizing: border-box;
}
html.studio-shell-on body.studio-shell-tool,
body.studio-shell-tool {
  overflow: hidden;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--xc-bg, #f4f1e9);
}

html:not(.studio-has-auth) .xc-nav-item[data-page="team"] {
  display: none !important;
}
.studio-xc-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 12px 20px 8px;
  pointer-events: none;
  font-family: var(--xc-font);
  background: var(--xc-bg);
  overflow: visible;
}
.studio-xc-wrap .xc-header { pointer-events: auto; overflow: visible; }
#userMenu.xc-user-menu {
  position: relative !important;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}
.studio-xc-wrap .xc-user-dd,
#userMenu .xc-user-dd {
  z-index: 10050;
}

.xc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--xc-line);
  border-radius: 16px;
  background: var(--xc-header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  box-sizing: border-box;
  color: var(--xc-text);
  overflow: visible;
}
html.theme-dark .xc-header,
html.studio-theme-dark .xc-header {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.xc-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.xc-brand-logo-svg { display: block; flex-shrink: 0; }
.xc-brand-word {
  display: inline-block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding-right: 0.18em;
  line-height: 1.1;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, #6d5416 10%, #8a6d1f 55%, #a3863e 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html.theme-dark .xc-brand-word,
html.studio-theme-dark .xc-brand-word {
  background: linear-gradient(180deg, #fbf3dd 10%, #e6cf94 50%, #c9a45e 90%);
  -webkit-background-clip: text;
  background-clip: text;
}
.xc-starlet {
  font-size: 10px;
  color: #8a6d1f;
  margin-left: 1px;
  align-self: flex-start;
  margin-top: 2px;
  filter: drop-shadow(0 0 5px rgba(255, 227, 173, 0.9));
  animation: xcStarTw 2.6s ease-in-out infinite;
}
html.theme-dark .xc-starlet,
html.studio-theme-dark .xc-starlet { color: #fff3cd; }
@keyframes xcStarTw {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.06); }
}
.xc-brand-badge {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--xc-muted);
  border-left: 1px solid var(--xc-line-strong);
  padding-left: 12px;
  margin-left: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.xc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 26px;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
}
.xc-nav::-webkit-scrollbar { display: none; }
.xc-nav-dropdown { position: relative; flex: 0 0 auto; }
.xc-nav-dropdown > summary { list-style: none; }
.xc-nav-dropdown > summary::-webkit-details-marker { display: none; }
.xc-nav-dropdown > summary::marker { content: ''; }
.xc-nav-caret { color: currentColor; font-size: 13px; transition: transform .16s ease; }
.xc-nav-dropdown[open] > summary .xc-nav-caret { transform: rotate(180deg); }
.xc-nav-dropdown[open] > summary { color: var(--xc-gold); }
.xc-pill-menu {
  position: absolute;
  z-index: 10020;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  width: min(256px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 110px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--xc-line);
  border-radius: 14px;
  background: rgba(20, 20, 27, .97);
  box-shadow: 0 18px 46px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(18px);
  color: #f4f2ec;
}
.xc-nav-dropdown[open] .xc-pill-menu { display: grid; gap: 3px; animation: studio-workshop-menu-in .3s cubic-bezier(.2, .85, .25, 1.25) both; transform-origin: top left; }
.xc-pill-menu-head { display: grid; gap: 3px; padding: 8px 10px 10px; border-bottom: 1px solid rgba(255,255,255,.09); margin-bottom: 3px; }
.xc-pill-menu-head b { font-size: 12px; }
.xc-pill-menu-head small,
.xc-pill-menu > a small { color: rgba(244,242,236,.56); font-size: 10px; }
.xc-pill-menu > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.xc-pill-menu > a:hover,
.xc-pill-menu > a:focus-visible { border-color: rgba(242,227,173,.25); background: rgba(242,227,173,.1); outline: none; }
.xc-pill-menu > a:active { transform: scale(.985); }
.xc-pill-menu > a > i { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border: 1px solid rgba(242,227,173,.24); border-radius: 8px; background: rgba(242,227,173,.08); color: #f2d98c; font-style: normal; font-weight: 700; }
.xc-pill-menu > a > span { display: grid; gap: 3px; }
.xc-pill-menu > a b { font-size: 11px; }
@keyframes studio-workshop-menu-in {
  0% { opacity: 0; transform: translateY(-7px) scale(.94, .88); }
  62% { opacity: 1; transform: translateY(1px) scale(1.025, 1.045); }
  82% { transform: translateY(0) scale(.99, .985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.xc-header-actions .xc-activity-btn { display: inline-flex; align-items: center; gap: 7px; border-color: rgba(224,179,77,.34); background: rgba(224,179,77,.08); color: var(--xc-text); }
.xc-header-actions .xc-activity-btn .xc-activity-icon { color: var(--xc-gold); }
.xc-header-actions .xc-activity-btn small { padding: 2px 5px; border-radius: 5px; background: rgba(224,179,77,.16); color: var(--xc-gold); font-size: 9px; font-weight: 800; }
.xc-header-actions .xc-activity-btn:hover { border-color: rgba(224,179,77,.56); background: rgba(224,179,77,.17); }
@media (prefers-reduced-motion: reduce) {
  .xc-nav-caret { transition: none; }
  .xc-nav-dropdown[open] .xc-pill-menu { animation: none; }
}
.xc-nav-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--xc-muted);
  padding: 7px 17px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.xc-nav-item svg { display: none; }
.xc-nav-item:hover {
  color: var(--xc-text);
  background: var(--xc-line-soft);
}
.xc-nav-item.is-active {
  color: var(--xc-on-gold);
  background: var(--xc-gold-grad);
  font-weight: 800;
  box-shadow: 0 5px 16px var(--xc-gold-soft-bg);
}

.xc-header-actions,
.xc-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.xc-top-btn {
  border: 1px solid var(--xc-line-soft);
  background: transparent;
  color: var(--xc-muted);
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.xc-top-btn:hover {
  color: var(--xc-gold);
  border-color: var(--xc-line);
  background: var(--xc-hover);
}
#topbar-agent-btn.xc-tool-agent,
.xc-tool-agent,
#theme-toggle-btn.xc-tool-theme,
#theme-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--xc-muted);
  font-weight: 400;
  padding: 7px 13px;
  border-radius: 999px;
}
.xc-tool-agent:hover,
#theme-toggle-btn:hover {
  border: 0;
  color: var(--xc-text);
  background: var(--xc-line-soft);
}
#topbar-agent-btn.active,
#topbar-agent-btn.agent-toggle-active {
  background: var(--xc-line-soft);
  color: var(--xc-gold);
  font-weight: 700;
}

#accountBtn.xc-avatar {
  position: relative;
  width: 30px;
  height: 30px;
  min-width: 30px;
  max-width: 30px;
  min-height: 30px;
  max-height: 30px;
  padding: 0;
  margin-left: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b5d3f, var(--xc-gold-3));
  border: 1px solid var(--xc-gold-soft-line);
  color: #0c0b08;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
}
#accountBtn.xc-avatar [data-user-name],
#accountBtn.xc-avatar .xc-user-caret { display: none; }
#accountBtn.xc-avatar .xc-user-av {
  position: relative;
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  border-radius: 50%;
}
#accountBtn.xc-avatar .xc-user-av > img,
#accountBtn.xc-avatar img.xc-av-img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  pointer-events: none;
}

.xc-credits {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--xc-muted);
  font-size: 12.5px;
  flex-shrink: 0;
}
.xc-credits:hover { color: var(--xc-text); }
.xc-credits strong {
  color: var(--xc-gold);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.xc-credits-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--xc-line-soft);
}
.xc-credits-team[hidden] { display: none !important; }
.xc-credits-recharge {
  background: var(--xc-gold-grad);
  color: var(--xc-on-gold);
  font-weight: 800;
  padding: 7px 17px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 12.5px;
  box-shadow: 0 6px 16px var(--xc-gold-soft-bg);
}

html.studio-shell-on body.c05-v2,
html.studio-shell-on body.xc-canvas {
  padding: 0;
}
html.studio-shell-on body.c05-v2 .shell,
html.studio-shell-on body.xc-canvas .shell {
  position: fixed;
  left: 0;
  top: var(--xc-topbar-h);
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
}
/* 无限画布编辑态（studio-canvas-full）：壳层顶栏隐藏让位，画布自身 c05-topbar 接管顶部。
   右上角「智能助手」悬浮球(#agentPanelPill)也随之露出，不再被壳顶栏盖住。 */
html.studio-shell-on.studio-canvas-full {
  --xc-topbar-h: 0px;
}
html.studio-canvas-full .studio-xc-wrap {
  display: none !important;
}
/* 画布顶栏内借宿的积分卡与主题按钮 */
html.studio-canvas-full #c05Topbar .c05-top-right {
  /* 给右上角智能助手悬浮球(#agentPanelPill)留位，避免积分/主题被压住 */
  padding-right: 104px;
}
#c05Topbar .c05-top-theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
}
#c05Topbar .c05-top-theme svg {
  width: 15px;
  height: 15px;
  display: block;
  flex: 0 0 auto;
}
#c05Topbar .xc-credits.c05-top-credits {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--c05-line, rgba(15, 23, 42, 0.12));
  background: var(--c05-hover, rgba(15, 23, 42, 0.04));
  color: var(--c05-text, #111827);
  font-size: 12px;
}
#c05Topbar .xc-credits.c05-top-credits:hover { color: var(--c05-text, #111827); border-color: var(--xc-gold-soft-line); }
#c05Topbar .c05-top-theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#c05Topbar .c05-top-theme svg { display: block; }
/* 门禁/列表是 position:fixed; inset:0，相对视口而不是 .shell，会被顶栏盖住 */
html.studio-shell-on .canvas-gate,
html.studio-shell-on .as-gate {
  top: var(--xc-topbar-h) !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
}
html.studio-shell-on .studio-tool-frame,
body.studio-shell-tool .studio-tool-frame,
iframe.studio-tool-frame {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: var(--xc-topbar-h, 86px) !important;
  bottom: 0 !important;
  width: 100% !important;
  height: calc(100vh - var(--xc-topbar-h, 86px)) !important;
  border: 0 !important;
  display: block !important;
  background: var(--xc-stage, #f4f1e9);
}

@media (max-width: 1100px) {
  .xc-nav { margin-left: 8px; }
  .xc-nav-item { padding: 7px 10px; }
  .xc-brand-badge { display: none; }
}
