body.workbench-page {
  --site-bg: var(--bg);
  --site-ink: #f1f1f1;
  --site-muted: #a7a7a7;
  --site-accent: #d4d4d4;
  --accent: #d4d4d4;
  --accent-2: #eeeeee;
  --accent-hover: #bdbdbd;
  --accent-soft-text: #ededed;
  --accent-rgb: 212, 212, 212;
  --accent-2-rgb: 238, 238, 238;
  background: var(--site-bg);
  color: var(--site-ink);
  font-size: 16px;
  padding-top: 52px;
}
.workbench-page [hidden] { display: none !important; }
body.workbench-page > .site-header { position: fixed; inset: 0 0 auto; width: 100%; z-index: 20; }
.workbench-page.effects-paused *, .workbench-page.effects-paused *::before, .workbench-page.effects-paused *::after, .studio-intro.motion-paused *, .studio-intro.motion-paused *::before, .studio-intro.motion-paused *::after { animation-play-state: paused !important; }
.site-header { border-bottom: 1px solid #cfcfcf0b; background: #181a1bed; box-shadow: 0 4px 18px #08080830; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.site-main { width: min(100% - 80px, 1280px); margin-inline: auto; }
/* Short pages still pin the footer to the viewport bottom (viewport minus the fixed header). */
.site-main:has(> .workbench-footer) { display: flex; flex-direction: column; min-height: calc(100svh - 52px); }
.site-main > .workbench-footer { margin-top: auto; }
.site-header-inner { width: 100%; max-width: none; height: 52px; margin: 0; padding: 0 16px; }
.site-brand { gap: 8px; font-size: 20px; }
.site-brand .brand-logo-mark { display: block; flex-shrink: 0; width: 32px; height: 32px; overflow: visible; }
/* Logo: the A stroke draws in, then the keyframe diamond lands; hover re-cues the diamond. */
.site-brand .logo-a { stroke-dasharray: 1 2; animation: logo-draw .7s cubic-bezier(.45,0,.2,1) backwards; }
.site-brand .logo-land, .site-brand .logo-cue { transform-box: fill-box; transform-origin: center; }
.site-brand .logo-land { animation: logo-land .45s cubic-bezier(.3,1.6,.5,1) .55s backwards; }
@keyframes logo-draw { from { stroke-dashoffset: 1.1; } to { stroke-dashoffset: 0; } }
@keyframes logo-land { from { opacity: 0; transform: scale(0) rotate(-90deg); } to { opacity: 1; transform: none; } }
@keyframes logo-cue { 0%, 100% { transform: scale(1); } 40% { transform: scale(.8); } }
@media (prefers-reduced-motion: no-preference) {
  .site-brand:focus-visible .logo-cue { animation: logo-cue .6s cubic-bezier(.3,1.4,.5,1); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .site-brand:hover .logo-cue { animation: logo-cue .6s cubic-bezier(.3,1.4,.5,1); }
}
/* 进场：横幅与各分区依次上浮，卡片按批内序号 --i 逐个进入；只动 opacity/transform。 */
.studio-intro, .project-section, .explore-section { animation: page-enter .5s cubic-bezier(.2,.7,.3,1) backwards; }
.project-section { animation-delay: .12s; }
.explore-section { animation-delay: .24s; }
.video-card, .example-card { animation: page-enter .45s cubic-bezier(.2,.7,.3,1) calc(min(var(--i, 0), 11) * 50ms) backwards; }
@keyframes page-enter { from { opacity: 0; transform: translateY(12px); } }
.studio-intro { margin: 28px 0; }
/* 横幅：光晕 + 点阵底，左文案右时间线样机。 */
.intro-create { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 20px 28px 20px 40px; border: 1px solid #ffffff0f; border-radius: 16px; background: radial-gradient(520px 320px at 88% 0%, #8f86e01a, transparent 70%), radial-gradient(420px 260px at 0% 100%, #5fb3d812, transparent 70%), linear-gradient(180deg, #212224, #1b1c1d); color: #ededed; }
/* 固定点阵遮罩：四边点心留白 24px，space 将剩余空间均分到点间。 */
.intro-dots {
  position: absolute; z-index: -1; inset: 13px; overflow: hidden; pointer-events: none;
  background: #ffffff18;
  -webkit-mask: radial-gradient(circle, #000 1.15px, #0005 1.45px, transparent 1.9px) center / 22px 22px space;
  mask: radial-gradient(circle, #000 1.15px, #0005 1.45px, transparent 1.9px) center / 22px 22px space;
}
/* 仅移动遮罩内部的光带，点的位置不变；动画只改变 transform 和 opacity。 */
.intro-dots::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 15%, #b3d4ffcc 44%, #d2c4ffdd 56%, transparent 85%);
  transform: translateX(-100%); opacity: 0;
  animation: intro-dots-breathe 3s ease-in-out infinite;
}
@keyframes intro-dots-breathe {
  0% { transform: translateX(-100%); opacity: 0; }
  25%, 75% { opacity: .25; }
  40%, 60% { opacity: .35; }
  100% { transform: translateX(100%); opacity: 0; }
}
.studio-intro h1 { scroll-margin-top: 110px; font-size: 30px; font-weight: 650; line-height: 1.3; letter-spacing: .5px; }
.studio-intro h1 em { font-style: normal; background: linear-gradient(90deg, #d1e9ff, #b5a0f5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-copy p { margin-top: 8px; color: #a9a9a9; font-size: 14px; line-height: 1.8; }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.intro-cta { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 10px; background: #f1f1f1; color: #161616; font-size: 15px; font-weight: 600; box-shadow: 0 6px 20px #0000004d; transition: transform .2s ease, background .2s ease; }
.intro-cta:hover, .intro-cta:focus-visible { background: #fff; transform: translateY(-1px); }
.intro-tags { color: #7d7d7d; font-size: 13px; }
.intro-stage { pointer-events: none; }
/* 时间线生成：轨道依次从左揭开（外层左移 + 内层反向抵消），播放头扫过后依次淡出，8s 循环；只动画 transform/opacity。 */
.intro-stage * { animation-duration: 8s; animation-iteration-count: infinite; }
.stage-tracks { position: relative; display: grid; gap: 12px; }
.stage-tracks span { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 12px; height: 16px; }
.stage-tracks span:nth-child(1) { --c: #8f88b8; }
.stage-tracks span:nth-child(2) { --c: #7fa9b3; --d: .3s; }
.stage-tracks span:nth-child(3) { --c: #a3adb8; --d: .6s; }
.stage-tracks span:nth-child(4) { --c: #c2ad83; --d: .9s; }
.stage-tracks span:nth-child(5) { --c: #a597c4; --d: 1.2s; }
/* 首次进入时标签随轨道逐行淡入（仅一次），轨道在延迟期间保持隐藏。 */
.stage-tracks em { display: flex; align-items: center; gap: 6px; color: #8a8a8a; font-size: 12px; font-style: normal; line-height: 16px; animation: stage-label-in .5s var(--d, 0s) ease-out both; }
.stage-tracks em i { width: 12px; font-size: 11px; text-align: center; }
.stage-tracks span > i { overflow: hidden; height: 10px; opacity: .6; animation-name: stage-reveal; animation-delay: var(--d, 0s); }
.stage-tracks s { display: flex; gap: 4px; height: 100%; animation-name: stage-reveal-inner; animation-delay: inherit; }
.stage-tracks span > i, .stage-tracks s { animation-timing-function: cubic-bezier(.4,0,.2,1); animation-fill-mode: backwards; }
.stage-tracks s > b { flex: 0 1 var(--w, 100%); border-radius: 3px; background: linear-gradient(#ffffff2e, transparent), var(--c); }
.stage-tracks span:nth-child(4) s { justify-content: space-around; }
.stage-tracks span:nth-child(4) b { flex: 0 0 10px; border-radius: 50%; }
.stage-tracks span:nth-child(5) b { background: linear-gradient(90deg, #a597c433, #a597c4); }
.stage-playhead { position: absolute; top: -8px; bottom: -4px; left: 58px; right: 0; border-left: 1.5px solid #f1f1f1; animation-name: stage-playhead; animation-timing-function: linear; }
.stage-playhead::before { content: ''; position: absolute; top: 0; left: -5.75px; width: 10px; height: 10px; border-radius: 50% 50% 50% 0; background: #f1f1f1; box-shadow: 0 0 8px #ffffff4d; transform: rotate(-45deg); }
@keyframes stage-reveal { 0% { opacity: .6; transform: translateX(-100%); } 22%, 92% { opacity: .6; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes stage-label-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes stage-reveal-inner { 0% { transform: translateX(100%); } 22%, 100% { transform: none; } }
@keyframes stage-playhead { 0%, 38% { opacity: 0; transform: none; } 41% { opacity: 1; transform: none; } 90% { opacity: 1; transform: translateX(100%); } 96%, 100% { opacity: 0; transform: translateX(100%); } }
@media (max-width: 1100px) {
  .intro-create { gap: 28px; }
  .studio-intro h1 { font-size: 26px; }
}
@media (max-width: 860px) {
  .intro-create { grid-template-columns: minmax(0, 1fr); }
  .intro-stage { display: none; }
}
@media (max-width: 620px) {
  .studio-intro { margin-block: 20px; }
  .intro-create { padding: 24px 20px; }
  .studio-intro h1 { font-size: 22px; }
  .intro-copy p { font-size: 13px; }
  .intro-actions { margin-top: 20px; }
}
.project-section, .explore-section { scroll-margin-top: 140px; }
.project-section { padding-top: 8px; }
.view-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.view-heading h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; line-height: 1.4; font-weight: 600; letter-spacing: -.6px; }
.view-heading h2 > .app-icon { flex-shrink: 0; color: #a3b9df; font-size: 18px; letter-spacing: 0; }
.explore-section .view-heading h2 > .app-icon { color: #b6a7da; }
.project-count { padding: 2px 9px; border-radius: 6px; background: #282828; color: #a8a8a8; font: 13px/1.5 Consolas, monospace; letter-spacing: 0; }
.project-toolbar, .explore-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.project-toolbar { padding-bottom: 18px;}
.filter-tabs { display: flex; align-items: center; gap: 6px; }
.filter-tabs button { flex-shrink: 0; min-height: 34px; padding: 0 13px; border-radius: 7px; color: #9b9b9b; background: transparent; font-size: 12px; white-space: nowrap; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.filter-tabs button:hover { color: #f2f2f2; background: #ffffff05; }
.filter-tabs button[aria-pressed="true"], .filter-tabs button[aria-selected="true"] { color: #e4e4e4; background: #ffffff12; box-shadow: inset 0 0 0 1px #ffffff1c; }
.project-search { display: flex; gap: 10px; align-items: center; height: 38px; padding: 0 13px; border: 1px solid #ffffff13; border-radius: 8px; background: #222222; color: #959595; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.project-search input { width: 166px; min-width: 0; border: 0; outline: 0; background: transparent; color: #ebebeb; font-size: 13px; }
.project-search input::placeholder { color: #989898; }
.project-search:focus-within { border-color: #d4d4d4; }
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; min-height: 86px; }
.video-grid.is-collapsed > .video-card:nth-child(n+5) { display: none; }
.video-grid[aria-busy="true"] { opacity: .5; pointer-events: none; }
.video-card, .example-card { min-width: 0; overflow: hidden; border: 1px solid #cfcfcf10; border-radius: 11px; background: linear-gradient(135deg, #252525f2, #212121f2); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.video-card { position: relative; }
.video-card:hover, .video-card:focus-within, .example-card:hover { transform: translateY(-3px); border-color: #cacaca35; box-shadow: 0 12px 28px #0b0b0b2b; }
.vc-card-main { display: flex; align-items: center; gap: 13px; padding: 10px; }
.project-cover { display: grid; place-items: center; flex: 0 0 128px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px; background: #303030; }
.project-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video-card:hover .project-cover img { transform: scale(1.05); }
.vc-body { flex: 1; min-width: 0; }
.vc-body > strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; line-height: 20px; }
.vc-time { display: block; margin-top: 9px; color: #979797; font-size: 12px; }
.project-card-actions { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 3px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.video-card:hover .project-card-actions, .video-card:focus-within .project-card-actions { opacity: 1; pointer-events: auto; }
.project-card-actions button { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; background: #323232; color: #bcbcbc; transition: color .18s ease, background .18s ease; }
.project-card-actions .app-icon { font-size: 11px; }
.project-card-actions button:hover { color: #fff; background: #414141; }
.project-card-actions [data-delete-project]:hover { color: #f1b1ad; }
@media (hover: none) { .project-card-actions { opacity: 1; pointer-events: auto; } }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pagination button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 6px; background: #2b2b2b; color: #c5c5c5; font-size: 14px; }
.pagination button[aria-current="page"], .pagination button:hover:not(:disabled) { color: #ededed; background: #444444; }
.pagination button:disabled { opacity: .35; cursor: default; }
.page-ellipsis { padding: 0 3px; }
.workbench-page .project-expand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 6px; padding: 8px 0 8px 12px; border: 0; background: transparent; color: #9a9a9a; font-size: 12px; transition: color .18s ease; }
.project-expand:hover { color: #ededed; }
.project-expand i { font-size: 9px; transition: transform .2s ease; }
.project-expand:hover i { transform: translateY(2px); }
.project-expand[aria-expanded="true"] i { transform: rotate(180deg); }
.library-status { grid-column: 1 / -1; align-self: center; text-align: center; color: var(--site-muted); }
.library-empty { grid-column: 1 / -1; display: grid; align-content: center; justify-items: center; gap: 12px; min-height: 130px; padding: 20px; border: 1px dashed #ffffff20; border-radius: 9px; text-align: center; }
.library-empty.is-login { cursor: pointer; }
.library-empty.is-login:hover { border-color: #ffffff40; }
.library-empty > i { font-size: 24px; color: #b4b4b4; }
.library-empty h3 { margin: 0; font-size: 16px; font-weight: 500; }
.library-empty p { color: var(--site-muted); font-size: 13px; line-height: 1.7; }
.library-empty button, .library-empty a { padding: 8px 14px; border-radius: 6px; background: #3a3a3a; color: #e4e4e4; font-size: 13px; }
.explore-section { padding-top: 32px; }
.explore-toolbar { margin: 0; padding-block: 10px 18px; }
.header-explore-slot { border-top: 1px solid #ffffff08; }
.header-explore-slot .explore-toolbar { width: min(100% - 80px, 1280px); margin-inline: auto; padding-block: 10px; }
.example-search { margin-left: auto; height: 34px; padding-inline: 11px; border-color: #ffffff24; border-radius: 7px; background: #ffffff04; }
.example-search input { width: 156px; }
.example-search .app-icon { font-size: 13px; }
.example-search:hover { background: #ffffff08; }
.example-search:focus-within { border-color: #cdcdcd40; background: #262626; box-shadow: 0 0 0 3px #cdcdcd08; }
.example-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.example-cover { display: grid; place-items: center; aspect-ratio: 16 / 9; background: radial-gradient(ellipse at 20% 0%, #9e9e9e22, transparent 75%), linear-gradient(145deg, #303030, #262626); color: #737373; }
.example-cover { position: relative; overflow: hidden; }
.example-duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: #000000a6; color: #f2f2f2; font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; backdrop-filter: blur(4px); }
.example-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.example-card:hover .example-cover img { transform: scale(1.035); }
.example-caption { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px 14px; }
.example-caption h3 { max-width: 100%; overflow: hidden; margin: 0; color: #e0e0e0; font-size: 14px; line-height: 21px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.example-tag { padding: 2px 8px; border: 1px solid #ffffff14; border-radius: 999px; background: #ffffff08; color: #a8a8a8; font-size: 11px; line-height: 16px; }
.workbench-page .explore-end { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 36px 0 40px; color: #858585; font-size: 12px; line-height: 20px; }
.explore-end::before, .explore-end::after { content: ''; width: 48px; height: 1px; background: linear-gradient(90deg, transparent, #ffffff20); }
.explore-end::after { transform: rotate(180deg); }
.explore-end button { color: #cfcfcf; text-decoration: underline; text-underline-offset: 3px; }
.explore-loader { display: flex; justify-content: center; gap: 8px; padding: 36px 0 40px; }
.explore-loader i { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #b6a7da, #7fb8e0); animation: explore-loader 1.1s cubic-bezier(.45, 0, .55, 1) infinite; }
.explore-loader i:nth-child(2) { animation-delay: .15s; }
.explore-loader i:nth-child(3) { animation-delay: .3s; }
@keyframes explore-loader {
  0%, 80%, 100% { opacity: .35; transform: translateY(0) scale(.8); }
  40% { opacity: 1; transform: translateY(-8px) scale(1); box-shadow: 0 6px 14px #b6a7da55; }
}
.workbench-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 18px 0; border-top: 1px solid #ffffff0c; color: #929292; font-size: 12px; line-height: 20px; }
.workbench-footer-brand { display: inline-flex; align-items: center; gap: 8px; color: #bcbcbc; font-size: 16px; font-weight: 600; letter-spacing: -.4px; transition: color .2s ease; }
.workbench-footer-brand img { display: block; }
.workbench-footer-brand:hover { color: #ededed; }
.workbench-footer small { font-size: 11px; white-space: nowrap; }
.workbench-footer-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.workbench-footer-link:hover { color: #ededed; text-decoration: underline; text-underline-offset: 3px; }
.workbench-footer-link img { display: block; flex-shrink: 0; width: 16px; height: 18px; object-fit: contain; }
.workbench-back-top { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; transition: color .2s ease; }
.workbench-back-top i { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #ffffff16; border-radius: 50%; font-size: 10px; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.workbench-back-top:hover { color: #ededed; }
.workbench-back-top:hover i { transform: translateY(-2px); border-color: #ffffff35; background: #ffffff06; }
.rename-field { display: grid; gap: 10px; }
.rename-field input { width: 100%; padding: 11px; border: 1px solid #ffffff20; border-radius: 6px; background: #2c2c2c; color: var(--text); }
.rename-error { min-height: 18px; margin-top: 10px !important; color: #efb1ab; font-size: 14px; }
.site-main a:focus-visible, .site-main button:focus-visible, .site-main select:focus-visible, .site-main [role="tabpanel"]:focus-visible, .site-header a:focus-visible, .site-header button:focus-visible { outline: 2px solid #d4d4d4; outline-offset: 4px; }
@media (max-width: 1100px) {
  .video-grid, .example-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .video-grid.is-collapsed > .video-card:nth-child(n+4) { display: none; }
  .explore-toolbar { gap: 14px; }
}
@media (max-width: 800px) {
  .site-main, .header-explore-slot .explore-toolbar { width: calc(100% - 40px); }
  .site-header-inner { padding-inline: 20px; }
  .video-grid, .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .video-grid.is-collapsed > .video-card:nth-child(n+3) { display: none; }
  .category-tabs { width: 100%; overflow-x: auto; padding: 3px 0 7px; }
  .example-search { width: 100%; }
  .example-search input { width: 100%; }
}
@media (max-width: 540px) {
  .site-header-inner { padding-inline: 14px; gap: 10px; }
  .site-brand { font-size: 17px; gap: 5px; }
  .site-brand .brand-logo-mark { width: 28px; height: 28px; }
  .view-heading { gap: 12px; }
  .view-heading h2 { font-size: 23px; gap: 9px; }
  .video-grid, .example-grid { grid-template-columns: 1fr; }
  .video-grid.is-collapsed > .video-card:nth-child(n+2) { display: none; }
  .project-toolbar .project-search { width: 100%; }
  .project-toolbar .project-search input { width: 100%; }
  .filter-tabs button { padding-inline: 12px; }
  .workbench-footer { gap: 10px 14px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .workbench-document, body.workbench-page { scroll-behavior: auto; }
  .workbench-page *, .workbench-page *::before, .workbench-page *::after { transition: none !important; animation: none !important; }
}
